diff --git a/build/01_asemble.nam b/build/01_asemble.nam new file mode 100644 index 00000000..d4d00855 --- /dev/null +++ b/build/01_asemble.nam @@ -0,0 +1,11 @@ +RXIKJ441 call_rxikj441 +RXABEND call_rxabend +RXINIT call_rxinit +RXTERM call_rxterm +RXVSAM call_rxvsam +RXTSO call_rxtso +RXSVC call_rxsvc +RXCPUTIM cputime +RXCPCMD systemCP +RXSETJMP _setjmp_estae +RXECANC _setjmp_ecanc \ No newline at end of file diff --git a/build/assemble.py b/build/assemble.py new file mode 100644 index 00000000..5b8fbb17 --- /dev/null +++ b/build/assemble.py @@ -0,0 +1,135 @@ +import sys +import logging +from string import Formatter +from pathlib import Path +import socket + +# This python script assembles the required objects for BREXX/370 +logname = 'assemble.log' +logging.basicConfig(filename=logname, + filemode='w', + format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', + datefmt='%H:%M:%S', + level=logging.DEBUG) + +class assemble: + + def __init__(self,system='MVSCE'): + self.system = system + logging.debug("Building") + + + + def jobcard(self, jobname, title, jclass='A', msgclass='A',user='IBMUSER',password='SYS1'): + ''' + This function generates the jobcard needed to submit the jobs + ''' + + if self.system != 'MVSCE': + user = 'HERC01' + password = 'CUL8TR' + + with open('templates/jobcard.template', 'r') as template: + jobcard = template.read() + + if jobcard[-1] != "\n": + jobcard += "\n" + + return jobcard.format( + jobname=jobname.upper(), + title=title, + jclass=jclass, + msgclass=msgclass, + user=user, + password=password + ) + + def punch_out(self, jes_class='B'): + ''' + This function returns the JCL to write &&OBJ to the punchcard writer + + jes_class: The class that sends the output to the card writer, usually 'B' + ''' + with open('templates/punchcard.template', 'r') as template: + punch_jcl = template.read() + + return punch_jcl.format(jes_class=jes_class) + + def brexx_maclib(self): + linklib = 'SYSC.LINKLIB' + + if self.system != 'MVSCE': + linklib = 'SYS2.LINKLIB' + + + with open('templates/maclib.template', 'r') as template: + logging.debug("reading: templates/maclib.template") + maclib = template.read() + + p = Path("../maclib").glob('**/*.hlasm') + files = [x for x in p if x.is_file()] + dd = '' + for macro in sorted(files): + dd += "./ ADD NAME=" +macro.stem + "\n" + with open(macro,'r') as mfile: + dd += mfile.read() + if dd[-1] != "\n": + dd += "\n" + return(maclib.format(steplib=linklib,maclibs=dd)) + + def RXMVSEXT_jcl(self): + ''' + Generates the rxmvsext object file + ''' + + logging.debug("Building rxmvsext.obj") + + with open('templates/rxmvsext.template', 'r') as template: + logging.debug("reading: templates/rxmvsext.template") + punch_jcl = template.read() + + files = [i[1] for i in Formatter().parse(punch_jcl) if i[1] is not None] + + fpath = "../asm/" + file_contents = {} + for fname in files: + hlasm_file = fpath + fname + ".hlasm" + logging.debug("reading:" + hlasm_file) + print("reading:",hlasm_file) + with open(hlasm_file, 'r') as infile: + hlasm = infile.read() + + # if hlasm[-1] != "\n": + # hlasm += "\n" + file_contents[fname] = hlasm + rxmvsext_jcl = (self.jobcard("rxmvsex",'RXMVSEXT') + self.brexx_maclib() + punch_jcl.format(**file_contents) + + self.punch_out() + ) +# + + #self.brexx_maclib() + +# punch_jcl.format(**file_contents) + + # self.punch_out() +# + + print("*" * 100) + with open('test.jcl','w') as outf: + outf.write(rxmvsext_jcl) + #self.submit(rxmvsext_jcl) + + def submit(self,jcl, host='127.0.0.1',port=3505): + '''submits a job (in ASCII) to hercules listener''' + + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + try: + # Connect to server and send data + sock.connect((host, port)) + sock.send(jcl.encode()) + finally: + sock.close() + +go = assemble(system='MVSCE') +go.RXMVSEXT_jcl() + + + \ No newline at end of file diff --git a/build/templates/jobcard.template b/build/templates/jobcard.template new file mode 100644 index 00000000..d1b956fd --- /dev/null +++ b/build/templates/jobcard.template @@ -0,0 +1,3 @@ +//{jobname} JOB (BREXX),'{title}',CLASS={jclass},MSGCLASS={msgclass}, +// REGION=8M,MSGLEVEL=(1,1),USER={user},PASSWORD={password} +//******************************************************************** \ No newline at end of file diff --git a/build/templates/maclib.template b/build/templates/maclib.template new file mode 100644 index 00000000..e4298cc5 --- /dev/null +++ b/build/templates/maclib.template @@ -0,0 +1,12 @@ +//MACLIB EXEC PGM=PDSLOAD +//* +//* Either SYSC.LINKLIB for MVS/CE or SYS2.LINKLIB for TK4-/TK5 +//* +//STEPLIB DD DSN={steplib},DISP=SHR +//SYSPRINT DD SYSOUT=* +//SYSUT2 DD DSN=&&MACLIB,DISP=(,PASS), +// UNIT=VIO,SPACE=(TRK,(44,14,17)), +// DCB=(RECFM=FB,LRECL=80,BLKSIZE=19040) +//SYSUT1 DD DATA,DLM=@@ +{maclibs} +@@ diff --git a/build/templates/punchcard.template b/build/templates/punchcard.template new file mode 100644 index 00000000..a302e54e --- /dev/null +++ b/build/templates/punchcard.template @@ -0,0 +1,8 @@ +//******************************************************************** +//* Now to output the temp dataset &&OBJ to Class B which is the +//* punch out (pch00d.txt) +//PUNCHOUT EXEC PGM=IEBGENER +//SYSIN DD DUMMY +//SYSUT1 DD DSN=&&OBJ,DISP=SHR +//SYSUT2 DD SYSOUT={jes_class} +//SYSPRINT DD SYSOUT=* \ No newline at end of file diff --git a/build/templates/rxmvsext.template b/build/templates/rxmvsext.template new file mode 100644 index 00000000..f6a98d1b --- /dev/null +++ b/build/templates/rxmvsext.template @@ -0,0 +1,104 @@ +//******************************************************************** +//* +//* BUILDING BREXX INTERNAL ASSEMBLER MODULES +//* +//******************************************************************** +//RXSVC EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxsvc} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(,PASS),SPACE=(TRK,3),UNIT=VIO, +// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200) +//******************************************************************** +//RXABEND EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxabend} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXIKJ441 EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxikj441} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXINIT EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=SYS1.APVTMACS,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxinit} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXTERM EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxterm} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXTSO EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxtso} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXVSAM EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxvsam} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXCPUTIM EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxcputim} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXCPCMD EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxcpcmd} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) +//******************************************************************** +//RXESTAE EXEC ASMFC,PARM.ASM=(OBJ,NODECK) +//ASM.SYSLIB DD DSN=SYS2.MACLIB,DISP=SHR +// DD DSN=SYS1.MACLIB,DISP=SHR +// DD DSN=SYS1.AMODGEN,DISP=SHR +// DD DSN=&&MACLIB,DISP=(MOD,PASS) +//ASM.SYSIN DD DATA,DLM=@@ +{rxestae} +@@ +//ASM.SYSGO DD DSN=&&OBJ,DISP=(MOD,PASS) diff --git a/inc/compile.h b/inc/compile.h index 331f02fc..3ea69196 100644 --- a/inc/compile.h +++ b/inc/compile.h @@ -112,10 +112,10 @@ enum mnemonic_type { ,OP_PUSH /* push lstring */ ,OP_PUSHTMP /* push a temporary lstring */ ,OP_POP /* pop lstring */ - ,OP_DUP /* DUP Ýrelative¨ duplicates something from stack */ + ,OP_DUP /* DUP [relative] duplicates something from stack */ ,OP_COPY /* COPY to previous (Lstrcpy)*/ ,OP_COPY2TMP /* COPY a value to temporary */ - ,OP_PATCH /* PATCH Ýrelative¨ Ýbyte¨ in code */ + ,OP_PATCH /* PATCH [relative] [byte] in code */ ,OP_RAISE /* raise a condition error */ ,OP_LOADARG /* load argument */ diff --git a/inc/dbginfo.h b/inc/dbginfo.h index e5f747de..124a7ce2 100644 --- a/inc/dbginfo.h +++ b/inc/dbginfo.h @@ -15,7 +15,7 @@ typedef struct T_DebugInfo_st { dword magic_eye; char *message; - dword pointerÝMAX_POINTER_ELEMENTS¨; + dword pointer[MAX_POINTER_ELEMENTS]; } DebugInfo; typedef DebugInfo *P_DebugInfo; @@ -39,12 +39,12 @@ static void updateDebugInfo (char *message, int num, ...) /* zero out all old values */ for (ii=0; ii < MAX_POINTER_ELEMENTS; ii++) { - debugInfo->pointerÝii¨ = 0; + debugInfo->pointer[ii] = 0; } /* set new values */ for (jj=0; jj < MIN(num,MAX_POINTER_ELEMENTS); jj++) { - debugInfo->pointerÝjj¨ = va_arg(args,dword); + debugInfo->pointer[jj] = va_arg(args,dword); } /* clean up */ diff --git a/inc/dynit.h b/inc/dynit.h index 63202942..42a9c052 100644 --- a/inc/dynit.h +++ b/inc/dynit.h @@ -10,29 +10,29 @@ typedef struct __DYNstruct { char *__ddname; /* DDNAME */ char *__dsname; /* DSNAME, dataset name */ char __sysout; /* system output dataset */ - char __01__Ý7¨; + char __01__[7]; char *__sysoutname; /* program name for sysout */ char *__member; /* member of a PDS */ char __status; /* dataset status */ char __normdisp; /* dataset's normal disp */ char __conddisp; /* dataset's cond disp */ - char __02__Ý5¨; + char __02__[5]; char *__unit; /* unit name of dataset */ char *__volser; /* volume serial number */ short __dsorg; /* dataset organization */ char __alcunit; /* unit of space allocation */ - char __03__Ý1¨; + char __03__[1]; int __primary; /* primary space allocation */ int __secondary; /* secondary space alloc'n */ short __recfm; /* the record format */ short __blksize; /* the block size */ unsigned short __lrecl; /* record length */ - char __04__Ý6¨; + char __04__[6]; char *__volrefds; /* volume serial reference */ char *__dcbrefds; /* dsname for DCB reference */ char *__dcbrefdd; /* ddname for DCB reference */ unsigned char __misc_flags; /* attribute flags */ - char __05__Ý7¨; + char __05__[7]; char *__password; /* password */ char **__miscitems; /* all remaining text units */ short __infocode; /* SVC 99 info code */ @@ -43,17 +43,17 @@ typedef struct __DYNstruct { char *__mgntclass; /* SMS management class */ char *__dataclass; /* SMS data class */ unsigned char __recorg; /* Vsam dataset organization */ - char __06__Ý1¨; + char __06__[1]; short __keylength; /* Vsam key length */ short __keyoffset; /* Vsam key offset */ - char __07__Ý2¨; + char __07__[2]; char *__refdd; /* copy attributes of ref. dd*/ char *__like; /* copy attributes of like dsn */ unsigned char __dsntype; /* type att. of pds or pdse */ - char __08__Ý7¨; - char __09__Ý4¨; + char __08__[7]; + char __09__[4]; struct __S99rbx * __rbx; /* to the req. block extension */ - char __10__Ý4¨; + char __10__[4]; struct __S99emparms * __emsgparmlist; /* @ of error msg parms*/ } __DYNstruct, __dyn_t; diff --git a/inc/irx.h b/inc/irx.h index 95cab2e4..fa03ee26 100644 --- a/inc/irx.h +++ b/inc/irx.h @@ -16,7 +16,7 @@ struct argtable_entry { #define __argstring__ struct argstring { - unsigned char argtable_endÝ8¨; /* End of ARGTABLE marker */ + unsigned char argtable_end[8]; /* End of ARGTABLE marker */ }; #endif @@ -29,8 +29,8 @@ struct compgmtb_header { int compgmtb_total; /* Total number of COMPGMTB entries */ int compgmtb_used; /* Number of used COMPGMTB entries */ int compgmtb_length; /* Length of each COMPGMTB entry */ - unsigned char _filler1Ý8¨; /* Reserved */ - unsigned char compgmtb_ffffÝ8¨; /* End marker - hex */ + unsigned char _filler1[8]; /* Reserved */ + unsigned char compgmtb_ffff[8]; /* End marker - hex */ }; #endif @@ -39,12 +39,12 @@ struct compgmtb_header { #define __compgmtb_entry__ struct compgmtb_entry { - unsigned char compgmtb_rtprocÝ8¨; /* Name of the Run Time Processor */ - unsigned char compgmtb_compinitÝ8¨; /* Name of the Initialization */ - unsigned char compgmtb_comptermÝ8¨; /* Name of the Termination Routine */ - unsigned char compgmtb_comploadÝ8¨; /* Name of the Load Routine */ - unsigned char compgmtb_compvarÝ8¨; /* Name of the Variable Handling */ - int compgmtb_storageÝ4¨; /* Storage for the Compiler */ + unsigned char compgmtb_rtproc[8]; /* Name of the Run Time Processor */ + unsigned char compgmtb_compinit[8]; /* Name of the Initialization */ + unsigned char compgmtb_compterm[8]; /* Name of the Termination Routine */ + unsigned char compgmtb_compload[8]; /* Name of the Load Routine */ + unsigned char compgmtb_compvar[8]; /* Name of the Variable Handling */ + int compgmtb_storage[4]; /* Storage for the Compiler */ __extension__ double compgmtb_next; /* Next COMPGMTB entry */ }; @@ -54,12 +54,12 @@ struct compgmtb_entry { #define __dsib_info__ struct dsib_info { - unsigned char dsib_idÝ8¨; /* The 'IRXDSIB ' identifier */ + unsigned char dsib_id[8]; /* The 'IRXDSIB ' identifier */ short int dsib_length; /* Length of the DSIB_INFO control */ short int _filler1; /* Reserved */ - unsigned char dsib_ddnameÝ8¨; /* Name of DD for which information */ + unsigned char dsib_ddname[8]; /* Name of DD for which information */ union { - unsigned char _dsib_flagsÝ4¨; /* Flag word */ + unsigned char _dsib_flags[4]; /* Flag word */ struct { int _dsib_lrecl_flag : 1, /* ON if LRECL field is set */ _dsib_blksz_flag : 1, /* ON if BLKSZ field is set */ @@ -71,20 +71,20 @@ struct dsib_info { _dsib_cc_flag : 1; /* ON if CC field is set */ int _dsib_trc_flag : 1, /* ON if TRC field is set */ : 7; - unsigned char _filler2Ý2¨; /* Reserved �DEI0051 */ + unsigned char _filler2[2]; /* Reserved DEI0051 */ } _dsib_info_struct1; } _dsib_info_union1; union { - unsigned char _dsib_dcb_infoÝ8¨; /* DCB information - set at OPEN */ + unsigned char _dsib_dcb_info[8]; /* DCB information - set at OPEN */ struct { short int _dsib_lrecl; /* Data set LRECL */ short int _dsib_blksz; /* Data set BLKSIZE */ - unsigned char _dsib_dsorgÝ2¨; /* Data Set Organization (DSORG) - */ - unsigned char _dsib_recfmÝ2¨; /* Record Format Information ==> */ + unsigned char _dsib_dsorg[2]; /* Data Set Organization (DSORG) - */ + unsigned char _dsib_recfm[2]; /* Record Format Information ==> */ } _dsib_info_struct2; } _dsib_info_union2; union { - unsigned char _dsib_io_countsÝ8¨; /* I/O count against this DCB */ + unsigned char _dsib_io_counts[8]; /* I/O count against this DCB */ struct { int _dsib_get_cnt; /* Total number of records read */ int _dsib_put_cnt; /* Total number of records written */ @@ -93,8 +93,8 @@ struct dsib_info { unsigned char dsib_io_mode; /* Mode in which DCB was opened: */ unsigned char dsib_cc; /* Carriage control information: */ unsigned char dsib_trc; /* 3800 TRC information: */ - unsigned char _filler3; /* Reserved �DEI0051 */ - int _filler4Ý3¨; /* Reserved words */ + unsigned char _filler3; /* Reserved DEI0051 */ + int _filler4[3]; /* Reserved words */ }; #define dsib_flags _dsib_info_union1._dsib_flags @@ -139,36 +139,36 @@ struct efpl { #define __envblock__ struct envblock { - unsigned char envblock_idÝ8¨; /* ENVBLOCK identifier 'ENVBLOCK' */ - unsigned char envblock_versionÝ4¨; /* Version number �DEI0040 */ - int envblock_length; /* Length of ENVBLOCK �DEI0040 */ + unsigned char envblock_id[8]; /* ENVBLOCK identifier 'ENVBLOCK' */ + unsigned char envblock_version[4]; /* Version number DEI0040 */ + int envblock_length; /* Length of ENVBLOCK DEI0040 */ void *envblock_parmblock; /* Address of the PARMBLOCK */ void *envblock_userfield; /* Address of the user field */ void *envblock_workblok_ext; /* Address of the current */ void *envblock_irxexte; /* Address of IRXEXTE */ union { - unsigned char _envblock_errorÝ256¨; /* Error information */ + unsigned char _envblock_error[256]; /* Error information */ struct { void *_error_call_; /* Address of the routine in error */ int _filler1; /* Reserved */ - unsigned char _error_msgidÝ8¨; /* Message identifier of first call */ - unsigned char _primary_error_messageÝ80¨; /* Error message */ - unsigned char _alternate_error_msgÝ160¨; /* Extended error message */ + unsigned char _error_msgid[8]; /* Message identifier of first call */ + unsigned char _primary_error_message[80]; /* Error message */ + unsigned char _alternate_error_msg[160]; /* Extended error message */ } _envblock_struct1; } _envblock_union1; void *envblock_compgmtb; /* Address of the Compiler */ void *envblock_attnrout_parmptr; /* Address of a parameter */ void *envblock_ectptr; /* Address of the ECT under which */ union { - unsigned char _envblock_info_flagsÝ4¨; /* Information flags �YA57272 */ + unsigned char _envblock_info_flags[4]; /* Information flags YA57272 */ struct { int _envblock_terma_cleanup : 1, /* Flag to indicate that */ : 7; - unsigned char _filler2Ý3¨; /* Reserved �YA57272 */ + unsigned char _filler2[3]; /* Reserved YA57272 */ } _envblock_struct2; } _envblock_union2; - int envblock_uss_rexx; /* Word reserved for USS REXX �P1C */ - int _filler3Ý3¨; /* Reserved �P1C */ + int envblock_uss_rexx; /* Word reserved for USS REXX P1C */ + int _filler3[3]; /* Reserved P1C */ }; #define envblock_error _envblock_union1._envblock_error @@ -189,7 +189,7 @@ struct evalblock { int evalblock_evsize; /* Size of EVALBLOCK in double */ int evalblock_evlen; /* Length of data */ int evalblock_evpad2; /* Reserved - set to binary zero */ - unsigned char evalblock_evdataÝ1¨; /* Result */ + unsigned char evalblock_evdata[1]; /* Result */ }; #endif @@ -198,32 +198,32 @@ struct evalblock { #define __execblk__ struct execblk { - unsigned char exec_blk_acrynÝ8¨; /* Acronym identifier, must be set */ - int exec_blk_length; /* Length of EXECBLK in bytes �PEI0455 */ - int _filler1; /* Reserved �PEI0455 */ - unsigned char exec_memberÝ8¨; /* The member name of the Exec, if */ - unsigned char exec_ddnameÝ8¨; /* The DD from which the Exec is */ - unsigned char exec_subcomÝ8¨; /* Name of the initial subcommand */ + unsigned char exec_blk_acryn[8]; /* Acronym identifier, must be set */ + int exec_blk_length; /* Length of EXECBLK in bytes PEI0455 */ + int _filler1; /* Reserved PEI0455 */ + unsigned char exec_member[8]; /* The member name of the Exec, if */ + unsigned char exec_ddname[8]; /* The DD from which the Exec is */ + unsigned char exec_subcom[8]; /* Name of the initial subcommand */ void *exec_dsnptr; /* Pointer to a data set name (DSN) */ int exec_dsnlen; /* Length of DSN pointed to by */ union { - unsigned char _exec_v1_end; /* End of EXECBLK �PEI0455 */ + unsigned char _exec_v1_end; /* End of EXECBLK PEI0455 */ void *_exec_extname_ptr; /* Pointer to the extended execname. */ } _execblk_union1; int exec_extname_len; /* Length of the extended name */ - int _filler2Ý2¨; /* RSVD �WA28404 */ - __extension__ unsigned char exec_v2_end; /* End of Ver 2 EXECBLK �WA28404 */ + int _filler2[2]; /* RSVD WA28404 */ + __extension__ unsigned char exec_v2_end; /* End of Ver 2 EXECBLK WA28404 */ }; #define exec_v1_end _execblk_union1._exec_v1_end #define exec_extname_ptr _execblk_union1._exec_extname_ptr /* Values for field "exec_v1_end" */ -#define execblen 0x30 /* Length of the EXECBLK Ver1 �WA28404 */ +#define execblen 0x30 /* Length of the EXECBLK Ver1 WA28404 */ #define execblk_v1_len 0x30 /* Length of the EXECBLK Ver1 */ /* Values for field "exec_v2_end" */ -#define execblk_v2_len 0x40 /* Length of the EXECBLK Ver2 �WA28404 */ +#define execblk_v2_len 0x40 /* Length of the EXECBLK Ver2 WA28404 */ #endif @@ -251,13 +251,13 @@ struct irxexte { void *userid_routine; /* USERID_ROUTINE - REXX User ID */ void *irxuid; /* IRXUID - Default REXX User ID */ void *irxterma; /* IRXTERMA - REXX Abnormal */ - void *irxsay; /* IRXSAY - REXX SAY �E23X2BJ */ - void *irxers; /* IRXERS - REXX External �E23X2BJ */ - void *irxhst; /* IRXHST - REXX Host �E23X2BJ */ - void *irxhlt; /* IRXHLT - REXX Halt �E23X2BJ */ - void *irxtxt; /* IRXTXT - REXX Text �E23X2BJ */ - void *irxlin; /* IRXLIN - REXX LINESIZE �E23X2BJ */ - void *irxrte; /* IRXRTE - REXX Exit �E23X2BJ */ + void *irxsay; /* IRXSAY - REXX SAY E23X2BJ */ + void *irxers; /* IRXERS - REXX External E23X2BJ */ + void *irxhst; /* IRXHST - REXX Host E23X2BJ */ + void *irxhlt; /* IRXHLT - REXX Halt E23X2BJ */ + void *irxtxt; /* IRXTXT - REXX Text E23X2BJ */ + void *irxlin; /* IRXLIN - REXX LINESIZE E23X2BJ */ + void *irxrte; /* IRXRTE - REXX Exit E23X2BJ */ }; #endif @@ -266,7 +266,7 @@ struct irxexte { #define __fpckdir_header__ struct fpckdir_header { - unsigned char fpckdir_idÝ8¨; /* FPCKDIR character id */ + unsigned char fpckdir_id[8]; /* FPCKDIR character id */ int fpckdir_header_length; /* Length of header */ int fpckdir_functions; /* Number of functions */ int _filler1; /* Reserved */ @@ -279,11 +279,11 @@ struct fpckdir_header { #define __fpckdir_entry__ struct fpckdir_entry { - unsigned char fpckdir_funcnameÝ8¨; /* Name of Function or Subroutine */ + unsigned char fpckdir_funcname[8]; /* Name of Function or Subroutine */ void *fpckdir_funcaddr; /* Address of the entry point of */ int _filler1; /* Reserved */ - unsigned char fpckdir_sysnameÝ8¨; /* Name of the entry point */ - unsigned char fpckdir_sysddÝ8¨; /* DD name from which the package */ + unsigned char fpckdir_sysname[8]; /* Name of the entry point */ + unsigned char fpckdir_sysdd[8]; /* DD name from which the package */ __extension__ double fpckdir_next; /* Next FPCKDIR entry */ }; @@ -294,27 +294,27 @@ struct fpckdir_entry { struct instblk { union { - unsigned char _instblk_headerÝ128¨; /* In-Storage Block Header */ + unsigned char _instblk_header[128]; /* In-Storage Block Header */ struct { - unsigned char _instblk_acronymÝ8¨; /* The INSTBLK Identifier */ + unsigned char _instblk_acronym[8]; /* The INSTBLK Identifier */ int _instblk_hdrlen; /* Length of INSTBLK header */ int _filler1; /* Reserved */ void *_instblk_address; /* Address of first INSTBLK_ENTRY */ int _instblk_usedlen; /* Total length of all used */ - unsigned char _instblk_memberÝ8¨; /* Name of member from which exec */ - unsigned char _instblk_ddnameÝ8¨; /* Name of DD representing data set */ - unsigned char _instblk_subcomÝ8¨; /* Name of initial subcommand environ- */ + unsigned char _instblk_member[8]; /* Name of member from which exec */ + unsigned char _instblk_ddname[8]; /* Name of DD representing data set */ + unsigned char _instblk_subcom[8]; /* Name of initial subcommand environ- */ int _filler2; /* Reserved */ int _instblk_dsnlen; /* Length of data set name */ - unsigned char _instblk_dsnameÝ54¨; /* Data set name from which exec was */ + unsigned char _instblk_dsname[54]; /* Data set name from which exec was */ short int _filler3; /* Reserved */ void *_instblk_extname_ptr; /* Ptr to the extended execname. */ int _instblk_extname_len; /* Length of the extended name */ - int _filler4Ý2¨; /* Reserved - 2 words �WA28404 */ + int _filler4[2]; /* Reserved - 2 words WA28404 */ } _instblk_struct1; } _instblk_union1; __extension__ union { - unsigned char _instblk_entriesÝ8¨; /* The INSTBLK_ENTRY array of entries */ + unsigned char _instblk_entries[8]; /* The INSTBLK_ENTRY array of entries */ } _instblk_union2; }; @@ -341,7 +341,7 @@ struct instblk_entry { void *instblk_stmt_; /* Address of REXX statement */ int instblk_stmtlen; /* Length of the REXX statement */ __extension__ union { - unsigned char _instblk_nextÝ8¨; /* Next INSTBLK_ENTRY */ + unsigned char _instblk_next[8]; /* Next INSTBLK_ENTRY */ } _instblk_entry_union1; }; @@ -353,7 +353,7 @@ struct instblk_entry { #define __statement__ struct statement { - unsigned char instblk_acrynÝ8¨; /* In-storage control �E23X2BJ */ + unsigned char instblk_acryn[8]; /* In-storage control E23X2BJ */ }; #endif @@ -363,29 +363,29 @@ struct statement { struct modnamet { union { - unsigned char _modnamet_ddsÝ24¨; /* DDs */ + unsigned char _modnamet_dds[24]; /* DDs */ struct { - unsigned char _modnamet_inddÝ8¨; /* Name of the input DD and is only */ - unsigned char _modnamet_outddÝ8¨; /* Name of the output DD and is */ - unsigned char _modnamet_loadddÝ8¨; /* Name of the load exec DD */ + unsigned char _modnamet_indd[8]; /* Name of the input DD and is only */ + unsigned char _modnamet_outdd[8]; /* Name of the output DD and is */ + unsigned char _modnamet_loaddd[8]; /* Name of the load exec DD */ } _modnamet_struct1; } _modnamet_union1; union { - unsigned char _modnamet_routinesÝ80¨; /* Routines �YA17590 */ + unsigned char _modnamet_routines[80]; /* Routines YA17590 */ struct { - unsigned char _modnamet_ioroutÝ8¨; /* Name of the input and output */ - unsigned char _modnamet_exroutÝ8¨; /* Name of the exec load routine */ - unsigned char _modnamet_getfreerÝ8¨; /* Name of the getmain and freemain */ - unsigned char _modnamet_execinitÝ8¨; /* Name of the Exec Initialization */ - unsigned char _modnamet_attnroutÝ8¨; /* Name of the attention routine */ - unsigned char _modnamet_stackrtÝ8¨; /* Name of the stack routine */ - unsigned char _modnamet_irxexecxÝ8¨; /* Name of the IRXEXEC exit routine */ - unsigned char _modnamet_idroutÝ8¨; /* Name of the userid routine */ - unsigned char _modnamet_msgidrtÝ8¨; /* Name of the message id routine */ - unsigned char _modnamet_exectermÝ8¨; /* Name of the Exec Termination */ + unsigned char _modnamet_iorout[8]; /* Name of the input and output */ + unsigned char _modnamet_exrout[8]; /* Name of the exec load routine */ + unsigned char _modnamet_getfreer[8]; /* Name of the getmain and freemain */ + unsigned char _modnamet_execinit[8]; /* Name of the Exec Initialization */ + unsigned char _modnamet_attnrout[8]; /* Name of the attention routine */ + unsigned char _modnamet_stackrt[8]; /* Name of the stack routine */ + unsigned char _modnamet_irxexecx[8]; /* Name of the IRXEXEC exit routine */ + unsigned char _modnamet_idrout[8]; /* Name of the userid routine */ + unsigned char _modnamet_msgidrt[8]; /* Name of the message id routine */ + unsigned char _modnamet_execterm[8]; /* Name of the Exec Termination */ } _modnamet_struct2; } _modnamet_union2; - unsigned char modnamet_ffffÝ8¨; /* End marker - hex */ + unsigned char modnamet_ffff[8]; /* End marker - hex */ }; #define modnamet_dds _modnamet_union1._modnamet_dds @@ -420,7 +420,7 @@ struct packtb_header { int packtb_system_total; /* Total number of system PACKTB */ int packtb_system_used; /* Number of used system PACKTB */ int packtb_length; /* Length of each PACKTB entry */ - unsigned char packtb_ffffÝ8¨; /* End marker - hex */ + unsigned char packtb_ffff[8]; /* End marker - hex */ }; #endif @@ -429,12 +429,12 @@ struct packtb_header { #define __packtb_entry__ struct packtb_entry { - unsigned char packtb_nameÝ8¨; /* Name of the function package */ + unsigned char packtb_name[8]; /* Name of the function package */ union { double _packtb_next; /* Next PACKTB entry */ - unsigned char _valid_parmblock_idÝ8¨; /* Valid PARMBLOCK �E23X2BJ */ + unsigned char _valid_parmblock_id[8]; /* Valid PARMBLOCK E23X2BJ */ } _packtb_entry_union1; - unsigned char valid_parmblock_versionÝ4¨; /* Current PARMBLOCK �E23X2BJ */ + unsigned char valid_parmblock_version[4]; /* Current PARMBLOCK E23X2BJ */ }; #define packtb_next _packtb_entry_union1._packtb_next @@ -446,16 +446,16 @@ struct packtb_entry { #define __parmblock__ struct parmblock { - unsigned char parmblock_idÝ8¨; /* PARMBLOCK character id */ - unsigned char parmblock_versionÝ4¨; /* Version number in EBCDIC */ - unsigned char parmblock_languageÝ3¨; /* Language identifier �DG10017 */ + unsigned char parmblock_id[8]; /* PARMBLOCK character id */ + unsigned char parmblock_version[4]; /* Version number in EBCDIC */ + unsigned char parmblock_language[3]; /* Language identifier DG10017 */ unsigned char _filler1; void *parmblock_modnamet; /* Address of the MODNAMET */ void *parmblock_subcomtb; /* Address of the SUBCOMTB header */ void *parmblock_packtb; /* Address of the PACKTB header */ - unsigned char parmblock_parsetokÝ8¨; /* Parse source token */ + unsigned char parmblock_parsetok[8]; /* Parse source token */ union { - unsigned char _parmblock_flagsÝ4¨; /* Flags */ + unsigned char _parmblock_flags[4]; /* Flags */ struct { int _tsofl : 1, /* Integrate with TSO flag */ : 1, @@ -475,8 +475,8 @@ struct parmblock { _nopmsgs : 1; /* No primary messages flag */ int _altmsgs : 1, /* Issue alternate messages flag */ _spshare : 1, /* Subpool storage is shared flag */ - _storfl : 1, /* STORAGE function flag �PEI0279 */ - _noloaddd : 1, /* Do not load from �DEI0043 */ + _storfl : 1, /* STORAGE function flag PEI0279 */ + _noloaddd : 1, /* Do not load from DEI0043 */ _nomsgwto : 1, /* MVS, do not issue error messages */ _nomsgio : 1, /* MVS, do not issue error messages */ _rostorfl : 1, /* Read only STORAGE function. The */ @@ -485,7 +485,7 @@ struct parmblock { } _parmblock_struct1; } _parmblock_union1; union { - unsigned char _parmblock_masksÝ4¨; /* Masks for flags */ + unsigned char _parmblock_masks[4]; /* Masks for flags */ struct { int _tsofl_mask : 1, /* Integrate with TSO flag mask */ : 1, @@ -505,18 +505,18 @@ struct parmblock { _nopmsgs_mask : 1; /* No primary messages flag mask */ int _altmsgs_mask : 1, /* Issue alternate messages flag */ _spshare_mask : 1, /* Subpool storage is shared flag */ - _storfl_mask : 1, /* STORAGE function flag �PEI0279 */ - _noloaddd_mask : 1, /* Mask for �DEI0043 */ + _storfl_mask : 1, /* STORAGE function flag PEI0279 */ + _noloaddd_mask : 1, /* Mask for DEI0043 */ _nomsgwto_mask : 1, /* MVS, do not issue error messages */ _nomsgio_mask : 1, /* MVS, do not issue error messages */ - _rostorfl_mask : 1, /* Read only STORAGE mask �L1A */ + _rostorfl_mask : 1, /* Read only STORAGE mask L1A */ : 1; unsigned char _filler3; /* Reserved */ } _parmblock_struct2; } _parmblock_union2; int parmblock_subpool; /* Subpool number */ - unsigned char parmblock_addrspnÝ8¨; /* Name of the address space */ - unsigned char parmblock_ffffÝ8¨; /* End marker - hex */ + unsigned char parmblock_addrspn[8]; /* Name of the address space */ + unsigned char parmblock_ffff[8]; /* End marker - hex */ }; #define parmblock_flags _parmblock_union1._parmblock_flags @@ -624,9 +624,9 @@ struct subcomtb_header { int subcomtb_total; /* Total number of SUBCOMTB entries */ int subcomtb_used; /* Number of used SUBCOMTB entries */ int subcomtb_length; /* Length of each SUBCOMTB entry */ - unsigned char subcomtb_initialÝ8¨; /* Name of the initial subcommand */ - unsigned char _filler1Ý8¨; /* Reserved */ - unsigned char subcomtb_ffffÝ8¨; /* End marker - hex */ + unsigned char subcomtb_initial[8]; /* Name of the initial subcommand */ + unsigned char _filler1[8]; /* Reserved */ + unsigned char subcomtb_ffff[8]; /* End marker - hex */ }; #endif @@ -635,9 +635,9 @@ struct subcomtb_header { #define __subcomtb_entry__ struct subcomtb_entry { - unsigned char subcomtb_nameÝ8¨; /* Name of the subcommand */ - unsigned char subcomtb_routineÝ8¨; /* Name of the subcommand routine */ - unsigned char subcomtb_tokenÝ16¨; /* Subcommand token */ + unsigned char subcomtb_name[8]; /* Name of the subcommand */ + unsigned char subcomtb_routine[8]; /* Name of the subcommand routine */ + unsigned char subcomtb_token[16]; /* Subcommand token */ //__extension__ double subcomtb_next; /* Next SUBCOMTB entry */ }; @@ -650,24 +650,24 @@ struct workblok_ext { void *workext_execblk; /* Address of the EXECBLK */ void *workext_argtable; /* Address of the first ARGTABLE */ union { - unsigned char _workext_flagsÝ4¨; /* Flags describing the REXX exec */ + unsigned char _workext_flags[4]; /* Flags describing the REXX exec */ struct { int _workext_command : 1, /* Exec is a command */ _workext_function : 1, /* Exec is a function */ _workext_subroutine : 1, /* Exec is a subroutine */ : 5; - unsigned char _filler1Ý3¨; /* Reserved */ + unsigned char _filler1[3]; /* Reserved */ } _workblok_ext_struct1; } _workblok_ext_union1; void *workext_instblk; /* Address of the INSTBLK header */ - void *workext_cpplptr; /* Address of the CPPL �PEI0853 */ + void *workext_cpplptr; /* Address of the CPPL PEI0853 */ void *workext_evalblock; /* Address of the REXX user */ void *workext_workarea; /* Address of the workarea header */ - void *workext_userfield; /* Address of a user field �PEI0853 */ - int workext_rtproc; /* A fullword for use by �E23X2BJ */ - void *workext_source_address; /* The address of the �E23X2BJ */ - int workext_source_length; /* The length of the �E23X2BJ */ - int _filler2; /* Reserved �E23X2BJ */ + void *workext_userfield; /* Address of a user field PEI0853 */ + int workext_rtproc; /* A fullword for use by E23X2BJ */ + void *workext_source_address; /* The address of the E23X2BJ */ + int workext_source_length; /* The length of the E23X2BJ */ + int _filler2; /* Reserved E23X2BJ */ }; #define workext_flags _workblok_ext_union1._workext_flags diff --git a/inc/ldefs.h b/inc/ldefs.h index a78198ad..058f6cc3 100644 --- a/inc/ldefs.h +++ b/inc/ldefs.h @@ -107,7 +107,7 @@ typedef unsigned int uintptr_t; #define SWAP(a,b) a ¬= b ¬= a ¬= b; -#define DIMENSION(p) (sizeof(p) / sizeof(pÝ0¨)) +#define DIMENSION(p) (sizeof(p) / sizeof(p[0])) #define ABS(a) (((a)<0)?-(a):(a)) #ifndef MAX diff --git a/inc/lstring.h b/inc/lstring.h index c47cb3e5..e21331a7 100644 --- a/inc/lstring.h +++ b/inc/lstring.h @@ -87,7 +87,7 @@ typedef Lstr *PLstr; #define LUNSETOPT(L,O) ((L).options &= ~(O)) /* --- string --- */ -#define LASCIIZ(s) {LSTR(s)ÝLLEN(s)¨ = '\0';} +#define LASCIIZ(s) {LSTR(s)[LLEN(s)] = '\0';} #define LZEROSTR(s) {(s).len=0; (s).type=LSTRING_TY;} #define LISNULL(s) (!(s).pstr) @@ -147,8 +147,8 @@ typedef Lstr *PLstr; #define LWSCPY Lscpy /* --- word --- */ -#define LSKIPBLANKS(S,P) {while (((P)" + say "syntax: [rx.exe] banner.r " say "author: Bill N. Vlachoudis 1989" exit end @@ -65,7 +65,7 @@ a = C2D("y");b = "Z0B04040303000602040200060204020006020302000602020200060201020 a = C2D("z");b = "Z0B0508000502020300050103020008020007020006020005020401000403020200030800Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("¿");b = "Z01070200070200070200070200070200070200070200070200070200070200070200070200070900Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("Ð");b = "Z0D070900070200070200070200070200070200070200070200070200070200070200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) -a = C2D("Ý");b = "Z07080700080700070200070200060200060200050200050200050200040200040200030200030200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) +a = C2D("[");b = "Z07080700080700070200070200060200060200050200050200050200040200040200030200030200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("Þ");b = "Z070504000605000705000904000A04000A04000805000605000504000304000100030A00020A00Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("®");b = "Z0B060500050700040900040900050700060500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("^");b = "Z050606000502040200040206020004020602000402060200040206020004020502000502030200060500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) @@ -79,7 +79,7 @@ a = C2D("½");b = "Z050706000602040200050206020006020402000508000403040300040206 a = C2D("¾");b = "Z50706000503030300050205020005020502000503030300060700090300080300070300Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("]");b = "Z01070200070200070200070200070200070200070200070200070200070200070200070200010800Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("¯");b = "Z0D010800070200070200070200070200070200070200070200070200070200070200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) -a = C2D("¨");b = "Z070807000807000C02000C02000B02000B02000A02000A02000A0200090200090200080200080200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) +a = C2D("]");b = "Z070807000807000C02000C02000B02000B02000A02000A02000A0200090200090200080200080200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("´");b = "Z050609000D02000D02000C02000B02000A0200090200080200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("×");b = "Z0D010F00Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("{");b = "Z060A05000A0500090300090300080400080300050500050500080300080300070300070300070500070500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) diff --git a/rxlib/PRTBANNR.rexx b/rxlib/PRTBANNR.rexx index 0235bb4a..b0a3f86f 100644 --- a/rxlib/PRTBANNR.rexx +++ b/rxlib/PRTBANNR.rexx @@ -2,7 +2,7 @@ PRTBANNR: Procedure parse arg msg,width,prtchar if msg = '' then do /* - say "syntax: Ýrx.exe¨ banner.r " + say "syntax: [rx.exe] banner.r " say "author: Bill N. Vlachoudis 1989" */ return @@ -71,7 +71,7 @@ a = C2D("y");b = "Z0B04040303000602040200060204020006020302000602020200060201020 a = C2D("z");b = "Z0B0508000502020300050103020008020007020006020005020401000403020200030800Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("¿");b = "Z01070200070200070200070200070200070200070200070200070200070200070200070200070900Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("Ð");b = "Z0D070900070200070200070200070200070200070200070200070200070200070200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) -a = C2D("Ý");b = "Z07080700080700070200070200060200060200050200050200050200040200040200030200030200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) +a = C2D("[");b = "Z07080700080700070200070200060200060200050200050200050200040200040200030200030200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("Þ");b = "Z070504000605000705000904000A04000A04000805000605000504000304000100030A00020A00Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("®");b = "Z0B060500050700040900040900050700060500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("^");b = "Z050606000502040200040206020004020602000402060200040206020004020502000502030200060500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) @@ -85,7 +85,7 @@ a = C2D("½");b = "Z050706000602040200050206020006020402000508000403040300040206 a = C2D("¾");b = "Z50706000503030300050205020005020502000503030300060700090300080300070300Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("]");b = "Z01070200070200070200070200070200070200070200070200070200070200070200070200010800Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("¯");b = "Z0D010800070200070200070200070200070200070200070200070200070200070200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) -a = C2D("¨");b = "Z070807000807000C02000C02000B02000B02000A02000A02000A0200090200090200080200080200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) +a = C2D("]");b = "Z070807000807000C02000C02000B02000B02000A02000A02000A0200090200090200080200080200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("´");b = "Z050609000D02000D02000C02000B02000A0200090200080200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("×");b = "Z0D010F00Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("{");b = "Z060A05000A0500090300090300080400080300050500050500080300080300070300070300070500070500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) diff --git a/rxlib/QUOTE.rexx b/rxlib/QUOTE.rexx index 9533cc2b..9a3111e2 100644 --- a/rxlib/QUOTE.rexx +++ b/rxlib/QUOTE.rexx @@ -15,6 +15,6 @@ if qtype="" then return "'"ustr"'" if qtype="'" then return "'"ustr"'" if qtype='"' then return '"'ustr'"' if qtype='(' then return '('ustr')' -if qtype='Ý' then return 'Ý'ustr'¨' +if qtype='[' then return '['ustr']' if qtype='<' then return '<'ustr'>' return "'"ustr"'" diff --git a/rxlib/STEMPUT.rexx b/rxlib/STEMPUT.rexx index 05c9812b..665e2c09 100644 --- a/rxlib/STEMPUT.rexx +++ b/rxlib/STEMPUT.rexx @@ -1,6 +1,6 @@ /* --------------------------------------------------------------------- * STEMPUT save one or several stems to a dataset - * rc=STEMPUT(dataset-name,stem1Ý,stem2¨Ý...¨Ý,stemn¨ + * rc=STEMPUT(dataset-name,stem1[,stem2][...][,stemn] * dataset-name must be fully qualified * stemi stem-name must have trailing period sign * rc 0 stem has been successfuly exported to dsn diff --git a/rxlib/UNQUOTE.rexx b/rxlib/UNQUOTE.rexx index 3510837c..849d1d4a 100644 --- a/rxlib/UNQUOTE.rexx +++ b/rxlib/UNQUOTE.rexx @@ -18,6 +18,6 @@ if _f='"' & _l='"' then _u=1 else if _f="'" & _l="'" then _u=1 else if _f='(' & _l=')' then _u=1 else if _f='<' & _l=">" then _u=1 -else if _f='Ý' & _l="¨" then _u=1 +else if _f='[' & _l="]" then _u=1 if _u=1 then return substr(unq,2,_n-2) return unq diff --git a/samples/ALLCHARS.rexx b/samples/ALLCHARS.rexx index 33c2b413..3e0a0611 100644 --- a/samples/ALLCHARS.rexx +++ b/samples/ALLCHARS.rexx @@ -13,7 +13,7 @@ call banner "^£²·©Õ¶´½¾" call banner "±¿Ð]¯×ôöÔÖ" call banner "€®+-Æ*¬=¥%" call banner "¢$@§&.,;:?" -call banner "(|)<>ݨ{}!" +call banner "(|)<>[]{}!" call banner "'ðÞ/\_#" || '"' say "ABCDEFGH" say "IJKLMNOPQ" @@ -26,5 +26,5 @@ say "^£²·©Õ¶´½¾" say "±¿Ð]¯×ôöÔÖ" say "€®+-Æ*¬=¥%" say "¢$@§&.,;:?" -say "(|)<>ݨ{}!" +say "(|)<>[]{}!" say "'ðÞ/\_#" || '"' diff --git a/samples/BANNER.rexx b/samples/BANNER.rexx index d2a43410..acd3dbb1 100644 --- a/samples/BANNER.rexx +++ b/samples/BANNER.rexx @@ -1,6 +1,6 @@ parse arg msg if msg = '' then do - say "syntax: Ýrx.exe¨ banner.r " + say "syntax: [rx.exe] banner.r " say "author: Bill N. Vlachoudis 1989" exit end @@ -64,7 +64,7 @@ a = C2D("y");b = "Z0B04040303000602040200060204020006020302000602020200060201020 a = C2D("z");b = "Z0B0508000502020300050103020008020007020006020005020401000403020200030800Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("¿");b = "Z01070200070200070200070200070200070200070200070200070200070200070200070200070900Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("Ð");b = "Z0D070900070200070200070200070200070200070200070200070200070200070200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) -a = C2D("Ý");b = "Z07080700080700070200070200060200060200050200050200050200040200040200030200030200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) +a = C2D("[");b = "Z07080700080700070200070200060200060200050200050200050200040200040200030200030200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("Þ");b = "Z070504000605000705000904000A04000A04000805000605000504000304000100030A00020A00Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("®");b = "Z0B060500050700040900040900050700060500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("^");b = "Z050606000502040200040206020004020602000402060200040206020004020502000502030200060500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) @@ -78,7 +78,7 @@ a = C2D("½");b = "Z050706000602040200050206020006020402000508000403040300040206 a = C2D("¾");b = "Z50706000503030300050205020005020502000503030300060700090300080300070300Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("]");b = "Z01070200070200070200070200070200070200070200070200070200070200070200070200010800Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("¯");b = "Z0D010800070200070200070200070200070200070200070200070200070200070200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) -a = C2D("¨");b = "Z070807000807000C02000C02000B02000B02000A02000A02000A0200090200090200080200080200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) +a = C2D("]");b = "Z070807000807000C02000C02000B02000B02000A02000A02000A0200090200090200080200080200020700020700Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("´");b = "Z050609000D02000D02000C02000B02000A0200090200080200070200Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("×");b = "Z0D010F00Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) a = C2D("{");b = "Z060A05000A0500090300090300080400080300050500050500080300080300070300070300070500070500Z";Char.a = X2C(SUBSTR(b,2,length(b)-2)) diff --git a/src/address.c b/src/address.c index 8a5242b6..db3d0fbb 100644 --- a/src/address.c +++ b/src/address.c @@ -72,8 +72,8 @@ chkcmd4stack(PLstr cmd, int *in, int *out ) if (!MEMCMP(LSTR(Ucmd)+LLEN(Ucmd)-4,"FIFO",4)) *out = FIFO; if (!MEMCMP(LSTR(Ucmd)+LLEN(Ucmd)-4,"LIFO",4)) *out = LIFO; if (*out) - if (LSTR(Ucmd)ÝLLEN(Ucmd)-((*out==STACK)?6:5)¨!='(' && - LSTR(Ucmd)ÝLLEN(Ucmd)-((*out==STACK)?6:5)¨!='>') *out = 0; + if (LSTR(Ucmd)[LLEN(Ucmd)-((*out==STACK)?6:5)]!='(' && + LSTR(Ucmd)[LLEN(Ucmd)-((*out==STACK)?6:5)]!='>') *out = 0; LFREESTR(Ucmd); if (*in) { @@ -91,7 +91,7 @@ chkcmd4stack(PLstr cmd, int *in, int *out ) int __CDECL RxRedirectCmd(PLstr cmd, int in, int out, PLstr outputstr, PLstr env) { - char fninÝ45¨, fnoutÝ45¨; + char fnin[45], fnout[45]; int old_stdin=0, old_stdout=0; int filein, fileout; FILE *f; @@ -169,7 +169,7 @@ RxRedirectCmd(PLstr cmd, int in, int out, PLstr outputstr, PLstr env) if (outputstr) { Lread(f,outputstr,LREADFILE); #ifdef RMLAST - if (LSTR(*outputstr)ÝLLEN(*outputstr)-1¨=='\n') + if (LSTR(*outputstr)[LLEN(*outputstr)-1]=='\n') LLEN(*outputstr)--; #endif } else /* push it to stack */ @@ -230,14 +230,14 @@ RxExecuteCmd( PLstr cmd, PLstr env ) LFREESTR(cmdN) RxSetSpecialVar(RCVAR,rxReturnCode); - if (rxReturnCode && !(_procÝ_rx_proc¨.trace & off_trace)) { - if (_procÝ_rx_proc¨.trace & (error_trace | normal_trace)) { + if (rxReturnCode && !(_proc[_rx_proc].trace & off_trace)) { + if (_proc[_rx_proc].trace & (error_trace | normal_trace)) { TraceCurline(NULL,TRUE); fprintf(STDERR," +++ RC(%d) +++\n",rxReturnCode); - if (_procÝ_rx_proc¨.interactive_trace) + if (_proc[_rx_proc].interactive_trace) TraceInteractive(FALSE); } - if (_procÝ_rx_proc¨.condition & SC_ERROR) + if (_proc[_rx_proc].condition & SC_ERROR) RxSignalCondition(SC_ERROR); } } diff --git a/src/b2x.c b/src/b2x.c index a9a8232c..39a91f01 100644 --- a/src/b2x.c +++ b/src/b2x.c @@ -37,17 +37,17 @@ Lb2x( const PLstr to, const PLstr from ) c = LSTR(*to); for (i=j=k=0; i'1') + if (ISSPACE(LSTR(*to)[i])) continue; + if (LSTR(*to)[i]<'0' || LSTR(*to)[i]>'1') Lerror(ERR_INVALID_HEX_CONST,0); - j |= ((LSTR(*to)Ýi¨=='1')&1) << k; + j |= ((LSTR(*to)[i]=='1')&1) << k; if (++k==4) { - *c++ = chexÝj¨; + *c++ = chex[j]; j=k=0; } } - if (k) *c++ = chexÝj¨; + if (k) *c++ = chex[j]; *c = 0; LLEN(*to) = STRLEN(LSTR(*to)); LTYPE(*to) = LSTRING_TY; diff --git a/src/bintree.c b/src/bintree.c index d2de9243..32639ca0 100644 --- a/src/bintree.c +++ b/src/bintree.c @@ -429,7 +429,7 @@ BinPrintStemV(PBinLeaf leaf ) // One by one print successors while (ptr != NULL) { - printf(">Ý%04d¨ \"|.%s\" => ", ++i, LSTR (ptr->key)); + printf(">[%04d] \"|.%s\" => ", ++i, LSTR (ptr->key)); if (ptr->value) { switch (LTYPE(*(Lstr *)ptr->value)) { case LINTEGER_TY: @@ -439,7 +439,7 @@ BinPrintStemV(PBinLeaf leaf ) printf("\"%f\" \n",LREAL(*(PLstr) ptr->value)); break; case LSTRING_TY: - LSTR(*(PLstr)ptr->value)ÝLLEN(*(PLstr)ptr->value)¨=NULL; + LSTR(*(PLstr)ptr->value)[LLEN(*(PLstr)ptr->value)]=NULL; printf("\"%s\" \n",LSTR (*(PLstr) ptr->value)); break; } @@ -472,7 +472,7 @@ BinPrint(PBinLeaf leaf, PLstr filter) continue; } } - printf("Ý%04d¨ \"%s\" => ", ++i, LSTR (ptr->key)); + printf("[%04d] \"%s\" => ", ++i, LSTR (ptr->key)); if (ptr->value) { Variable *var = (Variable *)ptr->value; if (var->stem) { @@ -487,7 +487,7 @@ BinPrint(PBinLeaf leaf, PLstr filter) printf("\"%f\" \n",LREAL(*(PLstr) ptr->value)); break; case LSTRING_TY: - LSTR(*(PLstr)ptr->value)ÝLLEN(*(PLstr)ptr->value)¨=NULL; + LSTR(*(PLstr)ptr->value)[LLEN(*(PLstr)ptr->value)]=NULL; printf("\"%s\" \n",LSTR (*(PLstr) ptr->value)); break; } @@ -505,12 +505,12 @@ int _RemoveDot(const PLstr to, const PLstr from) { L2STR(from); slen=LLEN(*from); for (ki = 0 ; ki < slen; ki++) { - if (LSTR(*from)Ýki¨ !='.') LSTR(*to)Ýki¨ = LSTR(*from)Ýki¨; - else LSTR(*to)Ýki¨ =' '; + if (LSTR(*from)[ki] !='.') LSTR(*to)[ki] = LSTR(*from)[ki]; + else LSTR(*to)[ki] =' '; } LTYPE(*to) = LSTRING_TY; for (ki = slen-1 ; ki >=0; ki--) { - if (LSTR(*to)Ýki¨ !=' ') break; + if (LSTR(*to)[ki] !=' ') break; } LLEN(*to) = ki+1; return ki+1; @@ -572,7 +572,7 @@ BinVarDumpV(PLstr result,PLstr stem,PBinLeaf leaf ,PLstr filter2,PLstr filter3, L2STR(&stvalue); Lcat(result, "=\""); - LSTR(stvalue)ÝLLEN(stvalue)¨=NULL; + LSTR(stvalue)[LLEN(stvalue)]=NULL; Lcat(result, LSTR(stvalue)); Lcat(result, "\"\n"); found=found+1; @@ -629,11 +629,11 @@ BinVarDump(PLstr result, PBinLeaf leaf, PLstr filter, int mode) if (words >= 4) Lword(&filter4, filter, 4); if (words >= 5) Lword(&filter5, filter, 5); } - if (LLEN(filter1)>0 && LSTR(filter1)Ý0¨=='*') LLEN(filter1)=0; - if (LLEN(filter2)>0 && LSTR(filter2)Ý0¨=='*') LLEN(filter2)=0; - if (LLEN(filter3)>0 && LSTR(filter3)Ý0¨=='*') LLEN(filter3)=0; - if (LLEN(filter4)>0 && LSTR(filter4)Ý0¨=='*') LLEN(filter4)=0; - if (LLEN(filter5)>0 && LSTR(filter5)Ý0¨=='*') LLEN(filter5)=0; + if (LLEN(filter1)>0 && LSTR(filter1)[0]=='*') LLEN(filter1)=0; + if (LLEN(filter2)>0 && LSTR(filter2)[0]=='*') LLEN(filter2)=0; + if (LLEN(filter3)>0 && LSTR(filter3)[0]=='*') LLEN(filter3)=0; + if (LLEN(filter4)>0 && LSTR(filter4)[0]=='*') LLEN(filter4)=0; + if (LLEN(filter5)>0 && LSTR(filter5)[0]=='*') LLEN(filter5)=0; } // One by one print successors @@ -661,7 +661,7 @@ BinVarDump(PLstr result, PBinLeaf leaf, PLstr filter, int mode) L2STR((PLstr) ptr->value); Lcat(result, "=\""); vlen=LLEN(*(PLstr) ptr->value); - LSTR(*(PLstr)ptr->value)Ývlen¨=NULL; + LSTR(*(PLstr)ptr->value)[vlen]=NULL; Lcat(result, LSTR(*(PLstr) ptr->value)); Lcat(result, "\"\n"); found=found+1; diff --git a/src/bitand.c b/src/bitand.c index 0f7d2c97..5e478822 100644 --- a/src/bitand.c +++ b/src/bitand.c @@ -30,19 +30,19 @@ Lbitand( const PLstr to, const PLstr s1, const PLstr s2, if (LLEN(*s1) < LLEN(*s2)) { Lstrcpy(to,s2); for (i=0; i 12) { + if (tmp[0] == MAGIC) { + if ((void *)tmp[1] == ptr && tmp[2] > 12) { #ifdef __DEBUG__ - printf("DBG> %d BYTES OF AUXILIARY MEMORY FOUND AT %p\n", (int) (tmpÝ2¨), (void *) tmpÝ1¨); - DumpHex((void *)tmp, tmpÝ2¨ + 12); + printf("DBG> %d BYTES OF AUXILIARY MEMORY FOUND AT %p\n", (int) (tmp[2]), (void *) tmp[1]); + DumpHex((void *)tmp, tmp[2] + 12); #endif isAuxMem = TRUE; } else { @@ -124,7 +124,7 @@ typedef struct tmemory_st { // /* Some machines have problems if the address is not at 8-bytes aligned */ // int dummy; //#endif - byte dataÝsizeof(dword)¨; + byte data[sizeof(dword)]; } Memory; static Memory *mem_head = NULL; @@ -292,10 +292,10 @@ mem_print(int count, Memory *mem) count, mem->size, mem->data, mem->desc); for (i=0; i<10; i++) fprintf(STDERR,"%c", - isprint(mem->dataÝi¨)? mem->dataÝi¨: '.'); + isprint(mem->data[i])? mem->data[i]: '.'); fprintf(STDERR,"\" "); for (i=0; i<10; i++) - fprintf(STDERR,"%02X ",mem->dataÝi¨); + fprintf(STDERR,"%02X ",mem->data[i]); fprintf(STDERR,"\n"); } /* mem_print */ diff --git a/src/brexx.c b/src/brexx.c index 360c8cfc..f04470ed 100644 --- a/src/brexx.c +++ b/src/brexx.c @@ -24,13 +24,13 @@ void term(); /* --------------------- main ---------------------- */ int __CDECL -main(int ac, char *avݨ) +main(int ac, char *av[]) { - Lstr argsÝMAXARGS¨, tracestr, file; + Lstr args[MAXARGS], tracestr, file; int ia,ir,iaa,rc,staeret; bool input, loop_over_stdin, parse_args, interactive; jmp_buf b; - char sdwaÝ104¨; + char sdwa[104]; input = FALSE; loop_over_stdin = FALSE; @@ -47,7 +47,7 @@ main(int ac, char *avݨ) return rc; } - for (ia=0; ia= MAXARGS) break; } else { - Lcat(&argsÝ0¨, avÝir¨); - if (ir 48 / 0x30 psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; ectenvbk = ect + 12; // 12 * 4 = 48 @@ -327,9 +327,9 @@ void * _getmain(size_t length) { if (registers.R15 == 0) { ptr = (void *) registers.R1; - ptrÝ0¨ = 0xDEADBEAF; - ptrÝ1¨ = (((long) (ptr)) + 12); - ptrÝ2¨ = length; + ptr[0] = 0xDEADBEAF; + ptr[1] = (((long) (ptr)) + 12); + ptr[2] = length; } else { ptr = NULL; } @@ -402,7 +402,7 @@ void _tput(const char *data) { void _putchar(char character) { - lineÝlinePos¨ = character; + line[linePos] = character; linePos++; if (character == '\n') { diff --git a/src/builtin.c b/src/builtin.c index 31207878..df8c8cde 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -102,10 +102,10 @@ R_O( const int func ) switch (func) { case f_address: - if (_procÝ_rx_proc¨.env == NULL) + if (_proc[_rx_proc].env == NULL) Lstrcpy(ARGR,&(systemStr->key)); else - Lstrcpy(ARGR,_procÝ_rx_proc¨.env); + Lstrcpy(ARGR,_proc[_rx_proc].env); break; case f_desbuf: @@ -123,18 +123,18 @@ R_O( const int func ) break; case f_digits: - Licpy(ARGR,_procÝ_rx_proc¨.digits); + Licpy(ARGR,_proc[_rx_proc].digits); break; case f_form: - if (_procÝ_rx_proc¨.form==SCIENTIFIC) + if (_proc[_rx_proc].form==SCIENTIFIC) Lscpy(ARGR,"SCIENTIFIC"); else Lscpy(ARGR,"ENGINEERING"); break; case f_fuzz: - Licpy(ARGR,_procÝ_rx_proc¨.fuzz); + Licpy(ARGR,_proc[_rx_proc].fuzz); break; case f_makebuf: @@ -174,7 +174,7 @@ R_C( const int func ) Lerror(ERR_INCORRECT_CALL,0); if (exist(1)) { L2STR(ARG1); - option = l2uÝ(byte)LSTR(*ARG1)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG1)[0]]; } switch (func) { @@ -188,18 +188,18 @@ R_C( const int func ) case f_trace: i = 0; - if (_procÝ_rx_proc¨.interactive_trace) - LSTR(*ARGR)Ýi++¨ = '?'; - switch (_procÝ_rx_proc¨.trace) { - case all_trace: LSTR(*ARGR)Ýi++¨ = 'A'; break; - case commands_trace: LSTR(*ARGR)Ýi++¨ = 'C'; break; - case error_trace: LSTR(*ARGR)Ýi++¨ = 'E'; break; - case intermediates_trace:LSTR(*ARGR)Ýi++¨= 'I'; break; - case labels_trace: LSTR(*ARGR)Ýi++¨ = 'L'; break; - case normal_trace: LSTR(*ARGR)Ýi++¨ = 'N'; break; - case off_trace: LSTR(*ARGR)Ýi++¨ = 'O'; break; - case results_trace: LSTR(*ARGR)Ýi++¨ = 'R'; break; - case scan_trace: LSTR(*ARGR)Ýi++¨ = 'S'; break; + if (_proc[_rx_proc].interactive_trace) + LSTR(*ARGR)[i++] = '?'; + switch (_proc[_rx_proc].trace) { + case all_trace: LSTR(*ARGR)[i++] = 'A'; break; + case commands_trace: LSTR(*ARGR)[i++] = 'C'; break; + case error_trace: LSTR(*ARGR)[i++] = 'E'; break; + case intermediates_trace:LSTR(*ARGR)[i++]= 'I'; break; + case labels_trace: LSTR(*ARGR)[i++] = 'L'; break; + case normal_trace: LSTR(*ARGR)[i++] = 'N'; break; + case off_trace: LSTR(*ARGR)[i++] = 'O'; break; + case results_trace: LSTR(*ARGR)[i++] = 'R'; break; + case scan_trace: LSTR(*ARGR)[i++] = 'S'; break; } LTYPE(*ARGR) = LSTRING_TY; LLEN(*ARGR) = i; @@ -262,7 +262,7 @@ R_oSoS( ) if (ARGN==2) { L2STR(ARG2); - switch (LSTR(*ARG2)Ý0¨) { + switch (LSTR(*ARG2)[0]) { case 'D': case 'd': option = RVT_DEPTH; @@ -276,16 +276,16 @@ R_oSoS( ) LZEROSTR(*ARGR); if (ARG1==NULL) - RxReadVarTree(ARGR,_procÝ_rx_proc¨.scope,NULL,option); + RxReadVarTree(ARGR,_proc[_rx_proc].scope,NULL,option); else { if (Ldatatype(ARG1,'S')==0) return; LINITSTR(str); Lstrcpy(&str,ARG1); Lupper(&str); LASCIIZ(str); #ifdef JCC - leaf = (PBinLeaf) RxVarFindName(_procÝ_rx_proc¨.scope,&str,&found); + leaf = (PBinLeaf) RxVarFindName(_proc[_rx_proc].scope,&str,&found); #else - leaf = RxVarFindName(_procÝ_rx_proc¨.scope,&str,&found); + leaf = RxVarFindName(_proc[_rx_proc].scope,&str,&found); #endif if (found == 0) return; var = (Variable*)(leaf->value); @@ -298,7 +298,7 @@ R_oSoS( ) } /* R_oSoS */ /* -------------------------------------------------------------- */ -/* ADDR(symbolÝ,Ýoption¨Ý,Ýpool¨¨¨) */ +/* ADDR(symbol[,[option][,[pool]]]) */ /* Returns the normalised address of the variable 'symbol' */ /* in the pool 'pool' (if exist) */ /* Option can be: */ @@ -307,7 +307,7 @@ R_oSoS( ) /* 'Variable' the address of variable structure */ /* (valid only for rexx pools) */ /* -------------------------------------------------------------- */ -/* VALUE(nameÝ,Ýnewvalue¨Ý,Ýpool¨¨¨) */ +/* VALUE(name[,[newvalue][,[pool]]]) */ /* Return the value of variable 'name' */ /* if 'newvalue' exists then it sets this value to the var 'name */ /* if 'pool' exist then the function is performed on this */ @@ -335,7 +335,7 @@ R_SoSoS( int func ) if (exist(2)) { L2STR(ARG2); - opt = l2uÝ(byte)LSTR(*ARG2)Ý0¨¨; + opt = l2u[(byte)LSTR(*ARG2)[0]]; } if (exist(3)) { @@ -346,9 +346,9 @@ R_SoSoS( int func ) poolnum = _rx_proc; #ifdef JCC - leaf = (PBinLeaf) RxVarFindName(_procÝpoolnum¨.scope,&str,&found); + leaf = (PBinLeaf) RxVarFindName(_proc[poolnum].scope,&str,&found); #else - leaf = RxVarFindName(_procÝpoolnum¨.scope,&str,&found); + leaf = RxVarFindName(_proc[poolnum].scope,&str,&found); #endif LFREESTR(str); if (!found) { @@ -409,14 +409,14 @@ R_SoSoS( int func ) } /* SoSoS */ /* -------------------------------------------------------------- */ -/* ARG(ÝnÝ,option¨¨) */ +/* ARG([n[,option]]) */ /* -------------------------------------------------------------- */ void __CDECL R_arg( ) { int a; - RxProc *pr = &(_procÝ_rx_proc¨); + RxProc *pr = &(_proc[_rx_proc]); switch (ARGN) { case 0: @@ -427,9 +427,9 @@ R_arg( ) a = (int)Lrdint(ARG1); if (!IN_RANGE(1,a,MAXARGS)) Lerror(ERR_INCORRECT_CALL,0); - if (pr->arg.aÝa-1¨ != NULL) + if (pr->arg.a[a-1] != NULL) Lstrcpy(ARGR, - pr->arg.aÝa-1¨); + pr->arg.a[a-1]); else LZEROSTR(*ARGR); break; @@ -440,13 +440,13 @@ R_arg( ) Lerror(ERR_INCORRECT_CALL,0); L2STR(ARG2); - if (l2uÝ(byte)LSTR(*ARG2)Ý0¨¨ == 'E') + if (l2u[(byte)LSTR(*ARG2)[0]] == 'E') Licpy(ARGR, - pr->arg.aÝa-1¨ != NULL); + pr->arg.a[a-1] != NULL); else - if (l2uÝ(byte)LSTR(*ARG2)Ý0¨¨ == 'O') + if (l2u[(byte)LSTR(*ARG2)[0]] == 'O') Licpy(ARGR, - pr->arg.aÝa-1¨ == NULL); + pr->arg.a[a-1] == NULL); else Lerror(ERR_INCORRECT_CALL,0); break; @@ -471,7 +471,7 @@ R_datatype( ) L2STR(ARG2); if (!LLEN(*ARG2)) Lerror(ERR_INCORRECT_CALL,0); - type = l2uÝ(byte)LSTR(*ARG2)Ý0¨¨; + type = l2u[(byte)LSTR(*ARG2)[0]]; } else { Lscpy( ARGR, ((LTYPE(*ARG1)==LSTRING_TY && @@ -544,16 +544,16 @@ R_errortext( ) void __CDECL R_intr( ) { - static char *s_regݨ = { + static char *s_reg[] = { "AX=","BX=","CX=","DX=", "BP=","SI=","DI=", "DS=","ES=","FLAGS=" }; - static char flags_strݨ="C-P-A-ZSTIDO"; + static char flags_str[]="C-P-A-ZSTIDO"; Lstr str; int i,intno; union { struct REGPACK regpack; - unsigned regarrayÝ10¨; + unsigned regarray[10]; } reg; char *s; @@ -574,10 +574,10 @@ R_intr( ) LASCIIZ(str); MEMSET(&(reg.regpack),0,sizeof(reg.regpack)); for (i=0; i<10; i++) { - s=strstr(LSTR(str),s_regÝi¨); + s=strstr(LSTR(str),s_reg[i]); if (s!=NULL) { s+=3; - sscanf(s,"%X",®.regarrayÝi¨); + sscanf(s,"%X",®.regarray[i]); } } @@ -586,13 +586,13 @@ R_intr( ) LTYPE(*ARGR) = LSTRING_TY; s=LSTR(*ARGR); *s='\0'; for (i=0; i<9; i++) { - sprintf(s,"%s%04X ",s_regÝi¨,reg.regarrayÝi¨); + sprintf(s,"%s%04X ",s_reg[i],reg.regarray[i]); s += STRLEN(s); } - STRCAT(s,s_regÝ9¨); s += STRLEN(s); + STRCAT(s,s_reg[9]); s += STRLEN(s); for (i=0; i<12; i++, reg.regpack.r_flags >>= 1) if (reg.regpack.r_flags & 0x1) - *s++ = flags_strÝi¨; + *s++ = flags_str[i]; *s = '\0'; LLEN(*ARGR) = STRLEN(LSTR(*ARGR))-1; @@ -625,7 +625,7 @@ R_port( ) #endif /* -------------------------------------------------------------- */ -/* MAX(numberÝ,number¨..¨) */ +/* MAX(number[,number]..]) */ /* -------------------------------------------------------------- */ void __CDECL R_max( ) @@ -636,17 +636,17 @@ R_max( ) if (!ARGN) Lerror(ERR_INCORRECT_CALL,0); i = 0; - while ((ir) { @@ -654,16 +654,16 @@ R_max( ) curindx=i; } } - if (Ldatatype(rxArg.aÝcurindx¨,'W')==1) { - L2INT(rxArg.aÝcurindx¨); - Licpy(ARGR,LINT(*rxArg.aÝcurindx¨)); + if (Ldatatype(rxArg.a[curindx],'W')==1) { + L2INT(rxArg.a[curindx]); + Licpy(ARGR,LINT(*rxArg.a[curindx])); }else { Lrcpy(ARGR, r); } } /* R_max */ /* -------------------------------------------------------------- */ -/* MIN(numberÝ,number¨..¨) */ +/* MIN(number[,number]..]) */ /* -------------------------------------------------------------- */ void __CDECL R_min( ) @@ -675,16 +675,16 @@ R_min( ) Lerror(ERR_INCORRECT_CALL,0); i = 0; - while ((i=CompileClauseÝi¨.line) { + rxf = CompileClause[0].fptr; + while (rxf==CompileClause[i].fptr + && CompileClause[i+1].line>=CompileClause[i].line) { i++; - l = CompileClauseÝi¨.line; + l = CompileClause[i].line; } i--; - l = CompileClauseÝi¨.line; - c = CompileClauseÝi¨.ptr; + l = CompileClause[i].line; + c = CompileClause[i].ptr; while (*c) if (*c++=='\n') l++; l-=2; /* remove the last two new lines */ Licpy(ARGR,l); } else { if (l>1) { - rxf = CompileClauseÝ0¨.fptr; - for (i=0; rxf==CompileClauseÝi¨.fptr - && CompileClauseÝi+1¨.line>=CompileClauseÝi¨.line; i++) { - if (CompileClauseÝi¨.line==l) { - c = CompileClauseÝi¨.ptr; + rxf = CompileClause[0].fptr; + for (i=0; rxf==CompileClause[i].fptr + && CompileClause[i+1].line>=CompileClause[i].line; i++) { + if (CompileClause[i].line==l) { + c = CompileClause[i].ptr; while (*c!='\n') c--; c++; goto linefound; } else - if (CompileClauseÝi¨.line>l) { + if (CompileClause[i].line>l) { if (i>0) { i--; - c = CompileClauseÝi¨.ptr; - sl = CompileClauseÝi¨.line; + c = CompileClause[i].ptr; + sl = CompileClause[i].line; } else { c = LSTR(rxf->file); sl = 1; @@ -867,7 +867,7 @@ R_sourceline( ) /* try to search inside a commend, if exists any at the end of the program */ i--; - sl=CompileClauseÝi¨.line; c = CompileClauseÝi¨.ptr; + sl=CompileClause[i].line; c = CompileClause[i].ptr; while (*c && l>sl) { if (*c=='\n') sl++; c++; @@ -876,7 +876,7 @@ R_sourceline( ) LZEROSTR(*ARGR); return; } else - c = LSTR((CompileClauseÝ0¨.fptr)->file); + c = LSTR((CompileClause[0].fptr)->file); linefound: for (co=c; *co!='\n'; co++) /* do nothing */;; l = (char huge *)co - (char huge *)c; diff --git a/src/c2d.c b/src/c2d.c index cc77bff9..641e45ad 100644 --- a/src/c2d.c +++ b/src/c2d.c @@ -37,14 +37,14 @@ Lc2d( const PLstr to, const PLstr from, long n ) Lreverse(to); if (n <= LLEN(*to) ) - negative = LSTR(*to)Ýn-1¨ & 0x80; /* msb = 1 */ + negative = LSTR(*to)[n-1] & 0x80; /* msb = 1 */ else negative = FALSE; n = MIN(n,LLEN(*from)); num = 0; for (i=n-1; i>=0; i--) - num = (num << 8) | ((byte)(LSTR(*to)Ýi¨) & 0xFF); + num = (num << 8) | ((byte)(LSTR(*to)[i]) & 0xFF); if (negative) { if (n==sizeof(long)) num = -(~num + 1); diff --git a/src/c2x.c b/src/c2x.c index 02af3860..c58da1f4 100644 --- a/src/c2x.c +++ b/src/c2x.c @@ -33,8 +33,8 @@ Lc2x( const PLstr to, const PLstr from ) re = LSTR(*to); ar = LSTR(*from); for (i=0,r=0; i> 4) & 0x0F¨; - reÝr++¨ = chexÝarÝi¨ & 0x0F¨; + re[r++] = chex[(ar[i] >> 4) & 0x0F]; + re[r++] = chex[ar[i] & 0x0F]; } LTYPE(*to) = LSTRING_TY; LLEN(*to) = r; diff --git a/src/compare.c b/src/compare.c index ae402188..628c8269 100644 --- a/src/compare.c +++ b/src/compare.c @@ -19,7 +19,7 @@ /* ------------------- Lcompare --------------------- * * compares the two strings and returns the position * - * of the non matching character Ý1,largest length¨ * + * of the non matching character [1,largest length] * * returns 0 if strings are equal * * -------------------------------------------------- */ long __CDECL @@ -39,9 +39,9 @@ Lcompare( const PLstr A, const PLstr B, const char pad ) b = A; } for (i=0; ileafÝ0¨ = _Add2Lits(&aux,FALSE); + inf->leaf[0] = _Add2Lits(&aux,FALSE); stop = hasdot+1; /* after the dot */ ch = LSTR(newstr)+hasdot; i = 1; while (1) { while (*ch=='.') { - inf->leafÝi++¨ = NULL; + inf->leaf[i++] = NULL; ch++; stop++; } if (!*ch) { - inf->leafÝi++¨ = NULL; + inf->leaf[i++] = NULL; break; } @@ -424,7 +424,7 @@ _Add2Lits( PLstr lit, int hasdot ) ch++; stop++; } _Lsubstr(&aux,&newstr,start,stop-start); - inf->leafÝi++¨ = _Add2Lits(&aux,FALSE); + inf->leaf[i++] = _Add2Lits(&aux,FALSE); if (!*ch) break; if (*ch=='.') { ch++; stop++; @@ -434,7 +434,7 @@ _Add2Lits( PLstr lit, int hasdot ) } else { inf = (IdentInfo*)MALLOC(sizeof(IdentInfo),"ID_INFO"); inf->stem = 0; - inf->leafÝ0¨ = NULL; + inf->leaf[0] = NULL; } inf->id = NO_CACHE; } else @@ -519,7 +519,7 @@ C_error(void) } /* C_error */ /* -------------------------------------------------------------- */ -/* ADDRESS Ý Ýexpr¨¨ ; */ +/* ADDRESS [ [expr]] ; */ /* redirect commands or a single command to a new */ /* environment. ADDRESS VALUE expr may be used */ /* for an evaluated enviroment name. */ @@ -589,7 +589,7 @@ C_arg( void ) } /* C_arg */ /* -------------------------------------------------------------- */ -/* CALL Ýsymbol | string¨ ݨ Ý,¨... ; */ +/* CALL [symbol | string] [] [,]... ; */ /* call an internal routine, an external routine or program, */ /* or a built-in function. Depending on the type of */ /* routine called, the variable RESULT contains the result */ @@ -671,11 +671,11 @@ C_call( void ) } /* C_call */ /* -------------------------------------------------------------- */ -/* DO Ý Ýname=expri ÝTO exprt¨ ÝBY exprb¨ */ -/* ÝFOR exprf¨¨ | Ý FOREVER | exprr ¨ */ -/* ÝUNTIL expru | WHILE exprw¨ ; */ -/* Ýinstr¨... ; */ -/* END Ýsymbol¨ ; */ +/* DO [ [name=expri [TO exprt] [BY exprb] */ +/* [FOR exprf]] | [ FOREVER | exprr ] */ +/* [UNTIL expru | WHILE exprw] ; */ +/* [instr]... ; */ +/* END [symbol] ; */ /* group instructions together with optional repetition and */ /* condition. NAME is stepped from EXPRI to EXPRT in */ /* steps of EXPRB, for a maximum of EXPRF iterations. */ @@ -921,7 +921,7 @@ C_do(void) } /* C_do */ /* -------------------------------------------------------------- */ -/* DROP name Ýname¨... ; */ +/* DROP name [name]... ; */ /* drop (reset) the named variables or group of variables. */ /* */ /* *** if an exposed variable is named, the variable itself */ @@ -955,7 +955,7 @@ C_drop(void) } /* C_drop */ /* -------------------------------------------------------------- */ -/* EXIT Ýexpr¨ ; */ +/* EXIT [expr] ; */ /* leave the program (with return data, EXPR). EXIT is */ /* the same as RETURN except that all internal routines */ /* are terminated */ @@ -973,8 +973,8 @@ C_exit(void) } /* C_exit */ /* -------------------------------------------------------------- */ -/* IF expr Ý;¨ THEN Ý;¨ instr ; */ -/* ÝELSE Ý;¨ instr¨; */ +/* IF expr [;] THEN [;] instr ; */ +/* [ELSE [;] instr]; */ /* if EXPR evaluates to "1", execute the instruction */ /* following the THEN. Otherwise, (EXPR evaluates to */ /* "0") skip that instruction and execute the one */ @@ -1034,7 +1034,7 @@ C_interpret(void) } /* C_interpret */ /* -------------------------------------------------------------- */ -/* ITERATE Ýname|num¨ ; */ +/* ITERATE [name|num] ; */ /* start next iteration of the innermost repetitive loop */ /* (or loop with control variable name). */ /* -------------------------------------------------------------- */ @@ -1075,7 +1075,7 @@ C_iterate(void) } /* C_iterate */ /* -------------------------------------------------------------- */ -/* LEAVE Ýname|num¨ ; */ +/* LEAVE [name|num] ; */ /* terminate innermost loop (or loop with control */ /* variable name). */ /* -------------------------------------------------------------- */ @@ -1116,7 +1116,7 @@ C_leave(void) } /* C_leave */ /* -------------------------------------------------------------- */ -/* LOWER name Ýname¨... ; */ +/* LOWER name [name]... ; */ /* translate the values of the specified individual */ /* variables to uppercase. */ /* -------------------------------------------------------------- */ @@ -1147,9 +1147,9 @@ C_nop(void) } /* C_nop */ /* -------------------------------------------------------------- */ -/* NUMERIC DIGITS Ýexpr¨ | */ -/* FORM ÝSCIENTIFIC | ENGINEERING¨ | */ -/* FUZZ Ýexpr¨ ; */ +/* NUMERIC DIGITS [expr] | */ +/* FORM [SCIENTIFIC | ENGINEERING] | */ +/* FUZZ [expr] ; */ /* o DIGITS, carry out arithmetic operations to EXPR */ /* significant digits. */ /* o FORM, set new exponential format. */ @@ -1194,14 +1194,14 @@ C_numeric(void) } /* C_numeric */ /* -------------------------------------------------------------- */ -/* PARSE ÝUPPER¨ + ARG | Ýtemplate¨ ; */ +/* PARSE [UPPER] + ARG | [template] ; */ /* | AUTHOR | */ /* | EXTERNAL | */ /* | LINEIN | */ /* | NUMERIC | */ /* | PULL | */ /* | SOURCE | */ -/* | VALUE Ýexpr¨ WITH | */ +/* | VALUE [expr] WITH | */ /* | VAR name | */ /* + VERSION + */ /* o ARG, parses the argument string(s) to the program, */ @@ -1343,7 +1343,7 @@ C_parse(void) } /* C_parse */ /* -------------------------------------------------------------- */ -/* PROCEDURE ÝEXPOSE name|(var) Ýname|(var)¨...¨ ; */ +/* PROCEDURE [EXPOSE name|(var) [name|(var)]...] ; */ /* start a new generation of variables within an internal */ /* routine. Optionally named variables or groups of */ /* variables from an earlier generation may be exposed */ @@ -1383,7 +1383,7 @@ C_procedure(void) } /* C_procedure */ /* -------------------------------------------------------------- */ -/* PULL Ýtemplate¨ ; */ +/* PULL [template] ; */ /* read the next string from the program stack (system */ /* data queue), uppercase it, and parse it into variables. */ /* If the queue is empty, then data is read from the */ @@ -1398,7 +1398,7 @@ C_pull(void) } /* C_pull */ /* -------------------------------------------------------------- */ -/* PUSH Ýexpr¨; */ +/* PUSH [expr]; */ /* push EXPR onto head of the system queue (stack LIFO) */ /* -------------------------------------------------------------- */ static void @@ -1414,7 +1414,7 @@ C_push(void) } /* C_push */ /* -------------------------------------------------------------- */ -/* QUEUE Ýexpr¨; */ +/* QUEUE [expr]; */ /* add EXPR to the tail of the system queue (stack FIFO) */ /* -------------------------------------------------------------- */ static void @@ -1430,7 +1430,7 @@ C_queue(void) } /* C_queue */ /* -------------------------------------------------------------- */ -/* RETURN Ýexpr¨ ; */ +/* RETURN [expr] ; */ /* evaluate EXOR and then return the value to the caller. */ /* (RETURN has the same effect as EXIT if it is not in an */ /* internal routine.) */ @@ -1447,7 +1447,7 @@ C_return( void ) } /* C_return */ /* -------------------------------------------------------------- */ -/* SAY Ýexpr¨; */ +/* SAY [expr]; */ /* evaluate EXPR and then display the result on the user's */ /* console. */ /* -------------------------------------------------------------- */ @@ -1460,9 +1460,9 @@ C_say(void) /* -------------------------------------------------------------- */ /* SELECT ; */ -/* WHEN expr Ý;¨ THEN Ý;¨ inst ; */ -/* Ý WHEN expr Ý;¨ THEN Ý;¨ inst ; ¨ */ -/* Ý OTHERWISE Ý;¨ Ýinst¨... ¨; */ +/* WHEN expr [;] THEN [;] inst ; */ +/* [ WHEN expr [;] THEN [;] inst ; ] */ +/* [ OTHERWISE [;] [inst]... ]; */ /* END ; */ /* then WHEN expressions are evaluated in sequence until */ /* one results in "1". INSTR, immediately following it, is */ @@ -1546,9 +1546,9 @@ C_select(void) } /* C_select */ /* -------------------------------------------------------------- */ -/* SIGNAL Ýname¨ | */ -/* ÝVALUE¨ expr | */ -/* + ERROR + ÝNAME name¨ ; */ +/* SIGNAL [name] | */ +/* [VALUE] expr | */ +/* + ERROR + [NAME name] ; */ /* | HALT | */ /* | NOVALUE | */ /* | NOTREADY | */ @@ -1641,7 +1641,7 @@ C_signal( void) /* ______________ */ /* */ /* Or, alternatively: */ -/* TRACE Ý string ¨ ; */ +/* TRACE [ string ] ; */ /* */ /* if OPTION is numeric, then (if negative) inhibit tracing */ /* for a number of clauses, else (if positive) inhibit debug */ @@ -1689,7 +1689,7 @@ C_trace(void) } /* C_trace */ /* -------------------------------------------------------------- */ -/* UPPER name Ýname¨... ; */ +/* UPPER name [name]... ; */ /* translate the values of the specified individual */ /* variables to uppercase. */ /* -------------------------------------------------------------- */ @@ -1710,7 +1710,7 @@ C_upper(void) } /* C_upper */ /* -------------------------------------------------------------- */ -/* Ýexpr¨ ; */ +/* [expr] ; */ /* Execute a host command according to environment */ /* -------------------------------------------------------------- */ static void @@ -1723,7 +1723,7 @@ C_HostCmd( void ) } /* C_HostCmd */ /* -------------------------------------------------------------- */ -/* name = Ýexpr¨ */ +/* name = [expr] */ /* is an assignment: the variable name is set to the value */ /* of expr. */ /* -------------------------------------------------------------- */ @@ -1733,12 +1733,12 @@ C_chk4assign(void) if (*symbolptr=='=') { if (symbol==literal_sy) { /* produce an error */ - if (IN_RANGE('0',LSTR(symbolstr)Ý0¨,'9')) + if (IN_RANGE('0',LSTR(symbolstr)[0],'9')) Lerror(ERR_INVALID_START, (_Lisnum(&symbolstr)!=LSTRING_TY)?1:2, &symbolstr); else - if (LSTR(symbolstr)Ý0¨=='.') + if (LSTR(symbolstr)[0]=='.') Lerror(ERR_INVALID_START,3,&symbolstr); } return TRUE; @@ -1754,7 +1754,7 @@ C_assign(void) bool stem; var = SYMBOLADD2LITS; - stem = !symbolhasdot && (LSTR(symbolstr)ÝLLEN(symbolstr)-1¨=='.'); + stem = !symbolhasdot && (LSTR(symbolstr)[LLEN(symbolstr)-1]=='.'); nextsymbol(); _CodeAddByte(OP_CREATE); /* CREATE */ _CodeAddPtr(var); /* the variable */ @@ -1813,7 +1813,7 @@ C_instr(bool until_end) last = DIMENSION(statements_list)-1; while (first<=last) { middle = (first+last)/2; - if ((cmp=CMP(statements_listÝmiddle¨.name))==0) { + if ((cmp=CMP(statements_list[middle].name))==0) { found=1; break; } else @@ -1824,9 +1824,9 @@ C_instr(bool until_end) } if (found) { - if (statements_listÝmiddle¨.func != C_error) + if (statements_list[middle].func != C_error) nextsymbol(); - (*statements_listÝmiddle¨.func)(); + (*statements_list[middle].func)(); } else C_HostCmd(); } else @@ -1878,7 +1878,7 @@ RxInitCompile( RxFile *rxf, PLstr src ) Lupper(&symbolstr); /* Remove the extension */ for (i=0; i>= 8; } if (i==0) { - LSTR(*to)Ýi¨ = 0x00; + LSTR(*to)[i] = 0x00; if (negative) - LSTR(*to)Ýi¨ ¬= 0xFF; + LSTR(*to)[i] ¬= 0xFF; i++; } while (i__ddname != NULL && strlen(dyn_parms->__ddname) > 0) { - memcpy(tuÝtu_idx¨, "\x00\x01\x00\x01\x00", 5); - tuÝtu_idx¨Ý5¨ = (unsigned char) strlen(dyn_parms->__ddname); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), dyn_parms->__ddname, strlen(dyn_parms->__ddname)); + memcpy(tu[tu_idx], "\x00\x01\x00\x01\x00", 5); + tu[tu_idx][5] = (unsigned char) strlen(dyn_parms->__ddname); + memcpy((void *) &(tu[tu_idx][6]), dyn_parms->__ddname, strlen(dyn_parms->__ddname)); tu_idx++; } // DALDSNAM if (dyn_parms->__dsname != NULL && strlen(dyn_parms->__dsname) > 0) { - memcpy(tuÝtu_idx¨, "\x00\x02\x00\x01\x00", 5); - tuÝtu_idx¨Ý5¨ = (unsigned char) strlen(dyn_parms->__dsname); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), dyn_parms->__dsname, strlen(dyn_parms->__dsname)); + memcpy(tu[tu_idx], "\x00\x02\x00\x01\x00", 5); + tu[tu_idx][5] = (unsigned char) strlen(dyn_parms->__dsname); + memcpy((void *) &(tu[tu_idx][6]), dyn_parms->__dsname, strlen(dyn_parms->__dsname)); tu_idx++; } // DALMEMBR if (dyn_parms->__member != NULL && strlen(dyn_parms->__member) > 0) { - memcpy(tuÝtu_idx¨, "\x00\x03\x00\x01\x00", 5); - tuÝtu_idx¨Ý5¨ = (unsigned char) strlen(dyn_parms->__member); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), dyn_parms->__member, strlen(dyn_parms->__member)); + memcpy(tu[tu_idx], "\x00\x03\x00\x01\x00", 5); + tu[tu_idx][5] = (unsigned char) strlen(dyn_parms->__member); + memcpy((void *) &(tu[tu_idx][6]), dyn_parms->__member, strlen(dyn_parms->__member)); tu_idx++; } // DALBLKSZ if ((dyn_parms->__blksize > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x30\x00\x01\x00\x02", 6); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), (unsigned char *)&(dyn_parms->__blksize), 2); + memcpy(tu[tu_idx], "\x00\x30\x00\x01\x00\x02", 6); + memcpy((void *) &(tu[tu_idx][6]), (unsigned char *)&(dyn_parms->__blksize), 2); tu_idx++; } // DALLRECL if ((dyn_parms->__lrecl > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x42\x00\x01\x00\x02", 6); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), (unsigned char *)&(dyn_parms->__lrecl), 2); + memcpy(tu[tu_idx], "\x00\x42\x00\x01\x00\x02", 6); + memcpy((void *) &(tu[tu_idx][6]), (unsigned char *)&(dyn_parms->__lrecl), 2); tu_idx++; } // DALDSORG if ((dyn_parms->__dsorg > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x3C\x00\x01\x00\x02", 6); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), (unsigned char *)&(dyn_parms->__dsorg), 2); + memcpy(tu[tu_idx], "\x00\x3C\x00\x01\x00\x02", 6); + memcpy((void *) &(tu[tu_idx][6]), (unsigned char *)&(dyn_parms->__dsorg), 2); tu_idx++; } // DALRECFM if ((dyn_parms->__recfm > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x49\x00\x01\x00\x01", 6); - tuÝtu_idx¨Ý6¨ = (unsigned char) dyn_parms->__recfm; + memcpy(tu[tu_idx], "\x00\x49\x00\x01\x00\x01", 6); + tu[tu_idx][6] = (unsigned char) dyn_parms->__recfm; tu_idx++; } // DALDIR if ((dyn_parms->__dirblk > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x0C\x00\x01\x00\x03", 6); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), (unsigned char *)&(dyn_parms->__dirblk) + 1, 3); + memcpy(tu[tu_idx], "\x00\x0C\x00\x01\x00\x03", 6); + memcpy((void *) &(tu[tu_idx][6]), (unsigned char *)&(dyn_parms->__dirblk) + 1, 3); tu_idx++; } // DALSTATS if ((dyn_parms->__status > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x04\x00\x01\x00\x01", 6); - tuÝtu_idx¨Ý6¨ = (unsigned char) dyn_parms->__status; + memcpy(tu[tu_idx], "\x00\x04\x00\x01\x00\x01", 6); + tu[tu_idx][6] = (unsigned char) dyn_parms->__status; tu_idx++; } // DALNDISP if ((dyn_parms->__normdisp > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x05\x00\x01\x00\x01", 6); - tuÝtu_idx¨Ý6¨ = (unsigned char) dyn_parms->__normdisp; + memcpy(tu[tu_idx], "\x00\x05\x00\x01\x00\x01", 6); + tu[tu_idx][6] = (unsigned char) dyn_parms->__normdisp; tu_idx++; } // DALTRK if ((dyn_parms->__alcunit & __TRK)) { - memcpy(tuÝtu_idx¨, "\x00\x07\x00\x00", 4); + memcpy(tu[tu_idx], "\x00\x07\x00\x00", 4); tu_idx++; } // DALCYL if ((dyn_parms->__alcunit & __CYL)) { - memcpy(tuÝtu_idx¨, "\x00\x08\x00\x00", 4); + memcpy(tu[tu_idx], "\x00\x08\x00\x00", 4); tu_idx++; } // DALPRIME if ((dyn_parms->__primary > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x0A\x00\x01\x00\x03", 6); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), (unsigned char *)&(dyn_parms->__primary) + 1, 3); + memcpy(tu[tu_idx], "\x00\x0A\x00\x01\x00\x03", 6); + memcpy((void *) &(tu[tu_idx][6]), (unsigned char *)&(dyn_parms->__primary) + 1, 3); tu_idx++; } // DALSECND if ((dyn_parms->__secondary > 0)) { - memcpy(tuÝtu_idx¨, "\x00\x0B\x00\x01\x00\x03", 6); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), (unsigned char *)&(dyn_parms->__secondary) + 1, 3); + memcpy(tu[tu_idx], "\x00\x0B\x00\x01\x00\x03", 6); + memcpy((void *) &(tu[tu_idx][6]), (unsigned char *)&(dyn_parms->__secondary) + 1, 3); tu_idx++; } // DALDUMMY if ((dyn_parms->__misc_flags & __DUMMY_DSN)) { - memcpy(tuÝtu_idx¨, "\x00\x24\x00\x00", 4); + memcpy(tu[tu_idx], "\x00\x24\x00\x00", 4); tu_idx++; } // DALTERM if ((dyn_parms->__misc_flags & __TERM)) { - memcpy(tuÝtu_idx¨, "\x00\x28\x00\x00", 4); + memcpy(tu[tu_idx], "\x00\x28\x00\x00", 4); tu_idx++; } // DALPERMA if ((dyn_parms->__misc_flags & __PERM)) { - memcpy(tuÝtu_idx¨, "\x00\x52\x00\x00", 4); + memcpy(tu[tu_idx], "\x00\x52\x00\x00", 4); tu_idx++; } @@ -158,36 +158,36 @@ int dynalloc (__dyn_t * dyn_parms) // DALUNIT if (dyn_parms->__unit != NULL && strlen(dyn_parms->__unit) > 0) { - memcpy(tuÝtu_idx¨, "\x00\x15\x00\x01\x00", 5); - tuÝtu_idx¨Ý5¨ = (unsigned char) strlen(dyn_parms->__unit); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), dyn_parms->__unit, strlen(dyn_parms->__unit)); + memcpy(tu[tu_idx], "\x00\x15\x00\x01\x00", 5); + tu[tu_idx][5] = (unsigned char) strlen(dyn_parms->__unit); + memcpy((void *) &(tu[tu_idx][6]), dyn_parms->__unit, strlen(dyn_parms->__unit)); tu_idx++; } // DALSYSOU if (dyn_parms->__sysout > 0) { - memcpy(tuÝtu_idx¨, "\x00\x18\x00\x01\x00\x01", 6); - tuÝtu_idx¨Ý6¨ = dyn_parms->__sysout; + memcpy(tu[tu_idx], "\x00\x18\x00\x01\x00\x01", 6); + tu[tu_idx][6] = dyn_parms->__sysout; tu_idx++; } // DALSPGNM if (dyn_parms->__sysoutname != NULL && strlen(dyn_parms->__sysoutname) > 0) { - memcpy(tuÝtu_idx¨, "\x00\x19\x00\x01\x00", 5); - tuÝtu_idx¨Ý5¨ = (unsigned char) strlen(dyn_parms->__sysoutname); - memcpy((void *) &(tuÝtu_idx¨Ý6¨), dyn_parms->__sysoutname, strlen(dyn_parms->__sysoutname)); + memcpy(tu[tu_idx], "\x00\x19\x00\x01\x00", 5); + tu[tu_idx][5] = (unsigned char) strlen(dyn_parms->__sysoutname); + memcpy((void *) &(tu[tu_idx][6]), dyn_parms->__sysoutname, strlen(dyn_parms->__sysoutname)); tu_idx++; } for (ii = 0; ii <= tu_idx - 1; ii++) { - tupÝii¨ = tuÝii¨; + tup[ii] = tu[ii]; } // set high order bit to mark last tu - tupÝtu_idx - 1¨ = (unsigned char *) ((unsigned long) tupÝtu_idx - 1¨ | MASK); + tup[tu_idx - 1] = (unsigned char *) ((unsigned long) tup[tu_idx - 1] | MASK); rc = svc99(&svc_parms); @@ -207,8 +207,8 @@ int dynfree(__dyn_t * dyn_parms) __S99parms svc_parms; - unsigned char tuÝ3¨Ý50¨; - unsigned char *tupÝ3¨; + unsigned char tu[3][50]; + unsigned char *tup[3]; memset(&svc_parms, 0, sizeof(svc_parms)); svc_parms.__S99RBLN = 20; @@ -216,17 +216,17 @@ int dynfree(__dyn_t * dyn_parms) svc_parms.__S99TXTPP = tup; // DUNDDNAM - memcpy(tuÝ0¨, "\x00\x01\x00\x01\x00", 5); - tuÝ0¨Ý5¨ = (unsigned char) strlen(dyn_parms->__ddname); - memcpy((void *) &(tuÝ0¨Ý6¨), dyn_parms->__ddname, strlen(dyn_parms->__ddname)); + memcpy(tu[0], "\x00\x01\x00\x01\x00", 5); + tu[0][5] = (unsigned char) strlen(dyn_parms->__ddname); + memcpy((void *) &(tu[0][6]), dyn_parms->__ddname, strlen(dyn_parms->__ddname)); // DUNUNALC - memcpy(tuÝ1¨, "\x00\x07\x00\x00", 4); + memcpy(tu[1], "\x00\x07\x00\x00", 4); - tupÝ0¨ = tuÝ0¨; - tupÝ1¨ = tuÝ1¨; + tup[0] = tu[0]; + tup[1] = tu[1]; - tupÝ1¨ = (unsigned char *) ((unsigned long) tupÝ1¨ | MASK); + tup[1] = (unsigned char *) ((unsigned long) tup[1] | MASK); rc = svc99(&svc_parms); diff --git a/src/error.c b/src/error.c index fe3f57ee..1b8001e9 100644 --- a/src/error.c +++ b/src/error.c @@ -50,7 +50,7 @@ Lstr errmsg; /* initialise string from beggining */ void __CDECL RxHaltTrap( int cnd ) { - if (_procÝ_rx_proc¨.condition & SC_HALT) + if (_proc[_rx_proc].condition & SC_HALT) RxSignalCondition(SC_HALT); else Lerror(ERR_PROG_INTERRUPT,0); @@ -67,25 +67,25 @@ RxSignalCondition( int cnd ) /*///////// first we need to terminate all the interpret strings */ switch (cnd) { case SC_ERROR: - cndstr = _procÝ_rx_proc¨.lbl_error; + cndstr = _proc[_rx_proc].lbl_error; break; case SC_HALT: - cndstr = _procÝ_rx_proc¨.lbl_halt; + cndstr = _proc[_rx_proc].lbl_halt; break; case SC_NOVALUE: - cndstr = _procÝ_rx_proc¨.lbl_novalue; + cndstr = _proc[_rx_proc].lbl_novalue; break; case SC_NOTREADY: - cndstr = _procÝ_rx_proc¨.lbl_notready; + cndstr = _proc[_rx_proc].lbl_notready; break; case SC_SYNTAX: - cndstr = _procÝ_rx_proc¨.lbl_syntax; + cndstr = _proc[_rx_proc].lbl_syntax; break; } leaf = BinFind(&_labels,cndstr); if (leaf==NULL || ((RxFunc*)(leaf->value))->label==UNKNOWN_LABEL) { if (cnd==SC_SYNTAX) /* disable the error handling */ - _procÝ_rx_proc¨.condition &= ~SC_SYNTAX; + _proc[_rx_proc].condition &= ~SC_SYNTAX; Lerror(ERR_UNEXISTENT_LABEL,1,cndstr); } func = (RxFunc*)(leaf->value); @@ -104,7 +104,7 @@ Rerror( const int _errno, const int subno, ... ) va_list ap; #endif - if (_procÝ_rx_proc¨.condition & SC_SYNTAX) { + if (_proc[_rx_proc].condition & SC_SYNTAX) { RxSetSpecialVar(RCVAR,_errno); if (symbolptr==NULL) /* we are in intepret */ RxSignalCondition(SC_SYNTAX); diff --git a/src/errortxt.c b/src/errortxt.c index bce1ab4e..57b44494 100644 --- a/src/errortxt.c +++ b/src/errortxt.c @@ -36,7 +36,7 @@ #include "lstring.h" /* ============= Error messages =============== */ -ErrorMsg errortextݨ = { +ErrorMsg errortext[] = { #ifndef WCE { ERRNUM(0,1), "Error running , line :" }, { ERRNUM(0,2), "Error in interactive trace:" }, @@ -380,11 +380,11 @@ Lerrortext( const PLstr to, const int errn, const int subn, va_list *ap) last = DIMENSION(errortext)-1; while (first<=last) { middle = (first+last)/2; - if (err==errortextÝmiddle¨.errorno) { + if (err==errortext[middle].errorno) { found=1; break; } else - if (err < errortextÝmiddle¨.errorno) + if (err < errortext[middle].errorno) last = middle-1; else first = middle+1; @@ -395,9 +395,9 @@ Lerrortext( const PLstr to, const int errn, const int subn, va_list *ap) #ifndef WCE /* --- found --- */ if (ap==NULL) - Lscpy(to,errortextÝmiddle¨.errormsg); + Lscpy(to,errortext[middle].errormsg); else { - chstart = errortextÝmiddle¨.errormsg; + chstart = errortext[middle].errormsg; while (1) { ch = STRCHR(chstart,'<'); if (ch==NULL) { @@ -417,7 +417,7 @@ Lerrortext( const PLstr to, const int errn, const int subn, va_list *ap) } } #else /* For the CE version just copy the error message */ - Lscpy(to,errortextÝmiddle¨.errormsg); + Lscpy(to,errortext[middle].errormsg); #endif /* ///////// diff --git a/src/expr.c b/src/expr.c index 49f9ce62..6defa024 100644 --- a/src/expr.c +++ b/src/expr.c @@ -381,7 +381,7 @@ Exp8( void ) } /* Exp8 */ /* -------------------------------------------------------------- */ -/* ÝFunction¨ ::= ÝIdentifier¨(ÝÝExpression¨Ý,ÝExpression¨¨...¨) */ +/* [Function] ::= [Identifier]([[Expression][,[Expression]]...]) */ /* -------------------------------------------------------------- */ static void __CDECL C_function( void ) diff --git a/src/filter.c b/src/filter.c index 48c2b810..e14f8206 100644 --- a/src/filter.c +++ b/src/filter.c @@ -19,22 +19,22 @@ Lfilter( const PLstr to, const PLstr from, const PLstr tablein,const char action // Analysis of string, drop chars which are in input table for (i = 0; i < LLEN(*to); i++) { for (j = 0; j < LLEN(*tablein); j++) { - if (LSTR(*to)Ýi¨ == LSTR(*tablein)Ýj¨) { goto dropChar; } // drop char the fast way + if (LSTR(*to)[i] == LSTR(*tablein)[j]) { goto dropChar; } // drop char the fast way } k++; // set to next character position - LSTR(*to)Ýk¨ = (byte) LSTR(*to)Ýi¨; // transfer char as relevant + LSTR(*to)[k] = (byte) LSTR(*to)[i]; // transfer char as relevant dropChar:; } }else { // Analysis of string, drop chars which are in input table for (i = 0; i < LLEN(*to); i++) { for (j = 0; j < LLEN(*tablein); j++) { - if (LSTR(*to)Ýi¨ == LSTR(*tablein)Ýj¨) { goto keepChar; } // drop char the fast way + if (LSTR(*to)[i] == LSTR(*tablein)[j]) { goto keepChar; } // drop char the fast way } continue; keepChar: k++; // set to next character position - LSTR(*to)Ýk¨ = (byte) LSTR(*to)Ýi¨; // transfer char as relevant + LSTR(*to)[k] = (byte) LSTR(*to)[i]; // transfer char as relevant } } // String analysis completed diff --git a/src/format.c b/src/format.c index 67d3d1f9..f8992c65 100644 --- a/src/format.c +++ b/src/format.c @@ -46,21 +46,21 @@ Lformat( const PLstr to, const PLstr from, Lspace(&tmp,from,0,' '); // * trim spaces * for (i=0; i 5)) ShowExp = 1 // * An extra rule for exponential form * @@ -148,7 +148,7 @@ Lformat( const PLstr to, const PLstr from, LFREESTR(exponent); *********************/ double r; - TCHAR strÝ50¨; + TCHAR str[50]; /* need to mess with this and use GCVT to work out digits */ r = Lrdreal(from); if (before<0) before = 0; diff --git a/src/fss.c b/src/fss.c index 604b7740..272a4ff9 100644 --- a/src/fss.c +++ b/src/fss.c @@ -66,7 +66,7 @@ struct sFields #define is14BitAddr(altrows, altcols) ((altrows * altcols) > MAXPOS12BIT) ? TRUE : FALSE // FSS Environment Values -static struct sFields fssFieldsÝ1024¨; // Array of fields +static struct sFields fssFields[1024]; // Array of fields static int fssFieldCnt; // Count of fields defined in array static int fssAID; // Last 3270 AID value returned static int fssCSR; // Position of Cursor at last read @@ -142,7 +142,7 @@ static int findFieldPos(int pos) return 0; for(ix = 0; ix < fssFieldCnt; ix++) // Loop through Field Array - if(pos == fssFieldsÝix¨.bufaddr) // Check for match + if(pos == fssFields[ix].bufaddr) // Check for match return (ix + 1); // Return index + 1 return 0; // No match found @@ -161,8 +161,8 @@ static int findField(char *fldName) return 0; for(ix=0; ix < fssFieldCnt; ix++) { // Loop through Field Array - if (fssFieldsÝix¨.name != NULL) { - if(!strcmp(fldName,fssFieldsÝix¨.name)) { + if (fssFields[ix].name != NULL) { + if(!strcmp(fldName,fssFields[ix].name)) { return (ix + 1); // Return index + 1 } } @@ -187,15 +187,15 @@ static int updtFld(int pos, char *data, int len) ix--; // Adjust to get actual field index - if(len <= fssFieldsÝix¨.length) // If data fits + if(len <= fssFields[ix].length) // If data fits { - memcpy(fssFieldsÝix¨.data, data, len); // Copy data - *(fssFieldsÝix¨.data+len) = '\0'; // Terminate string + memcpy(fssFields[ix].data, data, len); // Copy data + *(fssFields[ix].data+len) = '\0'; // Terminate string } else // ELSE - truncate data { - memcpy(fssFieldsÝix¨.data, data, fssFieldsÝix¨.length); // Copy max amount we can - *(fssFieldsÝix¨.data + fssFieldsÝix¨.length) = '\0'; // Terminate string + memcpy(fssFields[ix].data, data, fssFields[ix].length); // Copy max amount we can + *(fssFields[ix].data + fssFields[ix].length) = '\0'; // Terminate string } return 0; @@ -367,10 +367,10 @@ int fssReset(void) for(ix=0; ix < fssFieldCnt; ix++) // Loop through Field Array { - if(fssFieldsÝix¨.name) - free(fssFieldsÝix¨.name); // Free field name - if(fssFieldsÝix¨.data) - free(fssFieldsÝix¨.data); // Free field data + if(fssFields[ix].name) + free(fssFields[ix].name); // Free field name + if(fssFields[ix].data) + free(fssFields[ix].data); // Free field data } fssFieldCnt = 0; // Reset field count @@ -465,12 +465,12 @@ int fssTxt(int row, int col, int attr, char * text) //---------------------------- // Fill In Field Array Values //---------------------------- - fssFieldsÝix¨.name = 0; // no name for a text field - fssFieldsÝix¨.bufaddr = (int) position2offset(row,col,fssAlternateCols); - fssFieldsÝix¨.attr = fssAttr(attr); - fssFieldsÝix¨.length = txtlen; - fssFieldsÝix¨.data = (char *) malloc(txtlen+1); - strcpy(fssFieldsÝix¨.data, text); + fssFields[ix].name = 0; // no name for a text field + fssFields[ix].bufaddr = (int) position2offset(row,col,fssAlternateCols); + fssFields[ix].attr = fssAttr(attr); + fssFields[ix].length = txtlen; + fssFields[ix].data = (char *) malloc(txtlen+1); + strcpy(fssFields[ix].data, text); return 0; } @@ -505,21 +505,21 @@ int fssFld(int row, int col, int attr, char * fldName, int len, char *text) //---------------------------- // Fill In Field Array Values //---------------------------- - fssFieldsÝix¨.name = (char *) malloc(strlen(fldName)+1); - strcpy(fssFieldsÝix¨.name, fldName); - fssFieldsÝix¨.bufaddr = (int)position2offset(row,col,fssAlternateCols); - fssFieldsÝix¨.attr = fssAttr(attr); - fssFieldsÝix¨.length = len; - fssFieldsÝix¨.data = (char *) malloc(len + 1); + fssFields[ix].name = (char *) malloc(strlen(fldName)+1); + strcpy(fssFields[ix].name, fldName); + fssFields[ix].bufaddr = (int)position2offset(row,col,fssAlternateCols); + fssFields[ix].attr = fssAttr(attr); + fssFields[ix].length = len; + fssFields[ix].data = (char *) malloc(len + 1); makePrint(text); // Eliminate non-printable characters - if(strlen(text) <= fssFieldsÝix¨.length) // Copy text if it fits into field - strcpy( fssFieldsÝix¨.data, text); + if(strlen(text) <= fssFields[ix].length) // Copy text if it fits into field + strcpy( fssFields[ix].data, text); else // Truncate text if too long { - strncpy(fssFieldsÝix¨.data, text, fssFieldsÝix¨.length); - *(fssFieldsÝix¨.data + fssFieldsÝix¨.length) = '\0'; + strncpy(fssFields[ix].data, text, fssFields[ix].length); + *(fssFields[ix].data + fssFields[ix].length) = '\0'; } return 0; @@ -541,12 +541,12 @@ int fssSetField(char *fldName, char *text) ix--; // Actual Array Index Value makePrint(text); // Eliminate non-printable characters - if(strlen(text) <= fssFieldsÝix¨.length) // If text fits, copy it - strcpy( fssFieldsÝix¨.data, text); + if(strlen(text) <= fssFields[ix].length) // If text fits, copy it + strcpy( fssFields[ix].data, text); else // Truncate if too long { - strncpy(fssFieldsÝix¨.data, text, fssFieldsÝix¨.length); - *(fssFieldsÝix¨.data + fssFieldsÝix¨.length) = '\0'; + strncpy(fssFields[ix].data, text, fssFields[ix].length); + *(fssFields[ix].data + fssFields[ix].length) = '\0'; } return 0; @@ -567,7 +567,7 @@ char * fssGetField(char *fldName) ix--; - return fssFieldsÝix¨.data; // Return pointer to data + return fssFields[ix].data; // Return pointer to data } //---------------------------------------- @@ -585,7 +585,7 @@ int fssSetCursor(char *fldName) ix--; - fssCSRPOS = (int) offset2address(fssFieldsÝix¨.bufaddr, fssAlternateRows, fssAlternateCols); // Cursor pos = field start position + fssCSRPOS = (int) offset2address(fssFields[ix].bufaddr, fssAlternateRows, fssAlternateCols); // Cursor pos = field start position return 0; } @@ -606,7 +606,7 @@ int fssSetAttr(char *fldName, int attr) ix--; // Replace Basic 3270 Attribute data - fssFieldsÝix¨.attr = fssAttr(attr); + fssFields[ix].attr = fssAttr(attr); return 0; } @@ -629,8 +629,8 @@ int fssSetColor(char *fldName, int color) ix--; // Update Color Attribute Value - attr = (fssFieldsÝix¨.attr & 0xFF00FF) | (color & 0xFF00); - fssFieldsÝix¨.attr = attr; + attr = (fssFields[ix].attr & 0xFF00FF) | (color & 0xFF00); + fssFields[ix].attr = attr; return 0; } @@ -653,8 +653,8 @@ int fssSetXH(char *fldName, int xha) ix--; // Update Extended Formatting Attribute - attr = (fssFieldsÝix¨.attr & 0xFFFF) | (xha & 0xFF0000); - fssFieldsÝix¨.attr = attr; + attr = (fssFields[ix].attr & 0xFFFF) | (xha & 0xFF0000); + fssFields[ix].attr = attr; return 0; } @@ -750,15 +750,15 @@ int fssRefresh(void) for(ix = 0; ix < fssFieldCnt; ix++) // Loop through fields { - ba = (int)offset2address(fssFieldsÝix¨.bufaddr - 1, fssAlternateRows, fssAlternateCols); // Back up one from field start position + ba = (int)offset2address(fssFields[ix].bufaddr - 1, fssAlternateRows, fssAlternateCols); // Back up one from field start position *p++ = 0x11; // SBA *p++ = (ba >> 8) & 0xFF; // 3270 Buffer address *p++ = ba & 0xFF; // 3270 Buffer address *p++ = 0x1D; // Start Field - *p++ = BA(fssFieldsÝix¨.attr); // Basic Attribute + *p++ = BA(fssFields[ix].attr); // Basic Attribute - xHilight = XH(fssFieldsÝix¨.attr); // Get Extended Highlighting Attribute - xColor = XC(fssFieldsÝix¨.attr); // Get Extended Color Attribute + xHilight = XH(fssFields[ix].attr); // Get Extended Highlighting Attribute + xColor = XC(fssFields[ix].attr); // Get Extended Color Attribute if(xHilight) // If any Extended Highlighting { @@ -775,18 +775,18 @@ int fssRefresh(void) } i = 0; - if(fssFieldsÝix¨.data) // Insert field data contents + if(fssFields[ix].data) // Insert field data contents { - i = strlen(fssFieldsÝix¨.data); // length of data - if(fssFieldsÝix¨.length < i) // truncate if too long - i = fssFieldsÝix¨.length; - memcpy(p, fssFieldsÝix¨.data, i); // copy to 3270 data stream + i = strlen(fssFields[ix].data); // length of data + if(fssFields[ix].length < i) // truncate if too long + i = fssFields[ix].length; + memcpy(p, fssFields[ix].data, i); // copy to 3270 data stream p += i; // update position in data stream } // End of field position except we are at the end - if ((fssFieldsÝix¨.bufaddr + fssFieldsÝix¨.length) < (fssAlternateRows * fssAlternateCols)) { - ba = (int) offset2address(fssFieldsÝix¨.bufaddr + fssFieldsÝix¨.length, fssAlternateRows, fssAlternateCols); + if ((fssFields[ix].bufaddr + fssFields[ix].length) < (fssAlternateRows * fssAlternateCols)) { + ba = (int) offset2address(fssFields[ix].bufaddr + fssFields[ix].length, fssAlternateRows, fssAlternateCols); *p++ = 0x11; // SBA *p++ = (ba >> 8) & 0xFF; // 3270 buffer address *p++ = ba & 0xFF; diff --git a/src/hashvalu.c b/src/hashvalu.c index 8166c51e..8ac27824 100644 --- a/src/hashvalu.c +++ b/src/hashvalu.c @@ -26,7 +26,7 @@ * Initial Version * * Similar hash code like in Java - * hash = sÝ0¨*31¬(n-1) + sÝ1¨*31¬(n-2) + ... + sÝn-1¨ + * hash = s[0]*31¬(n-1) + s[1]*31¬(n-2) + ... + s[n-1] * The hash string of an empty string is zero */ @@ -47,10 +47,10 @@ Lhashvalue( const PLstr str ) case LSTRING_TY: l = MIN(255,LLEN(*str)); break; } for (i=0; i>3) | (value<<29); } */ diff --git a/src/hostcmd.c b/src/hostcmd.c index a65acfcc..9538fd47 100644 --- a/src/hostcmd.c +++ b/src/hostcmd.c @@ -33,12 +33,12 @@ void rxqueue(char *s); long rxqueued(); void remlf(char *s); void clearcmd(); -int parsecmd(char scmdÝ256¨); -int findcmd(char scmdÝ255¨); +int parsecmd(char scmd[256]); +int findcmd(char scmd[255]); int RxForceRC(int rc); extern RX_ENVIRONMENT_CTX_PTR environment; -char *hcmdargvpÝ128¨; +char *hcmdargvp[128]; bool vsamsubtSet = FALSE; typedef char BYTE; @@ -47,38 +47,38 @@ bool isHostCmd(PLstr cmd, PLstr env) { bool isHostCmd = FALSE; - char lclcmdÝ1025¨; + char lclcmd[1025]; strcpy(lclcmd, (const char *) LSTR(*cmd)); parsecmd(lclcmd); - if (strcasecmp(hcmdargvpÝ0¨, "EXECIO") == 0) { + if (strcasecmp(hcmdargvp[0], "EXECIO") == 0) { isHostCmd = TRUE; - } else if ( (strcasecmp(hcmdargvpÝ0¨, "VSAMIO") == 0)) { + } else if ( (strcasecmp(hcmdargvp[0], "VSAMIO") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "INIT") == 0)) { + (strcasecmp(hcmdargvp[0], "INIT") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "TERM") == 0)) { + (strcasecmp(hcmdargvp[0], "TERM") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "RESET") == 0)) { + (strcasecmp(hcmdargvp[0], "RESET") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "TEXT") == 0)) { + (strcasecmp(hcmdargvp[0], "TEXT") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "FIELD") == 0)) { + (strcasecmp(hcmdargvp[0], "FIELD") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "SET") == 0)) { + (strcasecmp(hcmdargvp[0], "SET") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "GET") == 0)) { + (strcasecmp(hcmdargvp[0], "GET") == 0)) { isHostCmd = TRUE; } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "REFRESH") == 0)) { + (strcasecmp(hcmdargvp[0], "REFRESH") == 0)) { isHostCmd = TRUE; } @@ -90,38 +90,38 @@ handleHostCmd(PLstr cmd, PLstr env) { int returnCode = 0; - char lclcmdÝ1025¨; + char lclcmd[1025]; strcpy(lclcmd, (const char *) LSTR(*cmd)); parsecmd(lclcmd); - if ( (strcasecmp(hcmdargvpÝ0¨, "EXECIO") == 0)) { + if ( (strcasecmp(hcmdargvp[0], "EXECIO") == 0)) { returnCode = RxEXECIO(); - } else if ( (strcasecmp(hcmdargvpÝ0¨, "VSAMIO") == 0)) { + } else if ( (strcasecmp(hcmdargvp[0], "VSAMIO") == 0)) { returnCode = RxVSAMIO(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "INIT") == 0)) { + (strcasecmp(hcmdargvp[0], "INIT") == 0)) { returnCode = RxFSS_INIT(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "TERM") == 0)) { + (strcasecmp(hcmdargvp[0], "TERM") == 0)) { returnCode = RxFSS_TERM(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "RESET") == 0)) { + (strcasecmp(hcmdargvp[0], "RESET") == 0)) { returnCode = RxFSS_RESET(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "TEXT") == 0)) { + (strcasecmp(hcmdargvp[0], "TEXT") == 0)) { returnCode = RxFSS_TEXT(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "FIELD") == 0)) { + (strcasecmp(hcmdargvp[0], "FIELD") == 0)) { returnCode = RxFSS_FIELD(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "SET") == 0)) { + (strcasecmp(hcmdargvp[0], "SET") == 0)) { returnCode = RxFSS_SET(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "GET") == 0)) { + (strcasecmp(hcmdargvp[0], "GET") == 0)) { returnCode = RxFSS_GET(); } else if ( (strcasecmp((char *)LSTR(*env) , "FSS") == 0) && - (strcasecmp(hcmdargvpÝ0¨, "REFRESH") == 0)) { + (strcasecmp(hcmdargvp[0], "REFRESH") == 0)) { returnCode = RxFSS_REFRESH(); } @@ -140,7 +140,7 @@ RxVSAMIO() strcpy(params->VSAMDDN," "); // OPEN - if (strcasecmp(hcmdargvpÝ1¨, "OPEN") == 0) { + if (strcasecmp(hcmdargvp[1], "OPEN") == 0) { // set function code if (findcmd("READ") != -1) { @@ -168,8 +168,8 @@ RxVSAMIO() #endif // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -190,9 +190,9 @@ RxVSAMIO() } // READ - } else if (strcasecmp(hcmdargvpÝ1¨, "READ") == 0) { + } else if (strcasecmp(hcmdargvp[1], "READ") == 0) { - unsigned char vnameÝ19¨; + unsigned char vname[19]; int pos; bool useVar = FALSE; @@ -204,7 +204,7 @@ RxVSAMIO() } else { strcpy(params->VSAMFUNC, "READKU"); } - strcpy(params->VSAMKEY, hcmdargvpÝ++pos¨); + strcpy(params->VSAMKEY, hcmdargvp[++pos]); params->VSAMKEYL = strlen(params->VSAMKEY); } else if (findcmd("NEXT") != -1) { if (findcmd("UPDATE") == -1) { @@ -221,15 +221,15 @@ RxVSAMIO() pos = findcmd("VAR"); if (pos != -1) { useVar = TRUE; - strcpy(vname, hcmdargvpÝ++pos¨); + strcpy(vname, hcmdargvp[++pos]); } // set vsam type to KSDS params->VSAMTYPE = 'K'; // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -268,7 +268,7 @@ RxVSAMIO() } // LOCATE - } else if (strcasecmp(hcmdargvpÝ1¨, "LOCATE") == 0) { + } else if (strcasecmp(hcmdargvp[1], "LOCATE") == 0) { int pos; @@ -277,7 +277,7 @@ RxVSAMIO() pos = findcmd("KEY"); if (pos != -1) { - strcpy(params->VSAMKEY, hcmdargvpÝ++pos¨); + strcpy(params->VSAMKEY, hcmdargvp[++pos]); params->VSAMKEYL = strlen(params->VSAMKEY); } else { FREE(params); @@ -288,8 +288,8 @@ RxVSAMIO() params->VSAMTYPE = 'K'; // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -310,7 +310,7 @@ RxVSAMIO() } // POINT - } else if (strcasecmp(hcmdargvpÝ1¨, "POINT") == 0) { + } else if (strcasecmp(hcmdargvp[1], "POINT") == 0) { int pos; @@ -319,7 +319,7 @@ RxVSAMIO() pos = findcmd("KEY"); if (pos != -1) { - strcpy(params->VSAMKEY, hcmdargvpÝ++pos¨); + strcpy(params->VSAMKEY, hcmdargvp[++pos]); params->VSAMKEYL = strlen(params->VSAMKEY); } else { FREE(params); @@ -330,8 +330,8 @@ RxVSAMIO() params->VSAMTYPE = 'K'; // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -352,9 +352,9 @@ RxVSAMIO() } // WRITE - } else if (strcasecmp(hcmdargvpÝ1¨, "WRITE") == 0) { + } else if (strcasecmp(hcmdargvp[1], "WRITE") == 0) { - unsigned char vnameÝ19¨; + unsigned char vname[19]; int pos; PLstr plsValue; @@ -366,7 +366,7 @@ RxVSAMIO() if (pos != -1) { // set function code strcpy(params->VSAMFUNC, "WRITEK"); - strcpy(params->VSAMKEY, hcmdargvpÝ++pos¨); + strcpy(params->VSAMKEY, hcmdargvp[++pos]); params->VSAMKEYL = strlen(params->VSAMKEY); } else if (findcmd("NEXT") != -1) { // set function code @@ -380,15 +380,15 @@ RxVSAMIO() pos = findcmd("VAR"); if (pos != -1) { useVar = TRUE; - strcpy(vname, hcmdargvpÝ++pos¨); + strcpy(vname, hcmdargvp[++pos]); } // set vsam type to KSDS params->VSAMTYPE = 'K'; // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -421,9 +421,9 @@ RxVSAMIO() LPFREE(plsValue) // INSERT - } else if (strcasecmp(hcmdargvpÝ1¨, "INSERT") == 0) { + } else if (strcasecmp(hcmdargvp[1], "INSERT") == 0) { - unsigned char vnameÝ19¨; + unsigned char vname[19]; int pos; PLstr plsValue; @@ -436,7 +436,7 @@ RxVSAMIO() pos = findcmd("KEY"); if (pos != -1) { - strcpy(params->VSAMKEY, hcmdargvpÝ++pos¨); + strcpy(params->VSAMKEY, hcmdargvp[++pos]); params->VSAMKEYL = strlen(params->VSAMKEY); } else { FREE(params); @@ -447,15 +447,15 @@ RxVSAMIO() pos = findcmd("VAR"); if (pos != -1) { useVar = TRUE; - strcpy(vname, hcmdargvpÝ++pos¨); + strcpy(vname, hcmdargvp[++pos]); } // set vsam type to KSDS params->VSAMTYPE = 'K'; // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -488,7 +488,7 @@ RxVSAMIO() LPFREE(plsValue) // DELETE - } else if (strcasecmp(hcmdargvpÝ1¨, "DELETE") == 0) { + } else if (strcasecmp(hcmdargvp[1], "DELETE") == 0) { int pos; @@ -497,7 +497,7 @@ RxVSAMIO() pos = findcmd("KEY"); if (pos != -1) { - strcpy(params->VSAMKEY, hcmdargvpÝ++pos¨); + strcpy(params->VSAMKEY, hcmdargvp[++pos]); params->VSAMKEYL = strlen(params->VSAMKEY); } else if (findcmd("NEXT") != -1) { // set function code @@ -511,8 +511,8 @@ RxVSAMIO() params->VSAMTYPE = 'K'; // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -533,17 +533,17 @@ RxVSAMIO() } // CLOSE - } else if (strcasecmp(hcmdargvpÝ1¨, "CLOSE") == 0) { + } else if (strcasecmp(hcmdargvp[1], "CLOSE") == 0) { // set function code - if (strcasecmp(hcmdargvpÝ2¨, "ALL") == 0) { + if (strcasecmp(hcmdargvp[2], "ALL") == 0) { strcpy(params->VSAMFUNC,"CLOSEA"); } else { strcpy(params->VSAMFUNC,"CLOSE"); // set DDN - if (strlen(hcmdargvpÝ2¨) >= 1 && strlen(hcmdargvpÝ2¨) <= 8) { - strncpy(params->VSAMDDN, hcmdargvpÝ2¨, strlen(hcmdargvpÝ2¨)); + if (strlen(hcmdargvp[2]) >= 1 && strlen(hcmdargvp[2]) <= 8) { + strncpy(params->VSAMDDN, hcmdargvp[2], strlen(hcmdargvp[2])); } else { iErr = -1; } @@ -581,12 +581,12 @@ int RxEXECIO() { int ii; - char str1Ý64¨; - unsigned char pbuffÝ1025¨; - unsigned char vname1Ý19¨; - unsigned char vname2Ý19¨; - unsigned char vname3Ý19¨; - unsigned char obuffÝ4097¨; + char str1[64]; + unsigned char pbuff[1025]; + unsigned char vname1[19]; + unsigned char vname2[19]; + unsigned char vname3[19]; + unsigned char obuff[4097]; int ip1 = 0; int recs = 0; FILE *f; @@ -595,21 +595,21 @@ RxEXECIO() LPMALLOC(plsValue) // DISKR - if (strcasecmp(hcmdargvpÝ2¨, "DISKR") == 0) { + if (strcasecmp(hcmdargvp[2], "DISKR") == 0) { ip1 = findcmd("STEM"); if (ip1 != -1) { ip1++; - strcpy(vname1, hcmdargvpÝip1¨); // name of stem variable + strcpy(vname1, hcmdargvp[ip1]); // name of stem variable } memset(str1,0,sizeof(str1)); - f = fopen(hcmdargvpÝ3¨, "r"); + f = fopen(hcmdargvp[3], "r"); if (f == NULL) { return (RxForceRC(8)); } recs = 0; while (fgets(pbuff, 1024, f)) { recs++; - remlf(&pbuffÝ0¨); // remove linefeed + remlf(&pbuff[0]); // remove linefeed sprintf(vname2, "%s%d", vname1, recs); // edited stem name if (ip1 != -1) { setVariable(vname2, pbuff); // set rexx variable @@ -628,13 +628,13 @@ RxEXECIO() } // DISKW - if (strcasecmp(hcmdargvpÝ2¨, "DISKW") == 0) { + if (strcasecmp(hcmdargvp[2], "DISKW") == 0) { ip1 = findcmd("STEM"); if (ip1 != -1) { ip1++; - strcpy(vname1, hcmdargvpÝip1¨); // name of stem variable + strcpy(vname1, hcmdargvp[ip1]); // name of stem variable } - f = fopen(hcmdargvpÝ3¨, "w"); + f = fopen(hcmdargvp[3], "w"); if (f == NULL) { return (RxForceRC(8)); } @@ -664,13 +664,13 @@ RxEXECIO() } // DISKA - if (strcasecmp(hcmdargvpÝ2¨, "DISKA") == 0) { + if (strcasecmp(hcmdargvp[2], "DISKA") == 0) { ip1 = findcmd("STEM"); if (ip1 > 0) { ip1++; - strcpy(vname1, hcmdargvpÝip1¨); // name of stem variable + strcpy(vname1, hcmdargvp[ip1]); // name of stem variable } - f = fopen(hcmdargvpÝ3¨, "a"); + f = fopen(hcmdargvp[3], "a"); if (f == NULL) { return (RxForceRC(8)); } @@ -773,35 +773,35 @@ RxFSS_FIELD() LPMALLOC(plsValue) // check row is numeric - if (fssIsNumeric(hcmdargvpÝ1¨)) { - row = atoi(hcmdargvpÝ1¨); + if (fssIsNumeric(hcmdargvp[1])) { + row = atoi(hcmdargvp[1]); } else { iErr = -1; } // check col is numeric - if (fssIsNumeric(hcmdargvpÝ2¨)) { - col = atoi(hcmdargvpÝ2¨); + if (fssIsNumeric(hcmdargvp[2])) { + col = atoi(hcmdargvp[2]); } else { iErr = -2; } // check attr is numeric - if (fssIsNumeric(hcmdargvpÝ3¨)) { - attr = atoi(hcmdargvpÝ3¨); + if (fssIsNumeric(hcmdargvp[3])) { + attr = atoi(hcmdargvp[3]); } // check len is numeric - if (fssIsNumeric(hcmdargvpÝ5¨)) { - len = atoi(hcmdargvpÝ5¨); + if (fssIsNumeric(hcmdargvp[5])) { + len = atoi(hcmdargvp[5]); } else { iErr = -5; } if (iErr == 0) { - getVariable(hcmdargvpÝ6¨, plsValue); + getVariable(hcmdargvp[6], plsValue); - iErr = fssFld(row, col, attr, hcmdargvpÝ4¨, len, (char *)LSTR(*plsValue)); + iErr = fssFld(row, col, attr, hcmdargvp[4], len, (char *)LSTR(*plsValue)); } LPFREE(plsFieldName) @@ -823,66 +823,66 @@ RxFSS_TEXT() LPMALLOC(plsValue) // check row is numeric - if (fssIsNumeric(hcmdargvpÝ1¨)) { - row = atoi(hcmdargvpÝ1¨); + if (fssIsNumeric(hcmdargvp[1])) { + row = atoi(hcmdargvp[1]); } else { iErr = -1; } // check col is numeric - if (fssIsNumeric(hcmdargvpÝ2¨)) { - col = atoi(hcmdargvpÝ2¨); + if (fssIsNumeric(hcmdargvp[2])) { + col = atoi(hcmdargvp[2]); } else { iErr = -2; } // check attr is numeric - if (fssIsNumeric(hcmdargvpÝ3¨)) { - attr = atoi(hcmdargvpÝ3¨); + if (fssIsNumeric(hcmdargvp[3])) { + attr = atoi(hcmdargvp[3]); } else { - if (strstr(hcmdargvpÝ3¨, "#ATTR") != NULL) { + if (strstr(hcmdargvp[3], "#ATTR") != NULL) { attr = getIntegerVariable("#ATTR"); } else { - if(strstr(hcmdargvpÝ3¨, "#PROT") != NULL){ + if(strstr(hcmdargvp[3], "#PROT") != NULL){ attr = attr + fssPROT; } - if(strstr(hcmdargvpÝ3¨, "#NUM") != NULL){ + if(strstr(hcmdargvp[3], "#NUM") != NULL){ attr = attr + fssNUM; } - if(strstr(hcmdargvpÝ3¨, "#HI") != NULL){ + if(strstr(hcmdargvp[3], "#HI") != NULL){ attr = attr + fssHI; } - if(strstr(hcmdargvpÝ3¨, "#NON") != NULL){ + if(strstr(hcmdargvp[3], "#NON") != NULL){ attr = attr + fssNON; } - if(strstr(hcmdargvpÝ3¨, "#BLUE") != NULL){ + if(strstr(hcmdargvp[3], "#BLUE") != NULL){ attr = attr + fssBLUE; } - if(strstr(hcmdargvpÝ3¨, "#RED") != NULL){ + if(strstr(hcmdargvp[3], "#RED") != NULL){ attr = attr + fssRED; } - if(strstr(hcmdargvpÝ3¨, "#PINK") != NULL){ + if(strstr(hcmdargvp[3], "#PINK") != NULL){ attr = attr + fssPINK; } - if(strstr(hcmdargvpÝ3¨, "#GREEN") != NULL){ + if(strstr(hcmdargvp[3], "#GREEN") != NULL){ attr = attr + fssGREEN; } - if(strstr(hcmdargvpÝ3¨, "#TURQ") != NULL){ + if(strstr(hcmdargvp[3], "#TURQ") != NULL){ attr = attr + fssTURQ; } - if(strstr(hcmdargvpÝ3¨, "#YELLOW") != NULL){ + if(strstr(hcmdargvp[3], "#YELLOW") != NULL){ attr = attr + fssYELLOW; } - if(strstr(hcmdargvpÝ3¨, "#WHITE") != NULL){ + if(strstr(hcmdargvp[3], "#WHITE") != NULL){ attr = attr + fssWHITE; } - if(strstr(hcmdargvpÝ3¨, "#BLINK") != NULL){ + if(strstr(hcmdargvp[3], "#BLINK") != NULL){ attr = attr + fssBLINK; } - if(strstr(hcmdargvpÝ3¨, "#REVERSE") != NULL){ + if(strstr(hcmdargvp[3], "#REVERSE") != NULL){ attr = attr + fssREVERSE; } - if(strstr(hcmdargvpÝ3¨, "#USCORE") != NULL){ + if(strstr(hcmdargvp[3], "#USCORE") != NULL){ attr = attr + fssUSCORE; } } @@ -890,7 +890,7 @@ RxFSS_TEXT() } if (iErr == 0) { - getVariable(hcmdargvpÝ4¨, plsValue); + getVariable(hcmdargvp[4], plsValue); iErr = fssTxt(row, col, attr, (char *)LSTR(*plsValue)); } @@ -911,54 +911,54 @@ RxFSS_SET() if (findcmd("CURSOR") == 1) { - iErr = fssSetCursor(hcmdargvpÝ2¨); + iErr = fssSetCursor(hcmdargvp[2]); } else if ( findcmd("FIELD") == 1) { - getVariable(hcmdargvpÝ3¨, plsValue); - iErr = fssSetField(hcmdargvpÝ2¨, (char *)LSTR(*plsValue)); + getVariable(hcmdargvp[3], plsValue); + iErr = fssSetField(hcmdargvp[2], (char *)LSTR(*plsValue)); } else if ( findcmd("COLOR") == 1) { int color = 0; // check color is numeric - if (fssIsNumeric(hcmdargvpÝ3¨)) + if (fssIsNumeric(hcmdargvp[3])) { - color = atoi(hcmdargvpÝ3¨); + color = atoi(hcmdargvp[3]); } else { - if(strstr(hcmdargvpÝ3¨, "#BLUE") != NULL) + if(strstr(hcmdargvp[3], "#BLUE") != NULL) { color = fssBLUE; } - if(strstr(hcmdargvpÝ3¨, "#RED") != NULL) + if(strstr(hcmdargvp[3], "#RED") != NULL) { color = fssRED; } - if(strstr(hcmdargvpÝ3¨, "#PINK") != NULL) + if(strstr(hcmdargvp[3], "#PINK") != NULL) { color = fssPINK; } - if(strstr(hcmdargvpÝ3¨, "#GREEN") != NULL) + if(strstr(hcmdargvp[3], "#GREEN") != NULL) { color = fssGREEN; } - if(strstr(hcmdargvpÝ3¨, "#TURQ") != NULL) + if(strstr(hcmdargvp[3], "#TURQ") != NULL) { color = fssTURQ; } - if(strstr(hcmdargvpÝ3¨, "#YELLOW") != NULL) + if(strstr(hcmdargvp[3], "#YELLOW") != NULL) { color = fssYELLOW; } - if(strstr(hcmdargvpÝ3¨, "#WHITE") != NULL) + if(strstr(hcmdargvp[3], "#WHITE") != NULL) { color = fssWHITE; } } - getVariable(hcmdargvpÝ3¨, plsValue); - iErr = fssSetColor(hcmdargvpÝ2¨, color); + getVariable(hcmdargvp[3], plsValue); + iErr = fssSetColor(hcmdargvp[2], color); } else { iErr = -1; @@ -980,13 +980,13 @@ RxFSS_GET() LPMALLOC(plsValue) if (findcmd("AID") == 1) { - setIntegerVariable(hcmdargvpÝ2¨, fssGetAID()); + setIntegerVariable(hcmdargvp[2], fssGetAID()); } else if (findcmd("WIDTH") == 1) { - setIntegerVariable(hcmdargvpÝ2¨, fssGetAlternateScreenWidth()); + setIntegerVariable(hcmdargvp[2], fssGetAlternateScreenWidth()); } else if (findcmd("HEIGHT") == 1) { - setIntegerVariable(hcmdargvpÝ2¨, fssGetAlternateScreenHeight()); + setIntegerVariable(hcmdargvp[2], fssGetAlternateScreenHeight()); } else if (findcmd("FIELD") == 1) { - setVariable(hcmdargvpÝ3¨, fssGetField(hcmdargvpÝ2¨)); + setVariable(hcmdargvp[3], fssGetField(hcmdargvp[2])); } else { iErr = -1; } @@ -1041,32 +1041,32 @@ clearcmd() { int i = 0; for (i = 0; i <= 128; i++) { - hcmdargvpÝi¨ = NULL; + hcmdargvp[i] = NULL; } } int -parsecmd(char scmdÝ256¨) +parsecmd(char scmd[256]) { int lidx; lidx=0; clearcmd(); - hcmdargvpÝlidx¨=strtok(scmd," (),"); + hcmdargvp[lidx]=strtok(scmd," (),"); printf(" "); // without this f*** printf, the strtok will not work on MVS - while(hcmdargvpÝlidx¨!=NULL) { + while(hcmdargvp[lidx]!=NULL) { lidx++; - hcmdargvpÝlidx¨=strtok(NULL," (),"); + hcmdargvp[lidx]=strtok(NULL," (),"); } - if(lidx==0) { hcmdargvpÝlidx¨=(char *)&scmd; } + if(lidx==0) { hcmdargvp[lidx]=(char *)&scmd; } return(lidx); } int -findcmd(char scmdÝ255¨) +findcmd(char scmd[255]) { int lidx = 0; - while (hcmdargvpÝlidx¨ != NULL) { - if (strcasecmp(scmd, hcmdargvpÝlidx¨) == 0) { + while (hcmdargvp[lidx] != NULL) { + if (strcasecmp(scmd, hcmdargvp[lidx]) == 0) { return (lidx); } lidx++; diff --git a/src/index.c b/src/index.c index 42e0e891..ac97bd56 100644 --- a/src/index.c +++ b/src/index.c @@ -20,10 +20,10 @@ /* ----------------- Lindex ---------------------- */ /* haystack - Lstr where to search * * needle - Lstr to search * - * p - starting position Ý1,haystack len¨ * + * p - starting position [1,haystack len] * * if p < 1 then p = 1 * * returns 0 (NOTFOUND) is needle is not found * - * else returns position Ý1,haystack len¨ * + * else returns position [1,haystack len] * * ----------------------------------------------- */ long __CDECL Lindex( const PLstr haystack, const PLstr needle, long p) @@ -45,12 +45,12 @@ Lindex( const PLstr haystack, const PLstr needle, long p) do { n = 0; p = lp+1; if (p >= LLEN(*haystack)) return LNOTFOUND; - while (LSTR(*haystack)Ýp¨ != LSTR(*needle)Ý0¨) { + while (LSTR(*haystack)[p] != LSTR(*needle)[0]) { p++; if (p >= LLEN(*haystack)) return LNOTFOUND; } lp = p; - while ( (LSTR(*haystack)Ýp¨==LSTR(*needle)Ýn¨) && (n= LLEN(*needle)) return lp+1; p++; if (p >= LLEN(*haystack)) return LNOTFOUND; diff --git a/src/interpre.c b/src/interpre.c index 8e867945..fa5aa55e 100644 --- a/src/interpre.c +++ b/src/interpre.c @@ -18,9 +18,9 @@ /* ---------------- global variables ------------------ */ int _trace; /* if trace is enabled */ -PLstr RxStckÝSTCK_SIZE¨; /* Array of PLstr */ +PLstr RxStck[STCK_SIZE]; /* Array of PLstr */ int RxStckTop; /* top item of stack */ -Lstr _tmpstrÝSTCK_SIZE¨; /* temporary strings */ +Lstr _tmpstr[STCK_SIZE]; /* temporary strings */ unsigned long long ullInstrCount = 0; /*extern int _interrupt;*/ /* if any interrupt is pending */ @@ -42,14 +42,14 @@ static RX_ENVIRONMENT_BLK_PTR envBlock; extern Lstr stemvaluenotfound; /* from variable.c */ -#define STACKTOP RxStckÝRxStckTop¨ -#define STACKP(i) RxStckÝRxStckTop-(i)¨ +#define STACKTOP RxStck[RxStckTop] +#define STACKP(i) RxStck[RxStckTop-(i)] #ifdef __DEBUG__ # define DEBUGDISPLAY0(a) if (__debug__) printf("\t%zu\t%s\n",inst_ip,(a)) # define DEBUGDISPLAY0nl(a) if (__debug__) printf("\t%zu\t%s\t",inst_ip,(a)) # define DEBUGDISPLAY(a) if (__debug__) {printf("\t%zu\t%s\t\"",inst_ip,(a)); \ - Lprint(STDOUT,RxStckÝRxStckTop¨); printf("\"\n"); } + Lprint(STDOUT,RxStck[RxStckTop]); printf("\"\n"); } # define DEBUGDISPLAYi(a,b) if (__debug__) {printf("\t%zu\t%s\t\"",inst_ip,(a)); \ Lprint(STDOUT,(b)); printf("\"\n"); } # define DEBUGDISPLAY2(a) if (__debug__) {printf("\t%zu\t%s\t\"",inst_ip,(a)); \ @@ -64,16 +64,16 @@ extern Lstr stemvaluenotfound; /* from variable.c */ #endif #ifdef __PROFILE__ -int instr_cntÝ256¨; /* instruction counter */ +int instr_cnt[256]; /* instruction counter */ #endif #define CHKERROR if (RxStckTop==STCK_SIZE-1) Lerror(ERR_STORAGE_EXHAUSTED,0) #define INCSTACK { RxStckTop++; CHKERROR; } #define POP_C_POP_B_PEEK_A { POP(C); POP(B); PEEK(A); } #define PEEK(x) x = &(STACKTOP) -#define PEEKR(x,r) x = &(RxStckÝRxStckTop-(r)¨) -#define POP(x) x = &(RxStckÝRxStckTop--¨) -#define PUSH(x) {x = &(RxStckÝ++RxStckTop¨); CHKERROR; } +#define PEEKR(x,r) x = &(RxStck[RxStckTop-(r)]) +#define POP(x) x = &(RxStck[RxStckTop--]) +#define PUSH(x) {x = &(RxStck[++RxStckTop]); CHKERROR; } #ifndef ALIGN # define PLEAF(x) { x = (PBinLeaf)(*(dword*)Rxcip); \ @@ -99,7 +99,7 @@ DebugStackList(void) else for (i=RxStckTop; i>=0; i--) { printf("#%d: \"",i); - Lprint(STDOUT,RxStckÝi¨); + Lprint(STDOUT,RxStck[i]); printf("\"\n"); } } /* DebugStackList */ @@ -167,19 +167,19 @@ I_LoadOption( const PLstr value, const int opt ) switch (opt) { case environment_opt: - Lstrcpy(value,_procÝ_rx_proc¨.env); + Lstrcpy(value,_proc[_rx_proc].env); break; case digits_opt: - Licpy(value,_procÝ_rx_proc¨.digits); + Licpy(value,_proc[_rx_proc].digits); break; case fuzz_opt: - Licpy(value,_procÝ_rx_proc¨.fuzz); + Licpy(value,_proc[_rx_proc].fuzz); break; case form_opt: - Lscpy(value,(_procÝ_rx_proc¨.form)?"ENGINEERING":"SCIENTIFIC"); + Lscpy(value,(_proc[_rx_proc].form)?"ENGINEERING":"SCIENTIFIC"); break; case author_opt: @@ -195,7 +195,7 @@ I_LoadOption( const PLstr value, const int opt ) break; case calltype_opt: - switch (_procÝ_rx_proc¨.calltype) { + switch (_proc[_rx_proc].calltype) { case CT_PROCEDURE: Lscpy(value,"PROCEDURE"); break; @@ -208,7 +208,7 @@ I_LoadOption( const PLstr value, const int opt ) break; case filename_opt: - Lstrcpy(value,&(CompileClauseÝ0¨.fptr)->name); + Lstrcpy(value,&(CompileClause[0].fptr)->name); break; case prgname_opt: @@ -240,14 +240,14 @@ I_StoreOption( const PLstr value, const int opt ) case environment_opt: if (LLEN(*value) > 250) Lerror(ERR_ENVIRON_TOO_LONG,1,value); - if (_rx_proc > 0 && _procÝ_rx_proc¨.env == _procÝ_rx_proc-1¨.env) - LPMALLOC(_procÝ_rx_proc¨.env); - Lstrcpy(_procÝ_rx_proc¨.env,value); + if (_rx_proc > 0 && _proc[_rx_proc].env == _proc[_rx_proc-1].env) + LPMALLOC(_proc[_rx_proc].env); + Lstrcpy(_proc[_rx_proc].env,value); break; case trace_opt: TraceSet(value); - if (_procÝ_rx_proc¨.trace & + if (_proc[_rx_proc].trace & (normal_trace | off_trace | error_trace)) _trace = FALSE; else @@ -257,73 +257,73 @@ I_StoreOption( const PLstr value, const int opt ) case digits_opt: if (LLEN(*value)==0) - _procÝ_rx_proc¨.digits = LMAXNUMERICDIGITS; + _proc[_rx_proc].digits = LMAXNUMERICDIGITS; else { l = Lrdint(value); if (l <= 0) Lerror(ERR_INVALID_INTEGER,5,value); - _procÝ_rx_proc¨.digits = (int)l; + _proc[_rx_proc].digits = (int)l; } - lNumericDigits = MIN(_procÝ_rx_proc¨.digits,LMAXNUMERICDIGITS); - if (_procÝ_rx_proc¨.digits <= _procÝ_rx_proc¨.fuzz) + lNumericDigits = MIN(_proc[_rx_proc].digits,LMAXNUMERICDIGITS); + if (_proc[_rx_proc].digits <= _proc[_rx_proc].fuzz) Lerror(ERR_INVALID_RESULT,1); break; case fuzz_opt: if (LLEN(*value)==0) - _procÝ_rx_proc¨.fuzz = 0; + _proc[_rx_proc].fuzz = 0; else { l = Lrdint(value); if (l <= 0) Lerror(ERR_INVALID_INTEGER,6,value); - _procÝ_rx_proc¨.fuzz = (int)l; + _proc[_rx_proc].fuzz = (int)l; } - if (_procÝ_rx_proc¨.digits <= _procÝ_rx_proc¨.fuzz) + if (_proc[_rx_proc].digits <= _proc[_rx_proc].fuzz) Lerror(ERR_INVALID_RESULT,1); break; case form_opt: - _procÝ_rx_proc¨.form = (int)Lrdint(value); + _proc[_rx_proc].form = (int)Lrdint(value); break; case set_signal_opt: case set_signal_name_opt: - switch (LSTR(*value)Ý0¨) { + switch (LSTR(*value)[0]) { case 'E': - _procÝ_rx_proc¨.condition |= SC_ERROR; + _proc[_rx_proc].condition |= SC_ERROR; if (opt==set_signal_name_opt) - _procÝ_rx_proc¨.lbl_error = STACKP(1); + _proc[_rx_proc].lbl_error = STACKP(1); else - _procÝ_rx_proc¨.lbl_error = &(errorStr->key); + _proc[_rx_proc].lbl_error = &(errorStr->key); break; case 'H': - _procÝ_rx_proc¨.condition |= SC_HALT; + _proc[_rx_proc].condition |= SC_HALT; if (opt==set_signal_name_opt) - _procÝ_rx_proc¨.lbl_halt = STACKP(1); + _proc[_rx_proc].lbl_halt = STACKP(1); else - _procÝ_rx_proc¨.lbl_halt = &(haltStr->key); + _proc[_rx_proc].lbl_halt = &(haltStr->key); break; case 'N': - if (LSTR(*value)Ý2¨=='V') { - _procÝ_rx_proc¨.condition |= SC_NOVALUE; + if (LSTR(*value)[2]=='V') { + _proc[_rx_proc].condition |= SC_NOVALUE; if (opt==set_signal_name_opt) - _procÝ_rx_proc¨.lbl_novalue = STACKP(1); + _proc[_rx_proc].lbl_novalue = STACKP(1); else - _procÝ_rx_proc¨.lbl_novalue = &(noValueStr->key); + _proc[_rx_proc].lbl_novalue = &(noValueStr->key); } else { - _procÝ_rx_proc¨.condition |= SC_NOTREADY; + _proc[_rx_proc].condition |= SC_NOTREADY; if (opt==set_signal_name_opt) - _procÝ_rx_proc¨.lbl_notready = STACKP(1); + _proc[_rx_proc].lbl_notready = STACKP(1); else - _procÝ_rx_proc¨.lbl_notready = &(notReadyStr->key); + _proc[_rx_proc].lbl_notready = &(notReadyStr->key); } break; case 'S': - _procÝ_rx_proc¨.condition |= SC_SYNTAX; + _proc[_rx_proc].condition |= SC_SYNTAX; if (opt==set_signal_name_opt) - _procÝ_rx_proc¨.lbl_syntax = STACKP(1); + _proc[_rx_proc].lbl_syntax = STACKP(1); else - _procÝ_rx_proc¨.lbl_syntax = &(syntaxStr->key); + _proc[_rx_proc].lbl_syntax = &(syntaxStr->key); break; default: Lerror(ERR_INTERPRETER_FAILURE,0); @@ -331,21 +331,21 @@ I_StoreOption( const PLstr value, const int opt ) break; case unset_signal_opt: - switch (LSTR(*value)Ý0¨) { + switch (LSTR(*value)[0]) { case 'E': - _procÝ_rx_proc¨.condition &= ~SC_ERROR; + _proc[_rx_proc].condition &= ~SC_ERROR; break; case 'H': - _procÝ_rx_proc¨.condition &= ~SC_HALT; + _proc[_rx_proc].condition &= ~SC_HALT; break; case 'N': - if (LSTR(*value)Ý2¨=='V') - _procÝ_rx_proc¨.condition &= ~SC_NOVALUE; + if (LSTR(*value)[2]=='V') + _proc[_rx_proc].condition &= ~SC_NOVALUE; else - _procÝ_rx_proc¨.condition &= ~SC_NOTREADY; + _proc[_rx_proc].condition &= ~SC_NOTREADY; break; case 'S': - _procÝ_rx_proc¨.condition &= ~SC_SYNTAX; + _proc[_rx_proc].condition &= ~SC_SYNTAX; break; default: Lerror(ERR_INTERPRETER_FAILURE,0); @@ -375,16 +375,16 @@ I_MakeIntArgs( const int na, const int realarg, const CTYPE existarg ) /* must doit reverse */ MEMSET(rxArg.a,0,sizeof(rxArg.a)); - rxArg.r = RxStckÝRxStckTop-realarg¨; + rxArg.r = RxStck[RxStckTop-realarg]; st = RxStckTop; /* stack position of arguments */ for (i=na-1; i>=0; i--) { if (existarg & bp) { - if (rxArg.r == RxStckÝst¨) { - Lstrcpy(&(_tmpstrÝst¨),RxStckÝst¨); - rxArg.aÝi¨ = &_tmpstrÝst¨; + if (rxArg.r == RxStck[st]) { + Lstrcpy(&(_tmpstr[st]),RxStck[st]); + rxArg.a[i] = &_tmpstr[st]; } else - rxArg.aÝi¨ = RxStckÝst¨; + rxArg.a[i] = RxStck[st]; st--; } bp >>= 1; @@ -429,13 +429,13 @@ I_MakeArgs( const int calltype, const int na, const CTYPE existarg ) st = RxStckTop; /* stack position of arguments */ for (i=na-1; i>=0; i--) { if (existarg & bp) { - arg->aÝi¨ = RxStckÝst¨; + arg->a[i] = RxStck[st]; st--; } else - arg->aÝi¨ = NULL; + arg->a[i] = NULL; bp >>= 1; } - arg->r = RxStckÝst¨; + arg->r = RxStck[st]; if (calltype==CT_FUNCTION) pr->stack = st; @@ -475,7 +475,7 @@ I_CallFunction( void ) if (__debug__) { int i; for (i=0; ikey); i++) - putchar(LSTR(leaf->key)Ýi¨); + putchar(LSTR(leaf->key)[i]); printf(" NoArgs=%d, Exist=%lX Type=%s\n", nargs, existarg,(func->type==FT_BUILTIN)?"builtin":"other"); } @@ -520,7 +520,7 @@ I_CallFunction( void ) /* give a unique program id */ /* we might have a problem after 2*32 routine calls!! */ _procidcnt++; - _procÝ_rx_proc¨.id = _procidcnt; + _proc[_rx_proc].id = _procidcnt; Rx_id = _procidcnt; #ifdef __DEBUG__ if (__debug__) @@ -528,8 +528,8 @@ I_CallFunction( void ) #endif DEBUGDISPLAY0nl("PROC "); Rxcip++; - _procÝ_rx_proc¨.scope = RxScopeMalloc(); - VarScope = _procÝ_rx_proc¨.scope; + _proc[_rx_proc].scope = RxScopeMalloc(); + VarScope = _proc[_rx_proc].scope; if (envBlock != NULL) { envBlock->envblock_userfield = VarScope; } @@ -559,7 +559,7 @@ I_CallFunction( void ) putchar('='); } #endif - leaf = RxVarFind(_procÝ_rx_proc-1¨.scope, + leaf = RxVarFind(_proc[_rx_proc-1].scope, litleaf, &found); #ifdef __DEBUG__ @@ -594,31 +594,31 @@ static void I_ReturnProc( void ) { /* fix ip and stack */ - Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + _procÝ_rx_proc¨.ip); - RxStckTop = _procÝ_rx_proc¨.stack; + Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + _proc[_rx_proc].ip); + RxStckTop = _proc[_rx_proc].stack; if (_rx_proc>0) { /* free everything that it is new */ - if (VarScope!=_procÝ_rx_proc-1¨.scope) { + if (VarScope!=_proc[_rx_proc-1].scope) { RxScopeFree(VarScope); FREE(VarScope); } - if (_procÝ_rx_proc¨.env != _procÝ_rx_proc-1¨.env) - LPFREE(_procÝ_rx_proc¨.env); + if (_proc[_rx_proc].env != _proc[_rx_proc-1].env) + LPFREE(_proc[_rx_proc].env); } /* load previous data and exit */ _rx_proc--; - Rx_id = _procÝ_rx_proc¨.id; - VarScope = _procÝ_rx_proc¨.scope; + Rx_id = _proc[_rx_proc].id; + VarScope = _proc[_rx_proc].scope; if (envBlock != NULL) { envBlock->envblock_userfield = VarScope; } - lNumericDigits = _procÝ_rx_proc¨.digits; + lNumericDigits = _proc[_rx_proc].digits; - if (_procÝ_rx_proc¨.trace & (normal_trace | off_trace | error_trace)) + if (_proc[_rx_proc].trace & (normal_trace | off_trace | error_trace)) _trace = FALSE; else _trace = TRUE; @@ -670,8 +670,8 @@ RxInitInterStr() /* --- load previous data and exit ---- */ Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + pr->ip); _rx_proc--; - Rx_id = _procÝ_rx_proc¨.id; - VarScope = _procÝ_rx_proc¨.scope; + Rx_id = _proc[_rx_proc].id; + VarScope = _proc[_rx_proc].scope; RxSetSpecialVar(RCVAR,rxReturnCode); RxSignalCondition(SC_SYNTAX); @@ -683,16 +683,16 @@ static void RxDoneInterStr( void ) { /* fix ip and stack */ - if (_procÝ_rx_proc¨.calltype == CT_INTERACTIVE) { - if (_procÝ_rx_proc¨.trace & + if (_proc[_rx_proc].calltype == CT_INTERACTIVE) { + if (_proc[_rx_proc].trace & (normal_trace | off_trace | error_trace)) _trace = FALSE; else _trace = TRUE; } - Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + _procÝ_rx_proc¨.ip); - RxStckTop = _procÝ_rx_proc¨.stack; + Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + _proc[_rx_proc].ip); + RxStckTop = _proc[_rx_proc].stack; /* Fixup code length, cut the interpretation code * Warning in the case that the interpret calls an import @@ -701,22 +701,22 @@ RxDoneInterStr( void ) * tempoerary interpret code (leaving garbage) * but otherwise we will end up with wrong pointers. */ - if (_procÝ_rx_proc¨.codelenafter == LLEN(*_code)) { - LLEN(*_code) = _procÝ_rx_proc¨.codelen; - CompileCurClause = _procÝ_rx_proc¨.clauselen; + if (_proc[_rx_proc].codelenafter == LLEN(*_code)) { + LLEN(*_code) = _proc[_rx_proc].codelen; + CompileCurClause = _proc[_rx_proc].clauselen; } - if (_procÝ_rx_proc¨.env != _procÝ_rx_proc-1¨.env) { - Lstrcpy(_procÝ_rx_proc-1¨.env, _procÝ_rx_proc¨.env); - LPFREE(_procÝ_rx_proc¨.env); + if (_proc[_rx_proc].env != _proc[_rx_proc-1].env) { + Lstrcpy(_proc[_rx_proc-1].env, _proc[_rx_proc].env); + LPFREE(_proc[_rx_proc].env); } /* --- load previous data and exit ---- */ _rx_proc--; - Rx_id = _procÝ_rx_proc¨.id; + Rx_id = _proc[_rx_proc].id; - _procÝ_rx_proc¨.trace = _procÝ_rx_proc+1¨.trace; - _procÝ_rx_proc¨.interactive_trace = _procÝ_rx_proc+1¨.interactive_trace; - VarScope = _procÝ_rx_proc¨.scope; + _proc[_rx_proc].trace = _proc[_rx_proc+1].trace; + _proc[_rx_proc].interactive_trace = _proc[_rx_proc+1].interactive_trace; + VarScope = _proc[_rx_proc].scope; } /* RxDoneInterStr */ /* ---------------- RxInitInterpret --------------- */ @@ -732,8 +732,8 @@ RxInitInterpret( void ) RxStckTop = -1; MEMSET(_tmpstr,0,(STCK_SIZE)*sizeof(Lstr)); for (i=0; ienvblock_userfield = VarScope; } - Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + _procÝ_rx_proc¨.ip); - _procÝ_rx_proc¨.stack = RxStckTop; + Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + _proc[_rx_proc].ip); + _proc[_rx_proc].stack = RxStckTop; - if (_procÝ_rx_proc¨.trace & (normal_trace | off_trace | error_trace)) + if (_proc[_rx_proc].trace & (normal_trace | off_trace | error_trace)) _trace = FALSE; else _trace = TRUE; @@ -824,12 +824,12 @@ RxInterpret( void ) /* exit from interpret, if we are in any */ tmp_Rxcip = Rxcip; - while (_procÝ_rx_proc¨.calltype==CT_INTERPRET) + while (_proc[_rx_proc].calltype==CT_INTERPRET) RxDoneInterStr(); Rxcip = tmp_Rxcip; /* clear stack */ - RxStckTop = _procÝ_rx_proc¨.stacktop; + RxStckTop = _proc[_rx_proc].stacktop; } while (1) { @@ -839,7 +839,7 @@ RxInterpret( void ) if (__debug__) { while (1) { cmd = getchar(); - switch (l2uÝ(byte)cmd¨) { + switch (l2u[(byte)cmd]) { case 'M': printf("Memory allocated=%ld\n", mem_allocated()); @@ -859,11 +859,11 @@ RxInterpret( void ) } #endif #ifdef __PROFILE__ - instr_cntÝ(int)*Rxcip¨++; + instr_cnt[(int)*Rxcip]++; #endif switch (*(Rxcip++)) { /* - * Ýmnemonic¨ Ývalue¨... + * [mnemonic] [value]... * type: b = byte * w = word * p = pointer @@ -889,7 +889,7 @@ RxInterpret( void ) DEBUGDISPLAY0("NOP"); goto main_loop; - /* PUSH pÝlit¨ */ + /* PUSH p[lit] */ /* push a litteral to stack */ case OP_PUSH: RxStckTop++; @@ -902,23 +902,23 @@ RxInterpret( void ) /* PUSHTMP */ case OP_PUSHTMP: RxStckTop++; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; CHKERROR; DEBUGDISPLAY0("PUSHTMP"); goto main_loop; - /* POP bÝnum¨ */ + /* POP b[num] */ /* pop NUM stack items */ case OP_POP: DEBUGDISPLAY0("POP"); RxStckTop -= *(Rxcip++); goto main_loop; - /* DUP bÝrel¨ */ + /* DUP b[rel] */ /* duplicate RELative stck item */ case OP_DUP: RxStckTop++; - STACKTOP = RxStckÝRxStckTop-*(Rxcip++)-1¨; + STACKTOP = RxStck[RxStckTop-*(Rxcip++)-1]; CHKERROR; DEBUGDISPLAY("DUP"); goto main_loop; @@ -938,14 +938,14 @@ RxInterpret( void ) /* value to a tmp var */ case OP_COPY2TMP: /* copy to temporary only if different */ - if (STACKTOP != &(_tmpstrÝRxStckTop¨)) { - Lstrcpy(&(_tmpstrÝRxStckTop¨),STACKTOP); - STACKTOP = &(_tmpstrÝRxStckTop¨); + if (STACKTOP != &(_tmpstr[RxStckTop])) { + Lstrcpy(&(_tmpstr[RxStckTop]),STACKTOP); + STACKTOP = &(_tmpstr[RxStckTop]); } DEBUGDISPLAY("COPY2TMP"); goto main_loop; - /* PATCH wÝrel¨ bÝcode¨ */ + /* PATCH w[rel] b[code] */ /* patch CODE string to RELative pos with CODE */ case OP_PATCH: w = *(CWORD *)Rxcip; INCWORD(Rxcip); @@ -953,7 +953,7 @@ RxInterpret( void ) DEBUGDISPLAY0("PATCH"); goto main_loop; - /* RAISE bÝcond¨ bÝerrno¨ bÝsubno¨ */ + /* RAISE b[cond] b[errno] b[subno] */ /* raise an error condition */ case OP_RAISE: errno = *(Rxcip++); @@ -962,22 +962,22 @@ RxInterpret( void ) Lerror(errno,subno,STACKTOP); goto main_loop; - /* LOADARG bÝarg¨ */ + /* LOADARG b[arg] */ /* push an ARGument to stck */ case OP_LOADARG: INCSTACK; na = (unsigned)*(Rxcip++); /* argument to push */ - if (_procÝ_rx_proc¨.arg.aÝna¨) - STACKTOP = _procÝ_rx_proc¨.arg.aÝna¨; + if (_proc[_rx_proc].arg.a[na]) + STACKTOP = _proc[_rx_proc].arg.a[na]; else { - LZEROSTR(_tmpstrÝRxStckTop¨); - STACKTOP = &(_tmpstrÝRxStckTop¨); + LZEROSTR(_tmpstr[RxStckTop]); + STACKTOP = &(_tmpstr[RxStckTop]); } DEBUGDISPLAY("LOADARG"); goto main_loop; - /* LOADOPT Ýdata¨ */ + /* LOADOPT [data] */ /* load an option */ case OP_LOADOPT: INCSTACK; @@ -985,12 +985,12 @@ RxInterpret( void ) /** /// Maybe only pointer to Option!!! **/ - STACKTOP = &(_tmpstrÝRxStckTop¨); + STACKTOP = &(_tmpstr[RxStckTop]); I_LoadOption(STACKTOP,nf); DEBUGDISPLAY("LOADOPT"); goto main_loop; - /* STOREOPT Ýdata¨ */ + /* STOREOPT [data] */ /* store an option */ case OP_STOREOPT: DEBUGDISPLAY("STOREOPT"); @@ -999,7 +999,7 @@ RxInterpret( void ) RxStckTop--; goto main_loop; - /* LOAD pÝleaf¨ */ + /* LOAD p[leaf] */ /* push a VARiable to stack */ case OP_LOAD: INCSTACK; /* make space */ @@ -1010,7 +1010,7 @@ RxInterpret( void ) /* check to see if we have allready its position */ if (inf->id == Rx_id) { - leaf = inf->leafÝ0¨; + leaf = inf->leaf[0]; STACKTOP = LEAFVAL(leaf); } else { leaf = RxVarFind(VarScope, litleaf, &found); @@ -1019,16 +1019,16 @@ RxInterpret( void ) else { if (inf->stem) { /* Lstrcpy to a temp variable */ - Lstrcpy(&(_tmpstrÝRxStckTop¨),&stemvaluenotfound); - STACKTOP = &(_tmpstrÝRxStckTop¨); + Lstrcpy(&(_tmpstr[RxStckTop]),&stemvaluenotfound); + STACKTOP = &(_tmpstr[RxStckTop]); if (leaf==NULL && - _procÝ_rx_proc¨.condition & SC_NOVALUE) + _proc[_rx_proc].condition & SC_NOVALUE) RxSignalCondition(SC_NOVALUE); } else { /* signal no value found */ - if (_procÝ_rx_proc¨.condition & SC_NOVALUE) + if (_proc[_rx_proc].condition & SC_NOVALUE) RxSignalCondition(SC_NOVALUE); - STACKTOP = &(litleaf->key);if (_procÝ_rx_proc¨.condition & SC_NOVALUE) + STACKTOP = &(litleaf->key);if (_proc[_rx_proc].condition & SC_NOVALUE) RxSignalCondition(SC_NOVALUE); STACKTOP = &(litleaf->key); } @@ -1037,7 +1037,7 @@ RxInterpret( void ) goto chk4trace; - /* STORE pÝleaf¨ */ + /* STORE p[leaf] */ /* store top stack item to VARiable */ case OP_CREATE: /* assigmnent */ INCSTACK; @@ -1046,7 +1046,7 @@ RxInterpret( void ) inf = (IdentInfo*)(litleaf->value); if (inf->id == Rx_id) { - leaf = inf->leafÝ0¨; + leaf = inf->leaf[0]; STACKTOP = LEAFVAL(leaf); } else { leaf = RxVarFind(VarScope,litleaf,&found); @@ -1061,14 +1061,14 @@ RxInterpret( void ) STACKTOP = LEAFVAL(leaf); if (inf->stem==0) { inf->id = Rx_id; - inf->leafÝ0¨ = leaf; + inf->leaf[0] = leaf; } } } goto main_loop; - /* DROP pÝleaf¨ */ + /* DROP p[leaf] */ /* drop VARiable */ case OP_DROP: PLEAF(litleaf); /* Get pointer to variable */ @@ -1076,7 +1076,7 @@ RxInterpret( void ) inf = (IdentInfo*)(litleaf->value); if (inf->id == Rx_id) { - leaf = inf->leafÝ0¨; + leaf = inf->leaf[0]; RxVarDel(VarScope,litleaf,leaf); } else { leaf = RxVarFind(VarScope,litleaf,&found); @@ -1100,7 +1100,7 @@ RxInterpret( void ) DEBUGDISPLAYi("ASSIGNSTEM",&(litleaf->key)); inf = (IdentInfo*)(litleaf->value); if (inf->id == Rx_id) { - leaf = inf->leafÝ0¨; + leaf = inf->leaf[0]; RxScopeAssign(leaf); } else { leaf = RxVarFind(VarScope,litleaf,&found); @@ -1109,14 +1109,14 @@ RxInterpret( void ) } goto main_loop; - /* BYINIT Ýpatchpos¨ */ + /* BYINIT [patchpos] */ case OP_BYINIT: w = *(CWORD *)Rxcip; INCWORD(Rxcip); DEBUGDISPLAY("BYINIT"); /* copy to temporary only if different */ - if (STACKTOP != &(_tmpstrÝRxStckTop¨)) { - Lstrcpy(&(_tmpstrÝRxStckTop¨),STACKTOP); - STACKTOP = &(_tmpstrÝRxStckTop¨); + if (STACKTOP != &(_tmpstr[RxStckTop])) { + Lstrcpy(&(_tmpstr[RxStckTop]),STACKTOP); + STACKTOP = &(_tmpstr[RxStckTop]); } /* patch comparision code */ if (Llt(STACKTOP,&(zeroStr->key))) @@ -1130,9 +1130,9 @@ RxInterpret( void ) case OP_FORINIT: DEBUGDISPLAY("FORINIT"); /* copy to temporary only if different */ - if (STACKTOP != &(_tmpstrÝRxStckTop¨)) { - Lstrcpy(&(_tmpstrÝRxStckTop¨),STACKTOP); - STACKTOP = &(_tmpstrÝRxStckTop¨); + if (STACKTOP != &(_tmpstr[RxStckTop])) { + Lstrcpy(&(_tmpstr[RxStckTop]),STACKTOP); + STACKTOP = &(_tmpstr[RxStckTop]); } L2INT(STACKTOP); /* it is in temporary */ if (Llt(STACKTOP,&(zeroStr->key))) @@ -1142,7 +1142,7 @@ RxInterpret( void ) /* DECFOR */ case OP_DECFOR: DEBUGDISPLAY("DECFOR"); - a = RxStckÝRxStckTop-*(Rxcip++)¨; + a = RxStck[RxStckTop-*(Rxcip++)]; if (Leq(a,&(zeroStr->key))) Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart+ *(CWORD*)Rxcip); else @@ -1174,11 +1174,11 @@ RxInterpret( void ) Lupper(STACKTOP); goto main_loop; - /* SIGNAL pÝlabel¨ */ + /* SIGNAL p[label] */ /* clear stack and jmp to LABEL pos */ case OP_SIGNAL: /* clear stack */ - RxStckTop = _procÝ_rx_proc¨.stacktop; + RxStckTop = _proc[_rx_proc].stacktop; /* check label */ PLEAF(leaf); @@ -1191,26 +1191,26 @@ RxInterpret( void ) Rxcip=(CIPTYPE*)((byte huge *)Rxcodestart+func->label); goto main_loop; - /* SIGNALVAL Ýaddress¨ */ + /* SIGNALVAL [address] */ /* get address from stack */ case OP_SIGNALVAL: DEBUGDISPLAY("SIGNALVAL"); /* search for label */ L2STR(STACKTOP); - leaf = BinFind(&_labels,RxStckÝRxStckTop--¨); + leaf = BinFind(&_labels,RxStck[RxStckTop--]); if (leaf==NULL || ((RxFunc*)(leaf->value))->label == UNKNOWN_LABEL) - Lerror(ERR_UNEXISTENT_LABEL,1,RxStckÝRxStckTop+1¨); + Lerror(ERR_UNEXISTENT_LABEL,1,RxStck[RxStckTop+1]); func = (RxFunc*)(leaf->value); /* clear stack */ - RxStckTop = _procÝ_rx_proc¨.stacktop; + RxStckTop = _proc[_rx_proc].stacktop; /* jump */ Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart + (size_t)(func->label)); goto main_loop; - /* JMP wÝpos¨ */ + /* JMP w[pos] */ /* unconditional jump to POSition */ case OP_JMP: DEBUGDISPLAY0nl("JMP"); @@ -1221,7 +1221,7 @@ RxInterpret( void ) #endif goto main_loop; - /* JF wÝpos¨ */ + /* JF w[pos] */ /* jump if top is 0 to POSition */ case OP_JF: DEBUGDISPLAY0nl("JF"); @@ -1234,13 +1234,13 @@ RxInterpret( void ) printf("%ld\n",w); } #endif - if (!Lbool(RxStckÝRxStckTop--¨)) + if (!Lbool(RxStck[RxStckTop--])) Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart+ *(CWORD*)Rxcip); else INCWORD(Rxcip); goto main_loop; - /* JT wÝpos¨ */ + /* JT w[pos] */ /* jump if top is 1 to POSition */ case OP_JT: DEBUGDISPLAY0nl("JT"); @@ -1253,13 +1253,13 @@ RxInterpret( void ) printf("%ld\n",w); } #endif - if (Lbool(RxStckÝRxStckTop--¨)) + if (Lbool(RxStck[RxStckTop--])) Rxcip = (CIPTYPE*)((byte huge *)Rxcodestart+ *(CWORD*)Rxcip); else INCWORD(Rxcip); goto main_loop; - /* CALL pÝlabel¨ bÝnoargs¨ wÝexistarg¨ */ + /* CALL p[label] b[noargs] w[existarg] */ /* create new stack and jmp to LABEL pos*/ case OP_CALL: DEBUGDISPLAY0nl("CALL"); @@ -1273,7 +1273,7 @@ RxInterpret( void ) /* if first prg then exit */ case OP_RETURN: DEBUGDISPLAY0("RETURN"); - if (_procÝ_rx_proc¨.calltype == CT_FUNCTION) + if (_proc[_rx_proc].calltype == CT_FUNCTION) Lerror(ERR_NO_DATA_RETURNED,0); if (_rx_proc==0) { /* root program */ rxReturnCode = 0; @@ -1289,25 +1289,25 @@ RxInterpret( void ) case OP_RETURNF: DEBUGDISPLAY0("RETURNF"); if (_rx_proc==0) { /* Root program */ - rxReturnCode = (int)Lrdint(RxStckÝRxStckTop--¨); + rxReturnCode = (int)Lrdint(RxStck[RxStckTop--]); goto interpreter_fin; } else - if (_procÝ_rx_proc¨.calltype != CT_PROCEDURE) + if (_proc[_rx_proc].calltype != CT_PROCEDURE) /** // It is possible to do a DUP in the compile code of returnf **/ - Lstrcpy(_procÝ_rx_proc¨.arg.r, STACKTOP); + Lstrcpy(_proc[_rx_proc].arg.r, STACKTOP); else { /* is the Variable space private? */ /* proc: PROCEDURE */ - if (VarScope!=_procÝ_rx_proc-1¨.scope) + if (VarScope!=_proc[_rx_proc-1].scope) /* not a tmp var */ - if (STACKTOP != &(_tmpstrÝRxStckTop¨)) + if (STACKTOP != &(_tmpstr[RxStckTop])) { - Lstrcpy(&(_tmpstrÝRxStckTop¨), + Lstrcpy(&(_tmpstr[RxStckTop]), STACKTOP); STACKTOP = - &(_tmpstrÝRxStckTop¨); + &(_tmpstr[RxStckTop]); } /* point the return data */ a = STACKTOP; @@ -1315,18 +1315,18 @@ RxInterpret( void ) I_ReturnProc(); - if (_procÝ_rx_proc+1¨.calltype == CT_PROCEDURE) + if (_proc[_rx_proc+1].calltype == CT_PROCEDURE) /* Assign the the RESULT variable */ RxVarSet(VarScope,resultStr,a); goto main_loop; - /* INTERPRET Ýstring¨ */ + /* INTERPRET [string] */ case OP_INTERPRET: DEBUGDISPLAY("INTERPRET"); /* copy to a temporary var */ - if (STACKTOP != &(_tmpstrÝRxStckTop¨)) { - Lstrcpy(&(_tmpstrÝRxStckTop¨),STACKTOP); - STACKTOP = &(_tmpstrÝRxStckTop¨); + if (STACKTOP != &(_tmpstr[RxStckTop])) { + Lstrcpy(&(_tmpstr[RxStckTop]),STACKTOP); + STACKTOP = &(_tmpstr[RxStckTop]); } RxInitInterStr(); goto main_loop; @@ -1346,7 +1346,7 @@ RxInterpret( void ) /* display TOP item */ case OP_SAY: DEBUGDISPLAY("SAY"); - Lprint(STDOUT,RxStckÝRxStckTop--¨); + Lprint(STDOUT,RxStck[RxStckTop--]); PUTCHAR('\n'); goto main_loop; @@ -1366,7 +1366,7 @@ RxInterpret( void ) /* exit prg with RC */ case OP_EXIT: DEBUGDISPLAY("EXIT"); - rxReturnCode = (int)Lrdint(RxStckÝRxStckTop--¨); + rxReturnCode = (int)Lrdint(RxStck[RxStckTop--]); /* free everything from stack */ #ifndef __DEBUG__ RxStckTop = -1; @@ -1394,7 +1394,7 @@ RxInterpret( void ) DataEnd = BreakStart; if (DataEnd!=DataStart) { - _Lsubstr(RxStckÝRxStckTop--¨, ToParse, DataStart, DataEnd - DataStart); + _Lsubstr(RxStck[RxStckTop--], ToParse, DataStart, DataEnd - DataStart); } else { LZEROSTR(*(STACKTOP)); @@ -1417,7 +1417,7 @@ RxInterpret( void ) if (_trace) { /* Make space */ RxStckTop++; - STACKTOP = &(_tmpstrÝRxStckTop¨); + STACKTOP = &(_tmpstr[RxStckTop]); if (BreakEnd<=DataStart) DataEnd = SourceEnd; else @@ -1444,7 +1444,7 @@ RxInterpret( void ) case OP_TR_LIT: DEBUGDISPLAY("TR_LIT"); DataStart = BreakEnd; - I_trigger_litteral(RxStckÝRxStckTop--¨); + I_trigger_litteral(RxStck[RxStckTop--]); goto main_loop; /* TR_ABS */ @@ -1455,7 +1455,7 @@ RxInterpret( void ) // L2INT(**A); **/ DataStart = BreakEnd; - BreakStart = (size_t)LINT(*(RxStckÝRxStckTop--¨)); + BreakStart = (size_t)LINT(*(RxStck[RxStckTop--])); /* check for boundaries */ BreakStart = RANGE(1,BreakStart,SourceEnd); @@ -1471,7 +1471,7 @@ RxInterpret( void ) // L2INT(**A); **/ DataStart = BreakStart; - BreakStart = DataStart + (size_t)LINT(*(RxStckÝRxStckTop--¨)); + BreakStart = DataStart + (size_t)LINT(*(RxStck[RxStckTop--])); /* check for boundaries */ BreakStart = RANGE(1,BreakStart,SourceEnd); @@ -1493,7 +1493,7 @@ RxInterpret( void ) DEBUGDISPLAY("RX_PUSH"); LPMALLOC(a); /* duplicate variable */ Lfx(a,1); - Lstrcpy(a,RxStckÝRxStckTop--¨); + Lstrcpy(a,RxStck[RxStckTop--]); Queue2Stack(a); goto main_loop; @@ -1503,7 +1503,7 @@ RxInterpret( void ) DEBUGDISPLAY("RX_PUSH"); LPMALLOC(a); /* duplicate variable */ Lfx(a,1); - Lstrcpy(a,RxStckÝRxStckTop--¨); + Lstrcpy(a,RxStck[RxStckTop--]); Push2Stack(a); goto main_loop; @@ -1511,7 +1511,7 @@ RxInterpret( void ) /* pull stck from Rexx queue */ case OP_RX_PULL: RxStckTop++; - STACKTOP = &(_tmpstrÝRxStckTop¨); + STACKTOP = &(_tmpstr[RxStckTop]); a = NULL; /* delete empty stacks */ /* dw - let VM handle the stack */ @@ -1538,7 +1538,7 @@ RxInterpret( void ) /* read data from extrnal queue */ case OP_RX_EXTERNAL: RxStckTop++; - STACKTOP = &(_tmpstrÝRxStckTop¨); + STACKTOP = &(_tmpstr[RxStckTop]); Lread(STDIN,STACKTOP,LREADLINE); DEBUGDISPLAY("RX_EXTERNAL"); goto main_loop; @@ -1629,66 +1629,66 @@ RxInterpret( void ) case OP_TEQ: DEBUGDISPLAY2("TEQ"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Leq(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TNE: DEBUGDISPLAY2("TNE"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Lne(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TDEQ: DEBUGDISPLAY2("TDEQ"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Ldeq(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TDNE: DEBUGDISPLAY2("TNDE"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Ldne(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TGT: DEBUGDISPLAY2("TGT"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Lgt(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TGE: DEBUGDISPLAY2("TGE"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Lge(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TLT: DEBUGDISPLAY2("TLT"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Llt(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_TLE: DEBUGDISPLAY2("TLE"); - a = &(_tmpstrÝRxStckTop-1¨); + a = &(_tmpstr[RxStckTop-1]); LICPY(*a, Lle(STACKP(1),STACKTOP)); RxStckTop--; - STACKTOP = &_tmpstrÝRxStckTop¨; + STACKTOP = &_tmpstr[RxStckTop]; goto chk4trace; case OP_NOT: @@ -1726,9 +1726,9 @@ RxInterpret( void ) Lstrcpy(a,STACKP(1)); Lstrcat(a,STACKTOP); } else { - Lstrcpy(&(_tmpstrÝRxStckTop¨),STACKTOP); + Lstrcpy(&(_tmpstr[RxStckTop]),STACKTOP); Lstrcpy(a,STACKP(1)); - Lstrcat(a,&(_tmpstrÝRxStckTop¨)); + Lstrcat(a,&(_tmpstr[RxStckTop])); } RxStckTop -= 2; goto chk4trace; @@ -1737,12 +1737,12 @@ RxInterpret( void ) DEBUGDISPLAY2("BCONCAT"); a = STACKP(2); if (a==STACKTOP) { - Lstrcpy(&(_tmpstrÝRxStckTop¨),STACKTOP); - STACKTOP = &(_tmpstrÝRxStckTop¨); + Lstrcpy(&(_tmpstr[RxStckTop]),STACKTOP); + STACKTOP = &(_tmpstr[RxStckTop]); } Lstrcpy(a,STACKP(1)); L2STR(a); - LSTR(*a)ÝLLEN(*a)¨ = ' '; + LSTR(*a)[LLEN(*a)] = ' '; LLEN(*a)++; Lstrcat(a,STACKTOP); RxStckTop -= 2; @@ -1756,12 +1756,12 @@ RxInterpret( void ) case OP_INC: DEBUGDISPLAY("INC"); - Linc(RxStckÝRxStckTop--¨); + Linc(RxStck[RxStckTop--]); goto chk4trace; case OP_DEC: DEBUGDISPLAY("DEC"); - Ldec(RxStckÝRxStckTop--¨); + Ldec(RxStck[RxStckTop--]); goto chk4trace; case OP_ADD: diff --git a/src/irxexcom.c b/src/irxexcom.c index 145d59bd..9101584e 100644 --- a/src/irxexcom.c +++ b/src/irxexcom.c @@ -27,7 +27,7 @@ typedef struct envblock ENVBLOCK; typedef struct tidentinfo { int id; int stem; - PBinLeaf leafÝ1¨; + PBinLeaf leaf[1]; } IdentInfo; int fetch (ENVBLOCK *envblock, SHVBLOCK *shvblock); @@ -141,7 +141,7 @@ int fetch (ENVBLOCK *envblock, SHVBLOCK *shvblock) { int bytes; int length; - char bufferÝLMAXNUMERICSTRING + 1¨; + char buffer[LMAXNUMERICSTRING + 1]; // copy variable value switch (LTYPE(*(LEAFVAL(varLeaf)))) { @@ -318,7 +318,7 @@ int drop (ENVBLOCK *envblock, SHVBLOCK *shvblock) { } if (info->id == proc_id) { - varLeaf = info->leafÝ0¨; + varLeaf = info->leaf[0]; RxVarDel(vars, litLeaf, varLeaf); } else { varLeaf = RxVarFind(vars, litLeaf, &found); @@ -367,7 +367,7 @@ int next (ENVBLOCK *envblock, SHVBLOCK *shvblock) { int bytes; int length; - char bufferÝLMAXNUMERICSTRING + 1¨; + char buffer[LMAXNUMERICSTRING + 1]; ((RX_ENVIRONMENT_CTX_PTR) envblock->envblock_userfield)->lastLeaf = varLeaf; @@ -466,10 +466,10 @@ void *getEctEnvBk() { void **ectenvbk; // ECTENVBK => 48 / 0x30 psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; ectenvbk = ect + 12; // 12 * 4 = 48 @@ -497,7 +497,7 @@ void *getEnvBlock() { /* ---------------- NEEDED BREXX VARIABLE MANAGEMENT FUNCTIONS ----------------- */ void RxScopeFree(Scope scope) { if (scope) - BinDisposeLeaf(&(scopeÝ0¨),scopeÝ0¨.parent,RxVarFree); + BinDisposeLeaf(&(scope[0]),scope[0].parent,RxVarFree); } /* RxScopeFree */ PBinLeaf RxVarFind(Scope scope, PBinLeaf litleaf, bool *found) @@ -537,18 +537,18 @@ PBinLeaf RxVarFind(Scope scope, PBinLeaf litleaf, bool *found) *found = (leaf != NULL); if (*found) { inf->id = Rx_id; - inf->leafÝ0¨ = leaf; + inf->leaf[0] = leaf; } return leaf; } else { /* ======= first find array ======= */ - leafidx = inf->leafÝ0¨; + leafidx = inf->leaf[0]; varname = &(leafidx->key); infidx = (IdentInfo*)(leafidx->value); if (Rx_id!=NO_CACHE && infidx->id==Rx_id) { - leaf = infidx->leafÝ0¨; + leaf = infidx->leaf[0]; } else { /** //// LASCIIZ(varname); @@ -571,7 +571,7 @@ PBinLeaf RxVarFind(Scope scope, PBinLeaf litleaf, bool *found) } if (leaf) { infidx->id = Rx_id; - infidx->leafÝ0¨ = leaf; + infidx->leaf[0] = leaf; } else { infidx->id = NO_CACHE; } @@ -583,10 +583,10 @@ PBinLeaf RxVarFind(Scope scope, PBinLeaf litleaf, bool *found) for (i=1; istem; i++) { if (i!=1) { /* append a dot '.' */ - LSTR(varidx)ÝLLEN(varidx)¨ = '.'; + LSTR(varidx)[LLEN(varidx)] = '.'; LLEN(varidx)++; } - leafidx = inf->leafÝi¨; + leafidx = inf->leaf[i]; if (leafidx==NULL) continue; @@ -601,7 +601,7 @@ PBinLeaf RxVarFind(Scope scope, PBinLeaf litleaf, bool *found) } else if (Rx_id!=NO_CACHE && infidx->id==Rx_id) { register PLstr lptr; - leafidx = infidx->leafÝ0¨; + leafidx = infidx->leaf[0]; lptr = LEAFVAL(leafidx); L2STR(lptr); l = LLEN(varidx)+LLEN(*lptr); @@ -633,7 +633,7 @@ PBinLeaf RxVarFind(Scope scope, PBinLeaf litleaf, bool *found) if (leafidx) { register PLstr lptr; infidx->id = Rx_id; - infidx->leafÝ0¨ = leafidx; + infidx->leaf[0] = leafidx; lptr = LEAFVAL(leafidx); L2STR(lptr); l = LLEN(varidx)+LLEN(*lptr); @@ -773,11 +773,11 @@ void RxVarDel(Scope scope, PBinLeaf litleaf, PBinLeaf varleaf) /** // } else { // * find leaf of stem * -// tree = scope + hashcharÝ (byte)LSTR(*name)Ý0¨ ¨; +// tree = scope + hashchar[ (byte)LSTR(*name)[0] ]; // stemleaf = BinFind(tree,varname); // var = (Variable*)(stemleaf->value); // * find the actual bintree of variable * -// tree = var->stem + hashcharÝ (byte)LSTR(varidx)Ý0¨ ¨; +// tree = var->stem + hashchar[ (byte)LSTR(varidx)[0] ]; // BinDel(tree,&varidx,RxVarFree); // inf->id = NO_CACHE; // } diff --git a/src/irxstam.c b/src/irxstam.c index c6846a5a..404e5d96 100644 --- a/src/irxstam.c +++ b/src/irxstam.c @@ -16,10 +16,10 @@ const unsigned char _TSOBG = 0x2; // hex for 0000 0010 const unsigned char _ISPF = 0x8; // hex for 0000 1000 typedef struct env_ctx_t { - char SYSPREFÝ8¨; - char SYSUIDÝ8¨; - char SYSENVÝ5¨; - char SYSISPFÝ11¨; + char SYSPREF[8]; + char SYSUID[8]; + char SYSENV[5]; + char SYSISPF[11]; unsigned char flags1; /* allocations */ unsigned char flags2; /* environment */ unsigned char flags3; /* unused */ @@ -28,14 +28,14 @@ typedef struct env_ctx_t { void *variables; int proc_id; void *cppl; - unsigned dummyÝ28¨; + unsigned dummy[28]; unsigned *VSAMSUBT; - unsigned reservedÝ64¨; + unsigned reserved[64]; } envContext; typedef struct cpplbuf_t { hword length; hword offset; - char dataÝMAX_CPPLBUF_DATA_LENGTH¨; + char data[MAX_CPPLBUF_DATA_LENGTH]; } cpplbuf; typedef struct cppl_t { cpplbuf *buffer; @@ -122,8 +122,8 @@ int handleTSOCommands(struct envblock *p_env_block, struct parm *parms) { // excracting the load module name from command string len = *parms->cmdlen; memset(modulName, ' ', sizeof(char8)); - while (ii < sizeof(char8) && (*parms->cmdstring)Ýii¨ != ' ' && (*parms->cmdstring)Ýii¨ != 0x00) { - ((char *)modulName)Ýii¨ = (*parms->cmdstring)Ýii¨; + while (ii < sizeof(char8) && (*parms->cmdstring)[ii] != ' ' && (*parms->cmdstring)[ii] != 0x00) { + ((char *)modulName)[ii] = (*parms->cmdstring)[ii]; p_parmsCmdString++; len--; ii++; @@ -214,7 +214,7 @@ int handleISPEXECCommands(struct envblock *pEnvBlock, struct parm *parms) { cpplBuffer.offset = MAX_ENV_LENGTH + 1; // link new cppl buffer into cppl - cpplÝ0¨ = &cpplBuffer; + cppl[0] = &cpplBuffer; // call link svc if (_bldl(parms->envname)) { diff --git a/src/justify.c b/src/justify.c index 86324353..746e60a1 100644 --- a/src/justify.c +++ b/src/justify.c @@ -27,7 +27,7 @@ Ljustify( const PLstr to, const PLstr from, long length, char pad ) int spaces, ins, extra; int p,lp,i; double r,rstep; - char padstrÝ2¨; + char padstr[2]; Lstr tmp,sub,space; L2STR(from); @@ -49,13 +49,13 @@ Ljustify( const PLstr to, const PLstr from, long length, char pad ) Lstrcpy(to,&tmp); if (pad != ' ') for (p=0; p0; p--) - if (LSTR(tmp)Ýp¨ == ' ') break; + if (LSTR(tmp)[p] == ' ') break; if (!p) goto fin; LLEN(tmp) = p; } @@ -63,14 +63,14 @@ Ljustify( const PLstr to, const PLstr from, long length, char pad ) } for (p=spaces=0; p=LMAXLEN(*s)) Lfx(s,len); MEMCPY(LSTR(*s),str,len); diff --git a/src/metal.c b/src/metal.c index f3cd726a..fe40fced 100644 --- a/src/metal.c +++ b/src/metal.c @@ -6,46 +6,46 @@ const int __libc_arch = 0; // TODO: implement get line size(tso macro) and cnewBuf(lineSize) -static char lineÝ80¨; +static char line[80]; static int linePos = 0; void * _xregs (unsigned int reg) { void ** saveArea = GETSA(); - saveArea = saveAreaÝ1¨; + saveArea = saveArea[1]; switch (reg) { case 0: - return saveAreaÝ5¨; + return saveArea[5]; case 1: - return saveAreaÝ6¨; + return saveArea[6]; case 2: - return saveAreaÝ7¨; + return saveArea[7]; case 3: - return saveAreaÝ8¨; + return saveArea[8]; case 4: - return saveAreaÝ9¨; + return saveArea[9]; case 5: - return saveAreaÝ10¨; + return saveArea[10]; case 6: - return saveAreaÝ11¨; + return saveArea[11]; case 7: - return saveAreaÝ12¨; + return saveArea[12]; case 8: - return saveAreaÝ13¨; + return saveArea[13]; case 9: - return saveAreaÝ14¨; + return saveArea[14]; case 10: - return saveAreaÝ15¨; + return saveArea[15]; case 11: - return saveAreaÝ16¨; + return saveArea[16]; case 12: - return saveAreaÝ17¨; + return saveArea[17]; case 13: - return saveAreaÝ18¨; + return saveArea[18]; case 14: - return saveAreaÝ3¨; + return saveArea[3]; case 15: - return saveAreaÝ4¨; + return saveArea[4]; break; default: return NULL; @@ -63,7 +63,7 @@ void _tput (char *data) { } void _putchar (char character) { - lineÝlinePos¨ = character; + line[linePos] = character; linePos++; if (character == '\n' || linePos == 80) { @@ -94,9 +94,9 @@ void * _getm (size_t size) { if (R15 == 0) { ptr = (void *) (uintptr_t) R1; - ptrÝ0¨ = (long) AUX_MEM_HEADER_ID; - ptrÝ1¨ = (((long) (ptr)) + AUX_MEM_HEADER_LENGTH); - ptrÝ2¨ = size; + ptr[0] = (long) AUX_MEM_HEADER_ID; + ptr[1] = (((long) (ptr)) + AUX_MEM_HEADER_LENGTH); + ptr[2] = size; } else { ptr = NULL; } @@ -155,8 +155,8 @@ bool _ismetal (void *ptr) { return FALSE; } - if (tmpÝ0¨ == AUX_MEM_HEADER_ID) { - if ( (void *)tmpÝ1¨ == ptr && tmpÝ2¨ > AUX_MEM_HEADER_LENGTH ) { + if (tmp[0] == AUX_MEM_HEADER_ID) { + if ( (void *)tmp[1] == ptr && tmp[2] > AUX_MEM_HEADER_LENGTH ) { return TRUE; } else { return FALSE; @@ -171,15 +171,15 @@ size_t _memsize (void *ptr) { if (_ismetal(ptr)) { fword *wrkPtr = (fword *) ((byte *) ptr - AUX_MEM_HEADER_LENGTH); - size = wrkPtrÝ2¨; // 3rd dword contains the length + size = wrkPtr[2]; // 3rd dword contains the length } else { hword *wrkPtr = (hword *) ((byte *) ptr - JCC_MEM_HEADER_LENGTH); // check if 1st dword is an address => jcc cell memory if (*((fword *)wrkPtr) & 0xFFF) { - if (wrkPtrÝ3¨ >= 0 && wrkPtrÝ3¨ != 0xFFFF) { - size = wrkPtrÝ3¨; // 4rd word contains the length + if (wrkPtr[3] >= 0 && wrkPtr[3] != 0xFFFF) { + size = wrkPtr[3]; // 4rd word contains the length } } else { @@ -191,26 +191,26 @@ size_t _memsize (void *ptr) { } void _dump (void *data, size_t size, char *heading) { - char asciiÝ17¨; + char ascii[17]; size_t i, j; bool padded = FALSE; - asciiÝ16¨ = '\0'; + ascii[16] = '\0'; if (heading != NULL) { - printf("Ý%s¨\n", heading); + printf("[%s]\n", heading); } else { - printf("ÝDumping %lu bytes from address %p¨\n", size, data); + printf("[Dumping %lu bytes from address %p]\n", size, data); } printf("%08X (+%08X) | ", (unsigned) (uintptr_t) data, 0); for (i = 0; i < size; ++i) { - printf("%02X", ((char *)data)Ýi¨); + printf("%02X", ((char *)data)[i]); - if (isprint(((char *) data)Ýi¨)) { - asciiÝi % 16¨ = ((char *)data)Ýi¨; + if (isprint(((char *) data)[i])) { + ascii[i % 16] = ((char *)data)[i]; } else { - asciiÝi % 16¨ = '.'; + ascii[i % 16] = '.'; } @@ -222,10 +222,10 @@ void _dump (void *data, size_t size, char *heading) { if ((i+1) % 16 == 0) { printf("| %s \n", ascii); if (i+1 != size) { - printf("%08X (+%08X) | ", (unsigned) (uintptr_t) &((char *)data)Ýi+1¨, (unsigned int) i+1); + printf("%08X (+%08X) | ", (unsigned) (uintptr_t) &((char *)data)[i+1], (unsigned int) i+1); } } else if (i+1 == size) { - asciiÝ(i+1) % 16¨ = '\0'; + ascii[(i+1) % 16] = '\0'; for (j = (i+1) % 16; j < 16; ++j) { if ((j) % 4 == 0) { @@ -264,7 +264,7 @@ int _bldl (const char8 moduleName) { unsigned short BLDLF; unsigned short BLDLL; char8 BLDLN; - unsigned char BLDLDÝ68¨; + unsigned char BLDLD[68]; } bldlParams; memset(&bldlParams, 0, sizeof(struct bldl_params_t)); @@ -309,9 +309,9 @@ int _load (const char8 moduleName, void **pAddress) { int _link (const char8 moduleName, void *pParmList, void *GPR0) { int R0, R1, R15; - void *modInfoÝ2¨; - modInfoÝ0¨ = (void *) moduleName; - modInfoÝ1¨ = 0; + void *modInfo[2]; + modInfo[0] = (void *) moduleName; + modInfo[1] = 0; R0 = (int) (uintptr_t) GPR0; R1 = (int) (uintptr_t) pParmList; diff --git a/src/netdata.c b/src/netdata.c index 3abda7cf..82d66f20 100644 --- a/src/netdata.c +++ b/src/netdata.c @@ -15,7 +15,7 @@ int getBinaryValue(BYTE *ptr, int len) } else if (len == 2) { binaryValue = *(short *) ptr; } else if (len == 3) { - binaryValue = (ptrÝ0¨ << 16) | (ptrÝ1¨ << 8) | ptrÝ2¨; + binaryValue = (ptr[0] << 16) | (ptr[1] << 8) | ptr[2]; } else if (len == 4) { binaryValue = *(int *) ptr; } @@ -93,11 +93,11 @@ int readSegment(FILE *pFile, P_ND_SEGMENT pSegment) unsigned int ulLength = 0; // read length field - ((BYTE *)pSegment)ÝulCurrentPosition¨ = fgetc(pFile); + ((BYTE *)pSegment)[ulCurrentPosition] = fgetc(pFile); ulBytesRead += 1; // check length value - ulLength = ((BYTE *)pSegment)Ý0¨ & 0xFFu; + ulLength = ((BYTE *)pSegment)[0] & 0xFFu; if (ulLength <2 || ulLength > 255) { iErr = 1; } @@ -106,7 +106,7 @@ int readSegment(FILE *pFile, P_ND_SEGMENT pSegment) if (iErr == 0) { while (ulBytesRead < ulLength) { ulCurrentPosition++; - ((BYTE *)pSegment)ÝulCurrentPosition¨ = fgetc(pFile); + ((BYTE *)pSegment)[ulCurrentPosition] = fgetc(pFile); ulBytesRead++; } @@ -136,12 +136,12 @@ ND_CTRL_RECORD_FORMAT getControlRecordFormat(P_ND_SEGMENT pSegment) { P_ND_CTRL_RECORD pControlRecordData = (P_ND_CTRL_RECORD) &(pSegment->data); - unsigned char HEX_INMR01Ý6¨ = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF1 }; - unsigned char HEX_INMR02Ý6¨ = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF2 }; - unsigned char HEX_INMR03Ý6¨ = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF3 }; - unsigned char HEX_INMR04Ý6¨ = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF4 }; - unsigned char HEX_INMR06Ý6¨ = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF6 }; - unsigned char HEX_INMR07Ý6¨ = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF7 }; + unsigned char HEX_INMR01[6] = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF1 }; + unsigned char HEX_INMR02[6] = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF2 }; + unsigned char HEX_INMR03[6] = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF3 }; + unsigned char HEX_INMR04[6] = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF4 }; + unsigned char HEX_INMR06[6] = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF6 }; + unsigned char HEX_INMR07[6] = {0xC9, 0xD5, 0xD4, 0xD9, 0xF0, 0xF7 }; if (memcmp(pControlRecordData->identifier, HEX_INMR01, 6) == 0) return INMR01; if (memcmp(pControlRecordData->identifier, HEX_INMR02, 6) == 0) return INMR02; @@ -417,7 +417,7 @@ int getFileUtilCtrlRecord(P_ND_SEGMENT pSegment, P_ND_FILE_UTIL_CTRL_RECORD pFil sizeof(pTextUnitValue->length)); // adding Nth qualifier part of dsn - memcpy(&pFileUtilCtrlRecord->INMDSNAMÝuiCurrentPosition¨, + memcpy(&pFileUtilCtrlRecord->INMDSNAM[uiCurrentPosition], pTextUnitValue->data, uiDataLength); uiCurrentPosition += uiDataLength; @@ -426,7 +426,7 @@ int getFileUtilCtrlRecord(P_ND_SEGMENT pSegment, P_ND_FILE_UTIL_CTRL_RECORD pFil if (uiCurrentNumber < uiMaxNumber) { char cDot = 0x4B; - memcpy(&pFileUtilCtrlRecord->INMDSNAMÝuiCurrentPosition¨, + memcpy(&pFileUtilCtrlRecord->INMDSNAM[uiCurrentPosition], &cDot, 1); uiCurrentPosition++; diff --git a/src/nextsymb.c b/src/nextsymb.c index f729ae56..56d6a868 100644 --- a/src/nextsymb.c +++ b/src/nextsymb.c @@ -101,7 +101,7 @@ InitNextsymbol( PLstr str ) symboline = 1; /* Skip first line, '#!/bin/rexx' */ - if (symbolptrÝ0¨=='#' && symbolptrÝ1¨=='!') { + if (symbolptr[0]=='#' && symbolptr[1]=='!') { while (*symbolptr!='\n') symbolptr++; symboline++; } @@ -145,7 +145,7 @@ nextsymbol(void) symbolprevptr = symbolptr; - switch (l2uÝ(byte)*symbolptr¨) { + switch (l2u[(byte)*symbolptr]) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': @@ -471,7 +471,7 @@ identifier(int isnumber) goto Nleave; } - switch (l2uÝ(byte)*symbolptr¨) { + switch (l2u[(byte)*symbolptr]) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': @@ -497,7 +497,7 @@ identifier(int isnumber) case '_': case '?': case '!': - *s = l2uÝ(byte)*symbolptr¨; + *s = l2u[(byte)*symbolptr]; if (isnumber) { if (*s=='E') { if (hasExp) @@ -638,7 +638,7 @@ literal(void) } else if (STRCHR("bBxXhH",*symbolptr)) { /* check next char */ - char nc=l2uÝ(byte)*(symbolptr+1)¨; + char nc=l2u[(byte)*(symbolptr+1)]; *s = '\0'; LLEN(symbolstr) = l; @@ -652,7 +652,7 @@ literal(void) LINITSTR(A); - switch (l2uÝ(byte)*symbolptr¨) { + switch (l2u[(byte)*symbolptr]) { case 'B': if (!Ldatatype(&symbolstr,'B')) Lerror(ERR_INVALID_HEX_CONST,0); diff --git a/src/p2d.c b/src/p2d.c index aa567c0f..744922a4 100644 --- a/src/p2d.c +++ b/src/p2d.c @@ -18,12 +18,12 @@ Lp2d( const PLstr to, const PLstr from, long dummy, long fraction) { ar = LSTR(*from); for (i = 0, r = 0; i < LLEN(*from); i++) { - reÝr++¨ = chexÝ(arÝi¨ >> 4) & 0x0F¨; - reÝr++¨ = chexÝarÝi¨ & 0x0F¨; + re[r++] = chex[(ar[i] >> 4) & 0x0F]; + re[r++] = chex[ar[i] & 0x0F]; } LTYPE(*to) = LSTRING_TY; LLEN(*to) = r - 1; - sign = LSTR(*to)Ýr - 1¨; + sign = LSTR(*to)[r - 1]; // convert to integer value L2INT(to); diff --git a/src/print.c b/src/print.c index 312e18ef..57395e92 100644 --- a/src/print.c +++ b/src/print.c @@ -64,7 +64,7 @@ Lprint( FILEP f, const PLstr str ) { size_t l; char *c; - char sÝ64¨; + char s[64]; #ifndef WIN if (str==NULL) { diff --git a/src/printf.c b/src/printf.c index 33002905..60965faa 100644 --- a/src/printf.c +++ b/src/printf.c @@ -146,7 +146,7 @@ typedef struct { static inline void _out_buffer(char character, void* buffer, size_t idx, size_t maxlen) { if (idx < maxlen) { - ((char*)buffer)Ýidx¨ = character; + ((char*)buffer)[idx] = character; } } @@ -223,7 +223,7 @@ static size_t _out_rev(out_fct_type out, char* buffer, size_t idx, size_t maxlen // reverse string while (len) { - out(bufÝ--len¨, buffer, idx++, maxlen); + out(buf[--len], buffer, idx++, maxlen); } // append pad spaces up to given width @@ -246,10 +246,10 @@ static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, size_t ma width--; } while ((len < prec) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - bufÝlen++¨ = '0'; + buf[len++] = '0'; } while ((flags & FLAGS_ZEROPAD) && (len < width) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - bufÝlen++¨ = '0'; + buf[len++] = '0'; } } @@ -262,28 +262,28 @@ static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, size_t ma } } if ((base == 16U) && !(flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - bufÝlen++¨ = 'x'; + buf[len++] = 'x'; } else if ((base == 16U) && (flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - bufÝlen++¨ = 'X'; + buf[len++] = 'X'; } else if ((base == 2U) && (len < PRINTF_NTOA_BUFFER_SIZE)) { - bufÝlen++¨ = 'b'; + buf[len++] = 'b'; } if (len < PRINTF_NTOA_BUFFER_SIZE) { - bufÝlen++¨ = '0'; + buf[len++] = '0'; } } if (len < PRINTF_NTOA_BUFFER_SIZE) { if (negative) { - bufÝlen++¨ = '-'; + buf[len++] = '-'; } else if (flags & FLAGS_PLUS) { - bufÝlen++¨ = '+'; // ignore the space if the '+' exists + buf[len++] = '+'; // ignore the space if the '+' exists } else if (flags & FLAGS_SPACE) { - bufÝlen++¨ = ' '; + buf[len++] = ' '; } } @@ -294,7 +294,7 @@ static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, size_t ma // internal itoa for 'long' type static size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, unsigned long value, bool negative, unsigned long base, unsigned int prec, unsigned int width, unsigned int flags) { - char bufÝPRINTF_NTOA_BUFFER_SIZE¨; + char buf[PRINTF_NTOA_BUFFER_SIZE]; size_t len = 0U; // no hash for 0 values @@ -306,7 +306,7 @@ static size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, size_t maxl if (!(flags & FLAGS_PRECISION) || value) { do { const char digit = (char)(value % base); - bufÝlen++¨ = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; + buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; value /= base; } while (value && (len < PRINTF_NTOA_BUFFER_SIZE)); } @@ -319,7 +319,7 @@ static size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, size_t maxl #if defined(PRINTF_SUPPORT_LONG_LONG) static size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, unsigned long long value, bool negative, unsigned long long base, unsigned int prec, unsigned int width, unsigned int flags) { - char bufÝPRINTF_NTOA_BUFFER_SIZE¨; + char buf[PRINTF_NTOA_BUFFER_SIZE]; size_t len = 0U; // no hash for 0 values @@ -331,7 +331,7 @@ static size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, size_t if (!(flags & FLAGS_PRECISION) || value) { do { const char digit = (char)(value % base); - bufÝlen++¨ = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; + buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; value /= base; } while (value && (len < PRINTF_NTOA_BUFFER_SIZE)); } @@ -352,7 +352,7 @@ static size_t _etoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, d // internal ftoa for fixed decimal floating point static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags) { - char bufÝPRINTF_FTOA_BUFFER_SIZE¨; + char buf[PRINTF_FTOA_BUFFER_SIZE]; size_t len = 0U; double diff = 0.0; @@ -362,7 +362,7 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, d unsigned long frac; // powers of 10 - static const double pow10ݨ = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; + static const double pow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; // test for special values if (value != value) @@ -395,19 +395,19 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, d } // limit precision to 9, cause a prec >= 10 can lead to overflow errors while ((len < PRINTF_FTOA_BUFFER_SIZE) && (prec > 9U)) { - bufÝlen++¨ = '0'; + buf[len++] = '0'; prec--; } whole = (int)value; - tmp = (value - whole) * pow10Ýprec¨; + tmp = (value - whole) * pow10[prec]; frac = (unsigned long)tmp; diff = tmp - frac; if (diff > 0.5) { ++frac; // handle rollover, e.g. case 0.99 with prec 1 is 1.0 - if (frac >= pow10Ýprec¨) { + if (frac >= pow10[prec]) { frac = 0; ++whole; } @@ -432,24 +432,24 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, d // now do fractional part, as an unsigned number while (len < PRINTF_FTOA_BUFFER_SIZE) { --count; - bufÝlen++¨ = (char)(48U + (frac % 10U)); + buf[len++] = (char)(48U + (frac % 10U)); if (!(frac /= 10U)) { break; } } // add extra 0s while ((len < PRINTF_FTOA_BUFFER_SIZE) && (count-- > 0U)) { - bufÝlen++¨ = '0'; + buf[len++] = '0'; } if (len < PRINTF_FTOA_BUFFER_SIZE) { // add decimal - bufÝlen++¨ = '.'; + buf[len++] = '.'; } } // do whole part, number is reversed while (len < PRINTF_FTOA_BUFFER_SIZE) { - bufÝlen++¨ = (char)(48 + (whole % 10)); + buf[len++] = (char)(48 + (whole % 10)); if (!(whole /= 10)) { break; } @@ -461,19 +461,19 @@ static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, d width--; } while ((len < width) && (len < PRINTF_FTOA_BUFFER_SIZE)) { - bufÝlen++¨ = '0'; + buf[len++] = '0'; } } if (len < PRINTF_FTOA_BUFFER_SIZE) { if (negative) { - bufÝlen++¨ = '-'; + buf[len++] = '-'; } else if (flags & FLAGS_PLUS) { - bufÝlen++¨ = '+'; // ignore the space if the '+' exists + buf[len++] = '+'; // ignore the space if the '+' exists } else if (flags & FLAGS_SPACE) { - bufÝlen++¨ = ' '; + buf[len++] = ' '; } } @@ -509,7 +509,7 @@ static size_t _etoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, d conv.F = value; int exp2 = (int)((conv.U >> 52U) & 0x07FFU) - 1023; // effectively log2 - conv.U = (conv.U & ((1ULL << 52U) - 1U)) | (1023ULL << 52U); // drop the exponent so conv.F is now in Ý1,2) + conv.U = (conv.U & ((1ULL << 52U) - 1U)) | (1023ULL << 52U); // drop the exponent so conv.F is now in [1,2) // now approximate log10 from the log2 integer part and an expansion of ln around 1.5 int expval = (int)(0.1760912590558 + exp2 * 0.301029995663981 + (conv.F - 1.5) * 0.289529654602168); // now we want to compute 10¬expval but we want to be sure it won't overflow @@ -604,7 +604,7 @@ static int _vsnprintf(out_fct_type out, char* buffer, const size_t maxlen, const while (*format) { - // format specifier? %Ýflags¨Ýwidth¨Ý.precision¨Ýlength¨ + // format specifier? %[flags][width][.precision][length] if (*format != '%') { // no out(*format, buffer, idx++, maxlen); @@ -882,7 +882,7 @@ static int _vsnprintf(out_fct_type out, char* buffer, const size_t maxlen, const int printf(const char* format, ...) { int ret; - char bufferÝ1¨; + char buffer[1]; va_list va; va_start(va, format); ret = _vsnprintf(_out_char, buffer, (size_t)-1, format, va); @@ -916,6 +916,6 @@ int snprintf(char* buffer, size_t count, const char* format, ...) int vprintf(const char* format, va_list va) { - char bufferÝ1¨; + char buffer[1]; return _vsnprintf(_out_char, buffer, (size_t)-1, format, va); } diff --git a/src/reradix.c b/src/reradix.c index f3860195..552fd74c 100644 --- a/src/reradix.c +++ b/src/reradix.c @@ -31,7 +31,7 @@ Lreradix( const PLstr to, const PLstr subject, int j; for (j=0; jfp), ddn, dsn, member, serial, flags); @@ -262,9 +262,9 @@ void __CDECL RxFileLoadDSN(RxFile *rxf) || (strcmp(lastName, currentNamme) != 0)) { /* do not load same member from the same po */ #ifndef __CROSS__ - char finalNameÝ60¨ = ""; // Clear Memory to avoid unwanted characters in file name pej/mig 3.May 20 + char finalName[60] = ""; // Clear Memory to avoid unwanted characters in file name pej/mig 3.May 20 #else - char finalNameÝ255¨ = ""; // Clear Memory and increase length on PC side to 255 length pej/mig 3.May 20 + char finalName[255] = ""; // Clear Memory and increase length on PC side to 255 length pej/mig 3.May 20 #endif if (strlen(rxf->dsn) > 0) { snprintf(finalName, 54, "%s%c%s%c", rxf->dsn, '(', LSTR(rxf->name), ')'); @@ -288,7 +288,7 @@ void __CDECL RxFileLoadDSN(RxFile *rxf) void __CDECL RxFileLoadDDN(RxFile *rxf, const char *ddn) { if (rxf->fp == NULL) { - char finalNameÝ20¨; + char finalName[20]; char* _style_old = _style; if (ddn != NULL) { @@ -438,11 +438,11 @@ RxRun( char *filename, PLstr programstr, /* arguments... */ pr->arg.n = 0; for (i=0; iarg.n = i+1; - pr->arg.aÝi¨ = &(argumentsÝi¨); + pr->arg.a[i] = &(arguments[i]); } else - pr->arg.aÝi¨ = NULL; + pr->arg.a[i] = NULL; } pr->arg.r = NULL; diff --git a/src/rexx1709.c b/src/rexx1709.c index 40e49883..b0ed5b2a 100644 --- a/src/rexx1709.c +++ b/src/rexx1709.c @@ -223,11 +223,11 @@ RxFileLoad(RxFile *rxf, bool loadLibrary) /* ------------ RxFileDCB ------------ */ void RxFileDCB(RxFile *rxf) { - char ddnÝ9¨; - char dsnÝ45¨; - char memberÝ9¨; - char serialÝ7¨; - unsigned char flagsÝ11¨; + char ddn[9]; + char dsn[45]; + char member[9]; + char serial[7]; + unsigned char flags[11]; __get_ddndsnmemb(fileno(rxf->fp), ddn, dsn, member, serial, flags); @@ -259,7 +259,7 @@ void __CDECL RxFileLoadDSN(RxFile *rxf) || (strcmp(lastName, currentNamme) != 0)) { /* do not load same member from the same po */ - char finalNameÝ60¨; + char finalName[60]; if (strlen(rxf->dsn) > 0) { snprintf(finalName, 54, "%s%c%s%c", rxf->dsn, '(', LSTR(rxf->name), ')'); @@ -279,7 +279,7 @@ void __CDECL RxFileLoadDSN(RxFile *rxf) void __CDECL RxFileLoadDDN(RxFile *rxf, const char *ddn) { if (rxf->fp == NULL) { - char finalNameÝ20¨; + char finalName[20]; char* _style_old = _style; if (ddn != NULL) { @@ -430,11 +430,11 @@ RxRun( char *filename, PLstr programstr, /* arguments... */ pr->arg.n = 0; for (i=0; iarg.n = i+1; - pr->arg.aÝi¨ = &(argumentsÝi¨); + pr->arg.a[i] = &(arguments[i]); } else - pr->arg.aÝi¨ = NULL; + pr->arg.a[i] = NULL; } pr->arg.r = NULL; diff --git a/src/rexxfunc.c b/src/rexxfunc.c index e5fdcbf3..dd95ac7b 100644 --- a/src/rexxfunc.c +++ b/src/rexxfunc.c @@ -98,7 +98,7 @@ static BinTree *ExtraFuncs = NULL; /* !!!!!! EBCDIC SORT ORDER IS NOT THE SAME AS ASCII */ static TBltFunc -rexx_routineݨ = { +rexx_routine[] = { #ifdef WCE { "A2U", R_S ,f_a2u }, #endif @@ -283,7 +283,7 @@ C_isBuiltin( PLstr func ) while (first<=last) { middle = (first+last)/2; - if ((cmp=Lcmp(func,rexx_routineÝmiddle¨.name))==0) + if ((cmp=Lcmp(func,rexx_routine[middle].name))==0) return (rexx_routine+middle); else if (cmp<0) diff --git a/src/rxconv.c b/src/rxconv.c index 5615c8bb..f9977a5c 100644 --- a/src/rxconv.c +++ b/src/rxconv.c @@ -33,11 +33,11 @@ #include "rxdefs.h" /* --------------------------------------------------------------- */ -/* BITAND(string1Ý,Ýstring2¨Ý,pad¨¨) */ +/* BITAND(string1[,[string2][,pad]]) */ /* --------------------------------------------------------------- */ -/* BITOR(string1Ý,Ýstring2¨Ý,pad¨¨) */ +/* BITOR(string1[,[string2][,pad]]) */ /* --------------------------------------------------------------- */ -/* BITXOR(string1Ý,Ýstring2¨Ý,pad¨¨) */ +/* BITXOR(string1[,[string2][,pad]]) */ /* --------------------------------------------------------------- */ void __CDECL R_SoSoC( const int func ) @@ -83,9 +83,9 @@ R_SoSoC( const int func ) } /* R_SoSoC */ /* --------------------------------------------------------------- */ -/* C2D(stringÝ,n¨) */ +/* C2D(string[,n]) */ /* --------------------------------------------------------------- */ -/* X2D(hex-stringÝ,n¨) */ +/* X2D(hex-string[,n]) */ /* --------------------------------------------------------------- */ void __CDECL R_SoI ( const int func ) @@ -110,9 +110,9 @@ R_SoI ( const int func ) } /* R_SoI */ /* --------------------------------------------------------------- */ -/* D2C(wholenumberÝ,n¨) */ +/* D2C(wholenumber[,n]) */ /* --------------------------------------------------------------- */ -/* D2X(wholenumberÝ,n¨) */ +/* D2X(wholenumber[,n]) */ /* --------------------------------------------------------------- */ void __CDECL R_IoI ( const int func ) @@ -172,7 +172,7 @@ R_trunc( const int func ) } /* R_trunc */ /* --------------------------------------------------------------- */ -/* XRANGE(Ýstart¨Ý,end¨) */ +/* XRANGE([start][,end]) */ /* --------------------------------------------------------------- */ void __CDECL R_xrange( const int func ) @@ -183,14 +183,14 @@ R_xrange( const int func ) if (exist(1)) { L2STR(ARG1); if (LLEN(*ARG1)!=1) Lerror(ERR_INCORRECT_CALL,0); - start = (unsigned)LSTR(*ARG1)Ý0¨ & 0xFF; + start = (unsigned)LSTR(*ARG1)[0] & 0xFF; } else start = 0; if (exist(2)) { L2STR(ARG2); if (LLEN(*ARG2)!=1) Lerror(ERR_INCORRECT_CALL,0); - stop = (unsigned)LSTR(*ARG2)Ý0¨ & 0xFF; + stop = (unsigned)LSTR(*ARG2)[0] & 0xFF; } else stop = 255; diff --git a/src/rxfiles.c b/src/rxfiles.c index 9f8545bb..20124226 100644 --- a/src/rxfiles.c +++ b/src/rxfiles.c @@ -96,36 +96,36 @@ RxInitFiles(void) MALLOC( FILE_INC * sizeof(struct files_st), "FILE"); file_size = FILE_INC; for (i=0; i"); fileÝi¨.f = STDIN; - fileÝi¨.line = 1; + LPMALLOC(file[i].name); + Lscpy(file[i].name,""); file[i].f = STDIN; + file[i].line = 1; i++; - LPMALLOC(fileÝi¨.name); - Lscpy(fileÝi¨.name,""); fileÝi¨.f = STDOUT; - fileÝi¨.line = 1; + LPMALLOC(file[i].name); + Lscpy(file[i].name,""); file[i].f = STDOUT; + file[i].line = 1; i++; - LPMALLOC(fileÝi¨.name); - Lscpy(fileÝi¨.name,""); fileÝi¨.f = STDERR; - fileÝi¨.line = 1; + LPMALLOC(file[i].name); + Lscpy(file[i].name,""); file[i].f = STDERR; + file[i].line = 1; #if defined(MSDOS) && !defined(__WIN32__) && !defined(_MSC_VER) i++; - LPMALLOC(fileÝi¨.name); - Lscpy(fileÝi¨.name,""); fileÝi¨.f = stdaux; - fileÝi¨.line = 1; + LPMALLOC(file[i].name); + Lscpy(file[i].name,""); file[i].f = stdaux; + file[i].line = 1; i++; - LPMALLOC(fileÝi¨.name); - Lscpy(fileÝi¨.name,""); fileÝi¨.f = stdprn; - fileÝi¨.line = 1; + LPMALLOC(file[i].name); + Lscpy(file[i].name,""); file[i].f = stdprn; + file[i].line = 1; #endif } /* RxInitFiles*/ @@ -136,10 +136,10 @@ RxDoneFiles(void) int i; for (i=0;iSYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { LINITSTR(str) Lcat(&str, environment->SYSPREF); @@ -246,7 +246,7 @@ open_file( const PLstr fn, const char *mode) LASCIIZ(str) _style = "//DSN:"; - if ((fileÝi¨.f=FOPEN((char*)LSTR(str),mode))==NULL) { + if ((file[i].f=FOPEN((char*)LSTR(str),mode))==NULL) { LFREESTR(str) LINITSTR(str) @@ -259,7 +259,7 @@ open_file( const PLstr fn, const char *mode) (strchr((const char *)LSTR(str), ')') == 0)) { _style = "//DDN:"; - if ((fileÝi¨.f=FOPEN((char*)LSTR(str),mode))==NULL) { + if ((file[i].f=FOPEN((char*)LSTR(str),mode))==NULL) { LFREESTR(str); return -1; } @@ -281,7 +281,7 @@ open_file( const PLstr fn, const char *mode) (strchr((const char *)LSTR(str), ')') == 0)) { _style = "//DDN:"; - if ((fileÝi¨.f=FOPEN((char*)LSTR(str),mode))==NULL) { + if ((file[i].f=FOPEN((char*)LSTR(str),mode))==NULL) { LFREESTR(str); return -1; } @@ -302,7 +302,7 @@ open_file( const PLstr fn, const char *mode) LASCIIZ(str) _style = "//DSN:"; - if ((fileÝi¨.f=FOPEN((char*)LSTR(str),mode))==NULL) { + if ((file[i].f=FOPEN((char*)LSTR(str),mode))==NULL) { LFREESTR(str); return -1; } @@ -312,11 +312,11 @@ open_file( const PLstr fn, const char *mode) Lerror(ERR_DATA_NOT_SPEC, 0); } - LPMALLOC(fileÝi¨.name); + LPMALLOC(file[i].name); - //Lstrcpy(fileÝi¨.name, &str); - Lstrcpy(fileÝi¨.name, fn); - fileÝi¨.line = 1; + //Lstrcpy(file[i].name, &str); + Lstrcpy(file[i].name, fn); + file[i].line = 1; LFREESTR(str); @@ -349,7 +349,7 @@ open_vio_file( const PLstr fn, const char *mode) (strchr((const char *)LSTR(str), ')') == 0)) { _style = "//MEM:"; - if ((fileÝi¨.f=FOPEN((char*)LSTR(str),mode))==NULL) { + if ((file[i].f=FOPEN((char*)LSTR(str),mode))==NULL) { LFREESTR(str); return -1; } @@ -368,10 +368,10 @@ open_vio_file( const PLstr fn, const char *mode) Lerror(ERR_DATA_NOT_SPEC, 0); } - LPMALLOC(fileÝi¨.name); + LPMALLOC(file[i].name); - Lstrcpy(fileÝi¨.name, fn); - fileÝi¨.line = 1; + Lstrcpy(file[i].name, fn); + file[i].line = 1; LFREESTR(str); @@ -385,10 +385,10 @@ static int close_file( const int f ) { int r; - r = FCLOSE(fileÝf¨.f); - fileÝf¨.f = NULL; - LPFREE(fileÝf¨.name); - fileÝf¨.name = NULL; + r = FCLOSE(file[f].f); + file[f].f = NULL; + LPFREE(file[f].name); + file[f].name = NULL; return r; } /* close_file */ @@ -449,7 +449,7 @@ R_eof( ) if (i==-1) Licpy(ARGR,-1); else - Licpy(ARGR,((FEOF(fileÝi¨.f))?1:0)); + Licpy(ARGR,((FEOF(file[i].f))?1:0)); } /* R_eof */ /* --------------------------------------------------------------- */ @@ -465,11 +465,11 @@ R_flush( ) if (i==-1) Licpy(ARGR,-1); else - Licpy(ARGR,(FFLUSH(fileÝi¨.f))); + Licpy(ARGR,(FFLUSH(file[i].f))); } /* R_flush */ /* --------------------------------------------------------------- */ -/* STREAM(fileÝ,Ýoption¨Ý,command¨¨) */ +/* STREAM(file[,[option][,command]]) */ /* --------------------------------------------------------------- */ void __CDECL R_stream( ) @@ -485,7 +485,7 @@ R_stream( ) i = find_file(ARG1); if (exist(2)) { L2STR(ARG2); - option = l2uÝ(byte)LSTR(*ARG2)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG2)[0]]; } else option = 'S'; /* Status */ @@ -555,10 +555,10 @@ R_stream( ) if (i>=0) close_file(i); } else if (!Lcmp(&cmd,"FLUSH")) { - if (i>=0) FFLUSH(fileÝi¨.f); + if (i>=0) FFLUSH(file[i].f); } else if (!Lcmp(&cmd,"RESET")) { - if (i>=0) FSEEK( fileÝi¨.f, 0L, SEEK_SET ); + if (i>=0) FSEEK( file[i].f, 0L, SEEK_SET ); } else Lerror(ERR_INCORRECT_CALL, 0); @@ -570,7 +570,7 @@ R_stream( ) if (i==-1) Lscpy(ARGR,"UNKNOWN"); else { - if (FEOF(fileÝi¨.f)) + if (FEOF(file[i].f)) Lscpy(ARGR,"NOTREADY"); else Lscpy(ARGR,"READY"); @@ -603,10 +603,10 @@ R_charslines( const int func ) Lerror(ERR_CANT_OPEN_FILE,0); if (func == f_chars) - Licpy(ARGR,Lchars(fileÝi¨.f)); + Licpy(ARGR,Lchars(file[i].f)); else if (func == f_lines) - Licpy(ARGR,Llines(fileÝi¨.f)); + Licpy(ARGR,Llines(file[i].f)); } /* R_charslines */ /* --------------------------------------------------------------- */ @@ -631,14 +631,14 @@ R_charlinein( const int func ) get_oiv(2,start,LSTARTPOS); get_oiv(3,length,1); - if (LLEN(*ARGR)==0 && FEOF(fileÝi¨.f)) + if (LLEN(*ARGR)==0 && FEOF(file[i].f)) RxSignalCondition(SC_NOTREADY); if (func == f_charin) - Lcharin(fileÝi¨.f,ARGR,start,length); + Lcharin(file[i].f,ARGR,start,length); else if (func == f_linein) - Llinein(fileÝi¨.f,ARGR,&(fileÝi¨.line),start,length); + Llinein(file[i].f,ARGR,&(file[i].line),start,length); } /* R_charlinein */ /* --------------------------------------------------------------- */ @@ -674,12 +674,12 @@ R_charlineout( const int func ) get_oiv(3,start,LSTARTPOS); if (func == f_charout) { - Lcharout(fileÝi¨.f,str,start); + Lcharout(file[i].f,str,start); Licpy(ARGR,LLEN(*ARG2)); } else if (func == f_lineout) - Licpy(ARGR,Llineout(fileÝi¨.f,str,&(fileÝi¨.line),start)); - FFLUSH(fileÝi¨.f); + Licpy(ARGR,Llineout(file[i].f,str,&(file[i].line),start)); + FFLUSH(file[i].f); } /* R_charlineout */ /* --------------------------------------------------------------- */ @@ -699,14 +699,14 @@ R_write( ) if (i==-1) Lerror(ERR_CANT_OPEN_FILE,0); if (exist(2)) { - Lwrite(fileÝi¨.f,ARG2,FALSE); + Lwrite(file[i].f,ARG2,FALSE); Licpy(ARGR, LLEN(*ARG2)); } else { - FPUTC('\n',fileÝi¨.f); + FPUTC('\n',file[i].f); Licpy(ARGR,1); } if (ARGN==3) { - FPUTC('\n',fileÝi¨.f); + FPUTC('\n',file[i].f); LINT(*ARGR)++; } } /* R_write */ @@ -743,7 +743,7 @@ R_read( ) l = Lrdint(ARG2); else if (LTYPE(*ARG2) == LSTRING_TY) { - switch (l2uÝ(byte)LSTR(*ARG2)Ý0¨¨) { + switch (l2u[(byte)LSTR(*ARG2)[0]]) { case 'F': l = LREADFILE; break; @@ -761,7 +761,7 @@ R_read( ) } else l = LREADLINE; - Lread(fileÝi¨.f, ARGR, l); + Lread(file[i].f, ARGR, l); } /* R_read */ /* --------------------------------------------------------------- */ @@ -784,7 +784,7 @@ R_seek( ) l = Lrdint(ARG2); if (exist(3)) { L2STR(ARG3); - switch (l2uÝ(byte)LSTR(*ARG3)Ý0¨¨) { + switch (l2u[(byte)LSTR(*ARG3)[0]]) { case 'T': /* TOF */ SEEK = SEEK_SET; break; @@ -798,7 +798,7 @@ R_seek( ) Lerror(ERR_INCORRECT_CALL, 0 ); } } - FSEEK( fileÝi¨.f, l, SEEK ); + FSEEK( file[i].f, l, SEEK ); } - Licpy(ARGR, FTELL(fileÝi¨.f)); + Licpy(ARGR, FTELL(file[i].f)); } /* R_seek */ diff --git a/src/rxmath.c b/src/rxmath.c index d4b1f842..39aab7da 100644 --- a/src/rxmath.c +++ b/src/rxmath.c @@ -162,7 +162,7 @@ R_bitwise( const int func ) L2INT(ARGR); for (i=1; i> 4) & 0x0F, byte1 & 0x0F, (byte2 >> 4) & 0x0F ); @@ -138,7 +138,7 @@ int __get_ddndsnmemb (int handle, char * ddn, char * dsn, #endif #define BLACKLIST_SIZE 8 -char *RX_VAR_BLACKLISTÝBLACKLIST_SIZE¨ = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; +char *RX_VAR_BLACKLIST[BLACKLIST_SIZE] = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; #ifdef __CROSS__ /* ------------------------------------------------------------------------------------*/ @@ -149,7 +149,7 @@ getNextVar(void** nextPtr) BinLeaf *leaf = NULL; PLstr value = NULL; - currentTree = &(_procÝ_rx_proc¨.scopeÝ0¨); + currentTree = &(_proc[_rx_proc].scope[0]); if (*nextPtr == 0) { leaf = BinMin(currentTree->parent); @@ -164,7 +164,7 @@ getNextVar(void** nextPtr) /* while (leaf == NULL && i < VARTREES) { if (nextPtr == NULL) { - leaf = BinMin(_procÝ_rx_proc¨.scopeÝi¨.parent); + leaf = BinMin(_proc[_rx_proc].scope[i].parent); } else { leaf = BinSuccessor(nextPtr); } @@ -196,11 +196,11 @@ void R_catchIt(int func) void ** cppl; - if (__libc_tso_status == 1 && entry_R13 Ý6¨ != 0) { + if (__libc_tso_status == 1 && entry_R13 [6] != 0) { rc = 42; - cppl = entry_R13Ý6¨; + cppl = entry_R13[6]; tso_parameter = malloc(sizeof(RX_TSO_PARAMS)); memset(tso_parameter, 00, sizeof(RX_TSO_PARAMS)); @@ -307,9 +307,9 @@ void R_listIt(int func) Lerror(ERR_INCORRECT_CALL,4,1); } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { printf("List all Variables\n"); printf("------------------\n"); BinPrint(tree.parent, NULL); @@ -349,13 +349,13 @@ void R_vlist(int func) if (exist(2)) { L2STR(ARG2); Lupper(ARG2); - if (LSTR(*ARG2)Ý0¨ == 'V') mode = 1; - else if (LSTR(*ARG2)Ý0¨ == 'N') mode = 2; + if (LSTR(*ARG2)[0] == 'V') mode = 1; + else if (LSTR(*ARG2)[0] == 'N') mode = 2; } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { BinVarDump(ARGR,tree.parent, NULL,mode); } else { LASCIIZ(*ARG1) ; @@ -436,7 +436,7 @@ void R_join(int func) { Lfx(&tabin,32); if (ARG3==NULL||LLEN(*ARG3)==0) { LLEN(tabin)=1; - LSTR(tabin)Ý0¨=' '; + LSTR(tabin)[0]=' '; } else { L2STR(ARG3); Lstrcpy(&tabin,ARG3); @@ -453,11 +453,11 @@ void R_join(int func) { for (i = 0; i < mlen; i++) { for (j = 0; j < LLEN(tabin); j++) { - if (LSTR(*ARG2)Ýi¨ == LSTR(tabin)Ýj¨) goto joinChar; // split char found } + if (LSTR(*ARG2)[i] == LSTR(tabin)[j]) goto joinChar; // split char found } } - LSTR(joins)Ýi¨ = LSTR(*ARG2)Ýi¨; + LSTR(joins)[i] = LSTR(*ARG2)[i]; continue; - joinChar: LSTR(joins)Ýi¨ = LSTR(*ARG1)Ýi¨; + joinChar: LSTR(joins)[i] = LSTR(*ARG1)[i]; } Lstrcpy(ARGR, &joins); LFREESTR(joins); @@ -467,14 +467,14 @@ void R_join(int func) { void R_split(int func) { long i=0,j=0, n = 0, ctr=0; Lstr Word, tabin; - char varNameÝ255¨; + char varName[255]; if (ARGN >3 || ARG1==NULL|| ARG2==NULL) Lerror(ERR_INCORRECT_CALL, 0); LINITSTR(tabin); Lfx(&tabin,32); if (ARG3==NULL||LLEN(*ARG3)==0) { LLEN(tabin)=1; - LSTR(tabin)Ý0¨=' '; + LSTR(tabin)[0]=' '; } else { L2STR(ARG3); Lstrcpy(&tabin,ARG3); @@ -484,9 +484,9 @@ void R_split(int func) { L2STR(ARG2); LASCIIZ(*ARG2); j=LLEN(*ARG2)-1; // offset of last char - if (LSTR(*ARG2)Ýj¨=='.') { + if (LSTR(*ARG2)[j]=='.') { LLEN(*ARG2)=j; - LSTR(*ARG2)Ýj¨=NULL; + LSTR(*ARG2)[j]=NULL; } Lupper(ARG2); LINITSTR(Word); @@ -498,7 +498,7 @@ void R_split(int func) { // SKIP to next Word, Drop all word delimiter for (i = i; i < LLEN(*ARG1); i++) { for (j = 0; j < LLEN(tabin); j++) { - if (LSTR(*ARG1)Ýi¨ == LSTR(tabin)Ýj¨) goto splitChar; // split char found } + if (LSTR(*ARG1)[i] == LSTR(tabin)[j]) goto splitChar; // split char found } } break; splitChar: @@ -509,7 +509,7 @@ void R_split(int func) { // SKIP to next Delimiter, scan word for (n = i; n < LLEN(*ARG1); n++) { for (j = 0; j < LLEN(tabin); j++) { - if (LSTR(*ARG1)Ýn¨ == LSTR(tabin)Ýj¨) goto splitCharf; // split char found } + if (LSTR(*ARG1)[n] == LSTR(tabin)[j]) goto splitCharf; // split char found } } continue; splitCharf: @@ -518,7 +518,7 @@ void R_split(int func) { // Move Word into STEM ctr++; // Next word found, increase counter _Lsubstr(&Word,ARG1,i+1,n-i); - LSTR(Word)Ýn-i¨=NULL; // set 0 for end of string + LSTR(Word)[n-i]=NULL; // set 0 for end of string LLEN(Word)=n-i; sprintf(varName, "%s.%i",LSTR(*ARG2) ,ctr); setVariable(varName, LSTR(Word)); // set stem variable @@ -597,10 +597,10 @@ void R_userid(int func) void R_listdsi(int func) { - char *argsÝ2¨; + char *args[2]; - char sFileNameÝ45¨; - char sFunctionCodeÝ3¨; + char sFileName[45]; + char sFunctionCode[3]; FILE *pFile; int iErr; @@ -621,20 +621,20 @@ void R_listdsi(int func) get_s(1); Lupper(ARG1); - argsÝ0¨= NULL; - argsÝ1¨= NULL; + args[0]= NULL; + args[1]= NULL; parseArgs(args, (char *)LSTR(*ARG1)); - if (argsÝ1¨ != NULL && strcmp(argsÝ1¨, "FILE") != 0) + if (args[1] != NULL && strcmp(args[1], "FILE") != 0) Lerror(ERR_INCORRECT_CALL,0); - if (argsÝ1¨ == NULL) { + if (args[1] == NULL) { _style = "//DSN:"; - quotationType = CheckQuotation(argsÝ0¨); + quotationType = CheckQuotation(args[0]); switch (quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sFileName, environment->SYSPREF); strcat(sFileName, "."); strcat(sFileName, (const char *) LSTR(*ARG1)); @@ -653,7 +653,7 @@ void R_listdsi(int func) } } else { - strcpy(sFileName,argsÝ0¨); + strcpy(sFileName,args[0]); _style = "//DDN:"; } @@ -675,8 +675,8 @@ void R_listdsi(int func) void R_sysdsn(int func) { - char sDSNameÝ45¨; - char sMessageÝ256¨; + char sDSName[45]; + char sMessage[256]; unsigned char *ptr; @@ -710,7 +710,7 @@ void R_sysdsn(int func) get_s(1); Lupper(ARG1); - if (LSTR(*ARG1)Ý0¨ == '\0') { + if (LSTR(*ARG1)[0] == '\0') { strcat(sMessage,MSG_MISSING_DSNAME); iErr = 1; } @@ -719,7 +719,7 @@ void R_sysdsn(int func) quotationType = CheckQuotation((char *)LSTR(*ARG1)); switch(quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sDSName, environment->SYSPREF); strcat(sDSName, "."); strcat(sDSName, (const char*)LSTR(*ARG1)); @@ -853,7 +853,7 @@ void R_stemcopy(int func) Lupper(ARG2); LASCIIZ(*ARG2); - tree = _procÝ_rx_proc¨.scope; + tree = _proc[_rx_proc].scope; // look up Source stem from = BinFind(tree, ARG2); @@ -917,18 +917,18 @@ R_dir( const int func ) FILE * fh; - char recordÝ256¨; - char memberNameÝ8 + 1¨; - char aliasNameÝ8 + 1¨; - char ttrÝ6 + 1¨; - char versionÝ5 + 1¨; - char creationDateÝ8 + 1¨; - char changeDateÝ8 + 1¨; - char changeTimeÝ8 + 1¨; - char initÝ5 + 1¨; - char currÝ5 + 1¨; - char modÝ5 + 1¨; - char uidÝ8 + 1¨; + char record[256]; + char memberName[8 + 1]; + char aliasName[8 + 1]; + char ttr[6 + 1]; + char version[5 + 1]; + char creationDate[8 + 1]; + char changeDate[8 + 1]; + char changeTime[8 + 1]; + char init[5 + 1]; + char curr[5 + 1]; + char mod[5 + 1]; + char uid[8 + 1]; unsigned char *currentPosition; @@ -942,8 +942,8 @@ R_dir( const int func ) long quit; short l; - char sDSNÝ45¨; - char lineÝ255¨; + char sDSN[45]; + char line[255]; char *sLine; int pdsecount = 0; @@ -980,8 +980,8 @@ R_dir( const int func ) while (fread(record, 1, 256, fh) == 256) { - currentPosition = (unsigned char *) &(recordÝ2¨); - bytes = ((short *) &(recordÝ0¨))Ý0¨; + currentPosition = (unsigned char *) &(record[2]); + bytes = ((short *) &(record[0]))[0]; count = 2; while (count < bytes) { @@ -999,14 +999,14 @@ R_dir( const int func ) { // remove trailing blanks long jj = 7; - while (memberNameÝjj¨ == ' ') jj--; - memberNameÝ++jj¨ = 0; + while (memberName[jj] == ' ') jj--; + memberName[++jj] = 0; } sLine += sprintf(sLine, "%-8s", memberName); currentPosition += 8; // skip current member name bzero(ttr, 7); - sprintf(ttr, "%.2X%.2X%.2X", currentPositionÝ0¨, currentPositionÝ1¨, currentPositionÝ2¨); + sprintf(ttr, "%.2X%.2X%.2X", currentPosition[0], currentPosition[1], currentPosition[2]); sLine += sprintf(sLine, " %-6s", ttr); currentPosition += 3; // skip ttr @@ -1030,20 +1030,20 @@ R_dir( const int func ) bzero(creationDate, 9); datePtr = (char *) &creationDate; - year = getYear(pUserData->credtÝ0¨, pUserData->credtÝ1¨); - day = getDay (pUserData->credtÝ2¨, pUserData->credtÝ3¨); + year = getYear(pUserData->credt[0], pUserData->credt[1]); + day = getDay (pUserData->credt[2], pUserData->credt[3]); julian2gregorian(year, day, &datePtr); sLine += sprintf(sLine, " %-8s", creationDate); bzero(changeDate, 9); datePtr = (char *) &changeDate; - year = getYear(pUserData->chgdtÝ0¨, pUserData->chgdtÝ1¨); - day = getDay (pUserData->chgdtÝ2¨, pUserData->chgdtÝ3¨); + year = getYear(pUserData->chgdt[0], pUserData->chgdt[1]); + day = getDay (pUserData->chgdt[2], pUserData->chgdt[3]); julian2gregorian(year, day, &datePtr); sLine += sprintf(sLine, " %-8s", changeDate); bzero(changeTime, 9); - sprintf(changeTime, "%.2x:%.2x:%.2x", (int)pUserData->chgtmÝ0¨, (int)pUserData->chgtmÝ1¨, (int)pUserData->chgss); + sprintf(changeTime, "%.2x:%.2x:%.2x", (int)pUserData->chgtm[0], (int)pUserData->chgtm[1], (int)pUserData->chgss); sLine += sprintf(sLine, " %-8s", changeTime); bzero(init, 6); @@ -1076,8 +1076,8 @@ R_dir( const int func ) { // remove trailing blanks long jj = 7; - while (aliasNameÝjj¨ == ' ') jj--; - aliasNameÝ++jj¨ = 0; + while (aliasName[jj] == ' ') jj--; + aliasName[++jj] = 0; } sLine += sprintf(sLine, " %.8s", aliasName); } @@ -1087,8 +1087,8 @@ R_dir( const int func ) quit = 1; break; } else { - char stemNameÝ13¨; // DIRENTRY (8) + . (1) + MAXDIRENTRY=3000 (4) - char varNameÝ32¨; + char stemName[13]; // DIRENTRY (8) + . (1) + MAXDIRENTRY=3000 (4) + char varName[32]; bzero(stemName, 13); bzero(varName, 32); @@ -1149,7 +1149,7 @@ R_cputime( const int func ) { int rc = 0; - char timeÝ16¨; + char time[16]; char *sTime = time; bzero(time, 16); @@ -1171,7 +1171,7 @@ int _EncryptString(const PLstr to, const PLstr from, const PLstr password) { plen=LLEN(*password); for (ki = 0, kj=0; ki < slen; ki++,kj++) { if (kj >= plen) kj = 0; - LSTR(*to)Ýki¨ = LSTR(*from)Ýki¨ ¬ LSTR(*password)Ýkj¨; + LSTR(*to)[ki] = LSTR(*from)[ki] ¬ LSTR(*password)[kj]; } LLEN(*to) = (size_t) slen; LTYPE(*to) = LSTRING_TY; @@ -1231,7 +1231,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { // run through encryption in several rounds for (ki = 1; ki <= rounds; ki++) { // Step 1: XOR String with Password for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨ = LSTR(*to)Ýkj¨ + hashv; + LSTR(*to)[kj] = LSTR(*to)[kj] + hashv; } hashv=(hashv+3)%127; _rotate(&pwt, pw, ki, 0); @@ -1243,7 +1243,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { _rotate(&pwt, pw, ki,0); slen = _EncryptString(to, to, &pwt); for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨=LSTR(*to)Ýkj¨-hashv; + LSTR(*to)[kj]=LSTR(*to)[kj]-hashv; } hashv=(hashv-3)%127; } @@ -1317,7 +1317,7 @@ void Lhash(const PLstr to, const PLstr from, long slots) { } for (ki = 0; ki < lhlen; ki++) { - value = (value + (LSTR(*from)Ýki¨) * pwr)%islots; + value = (value + (LSTR(*from)[ki]) * pwr)%islots; pwr = ((pwr * pcn) % islots); } } @@ -3218,7 +3218,7 @@ void R_rhash(int func) { // ------------------------------------------------------------------------------------- void R_removedsn(int func) { - char sFileNameÝ55¨; + char sFileName[55]; int remrc=-2, iErr=0,dbg=0; char* _style_old = _style; @@ -3248,11 +3248,11 @@ void R_removedsn(int func) // ------------------------------------------------------------------------------------- void R_renamedsn(int func) { - char sFileNameOldÝ55¨; + char sFileNameOld[55]; Lstr oldDSN, oldMember; - char sFileNameNewÝ55¨; + char sFileNameNew[55]; Lstr newDSN, newMember; - char sFunctionCodeÝ3¨; + char sFunctionCode[3]; int renrc=-9, iErr=0, p=0, dbg=0; char* _style_old = _style; @@ -3393,7 +3393,7 @@ void R_free(int func) void R_allocate(int func) { int iErr = 0, dbg=0; char *_style_old = _style; - char sFileNameÝ55¨; + char sFileName[55]; Lstr DSN, Member; __dyn_t dyn_parms; if (ARGN !=2) Lerror(ERR_INCORRECT_CALL, 0); @@ -3438,8 +3438,8 @@ void R_allocate(int func) { // ------------------------------------------------------------------------------------- void R_create(int func) { int iErr = 0,dbg=0; - char sFileNameÝ55¨; - char sFileDCBÝ128¨; + char sFileName[55]; + char sFileDCB[128]; char *_style_old = _style; FILE *fk ; // file handle @@ -3492,7 +3492,7 @@ void R_create(int func) { // ------------------------------------------------------------------------------------- void R_exists(int func) { int iErr = 0; - char sFileNameÝ55¨; + char sFileName[55]; char *_style_old = _style; FILE *fk; // file handle @@ -3524,7 +3524,7 @@ void R_magic(int func) void *pointer; long decAddr; int count; - char magicstrÝ64¨; + char magicstr[64]; char option='F'; @@ -3532,10 +3532,10 @@ void R_magic(int func) Lerror(ERR_INCORRECT_CALL,0); if (exist(1)) { L2STR(ARG1); - option = l2uÝ(byte)LSTR(*ARG1)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG1)[0]]; } - option = l2uÝ(byte)option¨; + option = l2u[(byte)option]; switch (option) { case 'F': @@ -3565,7 +3565,7 @@ void R_dummy(int func) #ifdef __CROSS__ - BinTree tree = _procÝ_rx_proc¨.scopeÝ0¨; + BinTree tree = _proc[_rx_proc].scope[0]; BinPrint(tree.parent, NULL); /* do { @@ -3760,7 +3760,7 @@ void parseArgs(char **array, char *str) char *p = strtok (str, " "); while (p != NULL) { - arrayÝi++¨ = p; + array[i++] = p; p = strtok (NULL, " "); } } @@ -3768,62 +3768,62 @@ void parseArgs(char **array, char *str) void parseDCB(FILE *pFile) { unsigned char *flags; - unsigned char sDsnÝ45¨; - unsigned char sDdnÝ9¨; - unsigned char sMemberÝ9¨; - unsigned char sSerialÝ7¨; - unsigned char sLreclÝ6¨; - unsigned char sBlkSizeÝ6¨; + unsigned char sDsn[45]; + unsigned char sDdn[9]; + unsigned char sMember[9]; + unsigned char sSerial[7]; + unsigned char sLrecl[6]; + unsigned char sBlkSize[6]; flags = malloc(11); __get_ddndsnmemb(fileno(pFile), (char *)sDdn, (char *)sDsn, (char *)sMember, (char *)sSerial, flags); /* DSN */ - if (sDsnÝ0¨ != '\0') + if (sDsn[0] != '\0') setVariable("SYSDSNAME", (char *)sDsn); /* DDN */ - if (sDdnÝ0¨ != '\0') + if (sDdn[0] != '\0') setVariable("SYSDDNAME", (char *)sDdn); /* MEMBER */ - if (sMemberÝ0¨ != '\0') + if (sMember[0] != '\0') setVariable("SYSMEMBER", (char *)sMember); /* VOLSER */ - if (sSerialÝ0¨ != '\0') + if (sSerial[0] != '\0') setVariable("SYSVOLUME", (char *)sSerial); /* DSORG */ - if(flagsÝ4¨ == 0x40) + if(flags[4] == 0x40) setVariable("SYSDSORG", "PS"); - else if (flagsÝ4¨ == 0x02) + else if (flags[4] == 0x02) setVariable("SYSDSORG", "PO"); else setVariable("SYSDSORG", "???"); /* RECFM */ - if(flagsÝ6¨ == 0x40) + if(flags[6] == 0x40) setVariable("SYSRECFM", "V"); - else if(flagsÝ6¨ == 0x50) + else if(flags[6] == 0x50) setVariable("SYSRECFM", "VB"); - else if(flagsÝ6¨ == 0x54) + else if(flags[6] == 0x54) setVariable("SYSRECFM", "VBA"); - else if(flagsÝ6¨ == 0x80) + else if(flags[6] == 0x80) setVariable("SYSRECFM", "F"); - else if(flagsÝ6¨ == 0x90) + else if(flags[6] == 0x90) setVariable("SYSRECFM", "FB"); - else if(flagsÝ6¨ == 0xC0) + else if(flags[6] == 0xC0) setVariable("SYSRECFM", "U"); else setVariable("SYSRECFM", "??????"); /* BLKSIZE */ - sprintf((char *)sBlkSize, "%d", flagsÝ8¨ | flagsÝ7¨ << 8); + sprintf((char *)sBlkSize, "%d", flags[8] | flags[7] << 8); setVariable("SYSBLKSIZE", (char *)sBlkSize); /* LRECL */ - sprintf((char *)sLrecl, "%d", flagsÝ10¨ | flagsÝ9¨ << 8); + sprintf((char *)sLrecl, "%d", flags[10] | flags[9] << 8); setVariable("SYSLRECL", (char *)sLrecl); free(flags); @@ -3841,10 +3841,10 @@ _getEctEnvBk() if (isTSO()) { psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; // TODO use cast to BYTE and + 48 ectenvbk = ect + 12; // 12 * 4 = 48 @@ -3910,7 +3910,7 @@ getVariable(char *sName, PLstr plsValue) char * getStemVariable(char *sName) { - char sValueÝ4097¨; + char sValue[4097]; Lstr lsScope,lsName,lsValue; LINITSTR(lsScope) @@ -3942,12 +3942,12 @@ getStemVariable(char *sName) LFREESTR(lsName) LFREESTR(lsValue) - return (char *)sValueÝ0¨; + return (char *)sValue[0]; } int getIntegerVariable(char *sName) { - char sValueÝ19¨; + char sValue[19]; PLstr plsValue; LPMALLOC(plsValue) getVariable(sName, plsValue); @@ -4014,7 +4014,7 @@ setVariable2(char *sName, char *sValue, int lValue) void setIntegerVariable(char *sName, int iValue) { - char sValueÝ19¨; + char sValue[19]; sprintf(sValue,"%d",iValue); setVariable(sName,sValue); @@ -4124,7 +4124,7 @@ SetClistVar(PLstr name, PLstr value) int findLoadModule(char *moduleName) { int iRet = 0; - char sTempÝ8¨; + char sTemp[8]; char *sToken; RX_BLDL_PARAMS bldlParams; @@ -4186,7 +4186,7 @@ int checkVariableBlacklist(PLstr name) Lupper(name); for (i = 0; i < BLACKLIST_SIZE; ++i) { - if (strcmp((char *)name->pstr,RX_VAR_BLACKLISTÝi¨) == 0) + if (strcmp((char *)name->pstr,RX_VAR_BLACKLIST[i]) == 0) return -1; } diff --git a/src/rxmvs066.c b/src/rxmvs066.c index 06daa7b3..f22e513a 100644 --- a/src/rxmvs066.c +++ b/src/rxmvs066.c @@ -89,7 +89,7 @@ int __get_ddndsnmemb (int handle, char * ddn, char * dsn, #endif #define BLACKLIST_SIZE 8 -char *RX_VAR_BLACKLISTÝBLACKLIST_SIZE¨ = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; +char *RX_VAR_BLACKLIST[BLACKLIST_SIZE] = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; #ifdef __CROSS__ /* ------------------------------------------------------------------------------------*/ @@ -100,7 +100,7 @@ getNextVar(void** nextPtr) BinLeaf *leaf = NULL; PLstr value = NULL; - currentTree = &(_procÝ_rx_proc¨.scopeÝ0¨); + currentTree = &(_proc[_rx_proc].scope[0]); if (*nextPtr == 0) { leaf = BinMin(currentTree->parent); @@ -115,7 +115,7 @@ getNextVar(void** nextPtr) /* while (leaf == NULL && i < VARTREES) { if (nextPtr == NULL) { - leaf = BinMin(_procÝ_rx_proc¨.scopeÝi¨.parent); + leaf = BinMin(_proc[_rx_proc].scope[i].parent); } else { leaf = BinSuccessor(nextPtr); } @@ -229,9 +229,9 @@ void R_listIt(int func) Lerror(ERR_INCORRECT_CALL,4,1); } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { printf("List all Variables\n"); printf("------------------\n"); BinPrint(tree.parent, NULL); @@ -307,10 +307,10 @@ void R_userid(int func) void R_listdsi(int func) { - char *argsÝ2¨; + char *args[2]; - char sFileNameÝ45¨; - char sFunctionCodeÝ3¨; + char sFileName[45]; + char sFunctionCode[3]; FILE *pFile; int iErr; @@ -331,20 +331,20 @@ void R_listdsi(int func) get_s(1); Lupper(ARG1); - argsÝ0¨= NULL; - argsÝ1¨= NULL; + args[0]= NULL; + args[1]= NULL; parseArgs(args, (char *)LSTR(*ARG1)); - if (argsÝ1¨ != NULL && strcmp(argsÝ1¨, "FILE") != 0) + if (args[1] != NULL && strcmp(args[1], "FILE") != 0) Lerror(ERR_INCORRECT_CALL,0); - if (argsÝ1¨ == NULL) { + if (args[1] == NULL) { _style = "//DSN:"; - quotationType = CheckQuotation(argsÝ0¨); + quotationType = CheckQuotation(args[0]); switch (quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sFileName, environment->SYSPREF); strcat(sFileName, "."); strcat(sFileName, (const char *) LSTR(*ARG1)); @@ -363,7 +363,7 @@ void R_listdsi(int func) } } else { - strcpy(sFileName,argsÝ0¨); + strcpy(sFileName,args[0]); _style = "//DDN:"; } @@ -385,8 +385,8 @@ void R_listdsi(int func) void R_sysdsn(int func) { - char sDSNameÝ45¨; - char sMessageÝ256¨; + char sDSName[45]; + char sMessage[256]; unsigned char *ptr; @@ -420,7 +420,7 @@ void R_sysdsn(int func) get_s(1); Lupper(ARG1); - if (LSTR(*ARG1)Ý0¨ == '\0') { + if (LSTR(*ARG1)[0] == '\0') { strcat(sMessage,MSG_MISSING_DSNAME); iErr = 1; } @@ -429,7 +429,7 @@ void R_sysdsn(int func) quotationType = CheckQuotation((char *)LSTR(*ARG1)); switch(quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sDSName, environment->SYSPREF); strcat(sDSName, "."); strcat(sDSName, (const char*)LSTR(*ARG1)); @@ -563,7 +563,7 @@ void R_stemcopy(int func) Lupper(ARG2); LASCIIZ(*ARG2); - tree = _procÝ_rx_proc¨.scope; + tree = _proc[_rx_proc].scope; // look up Source stem from = BinFind(tree, ARG2); @@ -621,11 +621,11 @@ void R_tcpopen(int func) { if ((inAddress) == INADDR_NONE) { host = gethostbyname(LSTR(*ARG1)); - if (host == NULL || host->h_addr_listÝ0¨ == NULL) { + if (host == NULL || host->h_addr_list[0] == NULL) { printf("Unknown host %s\n", (const char *)LSTR(*ARG1)); Lerror(ERR_INCORRECT_CALL,0); } else { - inAddress = ((long *)(host->h_addr_list Ý0¨)) Ý0¨; + inAddress = ((long *)(host->h_addr_list [0])) [0]; } } @@ -680,11 +680,11 @@ void R_tcprecv(int func) { int sock; long j; - char buffer Ý1024¨; - // char ip_adx Ý260¨; + char buffer [1024]; + // char ip_adx [260]; // SOCKADDR_IN Clocal_adx; // struct hostent * result; - // char newline Ý2¨ = {0x15, 0x00}; + // char newline [2] = {0x15, 0x00}; #ifdef JCC int lastError = 0; @@ -708,14 +708,14 @@ void R_tcprecv(int func) { ascii2ebcdic (buffer, j); #endif - if (buffer Ý0¨ == 55) { + if (buffer [0] == 55) { printf ("DBG> terminating at EOT.\n"); } // print to terminal - buffer Ýj¨ = 0; + buffer [j] = 0; - printf("DBG> received Ý%s¨ from server\n", buffer); + printf("DBG> received [%s] from server\n", buffer); } @@ -725,17 +725,17 @@ void R_tcpsend(int func) { long j; int sockerr=0; - char ip_adx Ý260¨; + char ip_adx [260]; SOCKADDR_IN Clocal_adx; struct hostent * result; - char buffer Ý1024¨; - char newline Ý2¨ = {0x15, 0x00}; + char buffer [1024]; + char newline [2] = {0x15, 0x00}; L2INT(ARG1); Ccom_han = LINT(*ARG1); strcpy (buffer, LSTR(*ARG2)); - printf("DBG> sending Ý%s¨ to server\n", buffer); + printf("DBG> sending [%s] to server\n", buffer); j = strlen (buffer); #ifdef JCC @@ -764,7 +764,7 @@ int _EncryptString(const PLstr to, const PLstr from, const PLstr password) { plen=LLEN(*password); for (ki = 0, kj=0; ki < slen; ki++,kj++) { if (kj >= plen) kj = 0; - LSTR(*to)Ýki¨ = LSTR(*from)Ýki¨ ¬ LSTR(*password)Ýkj¨; + LSTR(*to)[ki] = LSTR(*from)[ki] ¬ LSTR(*password)[kj]; } LLEN(*to) = (size_t) slen; LTYPE(*to) = LSTRING_TY; @@ -824,7 +824,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { // run through encryption in several rounds for (ki = 1; ki <= rounds; ki++) { // Step 1: XOR String with Password for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨ = LSTR(*to)Ýkj¨ + hashv; + LSTR(*to)[kj] = LSTR(*to)[kj] + hashv; } hashv=(hashv+3)%127; _rotate(&pwt, pw, ki, 0); @@ -836,7 +836,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { _rotate(&pwt, pw, ki,0); slen = _EncryptString(to, to, &pwt); for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨=LSTR(*to)Ýkj¨-hashv; + LSTR(*to)[kj]=LSTR(*to)[kj]-hashv; } hashv=(hashv-3)%127; } @@ -910,7 +910,7 @@ void Lhash(const PLstr to, const PLstr from, long slots) { } for (ki = 0; ki < lhlen; ki++) { - value = (value + (LSTR(*from)Ýki¨) * pwr)%islots; + value = (value + (LSTR(*from)[ki]) * pwr)%islots; pwr = ((pwr * pcn) % islots); } } @@ -933,7 +933,7 @@ void R_rhash(int func) { // ------------------------------------------------------------------------------------- void R_removedsn(int func) { - char sFileNameÝ45¨; + char sFileName[45]; int remrc=-2, iErr=0; char* _style_old = _style; @@ -960,9 +960,9 @@ void R_removedsn(int func) // ------------------------------------------------------------------------------------- void R_renamedsn(int func) { - char sFileNameOldÝ45¨; - char sFileNameNewÝ45¨; - char sFunctionCodeÝ3¨; + char sFileNameOld[45]; + char sFileNameNew[45]; + char sFunctionCode[3]; int remrc=-2, iErr=0; char* _style_old = _style; @@ -1017,7 +1017,7 @@ void R_free(int func) // ------------------------------------------------------------------------------------- void R_allocate(int func) { int iErr = 0; - char sFileNameÝ45¨; + char sFileName[45]; char *_style_old = _style; __dyn_t dyn_parms; @@ -1057,7 +1057,7 @@ void R_magic(int func) void *pointer; long decAddr; int count; - char magicstrÝ64¨; + char magicstr[64]; char option='F'; @@ -1065,10 +1065,10 @@ void R_magic(int func) Lerror(ERR_INCORRECT_CALL,0); if (exist(1)) { L2STR(ARG1); - option = l2uÝ(byte)LSTR(*ARG1)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG1)[0]]; } - option = l2uÝ(byte)option¨; + option = l2u[(byte)option]; switch (option) { case 'F': @@ -1098,7 +1098,7 @@ void R_dummy(int func) #ifdef __CROSS__ - BinTree tree = _procÝ_rx_proc¨.scopeÝ0¨; + BinTree tree = _proc[_rx_proc].scope[0]; BinPrint(tree.parent, NULL); /* do { @@ -1301,7 +1301,7 @@ void parseArgs(char **array, char *str) char *p = strtok (str, " "); while (p != NULL) { - arrayÝi++¨ = p; + array[i++] = p; p = strtok (NULL, " "); } } @@ -1309,62 +1309,62 @@ void parseArgs(char **array, char *str) void parseDCB(FILE *pFile) { unsigned char *flags; - unsigned char sDsnÝ45¨; - unsigned char sDdnÝ9¨; - unsigned char sMemberÝ9¨; - unsigned char sSerialÝ7¨; - unsigned char sLreclÝ6¨; - unsigned char sBlkSizeÝ6¨; + unsigned char sDsn[45]; + unsigned char sDdn[9]; + unsigned char sMember[9]; + unsigned char sSerial[7]; + unsigned char sLrecl[6]; + unsigned char sBlkSize[6]; flags = malloc(11); __get_ddndsnmemb(fileno(pFile), (char *)sDdn, (char *)sDsn, (char *)sMember, (char *)sSerial, flags); /* DSN */ - if (sDsnÝ0¨ != '\0') + if (sDsn[0] != '\0') setVariable("SYSDSNAME", (char *)sDsn); /* DDN */ - if (sDdnÝ0¨ != '\0') + if (sDdn[0] != '\0') setVariable("SYSDDNAME", (char *)sDdn); /* MEMBER */ - if (sMemberÝ0¨ != '\0') + if (sMember[0] != '\0') setVariable("SYSMEMBER", (char *)sMember); /* VOLSER */ - if (sSerialÝ0¨ != '\0') + if (sSerial[0] != '\0') setVariable("SYSVOLUME", (char *)sSerial); /* DSORG */ - if(flagsÝ4¨ == 0x40) + if(flags[4] == 0x40) setVariable("SYSDSORG", "PS"); - else if (flagsÝ4¨ == 0x02) + else if (flags[4] == 0x02) setVariable("SYSDSORG", "PO"); else setVariable("SYSDSORG", "???"); /* RECFM */ - if(flagsÝ6¨ == 0x40) + if(flags[6] == 0x40) setVariable("SYSRECFM", "V"); - else if(flagsÝ6¨ == 0x50) + else if(flags[6] == 0x50) setVariable("SYSRECFM", "VB"); - else if(flagsÝ6¨ == 0x54) + else if(flags[6] == 0x54) setVariable("SYSRECFM", "VBA"); - else if(flagsÝ6¨ == 0x80) + else if(flags[6] == 0x80) setVariable("SYSRECFM", "F"); - else if(flagsÝ6¨ == 0x90) + else if(flags[6] == 0x90) setVariable("SYSRECFM", "FB"); - else if(flagsÝ6¨ == 0xC0) + else if(flags[6] == 0xC0) setVariable("SYSRECFM", "U"); else setVariable("SYSRECFM", "??????"); /* BLKSIZE */ - sprintf((char *)sBlkSize, "%d", flagsÝ8¨ | flagsÝ7¨ << 8); + sprintf((char *)sBlkSize, "%d", flags[8] | flags[7] << 8); setVariable("SYSBLKSIZE", (char *)sBlkSize); /* LRECL */ - sprintf((char *)sLrecl, "%d", flagsÝ10¨ | flagsÝ9¨ << 8); + sprintf((char *)sLrecl, "%d", flags[10] | flags[9] << 8); setVariable("SYSLRECL", (char *)sLrecl); free(flags); @@ -1382,10 +1382,10 @@ _getEctEnvBk() if (isTSO()) { psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; ectenvbk = ect + 48; @@ -1450,7 +1450,7 @@ getVariable(char *sName, PLstr plsValue) char * getStemVariable(char *sName) { - char sValueÝ4097¨; + char sValue[4097]; Lstr lsScope,lsName,lsValue; LINITSTR(lsScope) @@ -1482,12 +1482,12 @@ getStemVariable(char *sName) LFREESTR(lsName) LFREESTR(lsValue) - return (char *)sValueÝ0¨; + return (char *)sValue[0]; } int getIntegerVariable(char *sName) { - char sValueÝ19¨; + char sValue[19]; PLstr plsValue; LPMALLOC(plsValue) getVariable(sName, plsValue); @@ -1555,7 +1555,7 @@ setVariable2(char *sName, char *sValue, int lValue) void setIntegerVariable(char *sName, int iValue) { - char sValueÝ19¨; + char sValue[19]; sprintf(sValue,"%d",iValue); setVariable(sName,sValue); @@ -1665,7 +1665,7 @@ SetClistVar(PLstr name, PLstr value) int findLoadModule(char *moduleName) { int iRet = 0; - char sTempÝ8¨; + char sTemp[8]; char *sToken; RX_BLDL_PARAMS bldlParams; @@ -1727,7 +1727,7 @@ int checkVariableBlacklist(PLstr name) Lupper(name); for (i = 0; i < BLACKLIST_SIZE; ++i) { - if (strcmp((char *)name->pstr,RX_VAR_BLACKLISTÝi¨) == 0) + if (strcmp((char *)name->pstr,RX_VAR_BLACKLIST[i]) == 0) return -1; } diff --git a/src/rxmvs2.c b/src/rxmvs2.c index 719375dc..aee26a67 100644 --- a/src/rxmvs2.c +++ b/src/rxmvs2.c @@ -58,7 +58,7 @@ int __get_ddndsnmemb (int handle, char * ddn, char * dsn, #endif #define BLACKLIST_SIZE 8 -char *RX_VAR_BLACKLISTÝBLACKLIST_SIZE¨ = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; +char *RX_VAR_BLACKLIST[BLACKLIST_SIZE] = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; void R_wto(int func) { @@ -160,10 +160,10 @@ void R_userid(int func) void R_listdsi(int func) { - char *argsÝ2¨; + char *args[2]; - char sFileNameÝ45¨; - char sFunctionCodeÝ3¨; + char sFileName[45]; + char sFunctionCode[3]; FILE *pFile; int iErr; @@ -184,20 +184,20 @@ void R_listdsi(int func) get_s(1); Lupper(ARG1); - argsÝ0¨= NULL; - argsÝ1¨= NULL; + args[0]= NULL; + args[1]= NULL; parseArgs(args, (char *)LSTR(*ARG1)); - if (argsÝ1¨ != NULL && strcmp(argsÝ1¨, "FILE") != 0) + if (args[1] != NULL && strcmp(args[1], "FILE") != 0) Lerror(ERR_INCORRECT_CALL,0); - if (argsÝ1¨ == NULL) { + if (args[1] == NULL) { _style = "//DSN:"; - quotationType = CheckQuotation(argsÝ0¨); + quotationType = CheckQuotation(args[0]); switch (quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sFileName, environment->SYSPREF); strcat(sFileName, "."); strcat(sFileName, (const char *) LSTR(*ARG1)); @@ -216,7 +216,7 @@ void R_listdsi(int func) } } else { - strcpy(sFileName,argsÝ0¨); + strcpy(sFileName,args[0]); _style = "//DDN:"; } @@ -238,8 +238,8 @@ void R_listdsi(int func) void R_sysdsn(int func) { - char sDSNameÝ45¨; - char sMessageÝ256¨; + char sDSName[45]; + char sMessage[256]; unsigned char *ptr; @@ -273,7 +273,7 @@ void R_sysdsn(int func) get_s(1); Lupper(ARG1); - if (LSTR(*ARG1)Ý0¨ == '\0') { + if (LSTR(*ARG1)[0] == '\0') { strcat(sMessage,MSG_MISSING_DSNAME); iErr = 1; } @@ -282,7 +282,7 @@ void R_sysdsn(int func) quotationType = CheckQuotation((char *)LSTR(*ARG1)); switch(quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sDSName, environment->SYSPREF); strcat(sDSName, "."); strcat(sDSName, (const char*)LSTR(*ARG1)); @@ -403,7 +403,7 @@ void R_magic(int func) void *pointer; long decAddr; int count; - char magicstrÝ64¨; + char magicstr[64]; char option='F'; @@ -411,10 +411,10 @@ void R_magic(int func) Lerror(ERR_INCORRECT_CALL,0); if (exist(1)) { L2STR(ARG1); - option = l2uÝ(byte)LSTR(*ARG1)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG1)[0]]; } - option = l2uÝ(byte)option¨; + option = l2u[(byte)option]; switch (option) { case 'F': @@ -455,16 +455,16 @@ int RxMvsInitialize() int rc = 0; #if __FOO__ - if (entry_R13 Ý6¨ != 0) { + if (entry_R13 [6] != 0) { - cppl = entry_R13Ý6¨; + cppl = entry_R13[6]; #ifdef __DEBUG__ printf("DBG> TSO environment found\n"); printf("DBG> SA at %08X\n", (unsigned) entry_R13); - printf("DBG> CPPL (R1) at %08X\n", (short) entry_R13Ý6¨); + printf("DBG> CPPL (R1) at %08X\n", (short) entry_R13[6]); - ect = cpplÝ3¨; + ect = cppl[3]; printf("DBG> ECT at %08X\n", (unsigned)ect); @@ -629,7 +629,7 @@ void parseArgs(char **array, char *str) char *p = strtok (str, " "); while (p != NULL) { - arrayÝi++¨ = p; + array[i++] = p; p = strtok (NULL, " "); } } @@ -637,62 +637,62 @@ void parseArgs(char **array, char *str) void parseDCB(FILE *pFile) { unsigned char *flags; - unsigned char sDsnÝ45¨; - unsigned char sDdnÝ9¨; - unsigned char sMemberÝ9¨; - unsigned char sSerialÝ7¨; - unsigned char sLreclÝ6¨; - unsigned char sBlkSizeÝ6¨; + unsigned char sDsn[45]; + unsigned char sDdn[9]; + unsigned char sMember[9]; + unsigned char sSerial[7]; + unsigned char sLrecl[6]; + unsigned char sBlkSize[6]; flags = malloc(11); __get_ddndsnmemb(fileno(pFile), (char *)sDdn, (char *)sDsn, (char *)sMember, (char *)sSerial, flags); /* DSN */ - if (sDsnÝ0¨ != '\0') + if (sDsn[0] != '\0') setVariable("SYSDSNAME", (char *)sDsn); /* DDN */ - if (sDdnÝ0¨ != '\0') + if (sDdn[0] != '\0') setVariable("SYSDDNAME", (char *)sDdn); /* MEMBER */ - if (sMemberÝ0¨ != '\0') + if (sMember[0] != '\0') setVariable("SYSMEMBER", (char *)sMember); /* VOLSER */ - if (sSerialÝ0¨ != '\0') + if (sSerial[0] != '\0') setVariable("SYSVOLUME", (char *)sSerial); /* DSORG */ - if(flagsÝ4¨ == 0x40) + if(flags[4] == 0x40) setVariable("SYSDSORG", "PS"); - else if (flagsÝ4¨ == 0x02) + else if (flags[4] == 0x02) setVariable("SYSDSORG", "PO"); else setVariable("SYSDSORG", "???"); /* RECFM */ - if(flagsÝ6¨ == 0x40) + if(flags[6] == 0x40) setVariable("SYSRECFM", "V"); - else if(flagsÝ6¨ == 0x50) + else if(flags[6] == 0x50) setVariable("SYSRECFM", "VB"); - else if(flagsÝ6¨ == 0x54) + else if(flags[6] == 0x54) setVariable("SYSRECFM", "VBA"); - else if(flagsÝ6¨ == 0x80) + else if(flags[6] == 0x80) setVariable("SYSRECFM", "F"); - else if(flagsÝ6¨ == 0x90) + else if(flags[6] == 0x90) setVariable("SYSRECFM", "FB"); - else if(flagsÝ6¨ == 0xC0) + else if(flags[6] == 0xC0) setVariable("SYSRECFM", "U"); else setVariable("SYSRECFM", "??????"); /* BLKSIZE */ - sprintf((char *)sBlkSize, "%d", flagsÝ8¨ | flagsÝ7¨ << 8); + sprintf((char *)sBlkSize, "%d", flags[8] | flags[7] << 8); setVariable("SYSBLKSIZE", (char *)sBlkSize); /* LRECL */ - sprintf((char *)sLrecl, "%d", flagsÝ10¨ | flagsÝ9¨ << 8); + sprintf((char *)sLrecl, "%d", flags[10] | flags[9] << 8); setVariable("SYSLRECL", (char *)sLrecl); free(flags); @@ -709,10 +709,10 @@ void *_getEctEnvBk() if (isTSO()) { psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; ectenvbk = ect + 48; } else { ectenvbk = NULL; @@ -773,7 +773,7 @@ getVariable(char *sName, PLstr plsValue) char * getStemVariable(char *sName) { - char sValueÝ4097¨; + char sValue[4097]; Lstr lsScope,lsName,lsValue; LINITSTR(lsScope) @@ -805,12 +805,12 @@ getStemVariable(char *sName) LFREESTR(lsName) LFREESTR(lsValue) - return (char *)sValueÝ0¨; + return (char *)sValue[0]; } int getIntegerVariable(char *sName) { - char sValueÝ19¨; + char sValue[19]; PLstr plsValue; LPMALLOC(plsValue) getVariable(sName, plsValue); @@ -878,7 +878,7 @@ setVariable2(char *sName, char *sValue, int lValue) void setIntegerVariable(char *sName, int iValue) { - char sValueÝ19¨; + char sValue[19]; sprintf(sValue,"%d",iValue); setVariable(sName,sValue); @@ -988,7 +988,7 @@ SetClistVar(PLstr name, PLstr value) int findLoadModule(char *moduleName) { int iRet = 0; - char sTempÝ8¨; + char sTemp[8]; char *sToken; RX_BLDL_PARAMS bldlParams; @@ -1050,7 +1050,7 @@ int checkVariableBlacklist(PLstr name) Lupper(name); for (i = 0; i < BLACKLIST_SIZE; ++i) { - if (strcmp((char *)name->pstr,RX_VAR_BLACKLISTÝi¨) == 0) + if (strcmp((char *)name->pstr,RX_VAR_BLACKLIST[i]) == 0) return -1; } diff --git a/src/rxmvs278.c b/src/rxmvs278.c index 339250b7..3089d6a1 100644 --- a/src/rxmvs278.c +++ b/src/rxmvs278.c @@ -45,18 +45,18 @@ typedef struct { BYTE mlvl; // modification level BYTE res1; // reserver BYTE chgss; // X { SS } - BYTE credtÝ4¨; // PL4 { signed packed - BYTE chgdtÝ4¨; // PL4 julian date } - BYTE chgtmÝ2¨; // XL2 { HHMM } + BYTE credt[4]; // PL4 { signed packed + BYTE chgdt[4]; // PL4 julian date } + BYTE chgtm[2]; // XL2 { HHMM } short curr; // number of current records short init; // number of initial records short mod ; // number of modified records - char uidÝ10¨; + char uid[10]; } USER_DATA, *P_USER_DATA; void julian2gregorian(int year, int day, char **date) { - static const int month_lenݨ = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + static const int month_len[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int leap = (year % 4 == 0) && (year % 100 != 0 || year % 400 == 0); int day_of_month = day; @@ -64,7 +64,7 @@ void julian2gregorian(int year, int day, char **date) for (month = 0; month < 12; month ++) { - int mlen = month_lenÝmonth¨; + int mlen = month_len[month]; if (leap && month == 1) mlen ++; @@ -82,7 +82,7 @@ void julian2gregorian(int year, int day, char **date) int getYear(BYTE flag, BYTE yy) { int year = 0; - char tmpÝ2¨; + char tmp[2]; bzero(tmp, 2); sprintf(tmp, "%x", yy); @@ -102,7 +102,7 @@ int getYear(BYTE flag, BYTE yy) { int getDay(BYTE byte1, BYTE byte2) { int day = 0; - char tmpÝ3¨; + char tmp[3]; bzero(tmp, 3); sprintf(tmp, "%.1x%.1x%.1x", (byte1 >> 4) & 0x0F, byte1 & 0x0F, (byte2 >> 4) & 0x0F ); @@ -138,7 +138,7 @@ int __get_ddndsnmemb (int handle, char * ddn, char * dsn, #endif #define BLACKLIST_SIZE 8 -char *RX_VAR_BLACKLISTÝBLACKLIST_SIZE¨ = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; +char *RX_VAR_BLACKLIST[BLACKLIST_SIZE] = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; #ifdef __CROSS__ /* ------------------------------------------------------------------------------------*/ @@ -149,7 +149,7 @@ getNextVar(void** nextPtr) BinLeaf *leaf = NULL; PLstr value = NULL; - currentTree = &(_procÝ_rx_proc¨.scopeÝ0¨); + currentTree = &(_proc[_rx_proc].scope[0]); if (*nextPtr == 0) { leaf = BinMin(currentTree->parent); @@ -164,7 +164,7 @@ getNextVar(void** nextPtr) /* while (leaf == NULL && i < VARTREES) { if (nextPtr == NULL) { - leaf = BinMin(_procÝ_rx_proc¨.scopeÝi¨.parent); + leaf = BinMin(_proc[_rx_proc].scope[i].parent); } else { leaf = BinSuccessor(nextPtr); } @@ -196,11 +196,11 @@ void R_catchIt(int func) void ** cppl; - if (__libc_tso_status == 1 && entry_R13 Ý6¨ != 0) { + if (__libc_tso_status == 1 && entry_R13 [6] != 0) { rc = 42; - cppl = entry_R13Ý6¨; + cppl = entry_R13[6]; tso_parameter = malloc(sizeof(RX_TSO_PARAMS)); memset(tso_parameter, 00, sizeof(RX_TSO_PARAMS)); @@ -307,9 +307,9 @@ void R_listIt(int func) Lerror(ERR_INCORRECT_CALL,4,1); } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { printf("List all Variables\n"); printf("------------------\n"); BinPrint(tree.parent, NULL); @@ -349,13 +349,13 @@ void R_vlist(int func) if (exist(2)) { L2STR(ARG2); Lupper(ARG2); - if (LSTR(*ARG2)Ý0¨ == 'V') mode = 1; - else if (LSTR(*ARG2)Ý0¨ == 'N') mode = 2; + if (LSTR(*ARG2)[0] == 'V') mode = 1; + else if (LSTR(*ARG2)[0] == 'N') mode = 2; } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { BinVarDump(ARGR,tree.parent, NULL,mode); } else { LASCIIZ(*ARG1) ; @@ -478,10 +478,10 @@ void R_userid(int func) void R_listdsi(int func) { - char *argsÝ2¨; + char *args[2]; - char sFileNameÝ45¨; - char sFunctionCodeÝ3¨; + char sFileName[45]; + char sFunctionCode[3]; FILE *pFile; int iErr; @@ -502,20 +502,20 @@ void R_listdsi(int func) get_s(1); Lupper(ARG1); - argsÝ0¨= NULL; - argsÝ1¨= NULL; + args[0]= NULL; + args[1]= NULL; parseArgs(args, (char *)LSTR(*ARG1)); - if (argsÝ1¨ != NULL && strcmp(argsÝ1¨, "FILE") != 0) + if (args[1] != NULL && strcmp(args[1], "FILE") != 0) Lerror(ERR_INCORRECT_CALL,0); - if (argsÝ1¨ == NULL) { + if (args[1] == NULL) { _style = "//DSN:"; - quotationType = CheckQuotation(argsÝ0¨); + quotationType = CheckQuotation(args[0]); switch (quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sFileName, environment->SYSPREF); strcat(sFileName, "."); strcat(sFileName, (const char *) LSTR(*ARG1)); @@ -534,7 +534,7 @@ void R_listdsi(int func) } } else { - strcpy(sFileName,argsÝ0¨); + strcpy(sFileName,args[0]); _style = "//DDN:"; } @@ -556,8 +556,8 @@ void R_listdsi(int func) void R_sysdsn(int func) { - char sDSNameÝ45¨; - char sMessageÝ256¨; + char sDSName[45]; + char sMessage[256]; unsigned char *ptr; @@ -591,7 +591,7 @@ void R_sysdsn(int func) get_s(1); Lupper(ARG1); - if (LSTR(*ARG1)Ý0¨ == '\0') { + if (LSTR(*ARG1)[0] == '\0') { strcat(sMessage,MSG_MISSING_DSNAME); iErr = 1; } @@ -600,7 +600,7 @@ void R_sysdsn(int func) quotationType = CheckQuotation((char *)LSTR(*ARG1)); switch(quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sDSName, environment->SYSPREF); strcat(sDSName, "."); strcat(sDSName, (const char*)LSTR(*ARG1)); @@ -734,7 +734,7 @@ void R_stemcopy(int func) Lupper(ARG2); LASCIIZ(*ARG2); - tree = _procÝ_rx_proc¨.scope; + tree = _proc[_rx_proc].scope; // look up Source stem from = BinFind(tree, ARG2); @@ -798,18 +798,18 @@ R_dir( const int func ) FILE * fh; - char recordÝ256¨; - char memberNameÝ8 + 1¨; - char aliasNameÝ8 + 1¨; - char ttrÝ6 + 1¨; - char versionÝ5 + 1¨; - char creationDateÝ8 + 1¨; - char changeDateÝ8 + 1¨; - char changeTimeÝ8 + 1¨; - char initÝ5 + 1¨; - char currÝ5 + 1¨; - char modÝ5 + 1¨; - char uidÝ8 + 1¨; + char record[256]; + char memberName[8 + 1]; + char aliasName[8 + 1]; + char ttr[6 + 1]; + char version[5 + 1]; + char creationDate[8 + 1]; + char changeDate[8 + 1]; + char changeTime[8 + 1]; + char init[5 + 1]; + char curr[5 + 1]; + char mod[5 + 1]; + char uid[8 + 1]; unsigned char *currentPosition; @@ -823,8 +823,8 @@ R_dir( const int func ) long quit; short l; - char sDSNÝ45¨; - char lineÝ255¨; + char sDSN[45]; + char line[255]; char *sLine; int pdsecount = 0; @@ -861,8 +861,8 @@ R_dir( const int func ) while (fread(record, 1, 256, fh) == 256) { - currentPosition = (unsigned char *) &(recordÝ2¨); - bytes = ((short *) &(recordÝ0¨))Ý0¨; + currentPosition = (unsigned char *) &(record[2]); + bytes = ((short *) &(record[0]))[0]; count = 2; while (count < bytes) { @@ -880,14 +880,14 @@ R_dir( const int func ) { // remove trailing blanks long jj = 7; - while (memberNameÝjj¨ == ' ') jj--; - memberNameÝ++jj¨ = 0; + while (memberName[jj] == ' ') jj--; + memberName[++jj] = 0; } sLine += sprintf(sLine, "%-8s", memberName); currentPosition += 8; // skip current member name bzero(ttr, 7); - sprintf(ttr, "%.2X%.2X%.2X", currentPositionÝ0¨, currentPositionÝ1¨, currentPositionÝ2¨); + sprintf(ttr, "%.2X%.2X%.2X", currentPosition[0], currentPosition[1], currentPosition[2]); sLine += sprintf(sLine, " %-6s", ttr); currentPosition += 3; // skip ttr @@ -911,20 +911,20 @@ R_dir( const int func ) bzero(creationDate, 9); datePtr = (char *) &creationDate; - year = getYear(pUserData->credtÝ0¨, pUserData->credtÝ1¨); - day = getDay (pUserData->credtÝ2¨, pUserData->credtÝ3¨); + year = getYear(pUserData->credt[0], pUserData->credt[1]); + day = getDay (pUserData->credt[2], pUserData->credt[3]); julian2gregorian(year, day, &datePtr); sLine += sprintf(sLine, " %-8s", creationDate); bzero(changeDate, 9); datePtr = (char *) &changeDate; - year = getYear(pUserData->chgdtÝ0¨, pUserData->chgdtÝ1¨); - day = getDay (pUserData->chgdtÝ2¨, pUserData->chgdtÝ3¨); + year = getYear(pUserData->chgdt[0], pUserData->chgdt[1]); + day = getDay (pUserData->chgdt[2], pUserData->chgdt[3]); julian2gregorian(year, day, &datePtr); sLine += sprintf(sLine, " %-8s", changeDate); bzero(changeTime, 9); - sprintf(changeTime, "%.2x:%.2x:%.2x", (int)pUserData->chgtmÝ0¨, (int)pUserData->chgtmÝ1¨, (int)pUserData->chgss); + sprintf(changeTime, "%.2x:%.2x:%.2x", (int)pUserData->chgtm[0], (int)pUserData->chgtm[1], (int)pUserData->chgss); sLine += sprintf(sLine, " %-8s", changeTime); bzero(init, 6); @@ -957,8 +957,8 @@ R_dir( const int func ) { // remove trailing blanks long jj = 7; - while (aliasNameÝjj¨ == ' ') jj--; - aliasNameÝ++jj¨ = 0; + while (aliasName[jj] == ' ') jj--; + aliasName[++jj] = 0; } sLine += sprintf(sLine, " %.8s", aliasName); } @@ -968,8 +968,8 @@ R_dir( const int func ) quit = 1; break; } else { - char stemNameÝ13¨; // DIRENTRY (8) + . (1) + MAXDIRENTRY=3000 (4) - char varNameÝ32¨; + char stemName[13]; // DIRENTRY (8) + . (1) + MAXDIRENTRY=3000 (4) + char varName[32]; bzero(stemName, 13); bzero(varName, 32); @@ -1036,7 +1036,7 @@ int _EncryptString(const PLstr to, const PLstr from, const PLstr password) { plen=LLEN(*password); for (ki = 0, kj=0; ki < slen; ki++,kj++) { if (kj >= plen) kj = 0; - LSTR(*to)Ýki¨ = LSTR(*from)Ýki¨ ¬ LSTR(*password)Ýkj¨; + LSTR(*to)[ki] = LSTR(*from)[ki] ¬ LSTR(*password)[kj]; } LLEN(*to) = (size_t) slen; LTYPE(*to) = LSTRING_TY; @@ -1096,7 +1096,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { // run through encryption in several rounds for (ki = 1; ki <= rounds; ki++) { // Step 1: XOR String with Password for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨ = LSTR(*to)Ýkj¨ + hashv; + LSTR(*to)[kj] = LSTR(*to)[kj] + hashv; } hashv=(hashv+3)%127; _rotate(&pwt, pw, ki, 0); @@ -1108,7 +1108,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { _rotate(&pwt, pw, ki,0); slen = _EncryptString(to, to, &pwt); for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨=LSTR(*to)Ýkj¨-hashv; + LSTR(*to)[kj]=LSTR(*to)[kj]-hashv; } hashv=(hashv-3)%127; } @@ -1182,7 +1182,7 @@ void Lhash(const PLstr to, const PLstr from, long slots) { } for (ki = 0; ki < lhlen; ki++) { - value = (value + (LSTR(*from)Ýki¨) * pwr)%islots; + value = (value + (LSTR(*from)[ki]) * pwr)%islots; pwr = ((pwr * pcn) % islots); } } @@ -1206,7 +1206,7 @@ void R_rhash(int func) { // ------------------------------------------------------------------------------------- void R_removedsn(int func) { - char sFileNameÝ55¨; + char sFileName[55]; int remrc=-2, iErr=0,dbg=0; char* _style_old = _style; @@ -1236,11 +1236,11 @@ void R_removedsn(int func) // ------------------------------------------------------------------------------------- void R_renamedsn(int func) { - char sFileNameOldÝ55¨; + char sFileNameOld[55]; Lstr oldDSN, oldMember; - char sFileNameNewÝ55¨; + char sFileNameNew[55]; Lstr newDSN, newMember; - char sFunctionCodeÝ3¨; + char sFunctionCode[3]; int renrc=-9, iErr=0, p=0, dbg=0; char* _style_old = _style; @@ -1380,7 +1380,7 @@ void R_free(int func) void R_allocate(int func) { int iErr = 0, dbg=0; char *_style_old = _style; - char sFileNameÝ55¨; + char sFileName[55]; Lstr DSN, Member; __dyn_t dyn_parms; if (ARGN !=2) Lerror(ERR_INCORRECT_CALL, 0); @@ -1425,8 +1425,8 @@ void R_allocate(int func) { // ------------------------------------------------------------------------------------- void R_create(int func) { int iErr = 0,dbg=0; - char sFileNameÝ55¨; - char sFileDCBÝ128¨; + char sFileName[55]; + char sFileDCB[128]; char *_style_old = _style; FILE *fk ; // file handle @@ -1479,7 +1479,7 @@ void R_create(int func) { // ------------------------------------------------------------------------------------- void R_exists(int func) { int iErr = 0; - char sFileNameÝ55¨; + char sFileName[55]; char *_style_old = _style; FILE *fk; // file handle @@ -1511,7 +1511,7 @@ void R_magic(int func) void *pointer; long decAddr; int count; - char magicstrÝ64¨; + char magicstr[64]; char option='F'; @@ -1519,10 +1519,10 @@ void R_magic(int func) Lerror(ERR_INCORRECT_CALL,0); if (exist(1)) { L2STR(ARG1); - option = l2uÝ(byte)LSTR(*ARG1)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG1)[0]]; } - option = l2uÝ(byte)option¨; + option = l2u[(byte)option]; switch (option) { case 'F': @@ -1552,7 +1552,7 @@ void R_dummy(int func) #ifdef __CROSS__ - BinTree tree = _procÝ_rx_proc¨.scopeÝ0¨; + BinTree tree = _proc[_rx_proc].scope[0]; BinPrint(tree.parent, NULL); /* do { @@ -1744,7 +1744,7 @@ void parseArgs(char **array, char *str) char *p = strtok (str, " "); while (p != NULL) { - arrayÝi++¨ = p; + array[i++] = p; p = strtok (NULL, " "); } } @@ -1752,62 +1752,62 @@ void parseArgs(char **array, char *str) void parseDCB(FILE *pFile) { unsigned char *flags; - unsigned char sDsnÝ45¨; - unsigned char sDdnÝ9¨; - unsigned char sMemberÝ9¨; - unsigned char sSerialÝ7¨; - unsigned char sLreclÝ6¨; - unsigned char sBlkSizeÝ6¨; + unsigned char sDsn[45]; + unsigned char sDdn[9]; + unsigned char sMember[9]; + unsigned char sSerial[7]; + unsigned char sLrecl[6]; + unsigned char sBlkSize[6]; flags = malloc(11); __get_ddndsnmemb(fileno(pFile), (char *)sDdn, (char *)sDsn, (char *)sMember, (char *)sSerial, flags); /* DSN */ - if (sDsnÝ0¨ != '\0') + if (sDsn[0] != '\0') setVariable("SYSDSNAME", (char *)sDsn); /* DDN */ - if (sDdnÝ0¨ != '\0') + if (sDdn[0] != '\0') setVariable("SYSDDNAME", (char *)sDdn); /* MEMBER */ - if (sMemberÝ0¨ != '\0') + if (sMember[0] != '\0') setVariable("SYSMEMBER", (char *)sMember); /* VOLSER */ - if (sSerialÝ0¨ != '\0') + if (sSerial[0] != '\0') setVariable("SYSVOLUME", (char *)sSerial); /* DSORG */ - if(flagsÝ4¨ == 0x40) + if(flags[4] == 0x40) setVariable("SYSDSORG", "PS"); - else if (flagsÝ4¨ == 0x02) + else if (flags[4] == 0x02) setVariable("SYSDSORG", "PO"); else setVariable("SYSDSORG", "???"); /* RECFM */ - if(flagsÝ6¨ == 0x40) + if(flags[6] == 0x40) setVariable("SYSRECFM", "V"); - else if(flagsÝ6¨ == 0x50) + else if(flags[6] == 0x50) setVariable("SYSRECFM", "VB"); - else if(flagsÝ6¨ == 0x54) + else if(flags[6] == 0x54) setVariable("SYSRECFM", "VBA"); - else if(flagsÝ6¨ == 0x80) + else if(flags[6] == 0x80) setVariable("SYSRECFM", "F"); - else if(flagsÝ6¨ == 0x90) + else if(flags[6] == 0x90) setVariable("SYSRECFM", "FB"); - else if(flagsÝ6¨ == 0xC0) + else if(flags[6] == 0xC0) setVariable("SYSRECFM", "U"); else setVariable("SYSRECFM", "??????"); /* BLKSIZE */ - sprintf((char *)sBlkSize, "%d", flagsÝ8¨ | flagsÝ7¨ << 8); + sprintf((char *)sBlkSize, "%d", flags[8] | flags[7] << 8); setVariable("SYSBLKSIZE", (char *)sBlkSize); /* LRECL */ - sprintf((char *)sLrecl, "%d", flagsÝ10¨ | flagsÝ9¨ << 8); + sprintf((char *)sLrecl, "%d", flags[10] | flags[9] << 8); setVariable("SYSLRECL", (char *)sLrecl); free(flags); @@ -1825,10 +1825,10 @@ _getEctEnvBk() if (isTSO()) { psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; // TODO use cast to BYTE and + 48 ectenvbk = ect + 12; // 12 * 4 = 48 @@ -1894,7 +1894,7 @@ getVariable(char *sName, PLstr plsValue) char * getStemVariable(char *sName) { - char sValueÝ4097¨; + char sValue[4097]; Lstr lsScope,lsName,lsValue; LINITSTR(lsScope) @@ -1926,12 +1926,12 @@ getStemVariable(char *sName) LFREESTR(lsName) LFREESTR(lsValue) - return (char *)sValueÝ0¨; + return (char *)sValue[0]; } int getIntegerVariable(char *sName) { - char sValueÝ19¨; + char sValue[19]; PLstr plsValue; LPMALLOC(plsValue) getVariable(sName, plsValue); @@ -1999,7 +1999,7 @@ setVariable2(char *sName, char *sValue, int lValue) void setIntegerVariable(char *sName, int iValue) { - char sValueÝ19¨; + char sValue[19]; sprintf(sValue,"%d",iValue); setVariable(sName,sValue); @@ -2109,7 +2109,7 @@ SetClistVar(PLstr name, PLstr value) int findLoadModule(char *moduleName) { int iRet = 0; - char sTempÝ8¨; + char sTemp[8]; char *sToken; RX_BLDL_PARAMS bldlParams; @@ -2171,7 +2171,7 @@ int checkVariableBlacklist(PLstr name) Lupper(name); for (i = 0; i < BLACKLIST_SIZE; ++i) { - if (strcmp((char *)name->pstr,RX_VAR_BLACKLISTÝi¨) == 0) + if (strcmp((char *)name->pstr,RX_VAR_BLACKLIST[i]) == 0) return -1; } diff --git a/src/rxmvsmig.c b/src/rxmvsmig.c index 112437dd..462fa53d 100644 --- a/src/rxmvsmig.c +++ b/src/rxmvsmig.c @@ -65,7 +65,7 @@ int __get_ddndsnmemb (int handle, char * ddn, char * dsn, #endif #define BLACKLIST_SIZE 8 -char *RX_VAR_BLACKLISTÝBLACKLIST_SIZE¨ = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; +char *RX_VAR_BLACKLIST[BLACKLIST_SIZE] = {"RC", "LASTCC", "SIGL", "RESULT", "SYSPREF", "SYSUID", "SYSENV", "SYSISPF"}; #ifdef __CROSS__ /* ------------------------------------------------------------------------------------*/ @@ -76,7 +76,7 @@ getNextVar(void** nextPtr) BinLeaf *leaf = NULL; PLstr value = NULL; - currentTree = &(_procÝ_rx_proc¨.scopeÝ0¨); + currentTree = &(_proc[_rx_proc].scope[0]); if (*nextPtr == 0) { leaf = BinMin(currentTree->parent); @@ -91,7 +91,7 @@ getNextVar(void** nextPtr) /* while (leaf == NULL && i < VARTREES) { if (nextPtr == NULL) { - leaf = BinMin(_procÝ_rx_proc¨.scopeÝi¨.parent); + leaf = BinMin(_proc[_rx_proc].scope[i].parent); } else { leaf = BinSuccessor(nextPtr); } @@ -123,11 +123,11 @@ void R_catchIt(int func) void ** cppl; - if (__libc_tso_status == 1 && entry_R13 Ý6¨ != 0) { + if (__libc_tso_status == 1 && entry_R13 [6] != 0) { rc = 42; - cppl = entry_R13Ý6¨; + cppl = entry_R13[6]; tso_parameter = malloc(sizeof(RX_TSO_PARAMS)); memset(tso_parameter, 00, sizeof(RX_TSO_PARAMS)); @@ -234,9 +234,9 @@ void R_listIt(int func) Lerror(ERR_INCORRECT_CALL,4,1); } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { printf("List all Variables\n"); printf("------------------\n"); BinPrint(tree.parent, NULL); @@ -276,13 +276,13 @@ void R_vlist(int func) if (exist(2)) { L2STR(ARG2); Lupper(ARG2); - if (LSTR(*ARG2)Ý0¨ == 'V') mode = 1; - else if (LSTR(*ARG2)Ý0¨ == 'N') mode = 2; + if (LSTR(*ARG2)[0] == 'V') mode = 1; + else if (LSTR(*ARG2)[0] == 'N') mode = 2; } - tree = _procÝ_rx_proc¨.scopeÝ0¨; + tree = _proc[_rx_proc].scope[0]; - if (ARG1 == NULL || LSTR(*ARG1)Ý0¨ == 0) { + if (ARG1 == NULL || LSTR(*ARG1)[0] == 0) { BinVarDump(ARGR,tree.parent, NULL,mode); } else { LASCIIZ(*ARG1) ; @@ -364,10 +364,10 @@ void R_userid(int func) void R_listdsi(int func) { - char *argsÝ2¨; + char *args[2]; - char sFileNameÝ45¨; - char sFunctionCodeÝ3¨; + char sFileName[45]; + char sFunctionCode[3]; FILE *pFile; int iErr; @@ -388,20 +388,20 @@ void R_listdsi(int func) get_s(1); Lupper(ARG1); - argsÝ0¨= NULL; - argsÝ1¨= NULL; + args[0]= NULL; + args[1]= NULL; parseArgs(args, (char *)LSTR(*ARG1)); - if (argsÝ1¨ != NULL && strcmp(argsÝ1¨, "FILE") != 0) + if (args[1] != NULL && strcmp(args[1], "FILE") != 0) Lerror(ERR_INCORRECT_CALL,0); - if (argsÝ1¨ == NULL) { + if (args[1] == NULL) { _style = "//DSN:"; - quotationType = CheckQuotation(argsÝ0¨); + quotationType = CheckQuotation(args[0]); switch (quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sFileName, environment->SYSPREF); strcat(sFileName, "."); strcat(sFileName, (const char *) LSTR(*ARG1)); @@ -420,7 +420,7 @@ void R_listdsi(int func) } } else { - strcpy(sFileName,argsÝ0¨); + strcpy(sFileName,args[0]); _style = "//DDN:"; } @@ -442,8 +442,8 @@ void R_listdsi(int func) void R_sysdsn(int func) { - char sDSNameÝ45¨; - char sMessageÝ256¨; + char sDSName[45]; + char sMessage[256]; unsigned char *ptr; @@ -477,7 +477,7 @@ void R_sysdsn(int func) get_s(1); Lupper(ARG1); - if (LSTR(*ARG1)Ý0¨ == '\0') { + if (LSTR(*ARG1)[0] == '\0') { strcat(sMessage,MSG_MISSING_DSNAME); iErr = 1; } @@ -486,7 +486,7 @@ void R_sysdsn(int func) quotationType = CheckQuotation((char *)LSTR(*ARG1)); switch(quotationType) { case UNQUOTED: - if (environment->SYSPREFÝ0¨ != '\0') { + if (environment->SYSPREF[0] != '\0') { strcat(sDSName, environment->SYSPREF); strcat(sDSName, "."); strcat(sDSName, (const char*)LSTR(*ARG1)); @@ -620,7 +620,7 @@ void R_stemcopy(int func) Lupper(ARG2); LASCIIZ(*ARG2); - tree = _procÝ_rx_proc¨.scope; + tree = _proc[_rx_proc].scope; // look up Source stem from = BinFind(tree, ARG2); @@ -675,8 +675,8 @@ R_dir( const int func ) long ii; long j; FILE * fh; - char line Ý256¨; - char tstr Ý9¨; + char line [256]; + char tstr [9]; char * a; char * name; short b; @@ -685,7 +685,7 @@ R_dir( const int func ) long quit; int info_byte; short l; - char sDSNÝ45¨; + char sDSN[45]; int pdsecount = 0; @@ -718,8 +718,8 @@ R_dir( const int func ) quit = 0; while (fread(line, 1, 256, fh) == 256) { - a = &(lineÝ2¨); - b = ((short *) &(lineÝ0¨))Ý0¨; + a = &(line[2]); + b = ((short *) &(line[0]))[0]; count = 2; while (count < b) { @@ -731,7 +731,7 @@ R_dir( const int func ) name = a; a += 8; -// ii = (((int *) a)Ý0¨) & 0xFFFFFF00; +// ii = (((int *) a)[0]) & 0xFFFFFF00; a += 3; info_byte = (int) (*a); @@ -742,14 +742,14 @@ R_dir( const int func ) strncpy (tstr, name, 8); j = 7; - while (tstrÝj¨ == ' ') j--; - tstrÝ++j¨ = 0; + while (tstr[j] == ' ') j--; + tstr[++j] = 0; if (pdsecount == maxdirent) { quit = 1; break; } else { - char varNameÝ16¨; + char varName[16]; bzero(varName, 16); sprintf(varName, "DIRENTRY.%d", ++pdsecount); setVariable(varName, tstr); @@ -784,7 +784,7 @@ int _EncryptString(const PLstr to, const PLstr from, const PLstr password) { plen=LLEN(*password); for (ki = 0, kj=0; ki < slen; ki++,kj++) { if (kj >= plen) kj = 0; - LSTR(*to)Ýki¨ = LSTR(*from)Ýki¨ ¬ LSTR(*password)Ýkj¨; + LSTR(*to)[ki] = LSTR(*from)[ki] ¬ LSTR(*password)[kj]; } LLEN(*to) = (size_t) slen; LTYPE(*to) = LSTRING_TY; @@ -844,7 +844,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { // run through encryption in several rounds for (ki = 1; ki <= rounds; ki++) { // Step 1: XOR String with Password for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨ = LSTR(*to)Ýkj¨ + hashv; + LSTR(*to)[kj] = LSTR(*to)[kj] + hashv; } hashv=(hashv+3)%127; _rotate(&pwt, pw, ki, 0); @@ -856,7 +856,7 @@ void Lcryptall(PLstr to, PLstr from, PLstr pw, int rounds,int mode) { _rotate(&pwt, pw, ki,0); slen = _EncryptString(to, to, &pwt); for (kj = 0; kj < slen; kj++) { - LSTR(*to)Ýkj¨=LSTR(*to)Ýkj¨-hashv; + LSTR(*to)[kj]=LSTR(*to)[kj]-hashv; } hashv=(hashv-3)%127; } @@ -930,7 +930,7 @@ void Lhash(const PLstr to, const PLstr from, long slots) { } for (ki = 0; ki < lhlen; ki++) { - value = (value + (LSTR(*from)Ýki¨) * pwr)%islots; + value = (value + (LSTR(*from)[ki]) * pwr)%islots; pwr = ((pwr * pcn) % islots); } } @@ -954,7 +954,7 @@ void R_rhash(int func) { // ------------------------------------------------------------------------------------- void R_removedsn(int func) { - char sFileNameÝ55¨; + char sFileName[55]; int remrc=-2, iErr=0,dbg=0; char* _style_old = _style; @@ -984,11 +984,11 @@ void R_removedsn(int func) // ------------------------------------------------------------------------------------- void R_renamedsn(int func) { - char sFileNameOldÝ55¨; + char sFileNameOld[55]; Lstr oldDSN, oldMember; - char sFileNameNewÝ55¨; + char sFileNameNew[55]; Lstr newDSN, newMember; - char sFunctionCodeÝ3¨; + char sFunctionCode[3]; int renrc=-9, iErr=0, p=0, dbg=0; char* _style_old = _style; @@ -1128,7 +1128,7 @@ void R_free(int func) void R_allocate(int func) { int iErr = 0, dbg=0; char *_style_old = _style; - char sFileNameÝ55¨; + char sFileName[55]; Lstr DSN, Member; __dyn_t dyn_parms; if (ARGN !=2) Lerror(ERR_INCORRECT_CALL, 0); @@ -1173,8 +1173,8 @@ void R_allocate(int func) { // ------------------------------------------------------------------------------------- void R_create(int func) { int iErr = 0,dbg=0; - char sFileNameÝ55¨; - char sFileDCBÝ128¨; + char sFileName[55]; + char sFileDCB[128]; char *_style_old = _style; FILE *fk ; // file handle @@ -1227,7 +1227,7 @@ void R_create(int func) { // ------------------------------------------------------------------------------------- void R_exists(int func) { int iErr = 0; - char sFileNameÝ55¨; + char sFileName[55]; char *_style_old = _style; FILE *fk; // file handle @@ -1259,7 +1259,7 @@ void R_magic(int func) void *pointer; long decAddr; int count; - char magicstrÝ64¨; + char magicstr[64]; char option='F'; @@ -1267,10 +1267,10 @@ void R_magic(int func) Lerror(ERR_INCORRECT_CALL,0); if (exist(1)) { L2STR(ARG1); - option = l2uÝ(byte)LSTR(*ARG1)Ý0¨¨; + option = l2u[(byte)LSTR(*ARG1)[0]]; } - option = l2uÝ(byte)option¨; + option = l2u[(byte)option]; switch (option) { case 'F': @@ -1300,7 +1300,7 @@ void R_dummy(int func) #ifdef __CROSS__ - BinTree tree = _procÝ_rx_proc¨.scopeÝ0¨; + BinTree tree = _proc[_rx_proc].scope[0]; BinPrint(tree.parent, NULL); /* do { @@ -1490,7 +1490,7 @@ void parseArgs(char **array, char *str) char *p = strtok (str, " "); while (p != NULL) { - arrayÝi++¨ = p; + array[i++] = p; p = strtok (NULL, " "); } } @@ -1498,62 +1498,62 @@ void parseArgs(char **array, char *str) void parseDCB(FILE *pFile) { unsigned char *flags; - unsigned char sDsnÝ45¨; - unsigned char sDdnÝ9¨; - unsigned char sMemberÝ9¨; - unsigned char sSerialÝ7¨; - unsigned char sLreclÝ6¨; - unsigned char sBlkSizeÝ6¨; + unsigned char sDsn[45]; + unsigned char sDdn[9]; + unsigned char sMember[9]; + unsigned char sSerial[7]; + unsigned char sLrecl[6]; + unsigned char sBlkSize[6]; flags = malloc(11); __get_ddndsnmemb(fileno(pFile), (char *)sDdn, (char *)sDsn, (char *)sMember, (char *)sSerial, flags); /* DSN */ - if (sDsnÝ0¨ != '\0') + if (sDsn[0] != '\0') setVariable("SYSDSNAME", (char *)sDsn); /* DDN */ - if (sDdnÝ0¨ != '\0') + if (sDdn[0] != '\0') setVariable("SYSDDNAME", (char *)sDdn); /* MEMBER */ - if (sMemberÝ0¨ != '\0') + if (sMember[0] != '\0') setVariable("SYSMEMBER", (char *)sMember); /* VOLSER */ - if (sSerialÝ0¨ != '\0') + if (sSerial[0] != '\0') setVariable("SYSVOLUME", (char *)sSerial); /* DSORG */ - if(flagsÝ4¨ == 0x40) + if(flags[4] == 0x40) setVariable("SYSDSORG", "PS"); - else if (flagsÝ4¨ == 0x02) + else if (flags[4] == 0x02) setVariable("SYSDSORG", "PO"); else setVariable("SYSDSORG", "???"); /* RECFM */ - if(flagsÝ6¨ == 0x40) + if(flags[6] == 0x40) setVariable("SYSRECFM", "V"); - else if(flagsÝ6¨ == 0x50) + else if(flags[6] == 0x50) setVariable("SYSRECFM", "VB"); - else if(flagsÝ6¨ == 0x54) + else if(flags[6] == 0x54) setVariable("SYSRECFM", "VBA"); - else if(flagsÝ6¨ == 0x80) + else if(flags[6] == 0x80) setVariable("SYSRECFM", "F"); - else if(flagsÝ6¨ == 0x90) + else if(flags[6] == 0x90) setVariable("SYSRECFM", "FB"); - else if(flagsÝ6¨ == 0xC0) + else if(flags[6] == 0xC0) setVariable("SYSRECFM", "U"); else setVariable("SYSRECFM", "??????"); /* BLKSIZE */ - sprintf((char *)sBlkSize, "%d", flagsÝ8¨ | flagsÝ7¨ << 8); + sprintf((char *)sBlkSize, "%d", flags[8] | flags[7] << 8); setVariable("SYSBLKSIZE", (char *)sBlkSize); /* LRECL */ - sprintf((char *)sLrecl, "%d", flagsÝ10¨ | flagsÝ9¨ << 8); + sprintf((char *)sLrecl, "%d", flags[10] | flags[9] << 8); setVariable("SYSLRECL", (char *)sLrecl); free(flags); @@ -1571,10 +1571,10 @@ _getEctEnvBk() if (isTSO()) { psa = 0; - ascb = psaÝ137¨; - asxb = ascbÝ27¨; - lwa = asxbÝ5¨; - ect = lwaÝ8¨; + ascb = psa[137]; + asxb = ascb[27]; + lwa = asxb[5]; + ect = lwa[8]; // TODO use cast to BYTE and + 48 ectenvbk = ect + 12; // 12 * 4 = 48 @@ -1640,7 +1640,7 @@ getVariable(char *sName, PLstr plsValue) char * getStemVariable(char *sName) { - char sValueÝ4097¨; + char sValue[4097]; Lstr lsScope,lsName,lsValue; LINITSTR(lsScope) @@ -1672,12 +1672,12 @@ getStemVariable(char *sName) LFREESTR(lsName) LFREESTR(lsValue) - return (char *)sValueÝ0¨; + return (char *)sValue[0]; } int getIntegerVariable(char *sName) { - char sValueÝ19¨; + char sValue[19]; PLstr plsValue; LPMALLOC(plsValue) getVariable(sName, plsValue); @@ -1745,7 +1745,7 @@ setVariable2(char *sName, char *sValue, int lValue) void setIntegerVariable(char *sName, int iValue) { - char sValueÝ19¨; + char sValue[19]; sprintf(sValue,"%d",iValue); setVariable(sName,sValue); @@ -1855,7 +1855,7 @@ SetClistVar(PLstr name, PLstr value) int findLoadModule(char *moduleName) { int iRet = 0; - char sTempÝ8¨; + char sTemp[8]; char *sToken; RX_BLDL_PARAMS bldlParams; @@ -1917,7 +1917,7 @@ int checkVariableBlacklist(PLstr name) Lupper(name); for (i = 0; i < BLACKLIST_SIZE; ++i) { - if (strcmp((char *)name->pstr,RX_VAR_BLACKLISTÝi¨) == 0) + if (strcmp((char *)name->pstr,RX_VAR_BLACKLIST[i]) == 0) return -1; } diff --git a/src/rxnetdat.c b/src/rxnetdat.c index 003293f3..a99fa577 100644 --- a/src/rxnetdat.c +++ b/src/rxnetdat.c @@ -18,8 +18,8 @@ extern char* _style; extern RX_ENVIRONMENT_CTX_PTR environment; /* internal function prototypes */ -int receive(char sInputDataSetNameÝ45¨, char sOutputDataSetNameÝ45¨); -int transmit(char sFileNameInÝ45¨, char sFileNameOutÝ45¨); +int receive(char sInputDataSetName[45], char sOutputDataSetName[45]); +int transmit(char sFileNameIn[45], char sFileNameOut[45]); int checkHeaderRecord(P_ND_SEGMENT pSegment); int checkFileUtilCtrlRecord(P_ND_SEGMENT pSegment); @@ -33,8 +33,8 @@ int readDataRecord(FILE *pFile, P_ND_DATA_RECORD pDataRecord); unsigned int calculateTracks(long lFileSize, unsigned int uiBlkSize); -int receivePO(FILE *pF_IN, char sTargetDataSetNameÝ45¨, P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord); -int receivePS(FILE *pF_IN, char sOutputDataSetNameÝ45¨, P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord); +int receivePO(FILE *pF_IN, char sTargetDataSetName[45], P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord); +int receivePS(FILE *pF_IN, char sOutputDataSetName[45], P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord); int receiveRecords(FILE *pFileIn, FILE *pFileOut, ND_RECFM recfm, unsigned int uiMaxLRECL); void writeRecord(FILE *pFileOut, BYTE *pRecord, unsigned int uiBytesToWrite, ND_RECFM recfm); @@ -51,8 +51,8 @@ int allocateTMPSEQ(P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord, FILE *pF_IN); /* rexx functions */ void R_receive(int func) { - char sFileNameInÝ44 + 1¨; - char sFileNameOutÝ44 + 1¨; + char sFileNameIn[44 + 1]; + char sFileNameOut[44 + 1]; int iErr; @@ -98,8 +98,8 @@ void R_receive(int func) void R_transmit(int func) { - char sFileNameInÝ44 + 1¨; - char sFileNameOutÝ44 + 1¨; + char sFileNameIn[44 + 1]; + char sFileNameOut[44 + 1]; int iErr; @@ -200,7 +200,7 @@ void RxNetDataRegFunctions() } /* RxNetDataRegFunctions() */ /* internal functions */ -int receive(char sInputDataSetNameÝ44 + 1¨, char sOutputDataSetNameÝ44 + 1¨) +int receive(char sInputDataSetName[44 + 1], char sOutputDataSetName[44 + 1]) { int iErr = 0; @@ -261,7 +261,7 @@ int receive(char sInputDataSetNameÝ44 + 1¨, char sOutputDataSetNameÝ44 + 1¨) return iErr; } -int transmit(char sFileNameInÝ45¨, char sFileNameOutÝ45¨) +int transmit(char sFileNameIn[45], char sFileNameOut[45]) { int iErr = 0; @@ -455,7 +455,7 @@ unsigned int calculateTracks(long lFileSize, unsigned int uiBlkSize) return uiTracks; } -int receivePS(FILE *pF_IN, char sOutputDataSetNameÝ44 + 1¨, P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord) +int receivePS(FILE *pF_IN, char sOutputDataSetName[44 + 1], P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord) { int iErr = 0; @@ -492,7 +492,7 @@ int receivePS(FILE *pF_IN, char sOutputDataSetNameÝ44 + 1¨, P_ND_FILE_UTIL_CTR return iErr; } -int receivePO(FILE *pF_IN, char sTargetDataSetNameÝ44 + 1¨, P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord) +int receivePO(FILE *pF_IN, char sTargetDataSetName[44 + 1], P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord) { int iErr = 0; @@ -516,7 +516,7 @@ int receivePO(FILE *pF_IN, char sTargetDataSetNameÝ44 + 1¨, P_ND_FILE_UTIL_CTR // #3 extract the sequential part to the temp data set if (iErr == 0) { - char sTempDataSetNameÝ44 + 1¨; + char sTempDataSetName[44 + 1]; bzero(sTempDataSetName, 45); dinfo("TMPSEQ", sTempDataSetName, ""); printf("DBG> #4 extracting the sequential part to the temp data set\n"); @@ -536,7 +536,7 @@ int receivePO(FILE *pF_IN, char sTargetDataSetNameÝ44 + 1¨, P_ND_FILE_UTIL_CTR iErr = allocateSYSIN(); if (iErr == 0) { - char sTempDataSetNameÝ44 + 1¨; + char sTempDataSetName[44 + 1]; bzero(sTempDataSetName, 45); dinfo("TMPSEQ", sTempDataSetName, ""); printf("DBG> #7 allocating SYSUT1\n"); @@ -607,7 +607,7 @@ int receiveRecords(FILE *pFileIn, FILE *pFileOut, ND_RECFM recfm, unsigned int u if (iErr == 0) { uiBytesToCopy = MIN(uiBytesLeftInRecord, uiBytesLeftInData); - memcpy(pRecordPos, &pDataRecord->dataÝuiDataPos¨, uiBytesToCopy); + memcpy(pRecordPos, &pDataRecord->data[uiDataPos], uiBytesToCopy); uiBytesLeftInRecord -= uiBytesToCopy; pRecordPos += uiBytesToCopy; @@ -657,8 +657,8 @@ int allocateTargetDataSet(char *sDataSetName, P_ND_FILE_UTIL_CTRL_RECORD pFileUt unsigned int uiDIR = 0; unsigned int uiPRI = 0; unsigned int uiSEC = 0; - char sRECFMÝ3¨; - char sMODEÝ4¨; + char sRECFM[3]; + char sMODE[4]; // #1 get the record format bzero(sRECFM, sizeof(sRECFM)); @@ -735,31 +735,31 @@ int dinfo(const char *ddname, char *dsname, char *memname) __S99parms parmlist; - unsigned char tuÝ3¨Ý50¨; - unsigned char *tupÝ3¨; + unsigned char tu[3][50]; + unsigned char *tup[3]; memset(&parmlist, 0, sizeof(parmlist)); parmlist.__S99RBLN = 20; parmlist.__S99VERB = 7; parmlist.__S99TXTPP = tup; - memcpy(tuÝ0¨, "\x00\x01\x00\x01\x00", 5); - tuÝ0¨Ý5¨ = (unsigned char) strlen(ddname); - memcpy((void *) &(tuÝ0¨Ý6¨), ddname, strlen(ddname)); + memcpy(tu[0], "\x00\x01\x00\x01\x00", 5); + tu[0][5] = (unsigned char) strlen(ddname); + memcpy((void *) &(tu[0][6]), ddname, strlen(ddname)); - memcpy(tuÝ1¨, "\x00\x05\x00\x01\x00\x2C" + memcpy(tu[1], "\x00\x05\x00\x01\x00\x2C" " ", 6 + 44); - memcpy(tuÝ2¨, "\x00\x06\x00\x01\x00\x08" + memcpy(tu[2], "\x00\x06\x00\x01\x00\x08" " ", 6 + 8); - tupÝ0¨ = tuÝ0¨; - tupÝ1¨ = tuÝ1¨; - tupÝ2¨ = tuÝ2¨; + tup[0] = tu[0]; + tup[1] = tu[1]; + tup[2] = tu[2]; - tupÝ2¨ = (unsigned char *) ((unsigned long) tupÝ2¨ | 0x80000000); + tup[2] = (unsigned char *) ((unsigned long) tup[2] | 0x80000000); rcsvc = svc99(&parmlist); @@ -769,11 +769,11 @@ int dinfo(const char *ddname, char *dsname, char *memname) parmlist.__S99ERROR, parmlist.__S99INFO); } else { - len = (int) (tupÝ1¨Ý5¨); - sprintf(dsname, "%-*.*s", len, len, &(tupÝ1¨Ý6¨)); + len = (int) (tup[1][5]); + sprintf(dsname, "%-*.*s", len, len, &(tup[1][6])); - len = (int) (tupÝ2¨Ý5¨); - sprintf(memname, "%-*.*s", len, len, &(tupÝ2¨Ý6¨)); + len = (int) (tup[2][5]); + sprintf(memname, "%-*.*s", len, len, &(tup[2][6])); } return rcsvc; @@ -973,7 +973,7 @@ int allocateTMPSEQ(P_ND_FILE_UTIL_CTRL_RECORD pFileUtilCtrlRecord, FILE *pF_IN) iErr = dynalloc(&dyn_parms); if (iErr == 0) { - char dsnameÝ44 +1¨; + char dsname[44 +1]; dinfo(dyn_parms.__ddname, dsname, ""); printf("DBG> TMPSEQ was allocated to %s with %d tracks and %d dir blocks\n", dsname , dyn_parms.__primary diff --git a/src/rxstr.c b/src/rxstr.c index 95d5ce67..2734e713 100644 --- a/src/rxstr.c +++ b/src/rxstr.c @@ -45,17 +45,17 @@ #include "interpre.h" /* --------------------------------------------------------------- */ -/* ABBREV(information,infoÝ,length¨) */ +/* ABBREV(information,info[,length]) */ /* --------------------------------------------------------------- */ -/* INDEX(haystack,needleÝ,start¨) */ +/* INDEX(haystack,needle[,start]) */ /* --------------------------------------------------------------- */ -/* FIND(string,phraseÝ,start¨) */ +/* FIND(string,phrase[,start]) */ /* --------------------------------------------------------------- */ -/* LASTPOS(needle,haystackÝ,start¨) */ +/* LASTPOS(needle,haystack[,start]) */ /* --------------------------------------------------------------- */ -/* POS(needle,haystackÝ,start¨) */ +/* POS(needle,haystack[,start]) */ /* --------------------------------------------------------------- */ -/* WORDPOS(phrase,stringÝ,start¨) */ +/* WORDPOS(phrase,string[,start]) */ /* --------------------------------------------------------------- */ void __CDECL R_SSoI( const int func ) @@ -99,14 +99,14 @@ R_SSoI( const int func ) } /* R_SSoI */ /* --------------------------------------------------------------- */ -/* CENTRE(string,lengthÝ,pad¨) */ -/* CENTER(string,lengthÝ,pad¨) */ +/* CENTRE(string,length[,pad]) */ +/* CENTER(string,length[,pad]) */ /* --------------------------------------------------------------- */ -/* JUSTIFY(string,lengthÝ,pad¨) */ +/* JUSTIFY(string,length[,pad]) */ /* --------------------------------------------------------------- */ -/* LEFT(string,lengthÝ,pad¨) */ +/* LEFT(string,length[,pad]) */ /* --------------------------------------------------------------- */ -/* RIGHT(string,lengthÝ,pad¨) */ +/* RIGHT(string,length[,pad]) */ /* --------------------------------------------------------------- */ void __CDECL R_SIoC( const int func ) @@ -234,7 +234,7 @@ R_S( const int func ) LINITSTR(str); Lfx(&str,LLEN(*ARG1)); Lstrcpy(&str,ARG1); Lupper(&str); LASCIIZ(str); - RxVarFindName(_procÝ_rx_proc¨.scope,&str,&found); + RxVarFindName(_proc[_rx_proc].scope,&str,&found); LFREESTR(str); if (found) Lscpy(ARGR,"VAR"); @@ -286,11 +286,11 @@ R_S( const int func ) } /* switch */ } /* R_S */ /* --------------------------------------------------------------- */ -/* DELSTR(string,nÝ,length¨) */ +/* DELSTR(string,n[,length]) */ /* --------------------------------------------------------------- */ -/* DELWORD(string,nÝ,length¨) */ +/* DELWORD(string,n[,length]) */ /* --------------------------------------------------------------- */ -/* SUBWORD(string,nÝ,length¨) */ +/* SUBWORD(string,n[,length]) */ /* --------------------------------------------------------------- */ void __CDECL R_SIoI( const int func ) @@ -322,9 +322,9 @@ R_SIoI( const int func ) } /* R_SIoI */ /* --------------------------------------------------------------- */ -/* INSERT(new,targetÝ,Ýn¨Ý,Ýlength¨Ý,pad¨¨¨) */ +/* INSERT(new,target[,[n][,[length][,pad]]]) */ /* --------------------------------------------------------------- */ -/* OVERLAY(new,targetÝ,Ýn¨Ý,Ýlength¨Ý,pad¨¨¨) */ +/* OVERLAY(new,target[,[n][,[length][,pad]]]) */ /* --------------------------------------------------------------- */ void __CDECL R_SSoIoIoC( const int func ) @@ -369,7 +369,7 @@ R_changestr( ) } /* R_changestr */ /* --------------------------------------------------------------- */ -/* COMPARE(string1,string2Ý,pad¨) */ +/* COMPARE(string1,string2[,pad]) */ /* --------------------------------------------------------------- */ void __CDECL R_compare( ) @@ -403,7 +403,7 @@ R_copies( ) } /* R_copies */ /* --------------------------------------------------------------- */ -/* SUBSTR(string,nÝ,Ýlength¨Ý,pad¨¨) */ +/* SUBSTR(string,n[,[length][,pad]]) */ /* --------------------------------------------------------------- */ void __CDECL R_substr( ) @@ -422,7 +422,7 @@ R_substr( ) } /* R_substr */ /* --------------------------------------------------------------- */ -/* STRIP(stringÝ,Ý<"L"|"T"|"B">¨Ý,char¨¨) */ +/* STRIP(string[,[<"L"|"T"|"B">][,char]]) */ /* --------------------------------------------------------------- */ void __CDECL R_strip( ) @@ -434,7 +434,7 @@ R_strip( ) Lerror(ERR_INCORRECT_CALL,0); must_exist(1); - if (exist(2)) { L2STR(ARG2); action = l2uÝ(byte)LSTR(*ARG2)Ý0¨¨; } + if (exist(2)) { L2STR(ARG2); action = l2u[(byte)LSTR(*ARG2)[0]]; } get_pad(3,pad); Lstrip(ARGR,ARG1,action,pad); } /* R_strip */ @@ -453,7 +453,7 @@ R_filter( ) must_exist(2); if (exist(3)) { Lupper(ARG3) ; - if ((l2uÝ(byte)LSTR(*ARG3)Ý0¨¨)=='K') action='K'; + if ((l2u[(byte)LSTR(*ARG3)[0]])=='K') action='K'; } Lfilter(ARGR, ARG1, ARG2,action); } /* R_filter */ @@ -525,7 +525,7 @@ R_translate( ) } /* R_translate */ /* --------------------------------------------------------------- */ -/* VERIFY(string,referenceÝ,Ýoption¨Ý,start¨¨) */ +/* VERIFY(string,reference[,[option][,start]]) */ /* --------------------------------------------------------------- */ void __CDECL R_verify( ) @@ -540,7 +540,7 @@ R_verify( ) must_exist(2); if (exist(3)) { L2STR(ARG3); - match = (l2uÝ(byte)LSTR(*ARG3)Ý0¨¨ == 'M'); + match = (l2u[(byte)LSTR(*ARG3)[0]] == 'M'); } get_oi(4,start); Licpy(ARGR,Lverify(ARG1,ARG2,match,start)); diff --git a/src/rxtcp.c b/src/rxtcp.c index dc186059..1d1b918c 100644 --- a/src/rxtcp.c +++ b/src/rxtcp.c @@ -19,7 +19,7 @@ #ifndef WIN32 // don't compile in Windows SOCKET server_socket; -SOCKET client_socketsÝMAX_CLIENTS¨; +SOCKET client_sockets[MAX_CLIENTS]; size_t num_clients; size_t wakeup_counter; @@ -122,11 +122,11 @@ void R_tcpwait(__unused int func) { int ii; for (ii = 0; ii < num_clients; ii++) { - if (highest < client_socketsÝii¨) { - highest = (int) client_socketsÝii¨; + if (highest < client_sockets[ii]) { + highest = (int) client_sockets[ii]; } - FD_SET(client_socketsÝii¨, &read_set); + FD_SET(client_sockets[ii], &read_set); } } @@ -134,7 +134,7 @@ void R_tcpwait(__unused int func) { /* copied by Jason Winters FTPD */ { j = ((highest + 31) / 32) - 1; /* Get word ptr to last 'long' */ - while ((j > 0) && ((long *) &read_set)Ýj¨ == 0) j--; + while ((j > 0) && ((long *) &read_set)[j] == 0) j--; j = ((j + 1) * 32) - 1; /* Highest Socket to check */ if (j > highest) j = highest; /* may be greater than the known value */ @@ -158,18 +158,18 @@ void R_tcpwait(__unused int func) { long *s; s = (*((long **)548)); // 548->ASCB - s = ((long **)s) Ý14¨; // 56->CSCB + s = ((long **)s) [14]; // 56->CSCB if (s) { - s = ((long **)s) Ý11¨; // 44->CIB + s = ((long **)s) [11]; // 44->CIB while (s) { - if (((unsigned char *)s) Ý4¨ == 0x40) + if (((unsigned char *)s) [4] == 0x40) { stop = 1; break; } - s = ((long **)s) Ý0¨;// 0->NEXT-CIB + s = ((long **)s) [0];// 0->NEXT-CIB } } #endif @@ -199,11 +199,11 @@ void R_tcpwait(__unused int func) { size = sizeof(clientname); num_clients++; - client_socketsÝnum_clients - 1¨ = accept(server_socket, + client_sockets[num_clients - 1] = accept(server_socket, (struct sockaddr *) &clientname, &size); - if (client_socketsÝnum_clients - 1¨ < 0) { + if (client_sockets[num_clients - 1] < 0) { num_clients--; rc = -2; // ACCEPT FAILED } @@ -211,7 +211,7 @@ void R_tcpwait(__unused int func) { if (rc == 0) { setVariable("_IP", inet_ntoa(clientname.sin_addr)); setIntegerVariable("_PORT", ntohs (clientname.sin_port)); - setIntegerVariable("_FD", client_socketsÝnum_clients - 1¨); + setIntegerVariable("_FD", client_sockets[num_clients - 1]); Licpy(ARGR, CONNECT_EVENT); } @@ -275,10 +275,10 @@ void R_tcpopen(__unused int func) { inAddress = inet_addr((const char *) LSTR(*ARG1)); if ((inAddress) == INADDR_NONE) { host = gethostbyname(LSTR(*ARG1)); - if (host == NULL || host->h_addr_listÝ0¨ == NULL) { + if (host == NULL || host->h_addr_list[0] == NULL) { rc = -5; } else { - inAddress = ((long *) (host->h_addr_listÝ0¨))Ý0¨; + inAddress = ((long *) (host->h_addr_list[0]))[0]; } } @@ -336,7 +336,7 @@ void R_tcpclose(__unused int func) { int ii; for (ii = 0; ii <= num_clients - 1; ii++) { - if (client_socketsÝii¨ == client_socket) { + if (client_sockets[ii] == client_socket) { rc = closesocket(client_socket); } } @@ -357,7 +357,7 @@ void R_tcpsend(__unused int func) { int result; size_t remaining; - char bufferÝBUFFER_SIZE¨; + char buffer[BUFFER_SIZE]; struct timeval timeoutValue; fd_set write_set; @@ -427,7 +427,7 @@ void R_tcprecv(__unused int func) { int result; - char bufferÝBUFFER_SIZE¨; + char buffer[BUFFER_SIZE]; struct timeval timeoutValue; fd_set read_set; @@ -489,7 +489,7 @@ void R_tcprecv(__unused int func) { /* // detect EOT - if (bufferÝ0¨ == 0x37 || bufferÝ0¨ == 0x04) + if (buffer[0] == 0x37 || buffer[0] == 0x04) { rc = EOT; } @@ -529,7 +529,7 @@ bool checkSocket(SOCKET socket) { int ii; for (ii = 0; ii <= num_clients - 1; ii++) { - if (client_socketsÝii¨ == socket) { + if (client_sockets[ii] == socket) { found = TRUE; } } @@ -545,13 +545,13 @@ void deleteClient(int client_socket) { int pos = 0; for (ii = 0; ii <= num_clients - 1; ii++) { - if (client_socketsÝii¨ == client_socket) { + if (client_sockets[ii] == client_socket) { pos = ii; } } for (ii = pos; ii <= num_clients - 1; ii++) { - client_socketsÝii¨ = client_socketsÝii + 1¨; + client_sockets[ii] = client_sockets[ii + 1]; } num_clients--; @@ -564,19 +564,19 @@ void closeAllSockets() { closesocket(server_socket); for (ii = 0; ii < num_clients; ++ii) { - closesocket(client_socketsÝii¨); + closesocket(client_sockets[ii]); } } // TODO: copyright notiz hinzufügen char *inet_ntoa(struct in_addr in) { - static char bÝ18¨; + static char b[18]; register char *p; p = (char *) ∈ #define UC(b) (((int)b)&0xff) (void) snprintf(b, sizeof(b), - "%d.%d.%d.%d", UC(pÝ0¨), UC(pÝ1¨), UC(pÝ2¨), UC(pÝ3¨)); + "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3])); return (b); } diff --git a/src/rxtso.c b/src/rxtso.c index ec4a552a..53642747 100644 --- a/src/rxtso.c +++ b/src/rxtso.c @@ -190,7 +190,7 @@ void gtterm(RX_GTTERM_PARAMS_PTR paramsPtr) // Translate a byte into a 3270 compatable byte //---------------------------------------- int xlate3270(int byte) { - static char tbl3270ݨ = + static char tbl3270[] = {0x40, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, @@ -205,7 +205,7 @@ int xlate3270(int byte) { if (byte > 63 || byte < 0) return 0; - return tbl3270Ýbyte¨; + return tbl3270[byte]; } diff --git a/src/soundex.c b/src/soundex.c index 87545f77..2b9fd1af 100644 --- a/src/soundex.c +++ b/src/soundex.c @@ -35,7 +35,7 @@ Lsoundex( const PLstr to, const PLstr str ) letter in alphabetical order. 0 represents letters which are to be ignored. */ char *code, *name; - static char ctableݨ = { "01230120022455012623010202" }; + static char ctable[] = { "01230120022455012623010202" }; char prior=' ', c; short i, y=0; word len; @@ -55,19 +55,19 @@ Lsoundex( const PLstr to, const PLstr str ) if (len > MAX_LENGTH) len = MAX_LENGTH; /* generate 1st character of Soundex code */ - codeÝ0¨ = l2uÝ(byte)nameÝ0¨¨; + code[0] = l2u[(byte)name[0]]; y=1; - if (l2uÝ(byte)nameÝ0¨¨=='K') /* modifications */ - codeÝ0¨ = 'C'; + if (l2u[(byte)name[0]]=='K') /* modifications */ + code[0] = 'C'; else - if (l2uÝ(byte)nameÝ0¨¨=='P' && l2uÝ(byte)nameÝ1¨¨=='H') - codeÝ0¨ = 'F'; + if (l2u[(byte)name[0]]=='P' && l2u[(byte)name[1]]=='H') + code[0] = 'F'; /* loop through the rest of name, until code complete */ for (i=1; i= SOUNDEX_LENGTH) break; /* code is complete */ } - while (y < SOUNDEX_LENGTH) codeÝy++¨ = '0'; /* pad code with zeros */ - codeÝy¨ = '\0'; + while (y < SOUNDEX_LENGTH) code[y++] = '0'; /* pad code with zeros */ + code[y] = '\0'; LLEN(*to) = y; } /* Lsoundex */ diff --git a/src/substr.c b/src/substr.c index 868d7c5b..6c63ff1d 100644 --- a/src/substr.c +++ b/src/substr.c @@ -21,10 +21,10 @@ /* --------------------------- Lsubstr -------------------------------- */ /* to - Output Lstr * * from - Input Lstr * - * start - an integer, can take values from Ý1,from length¨ * + * start - an integer, can take values from [1,from length] * * if start<1 then start = 1 * * length - negative value means rest of string (default) * - * Ý1 - nnn¨ cuts string and pad's it if necessary. * + * [1 - nnn] cuts string and pad's it if necessary. * * pad - pad character * * -------------------------------------------------------------------- */ void __CDECL diff --git a/src/template.c b/src/template.c index 79ebdfae..3926d66e 100644 --- a/src/template.c +++ b/src/template.c @@ -76,7 +76,7 @@ position(void) } /* position */ /* -------------------------------------------------------------- */ -/* template_list := template | Ýtemplate¨ ',' Ýtemplate_list¨ */ +/* template_list := template | [template] ',' [template_list] */ /* template := (trigger | target | Msg38.1)+ */ /* target := VAR_SYMBOL | '.' */ /* trigger := pattern | positional */ diff --git a/src/time.c b/src/time.c index 4b1b1b73..31b4dfc1 100644 --- a/src/time.c +++ b/src/time.c @@ -76,7 +76,7 @@ _Ltimeinit( void ) #elif defined(_MSC_VER) struct _timeb tb; #elif defined(__CMS__) || (defined(__MVS__) && !defined(JCC)) - unsigned int vmnowÝ2¨; + unsigned int vmnow[2]; struct tm * tv; time_t rawtime; #elif defined(JCC) @@ -101,7 +101,7 @@ _Ltimeinit( void ) #elif defined(__CMS__) rawtime = rexclock(vmnow); tv=gmtime(&rawtime); - elapsed = (double)vmnowÝ0¨ + (double)vmnowÝ1¨/1000000.0; + elapsed = (double)vmnow[0] + (double)vmnow[1]/1000000.0; #elif defined(__MVS__) #if defined(JCC) gettimeofday(&vmtime,&vmzone); @@ -110,7 +110,7 @@ _Ltimeinit( void ) elapsed=0.0; #else rawtime = __getclk(vmnow); - elapsed = (double)(vmnowÝ0¨ >> 12) + (double)(vmnowÝ1¨ >> 12)/1000000.0; + elapsed = (double)(vmnow[0] >> 12) + (double)(vmnow[1] >> 12)/1000000.0; #endif tv=gmtime(&rawtime); #else @@ -127,7 +127,7 @@ Ltime( const PLstr timestr, char option ) int hour; #ifdef WCE SYSTEMTIME time; - TCHAR bufÝ30¨; + TCHAR buf[30]; TCHAR *ampm; #else time_t now; @@ -138,7 +138,7 @@ Ltime( const PLstr timestr, char option ) # elif defined(_MSC_VER) struct _timeb tb; # elif defined(__CMS__) // (defined(__MVS__) && !defined(JCC)) - unsigned int vmnowÝ2¨; + unsigned int vmnow[2]; struct tm * tv; # elif defined(__MVS__) && defined(JCC) struct timeval vmtime; @@ -155,7 +155,7 @@ Ltime( const PLstr timestr, char option ) # endif #endif - option = l2uÝ(byte)option¨; + option = l2u[(byte)option]; Lfx(timestr,30); LZEROSTR(*timestr); #ifndef WCE @@ -194,10 +194,10 @@ Ltime( const PLstr timestr, char option ) unow = (double)tb.time + (double)tb.millitm/1000.0; #elif defined(__CMS__) rexclock(vmnow); - unow = (double)vmnowÝ0¨+(double)vmnowÝ1¨/1000000.0; + unow = (double)vmnow[0]+(double)vmnow[1]/1000000.0; #elif (defined(__MVS__) && !defined(JCC)) __getclk(vmnow); - unow = (double)(vmnowÝ0¨>>12)+(double)(vmnowÝ1¨>>12)/1000000.0; + unow = (double)(vmnow[0]>>12)+(double)(vmnow[1]>>12)/1000000.0; #elif defined(JCC) gettimeofday(&vmtime,&vmzone); elapsed = (double) vmtime.tv_sec + (double) vmtime.tv_usec/1000000.0 - starttime; @@ -303,10 +303,10 @@ Ltime( const PLstr timestr, char option ) unow = (double)tb.time + (double)tb.millitm/1000.0; #elif defined(__CMS__) rexclock(vmnow); - unow=(double)vmnowÝ0¨ + (double)vmnowÝ1¨/1000000.0; + unow=(double)vmnow[0] + (double)vmnow[1]/1000000.0; #elif (defined(__MVS__) && !defined(JCC)) __getclk(vmnow); - unow=(double)(vmnowÝ0¨ >> 12) + (double)(vmnowÝ1¨ >> 12)/1000000.0; + unow=(double)(vmnow[0] >> 12) + (double)(vmnow[1] >> 12)/1000000.0; #elif defined(JCC) gettimeofday(&vmtime,&vmzone); elapsed = (double) vmtime.tv_sec + (double) vmtime.tv_usec/1000000.0 - starttime; diff --git a/src/trace.c b/src/trace.c index 14b599a5..36e46546 100644 --- a/src/trace.c +++ b/src/trace.c @@ -52,14 +52,14 @@ void __CDECL RxInitInterStr(); /* ---------- Extern variables ---------------- */ extern Clause *CompileClause; /* compile clauses */ extern int CompileCurClause; /* current clause */ -extern ErrorMsg errortextݨ; /* from lstring/errortxt.c */ +extern ErrorMsg errortext[]; /* from lstring/errortxt.c */ extern bool _in_nextsymbol; /* from nextsymb.c */ extern int _trace; /* from interpret.c */ -extern PLstr RxStckݨ; /* -//- */ +extern PLstr RxStck[]; /* -//- */ extern int RxStckTop; /* -//- */ -extern Lstr _tmpstrݨ; /* -//- */ +extern Lstr _tmpstr[]; /* -//- */ -static char TraceCharݨ = {' ','>','L','V','C','O','F','.'}; +static char TraceChar[] = {' ','>','L','V','C','O','F','.'}; /* ----------------- TraceCurline ----------------- */ int __CDECL @@ -78,32 +78,32 @@ TraceCurline( RxFile **rxf, int print ) codepos = (size_t)((byte huge *)Rxcip - (byte huge *)Rxcodestart); /* search for clause */ cl = 0; - while (CompileClauseÝcl¨.ptr) { - if (CompileClauseÝcl¨.code >= codepos) + while (CompileClause[cl].ptr) { + if (CompileClause[cl].code >= codepos) break; cl++; } cl--; - line = CompileClauseÝcl¨.line; - ch = CompileClauseÝcl¨.ptr; - chend = CompileClauseÝcl+1¨.ptr; + line = CompileClause[cl].line; + ch = CompileClause[cl].ptr; + chend = CompileClause[cl+1].ptr; if (chend==NULL) for (chend=ch; *chend!='\n'; chend++) /*do nothing*/;; - _nesting = _rx_proc + CompileClauseÝcl¨.nesting; + _nesting = _rx_proc + CompileClause[cl].nesting; if (rxf) - *rxf = CompileClauseÝ cl ¨.fptr; + *rxf = CompileClause[ cl ].fptr; } else { /* we are in compile */ if (CompileCurClause==0) cl = 0; else cl = CompileCurClause-1; - _nesting = CompileClauseÝ cl ¨.nesting; + _nesting = CompileClause[ cl ].nesting; if (rxf) { if (CompileCurClause==0) *rxf = CompileRxFile; else - *rxf = CompileClauseÝ cl ¨.fptr; + *rxf = CompileClause[ cl ].fptr; } if (_in_nextsymbol) { line = symboline; @@ -117,8 +117,8 @@ TraceCurline( RxFile **rxf, int print ) ch = (char*)LSTR((*rxf)->file); } else { cl = CompileCurClause-1; - line = CompileClauseÝ cl ¨.line; - ch = CompileClauseÝ cl ¨.ptr; + line = CompileClause[ cl ].line; + ch = CompileClause[ cl ].ptr; } for (chend=ch; *chend!=';' && *chend!='\n'; chend++) /*do nothing*/;; } @@ -170,14 +170,14 @@ TraceSet( PLstr trstr ) ch++; } else if (*ch=='?') { - _procÝ_rx_proc¨.interactive_trace - = 1 - _procÝ_rx_proc¨.interactive_trace; - if (_procÝ_rx_proc¨.interactive_trace) + _proc[_rx_proc].interactive_trace + = 1 - _proc[_rx_proc].interactive_trace; + if (_proc[_rx_proc].interactive_trace) #ifndef WIN - fprintf(STDERR," +++ %s +++\n",errortextÝ2¨.errormsg); + fprintf(STDERR," +++ %s +++\n",errortext[2].errormsg); #else PUTS(" +++ "); - PUTS(errortextÝ0¨.errormsg); + PUTS(errortext[0].errormsg); PUTS(" +++\n"); #endif ch++; @@ -185,37 +185,37 @@ TraceSet( PLstr trstr ) switch (*ch) { case 'A': - _procÝ_rx_proc¨.trace = all_trace; + _proc[_rx_proc].trace = all_trace; break; case 'C': - _procÝ_rx_proc¨.trace = commands_trace; + _proc[_rx_proc].trace = commands_trace; break; case 'E': - _procÝ_rx_proc¨.trace = error_trace; + _proc[_rx_proc].trace = error_trace; break; /* /// case 'F': -/// _procÝ_rx_proc¨.trace = ; +/// _proc[_rx_proc].trace = ; /// break; */ case 'I': - _procÝ_rx_proc¨.trace = intermediates_trace; + _proc[_rx_proc].trace = intermediates_trace; break; case 'L': - _procÝ_rx_proc¨.trace = labels_trace; + _proc[_rx_proc].trace = labels_trace; break; case 'N': - _procÝ_rx_proc¨.trace = normal_trace; + _proc[_rx_proc].trace = normal_trace; break; case 'O': - _procÝ_rx_proc¨.trace = off_trace; - _procÝ_rx_proc¨.interactive_trace = FALSE; + _proc[_rx_proc].trace = off_trace; + _proc[_rx_proc].interactive_trace = FALSE; break; case 'R': - _procÝ_rx_proc¨.trace = results_trace; + _proc[_rx_proc].trace = results_trace; break; case 'S': - _procÝ_rx_proc¨.trace = scan_trace; + _proc[_rx_proc].trace = scan_trace; break; #ifdef __DEBUG__ case 'D': @@ -247,7 +247,7 @@ TraceByte( int middlechar ) void __CDECL TraceClause( void ) { - if (_procÝ_rx_proc¨.interactive_trace) { + if (_proc[_rx_proc].interactive_trace) { /* return if user specified a string for interactive trace */ if (TraceInteractive(TRUE)) return; @@ -263,21 +263,21 @@ void __CDECL TraceInstruction( CIPTYPE inst ) { if ((inst & TB_MIDDLECHAR) != nothing_middle) - if (_procÝ_rx_proc¨.trace == intermediates_trace) { + if (_proc[_rx_proc].trace == intermediates_trace) { int i; #ifndef WIN - fprintf(STDERR," >%c> ",TraceCharÝ inst & TB_MIDDLECHAR ¨); + fprintf(STDERR," >%c> ",TraceChar[ inst & TB_MIDDLECHAR ]); for (i=0; i<_nesting; i++) fputc(' ',STDERR); fputc('\"',STDERR); - Lprint(STDERR,RxStckÝRxStckTop¨); + Lprint(STDERR,RxStck[RxStckTop]); fprintf(STDERR,"\"\n"); #else PUTS(" >"); - PUTCHAR(TraceCharÝ inst & TB_MIDDLECHAR ¨); + PUTCHAR(TraceChar[ inst & TB_MIDDLECHAR ]); PUTS("> "); for (i=0; i<_nesting; i++) PUTCHAR(' '); PUTCHAR('\"'); - Lprint(NULL,RxStckÝRxStckTop¨); + Lprint(NULL,RxStck[RxStckTop]); PUTS("\"\n"); #endif } @@ -289,10 +289,10 @@ TraceInteractive( int frominterpret ) { /* Read the interactive string into a tmp var */ RxStckTop++; - RxStckÝRxStckTop¨ = &(_tmpstrÝRxStckTop¨); + RxStck[RxStckTop] = &(_tmpstr[RxStckTop]); - Lread(STDIN,RxStckÝRxStckTop¨,LREADLINE); - if (!LLEN(*RxStckÝRxStckTop¨)) { + Lread(STDIN,RxStck[RxStckTop],LREADLINE); + if (!LLEN(*RxStck[RxStckTop])) { RxStckTop--; return FALSE; } @@ -300,14 +300,14 @@ TraceInteractive( int frominterpret ) _trace = FALSE; RxInitInterStr(); - _procÝ_rx_proc¨.calltype = CT_INTERACTIVE; + _proc[_rx_proc].calltype = CT_INTERACTIVE; if (frominterpret) { - _procÝ_rx_proc¨.calltype = CT_INTERACTIVE; + _proc[_rx_proc].calltype = CT_INTERACTIVE; /* lets go again to NEWCLAUSE */ #ifdef ALIGN - _procÝ_rx_proc¨.ip-=sizeof(dword); + _proc[_rx_proc].ip-=sizeof(dword); #else - _procÝ_rx_proc¨.ip--; + _proc[_rx_proc].ip--; #endif } return TRUE; diff --git a/src/translat.c b/src/translat.c index 6b08d6f3..477ed975 100644 --- a/src/translat.c +++ b/src/translat.c @@ -25,13 +25,13 @@ void __CDECL Ltranslate( const PLstr to, const PLstr from, const PLstr tableout, const PLstr tablein, const char pad ) { - char tableÝ256¨; + char table[256]; int i; Lstrcpy(to,from); L2STR(to); for (i=0; i<256; i++) - tableÝi¨ = i; + table[i] = i; if (tableout) L2STR(tableout); if (tablein) L2STR(tablein); @@ -40,21 +40,21 @@ Ltranslate( const PLstr to, const PLstr from, for (i=LLEN(*tablein)-1; i>=0; i--) if (tableout) { if (i>=LLEN(*tableout)) - tableÝ(byte)LSTR(*tablein)Ýi¨¨=pad; + table[(byte)LSTR(*tablein)[i]]=pad; else - tableÝ(byte)LSTR(*tablein)Ýi¨¨=LSTR(*tableout)Ýi¨; + table[(byte)LSTR(*tablein)[i]]=LSTR(*tableout)[i]; } else - tableÝ(byte)LSTR(*tablein)Ýi¨¨ = pad; + table[(byte)LSTR(*tablein)[i]] = pad; } else { for (i=0; i<256; i++) if (tableout) { if (i >= LLEN(*tableout)) - tableÝi¨ = pad; + table[i] = pad; else - tableÝi¨ = LSTR(*tableout)Ýi¨; + table[i] = LSTR(*tableout)[i]; } } for (i=0; i 0) ? (strlen(sDSName) - 1) : 0; /* get chars at defined positions */ - unsigned char cFirstChar = (unsigned char)sDSNameÝiFirstCharPos¨; - unsigned char cLastChar = (unsigned char)sDSNameÝiLastCharPos¨; + unsigned char cFirstChar = (unsigned char)sDSName[iFirstCharPos]; + unsigned char cLastChar = (unsigned char)sDSName[iLastCharPos]; if (cFirstChar == '\'' || cFirstChar == '\"') { bQuotationMarkAtBeginning = TRUE; @@ -49,7 +49,7 @@ QuotationType CheckQuotation(const char *sDSName) return quotationType; } -int getDatasetName(RX_ENVIRONMENT_CTX_PTR pEnvironmentCtx, const char *datasetNameIn, char datasetNameOutÝ54 + 1¨) +int getDatasetName(RX_ENVIRONMENT_CTX_PTR pEnvironmentCtx, const char *datasetNameIn, char datasetNameOut[54 + 1]) { int iErr = 0; @@ -57,7 +57,7 @@ int getDatasetName(RX_ENVIRONMENT_CTX_PTR pEnvironmentCtx, const char *datasetN switch (CheckQuotation(datasetNameIn)) { case UNQUOTED: - if (pEnvironmentCtx->SYSPREFÝ0¨ != '\0') { + if (pEnvironmentCtx->SYSPREF[0] != '\0') { strcat(datasetNameOut, pEnvironmentCtx->SYSPREF); strcat(datasetNameOut, "."); strcat(datasetNameOut, datasetNameIn); @@ -95,13 +95,13 @@ void splitDSN(PLstr dsn, PLstr member, PLstr fromDSN) { } for (dsni=0;dsniid = Rx_id; - inf->leafÝ0¨ = leaf; + inf->leaf[0] = leaf; } return leaf; } else { /* ======= first find array ======= */ - leafidx = inf->leafÝ0¨; + leafidx = inf->leaf[0]; varname = &(leafidx->key); infidx = (IdentInfo*)(leafidx->value); if (Rx_id!=NO_CACHE && infidx->id==Rx_id) - leaf = infidx->leafÝ0¨; + leaf = infidx->leaf[0]; else { /** //// LASCIIZ(varname); @@ -269,21 +269,21 @@ RxVarFind(const Scope scope, const PBinLeaf litleaf, bool *found) } if (leaf) { infidx->id = Rx_id; - infidx->leafÝ0¨ = leaf; + infidx->leaf[0] = leaf; } else infidx->id = NO_CACHE; } /* construct index */ LZEROSTR(varidx); - curscope = _procÝ_rx_proc¨.scope; + curscope = _proc[_rx_proc].scope; for (i=1; istem; i++) { if (i!=1) { /* append a dot '.' */ - LSTR(varidx)ÝLLEN(varidx)¨ = '.'; + LSTR(varidx)[LLEN(varidx)] = '.'; LLEN(varidx)++; } - leafidx = inf->leafÝi¨; + leafidx = inf->leaf[i]; if (leafidx==NULL) continue; infidx = (IdentInfo*)(leafidx->value); @@ -297,7 +297,7 @@ RxVarFind(const Scope scope, const PBinLeaf litleaf, bool *found) } else if (Rx_id!=NO_CACHE && infidx->id==Rx_id) { register PLstr lptr; - leafidx = infidx->leafÝ0¨; + leafidx = infidx->leaf[0]; lptr = LEAFVAL(leafidx); L2STR(lptr); l = LLEN(varidx)+LLEN(*lptr); @@ -330,7 +330,7 @@ RxVarFind(const Scope scope, const PBinLeaf litleaf, bool *found) if (leafidx) { register PLstr lptr; infidx->id = Rx_id; - infidx->leafÝ0¨ = leafidx; + infidx->leaf[0] = leafidx; lptr = LEAFVAL(leafidx); L2STR(lptr); l = LLEN(varidx)+LLEN(*lptr); @@ -346,7 +346,7 @@ RxVarFind(const Scope scope, const PBinLeaf litleaf, bool *found) L2STR(&varidx); if (_trace) - if (_procÝ_rx_proc¨.trace == intermediates_trace) { + if (_proc[_rx_proc].trace == intermediates_trace) { int i; FPUTS(" >C> ",STDERR); for (i=0;i<_nesting; i++) FPUTC(' ',STDERR); @@ -465,7 +465,7 @@ RxVarFindName(Scope scope, PLstr name, bool *found) while (*ch=='.') { /* concatanate a dot '.' */ L2STR(&varidx); - LSTR(varidx)ÝLLEN(varidx)¨ = '.'; + LSTR(varidx)[LLEN(varidx)] = '.'; LLEN(varidx)++; ch++; stop++; } @@ -567,11 +567,11 @@ RxVarDel(Scope scope, PBinLeaf litleaf, PBinLeaf varleaf) /** // } else { // * find leaf of stem * -// tree = scope + hashcharÝ (byte)LSTR(*name)Ý0¨ ¨; +// tree = scope + hashchar[ (byte)LSTR(*name)[0] ]; // stemleaf = BinFind(tree,varname); // var = (Variable*)(stemleaf->value); // * find the actual bintree of variable * -// tree = var->stem + hashcharÝ (byte)LSTR(varidx)Ý0¨ ¨; +// tree = var->stem + hashchar[ (byte)LSTR(varidx)[0] ]; // BinDel(tree,&varidx,RxVarFree); // inf->id = NO_CACHE; // } @@ -668,7 +668,7 @@ RxVarExpose(Scope scope, PBinLeaf litleaf) } /* --- else search in the old scope for variable --- */ - oldscope = _procÝ _rx_proc-1 ¨.scope; + oldscope = _proc[ _rx_proc-1 ].scope; /* --- change curid since we are dealing with old scope --- */ oldcurid = Rx_id; @@ -757,7 +757,7 @@ RxVarSet( Scope scope, PBinLeaf varleaf, PLstr value ) inf = (IdentInfo*)(varleaf->value); if (inf->id == Rx_id) { - leaf = inf->leafÝ0¨; + leaf = inf->leaf[0]; Lstrcpy(LEAFVAL(leaf), value); } else { leaf = RxVarFind(scope,varleaf,&found); @@ -773,7 +773,7 @@ RxVarSet( Scope scope, PBinLeaf varleaf, PLstr value ) if (inf->stem==0) { inf->id = Rx_id; - inf->leafÝ0¨ = leaf; + inf->leaf[0] = leaf; } } } @@ -798,7 +798,7 @@ RxSetSpecialVar( int rcsigl, long num ) LINITSTR(value) Lfx(&value,0); Licpy(&value,num); - RxVarSet(_procÝ_rx_proc¨.scope,varleaf,&value); + RxVarSet(_proc[_rx_proc].scope,varleaf,&value); LFREESTR(value) } /* RxSetSpecialVar */ @@ -809,7 +809,7 @@ RxScopeMalloc( void ) static Scope scope; scope = (Scope)MALLOC(sizeof(BinTree),"Scope"); - BINTREEINIT(scopeÝ0¨); + BINTREEINIT(scope[0]); return scope; } /* RxScopeMalloc */ @@ -819,7 +819,7 @@ RxScopeFree(Scope scope) { int i; if (scope) - BinDisposeLeaf(&(scopeÝ0¨),scopeÝ0¨.parent,RxVarFree); + BinDisposeLeaf(&(scope[0]),scope[0].parent,RxVarFree); } /* RxScopeFree */ /* ================ VarTreeAssign ================ */ @@ -860,7 +860,7 @@ RxScopeAssign(PBinLeaf varleaf) /* determine minimum MAXLEN */ mlen = LNORMALISE(LLEN(*str)) + LEXTRA; - VarTreeAssign(scopeÝ0¨.parent,str,mlen); + VarTreeAssign(scope[0].parent,str,mlen); } /* RxScopeAssign */ /* ---------------- RxVar2Str ------------------- */ @@ -923,7 +923,7 @@ RxScanVarTree( PLstr result, PBinLeaf leaf, PLstr head, int depth, int option ) void __CDECL RxReadVarTree(PLstr result, Scope scope, PLstr head, int option) { - RxScanVarTree(result,scopeÝ0¨.parent,head,0,option); + RxScanVarTree(result,scope[0].parent,head,0,option); } /* RxReadVarTree */ /* ================ POOL functions =================== */ @@ -1004,7 +1004,7 @@ RxPoolGet( PLstr pool, PLstr name, PLstr value ) /* search in the appropriate scope */ LINITSTR(str); /* translate to upper case */ Lstrcpy(&str,name); Lupper(&str); - leaf = RxVarFindName(_procÝpoolnum¨.scope,&str,&found); + leaf = RxVarFindName(_proc[poolnum].scope,&str,&found); if (found) { Lstrcpy(value,LEAFVAL(leaf)); LFREESTR(str); @@ -1052,7 +1052,7 @@ RxPoolSet( PLstr pool, PLstr name, PLstr value ) /* search in the appropriate scope */ LINITSTR(str); /* translate to upper case */ Lstrcpy(&str,name); Lupper(&str); - leaf = RxVarFindName(_procÝpoolnum¨.scope,&str,&found); + leaf = RxVarFindName(_proc[poolnum].scope,&str,&found); /* set the new value */ if (found) { @@ -1064,7 +1064,7 @@ RxPoolSet( PLstr pool, PLstr name, PLstr value ) hasdot = (MEMCHR(LSTR(str),'.',LLEN(str)-1)!=NULL); /* added it to the tree */ - leaf = RxVarAdd(_procÝpoolnum¨.scope, + leaf = RxVarAdd(_proc[poolnum].scope, &str, hasdot, leaf); Lstrcpy(LEAFVAL(leaf),value); } diff --git a/src/verify.c b/src/verify.c index fa3eebeb..69fb1fc3 100644 --- a/src/verify.c +++ b/src/verify.c @@ -27,7 +27,7 @@ * ref - reference characters * * match - FALSE = find non matching chars * * TRUE = find only matching chars * - * start - starting position Ý1,len¨ * + * start - starting position [1,len] * * returns * * 0 if every char is found (or not found) * * according to match * @@ -46,7 +46,7 @@ Lverify( const PLstr str, const PLstr ref, const bool match, long start ) if (start >= LLEN(*str)) return LNOTFOUND; for (; start= LLEN(*phrase)) { if (p>=LLEN(*s)) return n; - if (ISSPACE(LSTR(*s)Ýp¨)) return n; + if (ISSPACE(LSTR(*s)[p])) return n; k = lk; LSKIPWORD(*s,lp); LSKIPBLANKS(*s,lp); if (lp>=LLEN(*s)) return 0; p = lp; n++; } else - if (ISSPACE(LSTR(*phrase)Ýk¨)) { - if (ISSPACE(LSTR(*s)Ýp¨)) { + if (ISSPACE(LSTR(*phrase)[k])) { + if (ISSPACE(LSTR(*s)[p])) { LSKIPBLANKS(*phrase,k); if (k>=LLEN(*phrase)) return n; LSKIPBLANKS(*s,p); @@ -76,7 +76,7 @@ Lwordpos( const PLstr phrase, const PLstr s, long n ) p = lp; n++; } } else { - if (LSTR(*phrase)Ýk¨ == LSTR(*s)Ýp¨) { + if (LSTR(*phrase)[k] == LSTR(*s)[p]) { k++; p++; } else { k = lk; diff --git a/src/x2b.c b/src/x2b.c index e9128fcd..3afcd270 100644 --- a/src/x2b.c +++ b/src/x2b.c @@ -41,11 +41,11 @@ Lx2b( const PLstr to, const PLstr from ) c = LSTR(*to); for (i=0; i>=1) #ifndef __CMS__ *c++ = (d&k)? '1' : '0'; diff --git a/src/x2c.c b/src/x2c.c index fd06611b..4854805e 100644 --- a/src/x2c.c +++ b/src/x2c.c @@ -41,8 +41,8 @@ Lx2c( const PLstr to, const PLstr from ) t = LSTR(*to); f = LSTR(*from); for (i=r=0; i8) n=8; Lspace(&tmp,from,0,' '); Lright(to,&tmp,n,'0'); - sign = HEXVAL(LSTR(*to)Ý0¨) & 0x8; + sign = HEXVAL(LSTR(*to)[0]) & 0x8; Lx2c(&tmp,to); Lc2d(to,&tmp,0); if (sign) { @@ -45,7 +45,7 @@ Lx2d( const PLstr to, const PLstr from, long n ) /**** - if ((LLEN(*to)&1) && LSTR(*to)Ý0¨>'7') { + if ((LLEN(*to)&1) && LSTR(*to)[0]>'7') { Lright(&tmp,to,LLEN(*to)+1,'f'); Lstrcpy(to,&tmp); }