PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Calling C Library Functions
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
     You can write many extensions by using only PWB callback functions,
     but sometimes you may need C functions to work on strings or
     arrays. Note that PWB defines some string functions.
 
     The following categories of C functions can be used within
     extensions:
 
       ■  String manipulation, except strdup (STRING.H)
       ■  Buffer manipulation (MEMORY.H)
       ■  Character classification and conversion (CTYPE.H)
       ■  Data conversion, except strtod (STDLIB.H)
 
     Most other functions in the C library are incompatible with
     extensions. Specifically, the following categories of functions
     cannot be called in extensions:
 
       ■  Functions that depend on C startup code support, including
          most I/O routines (use PWB file and text callback functions
          instead).
 
       ■  Dynamic memory-allocation functions (malloc, for example) and
          functions that call them. Use the PWB Falloc and Fdalloc
          callback functions instead.
 
       ■  Process control functions from the exec and spawn families.
          Use the PWB DoSpawn callback function.
 
     If you are not sure whether a function is compatible with PWB
     extensions, you can always try using the function. You will get
     linker errors if the library function is not compatible.
     See: Building Extension Modules
                                    -♦-