#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include "myio.h"
gehe zum Quellcode dieser Datei
int b_file_preload |
( |
char * |
filename) | |
|
Definiert in Zeile 20 der Datei myio.c.
28 if ( fd <=0 )
return 0;
int b_read |
( |
void * |
buf, |
|
|
int |
count |
|
) |
| |
int b_seek |
( |
long |
offset) | |
|
int b_seek_read |
( |
long |
offset, |
|
|
char * |
buf, |
|
|
int |
len |
|
) |
| |
int find_import_symbol |
( |
char * |
sym) | |
|
Definiert in Zeile 164 der Datei myio.c.
166 static const char prefix[] =
"__imported_";
167 static int prefixsize =
sizeof(prefix);
175 if ( !
strncmp( sym, prefix, prefixsize ) )
char* get_import_symbol |
( |
unsigned |
symidx) | |
|
Definiert in Zeile 188 der Datei myio.c.
192 for(;idx<symidx;idx++) {
int load_import |
( |
char * |
importfile) | |
|
Definiert in Zeile 90 der Datei myio.c.
103 PRINTERR(stderr,
"No import file '%s' found\n",importfile);
113 int now=0, loaded =0;
133 PRINTERR(stderr,
"Import file should have unix EOL format\n");
int load_stoplist |
( |
char * |
stopfile) | |
|
Definiert in Zeile 214 der Datei myio.c.
222 PRINTERR(stderr,
"No stoplist file '%s' found\n",stopfile);
227 printf(
"Stoplist file '%s' size=%d\n",stopfile, stoplistfilesize);
232 int now=0, loaded =0;
238 }
while (loaded<stoplistfilesize && now);
243 if ( loaded != stoplistfilesize )
248 char* sym=0, *finsym=0;
252 for(;*cur==
' '; cur++);
255 for(;*cur && *cur!=9 && *cur!=
' ' && *cur!=0x0a; cur++);
257 for(;*cur && *cur!=10; cur++);
258 if ( *cur==10) {cur++;}
263 record.warning =
"Error: unsafe symbol used. Please check stoplist";
265 for(;*cur && *cur!=9 && *cur!=0x0a; cur++);
267 if ( *cur==0 )
break;
273 for(;*cur && *cur!=10; cur++);
277 if (cur==record.warning)
278 record.warning =
"Error: unsafe symbol used. Please check stoplist";
284 if ( *cur!=0 ) { *cur=0; cur++;}
288 printf(
"Stop record: %s => %s\n",record.symbol, record.warning);
int stoplist_check |
( |
char * |
sym) | |
|