home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 344b.lha / plplot_v2.6 / src / pladv.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-27  |  744 b   |  35 lines

  1. /* Advance to subpage "page", or to the next one if "page" = 0 */
  2.  
  3. #include "plplot.h"
  4.  
  5. void pladv(page)
  6. PLINT page;
  7. {
  8.       PLINT cursub, nsubx, nsuby;
  9.       PLINT device, termin, graphx;
  10.       PLINT level;
  11.  
  12.       glev(&level);
  13.       if (level < 1) plexit("Please call plstar before calling pladv.");
  14.  
  15.       gdev(&device,&termin,&graphx);
  16.       gsub(&nsubx,&nsuby,&cursub);
  17.       if (page > 0 && page <= nsubx*nsuby)
  18.         cursub = page;
  19.       else if (page == 0) {
  20.         if (cursub == nsubx*nsuby) {
  21.           plclr();
  22.           plpage();
  23.           cursub = 1;
  24.         }
  25.         else
  26.           cursub = cursub + 1;
  27.       }
  28.       else
  29.         plexit("Invalid subpage number in pladv.");
  30.  
  31.       ssub(nsubx,nsuby,cursub);
  32.       setsub();
  33. }
  34.  
  35.