X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=zic2xpm.c;h=2fdd07805edf1e096c7beee51758fd14b5fe234e;hb=1c03d229073e56dda9e5856db5adaae51576a3bb;hp=6bc22735c7e69a4aa10ae190c2172b4a2cc3b60c;hpb=a009a27e8c1e0bfa818f12fdcae675d0babc510a;p=xboard.git diff --git a/zic2xpm.c b/zic2xpm.c index 6bc2273..2fdd078 100644 --- a/zic2xpm.c +++ b/zic2xpm.c @@ -7,15 +7,15 @@ Copyright (C) 1996, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. NOTICE: The piece images distributed with ZIICS are - copyrighted works of their original creators. Images + copyrighted works of their original creators. Images converted with zic2xpm may not be redistributed without the permission of the copyright holders. Do not contact the authors of zic2xpm or of ZIICS itself to request - permission. + permission. NOTICE: The format of the ZIICS piece file was gleaned from SHOWSETS.PAS, a part of ZIICS. Thanks to Andy McFarland - (Zek on ICC) for making this source available! ZIICS is a + (Zek on ICC) for making this source available! ZIICS is a completely separate and copyrighted work of Andy McFarland. Use and distribution of ZIICS falls under the ZIICS license, NOT the GNU General Public License. @@ -30,13 +30,13 @@ License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + GNU XBoard is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. @@ -59,7 +59,7 @@ size = Piece size. Plus 4 files for the light & dark squares. - + This means that you can extract multiple SIZES in one directory without name clashes. Extracting two sets of the SAME size in a directory will cause the second to overwrite @@ -269,7 +269,7 @@ write_xim_header (FILE *fp, int w, int h) { fputc( w, fp ); fputc( h, fp ); - + return 0; } @@ -312,7 +312,7 @@ create_piece_xim (char *outname, FILE *fpin, int W, int H) unsigned char *lump, *p, *line; long size; z2xim *ent; - + fpout = fopen( outname, "wb" ); if ( !fpout ) fatal( "Can't create output file."); @@ -323,11 +323,11 @@ create_piece_xim (char *outname, FILE *fpin, int W, int H) c = fgetc( fpin ); h = (fgetc(fpin) << 8) | c; - + ++w; ++h; if ( w != W || h != H ) - fatal( "Bad header." ); + fatal( "Bad header." ); size = vga_imagesize( w, h ) - 4; lump = (unsigned char*)malloc( size ); @@ -342,19 +342,19 @@ create_piece_xim (char *outname, FILE *fpin, int W, int H) write_xim_header( fpout, w, h ); p = lump; - + /* Write XIM data */ for( i=0; ixval, fpout ); } } - + free( lump ); free( line ); fclose( fpout ); @@ -368,7 +368,7 @@ create_piece_xpm (char *outname, FILE *fpin, int W, int H) unsigned char *lump, *p, *line; long size; z2xpm *cv; - + fpout = fopen( outname, "wb" ); if ( !fpout ) fatal( "Can't create output file."); @@ -379,11 +379,11 @@ create_piece_xpm (char *outname, FILE *fpin, int W, int H) c = fgetc( fpin ); h = (fgetc(fpin) << 8) | c; - + ++w; ++h; if ( w != W || h != H ) - fatal( "Bad header." ); + fatal( "Bad header." ); size = vga_imagesize( w, h ) - 4; lump = (unsigned char*)malloc( size ); @@ -398,12 +398,12 @@ create_piece_xpm (char *outname, FILE *fpin, int W, int H) write_xpm_header( fpout, w, h ); p = lump; - + /* Write XPM data */ for( i=0; i