We managed to compile the sample program, btrsamp.c, by following these instructions http://ww1.pervasive.com/library/doc...g_tut-8-2.html and defining the BTI_WIN_32 switch in the PDB, so case...
Type: Posts; User: emanresu
We managed to compile the sample program, btrsamp.c, by following these instructions http://ww1.pervasive.com/library/doc...g_tut-8-2.html and defining the BTI_WIN_32 switch in the PDB, so case...
It looks strange to me too! Especially as I'm not a strong C programmer.
The bulk of the program is as written by pervasive, I've only ever added the BTI_DOS switch on the first line.
Hello,
I am looking to upgrade my programs from Microsoft C version 6 to Visual Studio 2005 and am trying to compile the btrieve program btrapi.c.
Unfortunately I get these errors:
...
Hi Todd,
It would be the latter, but more like "get it working with a new compiler for the ~20 year overdue OP/SYS upgrade". :)
The other idea behind it is to send someone else on a course...
Hi,
I am looking to upgrade (rewrite) some legacy C programs, and would really appreciate some helpful suggestions on the route to take. i.e. Should it be C++, or C# or .Net or something else?
...
OK, I understand that
printf ("CcyDecpl = %s \n", pq->CcyDecpl);
will start with my structure member CcyDecpl and then continue displaying until it reaches a "\0", so I ignored...
Part of original coding untouched by me.
Output today, with %s, was showing as "009".
With %c it outputs this character "╤"!
OK, thanks for all your help; I have two obstacles,
I'm amending someone else's code (which I'm assuming is correct) and my own lack of experience in
real life C programming.
I'll definitely...
In my program the number of decimal places is read from a file. Depending on that value,
an amount is divided by the appropriate constant. If the value is greater than 5 then it
throws an error....
Ancient! ;)
Yep, it was missing a prototype after all that. Thanks.
In converting an MS C (v6) program from Scalable SQL to the Btrieve API (BTRV function), I need to understand the intricacies of pointers in order to resolve a "different levels of indirection"...
Thanks for the v.quick reply! I'll try it out.
Wish I was a God and not a hacker... ;)
I am trying to copy data between two structures, i.e. from record read in to record to be written out.
This is in Microsoft C (ver6).
I have them declared like this
struct GLD0DATA
{
...
Just wanted to say thank you for your reply.
Before reading it, I tried using cl for the link as well
i.e. cl xxxxxxxx.obj btrapi.obj xqlintf.lib
and it appears to have worked.
Hi,
Brief background...I am not a trained C programmer but am the poor soul left to update legacy C programs. One particular program requires use of BTRV API (instead of Scaleable SQL API) due to an...
OK, I now have
struct menuDetail {
char MenuDes0[25];
char filler01[06];
char MenuNam0[06];
<snip>
};
Looks neater doesn't it (arrow notation)! I'll use it from now on.
menuDetail is the tag (I think!) for the structure. i.e. "struct menuDetail {...".
Is its memory not allocated by the items...
Relooked at my code. Sorry, menubuf was superfluous. Changed code to this...
/* strcpy(menuRec,buf1); */
strncpy((*menuRec).MenuDes0,&buf1[0],25);
(*menuRec).MenuDes0[26]='\0';
...
I'm not too hot on pointers either! OK, I removed the * and instead of an error I got a warning "Suspicious pointer conversion".
What I'm trying to do is take the data read in to buf1 and move it...
Hi all,
I'm a novice C programmer and am trying to write a program that reads in a file (which describes menus shown on a certain application). Eventually I'll make the program write out a report of...