scbpath.c

Go to the documentation of this file.
00001 /*
00002  * File Name: scbpath.c
00003  */
00004 
00005 /*
00006  * This file is part of liberscribble.
00007  *
00008  * liberscribble is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * liberscribble is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 /**
00023  * Copyright (C) 2008 iRex Technologies B.V.
00024  * All rights reserved.
00025  */
00026 
00027 
00028 #define _GNU_SOURCE
00029 
00030 //----------------------------------------------------------------------------
00031 // Include Files
00032 //----------------------------------------------------------------------------
00033 
00034 // system include files, between < >
00035 #include <string.h>
00036 #include <sys/stat.h>
00037 
00038 // ereader include files, between < >
00039 
00040 // local include files, between " "
00041 #include "scbpath.h"
00042 
00043 
00044 //----------------------------------------------------------------------------
00045 // Type Declarations
00046 //----------------------------------------------------------------------------
00047 
00048 
00049 //----------------------------------------------------------------------------
00050 // Global Constants
00051 //----------------------------------------------------------------------------
00052 
00053 
00054 //----------------------------------------------------------------------------
00055 // Static Variables
00056 //----------------------------------------------------------------------------
00057 
00058 
00059 //============================================================================
00060 // Local Function Definitions
00061 //============================================================================
00062 
00063 
00064 //============================================================================
00065 // Functions Implementation
00066 //============================================================================
00067 
00068 void erscribble_path_init(ScbPathPtr ptr)
00069 {
00070     if (ptr)
00071     {
00072         memset(ptr, 0, sizeof(ScbPath));
00073     }
00074 }
00075 
00076 
00077 gboolean erscribble_path_file_exist(const char *pathName)
00078 {
00079     struct stat statbuf;
00080     if (0 != stat(pathName, &statbuf))
00081     {
00082         return FALSE;
00083     }
00084 
00085 #ifdef ENABLE_DRIVER
00086     if (S_ISREG(statbuf.st_mode))
00087     {
00088         return TRUE;
00089     }
00090     return FALSE;
00091 #else
00092     return TRUE;
00093 #endif
00094 }
Generated by  doxygen 1.6.2-20100208