]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrections
authorJulian Smart <julian@anthemion.co.uk>
Thu, 12 Sep 2002 20:55:05 +0000 (20:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 12 Sep 2002 20:55:05 +0000 (20:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/msw/tardist
distrib/msw/tarwxall
distrib/msw/unix2dos.c

index 0ebf19cc60c061fb319a92531099691b8df644dd..ce38ac9cd5f7dca07d5459d0ca8dc19dc94812c7 100644 (file)
@@ -183,24 +183,24 @@ echo Re-tarring wxAll in a subdirectory...
 cd $2
 mkdir wxWindows-${WXVER}
 cd wxWindows-${WXVER}
-
-# Copy OS/2 specific configure files
-cp $1/distrib/os2/os2-specific.zip docs/os2
+$TAR xf ../wxAll-${WXVER}.tar
 
 # Translate all .dsp and .dsw files to DOS format
 unix2dos --unix2dos `cat $1/distrib/msw/vc.rsp`
 
+# Copy OS/2 specific configure files
+cp $1/distrib/os2/os2-specific.zip docs/os2
+
 # Copy the OS/2 files which probably haven't been copied yet
 mkdir include/wx/os2
 mkdir src/os2
 cp $1/include/wx/os2/*.H include/wx/os2
-cp $1/src/os2/*.CPP src/os2
+cp $1/src/os2/*.CPP $1/src/os2/*.I src/os2
 
 # Make all OS/2 files lower case
 $1/distrib/namedown include/wx/os2/*.H
-$1/distrib/namedown src/os2/*.CPP
+$1/distrib/namedown src/os2/*.CPP src/os2/*.I
 
-$TAR xf ../wxAll-${WXVER}.tar
 cd ..
 rm -f wxAll-${WXVER}.tar
 $TAR cf $2/wxAll-${WXVER}.tar wxWindows-${WXVER}/*
index 896ebb327a96461ab6211cd177f56b4c7a392540..2e71dfac67d2467c931e657dc689c7ed60b68c25 100755 (executable)
@@ -74,25 +74,34 @@ echo Re-tarring wxAll in a subdirectory...
 cd $2
 rm -f -r wxWindows-${WXVER}
 mkdir wxWindows-${WXVER}
-cd wxWindows-${WXVER}
 
-# Copy OS/2 specific configure files
-cp $1/distrib/os2/os2-specific.zip docs/os2
+# If we have the full set of VC++ project files,
+# get them
+if [ -f $2/deliver/extra/wxWindows-${WXVER}-VC.zip ]; then
+  unzip -o $2/deliver/extra/wxWindows-${WXVER}-VC.zip
+else
+  echo "Warning - did not find $2/deliver/extra/wxWindows-${WXVER}-VC.zip"
+fi
+
+cd wxWindows-${WXVER}
+$TAR xf ../wxAll-${WXVER}.tar
 
 # Translate all .dsp and .dsw files to DOS format
 unix2dos --unix2dos `cat $1/distrib/msw/vc.rsp`
 
+# Copy OS/2 specific configure files
+cp $1/distrib/os2/os2-specific.zip docs/os2
+
 # Copy the OS/2 files which probably haven't been copied yet
 mkdir include/wx/os2
 mkdir src/os2
 cp $1/include/wx/os2/*.H include/wx/os2
-cp $1/src/os2/*.CPP src/os2
+cp $1/src/os2/*.CPP $1/src/os2/*.I src/os2
 
 # Make all OS/2 files lower case
 $1/distrib/namedown include/wx/os2/*.H
-$1/distrib/namedown src/os2/*.CPP
+$1/distrib/namedown src/os2/*.CPP src/os2/*.I
 
-$TAR xf ../wxAll-${WXVER}.tar
 cd ..
 rm -f wxAll-${WXVER}.tar
 $TAR cf $2/wxAll-${WXVER}.tar wxWindows-${WXVER}/*
index 991b8517c56e2fa4a8ccc60b45d87fd77ff1d255..46d27a0f7a120556a231d13d27794dddebb4c071 100644 (file)
@@ -37,7 +37,7 @@ main(int argc, char *argv[])
     unix2Dos = 1;
     
     i = 1;
-    if (i > argc)
+    if (argc > 1)
     {
         if (strcmp(argv[1], "--help") == 0)
         {
@@ -70,23 +70,25 @@ main(int argc, char *argv[])
             sprintf(tmpFile, "%s.tmp", argv[i]);
             
             fp = fopen(argv[i], "r");
+            if (!fp)
+            {
+                fprintf(stderr, "Cannot open %s.\n", argv[i]);
+                i ++;
+                continue;
+            }
             outFile = fopen(tmpFile, "w");
             if (!outFile)
             {
                 fprintf(stderr, "Cannot open %s.\n", tmpFile);
                 exit(1);
             }
-            if (!fp)
-            {
-                fprintf(stderr, "Cannot open %s.\n", argv[i]);
-                exit(1);
-            }
             translate(fp, outFile, unix2Dos);
             
             if (warning) /* unix2dos acting on a possible DOS file */
             {
-                fprintf(stderr,"%s: %s may have already been in DOS format.\n",
-                    prog, argv[i]);
+                fprintf(stderr,"%s: %s may have already been in DOS format. Not converted.\n",
+                        prog, argv[i]);
+                warning = 0;
             }
             fclose(fp);
             fclose(outFile);
@@ -128,7 +130,7 @@ void translate(FILE *ifp, FILE *ofp, int unix2Dos)
             while ((c = getc(ifp)) != EOF){
                 if (c == CR)
                     warning = 1;   /* set warning flag: input file may be a DOS file */
-                if (c == LF
+                if (c == LF && (warning == 0))
                     putc(CR, ofp); /* add CR before each LF */
                 putc(c, ofp);
             }