Lines Matching defs:file
7 * you may not use this file except in compliance with the License. *
42 /* Open a existed writable file (i.e., the file is not closed yet).
43 At some cases user knows the filename only but does not know the file handle (1),
44 the user could call fopen to open this file again with another file handle (2).
45 He/She could get all the information before the last fflush was called via file handle (1).
55 use a double link list to store the data of the writable file.
58 #define FILEBUFFERSIZE 4096 /* 4k for each file buffer entry */
187 passert("File Table is not initialized!" == NULL);
212 /* Locate the start of the file, by looking through the file record table. */
225 /* have to count the read-only file address in order to be best portable */
237 /* Do not support reopen the writable file now. */
245 /* Found the file, record it's starting offset and length. */
249 /* writable file, open it the first time; could be text or binary */
262 /* File doesn't exist. */
273 /* Open file */
274 /* Create new file handle */
303 /* Mark that this file handle is for flash memory */
321 /* only reopen the writable file comes here */
327 PortFile->eof = 0; /* File must have at least one byte in it. */
339 if (ISWRITEMODE(PortFile->mode) && !ISREOPENMODE(PortFile->mode)) /* writable file */
344 /* find the file record in memory */
352 /* The parameter SREC.Recognizer.osi_log_level in par file control the output
401 if (PortFile->endPos == PortFile->curPos) /* end of file */
544 if (PortFile->endPos <= PortFile->curPos) /* end of file */
568 if (PortFile->startFrame->buffer == PortFile->curPos) /* start of file */
592 * Returns current file position
636 * Returns current file position
722 /* call fflush before reopen a writable file */
723 if (ISWRITEMODE(PortFile->mode)) /* writable file */
727 /* find the file record in memory */
797 * Returns current file position
821 * NULL if it fails, otherwise a valid file pointer
825 /* does not support reopen writable file */
855 FILE *fp = NULL; /* real file handle */
858 const char *file;
862 file = PortFile->filename;
864 file = fname;
868 PLogMessage("trying to save file %s...\n", file);
869 sprintf(fullfname, "%s", file);
873 PLogMessage("trying to save file %s to %s...\n", file, path);
874 sprintf(fullfname, "%s/%s", path, file);
877 if (ISBINARYMODE(PortFile->mode)) /* binary file, the wav file */
906 FILE *fp;
928 if (fp == NULL) /* do not have the file, it is fine */
935 /* go to the beginning of the file */
957 should get the direcotry from par file