3 * Description: See "misc.c"
5 * Comments: See "notice.txt" for copyright and license information.
16 /* Uncomment MY_LOG define to compile in the mylog() statements.
17 Then, debug logging will occur if 'Debug' is set to 1 in the ODBCINST.INI
18 portion of the registry. You may have to manually add this key.
19 This logfile is intended for development use, not for an end user!
24 /* Uncomment Q_LOG to compile in the qlog() statements (Communications log, i.e. CommLog).
25 This logfile contains serious log statements that are intended for an
26 end user to be able to read and understand. It is controlled by the
27 'CommLog' flag in the ODBCINST.INI portion of the registry (see above),
28 which is manipulated on the setup/connection dialog boxes.
34 #define MYLOGFILE "mylog_"
36 #define MYLOGDIR "/tmp"
40 extern void mylog(char *fmt,...);
44 #define mylog(args...) /* GNU convention for variable arguments */
46 extern void MyLog(char *fmt,...);
47 #define mylog if (0) MyLog /* mylog */
50 #define inolog mylog /* for really temporary debug */
53 #define QLOGFILE "psqlodbc_"
55 #define QLOGDIR "/tmp"
59 extern void qlog(char *fmt,...);
63 #define qlog(args...) /* GNU convention for variable arguments */
65 #define qlog /* qlog */
71 #define DIRSEPARATOR "/"
73 #define DIRSEPARATOR "\\"
77 #define PG_BINARY O_BINARY
78 #define PG_BINARY_R "rb"
79 #define PG_BINARY_W "wb"
80 #define PG_BINARY_A "ab"
83 #define PG_BINARY_R "r"
84 #define PG_BINARY_W "w"
85 #define PG_BINARY_A "a"
89 void remove_newlines(char *string);
90 char *strncpy_null(char *dst, const char *src, int len);
91 char *trim(char *string);
92 char *make_string(const char *s, int len, char *buf);
93 char *my_strcat(char *buf, const char *fmt, const char *s, int len);
94 char *schema_strcat(char *buf, const char *fmt, const char *s, int len,
95 const char *, int, ConnectionClass *conn);
96 /* #define GET_SCHEMA_NAME(nspname) (stricmp(nspname, "public") ? nspname : "") */
97 #define GET_SCHEMA_NAME(nspname) (nspname)
99 /* defines for return value of my_strcpy */
100 #define STRCPY_SUCCESS 1
101 #define STRCPY_FAIL 0
102 #define STRCPY_TRUNCATED (-1)
103 #define STRCPY_NULL (-2)
105 int my_strcpy(char *dst, int dst_len, const char *src, int src_len);