Browse Source

remove extra white spaces in inp_fix_gnd_name()

pre-master-46
h_vogt 16 years ago
parent
commit
7f9885c842
  1. 4
      ChangeLog
  2. 5
      src/frontend/inpcom.c

4
ChangeLog

@ -1,3 +1,7 @@
2010-06-17 Holger Vogt
* inpcom.c: in inp_fix_gnd_name() remove excessive white spaces
around 0 after replacing "gnd" by " 0 "
2010-06-16 Holger Vogt
* src/Makefile.am: for WINDOWS all of help files and
related files excluded

5
src/frontend/inpcom.c

@ -236,7 +236,8 @@ inp_fix_gnd_name( struct line *deck ) {
while ( c != NULL ) {
gnd = c->li_line;
if ( *gnd == '*' ) { c = c->li_next; continue; }
// if there is a comment or no gnd, go to next line
if (( *gnd == '*' ) || (strstr( gnd, "gnd" ) == NULL)) { c = c->li_next; continue; }
// replace "§gnd§" by "§ 0 §", § being a ' ' ',' '(' ')'.
while ( (gnd = strstr( gnd, "gnd" ) ) ) {
if (( isspace(*(gnd-1)) || *(gnd-1) == '(' || *(gnd-1) == ',' ) &&
@ -246,6 +247,8 @@ inp_fix_gnd_name( struct line *deck ) {
}
gnd += 3;
}
// now remove the extra white spaces around 0
c->li_line = inp_remove_ws(c->li_line);
c = c->li_next;
}
}

Loading…
Cancel
Save