home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
languages
/
pot
/
potsrc
/
lib
/
Core
/
c
/
Files
< prev
next >
Wrap
Text File
|
1995-04-13
|
15KB
|
634 lines
/* This code is generated by pOt. */
#include <pOtRTL.h>
#include "hi.Files"
typedef struct pOt__tag_1_Files *pOt_File_Files;
typedef struct pOt__tag_1_Files pOt_FileDesc_Files;
typedef struct pOt__tag_2_Files pOt_Rider_Files;
struct pOt__tag_0_Files {
pOt__ArrTypDsc *td;
pOt_CHAR arr[0x100L];
} ;
pOt__ArrTypDsc pOt__td_0_Files= {
1,
0x100L, sizeof(pOt_CHAR)
};
struct pOt__tag_1_Files {
pOt__RecTypDsc *td;
struct pOt__tag_0_Files pOt_name;
pOt_LONGINT pOt_handle, pOt_pos;
} ;
struct {
pOt_INTEGER mode;
pOt_LONGINT size;
pOt_INTEGER extlev, nstr, nptr, npro;
pOt__RecTypDsc *base_td[pOt__MaxExts];
struct {pOt_LONGINT poffs; pOt__TypDsc *fld_td;} tab[0x1];
} pOt__td_1_Files= {
0,
sizeof(struct pOt__tag_1_Files),
0x0, 0x1, 0x0, 0x0,
{pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL},
{
{(pOt_LONGINT)&((struct pOt__tag_1_Files*)0)->pOt_name, (pOt__TypDsc*)&pOt__td_0_Files}
}
};
struct pOt__tag_2_Files {
pOt__RecTypDsc *td;
pOt_INTEGER pOt_res;
pOt_BOOLEAN pOt_eof;
pOt_LONGINT pOt_pos;
pOt_File_Files pOt_file;
} ;
struct {
pOt_INTEGER mode;
pOt_LONGINT size;
pOt_INTEGER extlev, nstr, nptr, npro;
pOt__RecTypDsc *base_td[pOt__MaxExts];
struct {pOt_LONGINT poffs; pOt__TypDsc *fld_td;} tab[0x1];
} pOt__td_2_Files= {
0,
sizeof(struct pOt__tag_2_Files),
0x0, 0x0, 0x1, 0x0,
{pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL, pOt_NIL},
{
{(pOt_LONGINT)&((struct pOt__tag_2_Files*)0)->pOt_file, pOt_NIL}
}
};
pOt_File_Files pOt_StdIn_Files, pOt_StdOut_Files, pOt_StdErr_Files;
static struct {void *next, *vars[0x4];} pOt__gc_ptrs = {pOt_NIL,{
&pOt_StdIn_Files,
&pOt_StdOut_Files,
&pOt_StdErr_Files,
pOt_NIL
}};
static struct {void *next, *vars[0x1];} pOt__gc_strs = {&pOt__gc_ptrs,{
pOt_NIL
}};
extern pOt_File_Files pOt_Old_Files
#if pOt__ANSI_C
(pOt__DynArr *pOt_name)
#else
(pOt_name)
pOt__DynArr *pOt_name;
#endif
{
pOt_File_Files pOt__retval;
pOt_File_Files pOt_f;
int pOt__gc_enabled_prev;
pOt__gc_enabled_prev=pOt__gc_enabled;
pOt__gc_enabled=0;
pOt_f=pOt_NIL;
pOt__new(__FILE__,__LINE__,(pOt__TypDsc***)&pOt_f,(pOt__TypDsc*)&pOt__td_1_Files);
(*((struct pOt__tag_1_Files*)pOt__nilchk(__FILE__,__LINE__,pOt_f))).pOt_handle=(pOt_LONGINT)(0);
(*((struct pOt__tag_1_Files*)pOt__nilchk(__FILE__,__LINE__,pOt_f))).pOt_pos=(pOt_LONGINT)(0);
pOt__copychk(__FILE__,__LINE__,(pOt_CHAR*)&(*pOt_name),(pOt_CHAR*)&(*((struct pOt__tag_1_Files*)pOt__nilchk(__FILE__,__LINE__,pOt_f))).pOt_name);
pOt__retval =(struct pOt__tag_1_Files*)(pOt_f);
goto pOt__Epilogue;
pOt__halt(__FILE__,__LINE__,0x11);
pOt__Epilogue:;
pOt__gc_enabled=pOt__gc_enabled_prev;
pOt__rm_par((pOt__TypDsc**)pOt_name);
return pOt__retval;
}
extern pOt_File_Files pOt_New_Files
#if pOt__ANSI_C
(pOt__DynArr *pOt_name)
#else
(pOt_name)
pOt__DynArr *pOt_name;
#endif
{
pOt_File_Files pOt__retval;
pOt_File_Files pOt_f;
int pOt__gc_enabled_prev;
pOt__gc_enabled_prev=pOt__gc_enabled;
pOt__gc_enabled=0;
pOt_f=pOt_NIL;
pOt__new(__FILE__,__LINE__,(pOt__TypDsc***)&pOt_f,(pOt__TypDsc*)&pOt__td_1_Files);
(*((struct pOt__tag_1_Files*)pOt__nilchk(__FILE__,__LINE__,pOt_f))).pOt_handle=(pOt_LONGINT)(0);
(*((struct pOt__tag_1_Files*)pOt__nilchk(__FILE__,__LINE__,pOt_f))).pOt_pos=(pOt_LONGINT)(0);
pOt__copychk(__FILE__,__LINE__,(pOt_CHAR*)&(*pOt_name),(pOt_CHAR*)&(*((struct pOt__tag_1_Files*)pOt__nilchk(__FILE__,__LINE__,pOt_f))).pOt_name);
pOt__retval =(struct pOt__tag_1_Files*)(pOt_f);
goto pOt__Epilogue;
pOt__halt(__FILE__,__LINE__,0x11);
pOt__Epilogue:;
pOt__gc_enabled=pOt__gc_enabled_prev;
pOt__rm_par((pOt__TypDsc**)pOt_name);
return pOt__retval;
}
extern void pOt_Register_Files
#if pOt__ANSI_C
(pOt_File_Files pOt_f)
#else
(pOt_f)
pOt_File_Files pOt_f;
#endif
{
struct {void *next, *vars[0x2];} pOt__gc_ptrs;
struct {void *next, *vars[0x1];} pOt__gc_strs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt__gc_strs.next = &pOt__gc_ptrs;
pOt__gc_ptrs.vars[0x1]=pOt_NIL;
pOt__gc_strs.vars[0x0]=pOt_NIL;
pOt__gc_ptrs.vars[0x0]=&pOt_f;
pOt__gc_root=(struct pOt__tag_gc_node*)&pOt__gc_strs;
pOt_f=(struct pOt__tag_1_Files*)(pOt_NIL);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Close_Files
#if pOt__ANSI_C
(pOt_File_Files pOt_f)
#else
(pOt_f)
pOt_File_Files pOt_f;
#endif
{
struct {void *next, *vars[0x2];} pOt__gc_ptrs;
struct {void *next, *vars[0x1];} pOt__gc_strs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt__gc_strs.next = &pOt__gc_ptrs;
pOt__gc_ptrs.vars[0x1]=pOt_NIL;
pOt__gc_strs.vars[0x0]=pOt_NIL;
pOt__gc_ptrs.vars[0x0]=&pOt_f;
pOt__gc_root=(struct pOt__tag_gc_node*)&pOt__gc_strs;
pOt_f=(struct pOt__tag_1_Files*)(pOt_NIL);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Purge_Files
#if pOt__ANSI_C
(pOt_File_Files pOt_f)
#else
(pOt_f)
pOt_File_Files pOt_f;
#endif
{
struct {void *next, *vars[0x2];} pOt__gc_ptrs;
struct {void *next, *vars[0x1];} pOt__gc_strs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt__gc_strs.next = &pOt__gc_ptrs;
pOt__gc_ptrs.vars[0x1]=pOt_NIL;
pOt__gc_strs.vars[0x0]=pOt_NIL;
pOt__gc_ptrs.vars[0x0]=&pOt_f;
pOt__gc_root=(struct pOt__tag_gc_node*)&pOt__gc_strs;
pOt_f=(struct pOt__tag_1_Files*)(pOt_NIL);
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern pOt_LONGINT pOt_Length_Files
#if pOt__ANSI_C
(pOt_File_Files pOt_f)
#else
(pOt_f)
pOt_File_Files pOt_f;
#endif
{
pOt_LONGINT pOt__retval;
int pOt__gc_enabled_prev;
pOt__gc_enabled_prev=pOt__gc_enabled;
pOt__gc_enabled=0;
pOt__halt(__FILE__,__LINE__,0x11);
pOt__Epilogue:;
pOt__gc_enabled=pOt__gc_enabled_prev;
return pOt__retval;
}
extern void pOt_Set_Files
#if pOt__ANSI_C
(struct pOt__tag_2_Files *pOt_r, pOt_File_Files pOt_f, pOt_LONGINT pOt_pos)
#else
(pOt_r, pOt_f, pOt_pos)
struct pOt__tag_2_Files *pOt_r;
pOt_File_Files pOt_f;
pOt_LONGINT pOt_pos;
#endif
{
struct {void *next, *vars[0x2];} pOt__gc_ptrs;
struct {void *next, *vars[0x1];} pOt__gc_strs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt__gc_strs.next = &pOt__gc_ptrs;
pOt__gc_ptrs.vars[0x1]=pOt_NIL;
pOt__gc_strs.vars[0x0]=pOt_NIL;
pOt__gc_ptrs.vars[0x0]=&pOt_f;
pOt__gc_root=(struct pOt__tag_gc_node*)&pOt__gc_strs;
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_Read_Files
#if pOt__ANSI_C
(struct pOt__tag_2_Files *pOt_r, pOt_BYTE_SYSTEM *pOt_x)
#else
(pOt_r, pOt_x)
struct pOt__tag_2_Files *pOt_r;
pOt_BYTE_SYSTEM *pOt_x;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_ReadBytes_Files
#if pOt__ANSI_C
(struct pOt__tag_2_Files *pOt_r, pOt__BytArr pOt_x, pOt_LONGINT pOt_n)
#else
(pOt_r, pOt_x, pOt_n)
struct pOt__tag_2_Files *pOt_r;
pOt__BytArr pOt_x;
pOt_LONGINT pOt_n;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_ReadInt_Files
#if pOt__ANSI_C
(struct pOt__tag_2_Files *pOt_r, pOt_INTEGER *pOt_i)
#else
(pOt_r, pOt_i)
struct pOt__tag_2_Files *pOt_r;
pOt_INTEGER *pOt_i;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt_ReadBytes_Files((struct pOt__tag_2_Files*)&(*pOt_r),pOt__make_byte_arr((void*)&(*pOt_i),0,sizeof(pOt_INTEGER)),(pOt_LONGINT)(2));
pOt__Epilogue:;
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
}
extern void pOt_ReadLInt_Files
#if pOt__ANSI_C
(struct pOt__tag_2_Files *pOt_r, pOt_LONGINT *pOt_i)
#else
(pOt_r, pOt_i)
struct pOt__tag_2_Files *pOt_r;
pOt_LONGINT *pOt_i;
#endif
{
struct {void*next;} pOt__gc_ptrs;
pOt__gc_ptrs.next = pOt__gc_root;
pOt_ReadBytes_Files((struct pOt__tag_2_Files*)&(*pOt_r),pOt__m