xp_comm_proj/rd_dicom/Papyrus3/JpegDir/JpgLless/read.c
/*
 *--------------------------------------------------------------
 *
 * NextMarker --
 *
 *      Find the next JPEG marker Note that the output might not
 *	be a valid marker code but it will never be 0 or FF
 *
 * Results:
 *	The marker found.
 *
 * Side effects:
 *	Bitstream is parsed.
 *
 *--------------------------------------------------------------
 */
NextMarker
Find the next JPEG marker Note that the output might not
be a valid marker code but it will never be 0 or FF

The marker found.

Side effects:
Bitstream is parsed.
NextMarker Find the next JPEG marker Note that the output might not be a valid marker code but it will never be 0 or FF The marker found . Side effects : Bitstream is parsed .
static int NextMarker ()
{
    int c, nbytes;
    nbytes = 0;
    do {
	do {
	    nbytes++;
	    c = GetJpegChar();
	} while (c != 0xFF);
	do {
	    c = GetJpegChar();
	} while (c == 0xFF);
    } while (c == 0);		
    return c;
}
static int NextMarker ( ) { int c , nbytes ; nbytes = 0 ; do { do { nbytes ++ ; c = GetJpegChar ( ) ; } while ( c != 0xFF ) ; do { c = GetJpegChar ( ) ; } while ( c == 0xFF ) ; } while ( c == 0 ) ; return c ; }
NextMarker
      Find the next JPEG marker Note that the output might not
      be a valid marker code but it will never be 0 or FF
NextMarker Find the next JPEG marker Note that the output might not be a valid marker code but it will never be 0 or FF
/*
	 * skip any non-FF bytes
	 */ /*
	 * skip any duplicate FFs without incrementing nbytes, since
	 * extra FFs are legal
	 */ /* repeat if it was a stuffed FF/00 */