58 #define MAX_STDOUT_LENGTH 32767
78 char resolvedName[MAX_PATH + 2];
100 if (parentExtension != NULL)
151 char fullname[MAX_PATH + 1];
159 HANDLE fileHandle = CreateFile(fullname, GENERIC_READ, FILE_SHARE_READ,
160 NULL, OPEN_EXISTING, FILE_FLAG_WRITE_THROUGH, NULL);
162 if (fileHandle == INVALID_HANDLE_VALUE)
168 ReadFile(fileHandle, imageSize,
sizeof(
size_t), &bytesRead, NULL);
171 ReadFile(fileHandle, *imageBuffer, (DWORD)*imageSize, &bytesRead, NULL);
173 *imageSize = bytesRead;
174 CloseHandle(fileHandle);
179 const char *file_name)
187 BY_HANDLE_FILE_INFORMATION status;
193 fileHandle = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ,
194 NULL, OPEN_EXISTING, FILE_FLAG_WRITE_THROUGH, NULL);
195 if (fileHandle == INVALID_HANDLE_VALUE)
200 GetFileInformationByHandle(fileHandle, &status);
202 buffersize = status.nFileSizeLow;
209 if (ReadFile(fileHandle, buffer->
getData(), (DWORD)buffersize, &bytesRead, NULL) == 0) {
212 CloseHandle(fileHandle);
227 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)
void strupr(char *string)