Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SoftC Database Library v2.1 Guide - usage http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USAGE
   int scdnbfrsz(
           int handle,
           int *numpgs,
           int command );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdnbfrsz will either get (SC_GETSZ) or set (SC_SETSZ) the
   maximum number of index pages the library file manager can keep in memory
   and returns it via numpgs. This is under control of command.

EXAMPLE
   /* Get Size */
   #include <stdio.h>
   #include <softc.h>
   #include <sc_base.h>

   void main()
   {
     int ndx, numpgs;

     scdinit(20,0);
     if (scdnopenx(&ndx, "TOCNAME.NDX", SC_BUFFER) == SC_SUCCESS) {
       scdnbfrsz(ndx,&numpgs,SC_GETSZ) == SC_SUCCESS)
       printf("Maximum number of pages = %d\n",numpgs);
       scdnclose(ndx);
     }
     scdterm();
   }

   /* Set Size */
   #include <stdio.h>
   #include <softc.h>
   #include <sc_base.h>

   void main()
   {
     int ndx, numpgs = 5;

     scdinit(20,0);
     if (scdnopenx(&ndx, "TOCNAME.NDX", SC_BUFFER) == SC_SUCCESS) {
       scdnbfrsz(ndx,&numpgs,SC_SETSZ);
       printf("New max = %d\n",numpgs);
       scdnclose(ndx);
     }
     scdterm();
   }

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson