| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| From: | "Jeff Lu" <jklcom AT mindspring DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | Need some helps on using dbm functions |
| Date: | Tue, 12 Dec 2000 16:27:32 -0500 |
| Message-ID: | <NDBBIHPECLIGKCCLMACAGEHBCIAA.jklcom@mindspring.com> |
| MIME-Version: | 1.0 |
| X-Priority: | 3 (Normal) |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) |
| Importance: | Normal |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2615.200 |
I've a small program that writes data using dbm calls
here's a snapshot of code and how I compile it:
gcc -s -o /e/inetpub/wwwroot/cgi-bin/send.exe send.c
intrautil.c -DBM_STATIC -lgdbm
code:
dbm_local = dbm_open("f:\\data\\info, O_RDWR|O_CREAT, 00664);
if(dbm_local)
{
strcpy(buffer, "CurrentOrderNumber");
key.dptr = buffer;
key.dsize = strlen(buffer)+1;
return_data = dbm_fetch(dbm_local, key);
if(return_data.dptr)
sprintf(count, "%d", atoi(return_data.dptr)+1);
else
strcpy(count, "1");
data_data.dptr = count;
data_data.dsize = strlen(count)+1;
dbm_store(dbm_local, key, data_data, DBM_REPLACE);
dbm_close (dbm_local);
}
When the program is run, info.pag gets created but dbm_open returns a NULL
file handle dbm_local. In Unix there is info.dir file that goes with
info.pag but I don't see one here in cygwin. Is this the way it's supposed
to be? Can some one tell me why this is happening? thanks.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |