Date: Tue, 2 May 1995 12:48:09 +0200 From: J.J.deGraaff@TWI.TUDelft.NL (Hans de Graaff) To: kinzler@cs.indiana.edu Subject: xfaces patches I just noticed you have made some patches for xfaces. I've also made one, which addresses the problem with the cached entries. I've inserted some code to make proper cache checks, instead of commenting things out, but my code is far from elegant. -- Hans de Graaff J.J.deGraaff@TWI.TUDelft.NL Delft University of Technology Department of Information Systems ----------------------------------------------------------------------- WWW link diff --recursive --new-file -u xfaces-3.3/Imakefile xfaces-3.3-graaff/Imakefile --- xfaces-3.3/Imakefile Sun Mar 13 01:38:53 1994 +++ xfaces-3.3-graaff/Imakefile Mon Jan 2 10:38:06 1995 @@ -48,9 +48,9 @@ #define USE_XPM #define USE_SHAPE #define USE_XFACE -#define USE_SOUND +#undef USE_SOUND #define USE_BUCKETS -#define USE_POP +#undef USE_POP #define LOOKUP_HOSTNAME # @@ -65,7 +65,7 @@ # -DLOOKUP_DEBUG # #CDEBUGFLAGS= -Wall -g -#CDEBUGFLAGS= -g +CDEBUGFLAGS= -g #ifdef USE_XFACE XFACE_SRCS = face_search_xface.c face_image_xface.c diff --recursive --new-file -u xfaces-3.3/face_image.c xfaces-3.3-graaff/face_image.c --- xfaces-3.3/face_image.c Sun Mar 13 01:38:40 1994 +++ xfaces-3.3-graaff/face_image.c Mon Jan 2 10:50:05 1995 @@ -204,15 +204,22 @@ int length; static char* filename = NULL; static int filename_length = 0; - + + char my_label[512]; /* * First see if we already have this image. */ + for (fi = TheImages; fi != NULL; fi = fi->next) { if (strcmp(fi->file, file) == 0) { + if (info && info->item) { + sprintf(my_label, "%s@%s", info->item->user, info->item->host); + if (strcmp(fi->label, my_label)) + break; + } /* * Yep! */ @@ -290,7 +297,6 @@ /* * Ok, create a face image struct. */ - fi = FaceImageCreate(file, info->type, image_data); info->item->image = fi; @@ -367,6 +373,11 @@ break; } } + +#ifdef FACEDB_DEBUG + if (found) + fprintf(stderr, "FaceImageLoad: Reporting %s as found\n", file); +#endif return found; } diff --recursive --new-file -u xfaces-3.3/face_search_facedb.c xfaces-3.3-graaff/face_search_facedb.c --- xfaces-3.3/face_search_facedb.c Sun Mar 13 01:38:42 1994 +++ xfaces-3.3-graaff/face_search_facedb.c Mon Jan 2 12:01:00 1995 @@ -483,6 +483,10 @@ int parts; char* username; FacedbMap* map; + +#ifdef FACEDB_DEBUG + fprintf(stderr, "facedb: searching in path %s\n", path); +#endif if (buffer1 == NULL) { @@ -570,23 +574,6 @@ return 1; } -#if 0 - /* - * Finally if we are looking for an image try "/48x48x1". - */ - - if (info->data->format == FormatImage) - { - strcpy(tail, "/48x48x1"); - - if (FaceSearchLoad(buffer1, info->item, info->data)) - { - XtFree((char*) host); - XtFree(hostdata); - return 1; - } - } -#endif } /* @@ -679,23 +666,6 @@ return 1; } -#if 0 - /* - * Finally if we are looking for an image try "/48x48x1". - */ - - if (info->data->format == FormatImage) - { - strcpy(tail, "/48x48x1"); - - if (FaceSearchLoad(buffer1, info->item, info->data)) - { - XtFree((char*) host); - XtFree(hostdata); - return 1; - } - } -#endif } XtFree((char*) host); diff --recursive --new-file -u xfaces-3.3/main.c xfaces-3.3-graaff/main.c --- xfaces-3.3/main.c Sun Mar 13 01:38:45 1994 +++ xfaces-3.3-graaff/main.c Sun Feb 5 19:45:36 1995 @@ -297,7 +297,7 @@ static XrmOptionDescRec options[] = { { - "-c", "frame.setWidth", XrmoptionSepArg, NULL + "-c", "frame.maxWidth", XrmoptionSepArg, NULL }, { "-e", "listCommand", XrmoptionSepArg, NULL