#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "config.h"
#include "compat.h"
#include "util.h"
#include "options.h"
Go to the source code of this file.
◆ basename()
Definition at line 110 of file util.c.
111{
113
118}
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
◆ copy_file()
Definition at line 163 of file util.c.
164{
166
171 {
172 l2l_dbg(0,
"Cannot remove dst %s before copy\n",
dst);
173 return 1;
174 }
176 {
179 return 2;
180 }
181
183 {
184 l2l_dbg(0,
"Dst %s does not exist after copy\n",
dst);
185 return 2;
186 }
187 return 0;
188}
#define sprintf(buf, format,...)
int __cdecl system(_In_opt_z_ const char *_Command)
◆ file_exists()
Definition at line 52 of file util.c.
53{
55
58 return 0;
60 return 1;
61}
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
Referenced by copy_file().
◆ getFmt()
Definition at line 121 of file util.c.
122{
123 const char *
fmt =
"%x";
124
126 {
128 {
129 case 'x':
132 break;
133 case 'd':
136 break;
137 default:
139 break;
140 }
141 }
143}
GLboolean GLboolean GLboolean GLboolean a
Referenced by isOffset(), and my_atoi().
◆ isOffset()
Definition at line 154 of file util.c.
155{
158 return 0;
160}
char * strchr(const char *String, int ch)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
Referenced by main().
◆ mkPath()
Definition at line 68 of file util.c.
69{
72
73 if (isDir)
74 {
77 return 0;
78 }
79
81 {
85 }
86
89
91}
Referenced by mkPath().
◆ my_atoi()
◆ set_LogFile()
int set_LogFile |
( |
FILE ** |
plogFile | ) |
|
Definition at line 19 of file util.c.
20{
22 {
23 if (*plogFile)
26
28 return 0;
29
31 if (*plogFile)
32 {
33
35 {
38 }
39 else
41 }
42 else
43 {
45 return 2;
46 }
47 }
48 return 0;
49}
int strcmp(const char *String1, const char *String2)
_CRTIMP void __cdecl setbuf(_Inout_ FILE *_File, _Inout_updates_opt_(BUFSIZ) _Post_readable_size_(0) char *_Buffer)
const char * strerror(int err)
Referenced by handle_escape_cmd(), and main().