minor changes

This commit is contained in:
cvs
2000-05-24 15:11:09 +00:00
parent 9053ae4e2d
commit 1a56fbc568
14 changed files with 643 additions and 212 deletions

View File

@@ -1,4 +1,6 @@
#include <stdlib.h>
#include "str_util.h"
#include "sys_util.h"
void *my_malloc(size_t size, const char *text) {
void *ptr;
@@ -11,3 +13,38 @@ void my_free(void *ptr) {
/* printf("my_free %X\n", ptr); */
free(ptr);
}
#if __VMS
#include <unixio.h>
int sys_remove_file(F_CHAR(file), int file_len) {
char buf[128];
STR_TO_C(buf, file);
return(delete(buf));
}
int sys_gmt_off() {
return(0);
}
#else
#include <unistd.h>
#include <sys/time.h>
int sys_remove_file_(F_CHAR(file), int file_len) {
char buf[128];
STR_TO_C(buf, file);
return(unlink(buf));
}
int sys_gmt_off_() {
struct tm *timp;
time_t tim;
time(&tim);
timp=localtime(&tim);
return(timp->tm_gmtoff);
}
#endif