chuck@trantor.harris-atd.com (Chuck Musciano) (10/16/90)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 5 (of 6)." # Contents: parse.y schematic.ps # Wrapped by chuck@melmac on Tue Oct 16 08:53:06 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'parse.y' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'parse.y'\" else echo shar: Extracting \"'parse.y'\" \(10997 characters\) sed "s/^X//" >'parse.y' <<'END_OF_FILE' X/************************************************************************/ X/* Copyright 1990 by Chuck Musciano and Harris Corporation */ X/* */ X/* Permission to use, copy, modify, and distribute this software */ X/* and its documentation for any purpose and without fee is */ X/* hereby granted, provided that the above copyright notice */ X/* appear in all copies and that both that copyright notice and */ X/* this permission notice appear in supporting documentation, and */ X/* that the name of Chuck Musciano and Harris Corporation not be */ X/* used in advertising or publicity pertaining to distribution */ X/* of the software without specific, written prior permission. */ X/* Chuck Musciano and Harris Corporation make no representations */ X/* about the suitability of this software for any purpose. It is */ X/* provided "as is" without express or implied warranty. */ X/* */ X/* This code contains data and information that is proprietary */ X/* to Casio Corporation. You may be subject to legal action if */ X/* this information is released without explicit permission from */ X/* Casio. */ X/************************************************************************/ X X%{ X X#include <stdio.h> X#include <ctype.h> X X#include "manifest.h" X#include "object.h" X X#define range(val, l, h) ((val) >= (l) && (val) <= (h)) X XEXPORT object *parsed_object_list; XEXPORT int parse_errors_occured; X XPRIVATE char *get_last_token(); X XPRIVATE char *curr_file; XPRIVATE int line_count = 1; XPRIVATE char ungetc = -1; X XPRIVATE time t_buf; XPRIVATE date d_buf; XPRIVATE object *curr_object; X X%} X X%start boss_data X X%union {char *cpval; X date *dval; X int ival; X object *oval; X time *tval; X } X X%token <cpval> STRING X%token <ival> INTEGER X X%token COLON LBRACE RBRACE SLASH X X%token ADDRESS ALARM CALENDAR CARD DATE DEPARTMENT EMPLOYER X EXTRA_1 EXTRA_2 EXTRA_3 EXTRA_4 EXTRA_5 EXTRA_6 FAX HIGHLIGHT MARKED X MEMO NAME NUMBER POBOX POSITION SCHEDULE START STOP TELEPHONE TELEX X X%type <cpval> address department employer extra_1 extra_2 extra_3 extra_4 extra_5 extra_6 X fax memo name number pobox position telex X%type <dval> date date_val X%type <ival> highlight int_list X%type <oval> calendar_object card_object memo_object object object_list phone_object schedule_object X%type <tval> alarm_time start_time stop_time time X X%% X Xboss_data : object_list X ; X Xobject_list : empty X { $$ = parsed_object_list = NULL; } X | object_list object X { if ($1 == NULL) X parsed_object_list = $2; X else X $1->next = $2; X fill_fields($2); X $$ = $2; X } X ; X Xobject : calendar_object X | card_object X | memo_object X | phone_object X | schedule_object X ; X Xphone_object : LBRACE TELEPHONE X { curr_object = create_object(); X curr_object->kind = OBJ_TELEPHONE; X } X phone_list RBRACE X { if (curr_object->pho_name == NULL || curr_object->pho_name[0] == '\0') X yyerror("missing name in phone object"); X $$ = curr_object; X } X ; X Xphone_list : empty X | phone_list phone_attr X ; X Xphone_attr : marked X { curr_object->marked = TRUE; } X | name X { add_field(&(curr_object->pho_name), $1); } X | number X { add_field(&(curr_object->pho_number), $1); } X | address X { add_field(&(curr_object->pho_address), $1); } X | extra_1 X { add_field(&(curr_object->pho_extra_1), $1); } X | extra_2 X { add_field(&(curr_object->pho_extra_2), $1); } X | extra_3 X { add_field(&(curr_object->pho_extra_3), $1); } X | extra_4 X { add_field(&(curr_object->pho_extra_4), $1); } X | extra_5 X { add_field(&(curr_object->pho_extra_5), $1); } X | extra_6 X { add_field(&(curr_object->pho_extra_6), $1); } X ; X Xschedule_object : LBRACE SCHEDULE X { curr_object = create_object(); X curr_object->kind = OBJ_SCHEDULE; X curr_object->sch_start_time.hour = INVALID_TIME; X curr_object->sch_stop_time.hour = INVALID_TIME; X curr_object->sch_alarm_time.hour = INVALID_TIME; X curr_object->sch_date.month = INVALID_TIME; X } X schedule_list RBRACE X { if (curr_object->sch_memo == NULL || curr_object->sch_memo[0] == '\0') X yyerror("missing memo in schedule object"); X if (curr_object->sch_date.month == INVALID_TIME) X yyerror("missing date in schedule object"); X $$ = curr_object; X } X ; X Xschedule_list : empty X | schedule_list schedule_attr X ; X Xschedule_attr : marked X { curr_object->marked = TRUE; } X | date X { curr_object->sch_date = *$1; } X | start_time X { curr_object->sch_start_time = *$1; } X | stop_time X { curr_object->sch_stop_time = *$1; } X | alarm_time X { curr_object->sch_alarm_time = *$1; } X | memo X { add_field(&(curr_object->sch_memo), $1); } X ; X Xmemo_object : LBRACE MEMO X { curr_object = create_object(); X curr_object->kind = OBJ_MEMO; X } X memo_list RBRACE X { if (curr_object->mem_memo == NULL || curr_object->mem_memo[0] == '\0') X yyerror("missing memo in memo object"); X $$ = curr_object; X } X ; X Xmemo_list : empty X | memo_list memo_attr X ; X Xmemo_attr : marked X { curr_object->marked = TRUE; } X | memo X { add_field(&(curr_object->sch_memo), $1); } X ; X Xcard_object : LBRACE CARD X { curr_object = create_object(); X curr_object->kind = OBJ_CARD; X } X card_list RBRACE X { if (curr_object->car_employer == NULL || curr_object->car_employer[0] == '\0') X yyerror("missing employer in card object"); X if (curr_object->car_name == NULL || curr_object->car_name[0] == '\0') X yyerror("missing name in card object"); X $$ = curr_object; X } X ; X Xcard_list : empty X | card_list card_attr X ; X Xcard_attr : marked X { curr_object->marked = TRUE; } X | employer X { add_field(&(curr_object->car_employer), $1); } X | name X { add_field(&(curr_object->car_name), $1); } X | number X { add_field(&(curr_object->car_number), $1); } X | position X { add_field(&(curr_object->car_position), $1); } X | department X { add_field(&(curr_object->car_department), $1); } X | pobox X { add_field(&(curr_object->car_pobox), $1); } X | address X { add_field(&(curr_object->car_address), $1); } X | telex X { add_field(&(curr_object->car_telex), $1); } X | fax X { add_field(&(curr_object->car_fax), $1); } X | extra_1 X { add_field(&(curr_object->car_extra_1), $1); } X | extra_2 X { add_field(&(curr_object->car_extra_2), $1); } X | extra_3 X { add_field(&(curr_object->car_extra_3), $1); } X | extra_4 X { add_field(&(curr_object->car_extra_4), $1); } X | extra_5 X { add_field(&(curr_object->car_extra_5), $1); } X | extra_6 X { add_field(&(curr_object->car_extra_6), $1); } X ; X Xcalendar_object : LBRACE CALENDAR X { curr_object = create_object(); X curr_object->kind = OBJ_CALENDAR; X curr_object->cal_date.month = INVALID_TIME; X } X calendar_list RBRACE X { if (curr_object->cal_date.month == INVALID_TIME) X yyerror("missing date in calendar object"); X $$ = curr_object; X } X ; X Xcalendar_list : empty X | calendar_list calendar_attr X ; X Xcalendar_attr : date X { curr_object->cal_date = *$1; } X | highlight X { curr_object->cal_marked |= $1; } X ; X Xaddress : LBRACE ADDRESS STRING RBRACE X { $$ = $3; } X ; X Xalarm_time : LBRACE ALARM time RBRACE X { $$ = $3; } X ; X Xdate : LBRACE DATE date_val RBRACE X { $$ = $3; } X ; X Xdepartment : LBRACE DEPARTMENT STRING RBRACE X { $$ = $3; } X ; X Xemployer : LBRACE EMPLOYER STRING RBRACE X { $$ = $3; } X ; X Xextra_1 : LBRACE EXTRA_1 STRING RBRACE X { $$ = $3; } X ; X Xextra_2 : LBRACE EXTRA_2 STRING RBRACE X { $$ = $3; } X ; X Xextra_3 : LBRACE EXTRA_3 STRING RBRACE X { $$ = $3; } X ; X Xextra_4 : LBRACE EXTRA_4 STRING RBRACE X { $$ = $3; } X ; X Xextra_5 : LBRACE EXTRA_5 STRING RBRACE X { $$ = $3; } X ; X Xextra_6 : LBRACE EXTRA_6 STRING RBRACE X { $$ = $3; } X ; X Xfax : LBRACE FAX STRING RBRACE X { $$ = $3; } X ; X Xhighlight : LBRACE HIGHLIGHT int_list RBRACE X { $$ = $3; } X ; X Xmarked : LBRACE MARKED RBRACE X ; X Xmemo : LBRACE MEMO STRING RBRACE X { $$ = $3; } X ; X Xname : LBRACE NAME STRING RBRACE X { $$ = $3; } X ; X Xnumber : LBRACE NUMBER STRING RBRACE X { $$ = $3; } X ; X Xpobox : LBRACE POBOX STRING RBRACE X { $$ = $3; } X ; X Xposition : LBRACE POSITION STRING RBRACE X { $$ = $3; } X ; X Xstart_time : LBRACE START time RBRACE X { $$ = $3; } X ; X Xstop_time : LBRACE STOP time RBRACE X { $$ = $3; } X ; X Xtelex : LBRACE TELEX STRING RBRACE X { $$ = $3; } X ; X Xtime : INTEGER COLON INTEGER X { if (range($1, 0, 23) && range($3, 0, 59)) { X t_buf.hour = $1; X t_buf.minute = $3; X } X else X yyerror("invalid time: %2d:%02d", $1, $3); X $$ = &t_buf; X } X ; X Xdate_val : INTEGER SLASH INTEGER SLASH INTEGER X { if (range($1, 1, 12) && range($3, 1, 31) && (range($5, 1900, 2099) || range($5, 0, 99))) { X d_buf.month = $1; X d_buf.day = $3; X if (range($5, 0, 99)) X d_buf.year = 1900 + $5; X else X d_buf.year = $5; X } X else X yyerror("invalid date: %2d/%02d/%02d", $1, $3, $5); X $$ = &d_buf; X } X Xint_list : empty X { $$ = 0; } X | int_list INTEGER X { if (range($2, 1, 31)) X $$ = $1 | (1 << ($2 - 1)); X else { X yyerror("invalid highlight date: %d", $2); X $$ = 0; X } X } X ; X Xempty : ; X X%% X X/************************************************************************/ XPRIVATE yyerror(s1, s2, s3, s4, s5, s6, s7) X Xchar *s1, *s2, *s3, *s4, *s5, *s6, *s7; X X{ char buf1[1024], buf2[1024]; X X sprintf(buf1, "%s: line %d: ", curr_file, line_count - ((ungetc == '\n')? 1 : 0)); X sprintf(buf2, s1, s2, s3, s4, s5, s6, s7); X strcat(buf1, buf2); X if (strcmp(s1, "syntax error") == 0) { X strcat(buf1, " at or near "); X strcat(buf1, get_last_token()); X } X error(buf1); X yyclearin; X parse_errors_occured++; X} X X/************************************************************************/ XPRIVATE add_field(field, value) X Xbyte **field; Xbyte *value; X X{ byte *p; X X if (*field) X yyerror("duplicate value for this field"); X if (value == NULL || *value == '\0') X return; X if (curr_object->buf == NULL) { X curr_object->buf = (byte *) malloc(MAX_OBJECT_DATA); X bzero(curr_object->buf, MAX_OBJECT_DATA); X } X for (p = curr_object->buf + MAX_OBJECT_DATA - 1; p > curr_object->buf && *p == '\0'; p--) X ; X if (*p) X p += 2; X if (p + strlen(value) >= curr_object->buf + MAX_OBJECT_DATA) { X yyerror("too much data for this object"); X *field = NULL; X } X else { X strcpy(p, value); X *field = p; X } X} X X/************************************************************************/ XPRIVATE fill_fields(obj) X Xobject *obj; X X{ int i; X X for (i = MAX_FIELDS - 1; i >= 0; i--) X if (obj->field[i]) X for (i--; i >= 0; i--) X if (obj->field[i] == NULL) X add_field(&(obj->field[i]), ""); X} X X#include "lex.c" END_OF_FILE if test 10997 -ne `wc -c <'parse.y'`; then echo shar: \"'parse.y'\" unpacked with wrong size! fi # end of 'parse.y' fi if test -f 'schematic.ps' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'schematic.ps'\" else echo shar: Extracting \"'schematic.ps'\" \(23690 characters\) sed "s/^X//" >'schematic.ps' <<'END_OF_FILE' X%! X%%BoundingBox: (atend) X%%Pages: (atend) X%%DocumentFonts: (atend) X%%EndComments X% X% FrameMaker PostScript Prolog 2.0, for use with FrameMaker 2.0 X% Copyright (c) 1986,87,89 by Frame Technology, Inc. All rights reserved. X% X% Known Problems: X% Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1 X/FMversion (2.0) def X% Set up Color vs. Black-and-White X /FMPrintInColor systemdict /colorimage known def X% Uncomment this line to force b&w on color printer X% /FMPrintInColor false def X/FrameDict 190 dict def Xsystemdict /errordict known not {/errordict 10 dict def X errordict /rangecheck {stop} put} if X% The readline in 23.0 doesn't recognize cr's as nl's on AppleTalk XFrameDict /tmprangecheck errordict /rangecheck get put Xerrordict /rangecheck {FrameDict /bug true put} put XFrameDict /bug false put Xmark X% Some PS machines read past the CR, so keep the following 3 lines together! Xcurrentfile 5 string readline X00 X0000000000 Xcleartomark Xerrordict /rangecheck FrameDict /tmprangecheck get put XFrameDict /bug get { X /readline { X /gstring exch def X /gfile exch def X /gindex 0 def X { X gfile read pop X dup 10 eq {exit} if X dup 13 eq {exit} if X gstring exch gindex exch put X /gindex gindex 1 add def X } loop X pop X gstring 0 gindex getinterval true X } def X } if X/FMVERSION { X FMversion ne { X /Times-Roman findfont 18 scalefont setfont X 100 100 moveto X (FrameMaker version does not match postscript_prolog!) X dup = X show showpage X } if X } def X/FMLOCAL { X FrameDict begin X 0 def X end X } def X /gstring FMLOCAL X /gfile FMLOCAL X /gindex FMLOCAL X /orgxfer FMLOCAL X /orgproc FMLOCAL X /organgle FMLOCAL X /orgfreq FMLOCAL X /yscale FMLOCAL X /xscale FMLOCAL X /manualfeed FMLOCAL X /paperheight FMLOCAL X /paperwidth FMLOCAL X/FMDOCUMENT { X array /FMfonts exch def X /#copies exch def X FrameDict begin X 0 ne dup {setmanualfeed} if X /manualfeed exch def X /paperheight exch def X /paperwidth exch def X setpapername X manualfeed {true} {papersize} ifelse X {manualpapersize} {false} ifelse X {desperatepapersize} if X /yscale exch def X /xscale exch def X currenttransfer cvlit /orgxfer exch def X currentscreen cvlit /orgproc exch def X /organgle exch def /orgfreq exch def X end X } def X /pagesave FMLOCAL X /orgmatrix FMLOCAL X /landscape FMLOCAL X/FMBEGINPAGE { X FrameDict begin X /pagesave save def X 3.86 setmiterlimit X /landscape exch 0 ne def X landscape { X 90 rotate 0 exch neg translate pop X } X {pop pop} X ifelse X xscale yscale scale X /orgmatrix matrix def X gsave X } def X/FMENDPAGE { X grestore X pagesave restore X end X showpage X } def X/FMDEFINEFONT { X FrameDict begin X findfont X ReEncode X 2 index exch X definefont exch X scalefont X FMfonts 3 1 roll X put X end X } bind def X/FMNORMALIZEGRAPHICS { X newpath X 0.0 0.0 moveto X 1 setlinewidth X 0 setlinecap X 0 0 0 sethsbcolor X 0 setgray X } bind def X /fx FMLOCAL X /fy FMLOCAL X /fh FMLOCAL X /fw FMLOCAL X /llx FMLOCAL X /lly FMLOCAL X /urx FMLOCAL X /ury FMLOCAL X/FMBEGINEPSF { X end X /FMEPSF save def X /showpage {} def X FMNORMALIZEGRAPHICS X [/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall X fx fy translate X rotate X fw urx llx sub div fh ury lly sub div scale X llx neg lly neg translate X } bind def X/FMENDEPSF { X FMEPSF restore X FrameDict begin X } bind def XFrameDict begin X/setmanualfeed { X%%BeginFeature *ManualFeed True X statusdict /manualfeed true put X%%EndFeature X } def X/max {2 copy lt {exch} if pop} bind def X/min {2 copy gt {exch} if pop} bind def X/inch {72 mul} def X/pagedimen { X paperheight sub abs 16 lt exch X paperwidth sub abs 16 lt and X {/papername exch def} {pop} ifelse X } def X /papersizedict FMLOCAL X/setpapername { X /papersizedict 14 dict def X papersizedict begin X /papername /unknown def X /Letter 8.5 inch 11.0 inch pagedimen X /LetterSmall 7.68 inch 10.16 inch pagedimen X /Tabloid 11.0 inch 17.0 inch pagedimen X /Ledger 17.0 inch 11.0 inch pagedimen X /Legal 8.5 inch 14.0 inch pagedimen X /Statement 5.5 inch 8.5 inch pagedimen X /Executive 7.5 inch 10.0 inch pagedimen X /A3 11.69 inch 16.5 inch pagedimen X /A4 8.26 inch 11.69 inch pagedimen X /A4Small 7.47 inch 10.85 inch pagedimen X /B4 10.125 inch 14.33 inch pagedimen X /B5 7.16 inch 10.125 inch pagedimen X end X } def X/papersize { X papersizedict begin X /Letter {lettertray} def X /LetterSmall {lettertray lettersmall} def X /Tabloid {11x17tray} def X /Ledger {ledgertray} def X /Legal {legaltray} def X /Statement {statementtray} def X /Executive {executivetray} def X /A3 {a3tray} def X /A4 {a4tray} def X /A4Small {a4tray a4small} def X /B4 {b4tray} def X /B5 {b5tray} def X /unknown {unknown} def X papersizedict dup papername known {papername} {/unknown} ifelse get X end X /FMdicttop countdictstack 1 add def X statusdict begin stopped end X countdictstack -1 FMdicttop {pop end} for X } def X/manualpapersize { X papersizedict begin X /Letter {letter} def X /LetterSmall {lettersmall} def X /Tabloid {11x17} def X /Ledger {ledger} def X /Legal {legal} def X /Statement {statement} def X /Executive {executive} def X /A3 {a3} def X /A4 {a4} def X /A4Small {a4small} def X /B4 {b4} def X /B5 {b5} def X /unknown {unknown} def X papersizedict dup papername known {papername} {/unknown} ifelse get X end X stopped X } def X/desperatepapersize { X statusdict /setpageparams known X { X paperwidth paperheight 0 1 X statusdict begin X {setpageparams} stopped pop X end X } if X } def X/savematrix { X orgmatrix currentmatrix pop X } bind def X/restorematrix { X orgmatrix setmatrix X } bind def X/dmatrix matrix def X/dpi 72 0 dmatrix defaultmatrix dtransform X dup mul exch dup mul add sqrt def X/freq dpi 18.75 div 8 div round dup 0 eq {pop 1} if 8 mul dpi exch div def X/sangle 1 0 dmatrix defaultmatrix dtransform exch atan def X/DiacriticEncoding [ X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl X/numbersign /dollar /percent /ampersand /quotesingle /parenleft X/parenright /asterisk /plus /comma /hyphen /period /slash /zero /one X/two /three /four /five /six /seven /eight /nine /colon /semicolon X/less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K X/L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash X/bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h X/i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar X/braceright /asciitilde /.notdef /Adieresis /Aring /Ccedilla /Eacute X/Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis X/atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis X/iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve X/ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex X/udieresis /dagger /.notdef /cent /sterling /section /bullet X/paragraph /germandbls /registered /copyright /trademark /acute X/dieresis /.notdef /AE /Oslash /.notdef /.notdef /.notdef /.notdef X/yen /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef X/ordfeminine /ordmasculine /.notdef /ae /oslash /questiondown X/exclamdown /logicalnot /.notdef /florin /.notdef /.notdef X/guillemotleft /guillemotright /ellipsis /.notdef /Agrave /Atilde X/Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright X/quoteleft /quoteright /.notdef /.notdef /ydieresis /Ydieresis X/fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl X/periodcentered /quotesinglbase /quotedblbase /perthousand X/Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute X/Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve X/Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron X/breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron X] def X/ReEncode { X dup X length X dict begin X { X 1 index /FID ne X {def} X {pop pop} ifelse X } forall X Encoding StandardEncoding eq X { X /Encoding DiacriticEncoding def X }if X currentdict X end X } bind def X/graymode true def X /bwidth FMLOCAL X /bpside FMLOCAL X /bstring FMLOCAL X /onbits FMLOCAL X /offbits FMLOCAL X /xindex FMLOCAL X /yindex FMLOCAL X /x FMLOCAL X /y FMLOCAL X/setpattern { X /bwidth exch def X /bpside exch def X /bstring exch def X /onbits 0 def /offbits 0 def X freq sangle landscape {90 add} if X {/y exch def X /x exch def X /xindex x 1 add 2 div bpside mul cvi def X /yindex y 1 add 2 div bpside mul cvi def X bstring yindex bwidth mul xindex 8 idiv add get X 1 7 xindex 8 mod sub bitshift and 0 ne X {/onbits onbits 1 add def 1} X {/offbits offbits 1 add def 0} X ifelse X } X setscreen X {} settransfer X offbits offbits onbits add div FMsetgray X /graymode false def X } bind def X/grayness { X FMsetgray X graymode not { X /graymode true def X orgxfer cvx settransfer X orgfreq organgle orgproc cvx setscreen X } if X } bind def X /HUE FMLOCAL X /SAT FMLOCAL X /BRIGHT FMLOCAL X /Colors FMLOCAL XFMPrintInColor X X { X /HUE 0 def X /SAT 0 def X /BRIGHT 0 def X % array of arrays Hue and Sat values for the separations [HUE BRIGHT] X /Colors X [[0 0 ] % black X [0 0 ] % white X [0.00 1.0] % red X [0.37 1.0] % green X [0.60 1.0] % blue X [0.50 1.0] % cyan X [0.83 1.0] % magenta X [0.16 1.0] % comment / yellow X ] def X X /BEGINBITMAPCOLOR { X BITMAPCOLOR} def X /BEGINBITMAPCOLORc { X BITMAPCOLORc} def X /K { X Colors exch get dup X 0 get /HUE exch store X 1 get /BRIGHT exch store X HUE 0 eq BRIGHT 0 eq and X {1.0 SAT sub setgray} X {HUE SAT BRIGHT sethsbcolor} X ifelse X } def X /FMsetgray { X /SAT exch 1.0 exch sub store X HUE 0 eq BRIGHT 0 eq and X {1.0 SAT sub setgray} X {HUE SAT BRIGHT sethsbcolor} X ifelse X } bind def X } X X { X /BEGINBITMAPCOLOR { X BITMAPGRAY} def X /BEGINBITMAPCOLORc { X BITMAPGRAYc} def X /FMsetgray {setgray} bind def X /K { X pop X } def X } Xifelse X/normalize { X transform round exch round exch itransform X } bind def X/dnormalize { X dtransform round exch round exch idtransform X } bind def X/lnormalize { X 0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop X } bind def X/H { X lnormalize setlinewidth X } bind def X/Z { X setlinecap X } bind def X/X { X fillprocs exch get exec X } bind def X/V { X gsave eofill grestore X } bind def X/N { X stroke X } bind def X/M {newpath moveto} bind def X/E {lineto} bind def X/D {curveto} bind def X/O {closepath} bind def X /n FMLOCAL X/L { X /n exch def X newpath X normalize X moveto X 2 1 n {pop normalize lineto} for X } bind def X/Y { X L X closepath X } bind def X /x1 FMLOCAL X /x2 FMLOCAL X /y1 FMLOCAL X /y2 FMLOCAL X /rad FMLOCAL X/R { X /y2 exch def X /x2 exch def X /y1 exch def X /x1 exch def X x1 y1 X x2 y1 X x2 y2 X x1 y2 X 4 Y X } bind def X/RR { X /rad exch def X normalize X /y2 exch def X /x2 exch def X normalize X /y1 exch def X /x1 exch def X newpath X x1 y1 rad add moveto X x1 y2 x2 y2 rad arcto X x2 y2 x2 y1 rad arcto X x2 y1 x1 y1 rad arcto X x1 y1 x1 y2 rad arcto X closepath X 16 {pop} repeat X } bind def X/C { X grestore X gsave X R X clip X } bind def X/U { X grestore X gsave X } bind def X/F { X FMfonts exch get X setfont X } bind def X/T { X moveto show X } bind def X/RF { X rotate X 0 ne {-1 1 scale} if X } bind def X/TF { X gsave X moveto X RF X show X grestore X } bind def X/P { X moveto X 0 32 3 2 roll widthshow X } bind def X/PF { X gsave X moveto X RF X 0 32 3 2 roll widthshow X grestore X } bind def X/S { X moveto X 0 exch ashow X } bind def X/SF { X gsave X moveto X RF X 0 exch ashow X grestore X } bind def X/B { X moveto X 0 32 4 2 roll 0 exch awidthshow X } bind def X/BF { X gsave X moveto X RF X 0 32 4 2 roll 0 exch awidthshow X grestore X } bind def X /x FMLOCAL X /y FMLOCAL X /dx FMLOCAL X /dy FMLOCAL X /dl FMLOCAL X /t FMLOCAL X /t2 FMLOCAL X /Cos FMLOCAL X /Sin FMLOCAL X /r FMLOCAL X/W { X dnormalize X /dy exch def X /dx exch def X normalize X /y exch def X /x exch def X /dl dx dx mul dy dy mul add sqrt def X dl 0.0 gt { X /t currentlinewidth def X savematrix X /Cos dx dl div def X /Sin dy dl div def X /r [Cos Sin Sin neg Cos 0.0 0.0] def X /t2 t 2.5 mul 3.5 max def X newpath X x y translate X r concat X 0.0 0.0 moveto X dl t 2.7 mul sub 0.0 rlineto X stroke X restorematrix X x dx add y dy add translate X r concat X t 0.67 mul setlinewidth X t 1.61 mul neg 0.0 translate X 0.0 0.0 moveto X t2 1.7 mul neg t2 2.0 div moveto X 0.0 0.0 lineto X t2 1.7 mul neg t2 2.0 div neg lineto X stroke X t setlinewidth X restorematrix X } if X } bind def X/G { X gsave X newpath X normalize translate 0.0 0.0 moveto X dnormalize scale X 0.0 0.0 1.0 5 3 roll arc X closepath fill X grestore X } bind def X/A { X gsave X savematrix X newpath X 2 index 2 div add exch 3 index 2 div sub exch X normalize 2 index 2 div sub exch 3 index 2 div add exch X translate X scale X 0.0 0.0 1.0 5 3 roll arc X restorematrix X stroke X grestore X } bind def X /x FMLOCAL X /y FMLOCAL X /w FMLOCAL X /h FMLOCAL X /xx FMLOCAL X /yy FMLOCAL X /ww FMLOCAL X /hh FMLOCAL X /FMsaveobject FMLOCAL X /FMoptop FMLOCAL X /FMdicttop FMLOCAL X/BEGINPRINTCODE { X /FMdicttop countdictstack 1 add def X /FMoptop count 4 sub def X /FMsaveobject save def X userdict begin X /showpage {} def X FMNORMALIZEGRAPHICS X 3 index neg 3 index neg translate X } bind def X/ENDPRINTCODE { X count -1 FMoptop {pop pop} for X countdictstack -1 FMdicttop {pop end} for X FMsaveobject restore X } bind def X/gn { X 0 X { 46 mul X cf read pop X 32 sub X dup 46 lt {exit} if X 46 sub add X } loop X add X } bind def X /str FMLOCAL X/cfs { X /str sl string def X 0 1 sl 1 sub {str exch val put} for X str def X } bind def X/ic [ X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223 X 0 X {0 hx} {1 hx} {2 hx} {3 hx} {4 hx} {5 hx} {6 hx} {7 hx} {8 hx} {9 hx} X {10 hx} {11 hx} {12 hx} {13 hx} {14 hx} {15 hx} {16 hx} {17 hx} {18 hx} X {19 hx} {gn hx} {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} X {13} {14} {15} {16} {17} {18} {19} {gn} {0 wh} {1 wh} {2 wh} {3 wh} X {4 wh} {5 wh} {6 wh} {7 wh} {8 wh} {9 wh} {10 wh} {11 wh} {12 wh} X {13 wh} {14 wh} {gn wh} {0 bl} {1 bl} {2 bl} {3 bl} {4 bl} {5 bl} {6 bl} X {7 bl} {8 bl} {9 bl} {10 bl} {11 bl} {12 bl} {13 bl} {14 bl} {gn bl} X {0 fl} {1 fl} {2 fl} {3 fl} {4 fl} {5 fl} {6 fl} {7 fl} {8 fl} {9 fl} X {10 fl} {11 fl} {12 fl} {13 fl} {14 fl} {gn fl} X ] def X /sl FMLOCAL X /val FMLOCAL X /ws FMLOCAL X /im FMLOCAL X /bs FMLOCAL X /cs FMLOCAL X /len FMLOCAL X /pos FMLOCAL X/ms { X /sl exch def X /val 255 def X /ws cfs X /im cfs X /val 0 def X /bs cfs X /cs cfs X } bind def X400 ms X/ip { X is X 0 X cf cs readline pop X { ic exch get exec X add X } forall X pop X X } bind def X/wh { X /len exch def X /pos exch def X ws 0 len getinterval im pos len getinterval copy pop X pos len X } bind def X/bl { X /len exch def X /pos exch def X bs 0 len getinterval im pos len getinterval copy pop X pos len X } bind def X/s1 1 string def X/fl { X /len exch def X /pos exch def X /val cf s1 readhexstring pop 0 get def X pos 1 pos len add 1 sub {im exch val put} for X pos len X } bind def X/hx { X 3 copy getinterval X cf exch readhexstring pop pop X } bind def X /h FMLOCAL X /w FMLOCAL X /d FMLOCAL X /lb FMLOCAL X /bitmapsave FMLOCAL X /is FMLOCAL X /cf FMLOCAL X/wbytes { X dup X 8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse X } bind def X/BEGINBITMAPBWc { X 1 {} COMMONBITMAPc X } bind def X/BEGINBITMAPGRAYc { X 8 {} COMMONBITMAPc X } bind def X/BEGINBITMAP2BITc { X 2 {} COMMONBITMAPc X } bind def X/COMMONBITMAPc { X /r exch def X /d exch def X gsave X translate rotate scale /h exch def /w exch def X /lb w d wbytes def X sl lb lt {lb ms} if X /bitmapsave save def X r X /is im 0 lb getinterval def X ws 0 lb getinterval is copy pop X /cf currentfile def X w h d [w 0 0 h neg 0 h] X {ip} image X bitmapsave restore X grestore X } bind def X/BEGINBITMAPBW { X 1 {} COMMONBITMAP X } bind def X/BEGINBITMAPGRAY { X 8 {} COMMONBITMAP X } bind def X/BEGINBITMAP2BIT { X 2 {} COMMONBITMAP X } bind def X/COMMONBITMAP { X /r exch def X /d exch def X gsave X translate rotate scale /h exch def /w exch def X /bitmapsave save def X r X /is w d wbytes string def X /cf currentfile def X w h d [w 0 0 h neg 0 h] X {cf is readhexstring pop} image X bitmapsave restore X grestore X } bind def X /proc1 FMLOCAL X /proc2 FMLOCAL X /newproc FMLOCAL X/Fmcc { X /proc2 exch cvlit def X /proc1 exch cvlit def X /newproc proc1 length proc2 length add array def X newproc 0 proc1 putinterval X newproc proc1 length proc2 putinterval X newproc cvx X} bind def X/ngrayt 256 array def X/nredt 256 array def X/nbluet 256 array def X/ngreent 256 array def X /gryt FMLOCAL X /blut FMLOCAL X /grnt FMLOCAL X /redt FMLOCAL X /indx FMLOCAL X /cynu FMLOCAL X /magu FMLOCAL X /yelu FMLOCAL X /k FMLOCAL X /u FMLOCAL X/colorsetup { X currentcolortransfer X /gryt exch def X /blut exch def X /grnt exch def X /redt exch def X 0 1 255 { X /indx exch def X /cynu 1 red indx get 255 div sub def X /magu 1 green indx get 255 div sub def X /yelu 1 blue indx get 255 div sub def X /k cynu magu min yelu min def X /u k currentundercolorremoval exec def X nredt indx 1 0 cynu u sub max sub redt exec put X ngreent indx 1 0 magu u sub max sub grnt exec put X nbluet indx 1 0 yelu u sub max sub blut exec put X ngrayt indx 1 k currentblackgeneration exec sub gryt exec put X } for X {255 mul cvi nredt exch get} X {255 mul cvi ngreent exch get} X {255 mul cvi nbluet exch get} X {255 mul cvi ngrayt exch get} X setcolortransfer X {pop 0} setundercolorremoval X {} setblackgeneration X } bind def X /tran FMLOCAL X/fakecolorsetup { X /tran 256 string def X 0 1 255 {/indx exch def X tran indx X red indx get 77 mul X green indx get 151 mul X blue indx get 28 mul X add add 256 idiv put} for X currenttransfer X {255 mul cvi tran exch get 255.0 div} X exch Fmcc settransfer X} bind def X/BITMAPCOLOR { X /d 8 def X gsave X translate rotate scale /h exch def /w exch def X /bitmapsave save def X colorsetup X /is w d wbytes string def X /cf currentfile def X w h d [w 0 0 h neg 0 h] X {cf is readhexstring pop} {is} {is} true 3 colorimage X bitmapsave restore X grestore X } bind def X/BITMAPCOLORc { X /d 8 def X gsave X translate rotate scale /h exch def /w exch def X /lb w d wbytes def X sl lb lt {lb ms} if X /bitmapsave save def X colorsetup X /is im 0 lb getinterval def X ws 0 lb getinterval is copy pop X /cf currentfile def X w h d [w 0 0 h neg 0 h] X {ip} {is} {is} true 3 colorimage X bitmapsave restore X grestore X } bind def X/BITMAPGRAY { X 8 {fakecolorsetup} COMMONBITMAP X } bind def X/BITMAPGRAYc { X 8 {fakecolorsetup} COMMONBITMAPc X } bind def X/ENDBITMAP { X } bind def Xend X%%EndProlog X%%BeginSetup X(2.0) FMVERSION X1 1 612 792 0 1 2 FMDOCUMENT X/fillprocs 32 array def Xfillprocs 0 { 0.000000 grayness } put Xfillprocs 1 { 0.100000 grayness } put Xfillprocs 2 { 0.300000 grayness } put Xfillprocs 3 { 0.500000 grayness } put Xfillprocs 4 { 0.700000 grayness } put Xfillprocs 5 { 0.900000 grayness } put Xfillprocs 6 { 0.970000 grayness } put Xfillprocs 7 { 1.000000 grayness } put Xfillprocs 8 {<0f87c3e1f0783c1e> 8 1 setpattern } put Xfillprocs 9 {<0f1e3c78f0e1c387> 8 1 setpattern } put Xfillprocs 10 {<cccccccccccccccc> 8 1 setpattern } put Xfillprocs 11 {<ffff0000ffff0000> 8 1 setpattern } put Xfillprocs 12 {<8142241818244281> 8 1 setpattern } put Xfillprocs 13 {<8040201008040201> 8 1 setpattern } put Xfillprocs 14 {<03060c183060c081> 8 1 setpattern } put Xfillprocs 15 {} put Xfillprocs 16 { 1.000000 grayness } put Xfillprocs 17 { 0.900000 grayness } put Xfillprocs 18 { 0.700000 grayness } put Xfillprocs 19 { 0.500000 grayness } put Xfillprocs 20 { 0.300000 grayness } put Xfillprocs 21 { 0.100000 grayness } put Xfillprocs 22 { 0.030000 grayness } put Xfillprocs 23 { 0.000000 grayness } put Xfillprocs 24 {<f0783c1e0f87c3e1> 8 1 setpattern } put Xfillprocs 25 {<f0e1c3870f1e3c78> 8 1 setpattern } put Xfillprocs 26 {<3333333333333333> 8 1 setpattern } put Xfillprocs 27 {<0000ffff0000ffff> 8 1 setpattern } put Xfillprocs 28 {<7ebddbe7e7dbbd7e> 8 1 setpattern } put Xfillprocs 29 {<7fbfdfeff7fbfdfe> 8 1 setpattern } put Xfillprocs 30 {<fcf9f3e7cf9f3f7e> 8 1 setpattern } put Xfillprocs 31 {} put X%%EndSetup X0 10 /Helvetica FMDEFINEFONT X1 12 /Helvetica-Bold FMDEFINEFONT X%%Page: "1" 1 X%%BeginPaperSize: Letter X%%EndPaperSize X612 792 1 FMBEGINPAGE X72 746 720 756 R X7 X X0 K XV X72 212.67 720 222.67 R XV X144 540 167.17 528.41 144 516.83 3 Y X0.5 H X2 Z X0 X XN X90 450 2.41 2.41 169.59 528.41 A X206 540 229.17 528.41 206 516.83 3 Y XN X90 450 2.41 2.41 231.59 528.41 A X172 528.41 206 528.41 2 L XN X234.59 528.41 390 528.41 2 L XN X53.59 528.41 144 528.41 2 L XN X234.59 591 211.41 579.41 234.59 567.83 3 Y XN X90 450 2.41 2.41 209 579.41 A X172.59 591 149.41 579.41 172.59 567.83 3 Y XN X90 450 2.41 2.41 147 579.41 A X206.59 579.41 172.59 579.41 2 L XN X144 579.41 53.59 579.41 2 L XN X390 579.41 234.59 579.41 2 L XN X126.29 481 252.29 622 R X9 X XN X0 F X0 X X(CMOS 7404) 161.8 605 T X54 477 89 477 89 450 3 L XN X72.2 450 106.2 450 2 L XN X75.6 446.4 102.8 446.4 2 L XN X79 442.8 99.4 442.8 2 L XN X82.4 439.2 96 439.2 2 L XN X85.8 435.6 92.6 435.6 2 L XN X1 F X(CASIO) 19.3 550 T X0 F X(XMIT) 54.35 530 T X(GND) 54.19 479 T X(RECV) 54.41 581 T X390 313 548 626 R XN X1 F X(MAXIM MAX233) 427.31 591 T X547.59 528.41 703 528.41 2 L XN X703 579.41 547.59 579.41 2 L XN X310 693.87 321 693.87 2 L XN X304 698.87 327 698.87 2 L XN X310 703.87 321 703.87 2 L XN X304 708.87 327 708.87 2 L XN X310 713.87 321 713.87 2 L XN X304 718.87 327 718.87 2 L XN X(9V) 282.96 702 T X391 681.37 448 731.37 R XN X(5V REG) 399.3 702 T X315 718.87 315 757 419 757 419 731 4 L XN X315 693 315 654.87 419 654.87 419 680.87 4 L XN X448 706.37 469 706.37 469 626 3 L XN X548 480 571 480 571 426 548 426 4 L XN X390 480 367 480 367 426 390 426 4 L XN X390 402 367 402 367 348 390 348 4 L XN X442 313.5 442 290.5 496 290.5 496 313.5 4 L XN X469 290.5 469 272 2 L XN X452 272 486 272 2 L XN X455.4 268.4 482.6 268.4 2 L XN X458.8 264.8 479.2 264.8 2 L XN X462.2 261.2 475.8 261.2 2 L XN X465.6 257.6 472.4 257.6 2 L XN X0 F X(7) 466.52 617 T X(1) 392.11 477 T X(1) 396.92 477 T X(15) 391.74 423 T X(10) 391.74 399 T X(16) 391.74 344 T X(2) 394.52 524 T X(3) 394.52 576 T X(5) 537.52 524 T X(4) 537.52 576 T X(12) 534.74 477 T X(17) 534.74 423 T X(9) 493.52 317 T X(6) 440.52 317 T X1 F X(WORKST) 665.88 550 T X(A) 718.29 550 T X(TION) 726.06 550 T X0 F X(XMIT) 680.35 581 T X(RECV) 674.41 530 T X702.2 477 627.2 477 627.2 450 3 L XN X644 450 610 450 2 L XN X640.6 446.4 613.4 446.4 2 L XN X637.2 442.8 616.8 442.8 2 L XN X633.8 439.2 620.2 439.2 2 L XN X630.4 435.6 623.6 435.6 2 L XN X(GND) 679.8 479 T X(RS-232 Pin 2) 644.79 569 T X(RS-232 Pin 3) 644.79 518 T X(RS-232 Pin 7) 644.79 467 T X(T) 54.41 569 T X(ip) 60.15 569 T X(Middle) 54.41 518 T X(Ring) 54.41 467 T X18 198 342 361 R X7 X XV X0 X X(Y) 18 354.33 T X(ou can get a MAX233 TTL-RS232 transceiver from) 23.75 354.33 T X(Maxim Integrated Products) 54 337.33 T X(120 San Gabriel Drive) 54 325.33 T X(Sunnyvale, CA 94086) 54 313.33 T X(\050408\051 737-7600) 54 301.33 T X(I chose this device because it seemed to be the simplest solution to ) 18 284.33 T X-0.31 (convert TTL to RS232. If you have any solution which does not require an ) 18 272.33 P X(external power supply) 18 260.33 T X(, I\325d like to know about it.) 114.47 260.33 T X(I used the inverters as a safety precaution,since I didn\325t know how the ) 18 243.33 T X(Casio would interact with the MAX233, and this gave me some isolation. ) 18 231.33 T X(They may not really be necessary at all.) 18 219.33 T X(Any suggestions or comments are solicited.) 18 202.33 T X610 198 774 282 R X7 X XV X0 X X(Chuck Musciano) 610 275.33 T X(Advanced T) 610 263.33 T X(echnology Department) 662.22 263.33 T X(Harris Corporation) 610 251.33 T X(PO Box 37, MS 3A/1912) 610 239.33 T X(Melbourne, FL 32902) 610 227.33 T X(\050407\051 727-6131) 610 215.33 T X(chuck@trantor) 610 203.33 T X(.harris-atd.com) 674.58 203.33 T XFMENDPAGE X%%EndPage: "1" 2 X%%Trailer X%%BoundingBox: 0 0 612 792 X%%Pages: 1 1 X%%DocumentFonts: Helvetica X%%+ Helvetica-Bold END_OF_FILE if test 23690 -ne `wc -c <'schematic.ps'`; then echo shar: \"'schematic.ps'\" unpacked with wrong size! fi # end of 'schematic.ps' fi echo shar: End of archive 5 \(of 6\). cp /dev/null ark5isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.