xp_comm_proj/rd_dicom/Papyrus3/JpegDir/JpgLless/read.c
/*
 *--------------------------------------------------------------
 *
 * ProcessTables --
 *
 *	Scan and process JPEG markers that can appear in any order
 *	Return when an SOI, EOI, SOFn, or SOS is found
 *
 * Results:
 *	The marker found.
 *
 * Side effects:
 *	Bitstream is parsed.
 *
 *--------------------------------------------------------------
 */
ProcessTables
Scan and process JPEG markers that can appear in any order
Return when an SOI, EOI, SOFn, or SOS is found

The marker found.

Side effects:
Bitstream is parsed.
ProcessTables Scan and process JPEG markers that can appear in any order Return when an SOI EOI SOFn or SOS is found The marker found . Side effects : Bitstream is parsed .
static JpegMarker ProcessTables (DecompressInfo *dcPtr)
{
  int c;
    while (1) {
	c = NextMarker ();
	switch (c) {
	case M_SOF0:
	case M_SOF1:
	case M_SOF2:
	case M_SOF3:
	case M_SOF5:
	case M_SOF6:
	case M_SOF7:
	case M_JPG:
	case M_SOF9:
	case M_SOF10:
	case M_SOF11:
	case M_SOF13:
	case M_SOF14:
	case M_SOF15:
	case M_SOI:
	case M_EOI:
	case M_SOS:
	    return ((JpegMarker)c);
	case M_DHT:
	    GetDht (dcPtr);
	    break;
	case M_DQT:
            fprintf(stderr,"Not a lossless JPEG file.\n");
	    break;
	case M_DRI:
	    GetDri (dcPtr);
	    break;
	case M_APP0:
	    GetApp0 ();
	    break;
	case M_RST0:		
	case M_RST1:
	case M_RST2:
	case M_RST3:
	case M_RST4:
	case M_RST5:
	case M_RST6:
	case M_RST7:
	case M_TEM:
	    fprintf (stderr, "Warning: unexpected marker 0x%02x", c);
	    break;
	default:		
	    SkipVariable ();
	    break;
	}
    }
}
static JpegMarker ProcessTables ( DecompressInfo * dcPtr ) { int c ; while ( 1 ) { c = NextMarker ( ) ; switch ( c ) { case M_SOF0 : case M_SOF1 : case M_SOF2 : case M_SOF3 : case M_SOF5 : case M_SOF6 : case M_SOF7 : case M_JPG : case M_SOF9 : case M_SOF10 : case M_SOF11 : case M_SOF13 : case M_SOF14 : case M_SOF15 : case M_SOI : case M_EOI : case M_SOS : return ( ( JpegMarker ) c ) ; case M_DHT : GetDht ( dcPtr ) ; break ; case M_DQT : fprintf ( stderr , " \n " ) ; break ; case M_DRI : GetDri ( dcPtr ) ; break ; case M_APP0 : GetApp0 ( ) ; break ; case M_RST0 : case M_RST1 : case M_RST2 : case M_RST3 : case M_RST4 : case M_RST5 : case M_RST6 : case M_RST7 : case M_TEM : fprintf ( stderr , " " , c ) ; break ; default : SkipVariable ( ) ; break ; } } }
ProcessTables
      Scan and process JPEG markers that can appear in any order
      Return when an SOI, EOI, SOFn, or SOS is found
ProcessTables Scan and process JPEG markers that can appear in any order Return when an SOI EOI SOFn or SOS is found
/* these are all parameterless */ /* must be DNL, DHP, EXP, APPn, JPGn, COM,
				 * or RESn */