summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorLudek Finstrle2005-12-17 21:05:44 +0000
committerLudek Finstrle2005-12-17 21:05:44 +0000
commitd3acdc8818450eb6baa1bd7ba3298f7dfa08701f (patch)
tree8b154f09d288db509c5af541d271d4d94220426b /setup.c
parentd8eb0544f8491b500228c78c18f2c89fe014c346 (diff)
added support for ; as delimiter for ConfigDSN
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/setup.c b/setup.c
index dbb5074..2be6aec 100644
--- a/setup.c
+++ b/setup.c
@@ -345,7 +345,7 @@ ParseAttributes(LPCSTR lpszAttributes, LPSETUPDLG lpsetupdlg)
else if (*lpsz == '=')
break; /* Valid key found */
}
- /* Determine the key's index in the key table (-1 if not found) */
+ /* Determine the key */
cbKey = lpsz - lpszStart;
if (cbKey < sizeof(aszKey))
{
@@ -353,13 +353,15 @@ ParseAttributes(LPCSTR lpszAttributes, LPSETUPDLG lpsetupdlg)
aszKey[cbKey] = '\0';
}
- /* Locate end of key value */
+ /* Locate end of key value - added support for delimiter ; */
lpszStart = ++lpsz;
- for (; *lpsz; lpsz++)
+ for (; *lpsz && *lpsz != ';'; lpsz++)
;
- /* lpsetupdlg->aAttr[iElement].fSupplied = TRUE; */
- _fmemcpy(value, lpszStart, MIN(lpsz - lpszStart + 1, MAXPGPATH));
+ /* Determine the value */
+ cbKey = MIN(lpsz - lpszStart, MAXPGPATH);
+ _fmemcpy(value, lpszStart, cbKey);
+ value[cbKey] = '\0';
mylog("aszKey='%s', value='%s'\n", aszKey, value);