indent breaks identifiers with dollar signs + FIX
William E. Sommerfeld
wesommer at athena.mit.edu
Fri Mar 11 14:34:37 AEST 1988
Index: ucb/indent/lexi.c
Description:
If you run indent over a file of C source which uses `$'
characters in identifiers (such as code written for Apollo or VAX/VMS
systems), the output will have spaces around all the dollar signs.
Repeat-By:
cat >/tmp/foo.c <<'EOF'
foo_$bar() { printf("hello, world"); }
EOF
cat /tmp/foo.c
indent /tmp/foo.c
cat /tmp/foo.c
Fix:
Apply this context diff to /usr/src/ucb/indent/lexi.c:
*** lexi.c.old Mar 10 23:27:14 1988
--- lexi.c Thu Mar 10 23:18:43 1988
***************
*** 124,130 ****
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
! 0, 3, 0, 0, 0, 3, 3, 0,
0, 0, 3, 3, 0, 3, 3, 3,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 0, 3, 3, 3, 3,
--- 124,130 ----
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
! 0, 3, 0, 0, 1, 3, 3, 0,
0, 0, 3, 3, 0, 3, 3, 3,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 0, 3, 3, 3, 3,
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list