Index: c2man/autodoc.c diff -c c2man/autodoc.c:1.1.1.1 c2man/autodoc.c:1.2 *** c2man/autodoc.c:1.1.1.1 Sun Jan 30 15:11:46 2000 --- c2man/autodoc.c Sun Jan 30 15:22:15 2000 *************** *** 388,394 **** state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; --- 388,394 ---- state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c) || ispunct(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; Index: c2man/html.c diff -c c2man/html.c:1.1.1.1 c2man/html.c:1.2 *** c2man/html.c:1.1.1.1 Sun Jan 30 15:11:46 2000 --- c2man/html.c Sun Jan 30 15:22:15 2000 *************** *** 288,294 **** state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; --- 288,294 ---- state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c) || ispunct(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; Index: c2man/latex.c diff -c c2man/latex.c:1.1.1.1 c2man/latex.c:1.2 *** c2man/latex.c:1.1.1.1 Sun Jan 30 15:11:46 2000 --- c2man/latex.c Sun Jan 30 15:22:15 2000 *************** *** 192,198 **** state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; --- 192,198 ---- state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c) || ispunct(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; Index: c2man/nroff.c diff -c c2man/nroff.c:1.1.1.1 c2man/nroff.c:1.2 *** c2man/nroff.c:1.1.1.1 Sun Jan 30 15:11:46 2000 --- c2man/nroff.c Sun Jan 30 15:22:15 2000 *************** *** 248,254 **** state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; --- 248,254 ---- state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c) || ispunct(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; Index: c2man/texinfo.c diff -c c2man/texinfo.c:1.1.1.1 c2man/texinfo.c:1.2 *** c2man/texinfo.c:1.1.1.1 Sun Jan 30 15:11:46 2000 --- c2man/texinfo.c Sun Jan 30 15:22:15 2000 *************** *** 271,277 **** state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; --- 271,277 ---- state = PERIOD; else if (isspace(c) && state == PERIOD) state = CAPITALISE; ! else if (isalnum(c) || ispunct(c)) { if (islower(c) && state == CAPITALISE) c = toupper(c); state = TEXT; Index: c2man/test/README.point_test diff -c /dev/null c2man/test/README.point_test:1.1 *** /dev/null Sun Jan 30 16:12:08 2000 --- c2man/test/README.point_test Sun Jan 30 15:22:20 2000 *************** *** 0 **** --- 1,42 ---- + The default behavior of c2man is to fix capitalization in output + derived from the comments in the source code. + + Normally there is distinguished between period followed by an + alphanumeric (--> no capitalization is done) and period followed by newline or + space (end of sentence-->capitalization of the next alphabetic character is + done). + + Now I had the following Problem: + + this is a sentence with an '.' point in ticks. next sentence + + leads to the wrong output: + + This is a sentence with an '.' Point in ticks. Next sentence + + instead of the correct output: + + This is a sentence with an '.' point in ticks. Next sentence + + The file 'point_test.h' contains an example to test this behavior. + + And the patch 'point_test_fix.diff' fixes this problem (I hope without any + side effects). + + I used the source from + http://ftp.lh.umu.se/debian/dists/potato/main/source/devel/ + + c2man_2.41.orig.tar.gz + + with the patch + + c2man_2.41.diff.gz + + from the same ftp server applied. + + I added a directory 'test' with this text as README.point_test and the + example file point_test.h and one false and one corrected output + unix manpage in it. + + + Index: c2man/test/point_test.3_correct diff -c /dev/null c2man/test/point_test.3_correct:1.1 *** /dev/null Sun Jan 30 16:12:08 2000 --- c2man/test/point_test.3_correct Sun Jan 30 15:22:20 2000 *************** *** 0 **** --- 1,15 ---- + .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! + .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! + .TH "point_test" 3 "26 November 1999" "c2man point_test.h" + .SH "NAME" + point_test \- test the treatment of '.' by the tool c2man. + .SH "SYNOPSIS" + .ft B + #include + .sp + extern void point_test(void); + .ft R + .SH "DESCRIPTION" + This is a sentence with multiple .points '.' in it. + The 'in' in the previous sentence schould not be capitalized. + I hope I have not added any side effects. Index: c2man/test/point_test.3_false diff -c /dev/null c2man/test/point_test.3_false:1.1 *** /dev/null Sun Jan 30 16:12:08 2000 --- c2man/test/point_test.3_false Sun Jan 30 15:22:20 2000 *************** *** 0 **** --- 1,15 ---- + .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! + .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! + .TH "point_test" 3 "26 November 1999" "c2man point_test.h" + .SH "NAME" + point_test \- test the treatment of '.' by the tool c2man. + .SH "SYNOPSIS" + .ft B + #include + .sp + extern void point_test(void); + .ft R + .SH "DESCRIPTION" + This is a sentence with multiple .points '.' In it. + The 'in' in the previous sentence schould not be capitalized. + I hope I have not added any side effects. Index: c2man/test/point_test.h diff -c /dev/null c2man/test/point_test.h:1.1 *** /dev/null Sun Jan 30 16:12:08 2000 --- c2man/test/point_test.h Sun Jan 30 15:22:20 2000 *************** *** 0 **** --- 1,7 ---- + /* + * test the treatment of '.' by the tool c2man. + * This is a sentence with multiple .points '.' in it. + * the 'in' in the previous sentence schould not be capitalized. + * I hope I have not added any side effects. + */ + extern void point_test();