ReactOS  0.4.13-dev-563-g0561610
util.h
Go to the documentation of this file.
1 /*
2  * ReactOS log2lines
3  * Written by Jan Roeloffzen
4  *
5  * - Misc utils
6  */
7 
8 #pragma once
9 
10 #include <stdio.h>
11 
12 #include "cmd.h"
13 #include "options.h"
14 
15 #define log(outFile, fmt, ...) \
16  { \
17  fprintf(outFile, fmt, ##__VA_ARGS__); \
18  if (logFile) \
19  fprintf(logFile, fmt, ##__VA_ARGS__); \
20  }
21 
22 #define esclog(outFile, fmt, ...) \
23  { \
24  log(outFile, KDBG_ESC_RESP fmt, ##__VA_ARGS__); \
25  }
26 
27 #define clilog(outFile, fmt, ...) \
28  { \
29  if (opt_cli) \
30  esclog(outFile, fmt, ##__VA_ARGS__) \
31  else \
32  log(outFile, fmt, ##__VA_ARGS__); \
33  }
34 
35 #define l2l_dbg(level, ...) \
36  { \
37  if (opt_verbose >= level) \
38  fprintf(stderr, ##__VA_ARGS__); \
39  }
40 
41 int file_exists(char *name);
42 int mkPath(char *path, int isDir);
43 char *basename(char *path);
44 const char *getFmt(const char *a);
45 long my_atoi(const char *a);
46 int isOffset(const char *a);
47 int copy_file(char *src, char *dst);
48 int set_LogFile(FILE **plogFile);
49 
50 /* EOF */
int file_exists(char *name)
Definition: util.c:52
const char * getFmt(const char *a)
Definition: util.c:121
long my_atoi(const char *a)
Definition: util.c:146
int set_LogFile(FILE **plogFile)
Definition: util.c:19
int copy_file(char *src, char *dst)
Definition: util.c:163
GLenum src
Definition: glext.h:6340
char * basename(char *path)
Definition: util.c:110
Definition: services.c:325
GLenum GLenum dst
Definition: glext.h:6340
Definition: name.c:36
int mkPath(char *path, int isDir)
Definition: util.c:68
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
int isOffset(const char *a)
Definition: util.c:154