Home | History | Annotate | Download | only in include
      1 /*---------------------------------------------------------------------------*
      2  *  duk_io.h  *
      3  *                                                                           *
      4  *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
      5  *                                                                           *
      6  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
      7  *  you may not use this file except in compliance with the License.         *
      8  *                                                                           *
      9  *  You may obtain a copy of the License at                                  *
     10  *      http://www.apache.org/licenses/LICENSE-2.0                           *
     11  *                                                                           *
     12  *  Unless required by applicable law or agreed to in writing, software      *
     13  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
     14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
     15  *  See the License for the specific language governing permissions and      *
     16  *  limitations under the License.                                           *
     17  *                                                                           *
     18  *---------------------------------------------------------------------------*/
     19 
     20 
     21 #ifndef _h_dukio_
     22 #define _h_dukio_
     23 
     24 #ifdef SET_RCSID
     25 static const char duk_io_h[] = "$Id: duk_io.h,v 1.7.6.4 2007/08/31 17:44:53 dahan Exp $";
     26 #endif
     27 
     28 #ifndef _RTT
     29 #include <stdio.h>
     30 #endif
     31 
     32 #include "all_defs.h"
     33 #include "duk_err.h"
     34 #include "pstdio.h"
     35 
     36 /*  File types for whole word model and tcp files
     37 */
     38 #define OS_DIR_DELIM    '/'  /* OS Directory Delimiter          */
     39 #define OS_EXT_DELIM    '.'  /* OS Filename Extension Delimeter */
     40 #define TCP_EXT         "tcp"  /* Transcription Extension   */
     41 #define MDL_EXT         "mdl"  /* Model         Extension   */
     42 #define FIELD_DELIM     '#'  /* Field         Delimeter   */
     43 
     44 #define filtered_fgets pfgets
     45 
     46 void extractBase(char*);
     47 int  extractFS(char*);
     48 char extractFT(char*);
     49 
     50 #if !defined(_RTT)
     51 #if defined(__cplusplus) && !defined(_ASCPP)
     52 extern "C"
     53 {
     54 #endif
     55 #if defined(__cplusplus) && !defined(_ASCPP)
     56 }
     57 #endif
     58 
     59 int  check_file_extension(char *filename, char *extension);
     60 void get_file_extension(char *filename, char *extension);
     61 
     62 void skip_line(PFile* fileptr);
     63 
     64 int  extractFS(char *name);
     65 char extractFT(char *name);
     66 #endif
     67 
     68 #endif /* _h_dukio_ */
     69