2011-01-02 Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* doschk.1: Man page taken from debian distribution.


2010-07-31 Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* Makefile.in: Added EXEEXT variable.  Adjusted different variables
	and targets.

	* doschk.c: Superflous malloc declaration removed.
	stdlib.h included to provide malloc, qsort and exit prototypes.
	(fill_ent): Check string end against zero and not NULL.
	(main): Add int to main definition.





diff -aprNU5 doschk-1.1.orig/Makefile.in doschk-1.1/Makefile.in
--- doschk-1.1.orig/Makefile.in	1993-05-21 19:14:08 +0000
+++ doschk-1.1/Makefile.in	2011-01-02 22:05:40 +0000
@@ -18,32 +18,35 @@
 #### Start of system configuration section. ####
 
 srcdir = @srcdir@
 VPATH = @srcdir@
 
-CC = @CC@
+CC = gcc
+LINK = $(CC) $(LDFLAGS) -o $@
 
-INSTALL = @INSTALL@
+INSTALL = /dev/env/DJDIR/bin/ginstall -c
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 
 DEFS = @DEFS@
 LIBS = @LIBS@
 
-CFLAGS = -g
-LDFLAGS = -g
+CFLAGS = -g -Wall -O2
+LDFLAGS =
 
-prefix = /usr/local
+EXEEXT = .exe
+
+prefix = /dev/env/DJDIR
 exec_prefix = $(prefix)
 
 bindir = $(exec_prefix)/bin
 datadir = $(prefix)/lib
 libdir = $(prefix)/lib
 infodir = $(prefix)/info
 
 # Where to install the manual pages.
-mandir = $(prefix)/man/man1
+mandir = $(prefix)/share/man/man1
 # Extension (not including `.') for the installed manual page filenames.
 manext = 1
 
 #### End of system configuration section. ####
 
@@ -53,11 +56,11 @@ LOADLIBES = $(LIBS)
 
 DISTFILES = COPYING ChangeLog Makefile.in README configure configure.in doschk.c
 
 DISTNAME = doschk-1.1
 
-all: doschk
+all: doschk$(EXEEXT)
 
 .c.o:
 	$(CC) -c -I. -I$(srcdir) $(DEFS) $(CPPFLAGS) $(CFLAGS) $<
 
 ### targets required by GNU Coding standards ###
@@ -73,11 +76,11 @@ configure: configure.in
 
 TAGS:
 	cd $(srcdir); etags
 
 clean:
-	rm -f *.o core a.out doschk
+	rm -f *.o core a.out doschk$(EXEEXT)
 
 mostlyclean: clean
 
 distclean: clean
 	rm -f Makefile config.status
@@ -91,21 +94,26 @@ dist: $(DISTFILES)
 	ln $(DISTFILES) $(DISTNAME)
 	tar --gzip -chf $(DISTNAME).tar.z $(DISTNAME)
 	rm -rf $(DISTNAME)
 
 install: all
-	$(INSTALL_PROGRAM) doschk $(bindir)/doschk
+	mkdir -p $(bindir)
+	mkdir -p $(mandir)
+	$(INSTALL_PROGRAM) doschk$(EXEEXT) $(bindir)/doschk$(EXEEXT)
+	$(INSTALL_DATA) doschk.$(manext) $(mandir)/doschk.$(manext)
 
 uninstall: force
-	-cd $(bindir); rm -f doschk
+	-cd $(bindir); rm -f doschk$(EXEEXT)
+	-cd $(mandir); rm -f doschk.$(manext)
 
 ### Actual doschk-specific targets ###
 
-doschk: doschk.o
+doschk$(EXEEXT): doschk.o
+	$(LINK) doschk.o $(LIBS)
 
-check: doschk
-	ls -1 * | ./doschk
+check: doschk$(EXEEXT)
+	ls -1 * | ./doschk$(EXEEXT)
 
 #doschk.info: doschk.texi
 #	cd $(srcdir); makeinfo doschk.texi
 
 #doschk.dvi: doschk.texi
diff -aprNU5 doschk-1.1.orig/doschk.1 doschk-1.1/doschk.1
--- doschk-1.1.orig/doschk.1	1970-01-01 00:00:00 +0000
+++ doschk-1.1/doschk.1	2011-01-02 21:54:52 +0000
@@ -0,0 +1,45 @@
+.TH DOSCHK 1 "doschk 1.1"
+.SH NAME
+doschk \- checks filenames for SYSV and DOS compatibility
+.SH SYNOPSIS
+.HP
+.B doschk
+filename ...
+.SH DESCRIPTION
+This program is intended as a utility to help software developers
+ensure that their source file names are distinguishable on MS-DOS and
+14-character SYSV platforms.  To perform this task, doschk reads a
+list of filenames and produces a report of all the conflicts that
+would arise if the files were transferred to a MS-DOS or SYSV
+platform.
+
+To use this program, you must feed it a list of filenames in this
+format:
+
+.P
+	dir
+.P
+	dir/file1.ext
+.P
+	dir/file2.exe
+.P
+	dir/dir2
+.P
+	dir/dir2/file3.ext
+
+If the list does not include the directory-only lines (like dir/dir2)
+then their names will not be checked for uniqueness, else they will
+be.  Typical uses of this program are like these:
+
+.P
+	find . \-print | doschk
+.P
+	tar tf file.tar | doschk
+
+If this program produces no output, then all your files are MS-DOS
+compatible.  Any output messages are designed to be self-explanatory
+and indicate cases where the files will not transfer to MS-DOS without
+problems.
+.SH AUTHORS
+DJ Delorie.  This manpage written by Ben Pfaff
+<pfaffben@pilot.msu.edu> for Debian GNU/Linux.
diff -aprNU5 doschk-1.1.orig/doschk.c doschk-1.1/doschk.c
--- doschk-1.1.orig/doschk.c	1993-04-20 21:46:22 +0000
+++ doschk-1.1/doschk.c	2011-01-02 21:54:52 +0000
@@ -49,12 +49,11 @@
  */
 
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-
-extern char *malloc ();
+#include <stdlib.h>
 
 typedef struct ENT
 {
   struct ENT *next;
   char *dos_name;
@@ -198,11 +197,11 @@ fill_ent (ent, path)
 	    }
 	  if (dots_seen == 1)
 	    {
               /* If trailing dot, it will be ignored by MSDOG, so don't */
               /* actually complain. */
-              if (*(cp + 1) != NULL)
+              if (*(cp + 1) != '\0')
                 {
                   invalid_msg ();
                   printf ("%s - too many dots\n", path);
                 }
 	      *dp = '\0';
@@ -443,10 +442,11 @@ display_problems ()
 
 /****************************************************************\
  *  Main entry point						*
 \****************************************************************/
 
+int
 main (argc, argv)
      int argc;
      char **argv;
 {
   FILE *input = stdin;
