home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cenvi23.zip / CENVILIB.DOC < prev    next >
Text File  |  1996-02-20  |  30KB  |  585 lines

  1.                        CEnvi Demo Manual, Chapter 4:
  2.                              Function Library
  3.  
  4.                            CEnvi version 2.11
  5.                             20 February 1996
  6.  
  7.                  Copyright 1993, Nombas, All Rights Reserved.
  8.           Published by Nombas, 64 Salem Street, MEDFORD MA 02155 USA
  9.           
  10.              VOICE (617) 391-6595     EMAIL: nombas@nombas.com
  11.              BBS   (617) 391-3718     WWW: http://www.nombas.com
  12.              FAX   (617) 391-3842
  13.  
  14.          Thank you for trying this shareware version of CEnvi from Nombas.
  15.  
  16.                           _______
  17.                      ____|__     |                (R)
  18.                   --|       |    |-------------------
  19.                     |   ____|__  |  Association of
  20.                     |  |       |_|  Shareware
  21.                     |__|   o   |    Professionals
  22.                   -----|   |   |---------------------
  23.                        |___|___|    MEMBER
  24.  
  25.  
  26.  
  27. 4.  CEnvi Internal Function Library
  28.  
  29.           CEnvi includes a large library of internal functions that are
  30.           available for use in your CEnvi code.  (External function
  31.           libraries, and a developer toolkit for creating external
  32.           libraries, will be available in an upcoming incremental release.)
  33.           The routines listed here in brief are fully explained in the CEnvi 
  34.           registered users manual.
  35.  
  36.  
  37. 4.1.  Standard Library
  38.  
  39.           The C language has long had a standard set of libraries that
  40.           contain routines included with nearly all C implementations.
  41.           Most of this standard library, as defined by ANSI and ISO, is
  42.           included internally to CEnvi, so all of these routines are
  43.           available to any Cmm program executed by CEnvi.
  44.  
  45.           Minimal modifications have been added to the standard library to
  46.           support the differences between the Cmm and the C languages.  In
  47.           most cases, these modifications involve the redefinition of
  48.           variable pointers to become variables-passed-by-reference.
  49.           Usually, though, the Cmm call to one of these functions looks
  50.           identical to the C call.  The experienced C programmer should
  51.           feel right at home.
  52.  
  53.           A few functions have been dropped in this version, mostly those
  54.           dealing with locales.  A few functions have also been added
  55.           beyond those in the ANSI and ISO standards when those functions
  56.           seem to be common across most existing implementations of C
  57.           libraries.
  58.  
  59.             CLOCKS_PER_SEC: defined for system clock rate
  60.             FALSE: #define'd 0
  61.             TRUE: #define'd 1
  62.             NULL: #define'd 0
  63.             EXIT_FAILURE: failure program exit value
  64.             EXIT_SUCCESS: good program exit value
  65.             RAND_MAX: maximum number returned by rand()
  66.  
  67.             abort: Terminate program; probably due to error.
  68.               void abort()
  69.             abs: Return the absolute value of an integer.
  70.               int abs(int x)
  71.             acos: Calculate the arc cosine.
  72.               float acos(float x)
  73.             asctime: Convert data and time to an ASCII string.
  74.               string asctime(struct tm)
  75.             asin: Calculate the arc sine.
  76.               float asin(float x)
  77.             assert: Test a condition and abort if it is FALSE.
  78.               void assert(bool test)
  79.             atan: Calculate the arc tangent.
  80.               float atan(float x)
  81.             atan2: Calculate the arc tangent of a fraction.
  82.               float atan2(float y,float x)
  83.             atexit: Register function to be called at program exit.
  84.               void atexit(string functionName)
  85.             atof: Convert ascii string to a floating-point number
  86.               float atof(string str)
  87.             atoi: Convert ascii string to an integer.
  88.               int atoi(string str)
  89.             atol: Convert ascii string to an integer.
  90.               int atol(string str)
  91.             bsearch: Binary search for member of a sorted array.
  92.               var[] bsearch(var key,var[] SortedArray,[int
  93.               ElementCount,]string CompareFunction)
  94.             ceil: Ceiling; round up.
  95.               float ceil(float x)
  96.             clearerr: Clear end-of-file and error status for a file.
  97.               void clearerr(FILE stream)
  98.             clock: Get processor time.
  99.               int clock()
  100.             cos: Calculate the cosine.
  101.               float cos(float x)
  102.             cosh: Calculate the hyperbolic cosine.
  103.               float cosh(float x)
  104.             ctime: Convert date-time to an ascii string.
  105.               string ctime(int time)
  106.             difftime: Compute difference between two times.
  107.               float difftime(int time1,int time0)
  108.             div: Integer division, returning quotient and remainder.
  109.               struct div(int numerator,int denominator)
  110.             errno: Value of error condition
  111.               int errno
  112.             exit: Normal program termination.
  113.               void exit(int status)
  114.             exp: Compute the exponential function.
  115.               float exp(float x)
  116.             fabs: Absolute value.
  117.               float fabs(float x)
  118.             fclose: Close an open file.
  119.               int fclose(FILE stream)
  120.             feof: Test if at end of file stream.
  121.               bool feof(FILE stream)
  122.             ferror: Test for error on a file stream.
  123.               int ferror(FILE stream)
  124.             fflush: Flush stream for open file(s).
  125.               int fflush(FILE stream)
  126.             fgetc: Get a character from file stream.
  127.               int fgetc(FILE stream)
  128.             fgetpos: Get current position of a file stream.
  129.               int fgetpos(FILE stream,Var pos)
  130.             fgets: Get a string from an input stream.
  131.               string fgets([string buf[,int buflen],]FILE stream)
  132.             floor: Round down.
  133.               float floor(float x)
  134.             fmod: Modulus; calculate remainder.
  135.               float fmod(float x,float y)
  136.             fopen: Open a file.
  137.               FILE fopen(string filename,string mode)
  138.             fprintf: Formatted output to a file stream.
  139.               int fprintf(FILE stream,string format,...)
  140.             fputc: Write a character to a file stream.
  141.               int fputc(int c,FILE stream)
  142.             fputs: Write a string to a file stream.
  143.               int fputs(string s,FILE stream)
  144.             fread: Read data from a file.
  145.               int fread(byte[] DestBuffer,bufferLen,stream)
  146.               int fread(Var DestVar,int DataTypeInFile,stream)
  147.             freopen: Assign a new file specification to a file handle.
  148.               FILE freopen(string filename,string mode,FILE OldFP)
  149.             frexp: Break into a mantissa and an exponential power of 2.
  150.               float frexp(float x,int exponent)
  151.             fscanf: Formatted input from a file stream.
  152.               int fscanf(FILE stream,string format,...)
  153.             fseek: Set the file position for an opened file stream.
  154.               int fseek(stream,offset[,mode])
  155.             fsetpos: Set position of a file stream.
  156.               int fsetpos(stream,Var pos)
  157.             ftell: Get the current value of the file position.
  158.               int ftell(FILE stream)
  159.             fwrite: Write data to a file.
  160.               int fwrite(byte[] SourceBuffer,bufferLen,stream)
  161.               int fwrite(Var SourceVar,int DataTypeInFile,stream)
  162.             getc: Get a character from file stream.
  163.               int getc(FILE stream)
  164.             getch: Get a character from the keyboard; without echo.
  165.               int getch()
  166.             getchar: Get a character from standard input (keyboard).
  167.               int getchar()
  168.             getche: Get a character from the keyboard; with echo.
  169.               int getch()
  170.             getenv: Get an environment string.
  171.               string getenv(string VariableName)
  172.             gets: Read a string from standard input (keyboard).
  173.               string gets([string buf])
  174.             gmtime: Convert data and time to Greeenwich mean time (GMT).
  175.               struct gmtime(int t)
  176.             isalnum: Test for alphanumeric character.
  177.               bool isalnum(int c)
  178.             isalpha: Test for alphabetic character.
  179.               bool isalpha(int c)
  180.             isascii: Test for ASCII coded character.
  181.               bool isascii(int c)
  182.             iscntrl: Test for any control character.
  183.               bool iscntrl(int c)
  184.             isdigit: Test for any decimal-digit character.
  185.               bool isdigit(int c)
  186.             isgraph: Test for any printing character except for space.
  187.               bool isgraph(int c)
  188.             islower: Test for lower-case alphabetic letter.
  189.               bool islower(int c)
  190.             isprint: Test for any printing character including space.
  191.               bool isprint(int c)
  192.             ispunct: Test for punctuation character.
  193.               bool ispunct(int c)
  194.             isspace: Test for white-space character.
  195.               bool isspace(int c)
  196.             isupper: Test for upper-case alphabetic character.
  197.               bool isupper(int c)
  198.             isxdigit: Test for hexadecimal-digit character.
  199.               bool isxdigit(int c)
  200.             kbhit: Check if a keyboard keystroke is available.
  201.               bool kbhit()
  202.             labs: Return the absolute value of an integer (non-negative).
  203.               int labs(int x)
  204.             ldexp: Calculate mantissa * 2 ^ exp; inverse of frexp().
  205.               float ldexp(float mantissa,int exponent)
  206.             localtime: Convert data and time to borken-down structure.
  207.               struct localtime(int t)
  208.             ldiv: Integer division, returning quotient and remainder.
  209.               struct ldiv(int numerator,int denominator)
  210.             log: Calculate the natural logarithm.
  211.               float log(float x)
  212.             log10: Calculate the base-ten logarithm.
  213.               float log10(float x)
  214.             max: Return the largest of one or more values.
  215.               var max(var v1[,var v2[,var v3[,...]]])
  216.             memchr: Search a byte array, or blob, for a character.
  217.               byte[] memchr(byte[] array,byte c[,int size])
  218.             memcmp: Compare two byte arrays.
  219.               int memcmp(byte[] array1,byte[] array2[,int len])
  220.             memcpy: Copy bytes from one array to another.
  221.               byte[] memcpy(byte[] dest,byte[] src[,int len])
  222.             memicmp: Case-insensitive compare two byte arrays.
  223.               int memicmp(byte[] array1,byte[] array2[,int len])
  224.             memmove: Copy bytes from one array to another.
  225.               byte[] memmove(byte[] dest,byte[] src[,int len])
  226.             memset: Set values in a byte array to specific character.
  227.               byte[] memset(byte[] buf,int c[,int len])
  228.             min: Return the minimum of one or more values.
  229.               var min(var v1[,var v2[,var v3[,...]]])
  230.             mktime: Convert time structure into calendar time.
  231.               int mktime(struct TimeStruct)
  232.             modf: Split a value into integer and fractional parts.
  233.               float modf(float x,float i)
  234.             perror: Prints an message describing error in errno.
  235.               void perror(string s)
  236.             pow: Calculates x to the power of y.
  237.               float pow(float x,float y)
  238.             printf: Formatted output to the standard output (screen).
  239.               int printf(FILE stream,string format,...)
  240.             putc: Write a character to a file stream.
  241.               int putc(int c,FILE stream)
  242.             putchar: Write a character to stadnard output (screen).
  243.               int putchar(int c)
  244.             putenv: Set an environment string.
  245.               int putenv(string VariableName,string Value)
  246.             puts: Write a string to the the standard output (screen).
  247.               int puts(string s)
  248.             qsort: Sort an array using specified comparison function.
  249.               int qsort(var[] array,[int ElementCount,]string CmpFunction)
  250.             rand: Generate a random number.
  251.               int rand()
  252.             remove: Delete a file.
  253.               int remove(string filename)
  254.             rename: Rename a file.
  255.               int rename(string OldFilename,string NewFilename)
  256.             rewind: Reset file position to beginning of file.
  257.               void rewind(FILE stream)
  258.             scanf: Formatted input from the standard input (keyboard).
  259.               int scanf(string format,...)
  260.             sin: Calculate the sine.
  261.               float sin(float x)
  262.             sinh: Calculate the hyperbolic sine.
  263.               float sinh(float x)
  264.             sprintf: Formatted output to a string.
  265.               int sprintf(string buffer,FILE stream,string format,...)
  266.             sqrt: Calculate the square root.
  267.               float sqrt(float x)
  268.             srand: Initialize random number generator
  269.               void srand([int seed])
  270.             sscanf: Formatted input from a string.
  271.               int sscanf(string buffer,string format,...)
  272.             strcat: Append one string onto the end of another.
  273.               string strcat(string dest,string src)
  274.             strchr: Search a string for a character.
  275.               string strchr(string s,byte c)
  276.             strcmp: Compare two strings.
  277.               int strcmp(string s1,string s2)
  278.             strcmpi: Case-insensitive compare two strings.
  279.               int strcmpi(string s1,string s2)
  280.             strcpy: Copy from one string into another.
  281.               string strcpy(string dest,string src)
  282.             strcspn: Search string for first from a set of characters.
  283.               int strcspn(string Str,string CharSet)
  284.             strerror: Get a string describing an error number.
  285.               string (int err)
  286.             strftime: Formatted write of date and/or time into a string.
  287.               int strftime(string buf,[int Size,]string Format, struct tm)
  288.             stricmp: Case-insensitive compare two strings.
  289.               int stricmp(string s1,string s2)
  290.             strlen: Length of a string.
  291.               int strlen(string s)
  292.             strlwr: Converts string to lower-case characters.
  293.               string strlwr(string s);
  294.             strncat: Append up to len bytes of one string onto another.
  295.               string strncat(string dest,string src,int MaxLen)
  296.             strncmp: Compare part of two strings.
  297.               int strncmp(string s1,string s2,int MaxLen)
  298.             strncmpi: Case-insensitive compare part of two strings.
  299.               int strncmpi(string s1,string s2,int MaxLen)
  300.             strncpy: Copy given len bytes from one string into another.
  301.               string strncpy(string dest,string src,int MaxLen)
  302.             strnicmp: Case-insensitive compare part of two strings.
  303.               int strnicmp(string s1,string s2,int MaxLen)
  304.             strpbrk: Search string for byte from another string.
  305.               string strpbrk(string Str,string CharSet)
  306.             strrchr: Find last character occurrence in a string
  307.               string strrchr(string s,byte c)
  308.             strspn: Search string for first character not in a set.
  309.               int strspn(string Str,string CharSet)
  310.             strstr: Search string for a substring.
  311.               string strstr(string Str,string SubStr)
  312.             strtod: Convert a string to a floating-point value.
  313.               float strtod(string Str[,string End])
  314.             strtok: Search a string for delimited tokens.
  315.               string strtok(string Source,string Delimiters)
  316.             strtol: Convert a string to an integer value.
  317.               int strtol(string Str)
  318.               int strtol(string Str,string End)
  319.               int strtol(string Str,string End,string Radix)
  320.             strupr: Converts string to upper-case characters.
  321.               string strupr(string s)
  322.             system: Pass a command to the command processor.
  323.               int system(string Command)
  324.               int system(string CommandFormat,var arg1,...)
  325.               int system(P_SWAP,string Command) // DOS
  326.               int system(P_SWAP,string CommandFormat,var arg1,...) // DOS
  327.             tan: Calculate the tangent.
  328.               float tan(float x)
  329.             tanh: Calculate the hyperbolic tangent.
  330.               float tanh(float x)
  331.             time: Get current time.
  332.               int time([t])
  333.             tmpfile: Create a temporary binary file.
  334.               FILE tmpfile()
  335.             tmpnam: Get a temporary file name.
  336.               string tmpname([string filename])
  337.             toascii: Translate character to ASCII (7-bit) format.
  338.               int toascii(int c)
  339.             tolower: Translate character to lower-case if it is upper-case.
  340.               int tolower(int c)
  341.             toupper: Translate character to upper-case if it is lower-case.
  342.               int toupper(int c)
  343.             ungetc: Push character back to input stream.
  344.               int ungetc(int c,FILE stream)
  345.             va_arg: Retrieve variable from variable argument list.
  346.               var va_arg(blob valist[,int offset])
  347.               var va_arg(int offset)
  348.               int va_arg()
  349.             va_end: Terminate variable argument list.
  350.               void va_end(blob valist)
  351.             va_start: Initialize variable argument list.
  352.               int va_start(blob va_list[,var InputVar])
  353.             vfprintf: Formatted output to a file stream using arg_list.
  354.               int vfprintf(FILE stream,string format,blob valist)
  355.             vfscanf: Formatted input from a file stream using arg_list.
  356.               int vfscanf(FILE stream,string format,blob valist)
  357.             vprintf: Formatted output to screen using arg_list.
  358.               int vfprintf(FILE stream,blob valist)
  359.             vscanf: Formatted input from keyboard using arg_list.
  360.               int vscanf(string format,blob valist)
  361.             vsprintf: Formatted output to a string using arg_list.
  362.               int vsprintf(string buffer,FILE stream,string format,
  363.                            blob valist)
  364.             vsscanf: Formatted input from a string.
  365.               int vsscanf(string buffer,string format,blob valist)
  366.  
  367. 4.2.  CEnvi Cross-platform Library Additions
  368.  
  369.           CEnvi with Cmm adds some additional function calls to the
  370.           standard C library.  Some of these functions are ones we wish
  371.           were in the standard library, and others are functions that are
  372.           particularly useful in the types of scripting and command-line
  373.           environments where CEnvi is most likely to be used.
  374.  
  375.             #define VERSION_MAJOR // 1 in version "1.0 shareware" release
  376.             #define VERSION_MINOR // 0 in version "1.0 shareware" release
  377.             #define VERSION_STRING // "shareware" for "1.0 shareware"
  378.  
  379.           Depending on which version of CEnvi is running, one of the
  380.           following values will be defined:
  381.  
  382.             #define _DOS_         1
  383.               or
  384.             #define _OS2_         1
  385.               or
  386.             #define _WINDOWS_     1
  387.               or
  388.             #define _NTWIN_       1
  389.               or
  390.             #define _NTCON_       1
  391.  
  392.             BLObGet: Get datum from a Binary Large Object (BLOb).
  393.               byte BLObGet(blob BLObVar,int offset,int DataType=UWORD8)
  394.               int BLObGet(blob BLObVar,int offset,int DataType)
  395.               float BLObGet(blob BLObVar,int offset,int DataType)
  396.               byte[] BLObGet(blob BLObVar,int offset,int bufferLen)
  397.             BLObPut: Put datum into a Binary Large Object (BLOb).
  398.               int BLObPut(blob BLObVar[,int offset,]Var v,int DataType)
  399.               int BLObPut(blob BLObVar[,int offset,]byte[] buffer,
  400.                           int bufferLen)
  401.             BLObSize: Determine size of a Binary Large Object (BLOb).
  402.               int BLObSize(blob BLObVar[,int SetSize])
  403.             byte: Return numerical value as represented by a byte.
  404.               byte byte(var v)
  405.             DataDimension: Determine dimension of variable data.
  406.               int DataDimension(var)
  407.             DataType: Determine data type of a variable.
  408.               int DataType(var)
  409.             defined: Test if variable has been defined.
  410.               bool defined(var v)
  411.             Directory: Search directory listing for a file specification.
  412.               struct[] Directory([,string SearchSpec
  413.                    [,bool RecurseSubdirectories
  414.                    [,int IncludeAttrib
  415.                    [,int RequiredAttrib]]]])
  416.             float: Return numerical value as a floating-point number.
  417.               float float(var v)
  418.             FullPath: Convert partial path specification to full path name.
  419.               string FullPath(string PathSpec)
  420.             function: Call a function by name.
  421.               var function(string FunctionName[,...])
  422.             GetArraySpan: Determine size of an array.
  423.               int GetArraySpan(var[] array[,int MinIndex])
  424.             integer: Return numerical value as represented by an integer.
  425.               int integer(var v)
  426.             peek: Read data from memory location.
  427.               byte peek(int address)
  428.               byte peek(int address,int DataType=UWORD8)
  429.               int peek(int address,int DataType)
  430.               float peek(int address,int DataType)
  431.               byte[] peek(int address,int bufferLen)
  432.             pointer: Get address of variable array or variable datum.
  433.               int pointer(var)
  434.             poke: Write data to memory location.
  435.               int poke(int address,byte b)
  436.               int poke(int address,Var v,int DataType)
  437.               int poke(int address,byte[] buffer,int bufferLen)
  438.             ScreenClear: Clear screen.
  439.               void ScreenClear()
  440.             ScreenCursor: Get or set cursor position in the visible screen.
  441.               struct ScreenCursor([int col[,int row]])
  442.             ScreenSize: Get the height and width of the screen.
  443.               struct ScreenSize()
  444.             SetArraySpan: Set size of an array.
  445.               void SetArraySpan(var[] array[,int MinIndex],int MaxIndex)
  446.             spawn: Run an external executable. Mode can be P_WAIT, P_SWAP,
  447.               P_NOWAIT, or P_OVERLAY, depending on the operating system.
  448.               int spawn(int mode,string ExecutionCommandLine)
  449.               int spawn(int mode,string ExecutableSpec[,var arg1
  450.                         [,var arg2[,var arg3[,...]]]])
  451.               int spawn(int mode,string ExecutableSpec
  452.                         [,string[] ArgStrings])
  453.             SplitFileName: Determine file directory, name, and extension.
  454.               structure SplitFileName(string FileSpec)
  455.             Suspend: Suspend program execution for a while.
  456.               void Suspend(int milliSecondDelay)
  457.             undefine: Make a variable undefined.
  458.               void undefine(var v)
  459.  
  460. 4.3.  CEnvi DOS Library (also for Windows)
  461.  
  462.           The routines in this section are specific to the DOS (MS-DOS,
  463.           PC-DOS, DR-DOS) version of CEnvi.  They are included internally
  464.           to the CEnvi program, and so all of these routines are available
  465.           to any Cmm program executed by CEnvi under DOS (or Windows).
  466.  
  467.           Most of these routines allow the programmer to have more power
  468.           than is generally acknowledged as safe under Cmm's guidelines,
  469.           and so you'd better know what you're doing when you use these
  470.           commands, for they provide plenty of rope with which to hang
  471.           yourself.
  472.  
  473.           Windows is built atop DOS, and so the functions in this library
  474.           are also available in the Windows version of CEnvi.
  475.  
  476.             Address: Convert segment:offset pointer into memory address.
  477.               int Address(int segment,int offset)
  478.             asm: Execute imbedded assembled code.
  479.               int asm(byte[] buf[,int ax[,int bx[,int cx[,int dx]]]])
  480.             inport: Read byte from a hardware port.
  481.               byte inport(int portid)
  482.             inportw: Read word from a hardware port.
  483.               int inportw(int portid)
  484.             interrupt: Execute an 8086 interrupt.
  485.               bool interrupt(int Interrupt,RegIn[,RegOut])
  486.             offset: Break far pointer into segment:offset components.
  487.               int offset(byte[] buf)
  488.               int offset(int address)
  489.             outport: Write byte to a hardware port.
  490.               void outport(int portid,byte value)
  491.             outportw: Write word to a hardware port.
  492.               void outport(int portid,int value)
  493.             segment: Break far pointer into segment:offset components.
  494.               int segment(byte[] buf)
  495.               int segment(int address)
  496.  
  497. 4.4.  CEnvi OS/2 2.x Library
  498.  
  499.           The routines in this section are specific to the OS/2 version of
  500.           CEnvi.  They are included internally to the CEnvi program, and so
  501.           all of these routines are available to any Cmm program executed
  502.           by CEnvi under OS/2 2.x.
  503.  
  504.           Most of these routines allow the programmer to have more power
  505.           than is generally acknowledged as safe under Cmm's guidelines,
  506.           and so you'd better know what you're doing when you use these
  507.           commands, for they provide plenty of rope with which to hang
  508.           yourself.
  509.  
  510.             asm: Execute imbedded assembled code.
  511.               int asm(byte[] buf[,int eax[,int ebx[,int ecx[,int edx]]]])
  512.             DynamicLink: Call a function in a Dynamic Link Library (DLL).
  513.               int DynamicLink(string ModuleName,string ProcedureName,
  514.                               int BitSize,int CallingConvention,...)
  515.               int DynamicLink(string ModuleName,int Ordinal,
  516.                               int BitBize,int CallingConvention,...)
  517.               int DynamicLink(int CallGate,
  518.                               int BitSize,int CallingConvention,...)
  519.             ESet: Write new environment variables settings into a file.
  520.               bool ESet(string FileSpec)
  521.             Info(): Return following structure elements for this CEnvi
  522.               instance: Process, Session, WinHandle, SwitchHandle, hab
  523.             inport: Read byte from a hardware port.
  524.               byte inport(int portid)
  525.             inportw: Read word from a hardware port.
  526.               int inportw(int portid)
  527.             outport: Write byte to a hardware port.
  528.               void outport(int portid,byte value)
  529.             outportw: Write word to a hardware port.
  530.               void outport(int portid,int value)
  531.             PMDynamicLink(): Version of DynamicLink for functions that MUST
  532.               be made from a queued PM process; calls made transparently
  533.               through the CEnvi2PM.exe gateway program
  534.             PMInfo(): Version of Info() for the CEnvi2PM gateway process
  535.             PMpeek(): Version of Peek for memory accessible only to the the
  536.               PM gateway program
  537.             PMpoke(): Version of Poke for memory accessible only to the the
  538.               PM gateway program
  539.             ProcessList: Get list of all running processes.
  540.               struct[] ProcessList([bool IncludeThreadInfo])
  541.             somMethod: Call a SOM (system object model) method.
  542.               int somMethod(int somObject,int MethodOffset,...)
  543.  
  544. 4.5.  CEnvi Windows 3.x Library
  545.  
  546.           The routines in this section are specific to the Windows 3.x
  547.           version of CEnvi.  They are included internally to the CEnvi
  548.           program, and so all of these routines are available to any Cmm
  549.           program executed by CEnvi under Windows.
  550.  
  551.           Most of these routines allow the programmer to have more power
  552.           than is generally acknowledged as safe under Cmm's guidelines,
  553.           and so you'd better know what you're doing when you use these
  554.           commands, for they provide plenty of rope with which to hang
  555.           yourself.
  556.  
  557.           Windows is built atop DOS, and so the functions in the DOS
  558.           library are also available in the Windows version of CEnvi.
  559.  
  560.             BreakWindow: Destroy windows created with MakeWindow()
  561.               bool BreakWindow([int WindowHandle])
  562.             DoWindows: Process windows messages.
  563.               bool DoWindows([bool Peek = False])
  564.             DynamicLink: Call a function in a Dynamic Link Library (DLL).
  565.               int DynamicLink(string LibraryName,string ProcedureName,
  566.                               int ReturnType,int CallingConvention,...)
  567.               int DynamicLink(string LibraryName,int ProcedureOrdinal,
  568.                               int ReturnType,int CallingConvention,...)
  569.             Instance: Get CEnvi instance for this session.
  570.               int Instance()
  571.             MakeWindow: Define and create a window
  572.               int MakeWindow(int Parent,struct Class OR string Class,
  573.                              string WindowFunction,string Text,int Style,
  574.                              int Column,int Row,int Width,int Height,
  575.                              BLOb CreateParm[,var UtilityVar])
  576.             MultiTask: Turn Windows multitasking on or off.
  577.               void MultiTask(bool)
  578.             ScreenHandle: Get Windows' handle for the CEnvi text screen.
  579.               int ScreenHandle()
  580.             ScreenSize: Get or set the height and width of the screen.
  581.               struct ScreenSize()
  582.               struct ScreenSize(int col, int row[,int RowsRemembered])
  583.             WindowList: Retrieve list of window handles.
  584.               int[] WindowList([int WinHandle])
  585.