#include "oorexxapi.h"
#include "PlatformDefinitions.h"
#include <sys/ipc.h>
#include <memory.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <limits.h>
#include <math.h>
#include <sys/stat.h>
#include <errno.h>
#include <stddef.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/utsname.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <time.h>
#include <netdb.h>
#include <dirent.h>
#include <sys/time.h>
#include <utime.h>
#include <termios.h>
#include <fnmatch.h>
#include <libgen.h>
Go to the source code of this file.
Classes | |
union | semun |
struct | RxTreeData |
struct | _GetFileData |
struct | RxStemData |
struct | _SORT_MEM |
struct | RxSemData |
class | AutoClose |
class | AutoFree |
Macros | |
#define | INVALID_ROUTINE 40 |
#define | MAX_DIGITS 9 |
#define | NO_UTIL_ERROR "0" /* No error whatsoever */ |
#define | VALID_ROUTINE 0 /* Successful completion */ |
#define | MAX_LINE_LEN 4096 /* max line length */ |
#define | MAX_READ 0x10000 /* full segment of buffer */ |
#define | CH_EOF 0x1A /* end of file marker */ |
#define | CH_CR '\r' /* carriage return character */ |
#define | CH_NL '\n' /* new line character */ |
#define | MAX 256 /* temporary buffer length */ |
#define | IBUF_LEN 4096 /* Input buffer length */ |
#define | CURRENT_DIR_FIRST 0 /* search flag 'C' */ |
#define | ENVIRONMENT_ONLY 1 /* search flag 'N' */ |
#define | OFFSET 1000 /* needed to prevent collision*/ |
#define | MAXUSECOUNT 65535 /* max semaphore usecount */ |
#define | REXXMESSAGEFILE "rexx.cat" |
#define | FNAMESPEC_BUF_LEN IBUF_LEN |
#define | FOUNDFILE_BUF_LEN IBUF_LEN |
#define | FILETIME_BUF_LEN 64 |
#define | FILEATTR_BUF_LEN 16 |
#define | FOUNDFILELINE_BUF_LEN FOUNDFILE_BUF_LEN + FILETIME_BUF_LEN + FILEATTR_BUF_LEN |
#define | SINE 0 /* trig function defines... */ |
#define | COSINE 3 /* the ordering is important, */ |
#define | TANGENT 1 /* as these get transformed */ |
#define | COTANGENT 2 /* depending on the angle */ |
#define | MAXTRIG 3 /* value */ |
#define | ARCSINE 0 /* defines for arc trig */ |
#define | ARCCOSINE 1 /* functions. Ordering is */ |
#define | ARCTANGENT 2 /* not as important here */ |
#define | pi 3.14159265358979323846l /* pi value */ |
#define | DEGREES 'D' /* degrees option */ |
#define | RADIANS 'R' /* radians option */ |
#define | GRADES 'G' /* grades option */ |
#define | DEFAULT_PRECISION 9 /* default precision to use */ |
#define | MAX_PRECISION 16 /* maximum available precision*/ |
#define | NO_UTIL_ERROR "0" /* No error whatsoever */ |
#define | ERROR_NOMEM "2" /* Insufficient memory */ |
#define | ERROR_FILEOPEN "3" /* Error opening text file */ |
#define | ERROR_RETSTR "ERROR:" |
#define | INVALID_ROUTINE 40 /* Raise Rexx error */ |
#define | VALID_ROUTINE 0 /* Successful completion */ |
#define | SORT_CASESENSITIVE 0 |
#define | SORT_CASEIGNORE 1 |
#define | SORT_ASCENDING 0 |
#define | SORT_DECENDING 1 |
#define | SORT_NUMERIC 3 |
#define | SORT_DEF_AVG_SIZE 20 |
#define | BUILDRXSTRING(t, s) |
#define | RETVAL(retc) |
#define | RECURSE 0x0002 |
#define | DO_DIRS 0x0004 |
#define | DO_FILES 0x0008 |
#define | NAME_ONLY 0x0010 |
#define | EDITABLE_TIME 0x0020 |
#define | LONG_TIME 0x0040 |
#define | CASELESS 0x0080 |
#define | IGNORE 2 /* Ignore attributes entirely */ |
#define | stty(a, b) (void)tcsetattr(a,TCSANOW,b) /* simple set attr. */ |
#define | gtty(a, b) (void)tcgetattr(a,b) /* simple get attr. */ |
#define | discard_input(a) tcflush(a,TCIFLUSH) /* simple flush */ |
#define | restore_tty(a) stty(ttyfd,a) /* new settings STDIN */ |
#define | SEM_WAIT_PERIOD 100 /* POSIX says this should be 10ms */ |
Typedefs | |
typedef struct RxTreeData | RXTREEDATA |
typedef struct _GetFileData | GetFileData |
typedef struct RxStemData | RXSTEMDATA |
typedef struct _SORT_MEM | SORTMEM |
typedef struct _SORT_MEM * | PSORTMEM |
typedef struct RxSemData | RXSEMDATA |
Enumerations | |
enum | TreeDataBuffers { FILESPEC_BUFFER , FOUNDFILE_BUFFER , FOUNDFILELINE_BUFFER } |
Functions | |
char * | resolve_tilde (const char *) |
bool | string2size_t (const char *string, size_t *number) |
int | ReadNextBuffer (GetFileData *filedata) |
void | strupr (char *string) |
int | OpenFile (const char *file, GetFileData *filedata) |
void | CloseFile (GetFileData *filedata) |
int | GetLine (char *line, size_t size, GetFileData *filedata) |
const char * | mystrstr (const char *haystack, const char *needle, size_t hlen, size_t nlen, bool sensitive) |
int | get_next_path (char **ppenv, char *path_buf) |
int | SearchPath (int SearchFlag, const char *path, const char *filename, char *buf, size_t buf_size) |
bool | string2int (const char *string, int *number) |
void | restore_terminal (int signal) |
int | getkey (char *ret, bool echo) |
RexxRoutine1 (int, SysSleep, RexxStringObject, delay) | |
size_t RexxEntry | SysLoadFuncs (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysDropFuncs (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysCls (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
RexxRoutine3 (int, SysAddRexxMacro, CSTRING, name, CSTRING, file, OPTIONAL_CSTRING, option) | |
RexxRoutine2 (int, SysReorderRexxMacro, CSTRING, name, CSTRING, option) | |
RexxRoutine1 (int, SysDropRexxMacro, CSTRING, name) | |
RexxRoutine1 (CSTRING, SysQueryRexxMacro, CSTRING, name) | |
RexxRoutine0 (int, SysClearRexxMacroSpace) | |
RexxRoutine1 (int, SysSaveRexxMacroSpace, CSTRING, file) | |
RexxRoutine1 (int, SysLoadRexxMacroSpace, CSTRING, file) | |
size_t RexxEntry | SysMkDir (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysRmDir (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysFileDelete (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysFileSearch (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysSearchPath (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysVersion (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
RexxRoutine2 (RexxObjectPtr, SysCreateEventSem, OPTIONAL_CSTRING, name, OPTIONAL_CSTRING, reset) | |
RexxRoutine1 (uintptr_t, SysOpenEventSem, CSTRING, name) | |
RexxRoutine1 (int, SysResetEventSem, uintptr_t, vhandle) | |
RexxRoutine1 (int, SysPostEventSem, uintptr_t, vhandle) | |
RexxRoutine1 (int, SysCloseEventSem, uintptr_t, vhandle) | |
RexxRoutine2 (int, SysWaitEventSem, uintptr_t, vhandle, OPTIONAL_int, timeout) | |
RexxRoutine1 (RexxObjectPtr, SysCreateMutexSem, OPTIONAL_CSTRING, name) | |
RexxRoutine1 (uintptr_t, SysOpenMutexSem, CSTRING, name) | |
RexxRoutine2 (int, SysRequestMutexSem, uintptr_t, vhandle, OPTIONAL_int, timeout) | |
RexxRoutine1 (int, SysReleaseMutexSem, uintptr_t, vhandle) | |
RexxRoutine1 (int, SysCloseMutexSem, uintptr_t, vhandle) | |
size_t | neededSize (size_t need, size_t have) |
void | outOfMemoryException (RexxThreadContext *c) |
void | nullStringException (RexxThreadContext *c, CSTRING fName, size_t pos) |
static void | stringTooLongException (RexxThreadContext *c, CSTRING funcName, size_t pos, size_t len, size_t realLen) |
static void | badSFTOptsException (RexxThreadContext *c, size_t pos, CSTRING actual) |
static bool | increaseBuffer (RexxCallContext *c, size_t need, RXTREEDATA *treeData, TreeDataBuffers whichBuffer) |
static bool | getBiggerBuffer (RexxCallContext *c, char **dPath, size_t *nPath, size_t nStaticBuffer) |
bool | isAcceptableFile (mode_t m) |
char | typeOfEntry (mode_t m) |
bool | linFindNextFile (RexxCallContext *c, const char *fileSpec, const char *path, DIR *dir_handle, struct stat *finfo, char **d_name, bool caseless) |
bool | linFindNextDir (RexxCallContext *c, const char *fileSpec, const char *path, DIR *dir_handle, struct stat *finfo, char **d_name, bool caseless) |
static bool | goodOpts (RexxCallContext *c, CSTRING opts, uint32_t *pOpts) |
static bool | getOptionsFromArg (RexxCallContext *context, CSTRING opts, uint32_t *options, size_t argPos) |
static bool | getFileSpecFromArg (RexxCallContext *context, CSTRING fSpec, char *fileSpec, size_t bufLen, size_t argPos) |
static bool | getFileNameSegment (RexxCallContext *c, char *fileSpec, RXTREEDATA *treeData, int *lastSlashPos) |
static bool | getPathSegment (RexxCallContext *c, char *fileSpec, char **path, size_t *pathLen, int lastSlashPos) |
static bool | getPath (RexxCallContext *c, char *fileSpec, char **path, size_t *pathLen, RXTREEDATA *treeData) |
bool | formatFile (RexxCallContext *c, RXTREEDATA *treeData, uint32_t options, struct stat *finfo) |
static bool | recursiveFindFile (RexxCallContext *c, const char *path, RXTREEDATA *treeData, uint32_t options) |
void | initTreeData (RXTREEDATA *treeData, RexxStemObject files) |
void | uninitTreeData (RXTREEDATA *treeData) |
RexxRoutine5 (uint32_t, SysFileTree, CSTRING, fSpec, RexxStemObject, files, OPTIONAL_CSTRING, opts, OPTIONAL_CSTRING, targetAttr, OPTIONAL_CSTRING, newAttr) | |
size_t RexxEntry | SysTempFileName (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysSetPriority (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysGetMessage (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysGetMessageX (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysGetKey (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysFork (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysWait (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysCreatePipe (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysDumpVariables (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysGetFileDateTime (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysSetFileDateTime (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | RexxStemSort (const char *stemname, int order, int type, size_t start, size_t end, size_t firstcol, size_t lastcol) |
size_t RexxEntry | SysStemSort (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
RexxRoutine3 (int, SysStemDelete, RexxStemObject, toStem, stringsize_t, start, OPTIONAL_stringsize_t, count) | |
RexxRoutine3 (int, SysStemInsert, RexxStemObject, toStem, stringsize_t, position, RexxObjectPtr, newValue) | |
RexxRoutine6 (int, SysStemCopy, RexxStemObject, fromStem, RexxStemObject, toStem, OPTIONAL_stringsize_t, from, OPTIONAL_stringsize_t, to, OPTIONAL_stringsize_t, count, OPTIONAL_CSTRING, option) | |
size_t RexxEntry | SysQueryProcess (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysGetErrortext (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
size_t RexxEntry | SysUtilVersion (const char *name, size_t numargs, CONSTRXSTRING args[], const char *queuename, PRXSTRING retstr) |
bool | SamePaths (CSTRING path1, CSTRING path2) |
char * | TemporaryFilename (CSTRING filename, int &errInfo) |
int | CopyFile_DereferenceSymbolicLinks (CSTRING fromFile, CSTRING toFile, bool preserveTimestamps, bool preserveMode, bool *timestampsPreserved=NULL, bool *modePreserved=NULL) |
int | CopyFile_DontDereferenceSymbolicLinks (CSTRING fromFile, CSTRING toFile, bool force, bool preserveTimestamps, bool preserveMode, bool *timestampsPreserved=NULL, bool *modePreserved=NULL) |
RexxRoutine2 (int, SysFileCopy, CSTRING, fromFile, CSTRING, toFile) | |
int | MoveFile (CSTRING fromFile, CSTRING toFile) |
RexxRoutine2 (int, SysFileMove, CSTRING, fromFile, CSTRING, toFile) | |
RexxRoutine1 (logical_t, SysIsFile, CSTRING, filename) | |
RexxRoutine1 (logical_t, SysIsFileDirectory, CSTRING, filename) | |
RexxRoutine1 (logical_t, SysIsFileLink, CSTRING, filename) | |
RexxRoutine1 (logical_t, SysFileExists, CSTRING, filename) | |
OOREXX_GET_PACKAGE (rexxutil) | |
Variables | |
struct termios | in_orig |
RexxRoutineEntry | rexxutil_routines [] |
RexxPackageEntry | rexxutil_package_entry |
#define ARCCOSINE 1 /* functions. Ordering is */ |
Definition at line 294 of file unix/rexxutil.cpp.
#define ARCSINE 0 /* defines for arc trig */ |
Definition at line 293 of file unix/rexxutil.cpp.
#define ARCTANGENT 2 /* not as important here */ |
Definition at line 295 of file unix/rexxutil.cpp.
#define BUILDRXSTRING | ( | t, | |
s | |||
) |
Definition at line 348 of file unix/rexxutil.cpp.
#define CASELESS 0x0080 |
Definition at line 372 of file unix/rexxutil.cpp.
#define CH_CR '\r' /* carriage return character */ |
Definition at line 266 of file unix/rexxutil.cpp.
#define CH_EOF 0x1A /* end of file marker */ |
Definition at line 265 of file unix/rexxutil.cpp.
#define CH_NL '\n' /* new line character */ |
Definition at line 267 of file unix/rexxutil.cpp.
#define COSINE 3 /* the ordering is important, */ |
Definition at line 289 of file unix/rexxutil.cpp.
#define COTANGENT 2 /* depending on the angle */ |
Definition at line 291 of file unix/rexxutil.cpp.
#define CURRENT_DIR_FIRST 0 /* search flag 'C' */ |
Definition at line 270 of file unix/rexxutil.cpp.
#define DEFAULT_PRECISION 9 /* default precision to use */ |
Definition at line 304 of file unix/rexxutil.cpp.
#define DEGREES 'D' /* degrees option */ |
Definition at line 300 of file unix/rexxutil.cpp.
#define discard_input | ( | a | ) | tcflush(a,TCIFLUSH) /* simple flush */ |
Definition at line 382 of file unix/rexxutil.cpp.
#define DO_DIRS 0x0004 |
Definition at line 367 of file unix/rexxutil.cpp.
#define DO_FILES 0x0008 |
Definition at line 368 of file unix/rexxutil.cpp.
#define EDITABLE_TIME 0x0020 |
Definition at line 370 of file unix/rexxutil.cpp.
#define ENVIRONMENT_ONLY 1 /* search flag 'N' */ |
Definition at line 271 of file unix/rexxutil.cpp.
#define ERROR_FILEOPEN "3" /* Error opening text file */ |
Definition at line 315 of file unix/rexxutil.cpp.
#define ERROR_NOMEM "2" /* Insufficient memory */ |
Definition at line 314 of file unix/rexxutil.cpp.
#define ERROR_RETSTR "ERROR:" |
Definition at line 321 of file unix/rexxutil.cpp.
#define FILEATTR_BUF_LEN 16 |
Definition at line 281 of file unix/rexxutil.cpp.
#define FILETIME_BUF_LEN 64 |
Definition at line 280 of file unix/rexxutil.cpp.
#define FNAMESPEC_BUF_LEN IBUF_LEN |
Definition at line 278 of file unix/rexxutil.cpp.
#define FOUNDFILE_BUF_LEN IBUF_LEN |
Definition at line 279 of file unix/rexxutil.cpp.
#define FOUNDFILELINE_BUF_LEN FOUNDFILE_BUF_LEN + FILETIME_BUF_LEN + FILEATTR_BUF_LEN |
Definition at line 282 of file unix/rexxutil.cpp.
#define GRADES 'G' /* grades option */ |
Definition at line 302 of file unix/rexxutil.cpp.
#define gtty | ( | a, | |
b | |||
) | (void)tcgetattr(a,b) /* simple get attr. */ |
Definition at line 381 of file unix/rexxutil.cpp.
#define IBUF_LEN 4096 /* Input buffer length */ |
Definition at line 269 of file unix/rexxutil.cpp.
#define IGNORE 2 /* Ignore attributes entirely */ |
Definition at line 373 of file unix/rexxutil.cpp.
#define INVALID_ROUTINE 40 |
Definition at line 327 of file unix/rexxutil.cpp.
#define INVALID_ROUTINE 40 /* Raise Rexx error */ |
Definition at line 327 of file unix/rexxutil.cpp.
#define LONG_TIME 0x0040 |
Definition at line 371 of file unix/rexxutil.cpp.
#define MAX 256 /* temporary buffer length */ |
Definition at line 268 of file unix/rexxutil.cpp.
#define MAX_DIGITS 9 |
Definition at line 259 of file unix/rexxutil.cpp.
#define MAX_LINE_LEN 4096 /* max line length */ |
Definition at line 263 of file unix/rexxutil.cpp.
#define MAX_PRECISION 16 /* maximum available precision*/ |
Definition at line 305 of file unix/rexxutil.cpp.
#define MAX_READ 0x10000 /* full segment of buffer */ |
Definition at line 264 of file unix/rexxutil.cpp.
#define MAXTRIG 3 /* value */ |
Definition at line 292 of file unix/rexxutil.cpp.
#define MAXUSECOUNT 65535 /* max semaphore usecount */ |
Definition at line 274 of file unix/rexxutil.cpp.
#define NAME_ONLY 0x0010 |
Definition at line 369 of file unix/rexxutil.cpp.
#define NO_UTIL_ERROR "0" /* No error whatsoever */ |
Definition at line 313 of file unix/rexxutil.cpp.
#define NO_UTIL_ERROR "0" /* No error whatsoever */ |
Definition at line 313 of file unix/rexxutil.cpp.
#define OFFSET 1000 /* needed to prevent collision*/ |
Definition at line 272 of file unix/rexxutil.cpp.
#define pi 3.14159265358979323846l /* pi value */ |
Definition at line 298 of file unix/rexxutil.cpp.
#define RADIANS 'R' /* radians option */ |
Definition at line 301 of file unix/rexxutil.cpp.
#define RECURSE 0x0002 |
Definition at line 366 of file unix/rexxutil.cpp.
#define restore_tty | ( | a | ) | stty(ttyfd,a) /* new settings STDIN */ |
Definition at line 383 of file unix/rexxutil.cpp.
#define RETVAL | ( | retc | ) |
Definition at line 356 of file unix/rexxutil.cpp.
#define REXXMESSAGEFILE "rexx.cat" |
Definition at line 275 of file unix/rexxutil.cpp.
#define SEM_WAIT_PERIOD 100 /* POSIX says this should be 10ms */ |
Definition at line 1985 of file unix/rexxutil.cpp.
#define SINE 0 /* trig function defines... */ |
Definition at line 288 of file unix/rexxutil.cpp.
#define SORT_ASCENDING 0 |
Definition at line 337 of file unix/rexxutil.cpp.
#define SORT_CASEIGNORE 1 |
Definition at line 334 of file unix/rexxutil.cpp.
#define SORT_CASESENSITIVE 0 |
Definition at line 333 of file unix/rexxutil.cpp.
#define SORT_DECENDING 1 |
Definition at line 338 of file unix/rexxutil.cpp.
#define SORT_DEF_AVG_SIZE 20 |
Definition at line 342 of file unix/rexxutil.cpp.
#define SORT_NUMERIC 3 |
Definition at line 340 of file unix/rexxutil.cpp.
#define stty | ( | a, | |
b | |||
) | (void)tcsetattr(a,TCSANOW,b) /* simple set attr. */ |
Definition at line 380 of file unix/rexxutil.cpp.
#define TANGENT 1 /* as these get transformed */ |
Definition at line 290 of file unix/rexxutil.cpp.
#define VALID_ROUTINE 0 /* Successful completion */ |
Definition at line 328 of file unix/rexxutil.cpp.
#define VALID_ROUTINE 0 /* Successful completion */ |
Definition at line 328 of file unix/rexxutil.cpp.
typedef struct _GetFileData GetFileData |
typedef struct RxStemData RXSTEMDATA |
typedef struct RxTreeData RXTREEDATA |
enum TreeDataBuffers |
Enumerator | |
---|---|
FILESPEC_BUFFER | |
FOUNDFILE_BUFFER | |
FOUNDFILELINE_BUFFER |
Definition at line 2233 of file unix/rexxutil.cpp.
|
static |
This is a SysFileTree specific function.
c | |
pos | |
actual |
Definition at line 2302 of file unix/rexxutil.cpp.
References Rexx_Error_Incorrect_call_user_defined.
Referenced by getOptionsFromArg().
void CloseFile | ( | GetFileData * | filedata | ) |
Definition at line 641 of file unix/rexxutil.cpp.
References _GetFileData::buffer, and _GetFileData::handle.
Referenced by SysFileSearch().
int CopyFile_DereferenceSymbolicLinks | ( | CSTRING | fromFile, |
CSTRING | toFile, | ||
bool | preserveTimestamps, | ||
bool | preserveMode, | ||
bool * | timestampsPreserved = NULL , |
||
bool * | modePreserved = NULL |
||
) |
Definition at line 5485 of file unix/rexxutil.cpp.
References AutoClose::close(), IBUF_LEN, and SamePaths().
Referenced by CopyFile_DontDereferenceSymbolicLinks(), and RexxRoutine2().
int CopyFile_DontDereferenceSymbolicLinks | ( | CSTRING | fromFile, |
CSTRING | toFile, | ||
bool | force, | ||
bool | preserveTimestamps, | ||
bool | preserveMode, | ||
bool * | timestampsPreserved = NULL , |
||
bool * | modePreserved = NULL |
||
) |
Definition at line 5541 of file unix/rexxutil.cpp.
References CopyFile_DereferenceSymbolicLinks(), SamePaths(), and TemporaryFilename().
Referenced by MoveFile().
bool formatFile | ( | RexxCallContext * | c, |
RXTREEDATA * | treeData, | ||
uint32_t | options, | ||
struct stat * | finfo | ||
) |
This is a SysFileTree() specific function..
Formats a found file entry according to the specified options and adds it to the stem containing the found files.
c | Call context we are operating in. |
treeData | Struct with data related to finding the files. |
options | Options specifying how the found file line is to be formatted. |
finfo | File info structure. |
We use the buffers in the treeData structure to format the found file line. snprintf() is used to prevent and detect buffer overflows. We start off trying to use the large static buffers in the struct, each time a buffer is found to be too small in size, it is doubled in size by dynamically allocated memory.. Code at the top level detects and frees any allocated memory.
Note that we can count the characters used for both the time data and attribute data, so we know the buffers are large enough.
If the file search is a very deep recursion in the host file system, a very large number of String objects may be created in the single Call context of SysFileTree. A reference to each created object is saved in a hash table to protect it from garbage collection, which can lead to a very large hash table. To prevent the creation of a very large hash table, we create a temp object, pass that object to the interpreter, and then tell the interpreter the object no longer needs to be protected in this call context.
Definition at line 3128 of file unix/rexxutil.cpp.
References RxTreeData::count, RxTreeData::dFoundFile, RxTreeData::dFoundFileLine, EDITABLE_TIME, RxTreeData::fileAttr, RxTreeData::files, RxTreeData::fileTime, RxTreeData::foundFile, RxTreeData::foundFileLine, FOUNDFILELINE_BUFFER, increaseBuffer(), LONG_TIME, NAME_ONLY, RxTreeData::nFoundFile, RxTreeData::nFoundFileLine, and typeOfEntry().
Referenced by recursiveFindFile().
int get_next_path | ( | char ** | ppenv, |
char * | path_buf | ||
) |
Definition at line 837 of file unix/rexxutil.cpp.
References MAX_LINE_LEN.
Referenced by SearchPath().
|
static |
Allocates a buffer twice as big as the buffer passed in.
c | Call context we are operating in. |
dPath | Pointer to the buffer to reallocate |
nPath | Size of dPath buffer. |
nStaticBuffer | Size of original static buffer. |
Definition at line 2398 of file unix/rexxutil.cpp.
References outOfMemoryException(), and RexxCallContext_::threadContext.
Referenced by getPathSegment(), linFindNextFile(), and recursiveFindFile().
|
static |
Used to retrieve the file name portion of the search file specification the user sent to SysFileTree.
c | |
fileSpec | |
treeData | |
lastSlashPos |
Definition at line 2857 of file unix/rexxutil.cpp.
References RxTreeData::dFNameSpec, FILESPEC_BUFFER, increaseBuffer(), and RxTreeData::nFNameSpec.
Referenced by getPath().
|
static |
Checks the file specification as input by the user for validity and expands / redoes the value if needed. For example if the the specification starts with the ~ character, the file spec is expanded to include the full path to the home directory.
context | Call context we are operating in. |
fSpec | The file specification as passed by the user. Can not be the empty string and must be 494 chars or less. |
fileSpec | Buffer to contain the expanded file specification. At this time the buffer is 4096 in length, which seems more than sufficient. However, we check the length when copying into it anyway. |
bufLen | Length of fileSpec buffer. |
argPos | Argument position, use for raising conditions. |
Definition at line 2794 of file unix/rexxutil.cpp.
References nullStringException(), outOfMemoryException(), resolve_tilde(), stringTooLongException(), and RexxCallContext_::threadContext.
Referenced by RexxRoutine5().
int getkey | ( | char * | ret, |
bool | echo | ||
) |
Definition at line 998 of file unix/rexxutil.cpp.
References gtty, in_orig, restore_terminal(), restore_tty, and stty.
Referenced by SysGetKey().
int GetLine | ( | char * | line, |
size_t | size, | ||
GetFileData * | filedata | ||
) |
Definition at line 658 of file unix/rexxutil.cpp.
References CH_CR, CH_NL, _GetFileData::data, line, ReadNextBuffer(), _GetFileData::residual, and _GetFileData::scan.
Referenced by SysFileSearch().
|
static |
This is a SysFileTree specific helper function.
Checks the validity of the options argument to SysFileTree, sets the default options, and converts the character based argument to the proper set of flags.
context | |
opts | |
options | |
argPos |
Definition at line 2744 of file unix/rexxutil.cpp.
References argumentExists, badSFTOptsException(), DO_DIRS, DO_FILES, goodOpts(), nullStringException(), and RexxCallContext_::threadContext.
Referenced by RexxRoutine5().
|
static |
This is a SysFileTree() specific function..
This function expands the file spec passed in to the function into its full path name. The full path name is then split into the path portion and the file name portion. The path portion is returned in path and the file name portion is returned in the RXTREEDATA structure.
The path portion will end with the '\' character.
c | Call context we are operating in. |
fSpec | File specification to search for. |
path | Pointer to the buffer for the returned full path of expanded file specification. This buffer may be reallocated if it is not big enough |
pathLen | Pointer to the size of the passed in path buffer. This value will be reset if the path buffer is reallocated. |
treeData | The file name portion of the full path is copied into the dFNameSpec field in this struct. |
Definition at line 3058 of file unix/rexxutil.cpp.
References getFileNameSegment(), and getPathSegment().
Referenced by RexxRoutine5().
|
static |
c | |
fileSpec | |
path | |
pathLen | |
lastSlashPos |
Definition at line 2923 of file unix/rexxutil.cpp.
References FOUNDFILE_BUF_LEN, getBiggerBuffer(), neededSize(), outOfMemoryException(), and RexxCallContext_::threadContext.
Referenced by getPath().
|
static |
This is a SysFileTree specific function.
Determines the options by converting the character based argument to the correct set of flags.
c | |
opts | |
pOpts |
Definition at line 2677 of file unix/rexxutil.cpp.
References CASELESS, DO_DIRS, DO_FILES, EDITABLE_TIME, LONG_TIME, NAME_ONLY, and RECURSE.
Referenced by getOptionsFromArg().
|
static |
Dynamically allocates memory for a buffer in the RXTREEDATA structure so that it is bigger than the size specified.
need | The allocated buffer size must be greater than this. |
treeData | Pointer to the RXTREEDATA struct. |
whichBuffer | Identifies the buffer to increase. |
It is unlikely, but possible, that a static buffer will be too small. If this happens, we double the size of the buffer until it is large enough by allocating a new buffer.
Definition at line 2330 of file unix/rexxutil.cpp.
References RxTreeData::dFNameSpec, RxTreeData::dFoundFile, RxTreeData::dFoundFileLine, FILESPEC_BUFFER, FNAMESPEC_BUF_LEN, FOUNDFILE_BUF_LEN, FOUNDFILE_BUFFER, FOUNDFILELINE_BUFFER, neededSize(), RxTreeData::nFNameSpec, RxTreeData::nFoundFile, RxTreeData::nFoundFileLine, outOfMemoryException(), and RexxCallContext_::threadContext.
Referenced by formatFile(), getFileNameSegment(), and recursiveFindFile().
|
inline |
Intializes the RXTREEDATA struct at start up of SysFileTree()
treeData | |
files |
Definition at line 3446 of file unix/rexxutil.cpp.
References RxTreeData::dFNameSpec, RxTreeData::dFoundFile, RxTreeData::dFoundFileLine, RxTreeData::files, RxTreeData::fNameSpec, FNAMESPEC_BUF_LEN, RxTreeData::foundFile, FOUNDFILE_BUF_LEN, RxTreeData::foundFileLine, FOUNDFILELINE_BUF_LEN, RxTreeData::nFNameSpec, RxTreeData::nFoundFile, and RxTreeData::nFoundFileLine.
Referenced by RexxRoutine5().
|
inline |
This is a SysFileTree specific function.
Test if struct stat.st_mode field is a file for the purpose of SysFileTree.
m |
Definition at line 2426 of file unix/rexxutil.cpp.
Referenced by linFindNextFile().
bool linFindNextDir | ( | RexxCallContext * | c, |
const char * | fileSpec, | ||
const char * | path, | ||
DIR * | dir_handle, | ||
struct stat * | finfo, | ||
char ** | d_name, | ||
bool | caseless | ||
) |
This is a SysFileTree specific function.
Find the next directory in the directory pointed to by dir_handle that matches fileSpec. The needed information is returnd in finfo and d_name.
fileSpec | Search specification. |
path | Current path we are searching. |
dir_handle | Directory handle. |
finfo | Returned file info buffer. |
d_name | Returned name of the directory found. |
caseless | Do case insensitive matching, or not. |
Definition at line 2590 of file unix/rexxutil.cpp.
References FOUNDFILE_BUF_LEN, IBUF_LEN, neededSize(), outOfMemoryException(), and RexxCallContext_::threadContext.
Referenced by recursiveFindFile().
bool linFindNextFile | ( | RexxCallContext * | c, |
const char * | fileSpec, | ||
const char * | path, | ||
DIR * | dir_handle, | ||
struct stat * | finfo, | ||
char ** | d_name, | ||
bool | caseless | ||
) |
This is a SysFileTree specific function.
Find the next file in the directory pointed to by dir_handle that matches fileSpec. The needed information is returnd in finfo and d_name.
fileSpec | Search specification. |
path | Current path we are searching. |
dir_handle | Directory handle. |
finfo | Returned file info buffer. |
d_name | Returned name of the file found |
caseless | Do case insensitive matching, or not. |
Definition at line 2486 of file unix/rexxutil.cpp.
References getBiggerBuffer(), IBUF_LEN, isAcceptableFile(), outOfMemoryException(), and RexxCallContext_::threadContext.
Referenced by recursiveFindFile().
Definition at line 5620 of file unix/rexxutil.cpp.
References CopyFile_DontDereferenceSymbolicLinks(), SamePaths(), and TemporaryFilename().
Referenced by RexxRoutine2().
const char* mystrstr | ( | const char * | haystack, |
const char * | needle, | ||
size_t | hlen, | ||
size_t | nlen, | ||
bool | sensitive | ||
) |
Definition at line 785 of file unix/rexxutil.cpp.
References line, and MAX_LINE_LEN.
Referenced by SysFileSearch().
|
inline |
Returns a value that is greater than 'need' by doubling 'have' until that value is reached.
Definition at line 2244 of file unix/rexxutil.cpp.
Referenced by getPathSegment(), increaseBuffer(), and linFindNextDir().
|
inline |
<routineName> argument <argPos> must not be a null string
SysFileTree argument 2 must not be a null string
c | Threade context we are operating in. |
fName | Routine name. |
pos | Argument position. |
Definition at line 2267 of file unix/rexxutil.cpp.
References Rexx_Error_Incorrect_call_null.
Referenced by getFileSpecFromArg(), and getOptionsFromArg().
OOREXX_GET_PACKAGE | ( | rexxutil | ) |
int OpenFile | ( | const char * | file, |
GetFileData * | filedata | ||
) |
Definition at line 580 of file unix/rexxutil.cpp.
References _GetFileData::buffer, CH_EOF, _GetFileData::data, _GetFileData::handle, MAX_READ, ReadNextBuffer(), _GetFileData::residual, _GetFileData::scan, and _GetFileData::size.
Referenced by SysFileSearch().
|
inline |
Definition at line 2253 of file unix/rexxutil.cpp.
References Rexx_Error_System_service_user_defined.
Referenced by getBiggerBuffer(), getFileSpecFromArg(), getPathSegment(), increaseBuffer(), linFindNextDir(), and linFindNextFile().
bool ReadNextBuffer | ( | GetFileData * | filedata | ) |
Reads the next buffer of data.
filedata | Global file information. |
Definition at line 530 of file unix/rexxutil.cpp.
References _GetFileData::buffer, CH_EOF, _GetFileData::data, _GetFileData::handle, MAX_READ, _GetFileData::residual, and _GetFileData::scan.
Referenced by GetLine(), and OpenFile().
|
static |
Finds all files matching treeData->fNameSpec starting path, recursing into sub-directories if requested.
c | Call context we are operating in. |
path | Path to the directory to start in. |
treeData | Struct containing data pertaining to the search and used to return the found files. |
options | Options defining the search. Some comination of the following. |
RECURSE - Indicates that function should search all child subdirectories recursively. DO_DIRS - Indicates that directories should be included in the search. DO_FILES - Indicates that files should be included in the search. NAME_ONLY - Indicates that the output should be restricted to matched file names only. EDITABLE_TIME - Indicates time and date fields should be output as one timestamp. LONG_TIME - Indicates time and date fields should be output as one long formatted timestamp CASELESS - Indicates do a case insensitive check for file names.
snprintf() note:
snprintf() doe not write more than size bytes (including the terminating null byte ('\0')). If the output was truncated due to this limit then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated.
Therefore, unlike windows, there is no possibility of having an unterminated string. If we detect that the buffers in use are too small, rather than truncate data, we allocate dynamic memory that is big enough. Actually we allocate a buffer twice as big as the current buffer.
We start with big static buffers, so we need to keep track of whether memory was allocated or not. This is done by tracking the size of the buffers. If a buffer size does not equal the original size of the static buffer, then it needs to be freed.
Definition at line 3286 of file unix/rexxutil.cpp.
References CASELESS, RxTreeData::dFNameSpec, RxTreeData::dFoundFile, DO_DIRS, DO_FILES, formatFile(), FOUNDFILE_BUF_LEN, FOUNDFILE_BUFFER, getBiggerBuffer(), increaseBuffer(), linFindNextDir(), linFindNextFile(), RxTreeData::nFoundFile, and RECURSE.
Referenced by RexxRoutine5().
char* resolve_tilde | ( | const char * | path | ) |
Definition at line 144 of file unix/ExternalFunctions.cpp.
Referenced by getFileSpecFromArg(), RexxRoutine1(), SysFileDelete(), SysFileSearch(), SysGetFileDateTime(), SysMkDir(), SysRmDir(), and SysSetFileDateTime().
void restore_terminal | ( | int | signal | ) |
Definition at line 986 of file unix/rexxutil.cpp.
Referenced by getkey().
RexxRoutine0 | ( | int | , |
SysClearRexxMacroSpace | |||
) |
Definition at line 1294 of file unix/rexxutil.cpp.
References RexxClearMacroSpace().
Definition at line 1265 of file unix/rexxutil.cpp.
References RexxQueryMacro(), and RXMACRO_SEARCH_BEFORE.
RexxRoutine1 | ( | int | , |
SysCloseEventSem | , | ||
uintptr_t | , | ||
vhandle | |||
) |
Definition at line 1954 of file unix/rexxutil.cpp.
References RxSemData::handle, and RxSemData::named.
RexxRoutine1 | ( | int | , |
SysCloseMutexSem | , | ||
uintptr_t | , | ||
vhandle | |||
) |
Definition at line 2195 of file unix/rexxutil.cpp.
References RxSemData::handle, and RxSemData::named.
RexxRoutine1 | ( | int | , |
SysDropRexxMacro | , | ||
CSTRING | , | ||
name | |||
) |
Definition at line 1250 of file unix/rexxutil.cpp.
References RexxDropMacro().
RexxRoutine1 | ( | int | , |
SysLoadRexxMacroSpace | , | ||
CSTRING | , | ||
file | |||
) |
Definition at line 1324 of file unix/rexxutil.cpp.
References RexxLoadMacroSpace().
RexxRoutine1 | ( | int | , |
SysPostEventSem | , | ||
uintptr_t | , | ||
vhandle | |||
) |
Definition at line 1931 of file unix/rexxutil.cpp.
References RxSemData::handle.
RexxRoutine1 | ( | int | , |
SysReleaseMutexSem | , | ||
uintptr_t | , | ||
vhandle | |||
) |
Definition at line 2159 of file unix/rexxutil.cpp.
References RxSemData::handle.
RexxRoutine1 | ( | int | , |
SysResetEventSem | , | ||
uintptr_t | , | ||
vhandle | |||
) |
Definition at line 1912 of file unix/rexxutil.cpp.
References RxSemData::handle.
RexxRoutine1 | ( | int | , |
SysSaveRexxMacroSpace | , | ||
CSTRING | , | ||
file | |||
) |
Definition at line 1309 of file unix/rexxutil.cpp.
References RexxSaveMacroSpace().
RexxRoutine1 | ( | int | , |
SysSleep | , | ||
RexxStringObject | , | ||
delay | |||
) |
Definition at line 1072 of file unix/rexxutil.cpp.
References isnan, Rexx_Error_Invalid_argument_number, and Rexx_Error_Invalid_argument_range.
Definition at line 5718 of file unix/rexxutil.cpp.
Definition at line 5663 of file unix/rexxutil.cpp.
Definition at line 5682 of file unix/rexxutil.cpp.
Definition at line 5700 of file unix/rexxutil.cpp.
RexxRoutine1 | ( | RexxObjectPtr | , |
SysCreateMutexSem | , | ||
OPTIONAL_CSTRING | , | ||
name | |||
) |
Definition at line 2045 of file unix/rexxutil.cpp.
References RxSemData::handle, and RxSemData::named.
Definition at line 1885 of file unix/rexxutil.cpp.
References RxSemData::handle, and RxSemData::named.
Definition at line 2088 of file unix/rexxutil.cpp.
References RxSemData::handle, and RxSemData::named.
Definition at line 5603 of file unix/rexxutil.cpp.
References CopyFile_DereferenceSymbolicLinks().
Definition at line 5648 of file unix/rexxutil.cpp.
References MoveFile().
Definition at line 1217 of file unix/rexxutil.cpp.
References RexxReorderMacro(), RXMACRO_SEARCH_AFTER, and RXMACRO_SEARCH_BEFORE.
RexxRoutine2 | ( | int | , |
SysRequestMutexSem | , | ||
uintptr_t | , | ||
vhandle | , | ||
OPTIONAL_int | , | ||
timeout | |||
) |
Definition at line 2115 of file unix/rexxutil.cpp.
References RxSemData::handle, and SEM_WAIT_PERIOD.
RexxRoutine2 | ( | int | , |
SysWaitEventSem | , | ||
uintptr_t | , | ||
vhandle | , | ||
OPTIONAL_int | , | ||
timeout | |||
) |
Definition at line 1998 of file unix/rexxutil.cpp.
References RxSemData::handle, and SEM_WAIT_PERIOD.
RexxRoutine2 | ( | RexxObjectPtr | , |
SysCreateEventSem | , | ||
OPTIONAL_CSTRING | , | ||
name | , | ||
OPTIONAL_CSTRING | , | ||
reset | |||
) |
Definition at line 1842 of file unix/rexxutil.cpp.
References RxSemData::handle, and RxSemData::named.
RexxRoutine3 | ( | int | , |
SysAddRexxMacro | , | ||
CSTRING | , | ||
name | , | ||
CSTRING | , | ||
file | , | ||
OPTIONAL_CSTRING | , | ||
option | |||
) |
Definition at line 1178 of file unix/rexxutil.cpp.
References RexxAddMacro(), RXMACRO_SEARCH_AFTER, and RXMACRO_SEARCH_BEFORE.
RexxRoutine3 | ( | int | , |
SysStemDelete | , | ||
RexxStemObject | , | ||
toStem | , | ||
stringsize_t | , | ||
start | , | ||
OPTIONAL_stringsize_t | , | ||
count | |||
) |
Definition at line 4944 of file unix/rexxutil.cpp.
References argumentOmitted, and NULLOBJECT.
RexxRoutine3 | ( | int | , |
SysStemInsert | , | ||
RexxStemObject | , | ||
toStem | , | ||
stringsize_t | , | ||
position | , | ||
RexxObjectPtr | , | ||
newValue | |||
) |
Definition at line 5007 of file unix/rexxutil.cpp.
References NULLOBJECT.
RexxRoutine5 | ( | uint32_t | , |
SysFileTree | , | ||
CSTRING | , | ||
fSpec | , | ||
RexxStemObject | , | ||
files | , | ||
OPTIONAL_CSTRING | , | ||
opts | , | ||
OPTIONAL_CSTRING | , | ||
targetAttr | , | ||
OPTIONAL_CSTRING | , | ||
newAttr | |||
) |
SysFileTree() implementation. Searches for files in a directory tree.
fSpec | [required] The search pattern, may contain glob characters. E.g., .sh |
files | [required] A stem to contain the returned results. |
opts | [optional] Any combination of the following: 'B' - Search for files and directories. 'D' - Search for directories only. 'F' - Search for files only. 'O' - Only output file names. 'S' - Recursively scan subdirectories. 'T' - Combine time & date fields into one. 'L' - Long time format 'I' - Case Insensitive search. |
targetAttr | [optional] Target attribute mask. This is not used in the Unix version of SysFileTree(), was never used. But, the doc never noted that fact. It is left here to avoid breaking any program that may have used it. |
newAttr | [optional] New attribute mask. This is not used in the Unix version of SysFileTree(), was never used. But, the doc never noted that fact. It is left here to avoid breaking any program that may have used it. |
Definition at line 3518 of file unix/rexxutil.cpp.
References CASELESS, RxTreeData::count, RxTreeData::files, RxTreeData::fNameSpec, FNAMESPEC_BUF_LEN, FOUNDFILE_BUF_LEN, getFileSpecFromArg(), getOptionsFromArg(), getPath(), initTreeData(), recursiveFindFile(), and uninitTreeData().
RexxRoutine6 | ( | int | , |
SysStemCopy | , | ||
RexxStemObject | , | ||
fromStem | , | ||
RexxStemObject | , | ||
toStem | , | ||
OPTIONAL_stringsize_t | , | ||
from | , | ||
OPTIONAL_stringsize_t | , | ||
to | , | ||
OPTIONAL_stringsize_t | , | ||
count | , | ||
OPTIONAL_CSTRING | , | ||
option | |||
) |
Definition at line 5062 of file unix/rexxutil.cpp.
References argumentExists, argumentOmitted, and NULLOBJECT.
size_t RexxEntry RexxStemSort | ( | const char * | stemname, |
int | order, | ||
int | type, | ||
size_t | start, | ||
size_t | end, | ||
size_t | firstcol, | ||
size_t | lastcol | ||
) |
Process a stemsort call for the rexxutil SysStemSort function.
stemname | The name of the stem. |
order | The sort order. |
type | The type of sort (case sensitivity). |
start | The starting element number. |
end | The end element number. |
firstcol | The first sort column. |
lastcol | The last sort column. |
Definition at line 413 of file InterpreterAPI.cpp.
Referenced by SysStemSort().
Definition at line 5447 of file unix/rexxutil.cpp.
Referenced by CopyFile_DereferenceSymbolicLinks(), CopyFile_DontDereferenceSymbolicLinks(), and MoveFile().
int SearchPath | ( | int | SearchFlag, |
const char * | path, | ||
const char * | filename, | ||
char * | buf, | ||
size_t | buf_size | ||
) |
Definition at line 869 of file unix/rexxutil.cpp.
References get_next_path(), and IBUF_LEN.
Referenced by SysFileSystem::searchPath(), SysSearchPath(), and systemCommandHandler().
bool string2int | ( | const char * | string, |
int * | number | ||
) |
Definition at line 951 of file unix/rexxutil.cpp.
References MAX_DIGITS.
Referenced by SysGetMessage(), SysGetMessageX(), SysMkDir(), and SysSetPriority().
bool string2size_t | ( | const char * | string, |
size_t * | number | ||
) |
Definition at line 485 of file unix/rexxutil.cpp.
References MAX_DIGITS.
Referenced by SysStemSort().
|
static |
<routineName>() argument <argPos> must be less than <len> characters in length; length is <realLen>
SysFileTree() argument 2 must be less than 4095 characters in length; length is 5000
Raises 88.900
c | Thread context we are executing in. |
pos | Argumet position |
len | Fixed length |
realLen | Actual length |
Definition at line 2286 of file unix/rexxutil.cpp.
References Rexx_Error_Incorrect_call_user_defined.
Referenced by getFileSpecFromArg().
void strupr | ( | char * | string | ) |
Definition at line 564 of file unix/rexxutil.cpp.
Referenced by main(), SysFileSearch(), and SysSearchPath().
size_t RexxEntry SysCls | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1156 of file unix/rexxutil.cpp.
References BUILDRXSTRING, INVALID_ROUTINE, NO_UTIL_ERROR, and VALID_ROUTINE.
size_t RexxEntry SysCreatePipe | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4516 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysDropFuncs | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1140 of file unix/rexxutil.cpp.
References _RXSTRING::strlength, and VALID_ROUTINE.
size_t RexxEntry SysDumpVariables | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4569 of file unix/rexxutil.cpp.
References INVALID_ROUTINE, RETVAL, RexxFreeMemory(), RexxVariablePool(), RXSHV_LVAR, RXSHV_NEXTV, RXSHV_OK, RXVALIDSTRING, _SHVBLOCK::shvcode, _SHVBLOCK::shvname, _SHVBLOCK::shvnamelen, _SHVBLOCK::shvnext, _SHVBLOCK::shvret, _SHVBLOCK::shvvalue, _SHVBLOCK::shvvaluelen, _RXSTRING::strlength, and _RXSTRING::strptr.
size_t RexxEntry SysFileDelete | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1509 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, resolve_tilde(), _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysFileSearch | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1583 of file unix/rexxutil.cpp.
References BUILDRXSTRING, CloseFile(), RxStemData::count, ERROR_FILEOPEN, GetLine(), RxStemData::ibuf, IBUF_LEN, INVALID_ROUTINE, line, MAX_LINE_LEN, mystrstr(), NO_UTIL_ERROR, OpenFile(), resolve_tilde(), RexxVariablePool(), RXSHV_BADN, RXSHV_SET, RXVALIDSTRING, RxStemData::shvb, _SHVBLOCK::shvcode, _SHVBLOCK::shvname, _SHVBLOCK::shvnamelen, _SHVBLOCK::shvnext, _SHVBLOCK::shvret, _SHVBLOCK::shvvalue, _SHVBLOCK::shvvaluelen, RxStemData::stemlen, _RXSTRING::strlength, _CONSTRXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, strupr(), VALID_ROUTINE, RxStemData::varname, and RxStemData::vlen.
size_t RexxEntry SysFork | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4465 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysGetErrortext | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 5337 of file unix/rexxutil.cpp.
References INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysGetFileDateTime | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4647 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, resolve_tilde(), RETVAL, RXVALIDSTRING, _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysGetKey | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4260 of file unix/rexxutil.cpp.
References getkey(), INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysGetMessage | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 3811 of file unix/rexxutil.cpp.
References BUILDRXSTRING, DEFRXSTRING, ERROR_NOMEM, INVALID_ROUTINE, REXXMESSAGEFILE, RXVALIDSTRING, string2int(), _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysGetMessageX | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4038 of file unix/rexxutil.cpp.
References BUILDRXSTRING, DEFRXSTRING, ERROR_NOMEM, INVALID_ROUTINE, REXXMESSAGEFILE, RXVALIDSTRING, string2int(), _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysLoadFuncs | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1124 of file unix/rexxutil.cpp.
References _RXSTRING::strlength, and VALID_ROUTINE.
size_t RexxEntry SysMkDir | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1341 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, resolve_tilde(), string2int(), _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysQueryProcess | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 5201 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysRmDir | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1423 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, resolve_tilde(), _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysSearchPath | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1720 of file unix/rexxutil.cpp.
References BUILDRXSTRING, CURRENT_DIR_FIRST, ENVIRONMENT_ONLY, IBUF_LEN, INVALID_ROUTINE, RXVALIDSTRING, SearchPath(), _CONSTRXSTRING::strptr, strupr(), and VALID_ROUTINE.
size_t RexxEntry SysSetFileDateTime | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4729 of file unix/rexxutil.cpp.
References INVALID_ROUTINE, resolve_tilde(), RETVAL, RXVALIDSTRING, and _CONSTRXSTRING::strptr.
size_t RexxEntry SysSetPriority | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 3747 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, RXVALIDSTRING, string2int(), _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysStemSort | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4830 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, RexxStemSort(), RXVALIDSTRING, SIZE_MAX, SORT_ASCENDING, SORT_CASEIGNORE, SORT_CASESENSITIVE, SORT_DECENDING, string2size_t(), _RXSTRING::strlength, _CONSTRXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysTempFileName | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 3596 of file unix/rexxutil.cpp.
References BUILDRXSTRING, ERROR_NOMEM, INVALID_ROUTINE, RXNULLSTRING, RXVALIDSTRING, _RXSTRING::strlength, _RXSTRING::strptr, _CONSTRXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysUtilVersion | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 5372 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysVersion | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 1801 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
size_t RexxEntry SysWait | ( | const char * | name, |
size_t | numargs, | ||
CONSTRXSTRING | args[], | ||
const char * | queuename, | ||
PRXSTRING | retstr | ||
) |
Definition at line 4489 of file unix/rexxutil.cpp.
References DEFRXSTRING, INVALID_ROUTINE, _RXSTRING::strlength, _RXSTRING::strptr, and VALID_ROUTINE.
char* TemporaryFilename | ( | CSTRING | filename, |
int & | errInfo | ||
) |
Definition at line 5462 of file unix/rexxutil.cpp.
Referenced by CopyFile_DontDereferenceSymbolicLinks(), and MoveFile().
|
inline |
Definition at line 2436 of file unix/rexxutil.cpp.
Referenced by formatFile().
|
inline |
Frees any allocated memory in the RXTREEDATA struct, if needed, on return from SysFileTree()
treeData |
Definition at line 3466 of file unix/rexxutil.cpp.
References RxTreeData::dFNameSpec, RxTreeData::dFoundFile, RxTreeData::dFoundFileLine, FNAMESPEC_BUF_LEN, FOUNDFILE_BUF_LEN, FOUNDFILELINE_BUF_LEN, RxTreeData::nFNameSpec, RxTreeData::nFoundFile, and RxTreeData::nFoundFileLine.
Referenced by RexxRoutine5().
struct termios in_orig |
Definition at line 256 of file unix/rexxutil.cpp.
Referenced by getkey(), and restore_terminal().
RexxPackageEntry rexxutil_package_entry |
Definition at line 5799 of file unix/rexxutil.cpp.
RexxRoutineEntry rexxutil_routines[] |
Definition at line 5732 of file unix/rexxutil.cpp.