home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / printer / dvi2pcl.lha / skipnextpage.c < prev    next >
C/C++ Source or Header  |  1992-11-25  |  2KB  |  82 lines

  1. /* $Log:    skipnextpage.c,v $
  2.  * Revision 0.8  92/11/23  19:46:59  19:46:59  bt (Bo Thide')
  3.  * Fixed resolution bug. Portable downloading. Added/changed options. PJXL color support
  4.  * 
  5.  * Revision 0.7  92/11/13  02:41:43  02:41:43  bt (Bo Thide')
  6.  * More bug fixes and improvements. Support for PaintJet XL
  7.  * 
  8.  * Revision 0.6  92/11/10  21:48:41  21:48:41  bt (Bo Thide')
  9.  * Bug fixes. Added -R option. Better font handling.
  10.  * 
  11.  * Revision 0.5  92/11/09  16:25:47  16:25:47  bt (Bo Thide')
  12.  * Rewrite of dospecial.c. Extended \special support
  13.  * 
  14.  * Revision 0.4  92/11/08  02:46:04  02:46:04  bt (Bo Thide')
  15.  * Changed to portable bit manipulations. Replaced strrstr for non-POSIX compliant C. Fixed numerous bugs. Added support for more \special's.
  16.  * 
  17.  * Revision 0.3  92/08/24  12:45:54  12:45:54  bt (Bo Thide')
  18.  * Fixed 8 bit (dc font) support.
  19.  * 
  20.  * Revision 0.2  92/08/23  17:29:01  17:29:01  bt (Bo Thide')
  21.  * Source cleaned up.  Changed certain function calls.  Removed globals.
  22.  * 
  23.  * Revision 0.1  92/08/22  23:58:48  23:58:48  bt (Bo Thide')
  24.  * First Release.
  25.  *  */
  26.  
  27. #include <stdio.h>
  28. #include "dvi.h"
  29. #include "globals.h"
  30. #include "macros.h"
  31.  
  32. static char rcsid[] = "$Header: skipnextpage.c,v 0.8 92/11/23 19:46:59 bt Exp $";
  33.  
  34. /*
  35.  * This routine is used to pass over the next odd page during the first path
  36.  * for the 'twosided' option in which the even pages are produced.
  37.  */
  38. skipnextpage(dvifile)
  39. FILE    *dvifile;
  40.     int     k;
  41.     long     p;
  42.  
  43.     while (TRUE)
  44.     { 
  45.         if((k = (int)getubyte(dvifile)) >= DVI_SET1) { 
  46.             p = firstpar(dvifile, k);
  47.             switch(k) { 
  48.             case DVI_BOP:
  49.                 scanbop(dvifile);
  50.                 break;
  51.             case DVI_EOP:
  52.                 return(TRUE);
  53.                 break;
  54.             case DVI_SET_RULE:
  55.             case DVI_PUT_RULE:
  56.                 getsquad(dvifile);
  57.                 break;
  58.             case DVI_FNT_DEF1:
  59.             case DVI_FNT_DEF2:
  60.             case DVI_FNT_DEF3:
  61.             case DVI_FNT_DEF4:
  62.                 skipfontdef(dvifile);
  63.                 break;
  64.             case DVI_XXX1:
  65.             case DVI_XXX2:
  66.             case DVI_XXX3:
  67.             case DVI_XXX4:
  68.                 while (p-- > 0)
  69.                     getubyte(dvifile);
  70.                 break;
  71.             case DVI_POST:
  72.                 inpostamble = TRUE;
  73.                 return(FALSE);
  74.                 break;
  75.             default:
  76.                 break;
  77.             }
  78.         }
  79.     }
  80. }
  81.