home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / pure_src / tos.src < prev   
Encoding:
Text File  |  1993-03-03  |  4.3 KB  |  148 lines

  1. screen (capsensitive("Fdup"))
  2. NAME
  3.     Fdup - duplicate a standard file handle
  4.  
  5. SYNOPSIS
  6.     #include <osbind.h>
  7.  
  8.     int Fdup(int handle);
  9.  
  10. DESCRIPTION
  11.     A duplicate file handle is returned for the standard handle
  12.     indicated by handle.
  13.  
  14.     Standard handles are:
  15.       0   keyboard (stdin)
  16.       1   screen (stdout)
  17.       2   serial port
  18.       3   parallel port
  19.       4   MIDI input        (MiNT)
  20.       5   MIDI output       (MiNT)
  21.  
  22. SEE ALSO
  23.     \#Fforce\#, \#Fcntl\#\end
  24.  
  25. screen (capsensitive("Fforce"))
  26. NAME
  27.     Fforce - redirect a standard channel
  28.  
  29. SYNOPSIS
  30.     #include <osbind.h>
  31.  
  32.     int Fforce(int stdhandle, int nonstdh);
  33.  
  34. DESCRIPTION
  35.     A standard channel with handle stdhandle is redirected to a
  36.     file with handle nonstdh.
  37.  
  38.     Standard handles are:
  39.       0   keyboard (stdin)
  40.       1   screen (stdout)
  41.       2   serial port
  42.       3   parallel port
  43.       4   MIDI input        (MiNT)
  44.       5   MIDI output       (MiNT)
  45.  
  46. RETURN VALUES
  47.     0 on success
  48.  
  49. SEE ALSO
  50.     \#Fdup\#, \#Fpipe\#, \#Fmidipipe\#\end
  51.  
  52. screen(capsensitive("Fseek"))
  53. NAME
  54.     Fseek - move read/write file pointer
  55.  
  56. SYNOPSIS
  57.     #include <osbind.h>
  58.  
  59.     long Fseek(long offset, int handle, int seekmode);
  60.  
  61. DESCRIPTION
  62.     The file-pointer of the file indicated by handle is set
  63.     according to the seekmode parameter:
  64.       0: the pointer is set to offset bytes
  65.       1: the pointer is set to its current location
  66.          plus offset
  67.       2: the pointer is set to the size of the file
  68.          plus offset
  69.  
  70. RETURN VALUES
  71.     The new position of the file pointer is returned.\end
  72.  
  73. screen(capsensitive("Pexec"))
  74. NAME
  75.     Pexec - load and execute a program
  76.  
  77. SYNOPSIS
  78.     #include <osbind.h>
  79.  
  80.     long Pexec(int mode, char *name, void *cmdline, void *envptr);
  81.  
  82. DESCRIPTION
  83.     Pexec loads and/or runs a program, depending on the mode given.
  84.     Under MiNT, extra modes have been added that run the program
  85.     asynchronically, i.e. do not wait for it to finish.
  86.     The modes unique to MiNT have codes 100 or above.
  87.  
  88.     The following modes are available:
  89.         0:  Load and run program.
  90.         3:  Just load program. Returns pointer to basepage.
  91.         4:  Start a program that has been set up before.
  92.             cmdline contains a pointer to the basepage,
  93.             envptr is not used. Parent and child share memory.
  94.         5:  Build new basepage. Returns pointer to basepage
  95.         6:  Start a program that has been set up before.
  96.             cmdline contains a pointer to the basepage,
  97.             envptr is not used. Parent and child don't
  98.             share memory.
  99.       100:  Load and run program async. Returns child's pid.
  100.       104:  Start a program, async. Parent and child share
  101.             memory. Parameter name gives name of the child
  102.             program.
  103.       106:  Start a program, async. Memory is not shared.
  104.             Parameter name gives name of the child program.
  105.       200:  Load and run program. Old program is replaced.
  106.  
  107. SEE ALSO
  108.     structure BASEPAGE in <basepage.h>
  109.     \#Pterm\#, \#Pterm0\#, \#Ptermres\#, \#Pfork\#, \#Pvfork\#, \#Pwait3\#\end
  110.  
  111. screen( capsensitive("Pterm"),
  112.         capsensitive("Pterm0"),
  113.         capsensitive("Ptermres"))
  114. NAME
  115.     Pterm, Pterm0, Ptermres - terminate current process
  116.  
  117. SYNOPSIS
  118.     #include <osbind.h>
  119.  
  120.     void Pterm(int retcode);
  121.  
  122.     void Pterm0(void);
  123.  
  124.     void Ptermres(long keepcnt, int retcode);
  125.  
  126. DESCRIPTION
  127.     Pterm, Ptermres and Pterm0 terminate the current process.
  128.     All open files will be closed, all structures owned by the
  129.     process will be released and freed. Pterm and Pterm0 return
  130.     all Malloc-ed memory to the Operating System. Ptermres keeps
  131.     keepcnt bytes, counted from the start of the basepage,
  132.     resident; this can be used for TSR programs.
  133.  
  134.     Either retcode (Pterm, Ptermres) or zero (Pterm0) will be
  135.     returned to the calling process. By convention, a zero return
  136.     code means success, a non-zero return code means failure.
  137.  
  138.     If set, the interrupt vector for terminating processes
  139.     (etv_term, located at $0408) will be called by Pterm and
  140.     Pterm0 before the process cleanup code is run. This can be
  141.     used to restore changed vectors and so on.
  142.  
  143. SEE ALSO
  144.     \#Pexec\#
  145.  
  146. NOTE
  147.     Ptermres does not jump through etv_term.\end
  148.