diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdoc.cpp ./ccdoc_dev/ccdoc/src/ccdoc.cpp
*** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdoc.cpp	Tue Jun 15 10:12:34 1999
--- ./ccdoc_dev/ccdoc/src/ccdoc.cpp	Thu Sep 23 21:23:52 1999
***************
*** 15,22 ****
  // Comments and suggestions are always welcome.
  // Please report bugs to jlinoff@ix.netcom.com.
  // ========================================================================
! #include <sys/stat.h>
! #include <sys/types.h>
  #include "ccdocphase1.h"
  #include "ccdocphase2.h"
  #include "ccdocphase3.h"
--- 15,29 ----
  // Comments and suggestions are always welcome.
  // Please report bugs to jlinoff@ix.netcom.com.
  // ========================================================================
! 
! #if defined(_OS2_EMX)
!     #include <sys/types.h>
!     #include <sys/stat.h>
! #else
!     #include <sys/stat.h>
!     #include <sys/types.h>
! #endif
! 
  #include "ccdocphase1.h"
  #include "ccdocphase2.h"
  #include "ccdocphase3.h"
***************
*** 326,332 ****
       "  -U<define>     Undefine a macro.\n"
       "\n"
       "EXAMPLE USAGE:\n"
! #ifdef _MSC_VER
       "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg libjdl libjdl\\src\\*.h\n"
       "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg ccdoc  ccdoc\\src\\*.h\n"
  #else
--- 333,339 ----
       "  -U<define>     Undefine a macro.\n"
       "\n"
       "EXAMPLE USAGE:\n"
! #if defined(_MSC_VER) || defined(_OS2)
       "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg libjdl libjdl\\src\\*.h\n"
       "  C:> ccdoc -log run.log -DDEBUG -ctf ccdoc.ctf -pkg ccdoc  ccdoc\\src\\*.h\n"
  #else
***************
*** 342,348 ****
       "                 header files have been processed.\n"
       "\n"
       "EXAMPLE USAGE:\n"
! #ifdef _MSC_VER
       "  C:> ccdoc -log run.log -ctf ccdoc.ctf -index\n"
  #else
       "  %% ccdoc -ctf ccdoc.ctf -index\n"
--- 349,355 ----
       "                 header files have been processed.\n"
       "\n"
       "EXAMPLE USAGE:\n"
! #if defined(_MSC_VER) || defined(_OS2)
       "  C:> ccdoc -log run.log -ctf ccdoc.ctf -index\n"
  #else
       "  %% ccdoc -ctf ccdoc.ctf -index\n"
***************
*** 380,386 ****
       "\n");
    CCcDocUtils::Status
      ("EXAMPLE USAGE:\n"
! #ifdef _MSC_VER
       "  C:> ccdoc -log run.log -ctf ccdoc.ctf -html doc\\ -imgurl images\\ -trailer xx.html\n"
  #else
       "  %% ccdoc -ctf ccdoc.ctf -html doc/ -imgurl images/ -trailer xx.html\n"
--- 387,393 ----
       "\n");
    CCcDocUtils::Status
      ("EXAMPLE USAGE:\n"
! #if defined(_MSC_VER) || defined(_OS2)
       "  C:> ccdoc -log run.log -ctf ccdoc.ctf -html doc\\ -imgurl images\\ -trailer xx.html\n"
  #else
       "  %% ccdoc -ctf ccdoc.ctf -html doc/ -imgurl images/ -trailer xx.html\n"
***************
*** 395,401 ****
       "  This is the simplest flow for a small package. You run all three\n"
       "  phases at one time.\n"
       "\n"
! #ifdef _MSC_VER
       "    C:> ccdoc -log run.log -pkg small -index -html doc\\ *.h\n"
  #else
       "    %% ccdoc -log run.log -pkg small -index -html doc/ *.h\n"
--- 402,408 ----
       "  This is the simplest flow for a small package. You run all three\n"
       "  phases at one time.\n"
       "\n"
! #if defined(_MSC_VER) || defined(_OS2)
       "    C:> ccdoc -log run.log -pkg small -index -html doc\\ *.h\n"
  #else
       "    %% ccdoc -log run.log -pkg small -index -html doc/ *.h\n"
***************
*** 407,413 ****
       "  This is the typical for a usage for a system with multiple packages.\n"
       "  This flow runs each phase separately.\n"
       "\n"
! #ifdef _MSC_VER
       "    C:> rem ************************************************\n"
       "    C:> rem * Create the package documentation.\n"
       "    C:> rem ************************************************\n"
--- 414,420 ----
       "  This is the typical for a usage for a system with multiple packages.\n"
       "  This flow runs each phase separately.\n"
       "\n"
! #if defined(_MSC_VER) || defined(_OS2)
       "    C:> rem ************************************************\n"
       "    C:> rem * Create the package documentation.\n"
       "    C:> rem ************************************************\n"
***************
*** 455,461 ****
      ("****************************************************************\n"
       "* If you want to capture this message in an output file,       *\n"
       "* rerun this command as:                                       *\n"
! #ifdef _MSC_VER
       "*   C:> ccdoc -log help.log -h                                 *\n"
  #else
       "*   %% ccdoc -log help.log -h                                   *\n"
--- 462,468 ----
      ("****************************************************************\n"
       "* If you want to capture this message in an output file,       *\n"
       "* rerun this command as:                                       *\n"
! #if defined(_MSC_VER) || defined(_OS2)
       "*   C:> ccdoc -log help.log -h                                 *\n"
  #else
       "*   %% ccdoc -log help.log -h                                   *\n"
diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocparser.cpp ./ccdoc_dev/ccdoc/src/ccdocparser.cpp
*** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocparser.cpp	Tue Jun 15 10:12:34 1999
--- ./ccdoc_dev/ccdoc/src/ccdocparser.cpp	Thu Sep 23 21:23:58 1999
***************
*** 72,78 ****
        CJdlStringList tokens;
        // Modified for the HP port.
        char dirsep[2];
! #ifdef _MSC_VER
        dirsep[0] = '\\';
  #else
        dirsep[0] = '/';
--- 72,78 ----
        CJdlStringList tokens;
        // Modified for the HP port.
        char dirsep[2];
! #if defined(_MSC_VER) || defined(_OS2)
        dirsep[0] = '\\';
  #else
        dirsep[0] = '/';
diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase1.cpp ./ccdoc_dev/ccdoc/src/ccdocphase1.cpp
*** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase1.cpp	Tue Jun 15 10:12:34 1999
--- ./ccdoc_dev/ccdoc/src/ccdocphase1.cpp	Thu Sep 23 21:24:02 1999
***************
*** 67,73 ****
    char*                  fn = CCcDocUtils::GetRingBuffer();
  
    ::strcpy(fn,srcFileName);
! #ifdef _MSC_VER
    char* p1 = ::strrchr(fn,'\\'); // a\b\c
    char* p2 = ::strrchr(fn,'/'); // a/b/c (for folks that use tcsh - like me)
    char* p = p1>p2 ? p1 : p2; // take the one that is closest to the end
--- 67,73 ----
    char*                  fn = CCcDocUtils::GetRingBuffer();
  
    ::strcpy(fn,srcFileName);
! #if defined(_MSC_VER) || defined(_OS2)
    char* p1 = ::strrchr(fn,'\\'); // a\b\c
    char* p2 = ::strrchr(fn,'/'); // a/b/c (for folks that use tcsh - like me)
    char* p = p1>p2 ? p1 : p2; // take the one that is closest to the end
diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase3.cpp ./ccdoc_dev/ccdoc/src/ccdocphase3.cpp
*** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/ccdocphase3.cpp	Tue Jun 15 10:12:34 1999
--- ./ccdoc_dev/ccdoc/src/ccdocphase3.cpp	Thu Sep 23 21:24:06 1999
***************
*** 410,416 ****
  	    ::fprintf(fp,", ");
  	  if(m_SourceURL.Length()) {
  	    ::fprintf(fp,"<a href=\"%s",m_SourceURL.str());
! #ifdef _MSC_VER
  	    // Convert back slashes to forward slashes
  	    // to make things URL compatible.
  	    {for(char* p = file;*p;p++) {
--- 410,416 ----
  	    ::fprintf(fp,", ");
  	  if(m_SourceURL.Length()) {
  	    ::fprintf(fp,"<a href=\"%s",m_SourceURL.str());
! #if defined(_MSC_VER) || defined(_OS2)
  	    // Convert back slashes to forward slashes
  	    // to make things URL compatible.
  	    {for(char* p = file;*p;p++) {
diff -cbr ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/main.cpp ./ccdoc_dev/ccdoc/src/main.cpp
*** ../ccdoc_v07a.old/ccdoc_dev/ccdoc/src/main.cpp	Tue Jun 15 10:12:36 1999
--- ./ccdoc_dev/ccdoc/src/main.cpp	Thu Sep 23 21:26:48 1999
***************
*** 43,48 ****
--- 43,53 ----
   * @see CCcDoc
   */
  int main(int argc,char** argv) {
+ 
+   #if defined(_OS2_EMX)
+       _wildcard( &argc, &argv );
+   #endif
+ 
    CCcDoc prog;
    return prog.Run(argc,argv);
  }
diff -cbr ../ccdoc_v07a.old/ccdoc_dev/tools/mkmk.pl ./ccdoc_dev/tools/mkmk.pl
*** ../ccdoc_v07a.old/ccdoc_dev/tools/mkmk.pl	Tue Jun 15 10:12:40 1999
--- ./ccdoc_dev/tools/mkmk.pl	Thu Sep 23 21:23:24 1999
***************
*** 29,35 ****
      if($arg =~ /^-exe/) {
  	$type = 1;
  	$target_ext = ".exe";
! 	$target_ext = ".exe" if ( $^O eq "MSWin32" );
  	$arg = shift @ARGV;
  	$target = $arg;
  	$arg = shift @ARGV;
--- 29,35 ----
      if($arg =~ /^-exe/) {
  	$type = 1;
  	$target_ext = ".exe";
! 	$target_ext = ".exe" if ( $^O eq "MSWin32" || $^O eq "os2" );
  	$arg = shift @ARGV;
  	$target = $arg;
  	$arg = shift @ARGV;
***************
*** 43,49 ****
      if($arg =~ /^-lib/) {
  	$type = 2;
  	$target_ext = ".a";
! 	$target_ext = ".lib" if ( $^O eq "MSWin32" );
  	$arg = shift @ARGV;
  	$target = $arg;
  	$arg = shift @ARGV;
--- 43,49 ----
      if($arg =~ /^-lib/) {
  	$type = 2;
  	$target_ext = ".a";
! 	$target_ext = ".lib" if ( $^O eq "MSWin32" || $^O eq "os2" );
  	$arg = shift @ARGV;
  	$target = $arg;
  	$arg = shift @ARGV;
***************
*** 163,168 ****
--- 163,211 ----
  	print MK "RM          = rm -f\n";
  	print MK "CP          = cp\n";
      }
+     elsif($arch eq "os2") {
+ 	# OS/2
+ 	print MK "CPP         = gcc\n";
+ 	print MK "CPPFLAGS1   = -Zbin-files -Wno-ctor-dtor-privacy\n";
+ 	print MK "CPPFLAGS2   = -D_OS2 -D_OS2_EMX -DJDL_DEFINE_LOCAL_TYPES\n";
+ 	print MK "CPPFLAGS3   = -I. -I../..\n";
+ 	print MK "CPPFLAGS4   = \$(MYCPPFLAGS)\n";
+ 	print MK "CPPFLAGS    = \$(CPPFLAGS1) \$(CPPFLAGS2) \$(CPPFLAGS3) \$(CPPFLAGS4) -c -o \$\@\n";
+ 	if ( $type == 1 ) {
+ 	    print MK "LINK        = \$(CPP)\n";
+ 	    print MK "LINKFLAGS   =  -o \n";
+ 	    print MK "DBGLINKFLAGS =\n";
+ 	    print MK "OPTCPPFLAGS = -O2\n";
+ 	    print MK "OPTLINKFLAGS =\n";
+ 	}
+ 	if ( $type == 2 ) {
+ 	    print MK "LINK        = ar\n";
+ 	    print MK "LINKFLAGS   = -rcv\n";
+ 	    print MK "DBGLINKFLAGS =\n";
+ 	    print MK "OPTCPPFLAGS = -O2\n";
+ 	    print MK "OPTLINKFLAGS =\n";
+ 	}
+ 	print MK "DBGCPPFLAGS = -g -D_DEBUG\n";
+ 	if($libjdl) {
+ 	    print MK "DBGLIBS     = ../../libjdl/bin_${arch}_dbg/libjdl.lib\n";
+ 	}
+ 	else {
+ 	    print MK "DBGLIBS     =\n";
+ 	}
+ 	print MK "DBGTARGET   = ../bin_${arch}_dbg/$target${target_ext}\n";
+ 
+ 	if($libjdl) {
+ 	    print MK "OPTLIBS     = ../../libjdl/bin_${arch}_opt/libjdl.lib\n";
+ 	}
+ 	else {
+ 	    print MK "OPTLIBS     =\n";
+ 	}
+ 	print MK "OPTTARGET   = ../bin_${arch}_opt/$target${target_ext}\n";
+ 
+ 	print MK "TARGET      = $target${target_ext}\n";
+ 	print MK "RM          = rm -f\n";
+ 	print MK "CP          = cp\n";
+     }
      else {
  	# UNIXes.
  	print MK "CPP         = CC\n";
***************
*** 239,245 ****
      print MK "clean: dbg_clean opt_clean\n";
      print MK "\n";
      print MK "dbg_clean: tidyup\n";
!     if ( $arch eq "MSWin32" ) {
  	print MK "\t\@-\$(RM) \$(DBGOBJS) ..\\bin_${arch}_dbg\\${target_file}\n";
      }
      else {
--- 282,288 ----
      print MK "clean: dbg_clean opt_clean\n";
      print MK "\n";
      print MK "dbg_clean: tidyup\n";
!     if ( $arch eq "MSWin32" || $arch eq "os2" ) {
  	print MK "\t\@-\$(RM) \$(DBGOBJS) ..\\bin_${arch}_dbg\\${target_file}\n";
      }
      else {
***************
*** 247,253 ****
      }
      print MK "\n";
      print MK "opt_clean: tidyup\n";
!     if ( $arch eq "MSWin32" ) {
  	print MK "\t\@-\$(RM) \$(OPTOBJS) ..\\bin_${arch}_opt\\${target_file}\n";
      }
      else {
--- 290,296 ----
      }
      print MK "\n";
      print MK "opt_clean: tidyup\n";
!     if ( $arch eq "MSWin32" || $arch eq "os2" ) {
  	print MK "\t\@-\$(RM) \$(OPTOBJS) ..\\bin_${arch}_opt\\${target_file}\n";
      }
      else {
***************
*** 287,292 ****
--- 330,347 ----
  	}
  	print MK "\n";
      }
+     elsif($arch eq "os2") {
+ 	print MK "${targ}: ..\\bin_${arch}_${targ} ..\\bin_${arch}_${targ}\\\$(TARGET)\n";
+ 	print MK "\n";
+ 	print MK "..\\bin_${arch}_${targ}:\n";
+ 	print MK "\t\@-mkdir \$\@\n";
+ 	print MK "\n";
+ 	print MK "..\\bin_${arch}_${targ}\\${target_file} : \$(${uctarg}OBJS) \$(${uctarg}LIBS)\n";
+ 	&MkSep;
+ 	print MK "\t\@echo Linking \$\@\n";
+ 	print MK "\t\$(PURIFY) \$(LINK) \$(${uctarg}LINKFLAGS) \$(LINKFLAGS) \$\@ \$(${uctarg}OBJS) \$(MY_${arch}_LINKOBJS) \$(${uctarg}LIBS)\n";
+ 	print MK "\n";
+     }
      else {
  	print MK "${targ}: ../bin_${arch}_${targ} ../bin_${arch}_${targ}/\$(TARGET)\n";
  	print MK "\n";
***************
*** 319,325 ****
  	$targ =~ s/\.cc$//;
  	$targ =~ s/\.c$//;
  	$targ =~ s/\.C$//;
! 	if($arch eq "MSWin32") {
  	    print MK "\t..\\bin_${arch}_${type}\\$targ.obj";
  	}
  	else {
--- 374,380 ----
  	$targ =~ s/\.cc$//;
  	$targ =~ s/\.c$//;
  	$targ =~ s/\.C$//;
! 	if($arch eq "MSWin32" || $arch eq "os2" ) {
  	    print MK "\t..\\bin_${arch}_${type}\\$targ.obj";
  	}
  	else {
***************
*** 348,354 ****
      }
      print MK "\n";
      print MK "# ================================================\n";
!     if( $arch eq "MSWin32" ) {
  	&MkCppRule($arg,"obj","$arch","dbg");
  	&MkCppRule($arg,"obj","$arch","opt");
      }
--- 403,409 ----
      }
      print MK "\n";
      print MK "# ================================================\n";
!     if( $arch eq "MSWin32" || $arch eq "os2" ) {
  	&MkCppRule($arg,"obj","$arch","dbg");
  	&MkCppRule($arg,"obj","$arch","opt");
      }
***************
*** 372,378 ****
      $targ =~ s/\.cc$//;
      $targ =~ s/\.c$//;
      $targ =~ s/\.C$//;
!     if( $arch eq "MSWin32" ) {
  	print MK "..\\bin_${arch}_$type\\$targ.$ext: $arg ";
      }
      else {
--- 427,433 ----
      $targ =~ s/\.cc$//;
      $targ =~ s/\.c$//;
      $targ =~ s/\.C$//;
!     if( $arch eq "MSWin32" || $arch eq "os2" ) {
  	print MK "..\\bin_${arch}_$type\\$targ.$ext: $arg ";
      }
      else {
***************
*** 420,426 ****
  	foreach $path (@inc_paths) {
  	    my $x = "$path/$inc";
  	    if( -e $x ) {
! 		$x =~ s/\//\\/g if ( $arch eq "MSWin32");
  		if ( ! defined $inc_files{"$x"} ) {
  		    print MK " $x";
  		    #print STDERR "DEBUG: adding $x\n";
--- 475,481 ----
  	foreach $path (@inc_paths) {
  	    my $x = "$path/$inc";
  	    if( -e $x ) {
! 		$x =~ s/\//\\/g if ( $arch eq "MSWin32" || $arch eq "os2" );
  		if ( ! defined $inc_files{"$x"} ) {
  		    print MK " $x";
  		    #print STDERR "DEBUG: adding $x\n";
***************
*** 454,460 ****
  sub MkSep
  {
      my $arch = $^O;
!     if( $arch eq "MSWin32" ) {
  	print MK "\t\@echo ****************************************************************\n";
      }
      else {
--- 509,515 ----
  sub MkSep
  {
      my $arch = $^O;
!     if( $arch eq "MSWin32" || $arch eq "os2" ) {
  	print MK "\t\@echo ****************************************************************\n";
      }
      else {
