home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / hpack79o.zip / patches.os2 < prev    next >
Text File  |  1994-01-07  |  4KB  |  107 lines

  1. diff -cbr orig/language/language.c new/language/language.c
  2. *** orig/language/language.c    Thu Sep 23 03:23:20 1993
  3. --- new/language/language.c    Fri Jan 07 22:44:52 1994
  4. ***************
  5. *** 259,275 ****
  6.           if( fileNamePtr == NULL )
  7.               return( ERROR );        /* Couldn't find/open input file */
  8.           }
  9. ! #elif defined( __ATARI__ ) || defined( __MAC__ ) || \
  10. !       defined( __MSDOS__ ) || defined( __OS2__ )
  11.       strcpy( ( char * ) buffer, path );
  12.       fileNamePtr = findFilenameStart( ( char * ) buffer );
  13.       strcpy( fileNamePtr, DATA_FILENAME );
  14.       fileNamePtr = ( char * ) buffer;
  15.       if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) == ERROR )
  16.           return( ERROR );
  17. ! #elif defined( __UNIX__ )
  18.       /* Build path to language file and try and process it */
  19.       fileNamePtr = getFirstKeyPath( getenv( "PATH" ), DATA_FILENAME );
  20.       while( fileNamePtr != NULL )
  21.           {
  22.           /* Try and read the seed from the seedfile */
  23. --- 259,278 ----
  24.           if( fileNamePtr == NULL )
  25.               return( ERROR );        /* Couldn't find/open input file */
  26.           }
  27. ! #elif defined( __ATARI__ ) || defined( __MAC__ ) || defined( __MSDOS__ )
  28.       strcpy( ( char * ) buffer, path );
  29.       fileNamePtr = findFilenameStart( ( char * ) buffer );
  30.       strcpy( fileNamePtr, DATA_FILENAME );
  31.       fileNamePtr = ( char * ) buffer;
  32.       if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) == ERROR )
  33.           return( ERROR );
  34. ! #elif defined( __UNIX__ ) || defined( __OS2__ )
  35.       /* Build path to language file and try and process it */
  36. + #if defined(__OS2__)
  37. +     fileNamePtr = getFirstKeyPath( getenv( "HPACKPATH" ), DATA_FILENAME );
  38. + #else
  39.       fileNamePtr = getFirstKeyPath( getenv( "PATH" ), DATA_FILENAME );
  40. + #endif
  41.       while( fileNamePtr != NULL )
  42.           {
  43.           /* Try and read the seed from the seedfile */
  44. diff -cbr orig/system/os2.c new/system/os2.c
  45. *** orig/system/os2.c    Thu May 27 17:10:44 1993
  46. --- new/system/os2.c    Fri Jan 07 21:08:06 1994
  47. ***************
  48. *** 55,60 ****
  49. --- 55,61 ----
  50.   #include <stdlib.h>
  51.   #include <string.h>
  52.   #include <time.h>
  53. + #include <sys/time.h>
  54.   #include "defs.h"
  55.   #include "arcdir.h"
  56.   #include "frontend.h"
  57. ***************
  58. *** 282,288 ****
  59.   
  60.   /* Change a file's attributes */
  61.   
  62. ! int hchmod( const char *fileName, const WORD attr )
  63.       {
  64.   #ifdef OS2_32
  65.       FILESTATUS3 fileInfo;
  66. --- 283,289 ----
  67.   
  68.   /* Change a file's attributes */
  69.   
  70. ! int hchmod( const char *fileName, const int attr )
  71.       {
  72.   #ifdef OS2_32
  73.       FILESTATUS3 fileInfo;
  74. ***************
  75. *** 596,601 ****
  76. --- 597,626 ----
  77.   #endif /* OS2_32 */
  78.       }
  79.   
  80. + /* Get any randomish information the system can give us (not terribly good,
  81. +    but every extra bit helps - if it's there we may as well use it) */
  82. + void getRandomInfo( BYTE *buffer, int bufSize )
  83. +     {
  84. +     struct timeval timeInfo;
  85. +     struct timezone timeZoneInfo;
  86. +     LONG data;
  87. +     int srcIndex, destIndex;
  88. +     /* Get user and process ID information */
  89. +     data = mgetLong( buffer );
  90. +     mputLong( buffer, data ^ getpid() );
  91. +     data = mgetLong( buffer + sizeof( LONG ) );
  92. +     mputLong( buffer + sizeof( LONG ), data ^ getppid() );
  93. +     /* Get time to greatest possible resolution */
  94. +     gettimeofday( &timeInfo, &timeZoneInfo );
  95. +     data = mgetLong( buffer );
  96. +     mputLong( buffer, data ^ timeInfo.tv_sec );
  97. +     data = mgetLong( buffer + sizeof( LONG ) );
  98. +     mputLong( buffer + sizeof( LONG ), data ^ timeInfo.tv_usec );
  99. +     }
  100.   /****************************************************************************
  101.   *                                                                            *
  102.   *                    Extended-Attribute Handling Functions                    *
  103.