ReactOS 0.4.15-dev-8241-g63935f8
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
41int file_exists(char *name);
42int mkPath(char *path, int isDir);
43char *basename(char *path);
44const char *getFmt(const char *a);
45long my_atoi(const char *a);
46int isOffset(const char *a);
47int copy_file(char *src, char *dst);
48int set_LogFile(FILE **plogFile);
49
50/* EOF */
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
int mkPath(char *path, int isDir)
Definition: util.c:68
const char * getFmt(const char *a)
Definition: util.c:121
int set_LogFile(FILE **plogFile)
Definition: util.c:19
char * basename(char *path)
Definition: util.c:110
int isOffset(const char *a)
Definition: util.c:154
int file_exists(char *name)
Definition: util.c:52
int copy_file(char *src, char *dst)
Definition: util.c:163
long my_atoi(const char *a)
Definition: util.c:146
Definition: name.c:39