*** 4.8-RELEASE-through-8.0/src/usr.bin/fmt/fmt.c Tue May 25 00:32:23 2010 --- new/src/usr.bin/fmt/fmt.c Tue May 25 02:33:22 2010 *************** *** 618,623 **** --- 618,676 ---- if (ferror(stream)) { warn("%s", name); ++n_errors; } } + #include // for isprint + + /* Add german umlauts (as seen on + * http:/-/www.deutsches-museum.de/info/veranst/winter14.htm + * and http:/-/www.berklix.org/bim/leaflet/ Tex Doc from Rainer, + * to list of printable characters. + * This could probably be merged into the macro, + * &/or look up country Locale. + * & Maybe add lots of other stuff like French cedillas, etc ? + * Add French + */ + int isprintext(ch) /* For before 5.3-RELEASE */ + int ch; + { + if ( isprint(ch) || + // Hex Dec Oct Languag Character + ( ch == 0xD4 /* 212 0324 German A: Guessed */ ) || + ( ch == 0xD6 /* 214 0326 German O: Seen */ ) || + ( ch == 0xDC /* 220 0334 German U: Guessed */ ) || + ( ch == 0xDF /* 223 0337 German ss */ ) || + ( ch == 0xE0 /* 224 0340 French a` (left top, right base, as in "jusqu'(a`) 20%") http:/-/seafrance.fr */ ) || + ( ch == 0xE2 /* 226 0342 French a^ as in "que soit leur (a^)ge" http:/-/seafrance.fr */ ) || + ( ch == 0xE4 /* 228 0344 German a: */ ) || + ( ch == 0xE7 /* 231 0347 French c? as in "le droit fran(c inverted question mark)ais" http:/-/seafrance.fr */ ) || + ( ch == 0xE9 /* 233 0351 French e' (left base, right top, as in "d(e')part)" http:/-/seafrance.fr */ ) || + ( ch == 0xEA /* 234 0352 French e^ as in "m(e^)me pour un" http:/-/seafrance.fr */ ) || + ( ch == 0xEE /* 238 0356 French i^ as in "reconna(i^)t" http:/-/seafrance.fr */ ) || + ( ch == 0xF6 /* 246 0366 German o: */ ) || + ( ch == 0xFC /* 252 0374 German u: */ ) + ) return(1) ; else return(0) ; + } + #if /*{*/ ( __FreeBSD__ > 4 /* iswprint not in FreeBSD_4 library */ ) + int iswprintext(ch) /*5.3-RELEASE switched from calling isprint to iswprint*/ + wint_t ch; + { + if ( iswprint(ch) || + ( ch == 0xD4 /* 212 0324 German A: Guessed */ ) || + ( ch == 0xD6 /* 214 0326 German O: Seen */ ) || + ( ch == 0xDC /* 220 0334 German U: Guessed */ ) || + ( ch == 0xDF /* 223 0337 German ss */ ) || + ( ch == 0xE0 /* 224 0340 French a` (left top, right base, as in "jusqu'(a`) 20%") http:/-/seafrance.fr */ ) || + ( ch == 0xE2 /* 226 0342 French a^ as in "que soit leur (a^)ge" http:/-/seafrance.fr */ ) || + ( ch == 0xE4 /* 228 0344 German a: */ ) || + ( ch == 0xE7 /* 231 0347 French c? as in "le droit fran(c inverted question mark)ais" http:/-/seafrance.fr */ ) || + ( ch == 0xE9 /* 233 0351 French e' (left base, right top, as in "d(e')part)" http:/-/seafrance.fr */ ) || + ( ch == 0xEA /* 234 0352 French e^ as in "m(e^)me pour un" http:/-/seafrance.fr */ ) || + ( ch == 0xEE /* 238 0356 French i^ as in "reconna(i^)t" http:/-/seafrance.fr */ ) || + ( ch == 0xF6 /* 246 0366 German o: */ ) || + ( ch == 0xFC /* 252 0374 German u: */ ) + ) return(1) ; else return(0) ; + } + #endif /*}*/ + /* Get a single line from a stream. Expand tabs, strip control * characters and trailing whitespace, and handle backspaces. * Return the address of the buffer containing the line, and