home *** CD-ROM | disk | FTP | other *** search
- screen (capsensitive("Fdup"))
- NAME
- Fdup - duplicate a standard file handle
-
- SYNOPSIS
- #include <osbind.h>
-
- int Fdup(int handle);
-
- DESCRIPTION
- A duplicate file handle is returned for the standard handle
- indicated by handle.
-
- Standard handles are:
- 0 keyboard (stdin)
- 1 screen (stdout)
- 2 serial port
- 3 parallel port
- 4 MIDI input (MiNT)
- 5 MIDI output (MiNT)
-
- SEE ALSO
- \#Fforce\#, \#Fcntl\#\end
-
- screen (capsensitive("Fforce"))
- NAME
- Fforce - redirect a standard channel
-
- SYNOPSIS
- #include <osbind.h>
-
- int Fforce(int stdhandle, int nonstdh);
-
- DESCRIPTION
- A standard channel with handle stdhandle is redirected to a
- file with handle nonstdh.
-
- Standard handles are:
- 0 keyboard (stdin)
- 1 screen (stdout)
- 2 serial port
- 3 parallel port
- 4 MIDI input (MiNT)
- 5 MIDI output (MiNT)
-
- RETURN VALUES
- 0 on success
-
- SEE ALSO
- \#Fdup\#, \#Fpipe\#, \#Fmidipipe\#\end
-
- screen(capsensitive("Fseek"))
- NAME
- Fseek - move read/write file pointer
-
- SYNOPSIS
- #include <osbind.h>
-
- long Fseek(long offset, int handle, int seekmode);
-
- DESCRIPTION
- The file-pointer of the file indicated by handle is set
- according to the seekmode parameter:
- 0: the pointer is set to offset bytes
- 1: the pointer is set to its current location
- plus offset
- 2: the pointer is set to the size of the file
- plus offset
-
- RETURN VALUES
- The new position of the file pointer is returned.\end
-
- screen(capsensitive("Pexec"))
- NAME
- Pexec - load and execute a program
-
- SYNOPSIS
- #include <osbind.h>
-
- long Pexec(int mode, char *name, void *cmdline, void *envptr);
-
- DESCRIPTION
- Pexec loads and/or runs a program, depending on the mode given.
- Under MiNT, extra modes have been added that run the program
- asynchronically, i.e. do not wait for it to finish.
- The modes unique to MiNT have codes 100 or above.
-
- The following modes are available:
- 0: Load and run program.
- 3: Just load program. Returns pointer to basepage.
- 4: Start a program that has been set up before.
- cmdline contains a pointer to the basepage,
- envptr is not used. Parent and child share memory.
- 5: Build new basepage. Returns pointer to basepage
- 6: Start a program that has been set up before.
- cmdline contains a pointer to the basepage,
- envptr is not used. Parent and child don't
- share memory.
- 100: Load and run program async. Returns child's pid.
- 104: Start a program, async. Parent and child share
- memory. Parameter name gives name of the child
- program.
- 106: Start a program, async. Memory is not shared.
- Parameter name gives name of the child program.
- 200: Load and run program. Old program is replaced.
-
- SEE ALSO
- structure BASEPAGE in <basepage.h>
- \#Pterm\#, \#Pterm0\#, \#Ptermres\#, \#Pfork\#, \#Pvfork\#, \#Pwait3\#\end
-
- screen( capsensitive("Pterm"),
- capsensitive("Pterm0"),
- capsensitive("Ptermres"))
- NAME
- Pterm, Pterm0, Ptermres - terminate current process
-
- SYNOPSIS
- #include <osbind.h>
-
- void Pterm(int retcode);
-
- void Pterm0(void);
-
- void Ptermres(long keepcnt, int retcode);
-
- DESCRIPTION
- Pterm, Ptermres and Pterm0 terminate the current process.
- All open files will be closed, all structures owned by the
- process will be released and freed. Pterm and Pterm0 return
- all Malloc-ed memory to the Operating System. Ptermres keeps
- keepcnt bytes, counted from the start of the basepage,
- resident; this can be used for TSR programs.
-
- Either retcode (Pterm, Ptermres) or zero (Pterm0) will be
- returned to the calling process. By convention, a zero return
- code means success, a non-zero return code means failure.
-
- If set, the interrupt vector for terminating processes
- (etv_term, located at $0408) will be called by Pterm and
- Pterm0 before the process cleanup code is run. This can be
- used to restore changed vectors and so on.
-
- SEE ALSO
- \#Pexec\#
-
- NOTE
- Ptermres does not jump through etv_term.\end
-