Category : C Source Code
Archive   : LINGUA12.ZIP
Filename : FILES.INC

 
Output of file : FILES.INC contained in archive : LINGUA12.ZIP
/* --------------------------------------------*\
| files.inc (version 1.2) - (C) SichemSoft 1993 |
| Roghorst 160, 6708 KS Wageningen, Netherlands |
| include for language independent applications |
| author: Anneke Sicherer-Roetman, date: 930521 |
\* --------------------------------------------*/

#include

static FILE *fp=NULL; /* file pointer */

/* opens named file (returns 1 on ok, 0 on not ok) */
#define fileopen(name) ((fp=fopen(name,readRA))!=0)

/* closes file */
#define fileclose() if (fp) { fclose(fp); fp=NULL; }

/* moves file pointer to pos (1=ok,0=not ok) */
#define fileseek(pos) (fp?!fseek(fp,pos,SEEK_SET):0)

/* returns file pointer value */
#define filetell() (fp?ftell(fp):-1)

/* reads num bytes from file into buffer (1=ok,0=not ok) */
#define fileread(buffer,num) (fp?fread(buffer,num,1,fp)==1:0)



  3 Responses to “Category : C Source Code
Archive   : LINGUA12.ZIP
Filename : FILES.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/