Datatypes:
none | System utility functions |
Sections:
Argument list manipulation functions | Miscellaneous |
System cast functions | Miscellaneous |
System functions for files | Miscellaneous |
Wrappers to commands | Miscellaneous |
Wrappers to C functions | Miscellaneous |
executing commands | Miscellaneous |
executing programs | Miscellaneous |
Miscellaneous system functions | Miscellaneous |
piped commands | Miscellaneous |
exit | Miscellaneous |
Functions:
ajSysArglistBuildC | Generates a program name and argument list from a command line string. |
ajSysArglistBuildS | Generates a program name and argument list from a command line string. |
ajSysArglistFree | Free memory in an argument list allocated by ajSysArgList |
AjBool ajSysArglistBuildC ( const char* cmdlinetxt, char** Pname, char*** PParglist );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | Command line. |
char** | Pname | Output | Program name. |
char*** | PParglist | Output | Argument list. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.3.0
AjBool ajSysArglistBuildS ( const AjPStr cmdline, char** Pname, char*** PParglist );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | Command line. |
char** | Pname | Output | Program name. |
char*** | PParglist | Output | Argument list. |
AjBool | RETURN | ajTrue on success. |
From EMBOSS 6.3.0
void ajSysArglistFree ( char*** PParglist );
Type | Name | Read/Write | Description |
---|---|---|---|
char*** | PParglist | Output | Argument list. |
void | RETURN |
From EMBOSS 5.0.0
Functions:
ajSysCastItoc | Convert Int to Char Needed for very fussy compilers i.e. Digital C |
ajSysCastItouc | Convert Int to Unsigned Char Needed for very fussy compilers i.e. Digital C |
char ajSysCastItoc ( ajint v );
Type | Name | Read/Write | Description |
---|---|---|---|
ajint | v | Input | integer |
char | RETURN | Character cast |
From EMBOSS 5.0.0
unsigned char ajSysCastItouc ( ajint v );
Type | Name | Read/Write | Description |
---|---|---|---|
ajint | v | Input | integer |
unsigned char | RETURN | Unsigned character cast |
From EMBOSS 5.0.0
Functions:
ajSysFileRmrfC | Forcibly delete a directory tree |
ajSysFileRmrfS | Forcibly delete a directory tree |
ajSysFileUnlinkC | Deletes a file or link |
ajSysFileUnlinkS | Deletes a file or link |
ajSysFileWhich | Gets the Basename of a file then searches $PATH sequentially until it finds a user-EXECUTABLE file of the same name. |
ajSysFileWhichEnv | Gets the Basename of a file then searches $PATH sequentially until it finds a user-EXECUTABLE file of the same name. Reentrant. |
ajSysGetHomedir | Get the home directory of the current user |
ajSysGetHomedirFromName | Get a home directory location from a username |
AjBool ajSysFileRmrfC ( const char* path );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | path | Input | Directory path |
AjBool | RETURN | true if deleted false otherwise |
From EMBOSS 6.3.0
AjBool ajSysFileRmrfS ( const AjPStr path );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | path | Input | Directory path |
AjBool | RETURN | true if deleted false otherwise |
From EMBOSS 6.5.0
AjBool ajSysFileUnlinkC ( const char* filename );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | filename | Input | Filename in AjStr. |
AjBool | RETURN | true if deleted false otherwise |
From EMBOSS 6.3.0
AjBool ajSysFileUnlinkS ( const AjPStr filename );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | filename | Input | Filename in AjStr. |
AjBool | RETURN | true if deleted false otherwise |
From EMBOSS 6.3.0
AjBool ajSysFileWhich ( AjPStr* Pfilename );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPStr* | Pfilename | Modify | Filename in AjStr, replaced by full pathname |
AjBool | RETURN | True if executable found, false otherwise |
From EMBOSS 5.0.0
AjBool ajSysFileWhichEnv ( AjPStr* Pfilename, char* const[] env );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPStr* | Pfilename | Modify | Filename in AjStr, replaced by full pathname |
char* const[] | env | Input | Environment |
AjBool | RETURN | True if executable found, false otherwise |
From EMBOSS 5.0.0
char* ajSysGetHomedir ( void );
Type | Name | Read/Write | Description |
---|---|---|---|
char* | RETURN | Home directory or NULL |
From EMBOSS 6.3.0
char* ajSysGetHomedirFromName ( const char* username );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | username | Input | Username |
char* | RETURN | Home directory or NULL |
From EMBOSS 6.3.0
Functions:
ajSysCommandCopyC | Copy a file |
ajSysCommandCopyS | Copy a file |
ajSysCommandMakedirC | Delete a file |
ajSysCommandMakedirS | Delete a file |
ajSysCommandRemoveC | Delete a file |
ajSysCommandRemoveS | Delete a file |
ajSysCommandRemovedirC | Delete a file |
ajSysCommandRemovedirS | Delete a file |
ajSysCommandRenameC | Rename a file |
ajSysCommandRenameS | Rename a file |
AjBool ajSysCommandCopyC ( const char* name, const char* name2 );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | name | Input | Source filename |
const char* | name2 | Input | Target filename |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandCopyS ( const AjPStr strname, const AjPStr strname2 );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | strname | Input | Source filename |
const AjPStr | strname2 | Input | Target filename |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandMakedirC ( const char* name );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | name | Input | Directory |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandMakedirS ( const AjPStr strname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | strname | Input | Directory |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandRemoveC ( const char* name );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | name | Input | Filename |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandRemoveS ( const AjPStr strname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | strname | Input | Filename |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandRemovedirC ( const char* name );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | name | Input | Directory |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandRemovedirS ( const AjPStr strname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | strname | Input | Directory |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandRenameC ( const char* name, const char* name2 );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | name | Input | Source filename |
const char* | name2 | Input | Target filename |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
AjBool ajSysCommandRenameS ( const AjPStr strname, const AjPStr strname2 );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | strname | Input | Source filename |
const AjPStr | strname2 | Input | Target filename |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
Functions:
ajSysFuncFdopen | Place non-ANSI fdopen here |
ajSysFuncFgets | An fgets replacement that will cope with Mac OSX <CR> files |
ajSysFuncFopen | An fopen replacement to cope with cygwin and windows |
ajSysFuncSocket | Socket function coping with UNIX and WIN32 |
ajSysFuncStrdup | Duplicate BSD strdup function for very strict ANSI compilers |
ajSysFuncStrtok | strtok that doesn't corrupt the source string |
ajSysFuncStrtokR | Reentrant strtok that doesn't corrupt the source string. This function uses a string buffer provided by the caller. |
FILE* ajSysFuncFdopen ( ajint filedes, const char* mode );
Type | Name | Read/Write | Description |
---|---|---|---|
ajint | filedes | Input | file descriptor |
const char* | mode | Input | file mode |
FILE* | RETURN | file pointer |
From EMBOSS 5.0.0
char* ajSysFuncFgets ( char* buf, int size, FILE* fp );
Type | Name | Read/Write | Description |
---|---|---|---|
char* | buf | Output | buffer |
int | size | Input | maximum length to read |
FILE* | fp | Modify | stream |
char* | RETURN | buf or NULL |
From EMBOSS 5.0.0
FILE* ajSysFuncFopen ( const char* name, const char* flags );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | name | Input | file to open |
const char* | flags | Input | r/w/a flags |
FILE* | RETURN | file or NULL |
From EMBOSS 5.0.0
SOCKRET ajSysFuncSocket ( int domain, int type, int protocol );
Type | Name | Read/Write | Description |
---|---|---|---|
int | domain | Input | Domain |
int | type | Input | Type |
int | protocol | Input | Protocol |
SOCKRET | RETURN | Universal (UNIX/WIN32) socket value |
From EMBOSS 6.3.0
char* ajSysFuncStrdup ( const char* dupstr );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | dupstr | Input | string to duplicate |
char* | RETURN | Text string as for strdup |
From EMBOSS 5.0.0
char* ajSysFuncStrtok ( const char* srcstr, const char* delimstr );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | srcstr | Input | source string |
const char* | delimstr | Input | delimiter string |
char* | RETURN | pointer or NULL when nothing is found |
From EMBOSS 5.0.0
char* ajSysFuncStrtokR ( const char* srcstr, const char* delimstr, const char** ptrptr, AjPStr* buf );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | srcstr | Modify | source string |
const char* | delimstr | Input | delimiter string |
const char** | ptrptr | Modify | ptr save |
AjPStr* | buf | Output | result buffer |
char* | RETURN | pointer or NULL |
From EMBOSS 5.0.0
Functions:
ajSysExecC | Exec a command line as if from the C shell |
ajSysExecS | Exec a command line as if from the C shell |
ajSysExecEnvC | Exec a command line as if from the C shell |
ajSysExecEnvS | Exec a command line as if from the C shell |
ajSysExecLocaleC | Exec a command line as if from the C shell with a defined locale variable. |
ajSysExecLocaleS | Exec a command line as if from the C shell with a defined locale variable. |
ajSysExecOutnameC | Exec a command line as if from the C shell with standard output redirected to and overwriting a named file |
ajSysExecOutnameS | Exec a command line as if from the C shell with standard output redirected to and overwriting a named file |
ajSysExecOutnameAppendC | Exec a command line as if from the C shell with standard output redirected and appended to a named file |
ajSysExecOutnameAppendS | Exec a command line as if from the C shell with standard output redirected and appended to a named file |
ajSysExecOutnameErrC | Exec a command line as if from the C shell with standard output and standard error redirected to and overwriting a named file |
ajSysExecOutnameErrS | Exec a command line as if from the C shell with standard output and standard error redirected to and overwriting a named file |
ajSysExecOutnameErrAppendC | Exec a command line as if from the C shell with standard output and standard error redirected and appended to a named file |
ajSysExecOutnameErrAppendS | Exec a command line as if from the C shell with standard output and standard error redirected and appended to a named file |
ajSysExecPathC | Exec a command line with a test for the program name in the current path |
ajSysExecPathS | Exec a command line with a test for the program name in the current path |
ajSysExecRedirectC | Execute an application redirecting its stdin/out to pipe fds |
ajint ajSysExecC ( const char* cmdlinetxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecS ( const AjPStr cmdline );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecEnvC ( const char* cmdlinetxt, char* const[] env );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
char* const[] | env | Input | The environment |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecEnvS ( const AjPStr cmdline, char* const[] env );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
char* const[] | env | Input | The environment |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecLocaleC ( const char* cmdlinetxt, const char* localetxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
const char* | localetxt | Input | The locale value |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecLocaleS ( const AjPStr cmdline, const AjPStr localestr );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
const AjPStr | localestr | Input | The locale value |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameC ( const char* cmdlinetxt, const char* outfnametxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
const char* | outfnametxt | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameS ( const AjPStr cmdline, const AjPStr outfname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
const AjPStr | outfname | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameAppendC ( const char* cmdlinetxt, const char* outfnametxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
const char* | outfnametxt | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameAppendS ( const AjPStr cmdline, const AjPStr outfname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
const AjPStr | outfname | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameErrC ( const char* cmdlinetxt, const char* outfnametxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
const char* | outfnametxt | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameErrS ( const AjPStr cmdline, const AjPStr outfname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
const AjPStr | outfname | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameErrAppendC ( const char* cmdlinetxt, const char* outfnametxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
const char* | outfnametxt | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecOutnameErrAppendS ( const AjPStr cmdline, const AjPStr outfname );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
const AjPStr | outfname | Input | The output file name |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecPathC ( const char* cmdlinetxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | The command line |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
ajint ajSysExecPathS ( const AjPStr cmdline );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | cmdline | Input | The command line |
ajint | RETURN | Exit status |
From EMBOSS 6.3.0
AjBool ajSysExecRedirectC ( const char* cmdlinetxt, int** pipeto, int** pipefrom );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | Command string. The string may end with a trailing pipe character. |
int** | pipeto | Output | pipes to the process |
int** | pipefrom | Output | pipes from the process |
AjBool | RETURN | True on success |
From EMBOSS 6.3.0
Functions:
ajSysExecprogNowaitC | Exec a command line with no parent wait |
ajSysExecprogNowaitS | Exec a command line with no parent wait |
ajint ajSysExecprogNowaitC ( const char* prog, char* const[] arg, char* const[] env );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | prog | Input | The command line |
char* const[] | arg | Input | Argument list |
char* const[] | env | Input | An environment |
ajint | RETURN | Exit status |
From EMBOSS 6.4.0
ajint ajSysExecprogNowaitS ( const AjPStr progstr, char* const[] arg, char* const[] env );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | progstr | Input | The command line |
char* const[] | arg | Input | Argument list |
char* const[] | env | Input | An environment |
ajint | RETURN | Exit status |
From EMBOSS 6.4.0
Functions:
ajSysCanon | Sets or unsets TTY canonical mode |
ajSysFdFromSocket | Return a file descriptor from a UNIX of Windows socket |
ajSysSocketclose | Closes a UNIX or WIN32 socket |
ajSysTimeoutSet | Sets an alarm abort timeout for UNIX and Windows |
ajSysTimeoutUnset | Unsets an alarm abort timeout for UNIX and Windows |
void ajSysCanon ( AjBool state );
Type | Name | Read/Write | Description |
---|---|---|---|
AjBool | state | Input | state=true sets canon state=false sets noncanon |
void | RETURN |
From EMBOSS 1.0.0
FILE* ajSysFdFromSocket ( const AjOSysSocket sock, const char* mode );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjOSysSocket | sock | Input | AJAX socket structure |
const char* | mode | Input | Opening mode ("r" or "a") |
FILE* | RETURN | File descriptor |
From EMBOSS 6.3.0
void ajSysSocketclose ( AjOSysSocket sock );
Type | Name | Read/Write | Description |
---|---|---|---|
AjOSysSocket | sock | Modify | AJAX socket structure |
void | RETURN |
From EMBOSS 6.3.0
int ajSysTimeoutSet ( AjPSysTimeout ts );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPSysTimeout | ts | Modify | AJAX timeout structure |
int | RETURN | 0 = success -1 = error |
From EMBOSS 6.3.0
int ajSysTimeoutUnset ( AjPSysTimeout ts );
Type | Name | Read/Write | Description |
---|---|---|---|
AjPSysTimeout | ts | Modify | AJAX timeout structure |
int | RETURN | 0 = success -1 = error |
From EMBOSS 6.3.0
Functions:
ajSysCreateInpipeC | Return a new file object from which to read the output from a command. |
ajSysCreateInpipeS | Return a new file object from which to read the output from a command. |
AjPFile ajSysCreateInpipeC ( const char* cmdlinetxt );
Type | Name | Read/Write | Description |
---|---|---|---|
const char* | cmdlinetxt | Input | Command string. The string may end with a trailing pipe character. |
AjPFile | RETURN | New file object. |
From EMBOSS 6.3.0
AjPFile ajSysCreateInpipeS ( const AjPStr command );
Type | Name | Read/Write | Description |
---|---|---|---|
const AjPStr | command | Input | Command string. The string may end with a trailing pipe character. |
AjPFile | RETURN | New file object. |
From EMBOSS 6.3.0
Functions:
ajSysExit | Cleans up system internals memory |
void ajSysExit ( void );
Type | Name | Read/Write | Description |
---|---|---|---|
void | RETURN |
From EMBOSS 4.0.0