head 1.2; access; symbols SFIO_1999:1.1.1.2 SFIO_1998:1.1.1.2 SFIO_1997:1.1.1.1 ATT:1.1.1; locks; strict; comment @ * @; 1.2 date 99.09.11.12.42.12; author rse; state Exp; branches; next 1.1; 1.1 date 96.12.13.20.55.49; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.12.13.20.55.49; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 98.03.04.09.55.30; author rse; state Exp; branches; next ; desc @@ 1.2 log @Incorporate stuff from RSE's Sfio98 variant @ text @#define creat ______creat #define open ______open #include "sftest.h" #undef creat #undef open static int Open = 0; #if __STD_C int open(const char*, int, ...); int creat(const char*, mode_t); #else int open(); int creat(); #endif #if __STD_C int open(const char* file, int mode, ...) #else int open(file, mode) char* file; int mode; #endif { Open = 1; return 1001; } #if __STD_C int creat(const char* file, mode_t mode) #else int create(file, mode) char* file; int mode; #endif { Open = 1; return 1001; } int main() { Sfio_t* f; if(!(f = sftmp(1025)) ) terror("Can't open temp file\n"); if(Open) terror("Attempt to create file detected1\n"); if(sfputc(f,0) < 0) terror("Can't write to temp file\n"); if(Open) terror("Attempt to create file detected2\n"); if(sfclose(f) < 0) terror("Can't close temp file\n"); if(Open) terror("Attempt to create file detected3\n"); if(!(f = sftmp(8)) ) terror("Can't open temp file2\n"); if(Open) terror("Attempt to create file detected4\n"); sfdisc(f,NIL(Sfdisc_t*)); if(!Open) terror("Real file wasn't created\n"); return 0; } @ 1.1 log @Initial revision @ text @d1 3 d6 3 d12 9 d23 1 d34 1 d37 1 d40 1 a40 1 ushort mode; d47 1 a47 1 main() @ 1.1.1.1 log @Import of Sfio1997 @ text @@ 1.1.1.2 log @Import of Sfio1998 @ text @a0 3 #define creat ______creat #define open ______open a2 3 #undef creat #undef open a5 1 int a7 1 int a17 1 int a19 1 int d22 1 a22 1 int mode; @