#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include "liqapp.h"
#include "liqcell.h"
#include <ctype.h>
Functions | |
void | liqapp_initpwd () |
char * | liqapp_gettitle () |
int | liqapp_sleep (unsigned long millisec) |
unsigned long | liqapp_GetTicks () |
float | liqapp_fps (unsigned long ts, unsigned long te, unsigned long framecount) |
int | liqapp_getopt_find (char *optname) |
int | liqapp_getopt_exist (char *optname) |
int | liqapp_getopt_hasarg (char *optname) |
char * | liqapp_getopt_str (char *optname, char *def) |
int | liqapp_getopt_int (char *optname, int def) |
int | liqapp_pathexists (char *pathname) |
int | liqapp_fileexists (char *filename) |
int | liqapp_filesize (char *filename) |
char * | liqapp_filename_walkoverpath (char *filename) |
char * | liqapp_filename_walktoextension (char *filename) |
int | liqapp_file_copy (char *from, char *to, int allowoverwrite) |
int | liqapp_init (int argc, char *argv[], char *title, char *version) |
int | liqapp_vdeeplog (char *logentry, va_list arg) |
int | liqapp_deeplog (char *logentry,...) |
int | liqapp_log (char *logentry,...) |
int | liqapp_errorandfail (int returnstatus, char *logentry) |
int | liqapp_warnandcontinue (int returnstatus, char *logentry) |
int | liqapp_close () |
int | liqapp_formatnow (char *buffer, int buffersize, char *format) |
char * | liqapp_format_strftime (char *buffer, int buffersize, char *strftime_fmt) |
char * | stristr (const char *String, const char *Pattern) |
Variables | |
liqcell * | liqapp_logbase = NULL |
liqapp | app = {0} |
char * | liqapp_pwd = NULL |
int | liqapp_is_basefs = 0 |
Copyright (C) 2008 Gary Birkett
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
int liqapp_deeplog | ( | char * | logentry, | |
... | ||||
) |
internal console logging function, varargs version
log | entry template, uses printf formatting | |
list | of parameters for completing the formatting |
int liqapp_errorandfail | ( | int | returnstatus, | |
char * | logentry | |||
) |
Log a liqbase error, and exit the program
returnstatus | Value to exit and return with | |
logentry | The error message to log |
int liqapp_fileexists | ( | char * | filename | ) |
check if a filename is valid and exists and can be 'stat'ed
char | *filename including path |
char* liqapp_filename_walkoverpath | ( | char * | filename | ) |
walk over the filename to remove all path parts
char | *filename including path |
char* liqapp_filename_walktoextension | ( | char * | filename | ) |
find and return the extension part of a filename
char | *filename to get the extension from |
int liqapp_filesize | ( | char * | filename | ) |
return the stat filesize (-1 if not found)
char | *filename including path |
float liqapp_fps | ( | unsigned long | ts, | |
unsigned long | te, | |||
unsigned long | framecount | |||
) |
obtain an FPS value based on duration and frames completed in that period
starting | time | |
ending | time | |
number | of frames completed in the period |
unsigned long liqapp_GetTicks | ( | ) |
return system tick count
int liqapp_init | ( | int | argc, | |
char * | argv[], | |||
char * | title, | |||
char * | version | |||
) |
Initiates the Liqbase Application to be ran, including the liqbase filesystem
argc | Command line arguement count | |
argv | Command line arguement strings | |
title | The title of the application | |
version | The version of the application |
int liqapp_log | ( | char * | logentry, | |
... | ||||
) |
console logging function
log | entry template, uses printf formatting | |
list | of parameters for completing the formatting |
int liqapp_pathexists | ( | char * | pathname | ) |
check if a pathname is valid and exists and can be 'stat'ed
char | *pathname including path |
int liqapp_sleep | ( | unsigned long | millisec | ) |
put the calling thread to sleep for a duration
duration | in milliseconds |
int liqapp_vdeeplog | ( | char * | logentry, | |
va_list | arg | |||
) |
internal console logging function, va_list version
log | entry template, uses printf formatting | |
list | of parameters for completing the formatting |
int liqapp_warnandcontinue | ( | int | returnstatus, | |
char * | logentry | |||
) |
Log a liqbase warning, but continue running
returnstatus | Value to exit and return with | |
logentry | The warning message to log |