From 83958e66b44b89ebd96135818dfdeea958c3ac96 Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Tue, 15 Dec 1998 22:27:03 +0000 Subject: [PATCH] remove unnecessary functions which are in imglib --- webshell/tests/viewer/macToBeImplemented.cp | 77 --------------------- 1 file changed, 77 deletions(-) diff --git a/webshell/tests/viewer/macToBeImplemented.cp b/webshell/tests/viewer/macToBeImplemented.cp index 72c8a1aec3c4..b7daf730897a 100644 --- a/webshell/tests/viewer/macToBeImplemented.cp +++ b/webshell/tests/viewer/macToBeImplemented.cp @@ -46,80 +46,3 @@ char * XP_FileReadLine(char * dest, int32 bufferSize, XP_File file) PR_ASSERT(FALSE); return NULL; } - -#include "il_strm.h" - -/* Given the first few bytes of a stream, identify the image format */ -static int -il_type(int suspected_type, const char *buf, int32 len) -{ - int i; - - if (len >= 4 && !strncmp(buf, "GIF8", 4)) - { - return IL_GIF; - } - - /* for PNG */ - if (len >= 4 && ((unsigned char)buf[0]==0x89 && - (unsigned char)buf[1]==0x50 && - (unsigned char)buf[2]==0x4E && - (unsigned char)buf[3]==0x47)) - { - return IL_PNG; - } - - - /* JFIF files start with SOI APP0 but older files can start with SOI DQT - * so we test for SOI followed by any marker, i.e. FF D8 FF - * this will also work for SPIFF JPEG files if they appear in the future. - * - * (JFIF is 0XFF 0XD8 0XFF 0XE0 0X4A 0X46 0X49 0X46 0X00) - */ - if (len >= 3 && - ((unsigned char)buf[0])==0xFF && - ((unsigned char)buf[1])==0xD8 && - ((unsigned char)buf[2])==0xFF) - { - return IL_JPEG; - } - - /* no simple test for XBM vs, say, XPM so punt for now */ - if (len >= 8 && !strncmp(buf, "#define ", 8) ) - { - /* Don't contradict the given type, since this ID isn't definitive */ - if ((suspected_type == IL_UNKNOWN) || (suspected_type == IL_XBM)) - return IL_XBM; - } - - if (len < 35) - { - /* ILTRACE(1,("il: too few bytes to determine type")); */ - return suspected_type; - } - - /* all the servers return different formats so root around */ - for (i=0; i<28; i++) - { - if (!strncmp(&buf[i], "Not Fou", 7)) - return IL_NOTFOUND; - } - - return suspected_type; -} - -/* - * determine what kind of image data we are dealing with - */ -extern "C" -int IL_Type(const char *buf, int32 len) -{ - return il_type(IL_UNKNOWN, buf, len); -} - -/* Set limit on approximate size, in bytes, of all pixmap storage used - by the imagelib. */ -extern "C" -void IL_SetCacheSize(uint32 new_size) -{ -}