home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l291 / 6.ddi / EXEC.FI$ / EXEC.bin
Encoding:
Text File  |  1990-12-04  |  1.9 KB  |  56 lines

  1. $LIST
  2. C       EXEC.FI - Interface file for C system and spawnlp routines
  3.  
  4. C       These functions are discussed in Chapter 3 of the Advanced Topics
  5. C       manual. The program DEMOEXEC.FOR illustrates how to use the include
  6. C       file and the functions.
  7.  
  8.  
  9. C       Function:       SYSTEM
  10. C
  11. C       Purpose:        Starts a child copy of the DOS system shell
  12. C                       program--COMMAND.COM
  13. C
  14. C       Argument:       string - A string (in C format) consisting
  15. C                       of a DOS command, program, or batch file name
  16. C                       followed optionally by arguments
  17. C
  18. C       Return:         INTEGER*2 - 0 for success, or -1 for fail
  19. C
  20. C       Example:        dummy2 = SYSTEM( 'dir *.for'C )
  21.  
  22.         INTERFACE TO FUNCTION SYSTEM[C] (STRING)
  23.         INTEGER*2 SYSTEM
  24.         CHARACTER*1 STRING[REFERENCE]
  25.         END
  26.  
  27.  
  28. C       Function:       SPAWNLP
  29. C
  30. C       Purpose:        Starts a child copy of a specified program
  31. C
  32. C       Arguments:      mode - Must be 0
  33. C
  34. C                       path - Address of a string (in C format) containing
  35. C                       path name of program to be executed (may be partial
  36. C                       if the program is in PATH or current directory)
  37. C
  38. C                       arg0 - Must be same as path
  39. C
  40. C                       arg1,...,argn - Addresses of command-line argument
  41. C                       strings (in C format) to be passed to the program.
  42. C                       Last argument must be INT4(0)
  43. C
  44. C       Return:         INTEGER*2 - return code of process or -1 for fail
  45. C
  46. C       Example:        dummy2 = SPAWNLP( 0,
  47. C                      +                  LOC( 'format'C ),
  48. C                      +                  LOC( 'format''C ),
  49. C                      +                  LOC( 'a:'C ),
  50. C                      +                  INT4( 0 ) )
  51. C
  52. C
  53.         INTERFACE TO FUNCTION SPAWNLP [C,VARYING] (MODE)
  54.         INTEGER*2 MODE,SPAWNLP
  55.         END
  56.