IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34752


Ignore:
Timestamp:
Nov 30, 2012, 10:28:06 AM (14 years ago)
Author:
eugene
Message:

handle \r as well as \n for EOL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/Ohana/src/libohana/src/string.c

    r34468 r34752  
    130130  status = EOF + 1;
    131131 
    132   for (i = 0, c = 0; (c != '\n') && (status != EOF); i++) {
     132  for (i = 0, c = 0; (c != '\n') && (c != '\r') && (status != EOF); i++) {
    133133    status = fscanf (f, "%c", &c);
    134134    line[i] = c;
     
    154154  status = EOF + 1;
    155155 
    156   for (i = 0, c = 0; (c != '\n') && (status != EOF) && (i < maxlen); i++) {
     156  for (i = 0, c = 0; (c != '\n') && (c != '\r') && (status != EOF) && (i < maxlen); i++) {
    157157    status = fscanf (f, "%c", &c);
    158158    line[i] = c;
Note: See TracChangeset for help on using the changeset viewer.