PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
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
                                    -♦-