home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
languages
/
pot
/
potsrc
/
lib
/
c
/
Strings
next >
Wrap
Text File
|
1995-02-21
|
10KB
|
367 lines
/* This code is generated by pOt. */
#line 3 "strings.mod"
#line 3 "strings.mod"
#include <pOtRTL.h>
#line 3 "strings.mod"
#line 3 "strings.mod"
#ifdef __riscos
#include "hi.Strings"
#else
#include "Strings.hi"
#endif
#line 3 "strings.mod"
#line 3 "strings.mod"
#line 3 "strings.mod"
#line 3 "strings.mod"
#line 3 "strings.mod"
static struct {void *next, *vars[0x1];} pOt__gc_ptrs = {pOt_NIL,{
#line 3 "strings.mod"
pOt_NIL
#line 3 "strings.mod"
}};
#line 3 "strings.mod"
static struct {void *next, *vars[0x1];} pOt__gc_strs = {&pOt__gc_ptrs,{
#line 3 "strings.mod"
pOt_NIL
#line 3 "strings.mod"
}};
#line 3 "strings.mod"
#line 3 "strings.mod"
#line 5 "strings.mod"
#line 5 "strings.mod"
#line 5 "strings.mod"
extern pOt_LONGINT pOt_Length_Strings
#line 5 "strings.mod"
#if pOt__ANSI_C
#line 5 "strings.mod"
(pOt__DynArr *pOt_s)
#line 5 "strings.mod"
#else
#line 5 "strings.mod"
(pOt_s)
#line 5 "strings.mod"
pOt__DynArr *pOt_s;
#line 5 "strings.mod"
#line 5 "strings.mod"
#endif
#line 5 "strings.mod"
{
#line 5 "strings.mod"
pOt_LONGINT pOt__retval;
#line 5 "strings.mod"
pOt_LONGINT pOt_l;
#line 5 "strings.mod"
int pOt__gc_enabled_prev;
#line 5 "strings.mod"
pOt__gc_enabled_prev=pOt__gc_enabled;
#line 5 "strings.mod"
pOt__gc_enabled=0;
#line 5 "strings.mod"
#line 5 "strings.mod"
pOt_l=(pOt_LONGINT)(0);
#line 5 "strings.mod"
for(;;) {
#line 5 "strings.mod"
if(((unsigned char) (*((pOt_CHAR*)(((char *)pOt_s+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_s))->nofel,pOt_l)))))!=(unsigned char)'\0')); else break;
#line 5 "strings.mod"
pOt_l+=(1);
#line 5 "strings.mod"
}
#line 5 "strings.mod"
pOt__retval =(pOt_LONGINT)(pOt_l);
goto pOt__Epilogue;
#line 6 "strings.mod"
#line 6 "strings.mod"
pOt__halt(__FILE__,__LINE__,0x11);
#line 6 "strings.mod"
pOt__Epilogue:;
#line 6 "strings.mod"
pOt__gc_enabled=pOt__gc_enabled_prev;
#line 6 "strings.mod"
pOt__rm_par((pOt__TypDsc**)pOt_s);
#line 6 "strings.mod"
return pOt__retval;
#line 6 "strings.mod"
}
#line 6 "strings.mod"
#line 6 "strings.mod"
#line 10 "strings.mod"
#line 10 "strings.mod"
#line 10 "strings.mod"
extern void pOt_Append_Strings
#line 10 "strings.mod"
#if pOt__ANSI_C
#line 10 "strings.mod"
(pOt__DynArr *pOt_s, pOt__DynArr *pOt_tail)
#line 10 "strings.mod"
#else
#line 10 "strings.mod"
(pOt_s, pOt_tail)
#line 10 "strings.mod"
pOt__DynArr *pOt_s;
#line 10 "strings.mod"
pOt__DynArr *pOt_tail;
#line 10 "strings.mod"
#line 10 "strings.mod"
#endif
#line 10 "strings.mod"
{
#line 10 "strings.mod"
pOt_LONGINT pOt_i, pOt_j;
#line 10 "strings.mod"
struct {void*next;} pOt__gc_ptrs;
#line 10 "strings.mod"
pOt__gc_ptrs.next = pOt__gc_root;
#line 10 "strings.mod"
#line 10 "strings.mod"
pOt_i=(pOt_LONGINT)(0);
for(;;) {
#line 11 "strings.mod"
if(((unsigned char) (*((pOt_CHAR*)(((char *)pOt_s+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_s))->nofel,pOt_i)))))!=(unsigned char)'\0')); else break;
#line 11 "strings.mod"
pOt_i+=(1);
#line 11 "strings.mod"
}
#line 11 "strings.mod"
pOt_j=(pOt_LONGINT)(pOt_i);
#line 11 "strings.mod"
for(;;) {
#line 13 "strings.mod"
(*((pOt_CHAR*)(((char *)pOt_s+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_s))->nofel,pOt_i)))))=(*((pOt_CHAR*)(((char *)pOt_tail+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_tail))->nofel,(pOt_LONGINT)pOt__subchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_i),(pOt_LONGINT)(pOt_j),6))))));
#line 13 "strings.mod"
if(((unsigned char) (*((pOt_CHAR*)(((char *)pOt_s+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_s))->nofel,pOt_i)))))==(unsigned char)'\0')) {
goto pOt__LoopLabel_1;
#line 14 "strings.mod"
}
#line 14 "strings.mod"
pOt_i+=(1);
#line 16 "strings.mod"
}
#line 16 "strings.mod"
pOt__LoopLabel_1:;
#line 16 "strings.mod"
pOt__Epilogue:;
#line 17 "strings.mod"
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
#line 17 "strings.mod"
pOt__rm_par((pOt__TypDsc**)pOt_tail);
#line 17 "strings.mod"
}
#line 17 "strings.mod"
#line 17 "strings.mod"
#line 23 "strings.mod"
#line 23 "strings.mod"
static pOt_LONGINT (*pOt_li_FromLInt_Strings);
#line 23 "strings.mod"
static pOt_SHORTINT (*pOt_Base_FromLInt_Strings);
#line 23 "strings.mod"
static pOt__DynArr *pOt_s_FromLInt_Strings;
#line 23 "strings.mod"
static pOt_INTEGER (*pOt_i_FromLInt_Strings);
#line 23 "strings.mod"
#line 23 "strings.mod"
extern void pOt_FromLInt_Strings pOt__ARGS((pOt_LONGINT , pOt_SHORTINT , pOt__DynArr *));
#line 23 "strings.mod"
#line 23 "strings.mod"
#line 25 "strings.mod"
#line 25 "strings.mod"
#line 25 "strings.mod"
static void pOt_Tail_FromLInt_Strings
#line 25 "strings.mod"
#if pOt__ANSI_C
#line 25 "strings.mod"
(pOt_LONGINT pOt_li)
#line 25 "strings.mod"
#else
#line 25 "strings.mod"
(pOt_li)
#line 25 "strings.mod"
pOt_LONGINT pOt_li;
#line 25 "strings.mod"
#line 25 "strings.mod"
#endif
#line 25 "strings.mod"
{
#line 25 "strings.mod"
struct {void*next;} pOt__gc_ptrs;
#line 25 "strings.mod"
pOt__gc_ptrs.next = pOt__gc_root;
#line 25 "strings.mod"
#line 25 "strings.mod"
if(( pOt_li>=((pOt_LONGINT)((*pOt_Base_FromLInt_Strings))))) {
pOt_Tail_FromLInt_Strings((pOt_LONGINT)((pOt_LONGINT)pOt__divchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_li),(pOt_LONGINT)((*pOt_Base_FromLInt_Strings)),6)));
#line 26 "strings.mod"
pOt_li=(pOt_LONGINT)((pOt_LONGINT)pOt__modchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_li),(pOt_LONGINT)((*pOt_Base_FromLInt_Strings)),6));
#line 26 "strings.mod"
}
#line 26 "strings.mod"
if(( pOt_li<((pOt_LONGINT)(10)))) {
(*((pOt_CHAR*)(((char *)pOt_s_FromLInt_Strings+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_s_FromLInt_Strings))->nofel,(*pOt_i_FromLInt_Strings))))))=(pOt_CHAR)pOt__rngchk_cn(__FILE__,__LINE__,(unsigned char)((pOt_LONGINT)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_li),(pOt_LONGINT)(48),6)));
} else {
#line 28 "strings.mod"
(*((pOt_CHAR*)(((char *)pOt_s_FromLInt_Strings+sizeof(pOt__ArrTypDsc*)+sizeof(pOt_CHAR)*pOt__inxchk(__FILE__,__LINE__,(*(pOt_s_FromLInt_Strings))->nofel,(*pOt_i_FromLInt_Strings))))))=(pOt_CHAR)pOt__rngchk_cn(__FILE__,__LINE__,(unsigned char)((pOt_LONGINT)pOt__addchk(__FILE__,__LINE__,(pOt_LONGINT)((pOt_LONGINT)pOt__subchk(__FILE__,__LINE__,(pOt_LONGINT)(pOt_li),(pOt_LONGINT)(10),6)),(pOt_LONGINT)(65),6)));
}
#line 29 "strings.mod"
(*pOt_i_FromLInt_Strings)+=(1);
#line 31 "strings.mod"
#line 31 "strings.mod"
pOt__Epilogue:;
#line 31 "strings.mod"
pOt__gc_root=(struct pOt__tag_gc_node*)pOt__gc_ptrs.next;
#line 31 "strings.mod"
}
#line 31 "strings.mod"
#line 31 "strings.mod"
extern void pOt_FromLInt_Strings
#line 33 "strings.mod"
#if pOt__ANSI_C
#line 33 "strings.mod"
(pOt_LONGINT pOt_li, pOt_SHORTINT pOt_Base, pOt__DynArr *pOt_s)
#line 33 "strings.mod"
#else
#line 33 "strings.mod"
(pOt_li, pOt_Base, pOt_s)
#line 33 "strings.mod"
pOt_LONGINT pOt_li;
#line 33 "strings.mod"
pOt_SHORTINT pOt_Base;
#line 33 "strings.mod"
pOt__DynArr *pOt_s;
#line 33 "strings.mod"
#line 33 "strings.mod"
#endif
#line 33 "strings.mod"
{
#line 33 "strings.mod"
pOt_LONGINT (*pOt_li_);
#line 33 "strings.mod"
pOt_SHORTINT (*pOt_Base_);
#line 33 "strings.mod"
pOt__DynArr *pOt_s_;
#line 33 "strings.mod"
pOt_INTEGER pOt_i, (*pOt_i_);
#line 33 "strings.mod"
struct {void*next;} pOt__gc_ptrs;
#line 33 "strings.mod"
pOt__gc_ptrs.next = pOt__gc_root;
#line 33 "strings.mod"
pOt_li_=pOt_li_FromLInt_Strings;
#line 33 "strings.mod"
pOt_li_FromLInt_Strings=&pOt_li;
#line 33 "strings.mod"
pOt_Base_=pOt_Base_FromLInt_Strings;
#line 33 "strings.mod"
pOt_Base_FromLInt_Strings=&pOt_Base;
#line 33 "strings.mod"
pOt_s_=pOt_s_FromLInt_Strings;
#line 33 "strings.mod"
pOt_s_FromLInt_Strings=pOt_s;
#line 33 "strings.mod"
pOt_i_=pOt_i_FromLInt_Strings;
#line 33 "strings.mod"
pOt_i_FromLInt_Strings=&pOt_i;
#line 33 "strings.mod"
#line 33 "strings.mod"
pOt_i=(pOt_INTEGER)(0);
if(( pOt_li<((pOt_LONGINT)(0)))) {
#line 36 "strings.mod"
if(( pOt_Base==10)) {
(*((pOt_CHAR*)(((char *)pOt_s+sizeof(pOt__ArrTy