Subversion Repositories SvarDOS

Rev

Rev 1271 | Rev 1290 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1271 Rev 1272
Line 159... Line 159...
159
    /* convert escaped chars to actual bytes (\n -> newline, etc) */
159
    /* convert escaped chars to actual bytes (\n -> newline, etc) */
160
    linelen = unesc_string(linebuf);
160
    linelen = unesc_string(linebuf);
161
 
161
 
162
    /* read id and get ptr to actual string ("1.15:string") */
162
    /* read id and get ptr to actual string ("1.15:string") */
163
    ptr = parseline(&id, linebuf);
163
    ptr = parseline(&id, linebuf);
-
 
164
 
-
 
165
    /* handle malformed lines */
164
    if (ptr == NULL) {
166
    if (ptr == NULL) {
165
      printf("ERROR: line #%u of %s is malformed (linelen = %u):\r\n", linecount, fname, linelen);
167
      printf("WARNING: %s[#%u] is malformed (linelen = %u):\r\n", fname, linecount, linelen);
166
      puts(linebuf);
168
      puts(linebuf);
167
      len = 0;
169
      continue;
168
      break;
-
 
169
    }
170
    }
-
 
171
 
-
 
172
    /* ignore empty strings (but emit a warning) */
170
    if (strlen(ptr) == 0) {
173
    if (ptr[0] == 0) {
171
      printf("WARNING: %s[#%u] ignoring empty string %u.%u\r\n", fname, linecount, id >> 8, id & 0xff);
174
      printf("WARNING: %s[#%u] ignoring empty string %u.%u\r\n", fname, linecount, id >> 8, id & 0xff);
172
      continue;
175
      continue;
173
    }
176
    }
174
 
177
 
175
    /* warn about dirty lines */
178
    /* warn about dirty lines */