BOOTSTRAP (kutils) library
LIBRARY NAME
kutils - (no short description specified)
DESCRIPTION
The kutils library provides the routines that make up both Basic Services
and Operating System Services.
Basic services empowers the software developer with a broad range of
commonly used functions and utilities, including a large number of utility
functions to handle memory allocation, string manipulation, string parsing,
and message reporting.
Operating system services isolates Khoros from the operating
system, and extend the capabilities of the operating system to support
distributed computing.
LIST OF LIBRARY FUNCTIONS
- kpinfo
- gets the associated process id
- kremote_exec
- creates a khoros command string which can exec'ed on a remote host
- kremote_file
- creates a khoros file string which can be accessed on a remote machine
- kremote_location
- return the remote location
- kremote_check
- check to see if we can access host
- kremote_start
- starts daemon on specified host
- kremote_stop
- stops daemon on the specified host
- kremote_running
- Check to see if host is currently running daemon
- kremote_list
- List the remote hosts with daemons started
- kalias_list
- returns a string array of aliases
- karray_insert
- insert an entry into an array
- karray_delete
- delete an entry from an array
- karray_free
- free memory used by an array
- karray_locate
- locate an entry in an array
- karray_sort
- sort an array
- karray_merge
- merge two arrays into one
- karray_to_list
- convert an array into a linked list
- karray_to_string
- convert a string array into a single big string
- karray_filelist
- create an array of strings reflecting the contents of a file
- karray_dirlist
- create an array of strings reflecting directory contents
- krmdir
- remove a directory
- kmkdir
- library call to create a directory
- kchdir
- library call to change the current working directory
- kgetcwd
- library call to get the current working directory
- kdirname
- find directory component of a given pathname
- kbasename
- return the filename component of a pathname
- kremove_dir
- remove a directory and it's contents
- kmake_dir
- make a directory and all parent directories if necessary
- kgetenv
- get an environment variable from the environ list.
- kputenv
- put an environment variable into the environ list.
- kremenv
- remove an environment variable from the environment
- kerrno_init_errors
- initialize errors to be used with khoros errno
- kerrno_lookup
- lookup the error message associated with a errno.
- kerrno_check
- check to see if an errno is within a given error list.
- keditfile
- start up an edit program to edit an input file
- kprintfile
- print a file to a printer
- kreadfile
- read the contents of a file into a data array
- kwritefile
- write the contents of the data to a file
- ksedfile
- khoros string edit a file
- kcopyfile
- copy the contents of one filename to another
- kcomparefile
- compare the contents of one filename to another
- khash_value
- polynomial conversion
- khash_init
- initializes a hash array
- khash_add
- adds an entry into the hash array
- khash_location
- return the location of the entry within hash
- khash_clientdata
- return the client data associated with the hash entry
- khash_check
- check to see if a hash entry exists
- khash_delete
- delete an entry from the hash array
- khash_free
- frees the hash array and all memory
- khash_reinit
- reinitializes the hash to be empty
- kfile_reopen
- re-open a stream khoros transport
- kfile_getpermanence
- returns whether a file has data permanence or not
- kfile_getmachtype
- gets the machine architecture type for a file transport id
- kfile_setmachtype
- sets the machine architecture type for a file transport id
- kfile_remotehost
- returns whether a host is remote
- kfile_readdata
- read the contents of a khoros transport into a data array
- kfile_writedata
- write the contents of the data to a khoros transport
- kfile_seddata
- string edit from one transport to another
- kfile_copydata
- copy the contents of a transport id to another transport id
- kfile_comparedata
- compare the contents of a transport id to another transport id
- kfile_filename
- return the filename associated with khoros transport id
- kfile_flags
- return the flags associated with transport id
- kfile_setstate
- adds a flag to the open transport id state
- kfile_clrstate
- remove a flag from an open transport id state
- kfile_getstate
- return the current internal stream transport state
- kfile_type
- return the type flag field used when opening the transport with kfopen()
- kfile_mode
- return the mode associated with transport id
- ktransport_list
- get the list of supported transports
- ktransport_add
- add a new transport to the list of transports
- ktransport_delete
- delete a transport from the list of all transports
- kflags_to_type
- convert kopen() flags to kfopen() type parameter
- ktype_to_flags
- convert kfopen() type to kopen() flags
- khoros_imprint
- imprint the khoros toolbox
- khost_list
- get the list of machines that processes can be distributed to
- khost_add
- add a host to the list of machines that processes can be distributed to
- khost_delete
- delete a host from the list of machines that processes can be distributed to
- khost_save
- saves the current list of machines back into the khoros host file
- khost_location
- get the location part of the host spec
- khost_username
- get the username part of the host spec
- khost_remotecmd
- get the username part of the host spec
- khost_entry
- get the entry the best matches the partial host
- kwait3
- replacement for the system wait3()
- ksignal
- khoros signal handler
- ksignal_format
- format the actual signal error
- kread_generic
- read in any data type.
- kread_array
- read in a variable array
- kread_pointer
- read in a variable array
- kread_struct
- read in a single structure
- kscanf
- scan kstdin and format the input into one or more arguments of the type specified
- kfscanf
- scan file input and format it into one or more arguments of the type specified
- ksscanf
- scan input string and format it into one or more arguments of the type specified.
- kvscanf
- scan formatted kstdin input of variable arguments
- kvfscanf
- scan formatted kfile input of variable arguments
- kvsscanf
- scan formatted string of a variable argument list
- kprintf
- print formatted output to kstdout
- kfprintf
- print one or more arguments in the format specified to an output file stream
- ksprintf
- print one or more arguments in the format specified to an output string.
- kvprintf
- print formatted kstdout output of variable arguments
- kvfprintf
- print formatted kfile output of variable arguments
- kvsprintf
- print formatted string output of variable arguments list
- kfopen
- open a data transport stream
- kfdopen
- open an existing transport descriptor as a data transport stream
- kfreopen
- re-open a data transport stream
- ktmpfile
- create a temporary data transport stream
- kfclose
- close a data transport stream
- kfread
- read from a data transport stream
- kfwrite
- write to a data transport stream
- kfputc
- put a character onto the data transport stream
- kputs
- writes a string to kstdout
- kfputs
- put a string onto the data transport stream
- kfgetc
- get a character from the data transport stream
- kungetc
- push a character back onto the data transport stream
- kfgets
- get a string from a data transport stream
- kfseek
- set position in a data transport stream
- kftell
- report current position in the data transport stream
- kfdup
- duplicate an existing data transport stream
- kfdup2
- duplicate an existing data transport into a specific stream
- krewind
- rewind a data transport stream to the beginning
- kfflush
- flush buffered output of a data transport stream
- kfeof
- check if a data transport stream is at EOF
- kclearerr
- clear the EOF/error flags of a data transport stream
- ksetvbuf
- set the I/O buffer of a data transport stream
- kgetbuffer
- get the current data transport stream's input/output buffer and it's size
- kstruct_define
- define a structure entry
- kstruct_undefine
- undefine a structure entry
- kstruct_check
- check to see if a datatype is defined
- kstruct_free
- frees a structure and any associated memory
- kstruct_compare
- compares two structures
- kstruct_duplicate
- duplicates a structure
- kstruct_flatten
- flattens a structure
- kstruct_unflatten
- unflattens data into a structure
- kstruct_setinfo
- override the info in a structure entry
- kstruct_getinfo
- retrieve the info in a structure entry
- ktempnam
- create a name for a temporary khoros transport
- krename
- rename a khoros transport from path1 to path2
- kopen
- open or create a file for reading and/or writing
- kclose
- close and delete a transport descriptor
- kread
- read input from a transport descriptor
- kwrite
- write output to a transport descriptor
- kaccess
- determine accessibility of file
- kunlink
- remove a filename from a directory entry
- kcreat
- routine for creating a khoros transport
- ktouch
- routine for touching a temporary transport
- kfcntl
- manipulates an open transport descriptor
- kflock
- apply or remove an advisory lock on an open transport descriptor
- klseek
- move read/write pointer of a transport descriptor
- ktell
- report the position of the read/write pointer
- kdup
- duplicate an existing khoros transport descriptor
- kdup2
- specifically duplicate an existing khoros transport descriptor
- kpopen
- open a pipe (for I/O) from or to a process
- kpclose
- close a pipe (for I/O) from or to a process
- ksystem
- issue a shell command
- kspawn
- spawn a command
- kexecvp
- execute a command
- kfileno
- return the transport descriptor
- kfidfile
- return the kfile structure associated with a fid
- ktmpfid
- create a temporary transport descriptor
- kexit_handler
- adds an kexit handler
- kexit
- terminate a process
- kgetdescriptors
- get true UNIX file descriptors
- kgethostname
- get the current hostname
- kwrite_generic
- write an array in any data type.
- kwrite_array
- write a variable array
- kwrite_pointer
- write a variable array
- kwrite_struct
- write a single structure
- klist_insert
- insert an entry into the linked list
- klist_add
- add an entry into the linked list
- klist_copy
- copy a linked list into a new linked list
- klist_delete
- delete an entry from the linked list
- klist_free
- free the entire linked list
- klist_locate
- locate an entry in the linked list
- klist_locate_clientdata
- locate an entry in the linked list according to it's client data
- klist_head
- locate the head of the linked list
- klist_tail
- locate the tail of the linked list
- klist_sort
- sort the linked list
- klist_merge
- merge two linked list into a single linked list
- klist_split
- split a single linked list into two linked lists
- klist_size
- compute the size or number of entries in the list
- klist_to_array
- convert the linked list into an array
- klist_filelist
- create a linked list of strings from a file
- klist_dirlist
- create a linked list of file names
- kfree
- free allocated memory
- kmalloc
- allocate a contiguous piece of memory
- kcalloc
- allocate memory and initialize it
- krealloc
- re-allocate a piece of memory to a new size
- kdupalloc
- duplicates a piece of memory
- kmemcpy
- copies bytes from src to dest
- kmemccpy
- restricted copy of bytes from src to dest
- kmemcmp
- compare bytes from src1 and src2
- kmemset
- initialize bytes in dest to the character value 'c'
- kmemmove
- copy a block of memory to another block
- kmemchr
- find the first occurence of 'c' in an character array
- kset_errorhandler
- set the error handling routine used by kerror()
- kset_warnhandler
- set the warning handler routine used by kwarn()
- kset_announcehandler
- set the announce handling routine used by kannounce()
- kset_prompthandler
- set the prompt handling routine used by kprompt()
- kset_choosehandler
- set the choose handling routine used by kchoose()
- kset_infohandler
- set the information handling routine used by kinfo()
- kset_quithandler
- set the quit handling routine used by kquit()
- kset_savehandler
- set the save handling routine used by ksave()
- kerror
- print error messages in a standardized format
- kwarn
- print warning messages in a standardized format
- kannounce
- report or announce a message in a standardized format
- kprompt
- request an acknowledgement from the user
- koverwrite
- request an acknowledgement for overwriting files
- kquit
- request an acknowledgement for quitting an application
- ksave
- request an acknowledgement for quitting an application
- kchoose
- prompt the user to select from a list of items
- kinfo
- print information messages in a standardized format
- kset_notify
- set the Khoros notify level
- kget_notify
- get the Khoros notify level
- kparse_string_search
- match a search key in a data string
- kparse_file_search
- search a file for a specific key
- kparse_string_scan
- scan a data string for a specific section
- kparse_file_scan
- scan a Khoros Data Transport Stream for a specific section of data
- kparse_string_delimit
- break a string into an array of strings based on some set of delimiters.
- kparse_string_search_delimit
- break up a line data into an array of strings based on some set of delimiters
- kparse_file_search_delimit
- break up a line data into an array of strings based on some set of delimiters
- kparse_string_scan_delimit
- Break a string into an array of strings
- kparse_file_scan_delimit
- break a section of a Khoros Data Transport Stream into an array of strings
- kfullpath
- Expand a environment variables in a path
- kexpandpath
- Expand a path to it's "true" path
- ktbpath
- Expand a environment variables local to a toolbox
- kprog_set_argc
- set the number of commandline parameters
- kprog_set_argv
- set the command line argument array
- kprog_set_envp
- set the number of environment variable parameters
- kprog_set_program
- set the name of the program
- kprog_set_toolbox
- set the toolbox in which this software object belongs.
- kprog_get_argc
- get the number of arguments in the argv structure
- kprog_get_argv
- get the arguments in the argv structure
- kprog_get_envp
- gets the environment variable parameter structure
- kprog_get_program
- gets the name of the program
- kprog_get_toolbox
- gets the toolbox in which this program belongs.
- kprog_get_command
- gets the command string in which this program was executed with.
- khoros_initialize
- initialize khoros system (old version for Khoros 2.1p1)
- khoros_init
- initialize khoros system (new version for Khoros 2.1p2)
- kre_comp
- compile a regular expression
- kre_exec
- execute dfa to find a match.
- kre_subs
- substitute the matched portions of the src in dst
- kre_pos
- begin and end pointers of regular expression group
- kre_modw
- modify kre_exec's work table
- kre_debug
- prints a DFA for debug purposes
- kre_status
- return a parse status code
- kre_icomp
- compile a case insensitive regular expression
- kregex_replace
- replace an input string given a regular expression input and output string
- kstrftime
- generate formatted time information
- kstrstr
- find a substring within a string
- kstrpbrk
- find the first occurrence of a character from a set of chararacters
- kstrtok
- find a token within a string
- kstrdup
- return a duplicate of the input string
- kstrspn
- return the number of matched characters
- kstrcspn
- return the number of characters not matched
- kstrcasecmp
- do a case insensitive string compare
- kstrncasecmp
- do a case insensitive string compare on n characters
- kstrlen
- return the length of a string
- kstrcmp
- compare two strings
- kstrncmp
- compare the first n characters of two strings
- kstrchr
- find a character in a string
- kstrrchr
- reverse scan a string to find a character
- kstrcpy
- copy a string
- kstrncpy
- copy the first n characters in a string
- kstrcat
- concatenate two strings
- kstrncat
- concatenate up to n characters on a string
- kstring_lower
- convert a string to lower case.
- kstring_upper
- convert a string to upper case.
- kstring_capitalize
- convert a string to its capitalized equivalent
- kstring_seddata
-
- kstring_replace
- replace one substring with another
- kchar_replace
- replace a character with another through a string
- kstring_cleanup
- remove white space from the ends of a string
- kstring_format
- Format a string
- kstring_cat
- concatenate two strings
- kstring_ncat
- concatenate two partial strings
- kstring_3cat
- concatenate three strings together
- kstring_subcmp
- compares two sub-strings
- kstring_copy
- copy a string
- kstring_ncopy
- copy up to n characters of a string
- kstring_detab
- remove tabs from a string
- kstring_to_token
- return the token that is associated with the specified string
- ktoken_to_string
- return the string associated with the specified token
- ktoken_check
- check to see if a string has been token'ized
- ktoken_delete
- delete the token'ized string from the list of tokens
- karray_add
- add an entry into the array list
- karray_copy
- copy an array of strings
- kgetc
- get character from khoros transport
- kgets
- reads from kstdin until a newline or EOF
- kputc
- put a character onto the khoros transport
- kinput
- opens a file for reading using kopen()
- koutput
- opens/creates a file for writing using kopen()
- kfinput
- opens a file for reading using kfopen()
- kfoutput
- opens/creates a file for writing using kfopen()
- kfile_isread
- khoros transport is readable
- kfile_iswrite
- khoros transport is writeable
- kfile_isrdwr
- khoros transport is both readable and writeable
- kfile_ismybuf
- khoros transport buffer was set by the application
- kfile_ispermanent
- khoros transport has permanence
- kfile_isstream
- khoros transport is a stream based transport
- kfile_istemp
- khoros transport is temporary
- kfile_isopen
- khoros transport has been properly opened
- kfile_islinebuf
- khoros transport is line buffered
- kfile_isfullbuf
- khoros transport is full buffered
- kfile_isbufferd
- khoros transport is buffered or not
- kfile_isdup
- khoros transport has been has been/is a dupped transport
- kfile_iseof
- khoros transport is at end of file (eof)
- kfile_islock
- khoros transport has been/is a locked transport
- kfile_isreacquire
- khoros transport will be reacquired
- klist_next
- return the next entry on the list
- klist_prev
- return the previous entry on the list
- klist_clientdata
- return the client data associated with an entry on the list
- klist_identifier
- return the identifier associated with an entry on the list
- klist_checkhead
- check if the current entry is the head of the list
- klist_checktail
- check if the current entry is the tail of the list
- klist_checkident
- check if the identifier is currently on the link list
- klist_checkentry
- check if the klist entry is currently on the link list
- klist_makecircular
- changes a consecutive or linear link list into a circular link list
- klist_makelinear
- changes a circular link list into a consecutive or linear link list
- kfree_and_NULL
- free memory previously allocated
- kbcopy
- copies bytes from src to dest
- kbzero
- zeros out 'num' bytes (BSD style)
- kbcmp
- compare bytes from src1 and src2 (BSD style)
- kset_errno
- set an errno with a debug message
- kread_bit
- read an array of bits
- kread_byte
- read an array of signed bytes
- kread_short
- read an array of signed shorts
- kread_int
- read an array of signed ints
- kread_long
- read an array of signed longs
- kread_float
- read an array of floats
- kread_double
- read an array of doubles
- kread_ubyte
- read an array of unsigned bytes
- kread_ushort
- read an array of unsigned shorts
- kread_uint
- read an array of unsigned ints
- kread_ulong
- read an array of unsigned longs
- kread_complex
- read an array of complex
- kread_dcomplex
- read an array of double complex
- kread_string
- read an array of strings
- knumber
- the number of items in an array
- kva_start
- sets the start of the variable argument list
- kva_end
- sets the end of the variable argument list
- kva_arg
- gets an argument off the variable argument list
- kwrite_bit
- write an array of bits
- kwrite_byte
- write an array of signed bytes
- kwrite_short
- write an array of signed shorts
- kwrite_int
- write an array of signed ints
- kwrite_long
- write an array of signed longs
- kwrite_float
- write an array of floats
- kwrite_double
- write an array of doubles
- kwrite_ubyte
- write an array of unsigned bytes
- kwrite_ushort
- write an array of unsigned shorts
- kwrite_uint
- write an array of unsigned ints
- kwrite_ulong
- write an array of unsigned longs
- kwrite_complex
- write an array of complex
- kwrite_dcomplex
- write an array of double complex
- kwrite_string
- write an array of strings
ADDITIONAL INFORMATION
LOCATION OF SOURCE FILES
$BOOTSTRAP/objects/library/kutils/src
LOCATION OF PUBLIC INCLUDE FILE
$BOOTSTRAP/include/kutils/kutils.h
YOU MUST INCLUDE
#include <bootstrap.h>
SEE ALSO
kexpr(3), kmath(3)
SEE MANUAL
The functions provided by the kutils library are documented in Volume I
of the Programming Services Manual, "Foundation Services". The functions in
kutils are divided by functionality into Basic Services and Operating
System Services. Basic Services is documented in Chapter 2 of Programming
Services Manual, Volume I, while Operating System Services is documented in
Chapter 5 of the Programming Services Manual, Volume I.
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.