Date: Fri, 18 May 2001 22:47:28 +0100 From: Nik Clayton <nik@freebsd.org> To: John Reynolds~ <jreynold@sedona.ch.intel.com> Cc: Nik Clayton <nik@freebsd.org>, doc@freebsd.org Subject: Re: Policy on image source files in the CVS tree Message-ID: <20010518224728.C1757@catkin.nothing-going-on.org> In-Reply-To: <15109.25794.690992.994411@hip186.ch.intel.com>; from jreynold@sedona.ch.intel.com on Fri, May 18, 2001 at 11:06:58AM -0700 References: <20010517122744.B3349@catkin.nothing-going-on.org> <20010517113103.A25222@Odin.AC.HMC.Edu> <200105180028.f4I0Snn05073@bmah-freebsd-0.cisco.com> <20010518013645.A8358@catkin.nothing-going-on.org> <15109.16691.817238.944467@hip186.ch.intel.com> <20010518184813.B12846@catkin.nothing-going-on.org> <15109.25794.690992.994411@hip186.ch.intel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--RpqchZ26BWispMcB Content-Type: multipart/mixed; boundary="ieNMXl1Fr3cevapt" Content-Disposition: inline --ieNMXl1Fr3cevapt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 18, 2001 at 11:06:58AM -0700, John Reynolds~ wrote: >=20 > [ On Friday, May 18, Nik Clayton wrote: ] > >=20 > > 6 of one, half a dozen of the other. It's easy enough to create a > > meta-port, if necessary. > >=20 > > ports/graphics/shot2gif/ >=20 > OK. D'oh. shot2png. > > I'm in two minds about doing that. We might end up needing translation > > tables for each font set (Russian, Chinese, and so on), which might be > > overkill. Simpler just to faithfully reproduce the ASCII codes that > > were on the user's screen, and assume that the reader has the right font > > set loaded. >=20 > Hmmmm. Well what about the ASCII line-draw characters. I'm thinking that = at > least those should be morphed over into ----- + etc. If I "cat" one of the > screen dumps to my VTY it "looks just fine" of course, but if I bring it = into > Emacs or look at it over a vt100 terminal it looks like Borg. >=20 > I'm not saying go crazy with the full character translation, but at least= the > ASCII line draw stuff spewed out by /stand/sysinstall. Sounds reasonable. Try the attached, which is controlled by the "-l" flag. I've also included a dump of sysinstall's startup screen -- try running shot2.scr through shot2png and the attached shot2txt, with and without the -l flag. N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ FreeBSD Documentation Project http://www.freebsd.org/docproj/ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- --ieNMXl1Fr3cevapt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="shot2txt.c" Content-Transfer-Encoding: quoted-printable /*- * Copyright (c) 2001 Nik Clayton * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO= SE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI= AL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI= CT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lint static const char rcsid[] =3D "$Id: shot2png.c,v 1.2 2001/05/18 15:01:11 nik Exp $"; #endif /* not lint */ #include <sys/stat.h> #include <sys/syslimits.h> #include <sys/types.h> #include <err.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define MAGIC "SCRSHOT_" #define VERSION 1 int main(int argc, char *argv[]) { int mx, my; /* Maxmimum X and Y images positions */ int cx; /* Current X and Y images positions */ int curChar; /* Current character to render */ char header[BUFSIZ]; /* Buffer for header components */ int fake_line =3D 0; /* Fake the line drawing characters? */ int ch; /* Argument option code */ =09 /* * Option processing */ while ((ch =3D getopt(argc, argv, "l")) !=3D -1) switch (ch) { case 'l': fake_line =3D 1; break; } =20 argc -=3D optind; argv +=3D optind; =09 /* * Read the SCRSHOT_ header, confirm the version, and read the image * dimensions. */ if(fread(header, sizeof(unsigned char), 8, stdin) !=3D 8) err(1, "fread() header bytes"); if(!strcmp(MAGIC, header)) err(1, "Expecting '%s', read '%s'", MAGIC, header); header[0] =3D getc(stdin); if(header[0] !=3D VERSION) fprintf(stderr, "Expecting version %d, read %d\n", VERSION, header[0]); header[0] =3D getc(stdin); if(header[0] =3D=3D EOF) err(1, "Received EOF when reading header length"); if(header[0] < 2) err(1, "Header length is less than 2 ('%d')", header[0]); =09 mx =3D getc(stdin); header[0]--; if(mx =3D=3D EOF) err(1, "Received EOF when reading image width"); getc(stdin); header[0]--; if(my =3D=3D EOF) err(1, "Received EOF when reading image height"); =09 /* * Don't know what to do with any other data in the header, * so skip it. */ while(header[0]-- !=3D 0) getc(stdin); =09 /* * Read from STDIN, rendering on to the image */ cx =3D 0; while((curChar =3D getchar()) !=3D EOF) { getchar(); /* Skip the attribute byte */ if(fake_line) switch (curChar) { case 0xb3: /* Single vertical bar */ case 0xba: /* Double vertical bar */ curChar =3D '|'; break; case 0xb4: /* Horizontal single left T */ case 0xb9: /* Horizontal double left T */ case 0xc1: /* Single inverted T */ case 0xc2: /* Single T */ case 0xc3: /* Horizontal single right T */ case 0xc5: /* Single cross */ case 0xca: /* Double inverted T */ case 0xcb: /* Double T */ case 0xcc: /* Horizontal left T */ case 0xce: /* Double cross */ curChar =3D '+'; break; case 0xbb: /* Double top right corner */ case 0xbf: /* Single top right corner */ case 0xc9: /* Double top left */ case 0xda: /* Single top left corner */ curChar =3D '.'; break; case 0xc0: /* Single bottom left corner */ case 0xc8: /* Double bottom left corner */ curChar =3D '`'; break; case 0xc4: /* Single horizontal bar */ case 0xcd: /* Double horizontal bar */ curChar =3D '-'; break; case 0xbc: /* Double bottom right corner */ case 0xd9: /* Single bottom right corner */ curChar =3D '\''; break; =09 } =09 putchar(curChar); =09 /* New line? */ if(++cx >=3D mx) { cx =3D 0; putchar('\n'); } } exit(0); } --ieNMXl1Fr3cevapt Content-Type: application/octet-stream Content-Disposition: attachment; filename="shot2.scr" Content-Transfer-Encoding: base64 U0NSU0hPVF8BAlAZIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAb IBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAb IBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAb IBsgGyAbIBsgGyAbIBsgG9p/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef8R/ xH/Ef8R/IH4vfnN+dH5hfm5+ZH4vfnN+eX5zfml+bn5zfnR+YX5sfmx+IH5NfmF+aX5ufiB+ TX5lfm5+dX4gfsR/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef8R/xH/Ef79w IBsgGyAbIBsgGyAbIBuzfyBwV3BlcGxwY3BvcG1wZXAgcHRwb3AgcHRwaHBlcCBwRnBycGVw ZXBCcFNwRHAgcGlwbnBzcHRwYXBscGxwYXB0cGlwb3BucCBwYXBucGRwIHBjcG9wbnBmcGlw Z3B1cHJwYXB0cGlwb3BucCBwdHBvcG9wbHAucCBwIHBQcGxwZXBhcHNwZXAgcCBwIHCzcCAI IAggGyAbIBs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gfkZ+MX4gfmZ+b35yfiB+SX5ufnN+dH5hfmx+ bH5hfnR+aX5vfm5+IH5HfnV+aX5kfmV+IH5dfsRwxHDEcMRwxHDEcMRwxHDEcMRwxHDEcMRw xHDEcMRwxHDEcNlwIAggCCAbIBsgGyAbIBsgGyAbIAggCCAIIAggCCAIIAggCCAIIAggCCAI IAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAI IAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAIIAggCCAI IAggCCAIIAggCCAIIAggGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAb IBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAb IBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAbIBsgGyAb IBsgGyAbIBsgGyAbIBsgGw== --ieNMXl1Fr3cevapt-- --RpqchZ26BWispMcB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.5 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjsFmG4ACgkQk6gHZCw343XMegCfT47q2K5ABtXeuMdPiFvnQoPh vc8AnjmZ/Q3z6ELZQJ2eG/P3iwWRPvNU =DUfk -----END PGP SIGNATURE----- --RpqchZ26BWispMcB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010518224728.C1757>