dn> Only for reformatting then? Try GNU indent.
... GNU Indent 1.9.1, with the following patch applied...
diff -c indent\comments.c:1.1.1.1 indent\comments.c:1.3
*** indent\comments.c:1.1.1.1 Sat May 04 11:18:38 1996
--- indent\comments.c Sat May 04 11:18:38 1996
***************
*** 526,532 ****
/* If we are formatting, check that we haven't exceeded the
line length. If we haven't set line_break_ptr, keep going. */
! if (format && column > right_margin && line_break_ptr)
{
if (line_break_ptr < e_com - 1)
{
--- 526,533 ----
/* If we are formatting, check that we haven't exceeded the
line length. If we haven't set line_break_ptr, keep going. */
! if (format && column > right_margin && line_break_ptr
! && (strncmp(buf_ptr, " */", 3) != 0))
{
if (line_break_ptr < e_com - 1)
{
***************
*** 541,547 ****
--- 542,553 ----
right_margin = column - save_length;
}
else
+ {
*e_com = '\0';
+ e_com--;
+ if ((*e_com == ' ') || (*e_com == TAB)) *e_com = '\0';
+ else e_com++;
+ }
goto end_line;
}
diff -c indent\makefile.emx:1.1.1.1 indent\makefile.emx:1.2
*** indent\makefile.emx:1.1.1.1 Sat May 04 11:18:40 1996
--- indent\makefile.emx Sat May 04 11:18:40 1996
***************
*** 1,9 ****
AWK = gawk
MAKEINFO = makeinfo
# CC = gcc -g
! # O = .o
! CC = gcc -Zomf -Zmtd -Zstack 512 -O -s
! O = .obj
CFLAGS = -O -DOS2 -DDIRENT -I.
LFLAGS =
LIBS =
--- 1,9 ----
AWK = gawk
MAKEINFO = makeinfo
# CC = gcc -g
! O = .o
! CC = gcc
! #O = .obj
CFLAGS = -O -DOS2 -DDIRENT -I.
LFLAGS =
LIBS =
***************
*** 15,21 ****
.c$O:
$(CC) $(CFLAGS) -c $<
! all: indent.exe indent.info
indent.exe: ${OBJ}
${CC} -o ${at} ${LFLAGS} ${OBJ} ${LIBS}
--- 15,21 ----
.c$O:
$(CC) $(CFLAGS) -c $<
! all: indent.exe
indent.exe: ${OBJ}
${CC} -o ${at} ${LFLAGS} ${OBJ} ${LIBS}
@EOT:
---
* Origin: X (3:711/934.9)
|