#include "common.h"#include <io.h>#include <direct.h>#include "portable.h"Include dependency graph for oswin9x.c:

Go to the source code of this file.
Functions | |
| off_t | fileSize (char *fileName) |
| long | clock1000 () |
| long | clock1 () |
| void | uglyfBreak () |
| char * | getCurrentDir () |
| boolean | setCurrentDir (char *newDir) |
| slName * | listDir (char *dir, char *pattern) |
Variables | |
| static char const | rcsid [] = "$Id: oswin9x.c,v 1.8 2003/05/06 07:33:43 kate Exp $" |
| long clock1 | ( | ) |
| long clock1000 | ( | ) |
Definition at line 26 of file oswin9x.c.
Referenced by dnaQuery(), genoPcrDirect(), pcrQuery(), qaPageFromForm(), qaPageGet(), qaStatusOnPage(), transQuery(), transTransQuery(), and uglyTime().
00028 { 00029 return clock() /* 1000/CLOCKS_PER_SEC */; /* CLOCKS_PER_SEC == 1000 for windows */ 00030 }
Here is the caller graph for this function:

| off_t fileSize | ( | char * | fileName | ) |
Definition at line 14 of file oswin9x.c.
References SEEK_END.
Referenced by faReadSeq(), fileExists(), gffOpen(), and readInGulp().
00015 { 00016 int fd; 00017 long size; 00018 fd = _open(fileName, _O_RDONLY, 0); 00019 if (fd < 0) 00020 return -1; 00021 size = _lseek(fd, 0L, SEEK_END); 00022 _close(fd); 00023 return size; 00024 }
Here is the caller graph for this function:

| char* getCurrentDir | ( | ) |
Definition at line 44 of file oswin9x.c.
References warn().
Referenced by listDir().
00046 { 00047 static char dir[_MAX_PATH]; 00048 00049 if( _getcwd( dir, _MAX_PATH ) == NULL ) 00050 { 00051 warn("No current directory"); 00052 return NULL; 00053 } 00054 return dir; 00055 }
Here is the call graph for this function:

Here is the caller graph for this function:

| struct slName* listDir | ( | char * | dir, | |
| char * | pattern | |||
| ) | [read] |
Definition at line 68 of file oswin9x.c.
References FALSE, getCurrentDir(), name, newSlName(), sameString, setCurrentDir(), slAddHead, slNameSort(), and TRUE.
00071 { 00072 long hFile; 00073 struct _finddata_t fileInfo; 00074 struct slName *list = NULL, *name; 00075 boolean otherDir = FALSE; 00076 char *currentDir; 00077 00078 if (dir == NULL || sameString(".", dir) || sameString("", dir)) 00079 dir = ""; 00080 else 00081 { 00082 currentDir = getCurrentDir(); 00083 setCurrentDir(dir); 00084 otherDir = TRUE; 00085 } 00086 00087 if (pattern == NULL) 00088 pattern = *; 00089 if( (hFile = _findfirst( pattern, &fileInfo)) == -1L ) 00090 return NULL; 00091 00092 do 00093 { 00094 if (!sameString(".", fileInfo.name) && !sameString("..", fileInfo.name)) 00095 { 00096 name = newSlName(fileInfo.name); 00097 slAddHead(&list, name); 00098 } 00099 } 00100 while( _findnext( hFile, &fileInfo) == 0 ); 00101 _findclose( hFile ); 00102 if (otherDir) 00103 setCurrentDir(currentDir); 00104 slNameSort(&list); 00105 return list; 00106 }
Here is the call graph for this function:

| boolean setCurrentDir | ( | char * | newDir | ) |
Definition at line 57 of file oswin9x.c.
References FALSE, TRUE, and warn().
Referenced by listDir().
00059 { 00060 if (_chdir(newDir) != 0) 00061 { 00062 warn("Unable to set dir %s", newDir); 00063 return FALSE; 00064 } 00065 return TRUE; 00066 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void uglyfBreak | ( | ) |
char const rcsid[] = "$Id: oswin9x.c,v 1.8 2003/05/06 07:33:43 kate Exp $" [static] |
1.5.2