Thread View: comp.lang.modula2
1 messages
1 total messages
Started by Jeffrey E Stoner
Fri, 02 Feb 1996 06:00
REXX for Neuhoff M2
Author: Jeffrey E Stoner
Date: Fri, 02 Feb 1996 06:00
Date: Fri, 02 Feb 1996 06:00
109 lines
4842 bytes
4842 bytes
I wrote this little script to use Neuhoff Modula-2 from the OS/2 desktop.
It's a little late since an IDE is forthcoming. But until then, you
can use it and abuse it as you see fit. The main reason for writing it
was to remove all the settings from my config.sys file and load the
settings as needed, i.e. for every compile. The extra few seconds it takes
to run are tolerable on my 486/50. If you have problems, let me know
and I'll see if I can resolve 'em. It's a pretty straight forward script
and you should be able to modify it without problems.
Jeff
* internet--> jesst63+@pitt.edu * This space reserved *
* http://www.pitt.edu/~jesst63 * for something much *
* "I am outcast, unclean." - Thomas Covenant * better to come along *
-= CUT HERE =-
/* REXX Script for Neuhoff Modula-2 compiler */
/* Passes parameters to mod.exe from OS\2 Desktop */
/* Instructions: */
/* Use a PROGRAM template from the TEMPLATES */
/* folder for Neuhoff Modula-2 but use this script instead */
/* of MOD.EXE and put [ ] in the PARAMETERS field. */
/* [ ] will allow you to type in parameters as if you had */
/* typed them from the command line. You can enter the */
/* source file and up to 10 command-line switches. */
/* Also, use a PROGRAM TEMPLATE for LINK.EXE and */
/* LINK386.EXE. In the parameters field, type: */
/* [Options] @%* */
/* This allows you to drag and drop the linker responce */
/* file created by MOD.EXE if you used the -m switch. */
/* Placed into the Public Domain. */
/* DISCLAIMER: */
/* THIS REXX SCRIPT IS PROVIDED "AS IS" WITH NO */
/* WARRANTIES, EXPRESSED OR IMPLIED, AS TO ITS */
/* FUNCTIONALITY OR USE. */
/* This script is rough around the edges. It wasn't */
/* written for speed or efficiency. I wanted to remove */
/* all the Neuhoff Modula-2 settings from my CONFIG.SYS */
/* file. Since the REXX procedures are pretty straight */
/* forward, you should have no difficulty modifying it to */
/* suit your system. */
/* Global Values: */
/* Source_Path contains the path where you installed */
/* Neuhoff Modula-2. For example: C:\ */
Source_Path = "C:\"
ENV = "OS2ENVIRONMENT"
/* First, save the current environment and establish a new */
/* PATH setting. */
Old_Environment = SETLOCAL()
Old_Path = VALUE("PATH",, ENV)
New_Path = INSERT(Source_Path, "OS\2BIN;")
Modified_Path = INSERT(New_Path, Old_Path)
Success = VALUE("PATH", Modified_Path, ENV)
/* The following variables allow the building of a path for */
/* module sources. You can modify it to suit your */
/* particular configuration. It adds the current directory. */
Temp_Source_Base1 = INSERT(Source_Path, "OS2MOD;")
Temp_Source_Base2 = INSERT(Source_Path, "OS2API;")
Temp_Source_Base3 = INSERT(Source_Path, "OS2SRC;")
Temp_Source_Mid1 = INSERT(".;", Temp_Source_Base1)
Temp_Source_Mid2 = INSERT(Temp_Source_Mid1, Temp_Source_Base2)
/* These variables will be used to set the various */
/* environment variables required by Neuhoff Modula-2. */
Temp_Source_Path = INSERT(Temp_Source_Mid2, Temp_Source_Base3)
Temp_TMP_Path = Source_Path
Temp_LIB_Path = INSERT(Source_Path, "OS2LIB;")
Temp_FlatOBJ_Path = INSERT(Source_Path, "OS2OBJ;")
Temp_SOBJ_Path = INSERT(".;", Source_Path)
Temp_MOBJ_Path = INSERT(".;", Source_Path)
Temp_COBJ_Path = INSERT(".;", Source_Path)
Temp_LOBJ_Path = INSERT(".;", Source_Path)
Success = VALUE(MOD_SRC, Temp_Source_Path, ENV)
Success = VALUE(MOD_TMP, Temp_TMP_Path, ENV)
Success = VALUE(MOD_LIB, Temp_LIB_Path, ENV)
Success = VALUE(MOD_OBJ_FLAT32, Temp_FlatOBJ_Path, ENV)
Success = VALUE(MOD_OBJ_SMALL, Temp_SOBJ_Path, ENV)
Success = VALUE(MOD_OBJ_MEDIUM, Temp_MOBJ_Path, ENV)
Success = VALUE(MOD_OBJ_COMPACT, Temp_COBJ_Path, ENV)
Success = VALUE(MOD_OBJ_LARGE, Temp_LOBJ_Path, ENV)
/* Here we accept the command line variables into the */
/* script and pass them along to MOD.EXE. */
/* If you used the -m option (generate linker responce */
/* file) it will be in the OS2BIN directory. */
PARSE ARG Source_File Switch_1 Switch_2 Switch_3 Switch_4 Switch_5 Switch_6 Switch_7 Switch_8 Switch_9 Switch_10
MOD.EXE Source_File Switch_1 Switch_2 Switch_3 Switch_4 Switch_5 Switch_6 Switch_7 Switch_8 Switch_9 Switch_10
/* Restore the old environment to the way it was. */
Old_Environment = ENDLOCAL()
EXIT
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads