[BACK]Return to soelim.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/soelim.c between version 1.2 and 1.6

version 1.2, 2015/05/20 22:22:59 version 1.6, 2021/09/19 18:14:24
Line 24 
Line 24 
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   #include "config.h"
   
 #include <sys/param.h>  
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <ctype.h>  #include <ctype.h>
   #if HAVE_ERR
 #include <err.h>  #include <err.h>
   #endif
   #include <limits.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 57  static FILE *
Line 60  static FILE *
 soelim_fopen(const char *name)  soelim_fopen(const char *name)
 {  {
         FILE *f;          FILE *f;
         char path[MAXPATHLEN];          char path[PATH_MAX];
         size_t i;          size_t i;
   
         if (strcmp(name, "-") == 0)          if (strcmp(name, "-") == 0)
Line 101  soelim_file(FILE *f, int flag)
Line 104  soelim_file(FILE *f, int flag)
                 }                  }
   
                 walk = line + 3;                  walk = line + 3;
                 if (!isspace(*walk) && ((flag & C_OPTION) == 0)) {                  if (!isspace((unsigned char)*walk) && (flag & C_OPTION) == 0) {
                         printf("%s", line);                          printf("%s", line);
                         continue;                          continue;
                 }                  }
   
                 while (isspace(*walk))                  while (isspace((unsigned char)*walk))
                         walk++;                          walk++;
   
                 cp = walk;                  cp = walk;
                 while (*cp != '\0' && !isspace(*cp))                  while (*cp != '\0' && !isspace((unsigned char)*cp))
                         cp++;                          cp++;
                 *cp = 0;                  *cp = 0;
                 if (cp < line + linelen)                  if (cp < line + linelen)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.6

CVSweb