62 #if defined( HAVE_SYS_FILIO_H )
63 # include <sys/filio.h>
66 #include <sys/ioctl.h>
67 #include <sys/types.h>
91 char resolvedName[PATH_MAX + 3];
112 if (parentExtension != NULL)
147 char fullname[PATH_MAX + 2];
157 strcpy(fullname, ORX_CATDIR
"/rexx.img");
162 image = fopen(fullname,
"rb");
170 if (!fread(imageSize, 1,
sizeof(
size_t), image))
181 if (!(*imageSize = fread(*imageBuffer, 1, *imageSize, image)))
198 handle = fopen(file_name,
"rb");
204 fseek(handle, 0, SEEK_END);
205 buffersize = ftell(handle);
206 fseek(handle, 0, SEEK_SET);
213 readSize = fread(buffer->
getData(), 1, buffersize, handle);
216 if (readSize < buffersize)
232 memset(nameBuffer, 0,
sizeof(nameBuffer));
RexxBuffer * new_buffer(size_t s)
RexxString * new_string(const char *s, stringsize_t l)
static void logicError(const char *desc, const char *info1=NULL, size_t info2=0)
RexxList * searchExtensions
size_t nextIndex(size_t i)
RexxObject * getValue(size_t i)
char * allocateImageBuffer(size_t size)
const char * getStringData()
static bool primitiveSearchName(const char *name, const char *path, const char *extension, char *resolvedName)
static bool searchName(const char *name, const char *path, const char *extension, char *resolvedName)
static void qualifyStreamName(const char *unqualifiedName, char *qualifiedName, size_t bufferSize)
static bool hasExtension(const char *name)
InterpreterInstance * instance
RexxString * resolveProgramName(RexxString *_name, RexxString *_parentDir, RexxString *_parentExtension)
static RexxString * qualifyFileSystemName(RexxString *name)
static RexxBuffer * readProgram(const char *file_name)
static void loadImage(char **imageBuffer, size_t *imageSize)