=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/fmt/fmt.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/fmt/fmt.c 2012/01/17 04:26:28 1.29 --- src/usr.bin/fmt/fmt.c 2013/11/26 13:18:55 1.30 *************** *** 1,4 **** ! /* $OpenBSD: fmt.c,v 1.29 2012/01/17 04:26:28 lum Exp $ */ /* Sensible version of fmt * --- 1,4 ---- ! /* $OpenBSD: fmt.c,v 1.30 2013/11/26 13:18:55 deraadt Exp $ */ /* Sensible version of fmt * *************** *** 233,239 **** static void process_named_file(const char *); static void process_stream(FILE *, const char *); static size_t indent_length(const char *, size_t); ! static int might_be_header(const unsigned char *); static void new_paragraph(size_t, size_t); static void output_word(size_t, size_t, const char *, size_t, size_t); static void output_indent(size_t); --- 233,239 ---- static void process_named_file(const char *); static void process_stream(FILE *, const char *); static size_t indent_length(const char *, size_t); ! static int might_be_header(const char *); static void new_paragraph(size_t, size_t); static void output_word(size_t, size_t, const char *, size_t, size_t); static void output_indent(size_t); *************** *** 385,391 **** HdrType header_type; /* ^-- header_type of previous line; -1 at para start */ ! char *line; size_t length; if (centerP) { --- 385,391 ---- HdrType header_type; /* ^-- header_type of previous line; -1 at para start */ ! const char *line; size_t length; if (centerP) { *************** *** 486,499 **** * conservative to avoid mangling ordinary civilised text. */ static int ! might_be_header(const unsigned char *line) { ! if (!isupper(*line++)) return 0; ! while (isalnum(*line) || *line == '-') ++line; ! return (*line == ':' && isspace(line[1])); } /* Begin a new paragraph with an indent of |indent| spaces. --- 486,499 ---- * conservative to avoid mangling ordinary civilised text. */ static int ! might_be_header(const char *line) { ! if (!isupper((unsigned char)*line++)) return 0; ! while (isalnum((unsigned char)*line) || *line == '-') ++line; ! return (*line == ':' && isspace((unsigned char)line[1])); } /* Begin a new paragraph with an indent of |indent| spaces.