4 http://www.mit.edu/afs/athena/contrib/graphics/src/xv/patches/png/xvpng.diff
5 It was edited to fit into the NetBSD Packages Collection! - HF
7 ---------------------------------------------------------------------------
10 --- xvdir.c.patched Sun Jun 13 03:27:12 1999
11 +++ xvdir.c Sun Jun 13 03:33:01 1999
21 "PBM/PGM/PPM (ascii)",
22 @@ -1123,6 +1126,14 @@
27 + else if (fmt == F_PNG) { /* PNG */
28 + PNGSaveParams(fullname, col);
29 + PNGDialog(1); /* open PNG Dialog box */
30 + dbut[S_BOK].lit = 0; BTRedraw(&dbut[S_BOK]);
31 + return 0; /* always 'succeeds' */
39 rv = WriteFITS (fp, thepic, ptype, w, h, rp, gp, bp, nc, col,
43 rv = WriteMAG (fp, thepic, ptype, w, h, rp, gp, bp, nc, col,
45 @@ -1415,19 +1427,26 @@
46 (strcmp(lowsuf,"eps" )==0) ||
47 (strcmp(lowsuf,"rgb" )==0) ||
48 (strcmp(lowsuf,"tga" )==0) ||
49 - (strcmp(lowsuf,"xpm" )==0) ||
50 (strcmp(lowsuf,"fits")==0) ||
51 (strcmp(lowsuf,"fts" )==0) ||
53 (strcmp(lowsuf,"jpg" )==0) ||
54 (strcmp(lowsuf,"jpeg")==0) ||
55 (strcmp(lowsuf,"jfif")==0) ||
58 (strcmp(lowsuf,"tif" )==0) ||
59 (strcmp(lowsuf,"tiff")==0) ||
62 + (strcmp(lowsuf,"png" )==0) ||
64 + (strcmp(lowsuf,"xpm" )==0) ||
65 (strcmp(lowsuf,"mag" )==0) ||
66 (strcmp(lowsuf,"pic" )==0) ||
67 (strcmp(lowsuf,"mki" )==0) ||
68 (strcmp(lowsuf,"pi" )==0) ||
69 - (strcmp(lowsuf,"p2" )==0)){
70 + (strcmp(lowsuf,"p2" )==0)) {
72 /* found one. set lowsuf = to the new suffix, and tack on to filename */
77 case F_TIFF: strcpy(lowsuf,"tif"); break;
80 + case F_PNG: strcpy(lowsuf,"png"); break;
82 case F_MAG: strcpy(lowsuf,"mag"); break;
83 case F_PIC: strcpy(lowsuf,"pic"); break;