summaryrefslogtreecommitdiff
path: root/mail/xfaces/files/patch-aa
blob: 44e4dac5d9e2de8a4577d8dd087289aa0ca72777 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
diff -c -N ../xfaces-3.3-org/Imakefile ./Imakefile
*** ../xfaces-3.3-org/Imakefile	Sun Mar 13 01:38:53 1994
--- ./Imakefile	Wed Dec 11 14:08:06 1996
***************
*** 53,58 ****
--- 53,60 ----
  #define USE_POP
  #define LOOKUP_HOSTNAME
  
+ #define IHaveSubdirs
+ SUBDIRS = images sounds
  #
  #  For debugging.
  #
***************
*** 65,71 ****
  #	-DLOOKUP_DEBUG
  #
  #CDEBUGFLAGS= -Wall -g 
! #CDEBUGFLAGS= -g
  
  #ifdef USE_XFACE
  XFACE_SRCS	= face_search_xface.c face_image_xface.c
--- 67,73 ----
  #	-DLOOKUP_DEBUG
  #
  #CDEBUGFLAGS= -Wall -g 
! CDEBUGFLAGS= -pipe -O2
  
  #ifdef USE_XFACE
  XFACE_SRCS	= face_search_xface.c face_image_xface.c
***************
*** 265,271 ****
  
  files:
  	@echo $(HDRS) $(SRCS) $(OTHER_FILES)
! 	
  clean::
  	rm -rf Distribution
  
--- 267,273 ----
  
  files:
  	@echo $(HDRS) $(SRCS) $(OTHER_FILES)
! 
  clean::
  	rm -rf Distribution
  
diff -c -N ../xfaces-3.3-org/XFaces.ad ./XFaces.ad
*** ../xfaces-3.3-org/XFaces.ad	Sun Mar 13 01:38:54 1994
--- ./XFaces.ad	Wed Dec 11 14:22:15 1996
***************
*** 71,78 ****
  ! lists.
  !
  
! XFaces.soundPath:	/usr/sounds:/usr/demo/SOUND/sounds
! XFaces.imagePath:	/usr/images
  
  !
  !  This is where we look for sounds/images in the "faces" format.
--- 71,78 ----
  ! lists.
  !
  
! XFaces.soundPath:	/usr/local/share/sounds
! XFaces.imagePath:	/usr/X11R6/include/X11/pixmaps
  
  !
  !  This is where we look for sounds/images in the "faces" format.
***************
*** 100,106 ****
  ! image types are set in the imageTypes resource.
  !
  
! XFaces.facedbPath:	/usr/faces
  
  !
  !  Tell how many different annotations there are. We can support any number.
--- 100,106 ----
  ! image types are set in the imageTypes resource.
  !
  
! XFaces.facedbPath:	/usr/local/share/faces
  
  !
  !  Tell how many different annotations there are. We can support any number.
***************
*** 244,250 ****
  !
  
  weather.listCommand:	wx.faces wbc
! weather.facedbPath:	/usr/faces/weather
  weather.compressImages:	False
  weather.keepOrder:	True
  weather.shapeExtra:	False
--- 244,250 ----
  !
  
  weather.listCommand:	wx.faces wbc
! weather.facedbPath:	/usr/local/share/faces/weather
  weather.compressImages:	False
  weather.keepOrder:	True
  weather.shapeExtra:	False
***************
*** 337,358 ****
  ! Could setup special sounds for mailing lists.
  !
  
! !XFaces.beforeSoundBindings:	\
! !	Cc:	foo:		train
  
  !
  ! Could use this to show a special face for users that we have no face for.
  !
  
! !XFaces.afterImageBindings:	\
! !	*	.*:		unknown
  
  !
  ! Could setup default sounds if no sound is specified.
  !
  
! !XFaces.afterSoundBindings:	\
! !	*	.*:			train
  
  !
  ! This set of bindings is run after the all of the image search has 
--- 337,358 ----
  ! Could setup special sounds for mailing lists.
  !
  
! |Faces.beforeSoundBindings:	\
! |	Cc:	foo:		train
  
  !
  ! Could use this to show a special face for users that we have no face for.
  !
  
! XFaces.afterImageBindings:	\
! 	*	.*:		unknown
  
  !
  ! Could setup default sounds if no sound is specified.
  !
  
! XFaces.afterSoundBindings:	\
! 	*	.*:			train
  
  !
  ! This set of bindings is run after the all of the image search has 
***************
*** 382,387 ****
  !  Mail from root.
  !
  
! XFaces.image.root:		root
  XFaces.sound.root:		busy
- 
--- 382,386 ----
  !  Mail from root.
  !
  
! XFaces.image.root		root
  XFaces.sound.root:		busy
diff -c -N ../xfaces-3.3-org/face_image.c ./face_image.c
*** ../xfaces-3.3-org/face_image.c	Sun Mar 13 01:38:40 1994
--- ./face_image.c	Wed Dec 11 09:22:28 1996
***************
*** 204,218 ****
      int			length;
      static char*	filename = NULL;
      static int		filename_length = 0;
!     
      /*
       *    First see if we already have this image.
      */
      
      for (fi = TheImages; fi != NULL; fi = fi->next)
      {
  	if (strcmp(fi->file, file) == 0)
  	{
  	    /*
  	     * Yep!
  	    */
--- 204,225 ----
      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,296 ****
      /*
       *   Ok, create a face image struct.
      */
-     
      fi = FaceImageCreate(file, info->type, image_data);
      
      info->item->image = fi;
--- 297,302 ----
***************
*** 367,372 ****
--- 373,383 ----
  	    break;
  	}
      }
+ 
+ #ifdef FACEDB_DEBUG
+     if (found) 
+       fprintf(stderr, "FaceImageLoad: Reporting %s as found\n", file);
+ #endif
      
      return found;
  }
diff -c -N ../xfaces-3.3-org/face_search_facedb.c ./face_search_facedb.c
*** ../xfaces-3.3-org/face_search_facedb.c	Sun Mar 13 01:38:42 1994
--- ./face_search_facedb.c	Tue Dec 10 10:41:23 1996
***************
*** 483,488 ****
--- 483,492 ----
      int			parts;
      char*		username;
      FacedbMap*		map;
+ 
+ #ifdef FACEDB_DEBUG
+     fprintf(stderr, "facedb: searching in path %s\n", path);
+ #endif
      
      if (buffer1 == NULL)
      {
***************
*** 535,541 ****
  	*/
  	
  	FaceSearchFacedbMakeName(file, info, i, buffer1);
! 	
  	/*
  	 * Try to load this guy.
  	*/
--- 539,545 ----
  	*/
  	
  	FaceSearchFacedbMakeName(file, info, i, buffer1);
! #ifndef FACE_FILES_ONLY
  	/*
  	 * Try to load this guy.
  	*/
***************
*** 550,556 ****
  	    XtFree(hostdata);
  	    return 1;
  	}
! 	
  	/*
  	 *  try adding "/face" and see what we find.
  	*/
--- 554,560 ----
  	    XtFree(hostdata);
  	    return 1;
  	}
! #endif
  	/*
  	 *  try adding "/face" and see what we find.
  	*/
***************
*** 570,598 ****
  	    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
      }
      
      /*
       *   try for user in the MISC directory.
      */
!     
      sprintf(buffer1, "%sMISC/%s", file, username);
      
  #ifdef FACEDB_DEBUG
--- 574,585 ----
  	    return 1;
  	}
  	
      }
      
      /*
       *   try for user in the MISC directory.
      */
! #ifndef FACE_FILES_ONLY
      sprintf(buffer1, "%sMISC/%s", file, username);
      
  #ifdef FACEDB_DEBUG
***************
*** 605,611 ****
  	XtFree(hostdata);
  	return 1;
      }
!     
      sprintf(buffer1, "%sMISC/%s/face", file, username);
      
  #ifdef FACEDB_DEBUG
--- 592,598 ----
  	XtFree(hostdata);
  	return 1;
      }
! #endif
      sprintf(buffer1, "%sMISC/%s/face", file, username);
      
  #ifdef FACEDB_DEBUG
***************
*** 632,638 ****
  	*/
  	
  	FaceSearchFacedbMakeName(file, info, i, buffer1);
! 	
  	/*
  	 * Try to load this guy.
  	*/
--- 619,625 ----
  	*/
  	
  	FaceSearchFacedbMakeName(file, info, i, buffer1);
! #ifndef FACE_FILES_ONLY
  	/*
  	 * Try to load this guy.
  	*/
***************
*** 653,659 ****
  	    
  	    return 1;
  	}
! 	
  	/*
  	 *  try adding "/face" and see what we find.
  	*/
--- 640,646 ----
  	    
  	    return 1;
  	}
! #endif
  	/*
  	 *  try adding "/face" and see what we find.
  	*/
***************
*** 679,701 ****
  	    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);
--- 666,671 ----
***************
*** 704,710 ****
      /*
       *   One last try.  The MISC directory. Look for "unknown"
      */
!     
      sprintf(buffer1, "%sMISC/unknown", file);
      
  #ifdef FACEDB_DEBUG
--- 674,680 ----
      /*
       *   One last try.  The MISC directory. Look for "unknown"
      */
! #ifndef FACE_FILES_ONLY
      sprintf(buffer1, "%sMISC/unknown", file);
      
  #ifdef FACEDB_DEBUG
***************
*** 721,727 ****
  	
  	return 1;
      }
!     
      sprintf(buffer1, "%sMISC/unknown/face", file);
      
  #ifdef FACEDB_DEBUG
--- 691,697 ----
  	
  	return 1;
      }
! #endif
      sprintf(buffer1, "%sMISC/unknown/face", file);
      
  #ifdef FACEDB_DEBUG
Common subdirectories: ../xfaces-3.3-org/images and ./images
diff -c -N ../xfaces-3.3-org/mail_items.c ./mail_items.c
*** ../xfaces-3.3-org/mail_items.c	Sun Mar 13 01:38:44 1994
--- ./mail_items.c	Tue Dec 10 10:25:32 1996
***************
*** 351,359 ****
  MailBoxClean()
  {
      MailItem *item;
!     
!     for (item = TheMailItems; item != NULL; item = item->next)
      {
  	if (item->in_use == 0)
  	{
  	    MailItemFree(item);
--- 351,368 ----
  MailBoxClean()
  {
      MailItem *item;
!     MailItem *next_item;
!    
!     for (item = TheMailItems; item != NULL; item = next_item)
      {
+ 	/*
+ 	 * Save item->next here because if MailItemFree() is called, it will
+ 	 * free item and we won't be able to access it after the call.
+ 	 * Found by phkmalloc. Philippe Charnier (charnier@xp11.frmug.org)
+ 	 * 11/96.
+ 	 */
+ 	next_item = item->next;
+ 
  	if (item->in_use == 0)
  	{
  	    MailItemFree(item);
***************
*** 651,656 ****
--- 660,666 ----
      {
  	item->prev = TheMailItemsTail;
  	item->prev->next = item;
+ 	TheMailItemsTail = item;
      }
      
      item->face = FaceDisplay(item);
diff -c -N ../xfaces-3.3-org/main.c ./main.c
*** ../xfaces-3.3-org/main.c	Sun Mar 13 01:38:45 1994
--- ./main.c	Wed Dec 11 14:23:05 1996
***************
*** 124,130 ****
      },
      {
  	"spoolDir", "SpoolDir", XtRString, sizeof(String),
! 	offset(spool_dir), XtRString, "/usr/spool/mail"
      },
      {
  	"popHost", "PopHost", XtRString, sizeof(String),
--- 124,130 ----
      },
      {
  	"spoolDir", "SpoolDir", XtRString, sizeof(String),
! 	offset(spool_dir), XtRString, "/var/mail/"
      },
      {
  	"popHost", "PopHost", XtRString, sizeof(String),
***************
*** 144,158 ****
      },
      {
  	"imagePath", "Path", XtRString, sizeof(String),
! 	offset(image_path), XtRString, "/usr/images"
      },
      {
  	"soundPath", "Path", XtRString, sizeof(String),
! 	offset(sound_path), XtRString, "/usr/sounds"
      },
      {
  	"facedbPath", "Path", XtRString, sizeof(String),
! 	offset(facedb_path), XtRString, "/usr/local/faces"
      },
      {
  	"machine", "Path", XtRString, sizeof(String),
--- 144,158 ----
      },
      {
  	"imagePath", "Path", XtRString, sizeof(String),
! 	offset(image_path), XtRString, "/usr/X11R6/include/X11/pixmaps"
      },
      {
  	"soundPath", "Path", XtRString, sizeof(String),
! 	offset(sound_path), XtRString, "/usr/local/share/sounds"
      },
      {
  	"facedbPath", "Path", XtRString, sizeof(String),
! 	offset(facedb_path), XtRString, "/usr/local/share/faces"
      },
      {
  	"machine", "Path", XtRString, sizeof(String),
***************
*** 297,303 ****
  static XrmOptionDescRec options[] =
  {
      {
! 	"-c", "frame.setWidth", XrmoptionSepArg, NULL
      },
      {
  	"-e", "listCommand", XrmoptionSepArg, NULL
--- 297,303 ----
  static XrmOptionDescRec options[] =
  {
      {
! 	"-c", "frame.maxWidth", XrmoptionSepArg, NULL
      },
      {
  	"-e", "listCommand", XrmoptionSepArg, NULL
Common subdirectories: ../xfaces-3.3-org/sounds and ./sounds
diff -c -N ../xfaces-3.3-org/xfaces.man ./xfaces.man
*** ../xfaces-3.3-org/xfaces.man	Sun Mar 13 01:38:54 1994
--- ./xfaces.man	Wed Dec 11 16:20:47 1996
***************
*** 171,177 ****
  .TP 8
  .BI XFaces.spoolDir: " <mail spool directory>"
  This resource specifies the directory that contains user mail spool
! files.  The default is \fI/usr/spool/mail\fP.  On some machines (SVR4?)
  you may want to set this to \fI/usr/mail\fP.
  .TP 8
  .BI XFaces.popHost: " <hostname>"
--- 171,177 ----
  .TP 8
  .BI XFaces.spoolDir: " <mail spool directory>"
  This resource specifies the directory that contains user mail spool
! files.  The default is \fI/var/mail\fP.  On some machines (SVR4?)
  you may want to set this to \fI/usr/mail\fP.
  .TP 8
  .BI XFaces.popHost: " <hostname>"
***************
*** 198,209 ****
  .BI XFaces.imagePath: " <image path>"
  This resource specifies a colon-separated list of directories that
  specify the default directories to use for image files.  The default
! is \fI/usr/images\fP.
  .TP 8
  .BI XFaces.soundPath: " <sound path>"
  This resource specifies a colon-separated list of directories that
  specify the default directories to use for sound files.  The default
! is \fI/usr/sounds\fP.
  .TP 8
  .BI XFaces.facedbPath: " <facedb path>"
  This is a list of directories that contain a multi-level directory hierarchy.
--- 198,209 ----
  .BI XFaces.imagePath: " <image path>"
  This resource specifies a colon-separated list of directories that
  specify the default directories to use for image files.  The default
! is \fI/usr/X11/include/X11/pixmaps\fP.
  .TP 8
  .BI XFaces.soundPath: " <sound path>"
  This resource specifies a colon-separated list of directories that
  specify the default directories to use for sound files.  The default
! is \fI/usr/local/share/sounds\fP.
  .TP 8
  .BI XFaces.facedbPath: " <facedb path>"
  This is a list of directories that contain a multi-level directory hierarchy.
***************
*** 289,295 ****
  no image.  This defaults to \fITrue\fP.
  .TP 8
  .BI XFaces.useCommands: " <flag>"
! This resource tells \FIXFaces\fP if it needs to search for shell commands to
  run in addition to image and sounds.  The default is \fIFalse\fP.
  .TP 8
  .BI XFaces.useContentLength: " <flag>"
--- 289,295 ----
  no image.  This defaults to \fITrue\fP.
  .TP 8
  .BI XFaces.useCommands: " <flag>"
! This resource tells \fIXFaces\fP if it needs to search for shell commands to
  run in addition to image and sounds.  The default is \fIFalse\fP.
  .TP 8
  .BI XFaces.useContentLength: " <flag>"
***************
*** 318,324 ****
  .TP 8
  .B xpm-shaped
  This is a shaped color image.  Shaped xpm files should be named
! \fIface-shaped.xpm\fP.
  .TP 8
  .B xpm
  This is a non shaped color image. These files should be named
--- 318,324 ----
  .TP 8
  .B xpm-shaped
  This is a shaped color image.  Shaped xpm files should be named
! \fIface-shape.xpm\fP.
  .TP 8
  .B xpm
  This is a non shaped color image. These files should be named
***************
*** 357,363 ****
  The \fI<format list>\fP is currently ignored for the \fBsoundSearch\fP
  resource. Both the \fI<format list>\fP and the <search path> are 
  (except if you use the \fIfacedb\fP search) for the \fBcommandSearch\fP
! resoiurce.  If the \fI<format list>\fP is empty then the list in the
  \fBimageFormats\fP resource is used.  If the \fI<search path>\fP is
  empty then the \fBfacedbPath\fP is used for \fIfacedb\fP searches for
  both sounds and images and one of the \fBsoundPath\fP or
--- 357,363 ----
  The \fI<format list>\fP is currently ignored for the \fBsoundSearch\fP
  resource. Both the \fI<format list>\fP and the <search path> are 
  (except if you use the \fIfacedb\fP search) for the \fBcommandSearch\fP
! resource.  If the \fI<format list>\fP is empty then the list in the
  \fBimageFormats\fP resource is used.  If the \fI<search path>\fP is
  empty then the \fBfacedbPath\fP is used for \fIfacedb\fP searches for
  both sounds and images and one of the \fBsoundPath\fP or