1---- Cut Here and feed the following to sh ----
2#!/bin/sh
3# This is a shell archive (produced by GNU sharutils 4.2c).
4# To extract the files from this archive, save it to some FILE, remove
5# everything before the `!/bin/sh' line above, then type `sh FILE'.
6#
7# Made on 1999-10-16 18:01 MEST by <root@nail>.
8# Source directory was `/tmp/maps2image'.
9#
10# Existing files will *not* be overwritten unless `-c' is specified.
11#
12# This shar contains:
13# length mode       name
14# ------ ---------- ------------------------------------------
15#   3164 -rw-rw-r-- README
16#    863 -rw-rw-rw- COPYRIGHT
17#   1027 -rw-rw-r-- Makefile
18#  10965 -rw-rw-r-- maps2image.c
19#   5637 -rw-rw-r-- bdf2c.c
20#   5025 -r--r--r-- helvR08.bdf.gz
21#
22save_IFS="${IFS}"
23IFS="${IFS}:"
24gettext_dir=FAILED
25locale_dir=FAILED
26first_param="$1"
27for dir in $PATH
28do
29  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
30     && ($dir/gettext --version >/dev/null 2>&1)
31  then
32    set `$dir/gettext --version 2>&1`
33    if test "$3" = GNU
34    then
35      gettext_dir=$dir
36    fi
37  fi
38  if test "$locale_dir" = FAILED && test -f $dir/shar \
39     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
40  then
41    locale_dir=`$dir/shar --print-text-domain-dir`
42  fi
43done
44IFS="$save_IFS"
45if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
46then
47  echo=echo
48else
49  TEXTDOMAINDIR=$locale_dir
50  export TEXTDOMAINDIR
51  TEXTDOMAIN=sharutils
52  export TEXTDOMAIN
53  echo="$gettext_dir/gettext -s"
54fi
55if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
56  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
57    shar_n= shar_c='
58'
59  else
60    shar_n=-n shar_c=
61  fi
62else
63  shar_n= shar_c='\c'
64fi
65touch -am 1231235999 $$.touch >/dev/null 2>&1
66if test ! -f 1231235999 && test -f $$.touch; then
67  shar_touch=touch
68else
69  shar_touch=:
70  echo
71  $echo 'WARNING: not restoring timestamps.  Consider getting and'
72  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
73  echo
74fi
75rm -f 1231235999 $$.touch
76#
77$echo $shar_n 'x -' 'lock directory' "\`_sh02319': "$shar_c
78if mkdir _sh02319; then
79  $echo 'created'
80else
81  $echo 'failed to create'
82  exit 1
83fi
84# ============= README ==============
85if test -f 'README' && test "$first_param" != -c; then
86  $echo 'x -' SKIPPING 'README' '(file already exists)'
87else
88  $echo 'x -' extracting 'README' '(text)'
89  sed 's/^X//' << 'SHAR_EOF' > 'README' &&
90README for maps2image -- a xpilot maps to image converter.
91X
92WHAT IS IT?
93This program will take a set of xpilot maps and builds a
94single PBM image from them. Each image is labeled with the
95map's name below it.
96X
97WHAT USE IS IT?
98If you have a lot of xpilot maps, this is a simple way to
99remind yourself of what the different maps are/look like.
100Each image will show only the walls of a map. Normally this
101is enough to remind you of what it really looks like when
102you actually play the map.
103X
104HOW DO I COMPILE?
105Simple. If you have gcc, you don't need to change anything.
106If you do not have gcc, you need to change the Makefile to
107reflect the ANSI compiler. Follow the ``detailed''
108instructions in the Makefile to do this. :-)
109And now, the big moment has arrived! Type:
110X
111X	make
112X
113If everything goes well, you should now have the executable
114maps2image.
115(Note: gcc gives a warning about some unreachable code. This
116warning is bogus and should thusly be ignored!)
117X
118If, for some reason, you do not like the font that is used,
119you can change the FONT= line in the Makefile. This should
120point to a BDF format fontfile. Included is the 8 point
121Helvetica font from the 75dpi directory of the X11R5
122distribution. You can substitute any BDF font here. However,
123if you use a large font, the map name will not be completely
124displayed.
125X
126HOW DO I USE IT?
127The list of maps you want converted to an image are given on
128the command line and the PBM image is written to stdout.
129Here is a typical use of the program:
130X
131X	maps2image /usr/local/lib/xpilot/maps/*.map | xv -
132X
133The program has a couple of optional switches:
134X
135X	-s image_size	specifies the size of each of the individual
136X			map images.  The default is 64.
137X
138X	-x ncols	specifies the number of columns of map images
139X			to use.  If this switch is not specified, it will
140X			try to make the image as square as possible.
141X	-i		invert the images.  By default areas you can fly
142X			in are white, with this option it is more like
143X			what it looks like when playing.
144X	-v		Turn on verbose mode.  This will output progress
145X			messages to stderr.  Useful only when bored.
146X	-b		Instead of a pbm image, create an X11 bitmap
147X	-l		Do not add a label to each image
148X
149The list of files should be xpilot map files.  They may be compressed
150with gzip or compress.  (Standard extension looked for are .gz and .Z)
151X
152PBM???  WHAT'S THAT?
153The PBM image is format is a simple Portable BitMap format.
154Most X based image viewers can deal with PBM files, but you
155can always get the latest pbmplus image conversion package
156to convert this image to whatever format you want.
157X
158SO, NOW WHAT?
159Now it is your job to write an X program which will display
160this image and then allow you to select a map you want to
161start a server with... What? Are you still reading this
162instead of writing this xpilots starter????
163X
164COMPLAINTS?
165You can complain to Andrew@SDSU.Edu (Ender) if you want.
166However all whines will be ignored. If you don't like the
167program, don't use it; I assume you were doing ok without it
168before you got it... If you find bugs or have other
169suggestions, let me know. I have only compiled this on a Sun
170using both gcc 2.5.8 and Sun's acc. (We run SunOS 4.1.3_U1)
171X
172SHAR_EOF
173  $shar_touch -am 1016175999 'README' &&
174  chmod 0664 'README' ||
175  $echo 'restore of' 'README' 'failed'
176  if ( md5sum --help </dev/null 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
177  && ( md5sum --version </dev/null 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
178    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
179    || $echo 'README:' 'MD5 check failed'
1805f7c7c1b3eb209cd3112d9fe9452fe30  README
181SHAR_EOF
182  else
183    shar_count="`LC_ALL=C wc -c < 'README'`"
184    test 3164 -eq "$shar_count" ||
185    $echo 'README:' 'original size' '3164,' 'current size' "$shar_count!"
186  fi
187fi
188# ============= COPYRIGHT ==============
189if test -f 'COPYRIGHT' && test "$first_param" != -c; then
190  $echo 'x -' SKIPPING 'COPYRIGHT' '(file already exists)'
191else
192  $echo 'x -' extracting 'COPYRIGHT' '(text)'
193  sed 's/^X//' << 'SHAR_EOF' > 'COPYRIGHT' &&
194Copyright (c) 1994 by Andrew Scherpbier.
195You may do what you wish with this package as long as it
196isn't going to cost me anything! If you find it so useful
197that you can sell it and make a $1,000,000, good for you!
198More power to you! If this packages causes any damage, don't
199blame me. You didn't have to compile/run it...
200X
201Comments/Questions to:
202____________________________________________________________________________
203Andrew "Race Turtle" Scherpbier, SysMgr
204College of Sciences                               ____
205San Diego State University                       /OOOO\,P
206EMAIL:	Andrew@SDSU.Edu                         ,------'
207VOICE:	(619) 594-5026                            U   U
208FAX:	(619) 594-6381
209"Sometimes, when I think that things cannot possibly get any worse, they do"
210____________________________________________________________________________
211X
212X
213SHAR_EOF
214  $shar_touch -am 1016175999 'COPYRIGHT' &&
215  chmod 0666 'COPYRIGHT' ||
216  $echo 'restore of' 'COPYRIGHT' 'failed'
217  if ( md5sum --help </dev/null 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
218  && ( md5sum --version </dev/null 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
219    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
220    || $echo 'COPYRIGHT:' 'MD5 check failed'
221e82fb9dfc0edcf9cb955deef0c4944a6  COPYRIGHT
222SHAR_EOF
223  else
224    shar_count="`LC_ALL=C wc -c < 'COPYRIGHT'`"
225    test 863 -eq "$shar_count" ||
226    $echo 'COPYRIGHT:' 'original size' '863,' 'current size' "$shar_count!"
227  fi
228fi
229# ============= Makefile ==============
230if test -f 'Makefile' && test "$first_param" != -c; then
231  $echo 'x -' SKIPPING 'Makefile' '(file already exists)'
232else
233  $echo 'x -' extracting 'Makefile' '(text)'
234  sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
235#
236# Makefile for maps2image.
237#
238# Change the following line to reflect your ANSI C compiler
239#
240CC	=	gcc
241CFLAGS	=	-O
242OBJS	=	maps2image.o
243LIBS	=	-lm
244TARGET	=	maps2image
245X
246#
247# Change the FONT macro to point to whatever font you want
248# to use to display the map names below the images.
249#
250FONT	=	helvR08.bdf
251X
252all:		$(FONT) font.h maps2image bdf2c
253X
254helvR08.bdf:	helvR08.bdf.gz
255X	gzip -cd < helvR08.bdf.gz > helvR08.bdf
256X
257helvR10.bdf:	helvR10.bdf.gz
258X	gzip -cd < helvR10.bdf.gz > helvR10.bdf
259X
260helvR12.bdf:	helvR12.bdf.gz
261X	gzip -cd < helvR12.bdf.gz > helvR12.bdf
262X
263helvR14.bdf:	helvR14.bdf.gz
264X	gzip -cd < helvR14.bdf.gz > helvR14.bdf
265X
266$(TARGET):	$(OBJS) font.h
267X	$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
268X
269font.h:	bdf2c Makefile
270X	./bdf2c $(FONT) >font.h
271X
272bdf2c:	bdf2c.o
273X	$(CC) $(CFLAGS) -o bdf2c bdf2c.o
274X
275install:
276X	@echo "Sorry, I am too lazy to install.  Do it yourself."
277X
278depend:
279X	makedepend -- $(CFLAGS) -- $(OBJS:%.o=%.c)
280X
281shar:
282X	gzip helvR*.bdf
283X	shar -c -p README COPYRIGHT Makefile maps2image.c bdf2c.c -B helvR*.gz >maps2image.shar
284X
285SHAR_EOF
286  $shar_touch -am 1016180099 'Makefile' &&
287  chmod 0664 'Makefile' ||
288  $echo 'restore of' 'Makefile' 'failed'
289  if ( md5sum --help </dev/null 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
290  && ( md5sum --version </dev/null 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
291    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
292    || $echo 'Makefile:' 'MD5 check failed'
293f86501324f9df682ed612f7c261fe603  Makefile
294SHAR_EOF
295  else
296    shar_count="`LC_ALL=C wc -c < 'Makefile'`"
297    test 1027 -eq "$shar_count" ||
298    $echo 'Makefile:' 'original size' '1027,' 'current size' "$shar_count!"
299  fi
300fi
301# ============= maps2image.c ==============
302if test -f 'maps2image.c' && test "$first_param" != -c; then
303  $echo 'x -' SKIPPING 'maps2image.c' '(file already exists)'
304else
305  $echo 'x -' extracting 'maps2image.c' '(text)'
306  sed 's/^X//' << 'SHAR_EOF' > 'maps2image.c' &&
307/**********************************************************************/
308/*                                                                    */
309/*  File:          maps2image.c                                       */
310/*  Author:        Andrew W. Scherpbier                               */
311/*  Version:       1.00                                               */
312/*  Created:       27 Feb 1994                     		      */
313/*                                                                    */
314/*  Copyright (c) 1994 Andrew Scherpbier                              */
315/*                All Rights Reserved.                                */
316/*                                                                    */
317/*                                                                    */
318/*--------------------------------------------------------------------*/
319/*  Description:  Convert a series of maps to an image                */
320/*                                                                    */
321/**********************************************************************/
322X
323#include <stdio.h>
324#include <string.h>
325#include <math.h>
326#include <malloc.h>
327X
328#include "font.h"
329X
330#define	STRING_HEIGHT	(FONTY)
331X
332#define	PUBLIC
333#define	PRIVATE		static
334X
335#define	TRUE		(1)
336#define	FALSE		(0)
337X
338#define	OK		(0)
339#define	NOTOK		(-1)
340X
341#define	when		break;case
342#define	orwhen		case
343#define	otherwise	break;default
344X
345X
346X
347/* Private routines
348X * ================
349X */
350PRIVATE void one2eight(char data, char *image);
351PRIVATE int build_char(char ch, char *image, int x, int y, int pos);
352PRIVATE void add_title(char *image, int x, int y, char *filename);
353PRIVATE char *convert_map(int width, int height, FILE *fl);
354PRIVATE void build_image(char *image, int x, int y, FILE *fl);
355X
356X
357/* Private variables
358X * =================
359X */
360X
361X
362/* Public routines
363X * ===============
364X */
365X
366X
367/* Public variables
368X * ================
369X */
370int	mapsize = 64;
371int	xcount = 0, ycount = 0;
372int	count;
373int	xsize, ysize;
374int	label = 1;		/* Produce a map label by default */
375int	invert = 0;
376int	verbose = 0;
377int	bitmap = 0;
378X
379X
380/**************************************************************************
381X * PUBLIC int main(int ac, char **av)
382X *
383X */
384PUBLIC int main(int ac, char **av)
385{
386X	int		c;
387X	extern char	*optarg;
388X	extern int	optind;
389X	char		*image;
390X	int		x, y;
391X	int		i;
392X	int		value;
393X	char		*p;
394X
395X	/*
396X	 * Deal with arguments
397X	 */
398X	while ((c = getopt(ac, av, "s:x:ivbl")) != EOF)
399X	{
400X		switch (c)
401X		{
402X			when 's':
403X				mapsize = atoi(optarg);
404X			when 'x':
405X				xcount = atoi(optarg);
406X			when 'i':
407X				invert = 1;
408X			when 'v':
409X				verbose = 1;
410X			when 'b':
411X				bitmap = 1;
412X			when 'l':
413X				label = 0;
414X			when '?':
415X				fprintf(stderr, "usage: %s [-s size][-x nmaps][-i][-v][-l] xpmap ...\n", av[0]);
416X				exit(0);
417X		}
418X	}
419X
420X	/*
421X	 *   compute the actual size of the resultant image. We do this by
422X	 *   taking the square root of the total number of maps and using
423X	 *   the truncated value as the y count. The x count is then
424X	 *   caluculated from this. Knowing the number of maps on a side,
425X	 *   we can then compute the total image size.
426X	 */
427X	count = ac - optind;
428X
429X	if (count < 1)
430X	{
431X		fprintf(stderr, "%s: you need to specify at least one map\n", av[0]);
432X		exit(0);
433X	}
434X
435X	if (xcount)
436X	{
437X		/*
438X		 * The user specified an X dimension
439X		 */
440X		ycount = (count + xcount - 1) / xcount;
441X	}
442X	else
443X	{
444X		ycount = sqrt((double) count);
445X		xcount = (count + ycount - 1) / ycount;
446X	}
447X
448X	if (verbose)
449X		fprintf(stderr, "%d images.  Using %d by %d\n", count, xcount, ycount);
450X
451X	xsize = (mapsize + 2) * xcount;
452X	if (label)
453X		ysize = (mapsize + 2 + STRING_HEIGHT) * ycount;
454X	else
455X	    	ysize = (mapsize + 2) * ycount;
456X
457X	if (verbose)
458X		fprintf(stderr, "Image size: %d x %d\n", xsize, ysize);
459X
460X	/*
461X	 *   Reserve enough space for the image.
462X	 */
463X	image = malloc(xsize * ysize);
464X	memset(image, invert, xsize * ysize);
465X
466X	/*
467X	 *   Build the image
468X	 */
469X	x = 0; y = 0;
470X	for (i = optind; i < ac; i++)
471X	{
472X		char	*p = strrchr(av[i], '.');
473X		char	command[100];
474X		FILE	*fl;
475X
476X		command[0] = '\0';
477X		if (p && strcmp(p, ".gz") == 0)
478X			sprintf(command, "gunzip<%s", av[i]);
479X		else if (p && strcmp(p, ".Z") == 0)
480X			sprintf(command, "uncompress<%s", av[i]);
481X		if (*command)
482X			fl = popen(command, "r");
483X		else
484X			fl = fopen(av[i], "r");
485X
486X		if (!fl)
487X			perror("open");
488X
489X		build_image(image, x, y, fl);
490X		if (label)
491X			add_title(image, x, y, av[i]);
492X
493X		if (*command)
494X			pclose(fl);
495X		else
496X			fclose(fl);
497X
498X		x++;
499X		if (x >= xcount)
500X		{
501X			x = 0;
502X			y++;
503X		}
504X	}
505X
506X	/*
507X	 *   Output the image.  The output image can be either pbm or bmp
508X	 */
509X	if (bitmap)
510X	{
511X		int	count = 0;
512X		int	Xsize = (xsize + 7) & 0xfff8;
513X
514X		printf("#define maps_width %d\n#define maps_height %d\n", Xsize, ysize);
515X		printf("static unsigned char maps_bits[] = {\n   ");
516X		p = image;
517X		value = 0;
518X		i = 0x80;
519X		for (y = 0; y < ysize; y++)
520X		{
521X			for (x = 0; x < Xsize; x++)
522X			{
523X				if (*p)
524X					value |= 0x80;
525X				i >>= 1;
526X				if (i == 0)
527X				{
528X					printf("0x%02x, ", value & 0xff);
529X					count++;
530X					if (count >= 12)
531X					{
532X						count = 0;
533X						printf("\n   ");
534X					}
535X					i = 0x80;
536X					value = 0;
537X				}
538X				value >>= 1;
539X				p++;
540X			}
541X			if (i != 0x80)
542X			{
543X				printf("0x%02x, ", value & 0xff);
544X				count++;
545X				if (count >= 12)
546X				{
547X					count = 0;
548X					printf("\n   ");
549X				}
550X				i = 0x80;
551X				value = 0;
552X			}
553#if 0
554X			value = 0;
555#endif
556X			p -= Xsize - xsize;
557X		}
558X		printf("\n};\n");
559X	}
560X	else
561X	{
562X		printf("P4\n%d %d\n", xsize, ysize);
563X		p = image;
564X		for (y = 0; y < ysize; y++)
565X		{
566X			value = 0;
567X			i = 0x80;
568X			for (x = 0; x < xsize; x++)
569X			{
570X				if (*p)
571X					value |= i;
572X				i >>= 1;
573X				if (i == 0)
574X				{
575X					putchar(value);
576X					i = 0x80;
577X					value = 0;
578X				}
579X				p++;
580X			}
581X			if (i != 0x80)
582X				putchar(value);
583X			value = 0;
584X		}
585X	}
586X	if (verbose)
587X		fprintf(stderr, "\ndone\n");
588X	return 0;
589}
590X
591X
592/**************************************************************************
593X * PRIVATE void build_image(char *image, int x, int y, FILE *fl)
594X *   Read a map and create the image for it. The image is placed
595X *   at location (x, y)
596X */
597PRIVATE void build_image(char *image, int x, int y, FILE *fl)
598{
599X	int	width, height;
600X	char	buffer[1024];
601X	char	*token;
602X
603X	if (!fl)
604X		return;
605X
606X	if (verbose)
607X		fprintf(stderr, "\rbuilding %d x %d   ", x, y);
608X
609X	while (fgets(buffer, sizeof(buffer), fl))
610X	{
611X		if (strncasecmp(buffer, "mapwidth", 8) == 0)
612X		{
613X			token = strtok(buffer, " :\r\t\n");
614X			width = atoi(strtok(NULL, " :\t\r\n"));
615X		}
616X		else if (strncasecmp(buffer, "mapheight", 9) == 0)
617X		{
618X			token = strtok(buffer, " :\r\t\n");
619X			height = atoi(strtok(NULL, " :\t\r\n"));
620X		}
621X		else if (strncasecmp(buffer, "mapdata", 7) == 0)
622X		{
623X			char	*p, *data, *topleft;
624X			int	j;
625X
626X			p = data = convert_map(width, height, fl);
627X
628X			/*
629X			 *   Compute the top left location of this image in the big output
630X			 *   image
631X			 */
632X			if (label)
633X				topleft = image + xsize * (mapsize + 2 + STRING_HEIGHT) * y + 1 + xsize + (mapsize + 2) * x;
634X			else
635X				topleft = image + xsize * (mapsize + 2) * y + 1 + xsize + (mapsize + 2) * x;
636X			for (j = 0; j < mapsize; j++)
637X			{
638X				memcpy(topleft, p, mapsize);
639X				topleft += xsize;
640X				p += mapsize;
641X			}
642X			fclose(fl);
643X			free(data);
644X		}
645X	}
646X	fclose(fl);
647}
648X
649X
650/**************************************************************************
651X * PRIVATE void add_title(char *image, int x, int y, char *filename)
652X *   Create the title for the map below the map image. The title
653X *   is just the file name without the .map at the end.
654X */
655PRIVATE void add_title(char *image, int x, int y, char *filename)
656{
657X	char	*p = strrchr(filename, '/');
658X	int	pos;
659X	char	*s;
660X	char	*botleft;
661X	int	j;
662X
663X	if (!p)
664X		p = filename;
665X	else
666X		p++;
667X	s = strrchr(p, '.');
668X	if (s)
669X		*s = '\0';
670X
671X	/*
672X	 *   Make the string image
673X	 */
674X	s = malloc(mapsize * STRING_HEIGHT);
675X	memset(s, 0, mapsize * STRING_HEIGHT);
676X	memset(s, invert, mapsize);
677X	pos = 0;
678X	while (*p)
679X	{
680X		pos = build_char(*p, s, mapsize, STRING_HEIGHT, pos);
681X		p++;
682X	}
683X
684X	/*
685X	 *   Find the bottom of the image so we can put the string there.
686X	 */
687X	botleft = image + xsize * (mapsize + 2 + STRING_HEIGHT) * y + 1 + xsize + (mapsize + 2) * x;
688X	botleft += xsize * mapsize;
689X	p = s;
690X	for (j = 0; j < STRING_HEIGHT; j++)
691X	{
692X		memcpy(botleft, p, mapsize);
693X		botleft += xsize;
694X		p += mapsize;
695X	}
696X	free(s);
697}
698X
699X
700/**************************************************************************
701X * PRIVATE int build_char(char ch, char *image, int x, int y, int pos)
702X *
703X */
704PRIVATE int build_char(char ch, char *image, int x, int y, int pos)
705{
706X	int	i, j, n;
707X	char	*p;
708X	char	*data;
709X
710X	/*
711X	 *   Locate the character
712X	 */
713X	for (i = 0; font[i].ch; i++)
714X	{
715X		if (font[i].ch == ch)
716X			break;
717X	}
718X	if (font[i].ch == '\0')
719X		return pos;
720X
721X	if (pos + font[i].width > x)
722X		return pos;		/* Don't overwrite the bounding box */
723X
724X	p = image + pos;
725X	data = (char *) font[i].data;
726X	for (n = 0; n <= FONTY; n++)
727X	{
728X		for (j = 0; j < FONTX; j++)
729X		{
730X			one2eight(*data++, p + j * 8);
731X		}
732X		p += x;
733X	}
734X	return pos + font[i].width + 1;
735}
736X
737X
738/**************************************************************************
739X * PRIVATE void one2eight(char data, char *image)
740X *   Convert one byte (8 bits) to a sequence of 8 bytes.
741X */
742PRIVATE void one2eight(char data, char *image)
743{
744X	int	mask = 0x80;
745X	int	i;
746X
747X	for (i = 0; i < 8; i++)
748X	{
749X		if (data & mask)
750X			*image = 1;
751X		image++;
752X		mask >>= 1;
753X	}
754}
755X
756X
757/**************************************************************************
758X * PRIVATE char *convert_map(int width, int height, FILE *fl)
759X *   Create an image from map data.
760X */
761PRIVATE char *convert_map(int width, int height, FILE *fl)
762{
763X	char	buffer[10240];
764X	char	*p;
765X	float	div;
766X	int	x, y;
767X	int	lx, ly, px, py;
768X	int	value = 1;
769X	int	i, j;
770X	char	*output = malloc(mapsize * mapsize);
771X
772X	if (width >= height)
773X		div = ((float) mapsize) / width;
774X	else
775X		div = ((float) mapsize) / height;
776X
777X	value ^= invert;
778X
779X	y = 0;
780X	memset((char *) output, invert, mapsize * mapsize);
781X
782X	/*
783X	 *   If the map is smaller than the image we are producing, we
784X	 *   need to scale the map, otherwise we need to scale the image.
785X	 */
786X	if (div > 1)
787X	{
788X		ly = 0;
789X		px = 0;
790X		py = 0;
791X		while (fgets(buffer, sizeof(buffer), fl) && y < height)
792X		{
793X			x = 0;
794X			px = 0;
795X			p = buffer;
796X			while (*p && x < width)
797X			{
798X				lx = (x + 1) * div;
799X				if (strchr("xswqa#", *p))
800X				{
801X					for (i = px; i < lx; i++)
802X						output[ly * mapsize + i] = value;
803X				}
804X				else
805X				{
806X					for (i = px; i <= lx; i++)
807X						output[ly * mapsize + i] = !value;
808X				}
809X				px = lx;
810X				p++;
811X				x++;
812X			}
813X			y++;
814X			px = 0;
815X			ly = y * div;
816X			/*
817X			 *   Copy the previous line as many times as needed...
818X			 */
819X			for (j = py; j < ly; j++)
820X			{
821X				memcpy(&output[j * mapsize], &output[py * mapsize], mapsize);
822X			}
823X			py = ly;
824X		}
825X	}
826X	else
827X	{
828X		while (fgets(buffer, sizeof(buffer), fl) && y < height)
829X		{
830X			x = 0;
831X			p = buffer;
832X			while (*p && x < width)
833X			{
834X				if (strchr("xswqa#", *p))
835X				{
836X					output[(int)(y * div + 0.5) * mapsize + (int)(x * div + 0.5)] = value;
837X				}
838X				p++;
839X				x++;
840X			}
841X			y++;
842X		}
843X	}
844X	return output;
845}
846X
847X
848X
849SHAR_EOF
850  $shar_touch -am 1016175999 'maps2image.c' &&
851  chmod 0664 'maps2image.c' ||
852  $echo 'restore of' 'maps2image.c' 'failed'
853  if ( md5sum --help </dev/null 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
854  && ( md5sum --version </dev/null 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
855    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
856    || $echo 'maps2image.c:' 'MD5 check failed'
85767d4b9394ded98a2586f43bcca6b2e47  maps2image.c
858SHAR_EOF
859  else
860    shar_count="`LC_ALL=C wc -c < 'maps2image.c'`"
861    test 10965 -eq "$shar_count" ||
862    $echo 'maps2image.c:' 'original size' '10965,' 'current size' "$shar_count!"
863  fi
864fi
865# ============= bdf2c.c ==============
866if test -f 'bdf2c.c' && test "$first_param" != -c; then
867  $echo 'x -' SKIPPING 'bdf2c.c' '(file already exists)'
868else
869  $echo 'x -' extracting 'bdf2c.c' '(text)'
870  sed 's/^X//' << 'SHAR_EOF' > 'bdf2c.c' &&
871/**********************************************************************/
872/*                                                                    */
873/*  File:          bdf2c.c                                            */
874/*  Author:        Andrew W. Scherpbier                               */
875/*  Version:       1.00                                               */
876/*  Created:       27 Feb 1994                     		      */
877/*                                                                    */
878/*  Copyright (c) 1991, 1992 Andrew Scherpbier                        */
879/*                All Rights Reserved.                                */
880/*                                                                    */
881/*                                                                    */
882/*--------------------------------------------------------------------*/
883/*  Description:  convert a BDF font to a C include file              */
884/*                                                                    */
885/**********************************************************************/
886X
887#include <stdio.h>
888#include <string.h>
889X
890#define	PUBLIC
891#define	PRIVATE		static
892X
893#define	TRUE		(1)
894#define	FALSE		(0)
895X
896#define	OK		(0)
897#define	NOTOK		(-1)
898X
899#define	when		break;case
900#define	orwhen		case
901#define	otherwise	break;default
902X
903X
904/* Private routines
905X * ================
906X */
907PRIVATE void bounds(void);
908PRIVATE void start_char(char *name, FILE *fl);
909X
910X
911/* Private variables
912X * =================
913X */
914X
915X
916/* Public routines
917X * ===============
918X */
919X
920X
921/* Public variables
922X * ================
923X */
924int	fontheight, fontbase;
925int	bpl;
926X
927struct
928{
929X	char	*name;
930X	char	*chr;
931} charmap[] =
932{
933X	"space",	"' '",
934X	"exclam",	"'!'",
935X	"quotedbl",	"'\"'",
936X	"numbersign",	"'#'",
937X	"dollar",	"'$'",
938X	"percent",	"'%'",
939X	"ampersand",	"'&'",
940X	"quoteright",	"'\\''",
941X	"parenleft",	"'('",
942X	"parenright",	"')'",
943X	"asterisk",	"'*'",
944X	"plus",		"'+'",
945X	"comma",	"','",
946X	"minus",	"'-'",
947X	"period",	"'.'",
948X	"slash",	"'/'",
949X	"zero",		"'0'",
950X	"one",		"'1'",
951X	"two",		"'2'",
952X	"three",	"'3'",
953X	"four",		"'4'",
954X	"five",		"'5'",
955X	"six",		"'6'",
956X	"seven",	"'7'",
957X	"eight",	"'8'",
958X	"nine",		"'9'",
959X	"colon",	"':'",
960X	"semicolon",	"';'",
961X	"less",		"'<'",
962X	"equal",	"'='",
963X	"greater",	"'>'",
964X	"question",	"'?'",
965X	"at",		"'@'",
966X	"bracketleft",	"'['",
967X	"backslash",	"'\\\\'",
968X	"bracketright",	"']'",
969X	"asciicircum",	"'^'",
970X	"underscore",	"'_'",
971X	"quoteleft",	"'`'",
972X	"braceleft",	"'{'",
973X	"bar",		"'|'",
974X	"braceright",	"'}'",
975X	"asciitilde",	"'~'",
976X	"A",		"'A'",
977X	"B",		"'B'",
978X	"C",		"'C'",
979X	"D",		"'D'",
980X	"E",		"'E'",
981X	"F",		"'F'",
982X	"G",		"'G'",
983X	"H",		"'H'",
984X	"I",		"'I'",
985X	"J",		"'J'",
986X	"K",		"'K'",
987X	"L",		"'L'",
988X	"M",		"'M'",
989X	"N",		"'N'",
990X	"O",		"'O'",
991X	"P",		"'P'",
992X	"Q",		"'Q'",
993X	"R",		"'R'",
994X	"S",		"'S'",
995X	"T",		"'T'",
996X	"U",		"'U'",
997X	"V",		"'V'",
998X	"W",		"'W'",
999X	"X",		"'X'",
1000X	"Y",		"'Y'",
1001X	"Z",		"'Z'",
1002X	"a",		"'a'",
1003X	"b",		"'b'",
1004X	"c",		"'c'",
1005X	"d",		"'d'",
1006X	"e",		"'e'",
1007X	"f",		"'f'",
1008X	"g",		"'g'",
1009X	"h",		"'h'",
1010X	"i",		"'i'",
1011X	"j",		"'j'",
1012X	"k",		"'k'",
1013X	"l",		"'l'",
1014X	"m",		"'m'",
1015X	"n",		"'n'",
1016X	"o",		"'o'",
1017X	"p",		"'p'",
1018X	"q",		"'q'",
1019X	"r",		"'r'",
1020X	"s",		"'s'",
1021X	"t",		"'t'",
1022X	"u",		"'u'",
1023X	"v",		"'v'",
1024X	"w",		"'w'",
1025X	"x",		"'x'",
1026X	"y",		"'y'",
1027X	"z",		"'z'",
1028X	NULL,		NULL,
1029};
1030X
1031/**************************************************************************
1032X * PUBLIC int main(int ac, char **av)
1033X *
1034X */
1035PUBLIC int main(int ac, char **av)
1036{
1037X	FILE	*fl = fopen(av[1], "r");
1038X	char	buffer[1024];
1039X	char	*token;
1040X
1041X	if (!fl)
1042X		exit(1);
1043X
1044X	while (fgets(buffer, 1024, fl))
1045X	{
1046X		token = strtok(buffer, " \r\n");
1047X		if (strcmp(token, "STARTCHAR") == 0)
1048X			start_char(strtok(NULL, " \r\n"), fl);
1049X		else if (strcmp(token, "FONTBOUNDINGBOX") == 0)
1050X			bounds();
1051X	}
1052X	printf("{'\\0'}};\n");
1053X	return 0;
1054}
1055X
1056X
1057/**************************************************************************
1058X * PRIVATE void start_char(char *name, FILE *fl)
1059X */
1060PRIVATE void start_char(char *name, FILE *fl)
1061{
1062X	int	i;
1063X	char	buffer[1024];
1064X	int	read_data = 0;
1065X	int	width, height, dummy, start;
1066X	int	line = 0;
1067X
1068X	/*
1069X	 * Lookup the character
1070X	 */
1071X	for (i = 0; charmap[i].name; i++)
1072X	{
1073X		if (strcmp(name, charmap[i].name) == 0)
1074X			break;
1075X	}
1076X	if (!charmap[i].name)
1077X		return;		/* Not found */
1078X
1079X	/*
1080X	 * Output the C stuff
1081X	 */
1082X	printf("{%s,", charmap[i].chr);
1083X
1084X	/*
1085X	 * Search for the BITMAP line
1086X	 */
1087X	while (fgets(buffer, 1024, fl))
1088X	{
1089X		if (strncmp(buffer, "BITMAP", 6) == 0)
1090X			read_data = 1;
1091X		else if (strncmp(buffer, "BBX", 3) == 0)
1092X		{
1093X			int	i;
1094X			sscanf(buffer + 4, "%d %d %d %d", &width, &height, &dummy, &start);
1095X			line = fontbase - start - height;
1096X			printf("{");
1097X			for (i = 0; i < line * bpl; i++)
1098X				printf("0,");
1099X		}
1100X		else if (read_data)
1101X		{
1102X			char	*p = buffer;
1103X			int	count = 0;
1104X			if (strncmp(buffer, "ENDCHAR", 7) == 0)
1105X				break;
1106X
1107X			while (isxdigit(*p))
1108X			{
1109X				int	value = 0;
1110X				if (isdigit(*p))
1111X					value |= *p - '0';
1112X				else
1113X					value |= *p - 'A' + 10;
1114X				p++;
1115X				value <<= 4;
1116X				if (isdigit(*p))
1117X					value |= *p - '0';
1118X				else
1119X					value |= *p - 'A' + 10;
1120X				printf("%d,", value);
1121X				p++;
1122X				count++;
1123X			}
1124X			while (count < bpl)
1125X				printf("0,", count++);
1126X			line++;
1127X		}
1128X	}
1129X	printf("}, %d},\n", width);
1130}
1131X
1132X
1133/**************************************************************************
1134X * PRIVATE void bounds(void)
1135X *
1136X */
1137PRIVATE void bounds(void)
1138{
1139X	char	*token = strtok(NULL, "\r\n");
1140X	int	x, y;
1141X	int	dummy, base;
1142X	int	n;
1143X
1144X	sscanf(token, "%d %d %d %d", &x, &y, &dummy, &base);
1145X	n = y * ((x + 7) / 8);
1146X	printf("#define FONTX %d\n#define FONTY %d\n", (x + 7) / 8, y);
1147X	printf("struct{char ch; unsigned char data[%d]; int width;}font[]={\n", n);
1148X	fontheight = y;
1149X	fontbase = y + base;
1150X	bpl = (x + 7) / 8;
1151}
1152X
1153X
1154X
1155SHAR_EOF
1156  $shar_touch -am 1016175999 'bdf2c.c' &&
1157  chmod 0664 'bdf2c.c' ||
1158  $echo 'restore of' 'bdf2c.c' 'failed'
1159  if ( md5sum --help </dev/null 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
1160  && ( md5sum --version </dev/null 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
1161    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
1162    || $echo 'bdf2c.c:' 'MD5 check failed'
1163be4a3836c11344c97da2d788c2c37ecf  bdf2c.c
1164SHAR_EOF
1165  else
1166    shar_count="`LC_ALL=C wc -c < 'bdf2c.c'`"
1167    test 5637 -eq "$shar_count" ||
1168    $echo 'bdf2c.c:' 'original size' '5637,' 'current size' "$shar_count!"
1169  fi
1170fi
1171# ============= helvR08.bdf.gz ==============
1172if test -f 'helvR08.bdf.gz' && test "$first_param" != -c; then
1173  $echo 'x -' SKIPPING 'helvR08.bdf.gz' '(file already exists)'
1174else
1175  $echo 'x -' extracting 'helvR08.bdf.gz' '(binary)'
1176  sed 's/^X//' << 'SHAR_EOF' | uudecode &&
1177begin 600 helvR08.bdf.gz
1178M'XL(""!`<BT``VAE;'92,#@N8F1F`*U=77?B.).^]Z_PR=7NGJ2/OS\N'3`=
1179M=@GD!?+V9&[Z..`DW@;,V-`]F5^_DHVMDERRS.S,^&0@@>>12O4E5=FS6D?+
1180M]60Q7^O6%U,;+1X?8_*Z?:&/\N-GD;U_G'0S#)Q;^M/7HVW^FNJKS_*4[LM;
1181M?7K8?&'?>,J+4Y8?2OZK@3[.WK-3LM/C/\[9<9\>3N0#Q3$O$OIIA/DAW?U,
1182M3]DFT;-23_0B?<\(7Y%N]5.1;--]4OS0\S=]EAWRT^<Q_:)?AE5]FL'(OH?,
1183M@8P]+?9969(!Z:=</Y<IPSE]I&7*($K*\T%@7S_U]R(YG`A^?MA]ZME!3\HR
1184M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W7D5J-I(V?MHIXO-5@Z6A^2'\,1K6JQA:N
1281MA18=Z\?Y\)X4Y_TN.9^4X*Q/AQLRR3C0#)H_CE"*P8:]:#U]8\3&D@W?ZZO`
1282MKI\FY<-8A?2LIC]1'\0ALJ#$24#FU804^#I062<,ENQ<IV..!%E(#`>H&``-
1283M9&U^:4&?9<L_\T[I3(BI<7M0A_J+B/X@H8?VZ=(DFC@1S76IA0?X&<]NEQTE
1284MCI+G;6*+KW//'0LM!+5YDJ+0ZO3/+&X#_IJ4URK.G3D(G#Z`60HON</.$MN;
1285M<!,Z[W8I+A$72>QJ%]4ZTY'$0VV3]_>TX)Y<J0P(U&,#YR<\2$_Y7+V:\A_F
1286MZPFSZ4$6B%`^3XA"V',FWW!Q09V7Q$\[X.K7[85PH&G.4`YC$`=M+*PT]CIK
1287MLX7;(9H[>62JV]+P?>O7L2@?M]48]U4D3B<_0#M@F6VCAFV&9M>PS8X'1X7S
1288MMLM)*%>J)[\-8-8@W/#27CA7D0AW=(`YP-S6;ME\+E<WFRV4U<O3_N\*KDC_
1289>@JKLS>S.U-Q[$G_HU1"0_]*G#&O_!Y`A]OD]8@``
1290`
1291end
1292SHAR_EOF
1293  $shar_touch -am 1016175999 'helvR08.bdf.gz' &&
1294  chmod 0444 'helvR08.bdf.gz' ||
1295  $echo 'restore of' 'helvR08.bdf.gz' 'failed'
1296  if ( md5sum --help </dev/null 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
1297  && ( md5sum --version </dev/null 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
1298    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
1299    || $echo 'helvR08.bdf.gz:' 'MD5 check failed'
1300d8c268940f03cf6ad7250af75fab556b  helvR08.bdf.gz
1301SHAR_EOF
1302  else
1303    shar_count="`LC_ALL=C wc -c < 'helvR08.bdf.gz'`"
1304    test 5025 -eq "$shar_count" ||
1305    $echo 'helvR08.bdf.gz:' 'original size' '5025,' 'current size' "$shar_count!"
1306  fi
1307fi
1308$echo $shar_n 'x -' 'lock directory' "\`_sh02319': " $shar_c
1309if rm -fr _sh02319; then
1310  $echo 'removed'
1311else
1312  $echo 'failed to remove'
1313fi
1314exit 0
1315