home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ccdoc07a.zip / ccdoc_v07a_glass.patch
Text File  |  1999-09-23  |  15KB  |  438 lines

  1. diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdoc.cpp ./ccdoc_dev/ccdoc/src/ccdoc.cpp
  2. *** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdoc.cpp    Tue Jun 15 10:12:34 1999
  3. --- ./ccdoc_dev/ccdoc/src/ccdoc.cpp    Thu Sep 23 21:23:52 1999
  4. ***************
  5. *** 15,22 ****
  6.   // Comments and suggestions are always welcome.
  7.   // Please report bugs to jlinoff@ix.netcom.com.
  8.   // ========================================================================
  9. ! #include <sys/stat.h>
  10. ! #include <sys/types.h>
  11.   #include "ccdocphase1.h"
  12.   #include "ccdocphase2.h"
  13.   #include "ccdocphase3.h"
  14. --- 15,29 ----
  15.   // Comments and suggestions are always welcome.
  16.   // Please report bugs to jlinoff@ix.netcom.com.
  17.   // ========================================================================
  18. ! #if defined(_OS2_EMX)
  19. !     #include <sys/types.h>
  20. !     #include <sys/stat.h>
  21. ! #else
  22. !     #include <sys/stat.h>
  23. !     #include <sys/types.h>
  24. ! #endif
  25.   #include "ccdocphase1.h"
  26.   #include "ccdocphase2.h"
  27.   #include "ccdocphase3.h"
  28. ***************
  29. *** 326,332 ****
  30.        "  -U<define>     Undefine a macro.\n"
  31.        "\n"
  32.        "EXAMPLE USAGE:\n"
  33. ! #ifdef _MSC_VER
  34.        "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg libjdl libjdl\\src\\*.h\n"
  35.        "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg ccdoc  ccdoc\\src\\*.h\n"
  36.   #else
  37. --- 333,339 ----
  38.        "  -U<define>     Undefine a macro.\n"
  39.        "\n"
  40.        "EXAMPLE USAGE:\n"
  41. ! #if defined(_MSC_VER) || defined(_OS2)
  42.        "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg libjdl libjdl\\src\\*.h\n"
  43.        "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg ccdoc  ccdoc\\src\\*.h\n"
  44.   #else
  45. ***************
  46. *** 342,348 ****
  47.        "                 header files have been processed.\n"
  48.        "\n"
  49.        "EXAMPLE USAGE:\n"
  50. ! #ifdef _MSC_VER
  51.        "  C:> ccdoc -log run.log -ctf ccdoc.ctf -index\n"
  52.   #else
  53.        "  %% ccdoc -ctf ccdoc.ctf -index\n"
  54. --- 349,355 ----
  55.        "                 header files have been processed.\n"
  56.        "\n"
  57.        "EXAMPLE USAGE:\n"
  58. ! #if defined(_MSC_VER) || defined(_OS2)
  59.        "  C:> ccdoc -log run.log -ctf ccdoc.ctf -index\n"
  60.   #else
  61.        "  %% ccdoc -ctf ccdoc.ctf -index\n"
  62. ***************
  63. *** 380,386 ****
  64.        "\n");
  65.     CCcDocUtils::Status
  66.       ("EXAMPLE USAGE:\n"
  67. ! #ifdef _MSC_VER
  68.        "  C:> ccdoc -log run.log -ctf ccdoc.ctf -html doc\\ -imgurl images\\ -trailer xx.html\n"
  69.   #else
  70.        "  %% ccdoc -ctf ccdoc.ctf -html doc/ -imgurl images/ -trailer xx.html\n"
  71. --- 387,393 ----
  72.        "\n");
  73.     CCcDocUtils::Status
  74.       ("EXAMPLE USAGE:\n"
  75. ! #if defined(_MSC_VER) || defined(_OS2)
  76.        "  C:> ccdoc -log run.log -ctf ccdoc.ctf -html doc\\ -imgurl images\\ -trailer xx.html\n"
  77.   #else
  78.        "  %% ccdoc -ctf ccdoc.ctf -html doc/ -imgurl images/ -trailer xx.html\n"
  79. ***************
  80. *** 395,401 ****
  81.        "  This is the simplest flow for a small package. You run all three\n"
  82.        "  phases at one time.\n"
  83.        "\n"
  84. ! #ifdef _MSC_VER
  85.        "    C:> ccdoc -log run.log -pkg small -index -html doc\\ *.h\n"
  86.   #else
  87.        "    %% ccdoc -log run.log -pkg small -index -html doc/ *.h\n"
  88. --- 402,408 ----
  89.        "  This is the simplest flow for a small package. You run all three\n"
  90.        "  phases at one time.\n"
  91.        "\n"
  92. ! #if defined(_MSC_VER) || defined(_OS2)
  93.        "    C:> ccdoc -log run.log -pkg small -index -html doc\\ *.h\n"
  94.   #else
  95.        "    %% ccdoc -log run.log -pkg small -index -html doc/ *.h\n"
  96. ***************
  97. *** 407,413 ****
  98.        "  This is the typical for a usage for a system with multiple packages.\n"
  99.        "  This flow runs each phase separately.\n"
  100.        "\n"
  101. ! #ifdef _MSC_VER
  102.        "    C:> rem ************************************************\n"
  103.        "    C:> rem * Create the package documentation.\n"
  104.        "    C:> rem ************************************************\n"
  105. --- 414,420 ----
  106.        "  This is the typical for a usage for a system with multiple packages.\n"
  107.        "  This flow runs each phase separately.\n"
  108.        "\n"
  109. ! #if defined(_MSC_VER) || defined(_OS2)
  110.        "    C:> rem ************************************************\n"
  111.        "    C:> rem * Create the package documentation.\n"
  112.        "    C:> rem ************************************************\n"
  113. ***************
  114. *** 455,461 ****
  115.       ("****************************************************************\n"
  116.        "* If you want to capture this message in an output file,       *\n"
  117.        "* rerun this command as:                                       *\n"
  118. ! #ifdef _MSC_VER
  119.        "*   C:> ccdoc -log help.log -h                                 *\n"
  120.   #else
  121.        "*   %% ccdoc -log help.log -h                                   *\n"
  122. --- 462,468 ----
  123.       ("****************************************************************\n"
  124.        "* If you want to capture this message in an output file,       *\n"
  125.        "* rerun this command as:                                       *\n"
  126. ! #if defined(_MSC_VER) || defined(_OS2)
  127.        "*   C:> ccdoc -log help.log -h                                 *\n"
  128.   #else
  129.        "*   %% ccdoc -log help.log -h                                   *\n"
  130. diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocparser.cpp ./ccdoc_dev/ccdoc/src/ccdocparser.cpp
  131. *** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocparser.cpp    Tue Jun 15 10:12:34 1999
  132. --- ./ccdoc_dev/ccdoc/src/ccdocparser.cpp    Thu Sep 23 21:23:58 1999
  133. ***************
  134. *** 72,78 ****
  135.         CJdlStringList tokens;
  136.         // Modified for the HP port.
  137.         char dirsep[2];
  138. ! #ifdef _MSC_VER
  139.         dirsep[0] = '\\';
  140.   #else
  141.         dirsep[0] = '/';
  142. --- 72,78 ----
  143.         CJdlStringList tokens;
  144.         // Modified for the HP port.
  145.         char dirsep[2];
  146. ! #if defined(_MSC_VER) || defined(_OS2)
  147.         dirsep[0] = '\\';
  148.   #else
  149.         dirsep[0] = '/';
  150. diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase1.cpp ./ccdoc_dev/ccdoc/src/ccdocphase1.cpp
  151. *** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase1.cpp    Tue Jun 15 10:12:34 1999
  152. --- ./ccdoc_dev/ccdoc/src/ccdocphase1.cpp    Thu Sep 23 21:24:02 1999
  153. ***************
  154. *** 67,73 ****
  155.     char*                  fn = CCcDocUtils::GetRingBuffer();
  156.   
  157.     ::strcpy(fn,srcFileName);
  158. ! #ifdef _MSC_VER
  159.     char* p1 = ::strrchr(fn,'\\'); // a\b\c
  160.     char* p2 = ::strrchr(fn,'/'); // a/b/c (for folks that use tcsh - like me)
  161.     char* p = p1>p2 ? p1 : p2; // take the one that is closest to the end
  162. --- 67,73 ----
  163.     char*                  fn = CCcDocUtils::GetRingBuffer();
  164.   
  165.     ::strcpy(fn,srcFileName);
  166. ! #if defined(_MSC_VER) || defined(_OS2)
  167.     char* p1 = ::strrchr(fn,'\\'); // a\b\c
  168.     char* p2 = ::strrchr(fn,'/'); // a/b/c (for folks that use tcsh - like me)
  169.     char* p = p1>p2 ? p1 : p2; // take the one that is closest to the end
  170. diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase3.cpp ./ccdoc_dev/ccdoc/src/ccdocphase3.cpp
  171. *** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase3.cpp    Tue Jun 15 10:12:34 1999
  172. --- ./ccdoc_dev/ccdoc/src/ccdocphase3.cpp    Thu Sep 23 21:24:06 1999
  173. ***************
  174. *** 410,416 ****
  175.           ::fprintf(fp,", ");
  176.         if(m_SourceURL.Length()) {
  177.           ::fprintf(fp,"<a href=\"%s",m_SourceURL.str());
  178. ! #ifdef _MSC_VER
  179.           // Convert back slashes to forward slashes
  180.           // to make things URL compatible.
  181.           {for(char* p = file;*p;p++) {
  182. --- 410,416 ----
  183.           ::fprintf(fp,", ");
  184.         if(m_SourceURL.Length()) {
  185.           ::fprintf(fp,"<a href=\"%s",m_SourceURL.str());
  186. ! #if defined(_MSC_VER) || defined(_OS2)
  187.           // Convert back slashes to forward slashes
  188.           // to make things URL compatible.
  189.           {for(char* p = file;*p;p++) {
  190. diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/main.cpp ./ccdoc_dev/ccdoc/src/main.cpp
  191. *** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/main.cpp    Tue Jun 15 10:12:36 1999
  192. --- ./ccdoc_dev/ccdoc/src/main.cpp    Thu Sep 23 21:26:48 1999
  193. ***************
  194. *** 43,48 ****
  195. --- 43,53 ----
  196.    * @see CCcDoc
  197.    */
  198.   int main(int argc,char** argv) {
  199. +   #if defined(_OS2_EMX)
  200. +       _wildcard( &argc, &argv );
  201. +   #endif
  202.     CCcDoc prog;
  203.     return prog.Run(argc,argv);
  204.   }
  205. diff -cbr ../ccdoc_v07a.old/ccdoc_dev/tools/mkmk.pl ./ccdoc_dev/tools/mkmk.pl
  206. *** ../ccdoc_v07a.old/ccdoc_dev/tools/mkmk.pl    Tue Jun 15 10:12:40 1999
  207. --- ./ccdoc_dev/tools/mkmk.pl    Thu Sep 23 21:23:24 1999
  208. ***************
  209. *** 29,35 ****
  210.       if($arg =~ /^-exe/) {
  211.       $type = 1;
  212.       $target_ext = ".exe";
  213. !     $target_ext = ".exe" if ( $^O eq "MSWin32" );
  214.       $arg = shift @ARGV;
  215.       $target = $arg;
  216.       $arg = shift @ARGV;
  217. --- 29,35 ----
  218.       if($arg =~ /^-exe/) {
  219.       $type = 1;
  220.       $target_ext = ".exe";
  221. !     $target_ext = ".exe" if ( $^O eq "MSWin32" || $^O eq "os2" );
  222.       $arg = shift @ARGV;
  223.       $target = $arg;
  224.       $arg = shift @ARGV;
  225. ***************
  226. *** 43,49 ****
  227.       if($arg =~ /^-lib/) {
  228.       $type = 2;
  229.       $target_ext = ".a";
  230. !     $target_ext = ".lib" if ( $^O eq "MSWin32" );
  231.       $arg = shift @ARGV;
  232.       $target = $arg;
  233.       $arg = shift @ARGV;
  234. --- 43,49 ----
  235.       if($arg =~ /^-lib/) {
  236.       $type = 2;
  237.       $target_ext = ".a";
  238. !     $target_ext = ".lib" if ( $^O eq "MSWin32" || $^O eq "os2" );
  239.       $arg = shift @ARGV;
  240.       $target = $arg;
  241.       $arg = shift @ARGV;
  242. ***************
  243. *** 163,168 ****
  244. --- 163,211 ----
  245.       print MK "RM          = rm -f\n";
  246.       print MK "CP          = cp\n";
  247.       }
  248. +     elsif($arch eq "os2") {
  249. +     # OS/2
  250. +     print MK "CPP         = gcc\n";
  251. +     print MK "CPPFLAGS1   = -Zbin-files -Wno-ctor-dtor-privacy\n";
  252. +     print MK "CPPFLAGS2   = -D_OS2 -D_OS2_EMX -DJDL_DEFINE_LOCAL_TYPES\n";
  253. +     print MK "CPPFLAGS3   = -I. -I../..\n";
  254. +     print MK "CPPFLAGS4   = \$(MYCPPFLAGS)\n";
  255. +     print MK "CPPFLAGS    = \$(CPPFLAGS1) \$(CPPFLAGS2) \$(CPPFLAGS3) \$(CPPFLAGS4) -c -o \$\@\n";
  256. +     if ( $type == 1 ) {
  257. +         print MK "LINK        = \$(CPP)\n";
  258. +         print MK "LINKFLAGS   =  -o \n";
  259. +         print MK "DBGLINKFLAGS =\n";
  260. +         print MK "OPTCPPFLAGS = -O2\n";
  261. +         print MK "OPTLINKFLAGS =\n";
  262. +     }
  263. +     if ( $type == 2 ) {
  264. +         print MK "LINK        = ar\n";
  265. +         print MK "LINKFLAGS   = -rcv\n";
  266. +         print MK "DBGLINKFLAGS =\n";
  267. +         print MK "OPTCPPFLAGS = -O2\n";
  268. +         print MK "OPTLINKFLAGS =\n";
  269. +     }
  270. +     print MK "DBGCPPFLAGS = -g -D_DEBUG\n";
  271. +     if($libjdl) {
  272. +         print MK "DBGLIBS     = ../../libjdl/bin_${arch}_dbg/libjdl.lib\n";
  273. +     }
  274. +     else {
  275. +         print MK "DBGLIBS     =\n";
  276. +     }
  277. +     print MK "DBGTARGET   = ../bin_${arch}_dbg/$target${target_ext}\n";
  278. +     if($libjdl) {
  279. +         print MK "OPTLIBS     = ../../libjdl/bin_${arch}_opt/libjdl.lib\n";
  280. +     }
  281. +     else {
  282. +         print MK "OPTLIBS     =\n";
  283. +     }
  284. +     print MK "OPTTARGET   = ../bin_${arch}_opt/$target${target_ext}\n";
  285. +     print MK "TARGET      = $target${target_ext}\n";
  286. +     print MK "RM          = rm -f\n";
  287. +     print MK "CP          = cp\n";
  288. +     }
  289.       else {
  290.       # UNIXes.
  291.       print MK "CPP         = CC\n";
  292. ***************
  293. *** 239,245 ****
  294.       print MK "clean: dbg_clean opt_clean\n";
  295.       print MK "\n";
  296.       print MK "dbg_clean: tidyup\n";
  297. !     if ( $arch eq "MSWin32" ) {
  298.       print MK "\t\@-\$(RM) \$(DBGOBJS) ..\\bin_${arch}_dbg\\${target_file}\n";
  299.       }
  300.       else {
  301. --- 282,288 ----
  302.       print MK "clean: dbg_clean opt_clean\n";
  303.       print MK "\n";
  304.       print MK "dbg_clean: tidyup\n";
  305. !     if ( $arch eq "MSWin32" || $arch eq "os2" ) {
  306.       print MK "\t\@-\$(RM) \$(DBGOBJS) ..\\bin_${arch}_dbg\\${target_file}\n";
  307.       }
  308.       else {
  309. ***************
  310. *** 247,253 ****
  311.       }
  312.       print MK "\n";
  313.       print MK "opt_clean: tidyup\n";
  314. !     if ( $arch eq "MSWin32" ) {
  315.       print MK "\t\@-\$(RM) \$(OPTOBJS) ..\\bin_${arch}_opt\\${target_file}\n";
  316.       }
  317.       else {
  318. --- 290,296 ----
  319.       }
  320.       print MK "\n";
  321.       print MK "opt_clean: tidyup\n";
  322. !     if ( $arch eq "MSWin32" || $arch eq "os2" ) {
  323.       print MK "\t\@-\$(RM) \$(OPTOBJS) ..\\bin_${arch}_opt\\${target_file}\n";
  324.       }
  325.       else {
  326. ***************
  327. *** 287,292 ****
  328. --- 330,347 ----
  329.       }
  330.       print MK "\n";
  331.       }
  332. +     elsif($arch eq "os2") {
  333. +     print MK "${targ}: ..\\bin_${arch}_${targ} ..\\bin_${arch}_${targ}\\\$(TARGET)\n";
  334. +     print MK "\n";
  335. +     print MK "..\\bin_${arch}_${targ}:\n";
  336. +     print MK "\t\@-mkdir \$\@\n";
  337. +     print MK "\n";
  338. +     print MK "..\\bin_${arch}_${targ}\\${target_file} : \$(${uctarg}OBJS) \$(${uctarg}LIBS)\n";
  339. +     &MkSep;
  340. +     print MK "\t\@echo Linking \$\@\n";
  341. +     print MK "\t\$(PURIFY) \$(LINK) \$(${uctarg}LINKFLAGS) \$(LINKFLAGS) \$\@ \$(${uctarg}OBJS) \$(MY_${arch}_LINKOBJS) \$(${uctarg}LIBS)\n";
  342. +     print MK "\n";
  343. +     }
  344.       else {
  345.       print MK "${targ}: ../bin_${arch}_${targ} ../bin_${arch}_${targ}/\$(TARGET)\n";
  346.       print MK "\n";
  347. ***************
  348. *** 319,325 ****
  349.       $targ =~ s/\.cc$//;
  350.       $targ =~ s/\.c$//;
  351.       $targ =~ s/\.C$//;
  352. !     if($arch eq "MSWin32") {
  353.           print MK "\t..\\bin_${arch}_${type}\\$targ.obj";
  354.       }
  355.       else {
  356. --- 374,380 ----
  357.       $targ =~ s/\.cc$//;
  358.       $targ =~ s/\.c$//;
  359.       $targ =~ s/\.C$//;
  360. !     if($arch eq "MSWin32" || $arch eq "os2" ) {
  361.           print MK "\t..\\bin_${arch}_${type}\\$targ.obj";
  362.       }
  363.       else {
  364. ***************
  365. *** 348,354 ****
  366.       }
  367.       print MK "\n";
  368.       print MK "# ================================================\n";
  369. !     if( $arch eq "MSWin32" ) {
  370.       &MkCppRule($arg,"obj","$arch","dbg");
  371.       &MkCppRule($arg,"obj","$arch","opt");
  372.       }
  373. --- 403,409 ----
  374.       }
  375.       print MK "\n";
  376.       print MK "# ================================================\n";
  377. !     if( $arch eq "MSWin32" || $arch eq "os2" ) {
  378.       &MkCppRule($arg,"obj","$arch","dbg");
  379.       &MkCppRule($arg,"obj","$arch","opt");
  380.       }
  381. ***************
  382. *** 372,378 ****
  383.       $targ =~ s/\.cc$//;
  384.       $targ =~ s/\.c$//;
  385.       $targ =~ s/\.C$//;
  386. !     if( $arch eq "MSWin32" ) {
  387.       print MK "..\\bin_${arch}_$type\\$targ.$ext: $arg ";
  388.       }
  389.       else {
  390. --- 427,433 ----
  391.       $targ =~ s/\.cc$//;
  392.       $targ =~ s/\.c$//;
  393.       $targ =~ s/\.C$//;
  394. !     if( $arch eq "MSWin32" || $arch eq "os2" ) {
  395.       print MK "..\\bin_${arch}_$type\\$targ.$ext: $arg ";
  396.       }
  397.       else {
  398. ***************
  399. *** 420,426 ****
  400.       foreach $path (@inc_paths) {
  401.           my $x = "$path/$inc";
  402.           if( -e $x ) {
  403. !         $x =~ s/\//\\/g if ( $arch eq "MSWin32");
  404.           if ( ! defined $inc_files{"$x"} ) {
  405.               print MK " $x";
  406.               #print STDERR "DEBUG: adding $x\n";
  407. --- 475,481 ----
  408.       foreach $path (@inc_paths) {
  409.           my $x = "$path/$inc";
  410.           if( -e $x ) {
  411. !         $x =~ s/\//\\/g if ( $arch eq "MSWin32" || $arch eq "os2" );
  412.           if ( ! defined $inc_files{"$x"} ) {
  413.               print MK " $x";
  414.               #print STDERR "DEBUG: adding $x\n";
  415. ***************
  416. *** 454,460 ****
  417.   sub MkSep
  418.   {
  419.       my $arch = $^O;
  420. !     if( $arch eq "MSWin32" ) {
  421.       print MK "\t\@echo ****************************************************************\n";
  422.       }
  423.       else {
  424. --- 509,515 ----
  425.   sub MkSep
  426.   {
  427.       my $arch = $^O;
  428. !     if( $arch eq "MSWin32" || $arch eq "os2" ) {
  429.       print MK "\t\@echo ****************************************************************\n";
  430.       }
  431.       else {
  432.