Uses general_field_encode in rss_binary_string; min 4 chars; bottom separator

This commit is contained in:
gitlost 2019-10-31 02:01:42 +00:00
parent 0fe9051324
commit 1dd4b08986
6 changed files with 483 additions and 397 deletions

View file

@ -90,12 +90,12 @@ static int general_field_next_none(char* general_field, int i, int general_field
}
/* Attempts to apply encoding rules from sections 7.2.5.5.1 to 7.2.5.5.3
* of ISO/IEC 24724:2010 (same as sections 5.4.1 to 5.4.3 of ISO/IEC 24723:2010) */
* of ISO/IEC 24724:2011 (same as sections 5.4.1 to 5.4.3 of ISO/IEC 24723:2010) */
int general_field_encode(char* general_field, int* p_mode, int* p_last_digit, char binary_string[]) {
int i, d1, d2;
int mode = *p_mode;
int last_digit = 0; /* Set to odd remaining digit at end if any */
int general_field_len = strlen(general_field);
int general_field_len = strlen(general_field);
for (i = 0; i < general_field_len; ) {
int type = general_field_type(general_field, i);