Content-type: text/html Manpage of utilib

utilib

Section: C Library Functions (3)
Updated: 7 February 2000
Index Return to Main Contents
 

NAME

fmax, fmin, sqr, iswap, fswap, strp_commnts, actoi, ieven, iodd, iabs, isign, imax, imin, fsign, round, upause, get_fs_mountinfo, find_free_ftab_index, get_ftab_index, set_ftab_id, get_ftab_index_by_id, get_ftab_index_by_name, clear_ftab_slot, remote_fifo_write, remote_fifo_read, alive, creator, not_creator, protect, unprotect, dead, closeall, ch_index, strinp, xfdopen, xopen, xclose, xfclose, pups_show_open_fdescriptors, chsign, seterror, error, strncmps, strrext, strrextr, strext, m_strext, strexccpy, ch_pos, rch_pos, mdc_strext, mdc_strext2, strinp, strin, strintok, stright, strepch, strep, streptok, strtrnc, strfrm, strail, strlead, strchcnt, strpch, mchrep, strccpy, ch_index, rch_index, locate, i_dec, fp_dec, str_dec, ch_dec, argfile, argtline, copytail, std_init, help, t_arg_errs, pups_set_alloc_opt, xmalloc, xrealloc, xcalloc, xfree, xread, pipe_write, execls, lock, unlock, pipestream_obituary_enable, pipestream_obituary_disable, xfork, clear_chtab_slot, show_children, set_child_name, pups_auto_child, pups_noauto_child, pupswait, pupswaitpid, xaalloc, xafree, sort2, check_redirection, set_state, get_state, show_state, deregister_pups_exit_f, show_pups_exit_f, get_directory_entries, sread, swrite, search_path, set_pen, pipe_read, pupsrelse, pupsigrelse, sighandle, sigtabsave, sigtabrestore, signalpause, signalpending, show_sigstatus, signametosigno, signotosigname, show_siglstatus, sigvector, monitor, strdate, setvitimer, clearvitimer, vitrestart, show_pups_vi_timers, get_fd_lock, release_fd_lock, get_lock, release_lock, attach_homeostat, detach_homeostat, set_fs_hsm_parameters, xsleep, pupsualarm, fname2fdes, fname2fstream, fname2index, fdes2index, xcreat, xfchmod, xstrlen, tmalloc, tcalloc, trealloc, taalloc, tafree, tnametoptr, tpartnametoptr, ttypetoptr, tfree, tshowobject, tshowobjects, xfgets, strcomment, strclr, pups_set_errno, pups_get_errno, tty_echoing_off, tty_echoing_on, pups_yield, lexec, pups_check_pass_set, pups_getpass, pups_statkill, xlockf  

SYNOPSIS

double fmax
(
       double arg_1,

       double arg_2

);

double fmin
(
       double arg_1,

       double arg_2

);

double sqr(double arg);

void iswap
(
       int *arg_1,

       int *arg_2

);

void fswap
(
       double *arg_1,

       double *arg_2

);

FILE *strp_commnts
(
       char token,

       FILE *c_file,

       char *tmp_f_name

);

int actoi(char ch);

int ieven(int arg);

int iodd(int arg);

int iabs(int arg);

int isign(int arg);

int imax
(
       int a,

       int b

);

int imin
(
       int a,

       int b

);

double fsign(double arg);

int round(double x);

int upause(char *prompt);

int get_fs_mountinfo
(
       char *f_name,

       char *mount_host

);

int find_free_ftab_index(void);

int get_ftab_index(int fdes);

int set_ftab_id
(
       int fdes,

       int id

);

int get_ftab_index_by_id(int id);

int get_ftab_index_by_name(char *name);

int clear_ftab_slot(int index);

int remote_fifo_write
(
       FILE *stream,

       int fdes,

       int max_trys,

       int homeostatic

);

int remote_fifo_read
(
       FILE *stream,

       int fdes,

       int max_trys,

       int homeostatic

);

int alive
(
       FILE *stream,

       int fdes,

       char *handler_name,

       void *handler

);

int creator
(
       FILE *stream,

       int fdes

);

int not_creator
(
       FILE *stream,

       int fdes

);

int protect
(
       FILE *stream,

       char *name,

       char *handler_name,

       void *handler

);

int unprotect(int ddes);

int dead
(
       FILE *stream,

       int fdes

);

void closeall(FILE *stream);

int ch_index
(
       char *,

       char

);

int strinp
(
       long *,

       char *,

       char *

);

FILE *xfdopen
(
       int fdes,

       char *mode

);

int xopen
(
       char *f_name,

       int mode,

       int h_state

);

int xclose(int fdes);

FILE *xfclose(FILE *stream);

void pups_show_open_fdescriptors(FILE *stream);

int chsign(char ch_arg);

void seterror
(
       FILE *stream,

       int action,

       int code

);

int error(char *error_string);

int strncmps
(
       char *s1,

       char *s2

);

int strrext
(
       char *s1,

       char *s2,

       char dm_char

);

int strrextr
(
       char *s1,

       char *s2,

       char dm_char

);

int strext
(
       char dm_ch,

       char *s1,

       char *s2

);

int m_strext
(
       int i_key,

       char dm_ch,

       char *s1,

       char *s2

);

void strexccpy
(
       char *s1,

       char *s2,

       char ex_ch

);

int ch_pos
(
       char *s,

       char ch

);

int rch_pos
(
       char *s,

       char ch

);

int mdc_strext
(
       char *dm_ch,

       int *dm_bit,

       char *s1,

       char *s2

);

int mdc_strext2
(
       char *dm_ch,

       int *dm_bit_l,

       int *dm_bit_r,

       int *pos,

       char *s1,

       char *s2

);

int strinp
(
       long *index,

       char *s1,

       char *s2

);

int strin
(
       char *s1,

       char *s2

);

int strintok
(
       char *s1,

       char *s2,

       char *dm_chars

);

int stright
(
       char *s1,

       char *s2,

       char *s3

);

int strepch
(
       char *s1,

       char *s2,

       char rep_ch

);

int strep
(
       char *s1,

       char *s2,

       char *s3,

       char *s4

);

int streptok
(
       char *s1,

       char *s2,

       char *s3,

       char *s4,

       char *dm_chars

);

int strtrnc
(
       char *s,

       char trunc_c,

       int c_cnt

);

char *strfrm
(
       char *s,

       char start_c,

       int c_cnt

);

int strail
(
       char *s,

       char c

);

char *strlead
(
       char *s,

       char c

);

int strchcnt
(
       char c,

       char *s

);

char *strpch
(
       char token,

       char *str

);

void mchrep
(
       char rep_ch,

       char *ch_to_rep,

       char *s1

);

char *strccpy
(
       char *s_1,

       char *s_2

);

int ch_index
(
       char *str,

       char s

);

int rch_index
(
       char *str,

       char s

);

int locate
(
       int *init,

       char *swtch,

       int *cnt,

       char *args[]

);

int i_dec
(
       int *ptr,

       int *argc,

       char *argv[]

);

double fp_dec
(
       int *ptr,

       int *argc,

       char *argv[]

);

char *str_dec
(
       int *ptr,

       int *argc,

       char *argv[]

);

char ch_dec
(
       int *ptr,

       int *argc,

       char *argv[]

);

void argfile
(
       int ptr,

       int *argc,

       char *argv[],

       int argd[]

);

void argtline(char *cmd_tail);

void copytail
(
       int *argc,

       char *args[],

       char *argv[]

);

void std_init
(
       int open_source,

       int *argc,

       char *v_name,

       char *au_name,

       char *app_name,

       char *d_made,

       char *argv[]

);

void help(char *help_f_name);

void t_arg_errs
(
       int argc,

       int argd[],

       char *args[]

);

void pups_set_alloc_opt(int alloc_opt);

void *xmalloc(psize_t size);

void *xrealloc
(
       void *ptr,

       psize_t size

);

void *xcalloc
(
       pindex_t nel,

       psize_t size

);

void *xfree(void *ptr);

int xread
(
       des_t f_id,

       void *buf,

       psize_t n_bytes

);

int pipe_write
(
       des_t f_id,

       void *buf,

       psize_t n_bytes

);

int execls(char *command);

int lock
(
       int max_trys,

       int delay,

       char *file_name,

       char *lock_name

);

int unlock(char *lock_name);

int pipestream_obituary_enable(int fdes);

int pipestream_obituary_disable(int fdes);

int xfork
(
       int fork_wait,

       int obituary

);

int clear_chtab_slot(int index);

void show_children(FILE *stream);

int set_child_name
(
       int pid,

       char *name

);

void pups_auto_child(void);

void pups_noauto_child(void);

int pupswait
(
       int wait_verbose,

       int *status

);

int pupswaitpid
(
       int waitpid_verbose,

       int wait_pid,

       int *status

);

void **xaalloc
(
       pindex_t rows,

       pindex_t cols,

       psize_t size

);

void **xafree
(
       pindex_t rows,

       void **array

);

void sort2
(
       int n,

       double ra[],

       double rb[]

);

void check_redirection(des_t des);

void set_state(char *state);

void get_state(char *state);

void show_state(void);

int deregister_pups_exit_f
(
       FILE *stream,

       void *func

);

void show_pups_exit_f(FILE *stream);

char **get_directory_entries
(
       char *dir_name,

       char *key,

       int *key_entries,

       int *max_entries

);

long sread
(
       int fildes,

       char *data,

       long size

);

long swrite
(
       int fildes,

       char *data,

       long size

);

char *search_path
(
       char *pathtype,

       char *item

);

void set_pen
(
       char *argv[],

       char *command_name,

       char *pen_name

);

long pipe_read
(
       int fd,

       void *buf,

       long count

);

void pupsrelse(int sigs_to_relse);

int pupsigrelse(int signum);

int sighandle
(
       int signum,

       char *handler_name,

       void *handler,

       sigset_t *handler_mask

);

void sigtabsave
(
       int signum,

       sigtab_type *sigtab_entry

);

void sigtabrestore
(
       int signum,

       sigtab_type sigtab_entry

);

int signalpause(int signum);

int signalpending(int signum);

void show_sigstatus(FILE *stream);

int signametosigno(char *name);

char *signotosigname
(
       int signum,

       char *name

);

int show_siglstatus
(
       int signum,

       FILE *stream

);

void sigvector
(
       int signum,

       sigjmp_buf *vector

);

int monitor
(
       int fdes,

       int secs,

       int usecs

);

void strdate(char *date);

int setvitimer
(
       FILE *stream,

       char *tname,

       int priority,

       int mode,

       time_t interval,

       char *handler_args,

       void *handler

);

int clearvitimer
(
       FILE *stream,

       char *tname

);

int vitrestart(void);

void show_pups_vi_timers(FILE *stream);

int get_fd_lock
(
       int fdes,

       int mode

);

int release_fd_lock(int fd);

int get_lock
(
       char *name,

       int mode

);

int release_lock(char *name);

int attach_homeostat
(
       int fd,

       void *homeostat

);

int detach_homeostat(int fd);

int set_fs_hsm_parameters
(
       int fd,

       int fs_blocks,

       char *fs_name

);

int xsleep(int secs);

int pupsualarm(long usecs);

int fname2fdes(char *fname);

FILE *fname2fstream(char *fname);

int fname2index(char *fname);

int fdes2index(int fdes);

int xcreat
(
       char *name,

       int mode

);

int xfchmod
(
       int des,

       int mode

);

int xstrlen(char *s);

void *tmalloc
(
       unsigned long size,

       char *object_name,

       char *object_type

);

void *tcalloc
(
       int n_el,

       unsigned long size,

       char *object_name,

       char *object_type

);

void *trealloc
(
       void *ptr,

       unsigned long size,

       char *object_name,

       char *object_type

);

void **taalloc
(
       pindex_t rows,

       pindex_t cols,

       psize_t size,

       char *name,

       char *type_name

);

void **tafree
(
       pindex_t rows,

       void **array

);

void *tnametoptr(char *name);

void *tpartnametoptr(char *pname);

void *ttypetoptr(char *type);

void *tfree(void *ptr);

int tshowobject
(
       FILE *stream,

       void *ptr

);

int tshowobjects
(
       FILE *stream,

       int display_objects

);

char *xfgets
(
       char *s,

       long size,

       FILE *stream

);

int strcomment(char *s);

void strclr(char *s);

void pups_set_errno(int pups_errno);

int pups_get_errno(void);

int tty_echoing_off
(
       FILE *in,

       struct termios *s

);

void tty_echoing_on
(
       FILE *in,

       int tty_changed,

       struct termios s

);

void pups_yield(int delay);

int lexec
(
       char *shell,

       char *command,

       int wait

);

int pups_check_pass_set(void);

int pups_getpass(char *password_banner);

int pups_statkill
(
       int pid,

       int signum

);

int xlockf
(
       int fdes,

       int cmd,

       unsigned long size

);
 

PARAMETERS

double arg_1
Not Documented.
double arg_2
Not Documented.
double arg
Not Documented.
int *arg_1
Not Documented.
int *arg_2
Not Documented.
double *arg_1
Not Documented.
double *arg_2
Not Documented.
char token
Not Documented.
FILE *c_file
Not Documented.
char *tmp_f_name
Not Documented.
char ch
Not Documented.
int arg
Not Documented.
int a
Not Documented.
int b
Not Documented.
double x
Not Documented.
char *prompt
Not Documented.
char *f_name
Not Documented.
char *mount_host
Not Documented.
int fdes
Not Documented.
int id
Not Documented.
char *name
Not Documented.
int index
Not Documented.
int max_trys
Not Documented.
int homeostatic
Not Documented.
char *handler_name
Not Documented.
int ddes
Not Documented.
char *
Not Documented.
char
Not Documented.
long *
Not Documented.
char *mode
Not Documented.
int h_state
Not Documented.
char ch_arg
Not Documented.
int action
Not Documented.
int code
Not Documented.
char *error_string
Not Documented.
char dm_char
Not Documented.
char dm_ch
Demarcation character.
char *s1     (strext)
Extracted sub string.
char *s2
Argument string.
int i_key
Instance key for operation.
char *s1     (m_strext)
Extracted sub strin g.
char ex_ch
Not Documented.
char *s
Not Documented.
char *dm_ch
Demarcation characters string.
int *dm_bit
Bit codes for matched dm chars.
int *dm_bit_l
Bit codes for left matched dm chars.
int *dm_bit_r
Bit codes for right matched dm chars.
int *pos
Current position in argument string.
long *index
Not Documented.
char *dm_chars
Not Documented.
char *s3
Not Documented.
char rep_ch
Not Documented.
char *s4
Not Documented.
char trunc_c
Not Documented.
int c_cnt
Not Documented.
char start_c
Not Documented.
char c
Not Documented.
char *str
Not Documented.
char *ch_to_rep
Not Documented.
char *s_1
Not Documented.
char *s_2
Not Documented.
char s
Not Documented.
int *init
Not Documented.
char *swtch
Not Documented.
int *cnt
Not Documented.
char *args[]
Not Documented.
int *ptr
Not Documented.
int ptr
Not Documented.
int argd[]
Not Documented.
char *cmd_tail
Not Documented.
int open_source
TRUE if GPL copyrighted open source.
int *argc
Argument count.
char *v_name
Version of filter.
char *au_name
Author name.
char *app_name
Application name.
char *d_made
Revision date.
char *argv[]
Secondry argument vector.
char *help_f_name
Not Documented.
int argc
Not Documented.
int alloc_opt
Not Documented.
psize_t size
Not Documented.
void *ptr
Not Documented.
pindex_t nel
Not Documented.
des_t f_id
Not Documented.
void *buf
Not Documented.
psize_t n_bytes
Not Documented.
int delay
Not Documented.
char *file_name
Not Documented.
char *lock_name
Not Documented.
int fork_wait
Not Documented.
int obituary
Not Documented.
int pid
Not Documented.
int wait_verbose
Not Documented.
int *status
Not Documented.
int waitpid_verbose
Not Documented.
int wait_pid
Not Documented.
pindex_t rows
Not Documented.
pindex_t cols
Not Documented.
void **array
Not Documented.
int n
Not Documented.
double ra[]
Not Documented.
double rb[]
Not Documented.
des_t des
Not Documented.
char *state
Not Documented.
void *func
Not Documented.
char *dir_name
Not Documented.
char *key
Not Documented.
int *key_entries
Not Documented.
int *max_entries
Not Documented.
int fildes
Not Documented.
char *data
Not Documented.
long size
Not Documented.
char *pathtype
Not Documented.
char *item
Not Documented.
char *command_name
Not Documented.
char *pen_name
Not Documented.
int fd
Not Documented.
long count
Not Documented.
int sigs_to_relse
Not Documented.
int signum
Not Documented.
sigset_t *handler_mask
Not Documented.
sigtab_type *sigtab_entry
Not Documented.
sigtab_type sigtab_entry
Not Documented.
sigjmp_buf *vector
Not Documented.
int secs
Not Documented.
int usecs
Not Documented.
char *date
Not Documented.
FILE *stream
Logging stream.
char *tname
Timer payload name.
int priority
Priority of handler.
int mode
Mode of timer.
time_t interval
Timeout interval (seconds).
char *handler_args
Handler arguments.
void *handler
Handler called on timeout.
void *homeostat
Not Documented.
int fs_blocks
Not Documented.
char *fs_name
Not Documented.
long usecs
Not Documented.
char *fname
Not Documented.
int des
Not Documented.
unsigned long size
Not Documented.
char *object_name
Not Documented.
char *object_type
Not Documented.
int n_el
Not Documented.
char *type_name
Not Documented.
char *pname
Not Documented.
char *type
Not Documented.
int display_objects
Not Documented.
int pups_errno
Not Documented.
FILE *in
Not Documented.
struct termios *s
Not Documented.
int tty_changed
Not Documented.
struct termios s
Not Documented.
char *shell
Shell to execute comamnd.
char *command
Command to be executed.
int wait
Wait action flag.
char *password_banner
Not Documented.
int cmd
Not Documented.
 

DESCRIPTION

 

fmax

Find the minimum of a pair of floating point values ...  

fmin

Find the maximum of a pair of floating point values ...  

sqr

Find the square of a floating point argument ...  

iswap

Swap a pair of integer arguments ...  

fswap

Swap a pair of floating point arguments ...  

strp_commnts

Procedure to strip comments of the form {token} comment {token} from an ASCII text file ...  

actoi

Convert ASCII character to integer ...  

ieven

Procedure to test whether an integer is even ...  

iodd

Routine to test whether an integer is odd ...  

iabs

Routine to find the absolute value of an integer ...  

isign

Return the sign of integer argument ...  

imax

Find the maximum of a pair of integers ...  

imin

Find the maximum of a pair of integers ...  

fsign

Return the sign of floating point argument ...  

round

Procedure to round floating point value to the nearest integer ...  

upause

Routine to pause program while under development ...  

get_fs_mountinfo

MAO Test to see if file is on a mounted filesystem. If it is, return details of the host exporting the filesystem ...  

find_free_ftab_index

Find next free file table index (returns (-1) if file table full) ...  

get_ftab_index

Get the file table entry which corresponds to descriptor (returns (-1) if there is no entry) ...  

set_ftab_id

Set file table entry identification tag ...  

get_ftab_index_by_id

Get file table entry (by identification tag) ...  

get_ftab_index_by_name

Get file table entry (by filename) ...  

clear_ftab_slot

MAO Clear file table slot ...  

remote_fifo_write

MAO Prepare a remote FIFO for an explicit write operation ...  

remote_fifo_read

MAO Prepare a remote FIFO for an explicit read operation ...  

alive

Make a file descriptor living ...  

creator

Make the current application the creator of the object associated with file descriptor (which means it will have the responsibility of destroying it in a multiprocess environment) ...  

not_creator

Relieve this application of the onerous burden of being the creator of the object referenced by fdes ...  

protect

Protect an unopen file ...  

unprotect

Unprotect a file (which is currently homeostatically protected by the calling application) ...  

dead

Make a living descriptor inanimate (and remove hoemeostatic protection of underlying inode-object) ...  

closeall

Check the file table closing all open files and releasing their resources ...  

ch_index

Forward declaration of ch_index() function.  

strinp

Forward declaration of the strinp() function.  

xfdopen

Extended fdopen command -- adds stream information to PUPS filetable if the passed descriptor is associated with PUPS filetable ...  

xopen

Check for the existence of a file - if it exists, open it, otherwise print error code and abort ...  

xclose

Close (extended mode) file descriptor ...  

xfclose

Close (extended mode) stream) ...  

pups_show_open_fdescriptors

Display file descriptors which are open on this application ...  

chsign

Decode the sign character, '-' ...  

seterror

Set PUPS error handler parameters (not threadsafe).  

error

PUPS error handler (not threadsafe).  

strncmps

Routine to find any occurence of string s2 in sting s1, the length of s1 must be greater then s2 ...  

strrext

Routine to strip an extension from a string ...  

strrextr

Routine to reverse strip an extension from a string ...  

strext

Routine to extract substrings which are demarkated by a usr defined character ...  

m_strext

Routine to extract substrings which are demarkated by a usr defined character for multiple comparison operations ...  

strexccpy

Routine to copy a string filtering out characters which have been marked as excluded ...  

ch_pos

Routine to return the position of a character within a string - if the character is not in the string (-1) is returned ...  

rch_pos

Routine to return the reverse position of a character within a string - if the character is not in the string (-1) is returned ...  

mdc_strext

Routine to extract substrings which are demarkated by user defined characters ...  

mdc_strext2

Routine to extract substrings which are demarkated by user defined characters ...  

strinp

Look for the occurence of string s2 within string s1 ...  

strin

Look for the occurence of string s2 within string s1 ...  

strintok

Look for token demarcated occurence of string s2 within string s1 ...  

stright

Look for the occurence of string s2 within string s1 ...  

strepch

Replace sub-string with constant characters ...  

strep

Replace all token demarcated occurences of string s2 within string s1 with string s3 if s2 is appropriately tokenised ...  

streptok

Replace all token demarcated occurences of string s2 within string s1 with string s3 if s2 is appropriately tokenised ...  

strtrnc

Truncate string at demarcation character ...  

strfrm

Start string from demarcation character ...  

strail

Strip trailing characters from string ...  

strlead

Strip leading characters from string ...  

strchcnt

Count number of occurence of character in string ...  

strpch

Strip character from string ...  

mchrep

Replace multiple chracters in string with given character ...  

strccpy

Copy string checking for NULL or invalid argument string ...  

ch_index

Routine to return the position of the first occurence of nominated character within string ...  

rch_index

Routine to return the position of the last occurence of nominated character within string ...  

locate

Locate a given switch in the command tail ...  

i_dec

Function to decode an integer from a command tail argument ...  

fp_dec

Function to decode a real from a command tail argument ...  

str_dec

Function to decode a string from the command tail ...  

ch_dec

Function to decode character from command tail ...  

argfile

Decode command argument tail file ...  

argtline

Generate effective command line from secondary argument vector ...  

copytail

Copy command tail from system argument vector to process vector ...  

std_init

Routine to search for standard arguments in the command tail ...  

help

In context help system ...  

t_arg_errs

Display any remaining portions of the command line which could not be parsed ...  

pups_set_alloc_opt

Set array allocation options ...  

xmalloc

Routine to malloc memory checking for error. If not memory could be allocated print error message and exit ...  

xrealloc

Routine to realloc memory checking for error. If reallocation fails, print error message and exit ...  

xcalloc

Routine to calloc memory, checking for error. If reallocation fails, print error message and exit ...  

xfree

Routine to free a pointer, first checking if it is already free ...  

xread

Routine to read n bytes from stream, checking that N bytes are in fact actually read ...  

pipe_write

Routine to write n bytes from stream, checking that N bytes are in fact actually written ...  

execls

Execls - routine to overlay and execute a command string ...  

lock

Routine to set a discretionary lock. This routine assumes that the process of making a link to a file is atomic. This means that only one process can make a link to a file at any time ...

This routine blocks the caller until lock is acquired. If the lock cannot be acquired after a reasonable number of attempts the calling process is exited ...  

unlock

Routine to release discretionary lock ...  

pipestream_obituary_enable

Enable obituary for pipestream (child) process ...  

pipestream_obituary_disable

Disable obituary for pipestream (child) process ...  

xfork

Extended fork routine which remembers forked children ...  

clear_chtab_slot

Clear a child table slot ...  

show_children

Show child table ...  

set_child_name

Set child process name ...  

pups_auto_child

Install handler for PUPS automatic child management ...  

pups_noauto_child

Remove handler for PUPS automatic child managment ...  

pupswait

Wait function compatable with PUPS child managment ...  

pupswaitpid

Waitpid function compatable with PUPS child managment ...  

xaalloc

Routine to allocate a dynamic array - this is based on T.K.W Chau's allocation scheme ...  

xafree

Routine to free memory occupied by a dynamically allocated array ...  

sort2

Routine to sort an array of floating point values using the heapsort algorithm - this routine is derived from one given in Press et al, Numerical Recipes in C ...  

check_redirection

Routine to check if a terminal device is connect to the specified file ...  

set_state

Routine to record the state of a long running process - the process is then interogated using the SIGUSR singal ...  

get_state

Routine to save the present state - typically this is reloaded into the state vectore when the present routine returns to its caller ...  

show_state

Routine to display the state of the current process - this is normally called in response to a SIGUSR signal. In addition the originator of the signal must specify an I/O terminal for this transaction in /tmp/<pid>.info.tmp ...  

deregister_pups_exit_f

Register a PUPS exit function (and its argument string) ...  

show_pups_exit_f

Show PUPS exit functions ...  

get_directory_entries

Build a table of entries in the current driectory ...  

sread

Extended read is automatically restarted after interrupted system call ...  

swrite

Extended read is automatically restarted after interrupted system call ...  

search_path

Search path directories for a given command ...  

set_pen

Make a local link to an executable and then run it - this causes a process to change its name in the process table ...  

pipe_read

Pread routine - blocks correctly on pipe ...

Copyright (c) 1982 Michael Landy, Yoav Cohen, and George Sperling.  

pupsrelse

Release blocked PUPS signals ...  

pupsigrelse

Routine to release specified signal (previously blocked with sighold) ...  

sighandle

PUPS signal handling facilties: reinstalls signal handler automatically on call, blocks all signals during call, and restarts slow system calls if handler called while they are running ...  

sigtabsave

Save a PUPS signal table entry ...  

sigtabrestore

Restore a PUPS signal table entry (and re-install handler) ...  

signalpause

Suspend process until specified signal recieved ...  

signalpending

Check to see if given signal is pending ...  

show_sigstatus

Status of signals ...  

signametosigno

Convert signal name to signal number ...  

signotosigname

Convert signal number to name ...  

show_siglstatus

Show detailed state of specified signal ...  

sigvector

Routine to execute non-local goto (as exit from a signal handler) ...  

monitor

Check descriptor for data and/or exceptions ...  

strdate

Return current date ...  

setvitimer

Set up a virtual interval timer ...  

clearvitimer

Clear virtual interval timer ...  

vitrestart

Restart virtual timer system (this routine is usually called as a precaution after using dubious library functions e.g. CURSES which may silently reset signal handlers in an undocumented fashion) ...  

show_pups_vi_timers

Show PUPS virtual timer status ...  

get_fd_lock

Routine to get (or test) write lock on a FIFO ...  

release_fd_lock

Routine to release a write lock on a FIFO ...  

get_lock

Routine to acquire lock a named file ...  

release_lock

Routine to release lock a named file ...  

attach_homeostat

Attach homeostat to a file table entry ...  

detach_homeostat

Detach homeostat function from file table entry ...  

set_fs_hsm_parameters

Set parameters for homeostatic file system space monitoring ...  

xsleep

Get around sloppy BSD implementations of sleep which use the process interval timer alarm() to implment delay ...  

pupsualarm

Alarm function which works in microseconds - raises SIGALRM on timeout ...  

fname2fdes

Return file descriptor which corresponds to filename ...  

fname2fstream

Return stream which corresponds to filename ...  

fname2index

Return file table index for file "fname" ...  

fdes2index

Return file table index for file associated with descriptor "fdes" ...  

xcreat

Extended creat command (which simply creates file without opening it) ...  

xfchmod

Extended chmod which updates ftab contents ...  

xstrlen

Extended strlen command ...  

tmalloc

Memory block tracking extended malloc routine ...  

tcalloc

Memory block tracking extended calloc routine ...  

trealloc

Memory block tracking extended calloc routine ...  

taalloc

Routine to allocate a tracked dynamic array - this is based on T.K.W Chau's allocation scheme ...  

tafree

Routine to free memory occupied by a dynamically allocated tracked array ...  

tnametoptr

Convert a tracked heap object name to heap address ...  

tpartnametoptr

Convert part name to pointer ...  

ttypetoptr

Convert type to pointer ...  

tfree

Extended dynamic memory freeing routine - which keeps track of blocks freed by the malloc family of dynamic memory allocators ...  

tshowobject

Display currently allocated dynamic memory object ...  

tshowobjects

Display N biggest currently allocated dynamic memory objects ...  

xfgets

Extended fgets function ...  

strcomment

Test to see if line is a comment line (first non-space char is '#') ...  

strclr

Clear a string - set all characters to NULL ' ' ...  

pups_set_errno

Set errno ...  

pups_get_errno

Get errno ...  

tty_echoing_off

Turn tty echoing off ...

It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is done in software; there is no need to change the state of the terminal hardware ...  

tty_echoing_on

Turn tty echoing on ...  

pups_yield

Yield the processor (if POSIX sched_yield() is supported) otherwise fake it using usleep() (for delay seconds) ...  

lexec

Execute command on local host ...  

pups_check_pass_set

Check to see if we have an authentication token set ...  

pups_getpass

Get authentication token -- Firstly we search /tmp to see if we have a auth file for our application owner, if that fails, we see if we can reach a controlling tty for manual password by the user. If we cannot reach a controlling tty -- abort ...  

pups_statkill

PUPS kill function which notes state of signalled process - processes which are terminated or stopped return appropriate error condition ...  

xlockf

Extended lockf (which waits for lock resources to become available when locked file object is simultaneously mmap()ed ...  

DISCLAIMER

 

pipe_read

No guarantees of performance accompany this software, nor is any responsibility assumed on the part of the authors. All the software has been tested extensively and every effort has been made to insure its reliability.

Pipe_read.c - read subroutine which waits for its input count or EOF

For use with pipes, which return on read with that which is available rather than that which is requested.

Michael Landy - 4/30/82.


 

Index

NAME
SYNOPSIS
PARAMETERS
DESCRIPTION
fmax
fmin
sqr
iswap
fswap
strp_commnts
actoi
ieven
iodd
iabs
isign
imax
imin
fsign
round
upause
get_fs_mountinfo
find_free_ftab_index
get_ftab_index
set_ftab_id
get_ftab_index_by_id
get_ftab_index_by_name
clear_ftab_slot
remote_fifo_write
remote_fifo_read
alive
creator
not_creator
protect
unprotect
dead
closeall
ch_index
strinp
xfdopen
xopen
xclose
xfclose
pups_show_open_fdescriptors
chsign
seterror
error
strncmps
strrext
strrextr
strext
m_strext
strexccpy
ch_pos
rch_pos
mdc_strext
mdc_strext2
strinp
strin
strintok
stright
strepch
strep
streptok
strtrnc
strfrm
strail
strlead
strchcnt
strpch
mchrep
strccpy
ch_index
rch_index
locate
i_dec
fp_dec
str_dec
ch_dec
argfile
argtline
copytail
std_init
help
t_arg_errs
pups_set_alloc_opt
xmalloc
xrealloc
xcalloc
xfree
xread
pipe_write
execls
lock
unlock
pipestream_obituary_enable
pipestream_obituary_disable
xfork
clear_chtab_slot
show_children
set_child_name
pups_auto_child
pups_noauto_child
pupswait
pupswaitpid
xaalloc
xafree
sort2
check_redirection
set_state
get_state
show_state
deregister_pups_exit_f
show_pups_exit_f
get_directory_entries
sread
swrite
search_path
set_pen
pipe_read
pupsrelse
pupsigrelse
sighandle
sigtabsave
sigtabrestore
signalpause
signalpending
show_sigstatus
signametosigno
signotosigname
show_siglstatus
sigvector
monitor
strdate
setvitimer
clearvitimer
vitrestart
show_pups_vi_timers
get_fd_lock
release_fd_lock
get_lock
release_lock
attach_homeostat
detach_homeostat
set_fs_hsm_parameters
xsleep
pupsualarm
fname2fdes
fname2fstream
fname2index
fdes2index
xcreat
xfchmod
xstrlen
tmalloc
tcalloc
trealloc
taalloc
tafree
tnametoptr
tpartnametoptr
ttypetoptr
tfree
tshowobject
tshowobjects
xfgets
strcomment
strclr
pups_set_errno
pups_get_errno
tty_echoing_off
tty_echoing_on
pups_yield
lexec
pups_check_pass_set
pups_getpass
pups_statkill
xlockf
DISCLAIMER
pipe_read

This document was created by man2html, using the manual pages.
Time: 16:36:10 GMT, January 10, 2008