[BACK]Return to fmt.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / fmt

Diff for /src/usr.bin/fmt/fmt.c between version 1.29 and 1.30

version 1.29, 2012/01/17 04:26:28 version 1.30, 2013/11/26 13:18:55
Line 233 
Line 233 
 static void     process_named_file(const char *);  static void     process_named_file(const char *);
 static void     process_stream(FILE *, const char *);  static void     process_stream(FILE *, const char *);
 static size_t   indent_length(const char *, size_t);  static size_t   indent_length(const char *, size_t);
 static int      might_be_header(const unsigned char *);  static int      might_be_header(const char *);
 static void     new_paragraph(size_t, size_t);  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_word(size_t, size_t, const char *, size_t, size_t);
 static void     output_indent(size_t);  static void     output_indent(size_t);
Line 385 
Line 385 
         HdrType header_type;          HdrType header_type;
   
         /* ^-- header_type of previous line; -1 at para start */          /* ^-- header_type of previous line; -1 at para start */
         char *line;          const char *line;
         size_t length;          size_t length;
   
         if (centerP) {          if (centerP) {
Line 486 
Line 486 
  * conservative to avoid mangling ordinary civilised text.   * conservative to avoid mangling ordinary civilised text.
  */   */
 static int  static int
 might_be_header(const unsigned char *line)  might_be_header(const char *line)
 {  {
   
         if (!isupper(*line++))          if (!isupper((unsigned char)*line++))
                 return 0;                  return 0;
         while (isalnum(*line) || *line == '-')          while (isalnum((unsigned char)*line) || *line == '-')
                 ++line;                  ++line;
         return (*line == ':' && isspace(line[1]));          return (*line == ':' && isspace((unsigned char)line[1]));
 }  }
   
 /* Begin a new paragraph with an indent of |indent| spaces.  /* Begin a new paragraph with an indent of |indent| spaces.

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30