3 * Description: See "misc.c"
5 * Comments: See "notice.txt" for copyright and license information.
16 #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
21 /* Uncomment MY_LOG define to compile in the mylog() statements.
22 Then, debug logging will occur if 'Debug' is set to 1 in the ODBCINST.INI
23 portion of the registry. You may have to manually add this key.
24 This logfile is intended for development use, not for an end user!
29 /* Uncomment Q_LOG to compile in the qlog() statements (Communications log, i.e. CommLog).
30 This logfile contains serious log statements that are intended for an
31 end user to be able to read and understand. It is controlled by the
32 'CommLog' flag in the ODBCINST.INI portion of the registry (see above),
33 which is manipulated on the setup/connection dialog boxes.
39 #define MYLOGFILE "mylog_"
41 #define MYLOGDIR "/tmp"
45 extern void mylog(char *fmt,...);
49 #define mylog(args...) /* GNU convention for variable arguments */
51 #define mylog /* mylog */
56 #define QLOGFILE "psqlodbc_"
58 #define QLOGDIR "/tmp"
62 extern void qlog(char *fmt,...);
66 #define qlog(args...) /* GNU convention for variable arguments */
68 #define qlog /* qlog */
73 #define DIRSEPARATOR "/"
75 #define DIRSEPARATOR "\\"
79 #define PG_BINARY O_BINARY
80 #define PG_BINARY_R "rb"
81 #define PG_BINARY_W "wb"
84 #define PG_BINARY_R "r"
85 #define PG_BINARY_W "w"
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);
95 /* defines for return value of my_strcpy */
96 #define STRCPY_SUCCESS 1
98 #define STRCPY_TRUNCATED (-1)
99 #define STRCPY_NULL (-2)
101 int my_strcpy(char *dst, int dst_len, const char *src, int src_len);