home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 9 Archive
/
09-Archive.zip
/
hpack79o.zip
/
patches.os2
< prev
next >
Wrap
Text File
|
1994-01-07
|
4KB
|
107 lines
diff -cbr orig/language/language.c new/language/language.c
*** orig/language/language.c Thu Sep 23 03:23:20 1993
--- new/language/language.c Fri Jan 07 22:44:52 1994
***************
*** 259,275 ****
if( fileNamePtr == NULL )
return( ERROR ); /* Couldn't find/open input file */
}
! #elif defined( __ATARI__ ) || defined( __MAC__ ) || \
! defined( __MSDOS__ ) || defined( __OS2__ )
strcpy( ( char * ) buffer, path );
fileNamePtr = findFilenameStart( ( char * ) buffer );
strcpy( fileNamePtr, DATA_FILENAME );
fileNamePtr = ( char * ) buffer;
if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) == ERROR )
return( ERROR );
! #elif defined( __UNIX__ )
/* Build path to language file and try and process it */
fileNamePtr = getFirstKeyPath( getenv( "PATH" ), DATA_FILENAME );
while( fileNamePtr != NULL )
{
/* Try and read the seed from the seedfile */
--- 259,278 ----
if( fileNamePtr == NULL )
return( ERROR ); /* Couldn't find/open input file */
}
! #elif defined( __ATARI__ ) || defined( __MAC__ ) || defined( __MSDOS__ )
strcpy( ( char * ) buffer, path );
fileNamePtr = findFilenameStart( ( char * ) buffer );
strcpy( fileNamePtr, DATA_FILENAME );
fileNamePtr = ( char * ) buffer;
if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) == ERROR )
return( ERROR );
! #elif defined( __UNIX__ ) || defined( __OS2__ )
/* Build path to language file and try and process it */
+ #if defined(__OS2__)
+ fileNamePtr = getFirstKeyPath( getenv( "HPACKPATH" ), DATA_FILENAME );
+ #else
fileNamePtr = getFirstKeyPath( getenv( "PATH" ), DATA_FILENAME );
+ #endif
while( fileNamePtr != NULL )
{
/* Try and read the seed from the seedfile */
diff -cbr orig/system/os2.c new/system/os2.c
*** orig/system/os2.c Thu May 27 17:10:44 1993
--- new/system/os2.c Fri Jan 07 21:08:06 1994
***************
*** 55,60 ****
--- 55,61 ----
#include <stdlib.h>
#include <string.h>
#include <time.h>
+ #include <sys/time.h>
#include "defs.h"
#include "arcdir.h"
#include "frontend.h"
***************
*** 282,288 ****
/* Change a file's attributes */
! int hchmod( const char *fileName, const WORD attr )
{
#ifdef OS2_32
FILESTATUS3 fileInfo;
--- 283,289 ----
/* Change a file's attributes */
! int hchmod( const char *fileName, const int attr )
{
#ifdef OS2_32
FILESTATUS3 fileInfo;
***************
*** 596,601 ****
--- 597,626 ----
#endif /* OS2_32 */
}
+ /* Get any randomish information the system can give us (not terribly good,
+ but every extra bit helps - if it's there we may as well use it) */
+
+ void getRandomInfo( BYTE *buffer, int bufSize )
+ {
+ struct timeval timeInfo;
+ struct timezone timeZoneInfo;
+ LONG data;
+ int srcIndex, destIndex;
+
+ /* Get user and process ID information */
+ data = mgetLong( buffer );
+ mputLong( buffer, data ^ getpid() );
+ data = mgetLong( buffer + sizeof( LONG ) );
+ mputLong( buffer + sizeof( LONG ), data ^ getppid() );
+
+ /* Get time to greatest possible resolution */
+ gettimeofday( &timeInfo, &timeZoneInfo );
+ data = mgetLong( buffer );
+ mputLong( buffer, data ^ timeInfo.tv_sec );
+ data = mgetLong( buffer + sizeof( LONG ) );
+ mputLong( buffer + sizeof( LONG ), data ^ timeInfo.tv_usec );
+
+ }
/****************************************************************************
* *
* Extended-Attribute Handling Functions *