Cleanup formatting, remove some unicode/odbcver ifdefs.
authorDave Page <dpage@pgadmin.org>
Mon, 19 Jul 2004 15:58:48 +0000 (15:58 +0000)
committerDave Page <dpage@pgadmin.org>
Mon, 19 Jul 2004 15:58:48 +0000 (15:58 +0000)
dlg_specific.h

index 4208b1e0f04f0ab169570063397a998d3a892d9e..7d276052a7346fd0860b45175c24277673db8b18 100644 (file)
 #endif
 
 /* Unknown data type sizes */
-#define UNKNOWNS_AS_MAX                    0
-#define UNKNOWNS_AS_DONTKNOW           1
-#define UNKNOWNS_AS_LONGEST                2
+#define UNKNOWNS_AS_MAX            0
+#define UNKNOWNS_AS_DONTKNOW       1
+#define UNKNOWNS_AS_LONGEST        2
 
 /* ODBC initialization files */
 #ifndef WIN32
-#define ODBC_INI                       ".odbc.ini"
-#define ODBCINST_INI                   "odbcinst.ini"
+#define ODBC_INI           ".odbc.ini"
+#define ODBCINST_INI           "odbcinst.ini"
 #else
-#define ODBC_INI                       "ODBC.INI"
-#define ODBCINST_INI                   "ODBCINST.INI"
+#define ODBC_INI           "ODBC.INI"
+#define ODBCINST_INI           "ODBCINST.INI"
 #endif
 
-#define    ODBC_DATASOURCES    "ODBC Data Sources"
+#define    ODBC_DATASOURCES        "ODBC Data Sources"
 
-#if (ODBCVER >= 0x0300)
-#ifdef  UNICODE_SUPPORT
-#define INI_DSN                "PostgreSQL30W"
-#else
-#define INI_DSN                "PostgreSQL30"
-#endif /* UNICODE_SUPPORT */
-#else
 #define INI_DSN                DBMS_NAME
-#endif   /* ODBCVER */
-
-#define INI_KDESC                      "Description"   /* Data source
-                                                        * description */
-#define INI_SERVER                     "Servername"    /* Name of Server
-                                                        * running the Postgres
-                                                        * service */
-#define INI_PORT                       "Port"  /* Port on which the
-                                                * Postmaster is listening */
-#define INI_DATABASE                   "Database"      /* Database Name */
-#define INI_USER                       "Username"      /* Default User Name */
-#define INI_PASSWORD                   "Password"      /* Default Password */
-#define INI_DEBUG                      "Debug" /* Debug flag */
-#define INI_FETCH                      "Fetch" /* Fetch Max Count */
-#define INI_SOCKET                     "Socket"        /* Socket buffer size */
-#define INI_READONLY                   "ReadOnly"      /* Database is read only */
-#define INI_COMMLOG                        "CommLog"       /* Communication to
-                                                        * backend logging */
-#define INI_PROTOCOL                   "Protocol"      /* What protocol (6.2) */
-#define INI_OPTIMIZER                  "Optimizer"     /* Use backend genetic
-                                                        * optimizer */
-#define INI_KSQO                       "Ksqo"  /* Keyset query
-                                                * optimization */
-#define INI_CONNSETTINGS                "ConnSettings" /* Anything to send to
-                                                        * backend on successful
-                                                        * connection */
-#define INI_UNIQUEINDEX                    "UniqueIndex"   /* Recognize unique
-                                                        * indexes */
-#define INI_UNKNOWNSIZES               "UnknownSizes"  /* How to handle unknown
-                                                        * result set sizes */
-
-#define INI_CANCELASFREESTMT           "CancelAsFreeStmt"
-
-#define INI_USEDECLAREFETCH                "UseDeclareFetch"       /* Use Declare/Fetch
-                                                                * cursors */
+
+#define INI_KDESC          "Description"   /* Data source description */
+#define INI_SERVER         "Servername"    /* Name of Server running PostgreSQL */
+#define INI_PORT           "Port"      /* Port on which the Postmaster is listening */
+#define INI_DATABASE           "Database"  /* Database Name */
+#define INI_USER           "Username"  /* Default User Name */
+#define INI_PASSWORD           "Password"  /* Default Password */
+#define INI_DEBUG          "Debug"     /* Debug flag */
+#define INI_FETCH          "Fetch"     /* Fetch Max Count */
+#define INI_SOCKET         "Socket"    /* Socket buffer size */
+#define INI_READONLY           "ReadOnly"  /* Database is read only */
+#define INI_COMMLOG            "CommLog"   /* Communication to backend logging */
+#define INI_PROTOCOL           "Protocol"  /* What protocol (6.2) */
+#define INI_OPTIMIZER          "Optimizer" /* Use backend genetic optimizer */
+#define INI_KSQO           "Ksqo"      /* Keyset query optimization */
+#define INI_CONNSETTINGS       "ConnSettings"  /* Anything to send to backend on successful connection */
+#define INI_UNIQUEINDEX            "UniqueIndex"   /* Recognize unique indexes */
+#define INI_UNKNOWNSIZES       "UnknownSizes"  /* How to handle unknown result set sizes */
+#define INI_CANCELASFREESTMT       "CancelAsFreeStmt"
+#define INI_USEDECLAREFETCH        "UseDeclareFetch"   /* Use Declare/Fetch cursors */
 
 /* More ini stuff */
-#define INI_TEXTASLONGVARCHAR          "TextAsLongVarchar"
-#define INI_UNKNOWNSASLONGVARCHAR      "UnknownsAsLongVarchar"
-#define INI_BOOLSASCHAR                    "BoolsAsChar"
-#define INI_MAXVARCHARSIZE             "MaxVarcharSize"
-#define INI_MAXLONGVARCHARSIZE         "MaxLongVarcharSize"
-
-#define INI_FAKEOIDINDEX               "FakeOidIndex"
-#define INI_SHOWOIDCOLUMN              "ShowOidColumn"
-#define INI_ROWVERSIONING              "RowVersioning"
-#define INI_SHOWSYSTEMTABLES           "ShowSystemTables"
-#define INI_LIE                            "Lie"
-#define INI_PARSE                      "Parse"
-#define INI_EXTRASYSTABLEPREFIXES      "ExtraSysTablePrefixes"
-
-#define INI_TRANSLATIONNAME                "TranslationName"
-#define INI_TRANSLATIONDLL             "TranslationDLL"
-#define INI_TRANSLATIONOPTION          "TranslationOption"
-#define INI_DISALLOWPREMATURE          "DisallowPremature"
-#define INI_UPDATABLECURSORS           "UpdatableCursors"
-#define INI_LFCONVERSION           "LFConversion"
-#define INI_TRUEISMINUS1           "TrueIsMinus1"
-#define INI_INT8AS             "BI"
-#define INI_BYTEAASLONGVARBINARY       "ByteaAsLongVarBinary"
-#define INI_USESERVERSIDEPREPARE       "UseServerSidePrepare"
-#define INI_LOWERCASEIDENTIFIER            "LowerCaseIdentifier"
+#define INI_TEXTASLONGVARCHAR      "TextAsLongVarchar"
+#define INI_UNKNOWNSASLONGVARCHAR  "UnknownsAsLongVarchar"
+#define INI_BOOLSASCHAR            "BoolsAsChar"
+#define INI_MAXVARCHARSIZE     "MaxVarcharSize"
+#define INI_MAXLONGVARCHARSIZE     "MaxLongVarcharSize"
+
+#define INI_FAKEOIDINDEX       "FakeOidIndex"
+#define INI_SHOWOIDCOLUMN      "ShowOidColumn"
+#define INI_ROWVERSIONING      "RowVersioning"
+#define INI_SHOWSYSTEMTABLES       "ShowSystemTables"
+#define INI_LIE                "Lie"
+#define INI_PARSE          "Parse"
+#define INI_EXTRASYSTABLEPREFIXES  "ExtraSysTablePrefixes"
+
+#define INI_TRANSLATIONNAME        "TranslationName"
+#define INI_TRANSLATIONDLL     "TranslationDLL"
+#define INI_TRANSLATIONOPTION      "TranslationOption"
+#define INI_DISALLOWPREMATURE      "DisallowPremature"
+#define INI_UPDATABLECURSORS       "UpdatableCursors"
+#define INI_LFCONVERSION       "LFConversion"
+#define INI_TRUEISMINUS1       "TrueIsMinus1"
+#define INI_INT8AS         "BI"
+#define INI_BYTEAASLONGVARBINARY   "ByteaAsLongVarBinary"
+#define INI_USESERVERSIDEPREPARE   "UseServerSidePrepare"
+#define INI_LOWERCASEIDENTIFIER        "LowerCaseIdentifier"
+
 /* Bit representaion for abbreviated connection strings */
-#define BIT_LFCONVERSION           (1L)
-#define BIT_UPDATABLECURSORS           (1L<<1)
-#define BIT_DISALLOWPREMATURE          (1L<<2)
-#define BIT_UNIQUEINDEX                (1L<<3)
-#define BIT_PROTOCOL_63                (1L<<4)
-#define BIT_PROTOCOL_64                (1L<<5)
-#define BIT_UNKNOWN_DONTKNOW           (1L<<6)
-#define BIT_UNKNOWN_ASMAX          (1L<<7)
-#define BIT_OPTIMIZER              (1L<<8)
-#define BIT_KSQO               (1L<<9)
-#define BIT_COMMLOG                (1L<<10)
-#define BIT_DEBUG              (1L<<11)
-#define BIT_PARSE              (1L<<12)
-#define BIT_CANCELASFREESTMT           (1L<<13)
-#define BIT_USEDECLAREFETCH            (1L<<14)
-#define BIT_READONLY               (1L<<15)
-#define BIT_TEXTASLONGVARCHAR          (1L<<16)
-#define BIT_UNKNOWNSASLONGVARCHAR      (1L<<17)
-#define BIT_BOOLSASCHAR                (1L<<18)
-#define BIT_ROWVERSIONING          (1L<<19)
-#define BIT_SHOWSYSTEMTABLES           (1L<<20)
-#define BIT_SHOWOIDCOLUMN          (1L<<21)
-#define BIT_FAKEOIDINDEX           (1L<<22)
-#define BIT_TRUEISMINUS1           (1L<<23)
-#define BIT_BYTEAASLONGVARBINARY       (1L<<24)
-#define BIT_USESERVERSIDEPREPARE       (1L<<25)
-#define BIT_LOWERCASEIDENTIFIER            (1L<<26)
-
-#define EFFECTIVE_BIT_COUNT            27
+#define BIT_LFCONVERSION       (1L)
+#define BIT_UPDATABLECURSORS       (1L<<1)
+#define BIT_DISALLOWPREMATURE      (1L<<2)
+#define BIT_UNIQUEINDEX            (1L<<3)
+#define BIT_PROTOCOL_63            (1L<<4)
+#define BIT_PROTOCOL_64            (1L<<5)
+#define BIT_UNKNOWN_DONTKNOW       (1L<<6)
+#define BIT_UNKNOWN_ASMAX      (1L<<7)
+#define BIT_OPTIMIZER          (1L<<8)
+#define BIT_KSQO           (1L<<9)
+#define BIT_COMMLOG            (1L<<10)
+#define BIT_DEBUG          (1L<<11)
+#define BIT_PARSE          (1L<<12)
+#define BIT_CANCELASFREESTMT       (1L<<13)
+#define BIT_USEDECLAREFETCH        (1L<<14)
+#define BIT_READONLY           (1L<<15)
+#define BIT_TEXTASLONGVARCHAR      (1L<<16)
+#define BIT_UNKNOWNSASLONGVARCHAR  (1L<<17)
+#define BIT_BOOLSASCHAR            (1L<<18)
+#define BIT_ROWVERSIONING      (1L<<19)
+#define BIT_SHOWSYSTEMTABLES       (1L<<20)
+#define BIT_SHOWOIDCOLUMN      (1L<<21)
+#define BIT_FAKEOIDINDEX       (1L<<22)
+#define BIT_TRUEISMINUS1       (1L<<23)
+#define BIT_BYTEAASLONGVARBINARY   (1L<<24)
+#define BIT_USESERVERSIDEPREPARE   (1L<<25)
+#define BIT_LOWERCASEIDENTIFIER        (1L<<26)
+
+#define EFFECTIVE_BIT_COUNT        27
 
 
 /* Connection Defaults */
-#define DEFAULT_PORT                   "5432"
-#define DEFAULT_READONLY               0
-#define DEFAULT_PROTOCOL               "6.4"   /* the latest protocol is
-                                                * the default */
-#define DEFAULT_USEDECLAREFETCH            0
-#define DEFAULT_TEXTASLONGVARCHAR      1
+#define DEFAULT_PORT           "5432"
+#define DEFAULT_READONLY       0
+#define DEFAULT_PROTOCOL       "6.4"   /* the latest protocol is the default */
+#define DEFAULT_USEDECLAREFETCH        0
+#define DEFAULT_TEXTASLONGVARCHAR  1
 #define DEFAULT_UNKNOWNSASLONGVARCHAR  0
-#define DEFAULT_BOOLSASCHAR                1
-#define DEFAULT_OPTIMIZER              1       /* disable */
-#define DEFAULT_KSQO                   1       /* on */
-#define DEFAULT_UNIQUEINDEX                1       /* dont recognize */
-#define DEFAULT_COMMLOG                    0       /* dont log */
-#define DEFAULT_DEBUG                  0
-#define DEFAULT_UNKNOWNSIZES           UNKNOWNS_AS_MAX
+#define DEFAULT_BOOLSASCHAR        1
+#define DEFAULT_OPTIMIZER      1   /* disable */
+#define DEFAULT_KSQO           1   /* on */
+#define DEFAULT_UNIQUEINDEX        1   /* dont recognize */
+#define DEFAULT_COMMLOG            0   /* dont log */
+#define DEFAULT_DEBUG          0
+#define DEFAULT_UNKNOWNSIZES       UNKNOWNS_AS_MAX
 
 
-#define DEFAULT_FAKEOIDINDEX           0
-#define DEFAULT_SHOWOIDCOLUMN          0
-#define DEFAULT_ROWVERSIONING          0
-#define DEFAULT_SHOWSYSTEMTABLES       0       /* dont show system tables */
-#define DEFAULT_LIE                        0
-#define DEFAULT_PARSE                  0
+#define DEFAULT_FAKEOIDINDEX       0
+#define DEFAULT_SHOWOIDCOLUMN      0
+#define DEFAULT_ROWVERSIONING      0
+#define DEFAULT_SHOWSYSTEMTABLES   0   /* dont show system tables */
+#define DEFAULT_LIE            0
+#define DEFAULT_PARSE          0
 
-#define DEFAULT_CANCELASFREESTMT       0
+#define DEFAULT_CANCELASFREESTMT   0
 
 #define DEFAULT_EXTRASYSTABLEPREFIXES  "dd_;"
 
@@ -209,15 +187,14 @@ int CALLBACK manage_dsnProc(HWND hdlg,
               LPARAM lParam);
 #endif   /* WIN32 */
 
-void       updateGlobals(void);
-void       writeDriverCommoninfo(const char *fileName, const char *sectionName,
-       const GLOBAL_VALUES *);
-void       writeDSNinfo(const ConnInfo *ci);
-void       getDSNdefaults(ConnInfo *ci);
-void       getDSNinfo(ConnInfo *ci, char overwrite);
-void       makeConnectString(char *connect_string, const ConnInfo *ci, UWORD);
-void       copyAttributes(ConnInfo *ci, const char *attribute, const char *value);
-void       copyCommonAttributes(ConnInfo *ci, const char *attribute, const char *value);
+void   updateGlobals(void);
+void   writeDriverCommoninfo(const char *fileName, const char *sectionName, const GLOBAL_VALUES *);
+void   writeDSNinfo(const ConnInfo *ci);
+void   getDSNdefaults(ConnInfo *ci);
+void   getDSNinfo(ConnInfo *ci, char overwrite);
+void   makeConnectString(char *connect_string, const ConnInfo *ci, UWORD);
+void   copyAttributes(ConnInfo *ci, const char *attribute, const char *value);
+void   copyCommonAttributes(ConnInfo *ci, const char *attribute, const char *value);
 int    getDriverNameFromDSN(const char *dsn, char *driver_name, int namelen);
 int     changeDriverNameOfaDSN(const char *dsn, const char *driver_name, DWORD *errcode);