diff --git a/COPYING b/COPYING new file mode 100755 index 0000000..d87e027 --- /dev/null +++ b/COPYING @@ -0,0 +1 @@ + GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. \ No newline at end of file diff --git a/source/FTPserver/binsubs.c b/source/FTPserver/binsubs.c new file mode 100755 index 0000000..8fd5cbf --- /dev/null +++ b/source/FTPserver/binsubs.c @@ -0,0 +1 @@ +// binsubs.c // MacBinary Subroutines. // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment FTPServer #endif #include "maclook.proto.h" #include "bkgr.proto.h" #include "MacBinary.h" #include "telneterrors.h" #include "binsubs.proto.h" #include "translate.proto.h" #include "debug.h" #include "DlogUtils.proto.h" // For WriteZero static unsigned short CalculateCRC(unsigned char *ptr, short count, unsigned short crc); static void SetFileInfo(short volume, long dirID, StringPtr name, HFileParam *iop); static void MakeTextFile(short volume, long dirID, StringPtr name, HFileParam *iop); static short isMacBinary(MBHead *p); static OSErr bwrite( MBFile *out, char *buffer, long size); static void ProcessMBHead (MBFile *out, MBHead *header); extern MBFile /* BYU */ *mbfp; /* BYU */ #define BLOCKS(x) ((x+127)/128) /*#define lmove(f,t) memmove(f,t,(size_t) 4) /* BYU LSC */ MBHead *mbh; char buffer[128]; unsigned short CalculateCRC(unsigned char *ptr, short count, unsigned short crc) { unsigned short i; crc = 0; while (count -- > 0) { crc = crc ^ (unsigned short)*ptr++ << 8; for (i = 0; i < 8; i++) if (crc & 0x8000) crc = crc << 1 ^ 0x1021; else crc = crc << 1; } return crc; } void GetFileInfo(short volume, long dirID, StringPtr name, HFileParam *iop) { OSErr err; iop->ioNamePtr = name; iop->ioVRefNum = volume; iop->ioDirID = dirID; iop->ioFVersNum = 0; iop->ioFDirIndex = 0; err = PBHGetFInfo((HParmBlkPtr) iop, FALSE); } void SetFileInfo(short volume, long dirID, StringPtr name, HFileParam *iop) { OSErr err; iop->ioNamePtr = name; iop->ioVRefNum = volume; iop->ioDirID = dirID; iop->ioFVersNum = 0; iop->ioFDirIndex = 0; err = PBHSetFInfo((HParmBlkPtr) iop, FALSE); } void MakeTextFile(short volume, long dirID, StringPtr name, HFileParam *iop) { GetFileInfo(volume, dirID, name, iop); iop->ioFlFndrInfo.fdType = 'TEXT'; iop->ioFlFndrInfo.fdCreator = gFTPServerPrefs->TextCreator; SetFileInfo(volume, dirID, name, iop); } short isMacBinary(MBHead *p) { unsigned short crc; if ((p->nlen > 0) && (p->nlen < 65) && (p->zero1 == 0) && (p->zero2 == 0) && (p->zero3 == 0)) { // Assume MB I crc = CalculateCRC((unsigned char *)p, 124, 0); if (((short)p->crc == crc) && (p->mb2versnum > 128)) { // Check for MB II if (p->mb2minvers > 129) return(0); // If vers is greater than 129, leave it alone return (1); // Valid MB II file. } else { p->flags2 = 0; // So we can use same routines for MB I & II return (1); // Valid MB I file (we make it a II file on the fly.) } } return(0); // Not a Macbinary file } long MBsize( MBFile *mbfp) { long size = 0; OSErr ret; ret = GetEOF( mbfp->fd, &size ); /* length of file data fork */ if (ret != noErr) size = 0; return(size); } MBFile *MBopen(char *file, short vrefnum, long dirID, short mode) { MBFile *mbfp; OSErr err; int i; if ((mbfp = (MBFile *) myNewPtr(sizeof(MBFile))) == NULL) return(NULL); if (gFTPServerPrefs->DoISOtranslation) // MP: translation method trbuf_ftp_mac((unsigned char *)file, strlen(file)); BlockMove(file, mbfp->name, 32); if (strlen(file) > 31) mbfp->name[31] = 0; c2pstr((char *)mbfp->name); if (mbfp->name[1] == '.') mbfp->name[1] = '_'; //replace leading period with slash for (i = 1; i <= mbfp->name[0]; i++) // replace embedded slashes, colons, and CRs if (mbfp->name[i] == '/' || mbfp->name[i] == ':' || mbfp->name[i] == CR) mbfp->name[i] = ' '; if (gFTPServerPrefs->DoISOtranslation) trbuf_mac_ftp((unsigned char *)file, strlen(file)); // MP: translation method mbfp->vrefnum = vrefnum; mbfp->dirID = dirID; mbfp->mode = mode; if ((err = HOpenDF( vrefnum, dirID, mbfp->name, fsRdWrPerm, &mbfp->fd)) != noErr) { if ((err==-43) && (mode & MB_WRITE)) { err = HCreate( vrefnum, dirID, mbfp->name, gFTPServerPrefs->BinaryCreator, gFTPServerPrefs->BinaryType); if (mode & MB_ISASCII) { HFileParam blah; MakeTextFile(vrefnum, dirID, mbfp->name, &blah); } if (HOpenDF( vrefnum, dirID, mbfp->name, fsRdWrPerm, &mbfp->fd)) return( 0L); } else return(0L); } if (mode & MB_APPEND) SetFPos(mbfp->fd,fsFromLEOF,0); mbfp->binary=0; mbfp->sector1=1; mbfp->fork=0; return( mbfp); } OSErr bwrite( MBFile *out, char *buffer, long size) { long len = size; OSErr error = noErr; if (out->binary) { if (out->bytes > 0) { if (out->bytes < len) len = out->bytes; error= FSWrite( out->fd, &len, buffer); out->bytes -= len; buffer +=len; size -= len; } if (out->bytes <= 0) { if (!out->fork) { out->fork = 1; out->bytes = BLOCKS(out->rlen)*128; SetEOF( out->fd, (long) out->dlen); FSClose( out->fd); if (out->bytes) { HOpenRF( out->vrefnum, out->dirID, out->name, fsRdWrPerm, &out->fd); if (size) { len = (long) size; error= FSWrite( out->fd, &len, buffer); } } else out->fd = 0; } else SetEOF( out->fd, (long) out->rlen); } } else { error = FSWrite( out->fd, &len, buffer); } return (error); } void ProcessMBHead (MBFile *out, MBHead *header) { OSErr err; BlockMove(header, &out->header, sizeof(MBHead)); out->binary = 1; BlockMove(&header->dflen[0], &out->dlen, 4); BlockMove(&header->rflen[0], &out->rlen, 4); out->bytes = BLOCKS(out->dlen)*128; out->fork = 0; out->sector1 = 0; FSClose(out->fd); if (HDelete( out->vrefnum, out->dirID, out->name)) /* Error deleting Old File */ DoError (200 | RESOURCE_ERRORCLASS, LEVEL1, NULL); BlockMove(&out->header.nlen, out->name, 32); #if 0 /* BYU 2.4.17 */ MBstat( &out->header.nlen, 1, (long)(BLOCKS(out->dlen)+BLOCKS(out->rlen)) ); #endif /* BYU 2.4.17 */ if (out->bytes) { if ((err=HOpenDF( out->vrefnum, out->dirID, out->name, fsRdWrPerm, &out->fd)) != noErr) { if (err == -43) { long cre,typ; BlockMove(out->header.type, &typ, 4); BlockMove(out->header.creator, &cre, 4); HCreate( out->vrefnum, out->dirID, out->name, cre, typ); if (HOpenDF(out->vrefnum, out->dirID, out->name, fsRdWrPerm, &out->fd)) return; } else { return; } } } else { if ((err=HOpenRF( out->vrefnum, out->dirID, out->name, fsRdWrPerm, &out->fd)) != noErr) { if (err == -43) { long cre,typ; BlockMove(out->header.type, &typ, 4); BlockMove(out->header.creator, &cre, 4); HCreate( out->vrefnum, out->dirID, out->name, cre, typ); if (HOpenRF( out->vrefnum, out->dirID, out->name, fsRdWrPerm, &out->fd)) return; } else { return; } } out->fork = 1; out->bytes=BLOCKS(out->rlen)*128; } } long MBwrite( MBFile *out, void *buffer, /* BYU LSC */ long size ) { long rsize; if (size < 1) return(0); rsize=size; if (out->sector1 && (size >= sizeof(struct MBHead)) && (!(out->mode & MB_DISABLE))) { if (isMacBinary((MBHead *) buffer)) { // WARNING: isMacBinary modifies data ProcessMBHead( out, (MBHead *) buffer); buffer = (void *)((char *)buffer + 128); if ((size-=128) <1) return(rsize); } } if (bwrite( out,buffer,size)) return(-1); else return( rsize); } void MBclose( MBFile *out) { HFileParam finfo; long fpos; if (!out->fd) { if (out != NULL) DisposPtr((Ptr)out); return; } if (!(out->mode & MB_DISABLE) && (out->mode & MB_WRITE)) { if (out->fork) SetEOF( out->fd, (long) out->rlen); else SetEOF( out->fd, (long) out->dlen); FSClose( out->fd); GetFileInfo( out->vrefnum, out->dirID, out->name, &finfo); BlockMove(&out->header.type[0], &finfo.ioFlFndrInfo, sizeof(FInfo)); BlockMove(&out->header.cdate[0], &finfo.ioFlCrDat, 4); BlockMove(&out->header.mdate[0], &finfo.ioFlMdDat, 4); finfo.ioFlFndrInfo.fdFlags &= 0xfeff; finfo.ioFlFndrInfo.fdFlags |= (out->header.flags2 & 0x00FF); finfo.ioFlRLgLen=out->rlen; finfo.ioFlLgLen =out->dlen; SetFileInfo( out->vrefnum, out->dirID, out->name, &finfo); } else if (out->mode & MB_WRITE) { GetFPos( out->fd, &fpos); SetEOF( out->fd, fpos); FSClose( out->fd); } else FSClose( out->fd); DisposPtr((Ptr) out); /* JMB 2.6 -- Nice memory leak, no? */ } long MBread ( MBFile *in, void *buffer, long size ) { char *p; long rsize=size; unsigned short crc; if (in->fork<0) { return(-1); } p = buffer; if (in->sector1) { HFileParam finfo; // setmem( &in->header, sizeof(MBHead), 0); WriteZero((Ptr)&in->header, sizeof(MBHead)); BlockMove(in->name, &in->header.nlen, (Length(in->name) > 31) ? 32 : (Length(in->name)+1)); GetFileInfo( in->vrefnum, in->dirID, in->name, &finfo); BlockMove(&finfo.ioFlFndrInfo, &in->header.type[0], sizeof(FInfo) ); in->header.flags2 = finfo.ioFlFndrInfo.fdFlags & 0x00FF; in->header.protected = (in->header.zero2 & 0x40)?1:0; in->header.zero2 = 0; BlockMove(&finfo.ioFlLgLen, &in->header.dflen[0], 4); BlockMove(&finfo.ioFlRLgLen, &in->header.rflen[0], 4); BlockMove(&finfo.ioFlCrDat, &in->header.cdate[0], 4); BlockMove(&finfo.ioFlMdDat, &in->header.mdate[0], 4); in->header.mb2versnum = 129; in->header.mb2minvers = 129; crc = CalculateCRC((unsigned char *) &(in->header), 124, 0); BlockMove(&crc, &(in->header.crc), 2); in->dlen=finfo.ioFlLgLen; in->rlen=finfo.ioFlRLgLen; if (! (in->mode & MB_DISABLE) ) { if (size<128) return(-1); BlockMove(&in->header, p, 128); p +=128; size -= 128; in->bytes= BLOCKS(in->dlen)*128; in->binary=1; } else { in->bytes = in->dlen; in->rlen=0; in->binary=0; } in->sector1=0; #if 0 /* BYU 2.4.17 */ MBstat( &in->header.nlen, 1, (long) (BLOCKS(in->dlen)+BLOCKS(in->rlen)) ); #endif /* BYU 2.4.17 */ } if ( size >0) { long length = size; OSErr err; err = FSRead( in->fd, &length, p); size -= length; in->bytes -=length; p += length; if (err == -39 || (in->bytes<=0) ) { FSClose( in->fd ); if (in->bytes<0L) in->bytes=0L; // setmem(p, in->bytes, 0); // Make filler bytes zero WriteZero(p, in->bytes); size -= in->bytes; p += in->bytes; /* Make adjustments for necessary 128 byte term */ if (!in->fork ) { in->fork=1; in->bytes= BLOCKS(in->rlen)*128; if (in->bytes) { HOpenRF( in->vrefnum, in->dirID, in->name, fsRdWrPerm, &in->fd); #ifdef READ length=(long)size; if (length >0L) { err = FSRead( in->fd, &length, p); size -= length; in->bytes -=length; } #endif READ } else { in->fd=0; in->fork=-1; /* Time to close up shop */ } } else { in->fd=0; in->fork=-1; /* Time to close up shop */ } } } return( rsize-size); } void init_mb_files(void) { /* BYU */ mbfp->fd = 0; /* BYU */ } /* BYU */ /* BYU */ void close_mb_files(void) { /* BYU */ if (mbfp->fd != 0) MBclose( mbfp ); /* BYU - close input file */ } /* BYU */ \ No newline at end of file diff --git a/source/FTPserver/binsubs.proto.h b/source/FTPserver/binsubs.proto.h new file mode 100755 index 0000000..e91a15e --- /dev/null +++ b/source/FTPserver/binsubs.proto.h @@ -0,0 +1 @@ +void GetFileInfo(short volume, long dirID, StringPtr name, HFileParam *iop); long MBsize( MBFile *mbfp); MBFile *MBopen(char *file, short vrefnum, long dirID, short mode); void init_mb_files(void); void close_mb_files(void); long MBread ( MBFile *in, void *buffer, long size ); long MBwrite ( MBFile *out, void *buffer, long size ); void MBclose ( MBFile *out ); \ No newline at end of file diff --git a/source/FTPserver/bkgr.c b/source/FTPserver/bkgr.c new file mode 100755 index 0000000..7b9c10b --- /dev/null +++ b/source/FTPserver/bkgr.c @@ -0,0 +1 @@ +// Background procedures for rcp and ftp // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * NCSA Revisions: * 11/86 Tim Krauskopf * 7/92 Telnet 2.6: added global structures, cleaned up defines Scott Bulmahn * * */ #ifdef MPW #pragma segment FTPServer #endif #include "InternalEvents.h" #include "netevent.proto.h" #include "menuseg.proto.h" #include "network.proto.h" #include "mydnr.proto.h" #include "macutil.proto.h" #include "macbinary.h" #include "binsubs.proto.h" #include "maclook.proto.h" #include "bkgr.proto.h" #include "telneterrors.h" #include "wind.h" #include "mainseg.proto.h" #include "translate.proto.h" #include "DlogUtils.proto.h" // For WriteZero proto #include "vsdata.h" #include "vsinterf.proto.h" extern WindRec *ftplog; extern TelInfoRec *TelInfo; #define PFTP 1 #define PRCP 2 #define PDATA 3 #define HTELNET 23 #define HRSHD 514 #define HFTP 21 #define BUFFERS 8000 #define PATHLEN 256 #define MACBINARY #define RCPSEGSIZE 512 #define O_RAW O_RDONLY #define EOLCHAR 13 #define FASCII 0 #define FIMAGE O_RAW #define FAMODE 0 #define FIMODE 1 #define FMMODE 2 /* Mac Binary, when ready */ MBFile *mbfp=NULL; char *nextfile; static Handle mungbuf = 0; static short fcnt=0; static short ftpenable=0, /* is file transfer enabled? */ rcpenable=0, /* is rcp enabled? */ rsnum=-1, /* port number for incoming rshell */ rserr=-1; /* port number for rshd() stderr */ static unsigned char *xs=0L, /* buffer space for file transfer */ *pathname=0L, /* space to keep path names */ *newfile=0L, /* current file being received */ myuser[17], /* user name on my machine */ waitchar; /* character waiting for from net */ static short curstate = -1, /* state machine for background processes */ retstate = 200, /* to emulate a subroutine call */ ftpstate = 0, /* state of the ftp data transfer */ isdir=0, /* flag for rcp target pathname */ waitpos=0, /* marker for gathering strings from net */ cnt=0, /* number of characters from last netread() */ fh=0, /* file handle when transfer file is open */ ftpfh=0, /* file handle for ftp data */ rc=0, /* telnet flag */ xp=0, /* general pointer */ towrite=0, /* file transfer pointer */ len=0; /* file transfer length */ static long filelen=0L; /* length of current file for transfer */ short mainport[NPORTS]; /* BYU 2.4.16 - map FTP data port to main port */ short dataport[NPORTS]; /* BYU 2.4.16 - map FTP main port to data port */ short mainstate[NPORTS]; /* BYU 2.4.16 */ short datastate[NPORTS]; /* BYU 2.4.16 */ short retnstate[NPORTS]; ip_port fileport[NPORTS]; static char crfound=0; static short rfstate, ftptmode=FAMODE; /* how to transfer the file on net */ static ip_addr portaddr[NPORTS], hishostaddr; static ip_port portremoteport[NPORTS], portlocalport[NPORTS]; unsigned char messs[100]; /* BYU */ char ListingTemplate[256]; CInfoPBRec theDirectoryState; static void CRESP(short fnum, short msg_number); static short ftpgo( short fnum); void FTPServerUnload(void) {} void CRESP(short fnum, short msg_number) { GetIndString(messs,MSG_RESOURCE_ID,msg_number+1); netpush(fnum); netwrite(fnum, &messs[1], (short)messs[0]); } void ftpmess( char *cp) { short temp; temp=strlen(cp); if (temp>80 || temp < 1) return; VSwrite(ftplog->vs,cp,temp); } /***********************************************************************/ void StartUpFTP(void) { if (gFTPServerPrefs->ServerState != 0) setftp(); else unsetftp(); } void setftp( void) { short fnum,i1; /* BYU 2.4.16 */ short size = 1024; Mnetinit(); // RAB BetterTelnet 1.0fc4 /* set up to receive a telnet connection for ftp commands */ rfstate = 0; ftpstate = 0; /* Listen for FTP if we're not listening already */ for (i1 = 0; i1 < NPORTS; i1++) /* BYU 2.4.16 */ if (GetPortType(i1) == PFTP) break; /* BYU 2.4.16 */ if (i1 >= NPORTS) { /* BYU 2.4.16 - non-SLIP listen */ fnum = netlisten(HFTP); /* BYU 2.4.16 - MacTCP listen */ ftpenable = 1; /* BYU 2.4.16 */ if (fnum >= 0) { /* BYU 2.4.16 - signal that events should be caught */ SetPortType(fnum, PFTP); dataport[fnum] = -1; /* BYU 2.4.16 - no data needed yet */ mainstate[fnum] = 0; /* BYU 2.4.16 */ datastate[fnum] = 0; /* BYU 2.4.16*/ retnstate[fnum] = 200; /* BYU 2.4.16 */ } /* BYU 2.4.16 */ } /* BYU 2.4.16 */ strcpy((char *) myuser,"unknown"); /* BYU LSC - set unknown user name */ if (mungbuf == NULL) mungbuf = myNewHandle(size); } void unsetftp( void) { short i1; /* BYU 2.4.16 */ rfstate = 0; ftpstate = 0; for (i1 = 0; i1 < NPORTS; i1++) { /* BYU 2.4.16 */ if (GetPortType(i1) == PFTP) { /* BYU 2.4.16 */ netclose(i1); /* BYU 2.4.16 */ SetPortType(i1, NO_TYPE); /* BYU 2.4.16 */ mainstate[i1] = 0; /* BYU 2.4.16 */ datastate[i1] = 0; /* BYU 2.4.16*/ } /* BYU 2.4.16 */ } /* BYU 2.4.16 */ ftpenable = 0; if (mungbuf != NULL) DisposeHandle(mungbuf); } #if 0 /* BYU - Converted to STR# resource number 23227 */ /***********************************************************************/ /* * resident ftp server -- enables initiation of ftp without a username * and password, as long as this telnet is active at the same time * Now checks for the need of passwords. */ static char *messs[] = { "220 Macintosh Resident FTP server, ready \015\012", "451 Error in processing list command \015\012", "221 Goodbye \015\012", /*2*/ "200 This space intentionally left blank < > \015\012", "150 Opening connection \015\012", "226 Transfer complete \015\012", /*5*/ "200 Type set to A, ASCII transfer mode \015\012", "200 Type set to I, binary transfer mode \015\012", "500 Command not understood \015\012", /*8*/ "200 Okay \015\012", "230 User logged in \015\012", "550 File not found \015\012", /*11*/ "501 Directory not present or syntax error\015\012", "250 Chdir okay\015\012", "257 \"", "\" is the current directory \015\012", /*15*/ "501 File not found \015\012", "504 Parameter not accepted, not implemented\015\012", "200 Stru F, file structure\015\012", "200 Mode S, stream mode\015\012", /*19*/ "202 Allocate and Account not required for this server\015\012", "501 Cannot open file to write, check for valid name\015\012", "530 USER and PASS required to activate me\015\012", "331 Password required\015\012", /*23 */ "530 Login failed\015\012", "200 MacBinary Mode enabled\015\012", "200 MacBinary Mode disabled\015\012", /*26 */ "552 Disk write error, probably disk full\015\012", "214-NCSA Telnet FTP server, supported commands:\015\012", " USER PORT RETR ALLO PASS STOR CWD XCWD XPWD LIST NLST\015\012", " HELP QUIT MODE TYPE STRU ACCT NOOP MACB\015\012", /*30*/ " MACB is MacBinary and must be done with TYPE I\015\012", "214 Direct comments and bugs to telbug@ncsa.uiuc.edu\015\012", "200 Type set to I, binary transfer mode [MACBINARY ENABLED]\015\012", /* 33 */ "200 Type set to I, binary transfer mode [macbinary disabled]\015\012", ""}; #endif /* open the FTP data connection to the remote host */ short ftpgo( short fnum) { short ftpdata; netfromport(20); /* ftp data port */ ftpdata = netxopen(portaddr[fnum],fileport[fnum], 15); mainport[ftpdata] = fnum; dataport[fnum] = ftpdata; return(ftpdata); } void rftpd ( short code, /* BYU 2.4.16 */ short fnum /* BYU 2.4.16 */ ) { ip_port fdport; short ftpdata, i, append = 0; char tempp[256], theDir[256]; char updir[4]; /* JMB 2.6 */ if (!ftpenable) return; netpush(fnum); rfstate = mainstate[fnum]; /* BYU 2.4.16 */ ftpstate = datastate[fnum]; /* BYU 2.4.16 */ retstate = retnstate[fnum]; /* BYU 2.4.16 */ fdport = fileport[fnum]; /* BYU 2.4.16 */ switch (rfstate) { case 0: if (code != CONOPEN) break; ftptmode = FAMODE; netputevent(USERCLASS,FTPCOPEN,-1,0); if (!xs) xs=(unsigned char *)myNewPtr(BUFFERS+10); /* BYU LSC */ if (!pathname) pathname=(unsigned char *)myNewPtr(PATHLEN); if (!newfile) newfile=(unsigned char *)myNewPtr(PATHLEN); if (!xs || !pathname || !newfile) /* no memory for ftp names */ { DoError(114 | MEMORY_ERRORCLASS, LEVEL3, NULL); quit(); // Should we really quit? } rfstate = 1; /* drop through */ case 1: CRESP(fnum,0); /* BYU 2.4.16 */ netgetftp(fnum, &portaddr[fnum], &portlocalport[fnum], &portremoteport[fnum]); /* BYU 2.4.16 - get default ftp information */ hishostaddr = portaddr[fnum]; fdport = portremoteport[fnum]; waitpos = 0; waitchar = '\012'; rfstate = 50; /* note skips over */ if ((gFTPServerPrefs->ServerState == 2)) retstate = 3; /* check pass */ else retstate = 5; /* who needs one ? */ break; case 3: /* check for passwords */ case 4: waitpos = 0; waitchar = '\012'; rfstate = 50; if (!strncmp("USER",(char *) xs,4)) { /* BYU LSC */ if (strlen((char *) xs) < 6) /* BYU LSC - make sure blank name stays blank */ xs[5] = myuser[0] = 0; strncpy((char *) myuser,(char *) &xs[5],16); /* BYU LSC - keep user name */ FTPLogUserLoggingIn(); CRESP(fnum,23); /* BYU 2.4.16 */ retstate = 4; /* wait for password */ break; } if (!strncmp("PASS",(char *) xs,4)) { /* BYU LSC */ if (Scheckpass((char *) myuser,(char *) &xs[5])) { /* BYU LSC */ ftpmess("FTP password OK - logged in\015\012"); CRESP(fnum,10); /* BYU 2.4.16 */ retstate = 5; } else { ftpmess("FTP password failed - access denied\015\012"); CRESP(fnum,24); /* BYU 2.4.16 */ retstate = 3; } break; } if (!strncmp("QUIT",(char *) xs,4)) { /* BYU LSC */ CRESP(fnum,2); /* BYU 2.4.16 */ cnt = -1; } else { CRESP(fnum,22); /* BYU 2.4.16 */ } retstate = 3; /* must have password first */ break; /* interpret commands that are received from the other side */ case 5: /* set to a safe state to handle recursion, wait for another command line from client */ rfstate = 50; retstate = 5; waitchar = '\012'; waitpos = 0; if (!strncmp((char *) xs,"LIST",4) || !strncmp((char *) xs,"NLST",4)) { /* BYU LSC */ if ((strlen((char *) xs) < 6) || xs[5] == '.') /* BYU LSC */ strcpy((char *) xs,"LIST *"); /* BYU LSC */ strcpy(ListingTemplate, (char *) &xs[5]); theDirectoryState.hFileInfo.ioFDirIndex=1; theDirectoryState.hFileInfo.ioVRefNum = TelInfo->DefaultDirVRefNum; theDirectoryState.hFileInfo.ioDirID = TelInfo->DefaultDirDirID; nextfile = getFileName(ListingTemplate, &theDirectoryState); /* find first name */ if (nextfile == NULL) { CRESP(fnum,16); /* BYU 2.4.16 */ } else { Str255 tempstr; char tempstr2[256]; ftpdata = ftpgo(fnum); /* BYU 2.4.16 - open the connection */ fdport = portremoteport[fnum]; /* BYU 2.4.16 - reset to def */ if (ftpdata >= 0) SetPortType(ftpdata, PDATA); ftpstate = 40; /* ready to transmit */ CRESP(fnum,4); /* BYU 2.4.16 */ PathNameFromDirID(TelInfo->DefaultDirDirID, TelInfo->DefaultDirVRefNum, tempstr); PtoCstr(tempstr); sprintf(tempstr2, "FTP Sending Directory %s\015\012", (char *)tempstr); ftpmess(tempstr2); } } else if (!strncmp((char *) xs,"CWD",3)) { /* BYU LSC */ if (ChangeDirectory(&(TelInfo->DefaultDirDirID), &(TelInfo->DefaultDirVRefNum), (char *) &xs[4])) { CRESP(fnum,12); /* BYU 2.4.16 */ } else { /* success */ CRESP(fnum,13); /* BYU 2.4.16 */ } } else if (!strncmp((char *) xs,"CDUP",4)) { /* JMB 2.6 */ strcpy(updir, ".."); /* JMB 2.6 */ if (ChangeDirectory(&(TelInfo->DefaultDirDirID), &(TelInfo->DefaultDirVRefNum), updir)) { /* JMB 2.6 */ CRESP(fnum,12); /* JMB 2.6 */ } /* JMB 2.6 */ else { /* JMB 2.6 */ CRESP(fnum,13); /* JMB 2.6 */ } /* JMB 2.6 */ } /* JMB 2.6 */ else if (!strncmp((char *) xs,"STOR",4) || !strncmp((char *) xs,"APPE", 4)) { short MBflag; if (!strncmp((char *) xs,"APPE", 4)) { if (ftptmode != FASCII) { CRESP(fnum, 35); break; } else append = 1; } /* had to simplify this, else MPW C 3.0/3.1 generates bad code! */ if ((!TelInfo->MacBinary) || (ftptmode == FAMODE)) MBflag = MB_DISABLE; else MBflag = 0; if (ftptmode == FAMODE) MBflag |= MB_ISASCII; if (append) MBflag |= MB_APPEND; append = 0; mbfp = MBopen((char *)&xs[5], TelInfo->DefaultDirVRefNum, TelInfo->DefaultDirDirID, (short)(MB_WRITE | MBflag)); if (mbfp == 0L) { CRESP(fnum,21); /* BYU 2.4.16 */ break; } else ftpfh = 12; ftpstate = 0; strncpy((char *) newfile,(char *) &xs[5],PATHLEN-1); /* BYU LSC */ ftpdata = ftpgo(fnum); /* BYU 2.4.16 - open connection */ fdport = portremoteport[fnum]; /* BYU 2.4.16 - reset to def */ if (ftpdata >= 0) SetPortType(ftpdata, PDATA); CRESP(fnum,4); /* BYU 2.4.16 */ ftpstate = 30; /* ready for data */ } else if (!strncmp((char *) xs,"RETR",4)) /* BYU LSC */ { /* had to simplify this, else MPW C 3.0/3.1 generates bad code! */ short MBflag; if ((!TelInfo->MacBinary) || (ftptmode == FAMODE)) MBflag = MB_DISABLE; else MBflag = 0; if (ftptmode == FAMODE) MBflag |= MB_ISASCII; mbfp = MBopen((char *) &xs[5], TelInfo->DefaultDirVRefNum, TelInfo->DefaultDirDirID, MB_READ | MBflag); if (mbfp == 0L) { CRESP(fnum,11); /* BYU 2.4.16 */ break; } ftpfh = 12; strncpy((char *) newfile,(char *) &xs[5],PATHLEN-1); /* BYU LSC */ PathNameFromDirID(TelInfo->DefaultDirDirID, TelInfo->DefaultDirVRefNum, (StringPtr) theDir); PtoCstr((StringPtr) theDir); sprintf(tempp,"remote <-- %s/%s\015\012",theDir,newfile); ftpmess(tempp); ftpdata = ftpgo(fnum); /* BYU 2.4.16 - open connection */ fdport = portremoteport[fnum]; ftpstate = 20; /* ready for data */ if (ftpdata >= 0) SetPortType(ftpdata, PDATA); CRESP(fnum,4); /* BYU 2.4.16 */ } else if (!strncmp((char *) xs,"TYPE",4)) { /* BYU LSC */ if (toupper(xs[5]) == 'I') { ftptmode = FIMODE; if (TelInfo->MacBinary) { CRESP(fnum,33); /* BYU 2.4.16 - Binary on, MACB ON */ } else { CRESP(fnum,34); /* BYU 2.4.16 - Binary on, MACB off */ } } else if (toupper(xs[5]) == 'A') { ftptmode = FAMODE; CRESP(fnum,6); /* BYU 2.4.16 */ } else { CRESP(fnum,17); /* BYU 2.4.16 */ } } else if (!strncmp((char *) xs,"MACB",4)) { /* BYU LSC */ if (toupper(xs[5]) == 'E') { TelInfo->MacBinary = 1; CRESP(fnum,25); /* BYU 2.4.16 */ } else { TelInfo->MacBinary = 0; CRESP(fnum,26); /* BYU 2.4.16 */ } DisplayMacBinary(); /* post an event ? */ } else if (!strncmp((char *) xs,"PORT",4)) { /* get the requested port number from the command given */ ip_addrbytes tempaddr; unsigned char *stringPtr, *tempPtr, storage[10]; long numbers[6]; short index; for (tempPtr = stringPtr = &xs[5], index = 0; (*stringPtr != '\0') && (index < 6);index++) { while ((*tempPtr != '\0') && (*tempPtr != ',')) { tempPtr++; }; BlockMoveData(stringPtr, &(storage[1]), tempPtr-stringPtr); storage[0] = tempPtr-stringPtr; StringToNum(storage, &numbers[index]); tempPtr++; stringPtr = tempPtr; } tempaddr.a.byte[0] = (char) numbers[0]; tempaddr.a.byte[1] = (char) numbers[1]; tempaddr.a.byte[2] = (char) numbers[2]; tempaddr.a.byte[3] = (char) numbers[3]; portaddr[fnum] = tempaddr.a.addr; portlocalport[fnum] = numbers[4]*256 + numbers[5]; fdport = portlocalport[fnum]; CRESP(fnum,3); } else if (!strncmp((char *) xs,"QUIT",4)) { /* BYU LSC */ CRESP(fnum,2); /* BYU 2.4.16 */ rfstate = 60; netputuev(CONCLASS,CONDATA,fnum,0); /* post back to me */ } else if (!strncmp((char *) xs,"XPWD",4) || !strncmp((char *) xs,"PWD",3)) { /* BYU LSC */ CRESP(fnum,14); /* BYU 2.4.16 - start reply */ PathNameFromDirID(TelInfo->DefaultDirDirID, TelInfo->DefaultDirVRefNum, (StringPtr) xs); PtoCstr((StringPtr) xs); netwrite(fnum,(char *) xs,strlen((char *) xs)); /* BYU LSC - write dir name */ CRESP(fnum,15); /* BYU 2.4.16 - finish reply */ } else if (!strncmp((char *) xs,"USER",4)) { /* BYU LSC */ if (strlen((char *) xs) < 6) /* BYU LSC - make sure blank name stays blank */ xs[5] = myuser[0] = 0; strncpy((char *) myuser,(char *) &xs[5],16); /* BYU LSC - keep user name */ FTPLogUserLoggingIn(); /* confirm log in without password */ CRESP(fnum,10); /* BYU 2.4.16 */ } else if (!strncmp((char *) xs,"STRU",4)) { /* BYU LSC - only one stru allowed */ if (xs[5] == 'F') { CRESP(fnum,18); } /* BYU 2.4.16 */ else { CRESP(fnum,17); } /* BYU 2.4.16 */ } else if (!strncmp((char *) xs,"MODE",4)) { /* BYU LSC - only one mode allowed */ if (xs[5] == 'S') { CRESP(fnum,19); } /* BYU 2.4.16 */ else { CRESP(fnum,17); } /* BYU 2.4.16 */ } else if (!strncmp((char *) xs,"ALLO",4) || !strncmp((char *) xs,"ACCT",4)) { /* BYU LSC */ CRESP(fnum,20); } /* BYU 2.4.16 */ else if (!strncmp((char *) xs,"HELP",4)) { /* BYU LSC */ for (i=28; i<33; i++) { CRESP(fnum,i); } /* BYU 2.4.16 */ } else if (!strncmp((char *) xs,"NOOP",4)) { /* BYU LSC */ CRESP(fnum,9); } /* BYU 2.4.16 */ else if (!strncmp((char *) xs,"SYST",4)) { // JMB 2.6 netpush(fnum); // JMB 2.6 netwrite(fnum, "225 MACOS System Version:\015\012", 27); // JMB 2.6 } // JMB 2.6 else { /* command not understood */ CRESP(fnum,8); /* BYU 2.4.16 */ } break; /* subroutine to wait for a particular character */ case 50: while (0 < (cnt = netread(fnum,&xs[waitpos],1))) { if (xs[waitpos] == waitchar) { rfstate = retstate; while (xs[waitpos] < 33) /* find end of string */ waitpos--; xs[++waitpos] = '\0'; /* put in terminator */ for (i=0; i<4; i++) /* want upper case */ xs[i] = toupper(xs[i]); break; } else waitpos += cnt; } break; case 60: /* wait for message to get through */ /* or connection is broken */ /* printf(" %d,%d",netpush(fnum),netest(fnum));*/ if (!netpush(fnum) || netest(fnum)) cnt = -1; else netputuev(CONCLASS,CONDATA,fnum,0); /* post back to me */ break; default: break; } if (cnt < 0) { if (mbfp) { MBclose( mbfp ); mbfp = NULL; } ftpdata = dataport[fnum]; /* BYU 2.4.16 */ if (ftpdata > 0) { netclose(ftpdata); netputevent(USERCLASS,FTPEND,-1,0); dataport[fnum] = -1; /* BYU 2.4.16 */ mainport[ftpdata] = -1; /* BYU 2.4.16 */ } rfstate = 100; ftpstate = 0; cnt = 0; netclose(fnum); SetPortType(fnum, NO_TYPE); netputevent(USERCLASS,FTPCLOSE,-1,0); #if 0 /* BYU 2.4.16 */ fnum = -1; ftpdata = -1; #endif /* BYU 2.4.16 */ setftp(); /* reset it */ } mainstate[fnum] = rfstate; /* BYU 2.4.16 */ datastate[fnum] = ftpstate; /* BYU 2.4.16 */ retnstate[fnum] = retstate; /* BYU 2.4.16 */ fileport[fnum] = fdport; /* BYU 2.4.16 */ } /* important note: for Sfread, nwant must be 256 bytes LARGER than the amount which will probably be read from the connection. Sfread will stop anywhere from 0 to 256 bytes short of filling nwant number of bytes. */ long Sfread( short pnum, char *buf, long nwant) { long i, ndone, lim; char *p, *q; if (nwant < 1024) return(-1); ndone = 0; HLock(mungbuf); while (ndone < nwant - 1024) { if (0 >= (lim = netread(pnum,*mungbuf,1024))) { if (ndone || !lim) /* if this read is valid, but no data */ return(ndone); else return(-1); /* if connection is closed for good */ } p = *mungbuf; q = (char *) buf + ndone; /* printf("\012 lim=%d done=%d want=%d",lim,ndone,nwant); n_row(); */ for (i=0; i < lim; i++) { if (crfound) { if (*p == 10) *q++ = EOLCHAR; else if (*p == 0) *q++ = 13; /* CR-NUL means CR */ crfound = 0; } else if (*p == 13) crfound = 1; else if (gFTPServerPrefs->DoISOtranslation) { *q++ = (char) ftp_iso_mac((unsigned char *)p); /* transform to mac */ } else *q++ = *p; /* copy the char */ p++; } ndone = q-buf; /* count chars ready */ } HUnlock(mungbuf); return(ndone); } /***************************************************************************/ /* Sfwrite * Write an EOL translated buffer into netwrite. * Returns the number of bytes which were processed from the incoming * buffer. Uses its own 1024 byte buffer for the translation (with Sfread). */ long Sfwrite( short pnum, void *buf, long nsrc) { long i,ndone,nout,lim; char *p,*q; ndone = 0; HLock (mungbuf); while (ndone < nsrc) { if (0 > ( i = netroom(pnum))) return(-1); if (i < 1024) /* not enough room to work with */ return(ndone); /* process up to 512 source bytes for output (could produce 1K bytes out) */ if (nsrc - ndone > 512) lim = 512; else lim = nsrc-ndone; p = (char *) buf + ndone; /* where to start this block */ q = *mungbuf; /* where munged stuff goes */ for (i=0; i < lim; i++) { if (*p == EOLCHAR) { *q++ = 13; *q++ = 10; p++; } else if (gFTPServerPrefs->DoISOtranslation) { *q++ = (char) ftp_mac_iso((unsigned char *)p); /* transform to ISO */ p++; } else *q++ = *p++; } ndone += lim; /* # of chars processed */ nout = q-*mungbuf; /* # of chars new */ if ( nout != netwrite(pnum,*mungbuf,nout) ) /* Some error in Sfwrite */ DoError (201 | RESOURCE_ERRORCLASS, LEVEL1, NULL); } HUnlock (mungbuf); return(ndone); } /* FTP receive and send file functions */ void ftpd ( short code, short ftpdata /* BYU 2.4.16 */ ) { short fnum = mainport[ftpdata]; /* BYU 2.4.16 */ short i,a; char tempp[256]; char theDir[256]; ftpstate = datastate[fnum]; /* BYU 2.4.16 */ switch (ftpstate) { default: break; case 40: /* list file names in current dir */ if (code == CONFAIL) /* something went wrong */ fcnt = -1; if (code != CONOPEN) /* waiting for connection to open */ break; ftpstate = 41; /* * send the "nextfile" string and then see if there is another file * name to send */ case 41: netputuev(SCLASS,FTPACT,ftpdata,0); netpush(ftpdata); strcpy(tempp,nextfile); /* BYU 2.4.13 */ strcat(tempp,"\015\012"); /* BYU 2.4.13 */ i = strlen(tempp); /* BYU 2.4.13 */ if (gFTPServerPrefs->DoISOtranslation) trbuf_mac_ftp((unsigned char *)tempp, i); /* transform to ISO */ //PETERL? if (i != netwrite(ftpdata,tempp,i)) { /* BYU 2.4.13 */ CRESP(fnum,1); /* BYU 2.4.16 */ fcnt = -1; break; } theDirectoryState.hFileInfo.ioFDirIndex++; if (NULL == (nextfile = getFileName(ListingTemplate, &theDirectoryState))) { /* normal end */ ftpstate = 22; /* push data through */ } break; case 30: if (code == CONFAIL) /* something went wrong */ fcnt = -1; if (code != CONOPEN) /* waiting for connection to open */ break; ftpstate = 31; crfound = 0; len = xp = 0; filelen = 0L; PathNameFromDirID(TelInfo->DefaultDirDirID, TelInfo->DefaultDirVRefNum, (StringPtr) theDir); PtoCstr((StringPtr) theDir); sprintf(tempp,"remote --> %s/%s\015\012",theDir,newfile); ftpmess(tempp); netputevent(USERCLASS,FTPBEGIN,-2,0); case 31: /* * file has already been opened, take everything from the connection * and place into the open file: ftpfh */ do { /* wait until xs is full before writing to disk */ if (len <= 2000) { if (xp) { if (0 > MBwrite(mbfp, xs, xp)) { DoError (202 | RESOURCE_ERRORCLASS, LEVEL1, NULL); MBclose( mbfp); /* Close on Disk Full Error */ ftpstate=22; CRESP(fnum,27); /* BYU 2.4.16 */ ftpmess((char *) messs); /* BYU LSC */ if( (a = netclose(ftpdata)) !=0 ) DoError (108 | NET_ERRORCLASS, LEVEL1, NULL); fcnt = -1; mbfp=NULL; break; } xp = 0; } len = BUFFERS; /* expected or desired len to go */ } if (ftptmode == FAMODE) fcnt = Sfread(ftpdata,(char *) &xs[xp],len); /* BYU LSC */ else fcnt = netread(ftpdata,&xs[xp],len); if (fcnt >= 0) { len -= fcnt; xp += fcnt; filelen += fcnt; } if (fcnt < 0) { if (0 > MBwrite( mbfp, xs, xp)) { CRESP(fnum,27); /* BYU 2.4.16 */ MBclose( mbfp); /* Close file on error */ break; } MBclose( mbfp ); ftpfh = 0; CRESP(fnum,5); /* BYU 2.4.16 */ } } while (fcnt > 0); break; case 20: if (code == CONFAIL) /* something went wrong */ fcnt = -1; if (code != CONOPEN) /* waiting for connection to open */ break; ftpstate = 21; filelen = MBsize( mbfp ); towrite = 0; xp = 0; netputevent(USERCLASS,FTPBEGIN,-1,0); case 21: /* * transfer file(s) to the other host via ftp request * file is already open = ftpfh */ netputuev(SCLASS,FTPACT,ftpdata,0); if (towrite <= xp) { i = BUFFERS; towrite = MBread( mbfp, xs, i); xp = 0; } if (towrite <= 0 || netest(ftpdata)) { /* we are done */ ftpstate = 22; break; } if (ftptmode == FAMODE) i = Sfwrite(ftpdata,&xs[xp],towrite-xp); else i = netwrite(ftpdata,&xs[xp],towrite-xp); if (i > 0) { xp += i; filelen -= i; if (filelen < 0L) filelen = 0L; } break; case 22: /* wait for data to be accepted */ netputuev(SCLASS,FTPACT,ftpdata,0); fcnt = netpush(ftpdata); /* will go negative on err */ if (!fcnt || netest(ftpdata)) fcnt = -1; if (fcnt < 0) { CRESP(fnum,5); /* BYU 2.4.16 */ } break; case 0: break; } /* end of switch */ /* after reading from connection, if the connection is closed, reset up shop. */ if (fcnt < 0) { if (mbfp) { MBclose( mbfp ); mbfp = NULL; } ftpstate = 0; fcnt = 0; if (ftpdata >= 0) { netclose(ftpdata); netputevent(USERCLASS,FTPEND,-1,0); mainport[ftpdata] = -1; /* BYU 2.4.16 */ dataport[fnum] = -1; /* BYU 2.4.16 */ } } datastate[fnum] = ftpstate; /* BYU 2.4.16 */ } /* Sftpname and Sftpuser and Sftphost * record the name of the file being transferred, to use in the status * line updates */ void Sftpname(char *s) { strcpy(s, (char *) newfile); /* BYU LSC */ } ip_addr Sftphost(void) { return(hishostaddr); } void Sftpstat(long *byt) { *byt = filelen; } void FTPLogUserLoggingIn(void) { ftpmess("FTP user "); ftpmess((char *) myuser); ftpmess(" logging in\015\012"); } /****************************************************************************/ /* Sencompass - Compute the encrypted password */ void Sencompass(char *ps, char *en) { short i,ck; char *p,c; ck = 0; p = ps; while (*p) /* checksum the string */ ck += *p++; c = ck; for (i=0; i<10; i++) { *en = (((*ps ^ c) | 32) & 127); /* XOR with checksum */ if (*ps) ps++; else c++; /* to hide length */ en++; } *en = 0; } /* Sencompass */ /****************************************************************************/ /* Scompass - compute and check the encrypted password */ Boolean Scompass(char *ps, char *en) { short ck; char *p,c; ck = 0; p = ps; while (*p) /* checksum the string */ ck += *p++; c = ck; while (*en) { if ((((*ps ^ c) | 32) & 127) != *en) /* XOR with checksum */ return(FALSE); if (*ps) ps++; else c++; /* increment checksum to hide length */ en++; } return(TRUE); } /****************************************************************************/ /* Scheckpass - Check the password file for the user, password combination */ Boolean Scheckpass(char *us, char *ps) { FTPUser **FTPUhdl; Str255 scratchPstring; CInfoPBRec theInfo; strcpy((char *)scratchPstring, us); CtoPstr((char *)scratchPstring); UseResFile(TelInfo->SettingsFile); FTPUhdl = (FTPUser **)Get1NamedResource(FTPUSER, scratchPstring); if (ResError()) return(FALSE); // User not found HLock((Handle)FTPUhdl); BlockMove((**FTPUhdl).EncryptedPassword, scratchPstring, Length((**FTPUhdl).EncryptedPassword)+1); PtoCstr(scratchPstring); if (Scompass(ps, (char *)scratchPstring)) { // Password matches TelInfo->DefaultDirDirID = (**FTPUhdl).DefaultDirDirID; TelInfo->DefaultDirVRefNum = VolumeNameToRefNum((**FTPUhdl).DefaultDirVolName); WriteZero((Ptr)&theInfo, sizeof(CInfoPBRec)); theInfo.dirInfo.ioVRefNum = TelInfo->DefaultDirVRefNum; theInfo.dirInfo.ioDrDirID = TelInfo->DefaultDirDirID; theInfo.dirInfo.ioNamePtr = scratchPstring; theInfo.dirInfo.ioFDirIndex = -1; // Only give me the Directory Info if (PBGetCatInfoSync(&theInfo) != noErr) { TelInfo->DefaultDirDirID = 2; TelInfo->DefaultDirVRefNum = -1; } ReleaseResource((Handle)FTPUhdl); return(TRUE); } ReleaseResource((Handle)FTPUhdl); return(FALSE); // Password was no good } \ No newline at end of file diff --git a/source/FTPserver/bkgr.proto.h b/source/FTPserver/bkgr.proto.h new file mode 100755 index 0000000..26cbcd6 --- /dev/null +++ b/source/FTPserver/bkgr.proto.h @@ -0,0 +1 @@ +void FTPServerUnload(void); long Sfread( short pnum, char *buf, long nwant); long Sfwrite( short pnum, void *buf, long nsrc); void ftpmess( char *cp); /* Put a C string on the console */ void setftp( void); void unsetftp( void); void ftpd ( short code, short curcon ); void rftpd ( short code, /* BYU 2.4.16 */ short ftpdataport /* BYU 2.4.16 */ ); void Sftpstat( long *byt); void Sftpname( char *s); ip_addr Sftphost(void); void Sftpuser( char *user); void FTPLogUserLoggingIn(void); Boolean Scheckpass(char *us, char *ps); Boolean Scompass(char *ps, char *en); void Sencompass(char *ps, char *en); void StartUpFTP(void); \ No newline at end of file diff --git a/source/FTPserver/macbinary.h b/source/FTPserver/macbinary.h new file mode 100755 index 0000000..256fe33 --- /dev/null +++ b/source/FTPserver/macbinary.h @@ -0,0 +1 @@ +#ifdef THINK_C #pragma options(!align_arrays) /* BYU 2.4.17 - required for MBHead struct */ #endif #define MB_READ 0 #define MB_WRITE 1 #define MB_DISABLE 0x80 #define MB_ISASCII 0x40 #define MB_APPEND 0x20 typedef struct MBHead { /* MacBinary Header */ char zero1; // 000 Old Version Number - Must be zero char nlen; // 001 Filename - Str63 char name[63]; // 002 char type[4]; // 065 Filetype char creator[4]; // 069 File Creator Type char flags; // 073 Old Finder Flags char zero2; // 074 Must be zero char location[6]; // 075 Location information from Finder info char protected; // 081 Low order bit is "protected" bit char zero3; // 082 Must be zero char dflen[4]; // 083 Data Fork Length (bytes) char rflen[4]; // 087 Resource Fork Length (bytes) char cdate[4]; // 091 Creation Date char mdate[4]; // 095 Modification Date char ginfolen[2]; // 099 MB 1, but unused by Telnet JMB 2.6 char flags2; // 101 Finder Flags, Low Byte JMB 2.6 char undefined[14]; // 102 Currently Undefined (9/93) JMB 2.6 char unpckdlen[4]; // 116 Unused by Telnet JMB 2.6 char sechdlen[2]; // 120 Unused by Telnet JMB 2.6 char mb2versnum; // 122 Uploading Program's version (=129) JMB 2.6 char mb2minvers; // 123 Min version needed (=129) JMB 2.6 char crc[2]; // 124 CRC of first 124 bytes JMB 2.6 char undefined2[2]; // 126 Currently Undefined (9/93) JMB 2.6 } MBHead; typedef struct MBFile { Str255 name; /* The filename */ short fd, /* Current File Descriptor */ mode, /* Are we reading or writing */ vrefnum, /* The volume reference number */ binary, /* MacBinary active ? */ sector1, /* Are we at the first sector of the file */ fork; /* 0 if we're writing the DF, 1 if were writing the RF */ long bytes, /* Length of the current fork */ rlen, /* Length of Resource Fork (bytes) */ dlen, /* Length of Data Fork (bytes) */ dirID; /* The file's dirID */ MBHead header; /* the first sector... */ } MBFile; \ No newline at end of file diff --git a/source/FTPserver/macutil.c b/source/FTPserver/macutil.c new file mode 100755 index 0000000..07da18c --- /dev/null +++ b/source/FTPserver/macutil.c @@ -0,0 +1 @@ +// macutil.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 // April, 1993 Entirely rewritten by Jim Browne to use HFS. #ifdef MPW #pragma segment FTPServer #endif #include "maclook.proto.h" #include "telneterrors.h" #include "DlogUtils.proto.h" #include "macutil.proto.h" /* Some globals for file lookup */ char FileName[256]; // Get the name of the directory identified by vRefNum & dirID // (works for volumes too... [dirID = 2]) void GetDirectoryName(short vRefNum, long dirID, Str32 name) { CInfoPBRec theInfo; WriteZero((Ptr)&theInfo, sizeof(CInfoPBRec)); theInfo.dirInfo.ioVRefNum = vRefNum; theInfo.dirInfo.ioDrDirID = dirID; theInfo.dirInfo.ioNamePtr = name; theInfo.dirInfo.ioFDirIndex = -1; // Only give me the Directory Info PBGetCatInfoSync(&theInfo); } // Convert the given volume name to a reference number. Returns the default vRefNum // if the volume specified is not found. short VolumeNameToRefNum(Str32 volumeName) { short retval; if (SetVol(volumeName, 0) != noErr) return(-1); GetVol(NULL, &retval); return(retval); } void PathNameFromDirID(long dirID, short vRefNum, StringPtr fullPathName) { CInfoPBRec block; Str255 directoryName; OSErr err; fullPathName[0] = '\0'; block.dirInfo.ioDrParID = dirID; block.dirInfo.ioNamePtr = directoryName; do { block.dirInfo.ioVRefNum = vRefNum; block.dirInfo.ioFDirIndex = -1; block.dirInfo.ioDrDirID = block.dirInfo.ioDrParID; if ((err = PBGetCatInfoSync(&block)) != noErr) return; pstrcat(directoryName, (StringPtr)"\p/"); pstrinsert(fullPathName, directoryName); } while (block.dirInfo.ioDrDirID != 2); pstrinsert(fullPathName, "\p/"); } // ChangeDirectory will change the directory relative from the provided dirID and // vRefNum. It handles preceding ".." modifiers as well as absolute pathnames. short ChangeDirectory(long *dirID, short *vRefNum,char *pathname) { CInfoPBRec theDirInfo; char tempst[256], *nSlash, *start; short NumberOfLevelsToGoUp = 0, temp, localvRefNum; long junk1, junk2, localdirID; OSErr err; start = pathname; localvRefNum = *vRefNum; localdirID = *dirID; while ( (nSlash = strchr(pathname,'/') ) !=0L) { if (( (nSlash - pathname) == 2) && (*pathname=='.') && (*(pathname+1) =='.') ) { pathname += 3L; start = pathname; NumberOfLevelsToGoUp++; } else { *nSlash=':'; pathname=nSlash + 1L; } } if ( strcmp("..",pathname)==0) { start[0]=0; NumberOfLevelsToGoUp++; } // Now start points to the beginning of a relative pathname devoid of ".."'s, and colons // for seperators rather than slashes. if ( *start==':') { // This is a fully qualified pathname if (NumberOfLevelsToGoUp) return(1); // Someone did a "../..//blah"... nSlash = strchr(start+1L, ':'); // Seperate out volume name if (strlen(start) == 1) // Someone did a "cd /" localdirID = 2; // Use top level directory else { if (nSlash != NULL) *nSlash = 0; strcpy(tempst, start+1); // Remove leading colon strcat(tempst, ":"); // Add trailing colon CtoPstr(tempst); SetVol((StringPtr)tempst, 0); GetVol(NULL, &temp); GetWDInfo(temp, &localvRefNum, &junk1, &junk2); localdirID = 2; if (nSlash != NULL) { // There's more than a volume name *nSlash = ':'; // Restore the leading slash strcpy( tempst, nSlash); CtoPstr(tempst); // tempst now contains relative pathname WriteZero((Ptr)&theDirInfo, (long)sizeof(CInfoPBRec)); theDirInfo.dirInfo.ioVRefNum = localvRefNum; // Now find the directory on the volume theDirInfo.dirInfo.ioDrDirID = localdirID; theDirInfo.dirInfo.ioNamePtr = (StringPtr)tempst; theDirInfo.dirInfo.ioFDirIndex = 0; if ((err = PBGetCatInfo(&theDirInfo, FALSE)) != noErr) return(1); localdirID = theDirInfo.dirInfo.ioDrDirID; } } } else { // This is a relative pathname, start by taking care of any ".."s... WriteZero((Ptr)&theDirInfo, (long)sizeof(CInfoPBRec)); while (NumberOfLevelsToGoUp && (localdirID != 2)) { theDirInfo.dirInfo.ioVRefNum = localvRefNum; theDirInfo.dirInfo.ioDrDirID = localdirID; theDirInfo.dirInfo.ioNamePtr = 0; theDirInfo.dirInfo.ioFDirIndex = -1; if ((err = PBGetCatInfo(&theDirInfo, FALSE)) != noErr) return(1); localdirID = theDirInfo.dirInfo.ioDrParID; NumberOfLevelsToGoUp--; } // Now use the relative pathname to find out the actual directory ID // Relative pathnames must begin with a colon, so put on on the beginning if(start[0]) { strcpy(tempst+1, start); tempst[0] = ':'; CtoPstr(tempst); WriteZero((Ptr)&theDirInfo, (long)sizeof(CInfoPBRec)); theDirInfo.dirInfo.ioVRefNum = localvRefNum; theDirInfo.dirInfo.ioDrDirID = localdirID; theDirInfo.dirInfo.ioNamePtr = (StringPtr)tempst; theDirInfo.dirInfo.ioFDirIndex = 0; if ((err = PBGetCatInfo(&theDirInfo, FALSE)) != noErr) return(1); localdirID = theDirInfo.dirInfo.ioDrDirID; } } *dirID = localdirID; // Everything went ok, change the dirID and vRefNum *vRefNum = localvRefNum; return(0); } short wccheck(char *file, char *template) /* BYU - routine now returns (short) for recursion. */ { while(*template) { if (*template=='*') { template++; if (*template) { while((*file) && !wccheck(file,template)) file++; /* BYU */ if ((*file)==0) return(0); } else return(1); continue; } else if ((*template!='?') && (*template!=*file)) return(0); template++;file++; } if (*file) /* BYU */ return(0); /* BYU */ else /* BYU */ return(1); /* BYU */ } /* getFileName * find the name in the given directory which matches the wildcard * specification */ char *getFileName(char *spec, CInfoPBRec *finfo) { CInfoPBRec *localfinfo; Boolean done = FALSE; localfinfo = (CInfoPBRec *) myNewPtr(sizeof(CInfoPBRec)); finfo->hFileInfo.ioNamePtr=(StringPtr) FileName; while (!done) { BlockMove(finfo, localfinfo, sizeof(CInfoPBRec)); if (PBGetCatInfo(localfinfo,FALSE)!=0) { DisposePtr((Ptr)localfinfo); return(0L); } FileName[FileName[0]+1]=0; if ((!wccheck(&FileName[1],spec))|| //it doesnt match (((localfinfo->hFileInfo.ioFlAttrib & 0x10)&& //its an invisible directory (localfinfo->dirInfo.ioDrUsrWds.frFlags & (fInvisible | 0x1000)))|| (!(localfinfo->hFileInfo.ioFlAttrib & 0x10)&&//its an invisible file (localfinfo->hFileInfo.ioFlFndrInfo.fdFlags)&(fInvisible | 0x1000)))) finfo->hFileInfo.ioFDirIndex++; //go to next one else done = TRUE; } if (localfinfo->hFileInfo.ioFlAttrib & 0x10) //its a directory { FileName[++FileName[0]]='/'; FileName[FileName[0]+1]=0; } DisposePtr((Ptr)localfinfo); return(&FileName[1]); } \ No newline at end of file diff --git a/source/FTPserver/macutil.proto.h b/source/FTPserver/macutil.proto.h new file mode 100755 index 0000000..183867a --- /dev/null +++ b/source/FTPserver/macutil.proto.h @@ -0,0 +1 @@ +void GetDirectoryName(short vRefNum, long dirID, Str32 name); short VolumeNameToRefNum(Str32 volumeName); void PathNameFromDirID(long dirID, short vRefNum, StringPtr fullPathName); short ChangeDirectory(long *dirID, short *vRefNum,char *pathname); short wccheck(char *file, char *template); char *getFileName(char *spec, CInfoPBRec *finfo); \ No newline at end of file diff --git a/source/Headers/Precompiled.h b/source/Headers/Precompiled.h new file mode 100755 index 0000000..3c0eb3b --- /dev/null +++ b/source/Headers/Precompiled.h @@ -0,0 +1 @@ +/* Precompiled.h */ /* This simply includes the proper pre-compiled header */ #ifdef __cplusplus #ifdef powerc #include "TelnetHeaderPPC++" #else #include "TelnetHeader68K++" #endif #else #ifdef powerc #include "TelnetHeaderPPC" #else #include "TelnetHeader68K" #endif #endif \ No newline at end of file diff --git a/source/Headers/Preferences.h b/source/Headers/Preferences.h new file mode 100755 index 0000000..2d757d3 --- /dev/null +++ b/source/Headers/Preferences.h @@ -0,0 +1 @@ +#define PREFERENCES_FILE_NAME_STR_ID 1991 // STR resource containing "BetterTelnet // Prefs2" or translated name #define OUR_PREFS_VERSION_NUMBER 2 #define NO_TIMEOUTS_VERSION 1 // Name of each instance is the resource name. Resource type TeR2 typedef struct { short version; // Version of this structure RGBColor nfcolor, // Normal foreground RGB nbcolor, // Normal background RGB bfcolor, // Blinking foreground RGB bbcolor, // Blinking background RGB reserved1, // Reserved by JMB - NCSA reserved2; // Reserved by JMB - NCSA short vtemulation, // 0 = VT100, 1 = VT220 (supposedly) vtwidth, // Width of the terminal screen in characters vtheight, // Height of the terminal screen in characters fontsize, // Size of DisplayFont to use to display text numbkscroll; // Number of lines to save in scroll buffer Boolean ANSIgraphics, // Recognize ANSI color sequences Xtermsequences, // Recognize Xterm sequences vtwrap, // Use VT wrap mode emacsmetakey, // 0 = off, 1 = cmd-control, 2 = option emacsarrows, // Arrow keys and mouse position are EMACS flavor MATmappings, // Map PageUp, PageDown, Home, End. (MAT == Mark Tamsky) eightbit, // Don't strip the high bit clearsave; // Save cleared lines Str63 DisplayFont; // Font to use to display text Str32 AnswerBackMessage; // Response to send when asked what terminal we are Boolean remapKeypad; //remap keypad (2.7 CCP) short remapCtrlD, // remap Del to ^D (RAB BetterTelnet 1.0fc4) allowBold, // allow boldface font (RAB BetterTelnet 1.0fc4) colorBold; // use color for boldface (RAB BetterTelnet 1.0fc4) Str63 BoldFont; short boldFontSize, boldFontStyle, realbold, oldScrollback; short padding[98]; // So I'm generous.... } TerminalPrefs; #define TERMINALPREFS_RESTYPE 'TeR2' #define TERMINALPREFS_APPID 1991 // The "" terminal seed copy // Name of each instance is the resource name. Resource type SeSn typedef struct { short version; // Version of this structure short port, // Port to connect to tektype, // -1 = inhibit, 0 = 4014, 1 = 4105 pastemethod, // 0 = quick, 1 = block pasteblocksize; // Size of blocks to paste if using block mode unsigned long ip_address; // IP address of the host Boolean forcesave, // crmap, // Strange Bezerkley 4.3 CR mode needed linemode, // Allow linemode to be used showlowlevelerrors, // Not Used anymore tekclear, // Clear TEK window vs. create new one halfdup; // Half duplex required char bksp, // 0 DELETE = BKSP, 1 DELETE = DELETE ckey, skey, qkey; Str32 TerminalEmulation, // Name of terminal emulator to use TranslationTable; // Name of translation table to use by default Str63 hostname; // The DNS name of the host Boolean authenticate, // Kerberos authentication encrypt, // Encrypted session localecho, // Force local echo on? reserved1; // Reserved by JMB - NCSA short NetBlockSize, // Size of read buffer (2.7 CCP) portNegative, // Port number is negative (force use of initial Telnet codes) // (RAB BetterTelnet 1.0fc4) alwaysBSD, // always use BSD 4.3 CR mode, even on non-port-23 // (RAB BetterTelnet 1.0fc4) ignoreBeeps, // Ignore Beeps (RAB BetterTelnet 1.0fc7) ignoreff, // Ignore Form Feeds (RAB BetterTelnet 1.0fc8) otpauto, // Automatic OTP - RAB BetterTelnet 1.2 otpmulti, // RAB BetterTelnet 1.2 otpnoprompt, // RAB BetterTelnet 1.2 otphex; // RAB BetterTelnet 1.2 char otppassword[64]; // RAB BetterTelnet 1.2 short otpsavepass; // RAB BetterTelnet 1.2.1 short padding[56]; // Disk space is cheap.... (used to be [98]) } SessionPrefs; #define SESSIONPREFS_RESTYPE 'SeSn' #define SESSIONPREFS_APPID 1991 // The "" session seed copy // Only one instance of this resource type. Resource type PrEf typedef struct { short version; // Version of this resource short CursorType, // 0 = block, 1 = underscore, 2 = vertical line CopyTableThresh; // Copy table threshold long TimeSlice; // Timeslice passed to WaitNextEvent ResType CaptureFileCreator; // Creator signature for session capture files Boolean WindowsDontGoAway, // Connection's windows remain open after connection close StaggerWindows, // Stagger connection windows CommandKeys, // Use command key shortcuts for menus RemapTilde, // Remap ~ to escape BlinkCursor, // Blink the cursor KeyPadAndFuncMenus; // Show Keypad and Function key menus short OpenTimeout, // Time to Open Connections in seconds (CCP 2.7) SendTimeout, // Time to Send Data (and receive ACK) (CCP 2.7) StaggerWindowsOffset, // Allow user to specify how much windows are staggered NotifyUser, destroyKTickets, //destroy kerberos tickets when window closes autoOpenDialog, dontWarnOnQuit, autoOpenDefault, parseAliases, monospacedOut, clipTrailingSpaces, defaultBoldColor, globalSavePass; short padding[88]; // Memory is getting cheap too.... (used to be [96]) } ApplicationPrefs; #define APPLICATIONPREFS_RESTYPE 'PrEf' #define APPLICATIONPREFS_ID 1991 #define APPLICATIONPREFS_APPID 1990 extern ApplicationPrefs *gApplicationPrefs; // Only one instance of this structure. Resource FTPs typedef struct { short version; // Version of this resource short ServerState; // 0 = off, 1 = no protection, 2 = password protection OSType BinaryCreator, // Default creator for files transferred in binary mode BinaryType, // Default type for files transferred in binary mode TextCreator; // Default creator for file transferred in ASCII mode Boolean ShowFTPlog, // FTP log defaults to visible DNSlookupconnections, // Translate IP of connecting hosts to DNS names for log UseMacBinaryII, // Allow MacBinary II unused1, // Unused unused2, // Unused ResetMacBinary, // Reset MacBinary after each transfer DoISOtranslation; // Use ISO translation short padding[100]; } FTPServerPrefs; #define FTPSERVERPREFS_RESTYPE 'FTPs' #define FTPSERVERPREFS_ID 1991 #define FTPSERVERPREFS_APPID 1990 extern FTPServerPrefs *gFTPServerPrefs; // Username is the resource name. Resource type FTPu typedef struct { short version; // Version of this resource Str32 EncryptedPassword, // Encrypted form of user's password DefaultDirVolName; // Name of the volume containing user's default directory long DefaultDirDirID; // DirID of the user's default directory Boolean UserCanCWD; // User is allowed to change directories short padding[20]; // Some padding for the future } FTPUser; #define FTPUSER 'FTPu' // >>>> FTP Client Prefs? <<< typedef struct { TerminalPrefs **terminal; SessionPrefs **session; Str255 WindowName; short ftpstate; Rect WindowLocation; } ConnInitParams; \ No newline at end of file diff --git a/source/Headers/TelnetHeader.h b/source/Headers/TelnetHeader.h new file mode 100755 index 0000000..995ef05 --- /dev/null +++ b/source/Headers/TelnetHeader.h @@ -0,0 +1 @@ +/**************************************************************** * NCSA Telnet for the Macintosh * * * * National Center for Supercomputing Applications * * Software Development Group * * 152 Computing Applications Building * * 605 E. Springfield Ave. * * Champaign, IL 61820 * * * * Copyright (c) 1986-1994, * * Board of Trustees of the University of Illinois * ****************************************************************/ #define PATTERN(x) &x #if defined(powerc) || defined(__powerc) #define __powerpc__ #endif // Using settings of NO_UNIVERSAL and __powerpc__, set up our SIMPLE_UPP macro #define PROTO_UPP(routine, what) \ extern what##UPP routine##UPP // Have universal headers, compiling PPC #ifdef __powerpc__ #define SIMPLE_UPP(routine,what) \ RoutineDescriptor routine##RD = \ BUILD_ROUTINE_DESCRIPTOR(upp##what##ProcInfo,routine);\ what##UPP routine##UPP=(what##UPP)&routine##RD \ #else // ifdef __powerpc__ // Have universal headers, compiling 68K #define SIMPLE_UPP(routine,what) \ what##UPP routine##UPP=(what##UPP)&routine #endif // ifdef __powerpc__ // Some random things that used to be in typedefs.h typedef unsigned char * BytePtr; #define UNUSED_ARG(x) #include #include "globaldefs.h" #include "Preferences.h" \ No newline at end of file diff --git a/source/Headers/TelnetHeader.pch b/source/Headers/TelnetHeader.pch new file mode 100755 index 0000000..ee0da7f --- /dev/null +++ b/source/Headers/TelnetHeader.pch @@ -0,0 +1 @@ +/*TelnetHeader.pch*/ #ifdef __cplusplus #ifdef powerc #pragma precompile_target "TelnetHeaderPPC++" #else #pragma precompile_target "TelnetHeader68K++" #endif #else #ifdef powerc #pragma precompile_target "TelnetHeaderPPC" #else #pragma precompile_target "TelnetHeader68K" #endif #endif #include "MacHeaders.c" #include "Palettes.h" #include "TelnetHeader.h" #include "dialog_resrcdefs.h" #include "general_resrcdefs.h" #include "menu_resrcdefs.h" #include "string_resrcdefs.h" #include "debug.h" #include "memory.proto.h" #include #include #include #include \ No newline at end of file diff --git a/source/Headers/dialog_resrcdefs.h b/source/Headers/dialog_resrcdefs.h new file mode 100755 index 0000000..c4f81c9 --- /dev/null +++ b/source/Headers/dialog_resrcdefs.h @@ -0,0 +1 @@ +/*================================================================================*/ /*================================================================================*/ /* #defines for ALRT and DITL resources */ #define MemoryLowAlert 200 // Preloaded, unpurgable alert to tell the user memory is tight /* #defines for the DLOG and DITL resources */ #define DLOGOk 1 #define DLOGCancel 2 #define RESOLVERERROR 128 //list modal dialog #define kItemDLOG 150 #define kRemove 2 #define kChange 3 #define kNew 4 #define kItemList 5 #define kDuplicate 6 #define kBadPrefNameDLOG 151 //when a name for a session or terminal is a duplicate #define FATALCANCEL_ID 160 // Fatal Cancel Alert #define FATAL_ID 170 // Fatal Alert #define OPFAILED_ID 175 // Operation Failed Alert #define ASKUSER_ID 180 // Ask user an OK/CANCEL question ALERT #define WinTitlDLOG 190 // Change window title DLOG #define kWinNameTE 3 // Window Name TextEdit #define DNRErrorDLOG 195 // DNR error occurred. #define MyIPDLOG 259 #define StatusDLOG 270 // "Machine" is currently being "opened/looked up" #define SetupDLOG 273 /* Setup keys interface */ #define killbox 4 #define stopbox 5 #define startbox 6 #define NewCnxnDLOG 280 #define NCconnect 1 #define NCcancel 2 #define NChostname 4 #define NCwindowname 6 #define NCsesspopup 7 #define NCauthenticate 8 #define NCencrypt 9 #define NCtermpopup 11 #define TermPopupMenu 1004 #define SessPopupMenu 1005 #define ConnFalDLOG 303 #define MacroDLOG 500 /* The Macros dialog */ #define MacroImport 23 #define MacroExport 24 #define AboutDLOG 501 #define OopsDLOG 640 #define FirstDLOG 1023 #define ColorDLOG 1001 /* Connection color selection dialog */ #define ColorNF 3 #define ColorNB 4 #define ColorBF 5 #define ColorBB 6 #define ANSIColorDLOG 1002 #define ANSIBlack 3 #define ANSIBlackRadio 29 #define ANSIRed 4 #define ANSIRedRadio 30 #define ANSIGreen 5 #define ANSIGreenRadio 31 #define ANSIYellow 6 #define ANSIYellowRadio 32 #define ANSIBlue 7 #define ANSIBlueRadio 33 #define ANSIMagenta 8 #define ANSIMagentaRadio 34 #define ANSICyan 9 #define ANSICyanRadio 35 #define ANSIWhite 10 #define ANSIWhiteRadio 36 #define ANSIBoldBlack 11 #define ANSIBoldBlackRadio 37 #define ANSIBoldRed 12 #define ANSIBoldRedRadio 38 #define ANSIBoldGreen 13 #define ANSIBoldGreenRadio 39 #define ANSIBoldYellow 14 #define ANSIBoldYellowRadio 40 #define ANSIBoldBlue 15 #define ANSIBoldBlueRadio 41 #define ANSIBoldMagenta 16 #define ANSIBoldMagentaRadio 42 #define ANSIBoldCyan 17 #define ANSIBoldCyanRadio 43 #define ANSIBoldWhite 18 #define ANSIBoldWhiteRadio 44 #define CloseDLOG 2001 /* The Close Confirmation Dialog */ #define WDSET_DLOG 4001 #define SizeDLOG 5500 /* The number of lines config dialog ----------- */ #define ColumnsNumber 4 /* NCSA: SB - User given # of columns */ #define LinesNumber 6 /* User given # of lines */ #define OtherFontDLOG 290 #define FontSizeTE 4 #define PrefDLOG 7001 /* The Preferences Dialog ---------------- */ #define PrefDClose 3 /* Don't close the window on "Close" */ #define PrefStag 4 /* Staggered Windows? */ #define PrefCMDkey 5 /* Command keys */ #define PrefTMap 6 /* Shall we map the tilde? */ #define PrefKeyFuncMenus 7 /* Show Keypad and Function menus? */ #define PrefBlink 8 /* Blink the cursor? */ #define PrefBlockCursor 9 /* Display a block cursor? */ #define PrefUnderscoreCursor 10 /* Display an underscore cursor? */ #define PrefVerticalCursor 11 /* Display a vertical line cursor? */ #define PrefCTt 14 /* Copy table threshold */ #define PrefTimeSlice 20 /* Multifinder Time Slice TxtEdit */ #define PrefCaptCreat 16 /* Capture File Creator Button */ #define PrefCaptTE 24 /* Capture File Creator TE */ #define PrefAnsiColor 23 // Select ANSI Color Button #define PrefStaggerOffset 21 //TE box for amount to stagger #define PrefStaggerBY 25 //static text 'by' #define PrefNotifyUser 12 //Notify user CheckBox #define PrefOpenTime 18 /* Open Connection Timeout TE (in seconds) */ #define PrefSendTime 15 /* Send Connection Timeout TE (in seconds) */ #define PrefDestroyTickets 13 //destroy kerberos tickets checkbox #define FTPDLOG 7002 /* The FTP config Dialog ---------------- */ #define FTPServerOff 3 /* FTP server off button */ #define FTPServerUnsecure 4 /* FTP server ON Unsecure button */ #define FTPServerPswdPlease 5 /* FTP server Passwords Required */ #define FTPShowFTPlog 6 /* FTP show FTP log on startup */ #define FTPrevDNS 7 /* FTP reverse DNS IP of connection hosts */ #define FTPUseMacBinaryII 8 /* FTP Use Macbinary II */ #define FTPResetMacBinary 9 /* FTP Reset Macbinary after each ftp */ #define FTPISO 10 /* FTP ISO checkbox */ #define FTPbintypeTE 11 /* FTP binary filetype TextEdit */ #define FTPbincreatTE 12 /* FTP binary creator type TextEdit */ #define FTPbinexamplebutton 13 /* FTP binary example file selection button */ #define FTPtextcreatTE 14 /* FTP text creator type TextEdit */ #define FTPtextcreatorbutton 15 /* FTP TEXT file creator selection button */ #define TermDLOG 7003 /* The Terminal Config Dialog ---------------- */ #define TermANSI 24 /* ANSI escape sequences checkbox */ #define TermXterm 25 /* Xterm escape sequences checkbox */ #define Termvtwrap 26 /* Use vtwrap mode checkbox*/ #define TermMetaIsCmdCntrol 35 /* Use control-cmd as meta */ #define TermMetaIsOption 36 // use option as meta #define TermMetaIsOff 37 // no meta #define Termarrow 28 /* Use emacs arrow keys checkbox */ #define TermMAT 29 /* Map pgup, etc. checkbox */ #define Termeightbit 30 /* Eight bit connection */ #define Termclearsave 31 /* Clear screen saves lines */ #define TermRemapKeypad 32 #define TermVT100 33 /* VT-100 emulation radio button */ #define TermVT220 34 /* VT-220 emulation radio button */ #define TermName 18 /* Terminal configuration name TE */ #define TermWidth 14 /* Terminal width TE */ #define TermHeight 16 /* Terminal height TE */ #define TermFontSize 21 /* Font size TE */ #define TermScrollback 23 /* Scrollback TE */ #define TermAnswerback 12 /* Answerback TE */ #define TermNFcolor 3 /* NF color user item */ #define TermNBcolor 4 /* NB color user item */ #define TermBFcolor 5 /* BF color user item */ #define TermBBcolor 6 /* BB color user item */ //#define TermUFcolor 23 /* UF color user item */ //#define TermUBcolor 24 /* UB color user item */ #define TermFontPopup 20 /* Font menu popup item */ #define TermNameStatText 17 #define TermSafeItem 17 #define SessionConfigDLOG 7004 /* The Session Config Dialog ---------------- */ #define SessTEKinhib 3 /* Inhibit TEK radio button */ #define SessTEK4014 4 /* TEK 4014 radio button */ #define SessTEK4105 5 /* TEK 4105 radio button */ #define SessPasteQuick 6 #define SessPasteBlock 7 #define SessDeleteDel 8 #define SessDeleteBS 9 #define SessForceSave 10 #define SessBezerkeley 11 #define SessLinemode 12 #define SessTEKclear 13 #define SessHalfDuplex 14 #define SessAuthenticate 15 #define SessEncrypt 16 #define SessLocalEcho 17 #define SessAlias 18 #define SessHostName 19 #define SessPort 20 #define SessBlockSize 21 #define SessInterrupt 22 #define SessSuspend 23 #define SessResume 24 #define SessTermPopup 25 #define SessTransTablePopup 26 #define SessSafeItem 27 #define SessAliasStatText 28 #define SessBlockSizeTE 39 #define FTPUserDLOG 7005 /* The FTP User Config Dialog ---------------- */ #define FTPUcanchangeCWD 3 /* User can change WD checkbox */ #define FTPUusername 4 /* Username TE */ #define FTPUpassword 5 /* User's password */ #define FTPUDfltDirDsply 6 /* User's default dir path display */ #define FTPUDfltDirButton 7 /* Button to change user's default dir */ \ No newline at end of file diff --git a/source/Headers/general_resrcdefs.h b/source/Headers/general_resrcdefs.h new file mode 100755 index 0000000..d842520 --- /dev/null +++ b/source/Headers/general_resrcdefs.h @@ -0,0 +1 @@ +/* Resource Defines */ #define kNCSACreatorSignature 'rlfT' /* Creator signature for "saved set" files */ #define kNCSASetFileType 'CONF' /* Filetype for "saved set" files */ #define kNCSAIconFamilyId 128 /* ----------------- Defines for translation routines -------------------------------*/ #define MY_TRSL 'TRSL' /* resource type for translation */ #define TRSL_DEFAULT_TABLE 256 /* The default table */ #define TRSL_FTP_TABLE 257 /* The MAC->ISO, ISO->MAC table for FTP */ #define USER_TRSL 'taBL' /* User translation tables resource type */ /* 256 bytes of in table followed by 256 bytes of out table */ #define GetStrRes(x) (Str255 **)GetResource('STR ',(x)); /* Get string resource */ /*================================================================================*/ /* Cursor resource related defines */ #define rPOSCURS 256 #define rBeamCursor 1 #define rCrossCursor 2 #define rPlusCursor 3 #define rWatchCursor 4 #define rGINCURS 257 #define rDbugCURS 268 #define rXferCURS 290 #define leftcrsr 130 /* cursors to display encryption state */ #define rightcrsr 129 /* cursors to display encryption state */ #define lockcrsr 131 /* cursors to display encryption state */ /*================================================================================*/ /* WIND resources for remembering the position of our windows */ #define FTPlogWIND 257 \ No newline at end of file diff --git a/source/Headers/globaldefs.h b/source/Headers/globaldefs.h new file mode 100755 index 0000000..2e1a6ad --- /dev/null +++ b/source/Headers/globaldefs.h @@ -0,0 +1 @@ +/* * globaldefs.h * Defines we only want to define once... * ***************************************************************************** * NCSA Telnet for the Macintosh * * * * National Center for Supercomputing Applications * * 152 Computing Applications Building * * 605 E. Springfield Ave. * * Champaign, IL 61820 * * * * Copyright (c) 1992, Board of Trustees of the University of Illinois * * * ***************************************************************************** * Revisions: * 7/92 Telnet 2.6: Initial version. Jim Browne */ /* Operation Governing Defines: */ #define MaxSess 20 /* The maximum number of sessions */ #define MaxGraph 30 /* Maximum number of graphics */ #define NPORTS 30 #define MAXVG 20 /* maximum number of VG windows */ #define NEVENTS 50 /* The two TEK devices (window and picture) */ #define TEK_DEVICE_WINDOW 0 #define TEK_DEVICE_PICTURE 1 /* Possible values for windowKind */ #define WIN_MODELESS userKind+1 // Modeless windows #define WIN_CONSOLE userKind+2 // Console window #define WIN_LOG userKind+3 // FTP log window #define WIN_CNXN userKind+4 // Connections #define WIN_TEK userKind+5 // TEK windows #define WIN_ICRG userKind+6 // Interactive Color Raster Graphics windows /* Emulation type defines */ #define VTEKTYPE 1 #define TEKTYPE 2 #define DUMBTYPE 3 #define RASTYPE 4 /* Font Height and width constants */ #define DefFONT 4 #define DefSIZE 9 /* ASCII character set defines */ #define ESC 0x1b /* the escape character */ #define BS 0x08 /* the backspace character */ #define DEL 0x7f /* the delete character */ #define CR 0x0d /* the carriage return character */ #define LF 0x0a /* the line feed character */ /* Now for some event stuff */ #define BScode 51 /* This is the Keycode for Backspace */ #define KPlowest 65 /* This is the last code before the KP */ #define switchEvt 1 /* Switching event (suspend/resume ) for app4evt */ /* These next three keep track of the screen windows */ #define NO_WINDOW 0 #define DEC_WINDOW 1 #define TEK_WINDOW 2 #define NUMCURS 7 #define gincurs 0 #define xfercurs 1 #define normcurs 2 #define textcurs 3 #define poscurs 4 #define watchcurs 5 #define graphcurs 6 #define kInFront (WindowPtr) -1 /* ===================================================================================*/ struct TelInfoRec { short setdir, SettingsFile, /* The Resource Reference Number of the Settings file */ ApplicationFile, // The Resource Reference Number of the Application file MacBinary, // Alternate instance that can allow us to change MB state w/o // changing the actual preference value ScrlLock, /* Are we in network suspend mode */ ftplogon, /* Is ftp log visible (default no) */ done, /* Are we done yet 0=not */ numwindows, /* Number of active window structures (note: not windows ) */ ginon, /* True if we are in GIN mode */ xferon, /* Is a transfer in progress */ graphs, /* How many detached graphs do we have */ debug, /* Flag for debugging 1=active */ myfronttype, /* what kinda window is the front one */ suspended, //are we backgrounded isQuerty, //do we have a querty layout gotDocument, startedTCP, lastPanelSession, lastPanelTerminal; DialogPtr macrosModeless, // RAB BetterTelnet 1.2 - modeless Set Macros dialog ipModeless; // RAB BetterTelnet 1.2 - modeless Show IP Address box char otpword[64]; short CONFstate, /* ...for parsing config files */ CONFactive, position, /* the next three are state variables for config.tel parsing */ inquote, lineno; /* state vars */ long oldgraph[MaxGraph], /* Storage for old Graph numbers */ myfrontvs, /* what is the VS # of the window */ blinktime; Rect screenRect, /* The whole screen */ dragRect; /* Where it is legal to drag ourselves */ RgnHandle greyRegion; //all monitors together WindowPeek myfrontwindow; /* window pointer for changing the pointer */ RgnHandle myfrontRgn; /* Handle to the region of the window to scope for stuff */ Cursor *lastCursor; FSSpec ApFolder, SysFolder, PrefFolder; short DefaultDirVRefNum, FTPClientVRefNum; long DefaultDirDirID, FTPClientDirID; PaletteHandle AnsiColors; //The Global ANSI Color palette Boolean haveColorQuickDraw; }; typedef struct TelInfoRec TelInfoRec; #ifndef GLOBALMASTER extern TelInfoRec *TelInfo; /* all the globals related to Telnet internals */ #endif \ No newline at end of file diff --git a/source/Headers/menu_resrcdefs.h b/source/Headers/menu_resrcdefs.h new file mode 100755 index 0000000..1768665 --- /dev/null +++ b/source/Headers/menu_resrcdefs.h @@ -0,0 +1 @@ +/*================================================================================*/ /* Defines for the Menu related resources */ #define NMENUS 14 /* We have NMENUS menus right now */ #define appleMenu 1 /* Apple Menu ID */ #define NfileMenu 512 /* File Menu Resource ID */ #define NeditMenu 513 /* Edit Menu Resource ID */ #define NtermMenu 514 /* Emulation Menu Resource ID */ #define NconnMenu 515 /* Connection Menu Resource ID */ #define NnetMenu 516 /* Network Menu Resource ID */ #define fileMenu 256 /* File Menu ID */ #define editMenu 257 /* Edit Menu ID */ #define termMenu 258 /* Emulation Menu ID */ #define connMenu 259 /* Connection Menu ID */ #define netMenu 260 /* Network Menu Resource ID */ #define fontMenu 128 /* Font Menu Resource ID */ #define sizeMenu 129 /* Size Menu Resource ID */ #define opspecMenu 130 /* Open Special Sub-Menu Resource ID */ #define prefsMenu 131 /* Preferences Sub-Menu Resource ID */ #define transMenu 132 /* Translation Sub-Menu Resource ID */ #define fontMenu2 133 // Bold Font Sub-Menu: RAB BetterTelnet 1.0.1 #define keyMenu 1000 /* Baylor -- Keypad menu */ #define funcMenu 1002 /* Baylor -- Function key menu */ #define Fil 1 /* File Menu's Position */ #define Edit 2 /* Edit Menu's Position */ #define Emul 3 /* Emulation Menu's position */ #define Net 4 /* Network Menu's position */ #define Conn 5 /* Connection Menu's position */ #define Font 6 /* Font Menu's position */ #define Sizem 7 /* Size Menu's position */ #define OpSpec 8 /* Open Special Sub-Menu's position */ #define PrefsSub 9 /* Preferences Sub-Menu position */ #define National 10 /* Translation Sub-Menu's postition */ #define Keypad 11 /* Baylor -- Keypad menu's position */ #define Function 12 /* Baylor -- Function menu's position */ #define FontOther 13 // RAB BetterTelnet 1.0.1 - the bold font submenu /* ----------------- The File Menu ---------------------- */ #define FLopen 1 /* File Menu: Open Connection */ #define FLopenspec 2 /* File Menu: Open Special */ #define FLclose 3 /* File Menu: Close Connection */ #define FLload 5 /* File Menu: Load Set */ #define FLsave 6 /* File Menu: Save Set */ #define FLsavem 7 /* File Menu: Save Set with Macros */ #define FLbin 9 /* File Menu: MacBinary on */ #define FLlog 11 /* File Menu: ftp log on */ #define FLotp 12 // RAB BetterTelnet 1.2 - OTP #define FLprint 14 /* File Menu: Print Selection */ #define FLpset 15 /* File Menu: Page Setup */ #define FLselect 16 // RAB BetterTelnet 1.0fc9 - Save Selection to File #define FLupload 17 // RAB BetterTelnet 1.0fc9 - Upload File #define FLquit 19 /* File Menu: Quit */ /* ----------------- The Edit Menu ---------------------- */ #define EDundo 1 #define EDcut 3 #define EDcopy 4 /* Edit Menu: Copy */ #define EDpaste 5 /* Edit Menu: Paste */ #define EDclear 6 /* Edit Menu: Clear */ #define EDcopyt 7 /* Edit Menu: Copy Table */ #define EDretype 8 // RAB BetterTelnet 1.0fc6: retype selection #define EDmacros 10 /* Edit Menu: Macros */ #define EDprefs 11 /* Edit Menu: Preferences */ /* ----------------- The Session Menu ---------------------- */ #define EMbs 1 /* Emulation Menu: backspace */ #define EMdel 2 /* Emulation Menu: delete */ #define EMscreensize 4 /* NCSA: SB - new screen dimensions dialog */ #define EMsetup 6 /* BYU 2.4.8 - Emulation Menu: Setup keys */ #define EMfont 7 /* BYU 2.4.8 - Emulation Menu: Font */ #define EMfont2 8 // RAB BetterTelnet 1.0.1 - Bold Font submenu #define EMsize 9 /* BYU 2.4.8 - Emulation Menu: Size */ #define EMcolor 10 /* BYU 2.4.8 - Emulation Menu: Color */ #define EMAnsiColor 11 #define EMcapture 13 /* BYU 2.4.18 - Emulation Menu: Capture to file */ #define EMqprint 14 // RAB BetterTelnet 1.0fc3 - Emulation Menu: Queue Print Jobs #define EMff 15 // RAB BetterTelnet 1.0fc8 - Emulation Menu: Ignore FF #define EMecho 17 /* Emulation Menu: echo */ #define EMwrap 18 /* Emulation Menu: Wrap mode on/off */ #define EMcrmap 19 /* RAB BetterTelnet 1.0b2c2 - Emulation Menu: BSD 4.3 CR Mode */ #define EMansi 20 /* RAB BetterTelnet - Emulation Menu: ANSI color */ #define EMxterm 21 /* RAB BetterTelnet - Emulation Menu: Xterm */ #define EMeightbit 22 /* RAB BetterTelnet - Emulation Menu: 8-bit */ #define EMmapkeypad 23 /* RAB BetterTelnet - Emulation Menu: remap keypad */ #define EMarrowmap 24 /* JMB - Emulation Menu: Turn EMACS mapping off/on */ #define EMpgupdwn 25 /* JMB - Emulation Menu: Turn local PgUp/PgDwn/etc. on/off */ #define EMnational 26 /* LU */ #define EMscroll 27 /* Emulation Menu: Clear Screen Saves Lines */ #define EMreset 28 /* Emulation Menu: Reset Terminal */ #define EMjump 29 /* Emulation Menu: Jump Scroll */ #define EMpage 30 /* Emulation Menu: TEK Page command */ #define EMclear 31 /* BYU 2.4.8 - Emulation Menu: TEK Page clears screen */ #define EMmapd 32 // RAB BetterTelnet 1.0fc4: map Del to ^D #define EMbold 33 // RAB BetterTelnet 1.0fc6: allow boldfacing #define EMboldcolor 34 // RAB BetterTelnet 1.0fc6: allow color for boldfacing #define EMinverse 35 // RAB BetterTelnet 1.0fc9: use inverse for bold #define EMbeep 36 // RAB BetterTelnet 1.0fc8: ignore beeps /* ----------------- The Network Menu ---------------------- */ /* #define NEcommand 19 Emulation Menu: Command Keys */ #define NEftp 1 /* Emulation Menu: Send ftp command */ #define NEip 2 /* Emulation Menu: Send IP # */ #define NEayt 4 /* Emulation Menu: Send "Are You There" */ #define NEao 5 /* Emulation Menu: Send "Abort Output" */ #define NEinter 6 /* Emulation Menu: Send "Interrupt Process" */ #define NEec 7 /* Emulation Menu: Send "Erase Character" */ #define NEel 8 /* Emulation Menu: Send "Erase Line" */ #define NEsync 9 /* Network Menu: Send SYNC (Urgent) */ #define NEbrk 10 /* Network Menu: Send BRK (Break) */ #define NEipsync 11 // RAB BetterTelnet 1.0fc9 - IP + SYNC (RFC compliant) #define NEscroll 13 /* Network Menu: Scroll Lock */ #define NEnet 15 /* Network Menu: Show Net #'s */ /* ----------------- The Connection Menu ---------------------- */ #define COnext 1 /* Connection Menu: Next Session... */ #define COtitle 2 /* Change window title */ #define FIRST_CNXN_ITEM 4 /* The first slot for connections in the menu */ /* ----------------- The Preferences Menu --------------------- */ #define prfGlobal 1 #define prfTerm 2 #define prfSess 3 #define prfFTP 4 #define prfFTPUser 5 /* Baylor ----------------- The Keypad Menu --------------------- */ #define KPFind 1 /* Baylor -- Edit Key "Find" */ #define KPInsertHere 2 /* Baylor -- Edit Key "Insert here" */ #define KPRemove 3 /* Baylor -- Edit Key "Remove" */ #define KPSelect 4 /* Baylor -- Edit Key "Select" */ #define KPPrevScreen 5 /* Baylor -- Edit Key "Prev Screen" */ #define KPNextScreen 6 /* Baylor -- Edit Key "Next Screen" */ #define KPUp 7 /* Baylor -- Edit Key "Up arrow" */ #define KPLeft 8 /* Baylor -- Edit Key "Left arrow" */ #define KPDown 9 /* Baylor -- Edit Key "Down arrow" */ #define KPRight 10 /* Baylor -- Edit Key "Right arrow" */ #define KPPF1 11 /* Baylor -- Keypad "PF1" */ #define KPPF2 12 /* Baylor -- Keypad "PF2" */ #define KPPF3 13 /* Baylor -- Keypad "PF3" */ #define KPPF4 14 /* Baylor -- Keypad "PF4" */ #define KPKP7 15 /* Baylor -- Keypad "7" */ #define KPKP8 16 /* Baylor -- Keypad "8" */ #define KPKP9 17 /* Baylor -- Keypad "9" */ #define KPKPMinus 18 /* Baylor -- Keypad "Minus" */ #define KPKP4 19 /* Baylor -- Keypad "4" */ #define KPKP5 20 /* Baylor -- Keypad "5" */ #define KPKP6 21 /* Baylor -- Keypad "6" */ #define KPKPComma 22 /* Baylor -- Keypad "Comma" */ #define KPKP1 23 /* Baylor -- Keypad "1" */ #define KPKP2 24 /* Baylor -- Keypad "2" */ #define KPKP3 25 /* Baylor -- Keypad "3" */ #define KPKEnter 26 /* Baylor -- Keypad "Enter" */ #define KPKP0 27 /* Baylor -- Keypad "0" */ #define KPKPPeriod 28 /* Baylor -- Keypad "Period" */ /* Baylor ----------------- The Keypad Menu --------------------- */ #define FKF6 1 /* Baylor -- Function Key "F6" */ #define FKF7 2 /* Baylor -- Function Key "F7" */ #define FKF8 3 /* Baylor -- Function Key "F8" */ #define FKF9 4 /* Baylor -- Function Key "F9" */ #define FKF10 5 /* Baylor -- Function Key "F10" */ #define FKF11 6 /* Baylor -- Function Key "F11" */ #define FKF12 7 /* Baylor -- Function Key "F12" */ #define FKF13 8 /* Baylor -- Function Key "F13" */ #define FKF14 9 /* Baylor -- Function Key "F14" */ #define FKHelp 10 /* Baylor -- Function Key "Help" */ #define FKDo 11 /* Baylor -- Function Key "Do" */ #define FKF17 12 /* Baylor -- Function Key "F17" */ #define FKF18 13 /* Baylor -- Function Key "F18" */ #define FKF19 14 /* Baylor -- Function Key "F19" */ #define FKF20 15 /* Baylor -- Function Key "F20" */ \ No newline at end of file diff --git a/source/Headers/string_resrcdefs.h b/source/Headers/string_resrcdefs.h new file mode 100755 index 0000000..969e2ac --- /dev/null +++ b/source/Headers/string_resrcdefs.h @@ -0,0 +1 @@ +/*================================================================================*/ /* String resource related #defines */ #define SAVE_SET_STRINGS_ID 23239 /* NCSA Telnet-save-set keywords */ // #define SAVE_SET_STRINGS_COUNT 45 #define AFF_WORDS_ID 23240 /* NCSA save-set file, affirmatives */ #define AFF_WORDS_COUNT 13 #define MSG_RESOURCE_ID 23227 /* ftp strings of interest */ #define NETERROR_RESOURCE_ID 23250 /* network errors */ #define NETERROR_RESOURCE_COUNT 17 /* number of network errors */ #define MEMERROR_RESOURCE_ID 23251 /* memory errors */ #define MEMERROR_RESOURCE_COUNT 7 #define RESERROR_RESOURCE_ID 23253 /* resource errors */ #define RESERROR_RESOURCE_COUNT 7 #define GENERAL_MESSAGES_ID 2000 // Misc. messages #define PREFERENCES_PROBLEM 1 // Problem w/Prefs, should I attempt fix? #define RESOURCE_PROBLEM 2 // Vital resource missing from Telnet #define NUKED_PREFS 3 // Unable to repair the prefs file #define PREFS_ARE_NEWER_ID 4 // Prefs on disk are newer than those in memory #define CANT_OPEN_MACTCP 5 // Error occured after OpenDriver("\p.IPP"); #define REALLY_QUIT_QUESTION 6 // Really quit w/open connections? #define CANT_CREATE_PREFS 7 // Error creating prefs file #define NEED_HFS_ERR 8 // Telnet requires HFS #define SYS_ENVIRON_ERR 9 // Wrong SysEnvirons version #define SYSTEM_VERS_ERR 10 // Telnet requires at least System 6.0 #define ROM_VERS_ERR 11 // Telnet requires at least 128k ROMS #define AE_PROBLEM_ERR 12 // Problem installing AppleEvent handlers #define CLOSE_ALL_WINDOWS_Q 13 // For Option-Command-W #define OPFAILED_MESSAGES_ID 2001 // General messages when an operation fails #define CANT_CREATE_FILE 1 // Can't create a file for some reason #define CANT_OPEN_FILE 2 // Can't open a file #define OUT_OF_MEMORY 3 // Not enough memory #define BAD_SET_ERR 4 // Invalid keyword in set file #define MISC_STRINGS 2002 // Misc. internal strings #define CAPTFILENAME 1 // Name of default capture file #define MISC_NEWSESSION 2 // Default name for new session #define MISC_NEWTERM 3 // Default name for new terminal #define MISC_USERPRMPT 4 // For URL generated connections #define MISC_PSWDPRMPT 5 // For URL generated connections #define CLOSE_ALL_MENU_ITEM 6 // For Option-Command-W menu item #define CLOSE_MENU_ITEM 7 #define PICK_NEW_COLOR_STRING 8 #define NONE_STRING 9 #define SESSION_STRING 10 #define OK_STRING 11 #define CANCEL_STRING 12 #define FTP_LOG_STRING 13 #define SAVE_MACROS_STRING 14 #define DEFAULT_MACRO_SET_NAME 15 #define AWAITING_DISMISSAL_STRING 16 #define BEING_OPENED_STRING 17 #define BEING_LOOKED_UP 18 #define SESSION_NAME_STRING 19 #define SET_TO_LOAD_STRING 20 #define SAVE_SET_STRING 21 #define DEFAULT_SAVE_SET_NAME 22 #define SAVE_CAPTURED_TEXT_STRING 23 #define PREVIOUS_SESSION_STRING 24 #define NEXT_SESSION_STRING 25 #define REBUILDING_FONT_MENU 26 #define DNR_MESSAGES_ID 2004 // DNR error messages \ No newline at end of file diff --git a/source/Headers/telneterrors.h b/source/Headers/telneterrors.h new file mode 100755 index 0000000..d97bb55 --- /dev/null +++ b/source/Headers/telneterrors.h @@ -0,0 +1 @@ +/*--------------------------------- Error Classes ------------------------------------*/ #define NOCODE 0 /* no code given, just error strings */ #define FLAGMASK 1023 /* mask all of my flag crap */ #define ERRORMASK 64512 /* mask off all the error crap */ #define NET_ERRORCLASS 2048 /* this bit used for network errors */ #define MEMORY_ERRORCLASS 4096 /* memory allocation errors */ #define RESOURCE_ERRORCLASS 8192 /* problem getting resources */ /*--------------------------------- Error Levels -------------------------------------*/ #define LEVEL1 1 /* informative error */ #define LEVEL2 2 /* tell us about it */ #define LEVEL3 3 /* tell us about it, and hammer Telnet */ #include "errors.proto.h" \ No newline at end of file diff --git a/source/ICR/vdevice.c b/source/ICR/vdevice.c new file mode 100755 index 0000000..adc926a --- /dev/null +++ b/source/ICR/vdevice.c @@ -0,0 +1 @@ +// vdevice.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "vdevice.h" #include "vdevice.proto.h" #define PIXEL_DEPTH 8 CGrafPtr origPort; GDHandle origDev; int InitVDevice (VDevicePtr whichDevice, PaletteHandle initalPalette) { PixMapHandle thePixMap; OSErr err; CTabHandle theNewColorTable; GetGWorld(&origPort,&origDev); //save old settings //first, copy the initalPalette into a color table handle theNewColorTable = (CTabHandle) myNewHandle(sizeof(ColorTable)); if (!theNewColorTable) return -1; Palette2CTab(initalPalette,theNewColorTable); //init the GWorld err = NewGWorld(&whichDevice->whichWorld,PIXEL_DEPTH,whichDevice->bounds, theNewColorTable,NULL,0); if ((!whichDevice->whichWorld)||(err != noErr)) { if (whichDevice->whichWorld) DisposeGWorld(whichDevice->whichWorld); DisposeHandle((Handle)theNewColorTable); return -1; } SetGWorld(whichDevice->whichWorld,NULL); thePixMap = GetGWorldPixMap(whichDevice->whichWorld); EraseRect(&(whichDevice->whichWorld->portRect)); SetGWorld(origPort,origDev); return (0); } void ColorVDevice ( VDevicePtr vdev, PaletteHandle pal ) { CTabHandle ct; ct = (*vdev->whichWorld->portPixMap)->pmTable; /* handle from vdevice */ if (!ct) return; Palette2CTab( pal, ct ); (*ct)->ctSeed = GetCTSeed(); /* give it a unique seed */ (*ct)->ctFlags = 0x8000; //MakeITable( ct, (vdev->whichWorld->gdITable, 3 ); /* 3-bit inverse table */ } /*******************************************************************************/ /* SetVDevice * Set the gdevice and port to our off-screen space. * Save the old values for unset. */ SetVDevice(VDevicePtr vdev) { GetGWorld(&origPort,&origDev); //save old settings if (!vdev->whichWorld) return(-1); SetGWorld(vdev->whichWorld,NULL); return(0); } /*******************************************************************************/ /* UnsetVDevice * Set the vdevice back to the saved values. */ void UnsetVDevice(void) { SetGWorld(origPort,origDev); } /*******************************************************************************/ /* TrashVDevice * Get rid of the devices that we created with InitVDevice. */ void TrashVDevice(VDevicePtr vdev) { if (vdev->whichWorld) DisposeGWorld(vdev->whichWorld); return; } \ No newline at end of file diff --git a/source/ICR/vdevice.h b/source/ICR/vdevice.h new file mode 100755 index 0000000..ea90e60 --- /dev/null +++ b/source/ICR/vdevice.h @@ -0,0 +1 @@ +//vdevice.h #include "QDOffscreen.h" #ifndef VDEVS #define VDEVS /* * Virtual device record. * Defines the handles and hooks required for the vdevice code. */ //Updated by CCP (2.7) to fix crashing bugs in existance since 2.5 typedef struct { GWorldPtr whichWorld; /* GDevice created off-screen */ //unsigned char *bp; /* base pointer of data in the virtual device */ Rect *bounds; /* boundary rectangle for vdevice */ } VDevice, *VDevicePtr; #endif //#include "vdevice.proto.h" \ No newline at end of file diff --git a/source/ICR/vdevice.proto.h b/source/ICR/vdevice.proto.h new file mode 100755 index 0000000..b614001 --- /dev/null +++ b/source/ICR/vdevice.proto.h @@ -0,0 +1 @@ +//vdevice.proto.h int InitVDevice(VDevicePtr vdev, PaletteHandle initalPalette); int SetVDevice(VDevicePtr vdev); void UnsetVDevice(void); void TrashVDevice(VDevicePtr vdev); void ColorVDevice(VDevicePtr vdev, PaletteHandle pal); \ No newline at end of file diff --git a/source/ICR/vr.c b/source/ICR/vr.c new file mode 100755 index 0000000..c864cfd --- /dev/null +++ b/source/ICR/vr.c @@ -0,0 +1 @@ +/* ** Raster Virtual Kernel (vr.c) */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment ICR #endif #define MASTERDEF #include "vr.h" #include "vr.proto.h" #include "vrrgmac.proto.h" /* defines for raster states and variables */ /* states */ #define DONE 0 /* we've been called */ #define ESCFOUND 1 /* found escape */ #define WANTCMD 2 /* want a command char */ #define WANTDEL 3 /* want that first delimiter */ #define IARG 4 /* looking for integer arg */ #define SARG 5 /* looking for string arg */ #define CARG 6 /* looking for count arg */ #define DATA 7 /* all args parsed, found ^ */ /* commands */ #define ESC 0x1b /* start of a sequence */ #define ESCCMD ' ' /* escape to next level of commands */ #define DELIM ';' /* argument delimiter */ #define CMDTRM '^' /* terminator, but also prefix w/ ESC */ #define WINCMD 'W' /* create a window */ #define DESCMD 'D' /* destroy a window */ #define MAPCMD 'M' /* change color map entries */ #define RLECMD 'R' /* run-length encoded data */ #define PIXCMD 'P' /* standard pixel data */ #define IMPCMD 'I' /* IMCOMP compressed data */ #define FILCMD 'F' /* save to file command */ #define CLKCMD 'C' /* click the slide camera */ #define SAVCMD 'S' /* save a color map to a file */ /* command parameter types*/ #define MAXARGS 7 /* maximum args to a command */ #define INT 1 /* integer argument */ #define STRING 2 /* string (character) argument */ #define COUNT 3 /* data count argument */ #define LINEMAX 1024 /* longest width for window */ /* ** flag values */ #define FL_NORMAL 1 /* command needs no data */ #define FL_DATA 2 /* command takes data */ /* ** structure of command table */ struct cmd { char c_name; short c_flags; short (*c_func)(union arg av[], char *); short c_args[MAXARGS]; }; static struct cmd cmdtab[] = { WINCMD, FL_NORMAL, VRwindow, {INT, INT, INT, INT, INT, STRING, 0}, DESCMD, FL_NORMAL, VRdestroy, {STRING, 0, 0, 0, 0, 0, 0}, MAPCMD, FL_DATA, VRmap, {INT, INT, COUNT, STRING, 0, 0, 0}, FILCMD, FL_NORMAL, VRfile, {INT, INT, INT, INT, INT, STRING, STRING}, PIXCMD, FL_DATA, VRpixel, {INT, INT, INT, COUNT, STRING, 0, 0}, RLECMD, FL_DATA, VRrle, {INT, INT, INT, COUNT, STRING, 0, 0}, IMPCMD, FL_DATA, VRimp, {INT, INT, INT, COUNT, STRING, 0, 0}, CLKCMD, FL_NORMAL, VRclick, {STRING, 0, 0, 0, 0, 0, 0}, SAVCMD, FL_NORMAL, VRmsave, {STRING, STRING, 0, 0, 0, 0, 0} }; #define NCMDS (sizeof(cmdtab) / sizeof(struct cmd)) /* ** global vars */ static short VRstate = DONE; /* current state */ static short VRcmdnum = -1; /* current command */ static short VRargcount = 0; /* number of args for command */ static short VRdatalen = 0; /* length of expected data */ static short VRbufpos = 0; /* current pointer in tempdata */ static union arg VRargs[MAXARGS]; /* argument vector */ static char VRtempdata[256]; /* temporary storage while parsing */ static char *VRspace; /* storage for incoming data */ static char *VRsp2; /* storage for pixel expansion */ static char *VRptr; /* pointer for data buffer */ static char *VRptr2; /* copy of above */ /***********************************************************************/ /* decode0 and decode1 * start and continue the decoding. * * Returns real characters, 0 if in the middle of an escape sequence. */ #define FRSKIP 0 #define FRIN 1 #define FRSPECIAL 2 #define FROVER 3 #define FRDONE 4 void ICRunload(void) {} static short VRnextargstate(short ac, short c); /* ** VRinit -- initialize the VR system ** ** Arguments: ** ** None. ** ** Returns: ** ** short -- status, 1 == succsessful, 0 == failed */ short VRinit( void) { VRhead.w_next = NULL; VRsp2 = (char *)myNewPtr(4*LINEMAX+10); VRspace = (char *)myNewPtr(LINEMAX+10); if (VRspace) return 1; else return 0; } /* ** VRwrite -- parse a string of VR commands ** ** Arguments: ** ** char *b; -- buffer pointer ** short len; -- buffer length ** ** Returns: ** ** short -- Number of characters processed. 0 tells ** -- the upper level to switch out of raster mode; ** -- usually on error, but also at completion of ** -- command processing. ** */ short VRwrite( char *b, short len) { short count = 0; char *p = b; char c; short i; /* loop 'til no more chars */ while (count < len) { c = *p; switch (VRstate) { case DONE: if (c == ESC) VRstate = ESCFOUND; else return count; break; case ESCFOUND: if (c == CMDTRM) VRstate = WANTCMD; else { VRstate = DONE; return count; } break; /* looking for a valid command char */ case WANTCMD: for (i = 0; i < NCMDS; i++) { if (cmdtab[i].c_name == c) break; } VRcmdnum = i; if (VRcmdnum == NCMDS) { VRstate = DONE; return 0; } /* set up for this command */ VRargcount = 0; VRbufpos = 0; VRstate = WANTDEL; break; /* look for that first ; */ case WANTDEL: if (c == DELIM) VRstate = VRnextargstate(VRargcount, VRcmdnum); else VRstate = DONE; break; /* looking for an integer arg */ case IARG: switch (c) { /* we've found the end of the argument, so try to put into the vector for later use */ case DELIM: case CMDTRM: VRtempdata[VRbufpos] = '\0'; /* copy into argument union */ (void)sscanf(VRtempdata,"%d",&VRargs[VRargcount].a_num); VRbufpos = 0; VRargcount++; if (c == DELIM) VRstate = VRnextargstate(VRargcount, VRcmdnum); else if (cmdtab[VRcmdnum].c_flags & FL_DATA) VRstate = DATA; else { /* run the command */ (*cmdtab[VRcmdnum].c_func)(VRargs, (char *)0L); VRstate = DONE; } break; /* copy over characters for later */ default: VRtempdata[VRbufpos++] = c; } break; /* looking for string arg */ case SARG: switch (c) { /* put string into argument vector */ case DELIM: case CMDTRM: VRtempdata[VRbufpos] = '\0'; /* VRargs[VRargcount].a_ptr = myNewPtr((unsigned)VRbufpos+1); if (VRargs[VRargcount].a_ptr == (char *)0L) { VRstate = DONE; break; } */ (void)strcpy(VRargs[VRargcount].a_ptr, VRtempdata); VRbufpos = 0; VRargcount++; if (c == DELIM) VRstate = VRnextargstate(VRargcount, VRcmdnum); else if (cmdtab[VRcmdnum].c_flags & FL_DATA) VRstate = DATA; else { /* run the command */ (*cmdtab[VRcmdnum].c_func)(VRargs, (char *)0L); VRstate = DONE; } break; /* save string for later */ default: VRtempdata[VRbufpos++] = c; } break; /* looking for a count argument */ case CARG: switch (c) { /* we've found the end of the argument, so try to put into the vector for later use */ case DELIM: case CMDTRM: VRtempdata[VRbufpos] = '\0'; /* copy into argument union */ (void)sscanf(VRtempdata,"%d",&VRdatalen); (void)sscanf(VRtempdata,"%d",&VRargs[VRargcount].a_num); if (VRdatalen > LINEMAX) VRdatalen = LINEMAX; VRargcount++; VRbufpos = 0; if (c == DELIM) VRstate = VRnextargstate(VRargcount, VRcmdnum); else if (cmdtab[VRcmdnum].c_flags & FL_DATA) VRstate = DATA; else { /* run the command */ (*cmdtab[VRcmdnum].c_func)(VRargs, (char *)0L); VRstate = DONE; } /* allocate storage for data */ VRptr = VRspace; if (VRptr == (char *)0L) { VRstate = DONE; return 0; } VRptr2 = VRptr; decode0(); /* reset decoder */ break; /* copy over characters for later */ default: VRtempdata[VRbufpos++] = c; } break; /* retrieve a line of data */ case DATA: /* store bytes until done */ if (0 <= (i = decode1(c))) { *VRptr2++ = i; --VRdatalen; } if (!VRdatalen) { /* we've got all of the data */ (*cmdtab[VRcmdnum].c_func)(VRargs, VRptr); VRstate = DONE; } break; } /* end switch(VRstate)*/ p++; count++; } /* end while loop */ return count; } /* ** VRnextargstate -- return the next state based on where we're ** -- at already. ** ** Arguments: ** ** short ac -- current argument count ** short state -- current state ** short c -- current command ** ** Returns: ** ** short -- next state to move to ** */ static short VRnextargstate(short ac, short c) { switch (cmdtab[c].c_args[ac]) { case INT: return IARG; case STRING: return SARG; case COUNT: return CARG; case 0: return DATA; /* in case of error*/ default: return DONE; } } /* ** VRwindow -- create a new raster window ** ** Arguments: ** ** union arg av[]; -- the argument vector ** ** short av[0, 1]; -- upper left; ** short av[2, 3]; -- width, height ** short av[4]; -- window hardware display number ** char *av[5]; -- title ** ** Returns: ** ** None. No provision has been made for error returns in any of ** these routines because I don't know what to do if an error ** occurs. Perhaps a better man than I can figure out how to ** deal with this. ** N.B -- these functions are declared as short, in the event ** that an error return is added. */ short VRwindow(union arg av[], char *unused) { UNUSED_ARG(unused) VRW *w = VRhead.w_next; short ret; /* search list, and if needed, myNewPtr some space for a new window thing */ while (w) { if (!strcmp(w->w_name,av[5].a_ptr) && w->w_width == av[2].a_num && w->w_height == av[3].a_num) /* don't re-allocate win */ return(1); if (!strcmp(w->w_name,av[5].a_ptr)) /* duplicate, different size */ w->w_used = 1; w = w->w_next; } w = (VRW *)myNewPtr(sizeof(VRW)); /* new element for list */ if (!w) return(-1); w->w_next = VRhead.w_next; /* set next equal to current head */ VRhead.w_next = w; /* set head of list equal to me */ /* ** fill in the new window area */ w->w_left = av[0].a_num; w->w_top = av[1].a_num; w->w_width = av[2].a_num; w->w_height = av[3].a_num; w->w_display = av[4].a_num; w->w_used = 0; strncpy(w->w_name,av[5].a_ptr,100); if (w->w_width > LINEMAX) /* have to be SOME limits */ w->w_width = LINEMAX; if (0 <= (ret = MacRGnewwindow( w->w_name, w->w_left, w->w_top, w->w_left+w->w_width, w->w_top+w->w_height ))) MacRGsetwindow( ret); w->w_rr.wn = ret; return(ret); } /* ** VRdestroy -- destroy a window by name ** ** Arguments: ** ** union arg av[]; -- the argument vector ** ** char *av[0] -- the name of the window ** ** Returns: ** ** None. ** */ short VRdestroy(union arg av[], char *unused) { UNUSED_ARG(unused) VRW *w,*ow; ow = &VRhead; w = ow->w_next; while (w) { if (!strcmp(w->w_name, av[0].a_ptr) ) { MacRGremove( w->w_rr.wn); ow->w_next = w->w_next; DisposPtr((char *)w); } else ow = ow->w_next; w = ow->w_next; } return 0; } void VRdestroybyName(char *name) { union arg blah; strncpy(blah.a_ptr, name, 100); VRdestroy(&blah, NULL); } /* ** VRmap -- take a color map command and set the palette ** ** Arguments: ** ** union arg av[]; -- the argument vector ** ** short av[0, 1]; -- start & length of map segment ** short av[2]; -- count of data needed (info only) ** char *av[3]; -- window name ** char *data; -- pointer to the data ** ** Returns: ** ** None. ** */ short VRmap(union arg av[], char *data) { VRW *w; w = VRlookup(av[3].a_ptr); if (!w) return 0; return MacRGmap(av[0].a_num, av[1].a_num, data); } /* ** VRpixel -- display a line of pixel data ** ** Arugments: ** ** union arg av[]; -- the argument vector ** ** short av[0]; -- x coordinate ** short av[1]; -- y coordinate ** short av[2]; -- pixel expansion factor ** short av[3]; -- length of data ** char *av[4]; -- window name ** char *data; -- pointer to data ** ** Returns: ** ** None. ** */ short VRpixel(union arg av[], char *data) { VRW *w; short i,lim; char *p,*q; /* find the right window */ w = VRlookup(av[4].a_ptr); if (w == (VRW *)0L) return 0; lim = av[3].a_num*av[2].a_num; /* total number of expanded pixels */ if (lim > w->w_width) lim = w->w_width; if (av[2].a_num > 1) { p = data; q = VRsp2; for (i=0; i < lim; i++) { *q++ = *p; if (!((i+1) % av[2].a_num)) p++; } for (i=0; iw_width); /* BYU LSC - decompress it */ /* gives four lines in the VRsp2 buffer, now pixel expand */ i = av[3].a_num; lim = i*av[2].a_num; /* total number of expanded pixels on a line*/ if (lim > w->w_width) lim = w->w_width; if (i > w->w_width) i = w->w_width; p = VRsp2; /* from this buffer */ for (j=0; j<4; j++) { if (av[2].a_num > 1) { q = VRspace; /* to here */ for (i=0; i < lim; i++) { *q++ = *p; if (!((i+1) % av[2].a_num)) p++; } p++; for (i=0; i> (3 - i)*4; for (j=x; j<(x+4); j++) { if ((temp & 8) == 8) out[i*xdim+j] = hi_color; else out[i*xdim+j] = lo_color; temp = temp << 1; } } } /* end of for x */ } /* end of unimcomp */ /* unrleit - Decompress run length encoding. */ short unrleit(unsigned char *buf, unsigned char *bufto, short inlen, short outlen) { register short cnt; register unsigned char *p,*q; unsigned char *endp,*endq; p = buf; endp = buf + inlen; q = bufto; endq = bufto + outlen; while (p < endp && q < endq) { /* go 'til p or q hits end */ cnt = *p++; /* count field */ if (!(cnt & 128)) { /* is set of uniques */ while (cnt-- && q < endq) *q++ = *p++; /* copy unmodified */ } else { cnt &= 127; /* strip high bit */ while (cnt-- && q < endq) *q++ = *p; /* copy same character */ p++; /* skip that character */ } } /* while */ return((short)(q-bufto)); } /***************************************************************************/ /* ** VRrle -- display a line of run-length encoded data ** ** Arugments: ** ** union arg av[]; -- the argument vector ** ** short av[0]; -- x coordinate ** short av[1]; -- y coordinate ** short av[2]; -- pixel expansion ** short av[3]; -- length of data ** char *av[4]; -- window name ** char *data; -- pointer to data ** ** Returns: ** ** None. ** */ short VRrle(union arg av[], char *data) { VRW *w; short i,lim; char *p,*q; /* find the right window */ w = VRlookup(av[4].a_ptr); if (w == (VRW *)0L) return 0; i = unrleit((unsigned char *) data,(unsigned char *) VRsp2,av[3].a_num,w->w_width); /* BYU LSC - decompress it */ lim = i*av[2].a_num; /* total number of expanded pixels */ if (lim > w->w_width) lim = w->w_width; if (av[2].a_num > 1) { p = VRsp2; /* from this buffer */ q = VRspace; /* to here */ for (i=0; i < lim; i++) { *q++ = *p; if (!((i+1) % av[2].a_num)) p++; } for (i=0; iw_name, name) && !w->w_used) { /* same name, not old dup */ if (w->w_rr.wn < 0) /* maybe window don't work */ return(NULL); MacRGsetwindow(w->w_rr.wn); return(w); } w = w->w_next; } return(NULL); } /* ** VRcleanup -- remove all windows from the screen ** ** Arguments: ** ** None. ** ** Returns: ** ** short; 1 -- always successful, or there's nothing you can do ** -- about it anyways... ** */ short VRcleanup(void) { VRW *w = VRhead.w_next; VRW *x; while (w != (VRW *)0L) { x = w->w_next; MacRGremove( w->w_rr.wn); w = x; } return 1; } /************************************************************************/ /* decoding * handle the special ASCII printable character encoding of data bytes. */ /***********************************************************************/ /* * 123 precedes #'s 0-63 * 124 precedes #'s 64-127 * 125 precedes #'s 128-191 * 126 precedes #'s 192-255 * overall: realchar = (specialchar - 123)*64 + (char-32) * specialchar = r div 64 + 123 * char = r mod 64 + 32 */ /***********************************************************************/ static short dstate=FRSKIP,dspec=0; /* set up receive */ void decode0(void) { dstate = FRIN; } short decode1(char c) { switch (dstate) { case FRSKIP: return(-1); case FRIN: /* decoding */ if (c > 31 && c < 123) return(c); else { dspec = c; /* save special character */ dstate = FRSPECIAL; /* doing special character */ } return(-1); case FRSPECIAL: switch (dspec) { case 123: case 124: case 125: case 126: /* encoded character */ dstate = FRIN; return(((dspec - 123)<< 6) - 32 + c); default: /* mistaken character in stream */ dstate = FRIN; /* assume not special */ return(decode1(c)); /* check for sure */ break; } break; } // switch (dstate) } \ No newline at end of file diff --git a/source/ICR/vr.h b/source/ICR/vr.h new file mode 100755 index 0000000..d6e650c --- /dev/null +++ b/source/ICR/vr.h @@ -0,0 +1 @@ +#ifndef __VRDEFS__ #define __VRDEFS__ /* saved arg values in parser */ union arg { short a_num; /* integer number */ char a_ptr[100]; /* string pointer */ }; typedef struct VRwin VRW; typedef struct RRwin RRW; struct RRwin { short device; /* Device Number */ short wn; /* Window Number */ }; /* format of a window entry */ struct VRwin { char w_name[100]; /* window's name, assigned on creation */ char w_used; /* flag - is this name an old duplicate? */ short w_left; /* left edge */ short w_top; /* top edge */ short w_width; /* width */ short w_height; /* height */ short w_display; /* hardware display number of window */ RRW w_rr; /* machine dep info for window */ VRW *w_next; /* next pointer */ }; /* variables for linked list management */ #ifdef MASTERDEF struct VRwin VRhead; #else extern struct VRwin VRhead; #endif #include "vr.proto.h" #endif // __VRDEFS__ \ No newline at end of file diff --git a/source/ICR/vr.proto.h b/source/ICR/vr.proto.h new file mode 100755 index 0000000..6b2c1d4 --- /dev/null +++ b/source/ICR/vr.proto.h @@ -0,0 +1 @@ + /* vr.c */ void ICRunload(void); void decode0(void); short decode1(char c); short VRinit(void); short VRwrite(char *b, short len); short VRwindow(union arg av[], char *unused); void VRdestroybyName(char *name); short VRdestroy(union arg av[], char *unused); short VRmap(union arg av[], char *data); short VRpixel(union arg av[], char *data); short VRimp(union arg av[], char *data); void unimcomp(unsigned char in[], unsigned char out[], short xdim, short xmax); short unrleit(unsigned char *buf, unsigned char *bufto, short inlen, short outlen); short VRrle(union arg av[], char *data); short VRfile(union arg av[], char *unused); short VRclick(union arg av[], char *unused); short VRmsave(union arg av[], char *unused); VRW *VRlookup(char *name); short VRcleanup(void); \ No newline at end of file diff --git a/source/ICR/vrrgmac.c b/source/ICR/vrrgmac.c new file mode 100755 index 0000000..94a75fb --- /dev/null +++ b/source/ICR/vrrgmac.c @@ -0,0 +1 @@ +// BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * * Virtual Graphics Kernel Macintosh Real Graphics Interface * (vrrgmac.c) * * National Center for Supercomputing Applications * by Gaige B. Paulsen * * This file contains the macintosh real screen calls for the NCSA * Virtual Graphics Kernel. * * Following are the Per Device calls: * * MacRGraster( p,x1,y1,x2,y2,wid)- Plot raster in rect @(x1,y1,x2,y2) with wid @ p * MacRGcopy( x1,y1,x2,y2,x3,y3,x4,y4)- * MacRGmap( offset,count,data) - * * * WARNING, WARNING! * Gaige has this cute idea about how to do "subwindows" of real windows by shifting * the window number by 4 bits (MAC_WINDOW_SHIFT). Then, the remainder is the * sub-window number. It will probably work, but you MUST keep the shifted and * non-shifted numbers straight. For example, MacRGdestroy() and MacRGremove() take * different uses of the window number right now. * * * Macintosh only Routines: * * Version Date Notes * ------- ------ --------------------------------------------------- * 0.5 880912 Initial Coding -GBP * 1.0 890216 Minor fixes for 1.0 - TKK */ #ifdef MPW #pragma segment ICR #endif #define __ALLNU__ #include "maclook.proto.h" #include "vdevice.h" #include "vdevice.proto.h" #include "vr.h" #include "InternalEvents.h" #define MAX_MAC_RGS 8 #define MAX_MAC_SUB 16 #define MAC_WINDOW_SHIFT 4 /* Bits shifted */ #define MAC_SUB_MASK 0xf /* Bits maksed */ #include "vrrgmac.proto.h" #include "errors.proto.h" #include "telneterrors.h" typedef struct MacWindow { VDevice vdev; /* virtual device to draw in, has its own colors */ WindowPtr window; /* My Window (0L if not in use ) */ PaletteHandle palette; /* My Palette */ char title[256]; /* Title string */ Point size; /* My height and width */ Rect subs[MAX_MAC_SUB];/* Rectangles of my subwindows [0,0,0,0] if not in use */ } MacWindow; MacWindow *MacRGs; short RGwn=0; /* Window number in use */ short RGsub=0; /* Sub-Window Number in use */ void MacRGinit(void) { short i; MacRGs= (MacWindow *)myNewPtr( MAX_MAC_RGS * sizeof(MacWindow)); for (i=0;i= MAX_MAC_RGS) return( -1); if ((x2 - x1) & 1) /* odd width, must be even */ x2++; SetRect( &wDims, x1+40, y1+40, x2+40, y2+40); strcpy( MacRGs[w].title, name); /* Copy of the name */ if (!TelInfo->haveColorQuickDraw) /* Borrow from RS */ return(-1); else { short i; Str255 scratchPstring; strcpy((char *)scratchPstring, name); CtoPstr((char *)scratchPstring); MacRGs[w].window=NewCWindow(NULL, &wDims, scratchPstring, TRUE, noGrowDocProc, kInFront, /* BYU LSC */ TRUE, (long) w); if (!MacRGs[w].window) { DoError(108 | MEMORY_ERRORCLASS, LEVEL2, NULL); return(-1); } MacRGs[w].vdev.bounds = &MacRGs[w].window->portRect; MacRGs[w].palette = NewPalette( 256, NULL, pmTolerant, 0); if (!MacRGs[w].palette) { DisposeWindow(MacRGs[w].window); DoError(108 | MEMORY_ERRORCLASS, LEVEL2, NULL); return(-1); } for (i=0; i<256; i++) { /* load with grey-scale */ curcol.red = i<<8; curcol.green = i<<8; curcol.blue = i<<8; SetEntryColor( MacRGs[w].palette, i, &curcol); } if (InitVDevice(&MacRGs[w].vdev,MacRGs[w].palette)) /* get vdevice going */ { DisposePalette(MacRGs[w].palette); DisposeWindow(MacRGs[w].window); DoError(108 | MEMORY_ERRORCLASS, LEVEL2, NULL); return(-1); } } ((WindowPeek)MacRGs[w].window)->windowKind = WIN_ICRG; MacRGs[w].size.h = x2-x1; MacRGs[w].size.v = y2-y1; for (i=0; i> MAC_WINDOW_SHIFT; if (!MacRGs[w].window) return; SetPort( MacRGs[w].window); RGwn = w; RGsub= wn & MAC_SUB_MASK; /* Optionally set the clip region */ } /**************************************** * MacRGdestroy(wn) - * * destroy window wn * ****************************************/ void MacRGdestroy(short wn) { // sprintf((char *) tempspot,"destroy: %d", wn); putln((char *) tempspot); /* BYU LSC */ if (!MacRGs[wn].window) return; VRdestroybyName((char *) &MacRGs[wn].title); } /**************************************** * MacRGremove(wn) - * * destroy window wn * ****************************************/ void MacRGremove ( short wn ) { CGrafPtr cgp; short w = wn>> MAC_WINDOW_SHIFT; if (!MacRGs[w].window) return; TrashVDevice(&MacRGs[w].vdev); cgp = (CGrafPtr) MacRGs[w].window; /* unseed window color table */ (*(*(cgp->portPixMap))->pmTable)->ctSeed = GetCTSeed(); DisposeWindow( MacRGs[w].window); /* Get rid of the actual window */ if (MacRGs[w].palette) DisposePalette( MacRGs[w].palette); MacRGs[w].palette = NULL; MacRGs[w].window = NULL; // sprintf((char *) tempspot,"take away: %d", w); putln((char *) tempspot); /* BYU LSC */ } short MacRGfindwind(WindowPtr wind) { short i=0; if (!wind) return(-2); while (iportPixMap; copyfrom = *MacRGs[wn].vdev.bounds; SetPort(wind); copysize = copyfrom; /* boundary of drawing area */ picture= OpenPicture(©size); ClipRect(©size); /* RGBBackColor(&icrwhite); RGBForeColor(&icrblack); */ ForeColor( blackColor); BackColor( whiteColor); LockPixels(hidep); CopyBits((BitMap *) (*hidep), &wind->portBits, ©from, ©size, srcCopy, NULL); UnlockPixels(hidep); ClosePicture(); /* put the PICT into the scrap manager */ len = GetHandleSize((Handle) picture); HLock((Handle) picture); ZeroScrap(); PutScrap( len, 'PICT', (Ptr) *picture); HUnlock((Handle) picture); KillPicture(picture); } short MacRGupdate( WindowPtr wind) { short wn; GWorldPtr theWorld; if (( wn= MacRGfindwind( wind)) <0) return(-1); /* Couldn't do it */ theWorld = MacRGs[wn].vdev.whichWorld; SetPort(wind); ForeColor( blackColor); BackColor( whiteColor); BeginUpdate(wind); LockPixels(theWorld->portPixMap); CopyBits(&((GrafPtr)theWorld)->portBits,&wind->portBits,&theWorld->portRect, &wind->portRect, srcCopy, NULL); UnlockPixels(theWorld->portPixMap); EndUpdate( wind); return(0); } /**************************** Hereafter lie the graphics routines ************************/ short MacRGraster(char *data, short x1, short y1, short x2, short y2, short rowbytes) { Rect tr; char *p,*baseOfThisRun; short i; PixMapHandle pix; CGrafPtr origPort; GDHandle origDev; GWorldPtr theOffscreenWorld; long temp; if (!MacRGs[RGwn].window) return(-1); theOffscreenWorld = MacRGs[RGwn].vdev.whichWorld; GetGWorld(&origPort,&origDev); //save old settings SetGWorld(theOffscreenWorld,NULL); pix = GetGWorldPixMap(MacRGs[RGwn].vdev.whichWorld); LockPixels(pix); baseOfThisRun = (char *)GetPixBaseAddr(pix); temp = (long)((*pix)->rowBytes & 0x3fff); baseOfThisRun += temp*y1 + x1; p = baseOfThisRun; for (i=0; islc[temp] = default_slc[temp]; if (default_slc[temp] == 255) tw->slcLevel[temp] = SLC_NOSUPPORT; else tw->slcLevel[temp] = SLC_VALUE; } tw->lmodeBits = 0; tw->litNext = 0; tw->lmode = 0; } void process_key(unsigned char ascii,struct WindRec *tw) { if (tw->litNext) //do no processing on next key { tw->litNext = FALSE; if (tw->kblen < (MAXKB -1)) /* Add to buffer if not full */ tw->kbbuf[tw->kblen++] = ascii; else { netpush(tw->port); netwrite( tw->port, tw->kbbuf, tw->kblen); /* if full send buffer */ tw->kbbuf[0]=ascii; tw->kblen=1; } if (tw->echo) { if (ascii>31 && ascii <127) /* add these chars to buffer */ { parse(tw, &ascii, 1); return; } else return; } } if (tw->lmodeBits & 2) // TRAPSIG mode active { unsigned char toSend[2] = {IAC,0}; short whichSignal = 0; if (ascii == tw->slc[SLC_IP]) { whichSignal = SLC_IP; toSend[1] = TEL_SUSP; } else if (ascii == tw->slc[SLC_ABORT]) { whichSignal = SLC_ABORT; toSend[1] = TEL_ABORT; } if (toSend[1]) //if we have a signal to catch { if (tw->echo) parse(tw, &ascii, 1); // echo if we should tw->kblen=0; //zero out the buffer netpush(tw->port); netwrite(tw->port,toSend,2); //send IAC whatever if (tw->slcLevel[whichSignal] & SLC_FLUSHIN) { unsigned char dm[2] = {IAC,TEL_DM}; netpush(tw->port); netUrgent();//send next as urgent data netwrite(tw->port,dm,2);//send IAC DM } if (tw->slcLevel[whichSignal] & SLC_FLUSHOUT) { unsigned char tm[3] = {IAC,TEL_DOTEL,N_TIMING}; tw->timing = 1; //tell ourselves to wait for WILL TIMING netpush(tw->port); netwrite(tw->port,tm,3);//send DO TIMING } return; } } if ((tw->lmodeBits & L_SOFT_TAB)&&(ascii == 0x09)) // SOFT_TAB mode active; expand tab into spaces { short numSpaces = VSIgetNextTabDistance(); while (numSpaces > 0) { while ((numSpaces > 0)&&(tw->kblen < (MAXKB -1))) { tw->kbbuf[tw->kblen++] = 0x20; //space numSpaces--; } if (tw->kblen == (MAXKB -1)) { netpush(tw->port); netwrite( tw->port, tw->kbbuf, tw->kblen); /* if full send buffer */ tw->kblen=0; } } if (tw->echo) parse(tw, &ascii, 1); return; } if (tw->lmodeBits & L_EDIT) //handle editing functions { if (ascii == '\015') //CR { //since we are in edit, send the buffer and CR-LF if (tw->kblen > 0) netwrite(tw->port, tw->kbbuf, tw->kblen); netpush(tw->port); netwrite(tw->port,"\015\012",2); tw->kblen = 0; if (tw->echo) parse(tw,(unsigned char *) "\012\015",2); return; } if (ascii == tw->slc[SLC_EC]) //kill the character { if (tw->echo) parse(tw,(unsigned char *) "\010 \010",3); tw->kblen--; return; } else if (ascii == tw->slc[SLC_AO]) //kill the line { while (tw->kblen >0) { if (tw->echo) parse(tw,(unsigned char *) "\010 \010",3); tw->kblen--; } return; } else if (ascii == tw->slc[SLC_EL]) //kill the line { while (tw->kblen >0) { if (tw->echo) parse(tw,(unsigned char *) "\010 \010",3); tw->kblen--; } return; } else if (ascii == tw->slc[SLC_EOF]) { //push the buffer, send IAC EOF char eofString[2] = { IAC, TEL_EOF }; if (tw->kblen > 0) netwrite(tw->port, tw->kbbuf, tw->kblen); tw->kbbuf[0]=ascii; tw->kblen=1; netpush(tw->port); netwrite(tw->port,eofString, 2); return; } else if (ascii == tw->slc[SLC_SUSP]) { char eofString[2] = { IAC, TEL_SUSP }; if (tw->kblen > 0) netwrite(tw->port, tw->kbbuf, tw->kblen); tw->kblen = 0; netpush(tw->port); netwrite(tw->port,eofString, 2); return; } else if (ascii == tw->slc[SLC_EW]) { while ((tw->kbbuf[tw->kblen-1] != 0x20)&&(tw->kblen >= 0)) //while its not a space { if (tw->echo) parse(tw,(unsigned char *)"\010 \010",3); tw->kblen--; } } else if (ascii == tw->slc[SLC_RP]) { VSredrawLine(tw->vs); return; } else if (ascii == tw->slc[SLC_LNEXT]) { tw->litNext = TRUE; return; } else if (ascii == tw->slc[SLC_XON]) { if (tw->allow_flow) //remote flow control can turn this off tw->enabled = 0; return; } else if (ascii == tw->slc[SLC_XOFF]) { if (tw->allow_flow) //remote flow control can turn this off tw->enabled = 0; return; } else if ((ascii == tw->slc[SLC_FORW1])||(ascii == tw->slc[SLC_FORW1])) { if (tw->kblen > 0) netwrite(tw->port, tw->kbbuf, tw->kblen); netpush(tw->port); netwrite(tw->port,&ascii,1); tw->kblen = 0; return; } //ok, at this point, we are past all local editing functions. Now, add the character to the buffer. else { if (tw->kblen < (MAXKB -1)) // Add to buffer if not full tw->kbbuf[tw->kblen++] = ascii; else { netpush(tw->port); netwrite( tw->port, tw->kbbuf, tw->kblen); // if full send buffer tw->kbbuf[0]=ascii; tw->kblen=1; } } } else if (ascii == '\015') //CR; map this to CR-LF { unsigned char toSend[2] = {0x0D,0x00}; netpush(tw->port); netwrite(tw->port,toSend,2); if (tw->echo) parse(tw,(unsigned char *) "\012\015",2); return; } else //not editing; send it { netpush(tw->port); netwrite( tw->port, &ascii, 1); // if full send buffer } if (tw->echo) /* Handle local ECHOs */ { if (ascii>31 && ascii <127) /* add these chars to buffer */ parse(tw, &ascii, 1); else /* not printable char */ { if (!(tw->lmodeBits & L_LIT_ECHO)) //don't echo if this is set { ascii='@'+ascii; parse(tw,(unsigned char *) "^",1); parse(tw, &ascii, 1); } } } } void linemode_suboption(struct WindRec *tw) { switch(tw->parsedat[1]) { char s[80]; case L_MODE: /* change mode */ #ifdef OPTS_DEBUG strcpy(s, "RECV: SB LINEMODE MODE => "); DemangleLineModeShort(s, tw->parsedat[2]); opts_debug_print(s); #endif if (tw->lineAllow) { // First make sure we allowed linemode in the first place. // RFC 1184 says client should ignore MODE negotiations with the MODE_ACK bit set, and should not // generate a response if the negotiated MODE matches the current MODE if (!((tw->parsedat[2] & L_MODE_ACK) || ((tw->parsedat[2] & L_MODE_MASK) == tw->lmodeBits))) { tw->lmodeBits = tw->parsedat[2]; // Accept the mode tw->parsedat[2] |= L_MODE_ACK; // Set the MODE_ACK bit sprintf(s,"%c%c%c%c",IAC,TEL_SB,N_LINEMODE,L_MODE); netwrite(tw->port,s,4); sprintf(s,"%c%c%c",tw->parsedat[2],IAC,TEL_SE); netwrite(tw->port,s,3); #ifdef OPTS_DEBUG opts_debug_print("SENT: IAC SB"); strcpy(s, "SENT: LM MODE = "); DemangleLineModeShort(s, tw->parsedat[2]); opts_debug_print(s); opts_debug_print("SENT: IAC SE"); #endif } #ifdef OPTS_DEBUG else { strcpy(s, "LINEMODE MODE = "); DemangleLineModeShort(s, tw->parsedat[2]); opts_debug_print(s); if (tw->parsedat[2] & L_MODE_ACK) opts_debug_print("\tignored because MODE_ACK was set."); else opts_debug_print("\tIgnored because we are already at that mode."); strcpy(s, "Curr Linemode = "); DemangleLineModeShort(s, tw->lmodeBits); opts_debug_print(s); } #endif } break; case TEL_DOTEL: #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB LINEMODE DO %c", tw->parsedat[2]); opts_debug_print(munger); #endif tw->forwardMask = TRUE; setForwardMask(tw); str_lm[3] = TEL_WILLTEL; str_lm[4] = L_FORWARDMASK; netpush(tw->port); netwrite(tw->port, str_lm, sizeof(str_lm)); #ifdef OPTS_DEBUG sprintf(munger,"SENT: IAC SB LINEMODE WILL %c IAC SE", tw->parsedat[2]); opts_debug_print(munger); #endif break; case TEL_DONTTEL: #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB LINEMODE DO %c", tw->parsedat[2]); opts_debug_print(munger); #endif tw->forwardMask = FALSE; str_lm[3] = TEL_WONTTEL; str_lm[4] = L_FORWARDMASK; netpush(tw->port); netwrite(tw->port, str_lm, sizeof(str_lm)); #ifdef OPTS_DEBUG sprintf(munger,"SENT: IAC SB LINEMODE WONT %c IAC SE", tw->parsedat[2]); opts_debug_print(munger); #endif break; case L_SLC: /* set local chars */ negotiateSLC(tw); break; default: #ifdef OPTS_DEBUG sprintf(munger, "RECV: SB LINEMODE ?? (?? = %c)", tw->parsedat[1]); opts_debug_print(munger); #endif break; }//switch parsedat } void setForwardMask(struct WindRec *tw) //set the keys on which we forward on { short j, i = 3; Boolean anotherByte = TRUE; tw->numForwardKeys = 1; while((tw->parsedat[i] != 0)&&(i < 35)) { if (tw->parsedat[i] == 255) { i++; //could be doubled IAC if(tw->parsedat[i+1] == TEL_SE) { anotherByte = FALSE; //but its not i--; } } if (anotherByte) for(j = 0; j < 8; j++) { if (tw->parsedat[i] & (j*2)) { tw->forwardKeys[tw->numForwardKeys-1] = (i-3)*8 + j; tw->numForwardKeys++; } } else break; i++;//next byte } for (i = tw->numForwardKeys; i < 32; i++) //zero the rest of the array tw->forwardKeys[i] = 0; } void respondSLC(short optionNumber,short *alreadySentSB,struct WindRec *tw, Boolean AWK) { unsigned char stuffToSend[3]; unsigned char subBeginSeq[4] = {IAC,TEL_SB,N_LINEMODE,L_SLC}; stuffToSend[0] = optionNumber; stuffToSend[1] = tw->slcLevel[optionNumber]; if (AWK) stuffToSend[1] |= SLC_AWK; stuffToSend[2] = tw->slc[optionNumber]; if (!(*alreadySentSB)) { *alreadySentSB = TRUE; netwrite(tw->port, subBeginSeq, 4); opts_debug_print("SENT: IAC SB LINEMODE SLC"); } if (stuffToSend[2] == IAC) { netwrite(tw->port, stuffToSend,2); netwrite(tw->port, subBeginSeq,1); //double the IAC netwrite(tw->port, subBeginSeq,1); } else netwrite(tw->port, stuffToSend, 3); #ifdef OPTS_DEBUG if (AWK) { if ((tw->slcLevel[optionNumber] & (SLC_FLUSHIN | SLC_FLUSHOUT)) == (SLC_FLUSHIN | SLC_FLUSHOUT)) sprintf(munger,"\t %s %s | AWK | FLUSHIN | FLUSHOUT %d",LMoptions[optionNumber],LMflags[SLC_LEVELBITS & tw->slcLevel[optionNumber]],tw->slc[optionNumber]); else if (tw->slcLevel[optionNumber] & SLC_FLUSHIN) sprintf(munger,"\t %s %s | AWK | FLUSHIN %d",LMoptions[optionNumber],LMflags[SLC_LEVELBITS & tw->slcLevel[optionNumber]],tw->slc[optionNumber]); else if (tw->slcLevel[optionNumber] & SLC_FLUSHOUT) sprintf(munger,"\t %s %s | AWK | FLUSHOUT %d",LMoptions[optionNumber],LMflags[SLC_LEVELBITS & tw->slcLevel[optionNumber]],tw->slc[optionNumber]); else sprintf(munger,"\t %s %s | AWK %d",LMoptions[optionNumber],LMflags[tw->slcLevel[optionNumber]],tw->slc[optionNumber]); } else { if ((tw->slcLevel[optionNumber] & (SLC_FLUSHIN | SLC_FLUSHOUT)) == (SLC_FLUSHIN | SLC_FLUSHOUT)) sprintf(munger,"\t %s %s | AWK | FLUSHIN | FLUSHOUT %d",LMoptions[optionNumber],LMflags[SLC_LEVELBITS & tw->slcLevel[optionNumber]],tw->slc[optionNumber]); else if (tw->slcLevel[optionNumber] & SLC_FLUSHIN) sprintf(munger,"\t %s %s | FLUSHIN %d",LMoptions[optionNumber],LMflags[SLC_LEVELBITS & tw->slcLevel[optionNumber]],tw->slc[optionNumber]); else if (tw->slcLevel[optionNumber] & SLC_FLUSHOUT) sprintf(munger,"\t %s %s | FLUSHOUT %d",LMoptions[optionNumber],LMflags[SLC_LEVELBITS & tw->slcLevel[optionNumber]],tw->slc[optionNumber]); else sprintf(munger,"\t %s %s %d",LMoptions[optionNumber],LMflags[tw->slcLevel[optionNumber]],tw->slc[optionNumber]); } opts_debug_print(munger); #endif } void negotiateSLC(struct WindRec *tw) { short lmslcflag = 0; unsigned char *ourValues = tw->slc; unsigned char *ourLevels = tw->slcLevel; short i; #ifdef OPTS_DEBUG sprintf(munger,"RECV: IAC SB LINEMODE SLC"); opts_debug_print(munger); for(i=2;i <= tw->parseIndex - 3; i+=3) { if (tw->parsedat[i] > 30) DebugStr("\pAck! Bad option number"); if(tw->parsedat[i+1] & SLC_AWK) sprintf(munger," %s %s|AWK %d",LMoptions[tw->parsedat[i]],LMflags[tw->parsedat[i+1] & SLC_LEVELBITS],tw->parsedat[i+2]); else sprintf(munger," %s %s %d",LMoptions[tw->parsedat[i]],LMflags[tw->parsedat[i+1] & SLC_LEVELBITS],tw->parsedat[i+2]); opts_debug_print(munger); } sprintf(munger,"RECV: IAC SE"); opts_debug_print(munger); #endif for (i=2, lmslcflag=0; i <= tw->parseIndex - 3; i+=3) { short optionNumber = tw->parsedat[i]; Boolean awked = (tw->parsedat[i+1] & SLC_AWK); unsigned char requestedValue = tw->parsedat[i+2]; unsigned char requestedLevel = tw->parsedat[i+1] & SLC_LEVELBITS; Boolean flushin = tw->parsedat[i+1] & SLC_FLUSHIN; Boolean flushout = tw->parsedat[i+1] & SLC_FLUSHOUT; if ((ourValues[optionNumber] != requestedValue)||(ourLevels[optionNumber] != tw->parsedat[i+1])) //if we are sent what we already have, ignore it { if (requestedLevel == SLC_NOSUPPORT) { if (ourLevels[optionNumber] & SLC_LEVELBITS != SLC_NOSUPPORT) { ourValues[optionNumber] = 255; ourLevels[optionNumber] = SLC_NOSUPPORT;//ok, we wont support this if (!awked) respondSLC(optionNumber,&lmslcflag, tw, TRUE);//awk only if he didnt awk #ifdef OPTS_DEBUG else { sprintf(munger,"\t %s %s %d accepted; no response sent because it was AWKED", LMoptions[optionNumber],LMflags[requestedLevel],requestedValue); opts_debug_print(munger); } #endif } #ifdef OPTS_DEBUG else { sprintf(munger, "\t %s %s %d Ignored because we are already at nosupport", LMoptions[optionNumber],LMflags[requestedLevel],ourValues[optionNumber]); opts_debug_print(munger); } #endif } else if (requestedLevel == SLC_DEFAULT) { ourValues[optionNumber] = default_slc[optionNumber]; //get our default if (ourValues[optionNumber] == 255) ourLevels[optionNumber] = SLC_NOSUPPORT; else ourLevels[optionNumber] = SLC_VALUE; respondSLC(optionNumber, &lmslcflag, tw, FALSE); //tell him about our choice } else if (requestedLevel > ourLevels[optionNumber]) respondSLC(optionNumber, &lmslcflag, tw, FALSE); //keep lower setting else { ourValues[optionNumber] = requestedValue; ourLevels[optionNumber] = requestedLevel; if (flushin) ourLevels[optionNumber] |= SLC_FLUSHIN; if (flushout) ourLevels[optionNumber] |= SLC_FLUSHOUT; if (!awked) respondSLC(optionNumber, &lmslcflag, tw, TRUE); //agree to his new setting } } #ifdef OPTS_DEBUG else { sprintf(munger, "\t %s %s Ignored because %d is already the current value", LMoptions[optionNumber],LMflags[requestedLevel],ourValues[optionNumber]); opts_debug_print(munger); } #endif }//end for on parseindex if (lmslcflag) { unsigned char toSend[2] = {IAC,TEL_SE}; netpush(tw->port); netwrite(tw->port,toSend,2); opts_debug_print("SENT: IAC SE"); } } void doLinemode(struct WindRec *tw) { short i; unsigned char subBeginSeq[4] = {IAC,TEL_SB,N_LINEMODE,L_SLC}; unsigned char subEndSeq[2] = {IAC,TEL_SE}; unsigned char toSend[3]; tw->lmodeBits = 0; tw->lmode = TRUE; tw->litNext = FALSE; netwrite(tw->port,subBeginSeq,4); opts_debug_print("SENT: IAC SB LINEMODE SLC"); for (i=1; i<= SLC_MAX; i++) { if (tw->slc[i]==255) { toSend[0] = i; toSend[1] = SLC_NOSUPPORT; toSend[2] = 0; #ifdef OPTS_DEBUG sprintf(munger," %s NO_SUPPORT 0",LMoptions[i]); #endif } else { toSend[0] = i; toSend[1] = SLC_VALUE; toSend[2] = tw->slc[i]; #ifdef OPTS_DEBUG sprintf(munger," %s VALUE %d",LMoptions[i],(short)tw->slc[i]); #endif } opts_debug_print(munger); netwrite(tw->port,toSend,3); } opts_debug_print("SENT: IAC SE"); netpush(tw->port); netwrite(tw->port,subEndSeq,2); } static void DemangleLineMode(char *s, short mode) { #ifdef OPTS_DEBUG short i; for (i=0; i<5; i++) { if (mode & (1 << i)) strcat(s, LMmodes[i]); } #endif } void DemangleLineModeShort(char *s, short mode) { #ifdef OPTS_DEBUG short i; for (i=0; i<5; i++) { if (mode & (1 << i)) strcat(s, LMmodeBits[i]); else strcat(s," "); } #endif } \ No newline at end of file diff --git a/source/Linemode/linemode.proto.h b/source/Linemode/linemode.proto.h new file mode 100755 index 0000000..06a00de --- /dev/null +++ b/source/Linemode/linemode.proto.h @@ -0,0 +1 @@ +void linemode_suboption(struct WindRec *tw); void DemangleLineModeShort(char *s, short mode); void doLinemode(struct WindRec *tw); void process_key(unsigned char ascii,struct WindRec *tw); void initLinemode(struct WindRec *tw); void LinemodeUnload(void); \ No newline at end of file diff --git a/source/Preferences/prefs.c b/source/Preferences/prefs.c new file mode 100755 index 0000000..aaabaec --- /dev/null +++ b/source/Preferences/prefs.c @@ -0,0 +1 @@ +// prefs.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* NCSA Revisions: * 5/93 Telnet 2.6: Rewritten entirely -- Jim Browne */ #ifdef MPW #pragma segment Configure #endif #include "prefs.proto.h" #include "mainseg.proto.h" // For quit proto #include "errors.proto.h" FTPServerPrefs* gFTPServerPrefs=NULL; ApplicationPrefs* gApplicationPrefs=NULL; void PREFSUnload(void) { } OSErr OpenPreferencesFile( void) { Str255 **PreferencesFileNameHdl; OSErr err; PreferencesFileNameHdl = (Str255**)GetString(PREFERENCES_FILE_NAME_STR_ID); if (PreferencesFileNameHdl == NULL) { DebugStr("\pSomeone has deleted the prefs file name resource!"); forcequit(); } HLock((Handle)PreferencesFileNameHdl); /* look for an existing settings file. */ /* first, try the application folder */ TelInfo->SettingsFile=HOpenResFile(TelInfo->ApFolder.vRefNum, TelInfo->ApFolder.parID, (StringPtr)*PreferencesFileNameHdl,fsRdWrShPerm); if (TelInfo->SettingsFile == -1) /* Look in System Folder */ { TelInfo->SettingsFile = HOpenResFile(TelInfo->SysFolder.vRefNum, TelInfo->SysFolder.parID, (StringPtr)*PreferencesFileNameHdl, fsRdWrShPerm); } if (TelInfo->SettingsFile == -1) /* Look in Preferences Folder */ { TelInfo->SettingsFile = HOpenResFile(TelInfo->PrefFolder.vRefNum, TelInfo->PrefFolder.parID, (StringPtr)*PreferencesFileNameHdl, fsRdWrShPerm); } if (TelInfo->SettingsFile == -1) { if ((err = HCreate(TelInfo->PrefFolder.vRefNum, TelInfo->PrefFolder.parID, (StringPtr)*PreferencesFileNameHdl, 'rlfT', 'pref')) != noErr) FatalAlert(CANT_CREATE_PREFS, 120, err); HCreateResFile(TelInfo->PrefFolder.vRefNum, TelInfo->PrefFolder.parID, (StringPtr)*PreferencesFileNameHdl); if (ResError() != noErr) FatalAlert(CANT_CREATE_PREFS, 120, ResError()); TelInfo->SettingsFile = HOpenResFile(TelInfo->PrefFolder.vRefNum, TelInfo->PrefFolder.parID, (StringPtr)*PreferencesFileNameHdl, fsRdWrShPerm); if (TelInfo->SettingsFile == -1) FatalAlert(CANT_CREATE_PREFS, 120, ResError()); // Give up if ((err = NewPreferences()) != noErr) return(err); } UseResFile(TelInfo->SettingsFile); ReleaseResource((Handle)PreferencesFileNameHdl); return noErr; } OSErr NewPreferences(void) { ApplicationPrefs **AppPrefsHdl; FTPServerPrefs **FTPPrefsHdl; SessionPrefs **DefaultSessionPrefs; TerminalPrefs **DefaultTerminalPrefs; // Get the master copies from the application's resource fork AppPrefsHdl = (ApplicationPrefs **)GetResource(APPLICATIONPREFS_RESTYPE, APPLICATIONPREFS_APPID); if ((ResError() != noErr) || (AppPrefsHdl == NULL)) return(ResError()); DetachResource((Handle)AppPrefsHdl); FTPPrefsHdl = (FTPServerPrefs **)GetResource(FTPSERVERPREFS_RESTYPE, FTPSERVERPREFS_APPID); if ((ResError() != noErr) || (FTPPrefsHdl == NULL)) return(ResError()); DetachResource((Handle)FTPPrefsHdl); DefaultSessionPrefs = (SessionPrefs **)GetResource(SESSIONPREFS_RESTYPE, SESSIONPREFS_APPID); if ((ResError() != noErr) || (DefaultSessionPrefs == NULL)) return(ResError()); DetachResource((Handle)DefaultSessionPrefs); DefaultTerminalPrefs = (TerminalPrefs **)GetResource(TERMINALPREFS_RESTYPE, TERMINALPREFS_APPID); if ((ResError() != noErr) || (DefaultTerminalPrefs == NULL)) return(ResError()); DetachResource((Handle)DefaultTerminalPrefs); // Add them to the Preferences file UseResFile(TelInfo->SettingsFile); if (ResError() != noErr) return(ResError()); AddResource((Handle)AppPrefsHdl, APPLICATIONPREFS_RESTYPE, APPLICATIONPREFS_ID, "\p"); if (ResError() != noErr) return(ResError()); AddResource((Handle)FTPPrefsHdl,FTPSERVERPREFS_RESTYPE, FTPSERVERPREFS_ID, "\p"); if (ResError() != noErr) return(ResError()); AddResource((Handle)DefaultSessionPrefs,SESSIONPREFS_RESTYPE, SESSIONPREFS_APPID, "\p"); if (ResError() != noErr) return(ResError()); AddResource((Handle)DefaultTerminalPrefs,TERMINALPREFS_RESTYPE, TERMINALPREFS_APPID, "\p"); if (ResError() != noErr) return(ResError()); // Update the preferences file and release the resources UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)AppPrefsHdl); ReleaseResource((Handle)FTPPrefsHdl); ReleaseResource((Handle)DefaultSessionPrefs); ReleaseResource((Handle)DefaultTerminalPrefs); return(ResError()); } OSErr LoadPreferences(void) { ApplicationPrefs **AppPrefsHdl; FTPServerPrefs **FTPPrefsHdl; UseResFile(TelInfo->SettingsFile); if (ResError() != noErr) return(ResError()); AppPrefsHdl = (ApplicationPrefs **)GetResource(APPLICATIONPREFS_RESTYPE, APPLICATIONPREFS_ID); if ((ResError() != noErr) || (AppPrefsHdl == NULL)) return(ResError()); HLock((Handle) AppPrefsHdl); BlockMove(*AppPrefsHdl, gApplicationPrefs, sizeof(ApplicationPrefs)); ReleaseResource((Handle) AppPrefsHdl); FTPPrefsHdl = (FTPServerPrefs **)GetResource(FTPSERVERPREFS_RESTYPE, FTPSERVERPREFS_ID); if ((ResError() != noErr) || (FTPPrefsHdl == NULL)) return(ResError()); HLock((Handle) FTPPrefsHdl); BlockMove(*FTPPrefsHdl, gFTPServerPrefs, sizeof(FTPServerPrefs)); ReleaseResource((Handle) FTPPrefsHdl); if (TelInfo->haveColorQuickDraw) { UseResFile(TelInfo->SettingsFile); TelInfo->AnsiColors = GetNewPalette(10001); if (TelInfo->AnsiColors == NULL) //get the Application's copy instead { UseResFile(TelInfo->ApplicationFile); TelInfo->AnsiColors = GetNewPalette(9999); DetachResource((Handle)TelInfo->AnsiColors); UseResFile(TelInfo->SettingsFile); AddResource((Handle)TelInfo->AnsiColors, 'pltt', 10001, "\pANSI Colors");//make the new resource UpdateResFile(TelInfo->SettingsFile); } DetachResource((Handle)TelInfo->AnsiColors); } CheckPrefsVersion(); return(noErr); } OSErr SaveAppPreferences(void) { ApplicationPrefs **AppPrefsHdl; Boolean UserHasBeenAlerted = FALSE, UserResponse; UseResFile(TelInfo->SettingsFile); if (ResError() != noErr) return(ResError()); AppPrefsHdl = (ApplicationPrefs **)GetResource(APPLICATIONPREFS_RESTYPE, APPLICATIONPREFS_ID); if ((ResError() != noErr) || (AppPrefsHdl == NULL)) return(ResError()); HLock((Handle) AppPrefsHdl); if (gApplicationPrefs->version < (*AppPrefsHdl)->version) { UserResponse = AskUserAlert(PREFS_ARE_NEWER_ID, TRUE); // Cancel is default if (UserResponse == TRUE) return(noErr); // User doesn't want to destroy prefs UserHasBeenAlerted = TRUE; // Don't ask the user twice! } BlockMove(gApplicationPrefs, *AppPrefsHdl, sizeof(ApplicationPrefs)); ChangedResource((Handle) AppPrefsHdl); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle) AppPrefsHdl); return(noErr); } OSErr SaveFTPPreferences(void) { FTPServerPrefs **FTPPrefsHdl; Boolean UserHasBeenAlerted = FALSE, UserResponse; UseResFile(TelInfo->SettingsFile); if (ResError() != noErr) return(ResError()); FTPPrefsHdl = (FTPServerPrefs **)GetResource(FTPSERVERPREFS_RESTYPE, FTPSERVERPREFS_ID); if ((ResError() != noErr) || (FTPPrefsHdl == NULL)) return(ResError()); HLock((Handle) FTPPrefsHdl); if ((gFTPServerPrefs->version < (*FTPPrefsHdl)->version) && (!UserHasBeenAlerted)) { UserResponse = AskUserAlert(PREFS_ARE_NEWER_ID, TRUE); // Cancel is default if (UserResponse == TRUE) return(noErr); // User doesn't want to destroy prefs } BlockMove(gFTPServerPrefs, *FTPPrefsHdl, sizeof(FTPServerPrefs)); ChangedResource((Handle) FTPPrefsHdl); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle) FTPPrefsHdl); return(noErr); } TerminalPrefs **GetDefaultTerminal(void) { TerminalPrefs **theTerminalHdl; short scratchshort; UseResFile(TelInfo->SettingsFile); theTerminalHdl = (TerminalPrefs **)Get1NamedResource(TERMINALPREFS_RESTYPE, "\p"); // If there is an error here, we put up a dialog box about the prefs // being messed up and then we restore the default from the master copy // in the application's resource fork. if (theTerminalHdl == NULL) { FatalCancelAlert(PREFERENCES_PROBLEM, "\pRepair", 110, ResError()); UseResFile(TelInfo->ApplicationFile); theTerminalHdl = (TerminalPrefs **)Get1NamedResource(TERMINALPREFS_RESTYPE, "\p"); // If the master copy is not there, it's a fatal error! if (theTerminalHdl == NULL) FatalAlert(RESOURCE_PROBLEM, 111, ResError()); // Doesn't return DetachResource((Handle)theTerminalHdl); UseResFile(TelInfo->SettingsFile); scratchshort = Unique1ID(TERMINALPREFS_RESTYPE); AddResource((Handle)theTerminalHdl, TERMINALPREFS_RESTYPE, scratchshort, "\p"); // If an error ocurred fixing the prefs file, it's a fatal error! if (ResError() != noErr) FatalAlert(NUKED_PREFS, 112, ResError()); // Doesn't return UpdateResFile(TelInfo->SettingsFile); } DetachResource((Handle)theTerminalHdl); return(theTerminalHdl); } SessionPrefs **GetDefaultSession(void) { SessionPrefs **theSessionHdl; short scratchshort; UseResFile(TelInfo->SettingsFile); theSessionHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, "\p"); // If there is an error here, we put up a dialog box about the prefs // being messed up and then we restore the default from the master copy // in the application's resource fork. if (theSessionHdl == NULL) { FatalCancelAlert(PREFERENCES_PROBLEM, "\pRepair", 100, ResError()); UseResFile(TelInfo->ApplicationFile); theSessionHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, "\p"); // If the master copy is not there, it's a fatal error! if (theSessionHdl == NULL) FatalAlert(RESOURCE_PROBLEM, 101, ResError()); // Doesn't return DetachResource((Handle)theSessionHdl); UseResFile(TelInfo->SettingsFile); scratchshort = Unique1ID(SESSIONPREFS_RESTYPE); AddResource((Handle)theSessionHdl, SESSIONPREFS_RESTYPE, scratchshort, "\p"); // If an error ocurred fixing the prefs file, it's a fatal error! if (ResError() != noErr) FatalAlert(NUKED_PREFS, 102, ResError()); // Doesn't return UpdateResFile(TelInfo->SettingsFile); } DetachResource((Handle)theSessionHdl); return(theSessionHdl); } void GetHostNameFromSession(StringPtr string) { SessionPrefs **sessHdl; UseResFile(TelInfo->SettingsFile); sessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, string); HLock((Handle)sessHdl); BlockMove((**sessHdl).hostname, string, Length((**sessHdl).hostname)+1); ReleaseResource((Handle)sessHdl); } Boolean ProcessHostnameString(StringPtr HostnameString, short *port, short *portNegative) { Str255 MungeString; short scratchshort; long portRequested; StringPtr xxxxptr, yyyyptr; Boolean foundPort = FALSE; short portNeg = 0; // Copy the whole damn thing over BlockMove(HostnameString, MungeString, 255); // Remove leading spaces scratchshort = 1; while((scratchshort <= Length(MungeString)) && (MungeString[scratchshort] == ' ')) scratchshort++; if (scratchshort > Length(MungeString)) { HostnameString[0] = 0; return(FALSE); } xxxxptr = &MungeString[scratchshort-1]; // Now look for a port number... while((scratchshort <= Length(MungeString)) && (MungeString[scratchshort] != ' ')) scratchshort++; yyyyptr = &MungeString[scratchshort]; if (scratchshort < Length(MungeString)) { if (MungeString[scratchshort + 1] == '-') { scratchshort++; portNeg = 1; } MungeString[scratchshort] = Length(MungeString) - scratchshort; StringToNum(&MungeString[scratchshort], &portRequested); if ((portRequested > 0) && (portRequested < 65535)) foundPort = TRUE; } xxxxptr[0] = yyyyptr - xxxxptr - 1; // Copy parsed hostname string back BlockMove(xxxxptr, HostnameString, Length(xxxxptr)+1); *port = (short)portRequested; *portNegative = portNeg; return(foundPort); } void CheckPrefsVersion(void) { if (gApplicationPrefs->version != OUR_PREFS_VERSION_NUMBER) //need to correctly set new values { if (gApplicationPrefs->version < NO_TIMEOUTS_VERSION) { gApplicationPrefs->SendTimeout = 15; //before d5, we need to set these gApplicationPrefs->OpenTimeout = 15; } gApplicationPrefs->StaggerWindowsOffset = 10;//before b1, we need to set this gApplicationPrefs->version = OUR_PREFS_VERSION_NUMBER; SaveAppPreferences(); } } \ No newline at end of file diff --git a/source/Preferences/prefs.proto.h b/source/Preferences/prefs.proto.h new file mode 100755 index 0000000..d0f3ce6 --- /dev/null +++ b/source/Preferences/prefs.proto.h @@ -0,0 +1 @@ +OSErr OpenPreferencesFile(void); OSErr NewPreferences(void); OSErr LoadPreferences(void); OSErr SaveFTPPreferences(void); OSErr SaveAppPreferences(void); TerminalPrefs **GetDefaultTerminal(void); SessionPrefs **GetDefaultSession(void); void GetHostNameFromSession(StringPtr string); Boolean ProcessHostnameString(StringPtr, short*, short*); void CheckPrefsVersion(void); void PREFSUnload(void); \ No newline at end of file diff --git a/source/Screens/rsdefs.h b/source/Screens/rsdefs.h new file mode 100755 index 0000000..e93041b --- /dev/null +++ b/source/Screens/rsdefs.h @@ -0,0 +1 @@ +/*------------------------------------------------------------------------------*/ /* RSDEFS.H */ /* This is the defines file for rsmac.c. There are enough defines and structs */ /* to merit putting them into a separate file, so I have done so -SMB */ /*-------------------------------------------------------------------------*/ /* some defines for easy structure access */ #define FHeight RSlocal[w].fheight #define Fascent RSlocal[w].fascent #define FWidth RSlocal[w].fwidth #define FONT RSlocal[w].fnum #define FSIZE RSlocal[w].fsiz #define FRight RSlocal[w].width #define RMAXWINDOWWIDTH (width)*FWidth+16 - (CHO) #define RMAXWINDOWHEIGHT (lines)*FHeight+16 /* the different cursor types */ #define BLOCKCURSOR 0 /* BYU 2.4.11 */ #define UNDERSCORECURSOR 1 /* BYU 2.4.11 */ #define VERTICALCURSOR 2 /* BYU 2.4.11 */ /* Capable of shifting the text to the right some # of pixels */ #define CVO 0 #define CHO -3 #define INFINITY 20000 // Will screens ever be this large? #define MAXATTR 16 #define PALSIZE (MAXATTR*2+4*2) //this is ANSI colors plus our four. /*------------------------------------------------------------------------*/ /* Now we have some externs, packed away neatly from the rest of the code */ extern TelInfoRec *TelInfo; extern short scrn; /* shut up, Tim */ extern char *tempspot; extern MenuHandle myMenus[]; /*--------------------------------------------------------------------------*/ /* Time to define the big RS structure. RSdata holds the font and screen */ /* specific stuff. Basically all the ugly stuff you wouldnt otherwise */ /* care to look at */ struct RSdata { OSType id; // RSDA Rect textrect; /* Where the text is in the window */ Rect cursor; /* Cursor rectangle */ WindowPtr window; /* Window pointer */ PaletteHandle pal; /* My Palette */ char cursorstate,/* BYU 2.4.11 - 0 is invisible, 1 is visible */ selected; /* BYU 2.4.11 - text is selected */ Point last, anchor; short topline, leftmarg; /* leftmost visible column position */ short rheight, /* Real window dimensions */ /* adjusted to not include CHO boundary - TK 12/88 */ rwidth; short height, width; /* Window Dimensions rounded to the nearest character */ Boolean flipped; /* Set when we've reversed normal fg and bg colors */ ControlHandle left, /* The CH for the left margin */ scroll; /* The CH for the scroll bar */ short min, /* Minimum vertical scrollbar value (number of lines in screen buffer and scrollback) */ max, /* Maximum vertical scrollbar value */ current, /* current vertical scrollbar value */ lmin, /* Minimum horizontal scrollbar value (always 0) */ lmax, /* Maximum horizontal scrollbar value (number of columns not visible) */ lcurrent; /* current horizontal scrollbar value (leftmost visible column) */ short fascent, /* Font Ascent */ fnum, /* Font ID */ fsiz, /* Font Size */ fheight, /* Font Height/character */ fwidth, /* Font Width /character */ monospaced, /* Font is monospaced */ allowBold, // RAB BetterTelnet 1.0fc4 - allow boldfacing colorBold, // RAB BetterTelnet 1.0fc4 - use color for boldfacing bfnum, // RAB BetterTelnet 1.0fc9 - bold font ID bfsiz, // RAB BetterTelnet 1.0fc9 - bold font size bfstyle, // RAB BetterTelnet 1.0fc9 - bold font style realbold; // RAB BetterTelnet 1.2 - use bold font for bold Boolean skip; /* TRUE if we are skipping the output */ WCTabHandle wctb; }; typedef struct RSdata RSdata; #define MYSETRECT(a,b,c,d,e) a.left = b; \ a.top = c;\ a.right = d;\ a.bottom = e;\ \ No newline at end of file diff --git a/source/Screens/rsinterf.c b/source/Screens/rsinterf.c new file mode 100755 index 0000000..4979811 --- /dev/null +++ b/source/Screens/rsinterf.c @@ -0,0 +1 @@ +/* rsinterf.c */ /* A split of RSmac.c to facilitate keeping my sanity --CCP */ #include "rsdefs.h" #include "vsdata.h" #include "wind.h" #include "rsmac.proto.h" #include "vsinterf.proto.h" #include "vsintern.proto.h" #include "rsinterf.proto.h" #include "menuseg.proto.h" #include "maclook.proto.h" #include "wdefpatch.proto.h" /* 931112, ragge, NADA, KTH */ #include "parse.proto.h" #include "network.proto.h" #include "DlogUtils.proto.h" #include "url.proto.h" #include "drag.proto.h" #include "configure.proto.h" #include "errors.proto.h" static void calculateWindowPosition(WindRec *theScreen,Rect *whereAt, short colsHigh, short colsWide); extern WindRec *screens; extern short MaxRS; extern RSdata *RSlocal, *RScurrent; extern Rect noConst; extern short RSw, /* last window used */ RSa; /* last attrib used */ extern short **topLeftCorners; extern short NumberOfColorBoxes; extern short BoxColorItems[8]; extern RGBColor BoxColorData[8]; long RScolors[8] = //these are the old quickdraw constants, { //only used if Telinfo->hasColorQuickDraw is false blackColor, redColor, greenColor, yellowColor, blueColor, magentaColor, cyanColor, whiteColor }; SIMPLE_UPP(ScrollProc,ControlAction); static void HandleDoubleClick(short w, short modifiers); void RSunload(void) {} /*------------------------------------------------------------------------------*/ /* RSselect */ /* Handle the mouse down in the session window. All we know so far is that it */ /* is somewhere in the content window, and it is NOT an option - click. */ /* Double clicking now works -- SMB */ // And I fixed it so it works correctly. Grrrr... - JMB // WARNING: Make sure RSlocal[w].selected is 1 when doing selections. If it is // zero, the autoscrolling routines will seriously hose the selection drawing. // Heed this advice, it took me two hours to find the cause of this bug! - JMB /* called on a mouse-down in the text display area of the active window. Creates or extends the highlighted selection within that window, autoscrolling as appropriate if the user drags outside the currently visible part of the display. */ void RSselect( short w, Point pt, EventRecord theEvent) { static long lastClick = 0; static Point lastClickLoc = {0,0}; GrafPtr tempwndo; Point curr, temp; long clickTime; short shift = (theEvent.modifiers & shiftKey); RSsetConst(w); tempwndo = RSlocal[w].window; curr = normalize(pt, w, TRUE); clickTime = TickCount(); if ( ( EqualPt(RSlocal[w].anchor, curr) || EqualPt(RSlocal[w].anchor, RSlocal[w].last) ) && ((clickTime - lastClick) <= GetDblTime()) && EqualPt(curr, lastClickLoc)) { /* NCSA: SB - check to see if this is a special click */ /* NCSA: SB - It has to be in the right time interval, and in the same spot */ curr = RSlocal[w].anchor = RSlocal[w].last = normalize(pt, w,TRUE); HandleDoubleClick(w, theEvent.modifiers); RSlocal[w].selected = 1; lastClick = clickTime; lastClickLoc = curr; } else if (theEvent.modifiers & cmdKey) { // a command click means we should look for a url if ((RSlocal[w].selected)&(PointInSelection(curr, w))) //we have a selection already HandleURL(w); else { // we need to find the url around this pnt if (FindURLAroundPoint(curr, w)) HandleURL(w); else SysBeep(1); } } else { lastClick = clickTime; lastClickLoc = curr; if (RSlocal[w].selected) { if (!shift) { /* unhighlight current selection */ RSinvText(w, RSlocal[ w].anchor, RSlocal[w].last, &noConst); /* start new selection */ curr = RSlocal[w].last = RSlocal[w].anchor = normalize(pt, w,TRUE); } else { RSsortAnchors(w); if ((curr.v < RSlocal[w].anchor.v) || ((curr.v == RSlocal[w].anchor.v) && (curr.h < RSlocal[w].anchor.h))) { temp = RSlocal[w].anchor; RSlocal[w].anchor = RSlocal[w].last; RSlocal[w].last = temp; } } } else { /* start new selection */ curr = RSlocal[w].anchor = RSlocal[w].last = normalize(pt, w,TRUE); RSlocal[w].selected = 1; } while (StillDown()) { /* wait for mouse position to change */ do { curr = normalize(getlocalmouse(tempwndo), w,TRUE); } while (EqualPt(curr, RSlocal[w].last) && StillDown()); /* toggle highlight state of text between current and last mouse positions */ RSinvText(w, curr, RSlocal[w].last, &noConst); RSlocal[w].last = curr; } /* while */ } if (EqualPt(RSlocal[w].anchor, RSlocal[w].last)) RSlocal[w].selected = 0; else RSlocal[w].selected = 1; SetMenusForSelection((short)RSlocal[w].selected); } /* RSselect */ void FlashSelection(short w) { short i; long finalTick; for (i = 0; i < 2; i++) { Delay(5, &finalTick); RSinvText(w, RSlocal[ w].anchor, RSlocal[w].last, &noConst); Delay(5, &finalTick); RSinvText(w, RSlocal[ w].anchor, RSlocal[w].last, &noConst); } } Boolean PointInSelection(Point curr, short w) { long beg_offset, end_offset, current_offset; short columns; columns = VSgetcols(w); beg_offset = columns*RSlocal[w].anchor.v + RSlocal[w].anchor.h; end_offset = columns*RSlocal[w].last.v + RSlocal[w].last.h; if (beg_offset == end_offset) return FALSE; current_offset = columns*curr.v + curr.h; if ((current_offset >= beg_offset)&&(current_offset <= end_offset)) return TRUE; else return FALSE; } void RSzoom ( GrafPtr window, /* window to zoom */ short code, /* inZoomIn or inZoomOut */ short shifted /* bring to front or not */ ) /* called after a click in the zoom box, to zoom a terminal window. */ { WStateData **WSDhdl; short w; short h, v, x1, x2, y1, y2; short width, lines; // For setting Standard State before zooming short top, left; // Ditto SetPort(window); w = RSfindvwind(window); /* which window is it, anyway */ width = VSmaxwidth(w) + 1; lines = VSgetlines(w); WSDhdl = (WStateData **)((WindowPeek)window)->dataHandle; top = (**WSDhdl).userState.top; left = (**WSDhdl).userState.left; HLock((Handle)WSDhdl); SetRect(&((*WSDhdl)->stdState), left, top, RMAXWINDOWWIDTH + left, RMAXWINDOWHEIGHT + top); HUnlock((Handle)WSDhdl); /* EraseRect(&window->portRect); */ ZoomWindow(window, code, shifted); EraseRect(&window->portRect); /* BYU 2.4.15 */ /* get new window size */ h = window->portRect.right - window->portRect.left; v = window->portRect.bottom - window->portRect.top; RSsetsize(w, v, h); /* save new size settings and update scroll bars */ /* update the visible region of the virtual screen */ VSgetrgn(w, &x1, &y1, &x2, &y2); VSsetrgn(w, x1, y1, (x1 + (h - 16 + CHO) / FWidth -1), (y1 + (v - 16 + CVO) / FHeight - 1)); VSgetrgn(w, &x1, &y1, &x2, &y2); /* Get new region */ /* refresh the part which has been revealed, if any */ VSredraw(w, 0, 0, x2 - x1 + 1, y2 - y1 + 1); /* window contents are now completely valid */ ValidRect(&window->portRect); } /* RSzoom */ Boolean RSisInFront(short w) { if (((WindowPtr)RSlocal[w].window) == FrontWindow()) return TRUE; else return FALSE; } short RSupdate ( GrafPtr wind ) /* does updating for the specified window, if it's one of mine. Returns zero iff it is. */ { short w, x1, x2, y1, y2; w = RSfindvwind(wind); if (RSsetwind(w) < 0) return(-1); /* not one of mine */ BeginUpdate(wind); RSregnconv /* find bounds of text area needing updating */ ( wind->visRgn, &x1, &y1, &x2, &y2, RScurrent->fheight, RScurrent->fwidth ); if (x2 > x1) { VSredraw(w, x1, y1, x2, y2); /* draw that text */ /* We must reset, less we risk looking UGLY as sin... */ BackPat(PATTERN(qd.white)); PenPat(PATTERN(qd.black)); if (TelInfo->haveColorQuickDraw) { PmForeColor(0); PmBackColor(1); } else { if (!RSlocal->flipped) { ForeColor(RScolors[0]); /* normal foreground */ BackColor(RScolors[7]); /* normal Background */ } else { ForeColor(RScolors[7]); /* normal foreground */ BackColor(RScolors[0]); /* normal Background */ } } /* if */ //now get that annoying strip on the right (CCP) RSa = -1; PenMode(patOr); DrawGrowIcon(wind); PenMode(patCopy); //DrawControls(wind); UpdtControl(wind, wind->visRgn); } EndUpdate(wind); return(0); } /* RSupdate */ short RSTextSelected(short w) { /* BYU 2.4.11 */ return(RSlocal[w].selected); /* BYU 2.4.11 */ } /* BYU 2.4.11 */ void RSskip ( short w, Boolean on ) /* sets the "skip" flag for the specified window (whether ignore screen updates until further notice). */ { RSlocal[w].skip = on; } /* RSskip */ /* * This routine is called when the user presses the grow icon, or when the size of * the window needs to be adjusted (where==NULL, modifiers==0). * It limits the size of the window to a legal range. */ short RSsize (GrafPtr window, long *where, long modifiers) { Rect SizRect; long size; short w, width, lines; short tw, h, v, x1, x2, y1, y2, th; Boolean changeVSSize = false; short screenIndex = 0; Boolean screenIndexValid = false; short err = noErr; if ((w = RSfindvwind(window)) < 0) /* Not found */ return (0); if (modifiers & cmdKey) return (0); screenIndexValid = (screenIndex = findbyVS(w)) != -1; changeVSSize = (modifiers & optionKey) == optionKey; #define DONT_DEFAULT_CHANGE_VS_IF_NAWS // JMB // 931112, ragge, NADA, KTH // I think this is the way it should work, if there is naws available it // should be used by default, and option toggles behaviour. // Maybe it should be user configurable? #ifndef DONT_DEFAULT_CHANGE_VS_IF_NAWS if(screenIndexValid && screens[screenIndex].naws) { changeVSSize = (modifiers & optionKey) != optionKey; } #endif SetPort(window); width = VSmaxwidth(w) + 1; //VSmaxwidth returns one less than number of columns lines = VSgetlines(w); if (changeVSSize) { th = INFINITY; tw = INFINITY-1; } else { tw = RMAXWINDOWWIDTH; th = RMAXWINDOWHEIGHT + 1; } SetRect(&SizRect, 48, 48, tw + 1, th); if (where) /* grow icon actions */ { if (changeVSSize) { /* 931112, ragge, NADA, KTH */ setupForGrow(window, 1 - CHO, 1 - CVO, FWidth, FHeight); } size = GrowWindow(window, *(Point *) where, &SizRect); /* BYU LSC */ if (changeVSSize) { /* 931112, ragge, NADA, KTH */ cleanupForGrow(window); } if (size != 0L) { SizeWindow(window, size & 0xffff, (size >> 16) & 0xffff, FALSE); h = window->portRect.right - window->portRect.left; v = window->portRect.bottom - window->portRect.top; } else return(0); /* user skipped growing */ } else { /* just resize the window */ h = window->portRect.right - window->portRect.left; /* same width */ v = (FHeight) * (VSgetlines(w)); /* new height */ SizeWindow(window, h, v, FALSE); /* change it */ } RSsetsize(w, v, h); /* save new size settings and update scroll bars */ /* update the visible region of the virtual screen */ VSgetrgn(w, &x1, &y1, &x2, &y2); VSsetrgn(w, x1, y1, (short)((x1 + (h - 16 + CHO) / FWidth - 1)), (short)((y1 + (v - 16) / FHeight - 1))); VSgetrgn(w, &x1, &y1, &x2, &y2); /* Get new region */ if (changeVSSize) { switch (VSsetlines(w,y2 -y1 +1)) { case (-4000): //can't even get enough memory to put VS back to original size /* signal this to main program */ return(-4); break; case (-3000): //no resize: unkown problems, but we put the VS back to original size return(0); break; case (-2000): //no resize: Memory problems, but we put the VS back to original size return(-2); break; default: //Ok, we can resize; tell host if ((x2 - x1 + 1) <= 132) { // bug fix from RAB 6/5/97 RScalcwsize(w,x2 - x1 +1); if (screenIndexValid && screens[screenIndex].naws) SendNAWSinfo(&screens[screenIndex], (x2-x1+1), (y2-y1+1)); } else { // RAB 6/5/97 RScalcwsize(w, 132); if (screenIndexValid && screens[screenIndex].naws) SendNAWSinfo(&screens[screenIndex], 132, (y2-y1+1)); } // RAB 6/5/97 return (0); break; } } VSredraw(w, 0, 0, x2 - x1 + 1, y2 - y1 + 1); /* refresh the part which has been revealed, if any */ ValidRect(&window->portRect); /* window contents are now completely valid */ return (0); } /* RSsize */ void RSshow( short w) /* reveals a hidden terminal window. */ { VSscrn *theVS; if (RSsetwind(w) < 0) return; theVS = VSwhereis(w); RSa = -1; VSredraw(w, 0, 0, theVS->maxwidth, theVS->lines); ShowWindow(RScurrent->window); } Boolean RSsetcolor ( short w, /* window number */ short n, /* color entry number */ RGBColor Color ) /* sets a new value for the specified color entry of a terminal window. */ { if ( !(TelInfo->haveColorQuickDraw) || (RSsetwind(w) < 0) || (n > 15) || (n < 0)) return(FALSE); SetEntryColor(RScurrent->pal, n, &Color); SetPort(RScurrent->window); InvalRect(&RScurrent->window->portRect); return(TRUE); } /* RSsetcolor */ void RSsendstring ( short w, /* which terminal window */ char *ptr, /* pointer to data */ short len /* length of data */ ) /* sends some data to the host along the connection associated with the specified window. */ { short temp; temp = findbyVS(w); if (temp < 0) return; netpush(screens[temp].port); /* BYU 2.4.18 - for Diab systems? */ netwrite(screens[temp].port, ptr, len); } /* RSsendstring */ short RSnewwindow ( RectPtr wDims, short scrollback, /* number of lines to save off top */ short width, /* number of characters per text line (80 or 132) */ short lines, /* number of text lines */ StringPtr name, /* window name */ short wrapon, /* autowrap on by default */ short fnum, /* ID of font to use initially */ short fsiz, /* size of font to use initially */ short showit, /* window initially visible or not */ short goaway, /* NCSA 2.5 */ short forcesave, /* NCSA 2.5: force screen save */ short screenNumber, short allowBold, short colorBold, short ignoreBeeps, short bfnum, short bfsiz, short bfstyle, short realbold, short oldScrollback ) /* creates a virtual screen and a window to display it in. */ { GrafPort gp; /* temp port for getting text parameters */ short w; Rect pRect; short wheight, wwidth; WStateData *wstate; WindowPeek wpeek; CTabHandle ourColorTableHdl; /* create the virtual screen */ w = VSnewscreen(scrollback, (scrollback != 0), /* NCSA 2.5 */ lines, width, forcesave, ignoreBeeps, oldScrollback); /* NCSA 2.5 */ if (w < 0) { /* problems opening the virtual screen -- tell us about it */ return(-1); } RScurrent = RSlocal + w; RScurrent->fnum = fnum; RScurrent->fsiz = fsiz; RScurrent->bfnum = bfnum; RScurrent->bfsiz = bfsiz; RScurrent->bfstyle = bfstyle; OpenPort(&gp); RScurrent->allowBold = allowBold; RScurrent->colorBold = colorBold; RScurrent->realbold = realbold; RSTextFont(fnum,fsiz,0); /* BYU */ TextSize(fsiz); RSfontmetrics(); ClosePort(&gp); if (wDims->bottom == 0) calculateWindowPosition(&screens[screenNumber],wDims,lines,width); if ((wDims->right - wDims->left) > RMAXWINDOWWIDTH) wDims->right = wDims->left + RMAXWINDOWWIDTH; if ((wDims->bottom - wDims->top) > RMAXWINDOWHEIGHT) wDims->bottom = wDims->top + RMAXWINDOWHEIGHT; wwidth = wDims->right - wDims->left; wheight = wDims->bottom - wDims->top; if (!RectInRgn(wDims,TelInfo->greyRegion)) //window would be offscreen calculateWindowPosition(&screens[screenNumber],wDims,lines,width); /* create the window */ if (!TelInfo->haveColorQuickDraw) { RScurrent->window = NewWindow(0L, wDims, name, showit, 8,kInFront, goaway, (long)w); RScurrent->pal = NULL; if (RScurrent->window == NULL) { VSdestroy(w); return(-2); } } else { short i; RGBColor scratchRGB; RScurrent->window = NewCWindow(0L, wDims, name, showit, (short)8,kInFront, goaway, (long)w); if (RScurrent->window == NULL) { VSdestroy(w); return(-2); } //note: the ANSI colors are in the top 8 of the palette. The four telnet colors (settable //in telnet) are in the lower 4 of the palette. These 4 are set later by a call from //CreateConnectionFromParams to RSsetColor (ick, but I am not going to add 4 more params to //this ungodly function call (CCP 2.7) ourColorTableHdl = (CTabHandle) myNewHandle((long) (sizeof(ColorTable) + PALSIZE * sizeof(CSpecArray))); if (ourColorTableHdl == NULL) { DisposeWindow(RScurrent->window); VSdestroy(w); return(-2); } HLock((Handle) ourColorTableHdl); (*ourColorTableHdl)->ctSize = PALSIZE-1; // Number of entries minus 1 (*ourColorTableHdl)->ctFlags = 0; for (i=0; i <4; i++) //set the ctTable.value field to zero for our four (*ourColorTableHdl)->ctTable[i].value = 0; if (TelInfo->AnsiColors==NULL) return(-2); //BUGG CHANGE THIS ONCE WE ARE WORKING for (i=0; i < MAXATTR*2; i++) //get the ANSI colors from the palette { GetEntryColor(TelInfo->AnsiColors, i, &scratchRGB); (*ourColorTableHdl)->ctTable[i+4].rgb = scratchRGB; (*ourColorTableHdl)->ctTable[i+4].value = 0; } RScurrent->pal = NewPalette(PALSIZE, ourColorTableHdl, pmCourteous, 0); DisposeHandle((Handle) ourColorTableHdl); if (RScurrent->pal == NULL) { DisposeWindow(RScurrent->window); VSdestroy(w); return(-2); } SetPalette(RScurrent->window, RScurrent->pal, TRUE); //copy the palette to the window } SetPort(RScurrent->window); SetOrigin(CHO, CVO); /* Cheap way to correct left margin problem */ wpeek = (WindowPeek) RScurrent->window; HLock(wpeek->dataHandle); wstate = (WStateData *) *wpeek->dataHandle; BlockMove(&wstate->userState, wDims, 8); pRect.top = wDims->top; pRect.left = wDims->left; pRect.right = pRect.left + RMAXWINDOWWIDTH; if (pRect.right > TelInfo->screenRect.right) pRect.right = TelInfo->screenRect.right; pRect.bottom = pRect.top + RMAXWINDOWHEIGHT; BlockMove(&wstate->stdState, &pRect, 8); /* create scroll bars for window */ pRect.top = -1 + CVO; pRect.bottom = wheight - 14 + CVO; pRect.left = wwidth - 15 + CHO; pRect.right = wwidth + CHO; RScurrent->scroll = NewControl(RScurrent->window, &pRect, "\p", FALSE, /* BYU LSC */ 0, 0, 0, 16, 1L); if (RScurrent->scroll == 0L) return(-3); pRect.top = wheight - 15 + CVO; pRect.bottom = wheight + CVO; pRect.left = -1 + CHO; pRect.right = wwidth - 14 + CHO; RScurrent->left = NewControl(RScurrent->window, &pRect, "\p", FALSE, /* BYU LSC */ 0, 0, 0, 16, 1L); if (RScurrent->left == 0L) return(-3); RScurrent->skip = 0; /* not skipping output initially */ RScurrent->max = 0; /* scroll bar settings will be properly initialized by subsequent call to VSsetrgn */ RScurrent->min = 0; RScurrent->current = 0; RScurrent->lmax = 0; RScurrent->lmin = 0; RScurrent->lcurrent = 0; RScurrent->selected = 0; /* no selection initially */ RScurrent->cursorstate = 0; /* BYU 2.4.11 - cursor off initially */ RScurrent->flipped = 0; /* Initially, the color entries are not flipped */ RSsetsize(w, wheight, wwidth); RSTextFont(RScurrent->fnum,RScurrent->fsiz,0); /* BYU LSC */ TextSize(RScurrent->fsiz); /* 9 point*/ if (!TelInfo->haveColorQuickDraw) TextMode(srcXor); /* Xor mode*/ else TextMode(srcCopy); if (wrapon) /* turn on autowrap */ VSwrite(w, "\033[?7h",5); return(w); } /* RSnewwindow */ short RSmouseintext /* Point is in global coords */ ( short w, Point myPoint ) /* is myPoint within the text-display area of the specified window. */ { return PtInRect(myPoint, &RSlocal[w].textrect); /* BYU LSC */ } /* RSmouseintext */ void RSkillwindow ( short w ) /* closes a terminal window. */ { WindRecPtr tw; RSdata *temp = RSlocal + w; tw = &screens[findbyVS(w)]; --((*topLeftCorners)[tw->positionIndex]); //one less window at this position if (temp->pal != NULL) { DisposePalette(temp->pal); temp->pal = NULL; } VSdestroy(w); /* destroy the virtual screen */ KillControls(RSlocal[w].window); /* Get rid of those little slidy things */ DisposeWindow(RSlocal[w].window); /* Get rid of the actual window */ RSlocal[w].window = 0L; RSw = -1; } RGBColor RSgetcolor ( short w, /* window number */ short n /* color entry number */ ) /* gets the current value for the specified color entry of a terminal window. */ { RGBColor theColor; GetEntryColor(RSlocal[w].pal,n,&theColor); return theColor; } /* RSgetcolor */ void RShide( short w) /* hides a terminal window. */ { if (RSsetwind(w) < 0) return; HideWindow(RScurrent->window); } GrafPtr RSgetwindow ( short w ) /* returns a pointer to the Mac window structure for the specified terminal window. */ { return(RSlocal[w].window); } /* RSgetwindow */ char **RSGetTextSel ( short w, /* window to look at */ short table /* nonzero for "table" mode, i e replace this many (or more) spaces with a single tab. */ ) /* returns the contents of the current selection as a handle, or nil if there is no selection. */ { char **charh, *charp; short maxwid; long realsiz; Point Anchor,Last; if (!RSlocal[w].selected) return(0L); /* No Selection */ maxwid = VSmaxwidth(w); Anchor = RSlocal[w].anchor; Last = RSlocal[w].last; realsiz = Anchor.v - Last.v; if (realsiz < 0) realsiz = - realsiz; realsiz ++; /* lines 2,3 selected can be 2 lines */ realsiz *= (maxwid + 2); charh = myNewHandle(realsiz); if (charh == 0L) return((char **) -1L); /* Boo Boo return */ HLock((Handle)charh); charp = *charh; realsiz = VSgettext(w, Anchor.h, Anchor.v, Last.h, Last.v, charp, realsiz, "\015", table); HUnlock((Handle)charh); mySetHandleSize((Handle)charh, realsiz); return(charh); } /* RSGetTextSel */ RgnHandle RSGetTextSelRgn(short w) { Rect temp, temp2; Point lb, ub; Point curr; Point last; RgnHandle rgnH, tempRgn; rgnH = NewRgn(); if (rgnH == nil) { return nil; } tempRgn = NewRgn(); if (tempRgn == nil) { DisposeRgn(rgnH); return nil; } RSsetwind(w); curr = RSlocal[w].anchor; last = RSlocal[w].last; /* normalize coordinates with respect to visible area of virtual screen */ curr.v -= RScurrent->topline; curr.h -= RScurrent->leftmarg; last.v -= RScurrent->topline; last.h -= RScurrent->leftmarg; if (curr.v == last.v) { /* highlighted text all on one line */ if (curr.h < last.h) /* get bounds the right way round */ { ub = curr; lb = last; } else { ub = last; lb = curr; } /* if */ MYSETRECT /* set up rectangle bounding area to be highlighted */ ( temp, (ub.h + 1) * RScurrent->fwidth, ub.v * RScurrent->fheight, (lb.h + 1) * RScurrent->fwidth, (lb.v + 1) * RScurrent->fheight ); SectRect(&temp, &noConst, &temp2); /* clip to constraint rectangle */ RectRgn(rgnH, &temp2); } else { /* highlighting across more than one line */ if (curr.v < last.v) ub = curr; else ub = last; if (curr.v > last.v) lb = curr; else lb = last; MYSETRECT /* bounds of first (possibly partial) line to be highlighted */ ( temp, (ub.h + 1) * RScurrent->fwidth, ub.v * RScurrent->fheight, RScurrent->width, (ub.v + 1) * RScurrent->fheight ); SectRect(&temp, &noConst, &temp2); /* clip to constraint rectangle */ RectRgn(rgnH, &temp2); MYSETRECT /* bounds of last (possibly partial) line to be highlighted */ ( temp, 0, lb.v * RScurrent->fheight, (lb.h + 1) * RScurrent->fwidth, (lb.v + 1) * RScurrent->fheight ); SectRect(&temp, &noConst, &temp2); /* clip to constraint rectangle */ RectRgn(tempRgn, &temp2); UnionRgn(tempRgn, rgnH, rgnH); if (lb.v - ub.v > 1) /* highlight extends across more than two lines */ { /* highlight complete in-between lines */ SetRect ( &temp, 0, (ub.v + 1) * RScurrent->fheight, RScurrent->width, lb.v * RScurrent->fheight ); SectRect(&temp, &noConst, &temp2); /* clip to constraint rectangle */ RectRgn(tempRgn, &temp2); UnionRgn(tempRgn, rgnH, rgnH); } /* if */ } /* if */ DisposeRgn(tempRgn); return rgnH; } short RSfindvwind ( GrafPtr wind ) /* returns the number of the virtual screen associated with the specified window, or -4 if not found. */ { short i = 0; while ((RSlocal[i].window != wind) && (i < MaxRS)) i++; if ((RSlocal[i].window == 0L) || (i >= MaxRS)) return(-4); else return(i); } /* RSfindvwind */ void RSdeactivate ( short w ) /* handles a deactivate event for the specified window. */ { GrafPtr port; GetPort(&port); SetPort(RSlocal[w].window); RSsetConst(w); /* update the appearance of the grow icon */ DrawGrowIcon(RSlocal[w].window); /* and deactivate the scroll bars */ BackColor(whiteColor); if (RSlocal[w].scroll != 0L) HideControl(RSlocal[w].scroll); if (RSlocal[w].left != 0L) HideControl(RSlocal[w].left); if (TelInfo->haveColorQuickDraw) PmBackColor(1); else BackColor(blackColor); SetPort(port); } /* RSdeactivate */ void RScursblink( short w) /* Blinks the cursor */ { GrafPtr oldwindow; long now = TickCount(); if (now > TelInfo->blinktime) { if (VSvalids(w) != 0) /* BYU 2.4.12 */ return; /* BYU 2.4.12 */ if (!VSIcursorvisible()) /* BYU 2.4.12 */ return; /* BYU 2.4.12 - cursor isn't visible */ GetPort(&oldwindow); /* BYU 2.4.11 */ TelInfo->blinktime = now + 40; /* BYU 2.4.11 */ RSlocal[w].cursorstate ^= 1; /* BYU 2.4.11 */ SetPort(RSlocal[w].window); /* BYU 2.4.11 */ InvertRect(&RSlocal[w].cursor); /* BYU 2.4.11 */ SetPort(oldwindow); /* BYU 2.4.11 */ } } /* RScursblink */ void RScursblinkon /* BYU 2.4.18 */ ( /* BYU 2.4.18 */ short w /* BYU 2.4.18 */ ) /* BYU 2.4.18 */ /* Blinks the cursor */ /* BYU 2.4.18 */ { /* BYU 2.4.18 */ if (!VSIcursorvisible()) return; /* Bri 970610 */ if (!RSlocal[w].cursorstate) { /* BYU 2.4.18 */ GrafPtr oldwindow; /* BYU 2.4.18 */ GetPort(&oldwindow); /* BYU 2.4.18 */ RSlocal[w].cursorstate = 1; /* BYU 2.4.18 */ SetPort(RSlocal[w].window); /* BYU 2.4.18 */ InvertRect(&RSlocal[w].cursor); /* BYU 2.4.18 */ SetPort(oldwindow); /* BYU 2.4.18 */ } /* BYU 2.4.18 */ } /* RScursblink */ /* BYU 2.4.18 */ void RScursblinkoff /* BYU 2.4.11 */ ( /* BYU 2.4.11 */ short w /* BYU 2.4.11 */ ) /* BYU 2.4.11 */ /* Blinks the cursor */ /* BYU 2.4.11 */ { /* BYU 2.4.11 */ if (RSlocal[w].cursorstate) { /* BYU 2.4.11 */ GrafPtr oldwindow; /* BYU 2.4.11 */ GetPort(&oldwindow); /* BYU 2.4.11 */ RSlocal[w].cursorstate = 0; /* BYU 2.4.11 */ SetPort(RSlocal[w].window); /* BYU 2.4.11 */ InvertRect(&RSlocal[w].cursor); /* BYU 2.4.11 */ SetPort(oldwindow); /* BYU 2.4.11 */ } /* BYU 2.4.11 */ } /* RScursblink */ /* BYU 2.4.11 */ void RScprompt(short w) /* puts up the dialog that lets the user examine and change the color settings for the specified window. */ { short scratchshort, ditem; Point ColorBoxPoint; DialogPtr dptr; Boolean UserLikesNewColor; RGBColor scratchRGBcolor; dptr = GetNewMySmallDialog(ColorDLOG, NULL, kInFront, (void *)ThirdCenterDialog); for (scratchshort = 0, NumberOfColorBoxes = 4; scratchshort < NumberOfColorBoxes; scratchshort++) { RGBColor tempColor; tempColor = RSgetcolor(w,scratchshort); BoxColorItems[scratchshort] = ColorNF + scratchshort; BlockMove(&tempColor,&BoxColorData[scratchshort], sizeof(RGBColor)); UItemAssign( dptr, ColorNF + scratchshort, ColorBoxItemProcUPP); } ColorBoxPoint.h = 0; // Have the color picker center the box on the main ColorBoxPoint.v = 0; // screen ditem = 3; while (ditem > 2) { ModalDialog(ColorBoxModalProcUPP, &ditem); switch (ditem) { case ColorNF: case ColorNB: case ColorBF: case ColorBB: if (TelInfo->haveColorQuickDraw) { Str255 askColorString; GetIndString(askColorString,MISC_STRINGS,PICK_NEW_COLOR_STRING); UserLikesNewColor = GetColor(ColorBoxPoint, askColorString, &BoxColorData[ditem-ColorNF], &scratchRGBcolor); if (UserLikesNewColor) BoxColorData[ditem-ColorNF] = scratchRGBcolor; } break; default: break; } // switch } // while if (ditem == DLOGCancel) { DisposeDialog(dptr); return; } for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) RSsetcolor(w,scratchshort,BoxColorData[scratchshort]); /* force redrawing of entire window contents */ SetPort(RSlocal[w].window); InvalRect(&RSlocal[w].window->portRect); DisposeDialog(dptr); } /* RScprompt */ /*------------------------------------------------------------------------------*/ /* NCSA: SB - RScalcwsize */ /* This routine is used to switch between 80 and 132 column mode. All that */ /* is passed in is the RS window, and the new width. This calculates the */ /* new window width, resizes the window, and updates everything. - SMB */ /*------------------------------------------------------------------------------*/ void RScalcwsize(short w, short width) { short x1,x2,y1,y2; short lines; short resizeWidth, resizeHeight; Rect ourContent; RSsetwind(w); RScursoff(w); VSsetcols(w,(short)(width-1)); VSgetrgn(w, &x1, &y1, &x2, &y2); /*get current visible region */ x2= width-1; lines = VSgetlines(w); /* NCSA: SB - trust me, you need this... */ RScurrent->rwidth = RScurrent->width = (x2 - x1 + 1) * RScurrent->fwidth - CHO; RScurrent->rheight = RScurrent->height= (y2 - y1 + 1) * RScurrent->fheight; if (RScurrent->rwidth > RMAXWINDOWWIDTH - 16 - CHO) RScurrent->rwidth = RMAXWINDOWWIDTH - 16 - CHO; if (RScurrent->rheight > RMAXWINDOWHEIGHT - 16) RScurrent->rheight = RMAXWINDOWHEIGHT - 16; ourContent = (*((WindowPeek)(RScurrent->window))->contRgn)->rgnBBox; RScheckmaxwind(&ourContent,RScurrent->rwidth +16, RScurrent->rheight + 16, &resizeWidth, &resizeHeight); RScurrent->rwidth = resizeWidth - 16; RScurrent->rheight = resizeHeight - 16; SizeWindow ( RScurrent->window, RScurrent->rwidth + 16, RScurrent->rheight+16, FALSE ); RSsetsize(w, RScurrent->rheight + 16, RScurrent->rwidth + 16); VSgetrgn(w, &x1, &y1, &x2, &y2); VSsetrgn(w, x1, y1, (short) (x1 + (RScurrent->rwidth ) / RScurrent->fwidth - 1), (short) (y1 + (RScurrent->rheight) / RScurrent->fheight - 1)); VSgetrgn(w, &x1, &y1, &x2, &y2); /* Get new region */ DrawGrowIcon(RScurrent->window); VSredraw(w, 0, 0, x2 - x1 + 1, y2 - y1 + 1); /* redraw newly-revealed area, if any */ ValidRect(&RScurrent->window->portRect); /* no need to do it again */ DrawControls(RScurrent->window); RScursoff(w); } /* handles a click in a terminal window. */ short RSclick( GrafPtr window, EventRecord theEvent) { ControlHandle ctrlh; short w, part, part2, x1, x2, y1, y2; Point where = theEvent.where; short shifted = (theEvent.modifiers & shiftKey); short optioned = (theEvent.modifiers & optionKey); w = 0; while ((RSlocal[w].window != window) && (w < MaxRS)) //find VS w++; if ((RSlocal[w].window == 0L) || (w >= MaxRS)) return(-1); /* what the heck is going on here?? */ SetPort(window); GlobalToLocal((Point *) &where); part = FindControl(where, window, &ctrlh); /* BYU LSC */ if (part != 0) switch (part) { case inThumb: part2 = TrackControl(ctrlh, where, 0L); /* BYU LSC */ if (part2 == inThumb) { part = GetCtlValue(ctrlh); if (ctrlh == RSlocal[w].scroll) { /* scroll visible region vertically */ VSgetrgn(w, &x1, &y1, &x2, &y2); VSsetrgn(w, x1, part, x2, part + (y2 - y1)); } else { /* ctrlh must be .left */ /* scroll visible region horizontally */ VSgetrgn(w, &x1, &y1, &x2, &y2); VSsetrgn(w, part, y1, part + (x2 - x1), y2); } /* if */ } /* if */ break; case inUpButton: case inDownButton: case inPageUp: case inPageDown: part2 = TrackControl(ctrlh, where, ScrollProcUPP); /* BYU LSC */ /* InvalRect(&(**RSlocal->scroll).contrlRect); */ /* cheap fix */ break; default: break; } /* switch */ else { if ((where.h <= RSlocal[w].width)&&(where.v <= RSlocal[w].height)) {//CCP 2.7 added the above check so that we dont do things when we are in an inactive scrollbar if (optioned) { /* send host the appropriate sequences to move the cursor to the specified position */ Point x; x = normalize(where, w,FALSE); VSpossend(w, x.h, x.v, screens[scrn].echo); /* MAT--we can check here if we want to use normal */ /* MAT--or EMACS movement. */ } else if (ClickInContent(where,w)) /* NCSA: SB - prevent BUS error */ { Boolean dragged; (void) DragText(&theEvent, where, w, &dragged); if (!dragged) RSselect(w, where, theEvent); } } } /* if */ return 0; } /* RSclick */ void RSactivate ( short w ) /* handles an activate event for the specified window. */ { RSsetConst(w); /* display the grow icon */ DrawGrowIcon(RSlocal[w].window); /* and activate the scroll bars */ if (RSlocal[w].scroll != 0L) ShowControl(RSlocal[w].scroll); if (RSlocal[w].left != 0L) ShowControl(RSlocal[w].left); } /* RSactivate */ /*--------------------------------------------------------------------------*/ /* HandleDoubleClick */ /* This is the routine that does the real dirty work. Since it is not a */ /* true TextEdit window, we have to kinda "fake" the double clicking. By */ /* this time, we already know that a double click has taken place, so check */ /* the chars to the left and right of our location, and select all chars */ /* that are appropriate -- SMB */ /*--------------------------------------------------------------------------*/ static void HandleDoubleClick(short w, short modifiers) { Point leftLoc, rightLoc, curr, oldcurr; long mySize; char theChar[5]; short mode = -1, newmode, foundEnd=0; RSsetConst(w); /* get window dims */ leftLoc = RSlocal[w].anchor; /* these two should be the same */ rightLoc = RSlocal[w].last; while(!foundEnd) /* scan to the right first */ { mySize = VSgettext(w,rightLoc.h, rightLoc.v, rightLoc.h+1, rightLoc.v, theChar,(long)1,"\015",0); if(mySize ==0 || isspace(*theChar)) /* stop if not a letter */ foundEnd =1; else rightLoc.h++; } foundEnd =0; while(!foundEnd) /* ...and then scan to the left */ { mySize = VSgettext(w,leftLoc.h-1, leftLoc.v, leftLoc.h, leftLoc.v, theChar,(long)1,"\015",0); if(mySize ==0 || isspace(*theChar)) /* STOP! */ foundEnd =1; else leftLoc.h--; } if (leftLoc.h != rightLoc.h) { /* we selected something */ RSlocal[w].anchor = leftLoc; /* new left bound */ RSlocal[w].last = rightLoc; /* and a matching new right bound */ RSlocal[w].selected = 1; /* give me credit for the selection I just made */ RSinvText(w, RSlocal[w].anchor, /* time to show it off */ RSlocal[w].last, &noConst); if (modifiers & cmdKey) // Possible URL selection HandleURL(w); else { curr.h = 0; curr.v = 0; while (StillDown()) { /* wait for mouse position to change */ do { oldcurr = curr; curr = normalize(getlocalmouse(RSlocal[w].window), w,TRUE); } while (EqualPt(curr, oldcurr) && StillDown()); if ((curr.v < leftLoc.v) || ((curr.v == leftLoc.v) && (curr.h < leftLoc.h))) { newmode = 1; // up } else if ((curr.v > leftLoc.v) || ((curr.v == leftLoc.v) && (curr.h > rightLoc.h))) { newmode = 2; // down } else newmode = -1; // inside dbl-clicked word /* toggle highlight state of text between current and last mouse positions */ if (mode == -1) { if (newmode == 2) { RSlocal[w].anchor = leftLoc; RSinvText(w, curr, rightLoc, &noConst); RSlocal[w].last = curr; } if (newmode == 1) { RSlocal[w].anchor = rightLoc; RSinvText(w, curr, leftLoc, &noConst); RSlocal[w].last = curr; } } if (mode == 1) { if (newmode == 2) { RSlocal[w].anchor = leftLoc; RSinvText(w, oldcurr, leftLoc, &noConst); RSinvText(w, rightLoc, curr, &noConst); RSlocal[w].last = curr; } if (newmode == -1) { RSlocal[w].anchor = leftLoc; RSinvText(w, oldcurr, leftLoc, &noConst); RSlocal[w].last = rightLoc; } if (newmode == mode) { RSinvText(w, oldcurr, curr, &noConst); RSlocal[w].last = curr; } } if (mode == 2) { if (newmode == 1) { RSlocal[w].anchor = rightLoc; RSinvText(w, oldcurr, rightLoc, &noConst); RSinvText(w, leftLoc, curr, &noConst); RSlocal[w].last = curr; } if (newmode == -1) { RSlocal[w].anchor = leftLoc; RSinvText(w, oldcurr, rightLoc, &noConst); RSlocal[w].last = rightLoc; } if (newmode == mode) { RSinvText(w, oldcurr, curr, &noConst); RSlocal[w].last = curr; } } mode = newmode; } /* while */ } } } Point getlocalmouse(GrafPtr wind) /* returns the current mouse position in coordinates local to the specified window. Leaves the current grafPort set to that window. */ { Point temp; SetPort(wind); GetMouse(&temp); return(temp); } /* getlocalmouse */ /*--------------------------------------------------------------------------*/ /* NCSA: SB - ClickInContent */ /* This procedure is a quick check to see if the mouse click is in the */ /* content region of the window. Normalize the point to be a VS location */ /* and then see if that is larger than what it should be... */ /* Used by RSClick to see if the click is in the scroll bars, or content.. */ /*--------------------------------------------------------------------------*/ short ClickInContent(Point where,short w) /* NCSA: SB */ { /* NCSA: SB */ Point x; /* NCSA: SB */ x = normalize(where, w,FALSE); /* NCSA: SB */ if (x.v >= VSgetlines(w)) return 0; /* NCSA: SB */ else return 1; /* NCSA: SB */ } /* NCSA: SB */ void RSchangefont(short w, short fnum,long fsiz) /* Set (w) to font fnum, size fsiz; resize window */ { Rect pRect; short x1, x2, y1, y2, width, lines; short srw,srh; WStateData *wstate; WindowPeek wpeek; short resizeWidth, resizeHeight; /* NCSA: SB */ RSsetwind(w); srw = RScurrent->rwidth; srh = RScurrent->rheight; if (fnum != -1) { RSTextFont(fnum,fsiz,0); /* BYU */ RScurrent->fnum = fnum; } /* if */ if (fsiz) { TextSize(fsiz); RScurrent->fsiz = fsiz; } /* if */ RSfontmetrics(); width = VSmaxwidth(w) + 1; lines = VSgetlines(w); /* resize window to preserve its dimensions in character cell units */ VSgetrgn(w, &x1, &y1, &x2, &y2); /* get visible region */ RScurrent->rwidth = RScurrent->width = (x2 - x1 + 1) * RScurrent->fwidth - CHO; RScurrent->rheight = RScurrent->height= (y2 - y1 + 1) * RScurrent->fheight; if (RScurrent->rwidth > RMAXWINDOWWIDTH - 16 - CHO) RScurrent->rwidth = RMAXWINDOWWIDTH - 16 - CHO; if (RScurrent->rheight > RMAXWINDOWHEIGHT - 16) RScurrent->rheight = RMAXWINDOWHEIGHT - 16; RScheckmaxwind(&RScurrent->window->portRect,RScurrent->rwidth +16, /* NCSA: SB */ RScurrent->rheight + 16, &resizeWidth, &resizeHeight); /* NCSA: SB */ SizeWindow ( RScurrent->window, RScurrent->rwidth + 16, RScurrent->rheight+16, FALSE ); /* TRUE if done right */ RSsetsize(w, RScurrent->rheight + 16, RScurrent->rwidth + 16); wpeek = (WindowPeek) RScurrent->window; HLock(wpeek->dataHandle); wstate = (WStateData *) *wpeek->dataHandle; BlockMove(&pRect, &wstate->stdState, 8); pRect.right = pRect.left + RMAXWINDOWWIDTH; if (pRect.right > TelInfo->screenRect.right) pRect.right = TelInfo->screenRect.right; pRect.bottom = pRect.top + RMAXWINDOWHEIGHT; BlockMove(&wstate->stdState, &pRect, 8); VSgetrgn(w, &x1, &y1, &x2, &y2); VSsetrgn(w, x1, y1, (short) (x1 + (RScurrent->rwidth ) / RScurrent->fwidth - 1), (short) (y1 + (RScurrent->rheight) / RScurrent->fheight - 1)); VSgetrgn(w, &x1, &y1, &x2, &y2); /* Get new region */ DrawGrowIcon(RScurrent->window); VSredraw(w, 0, 0, x2 - x1 + 1, y2 - y1 + 1); /* redraw newly-revealed area, if any */ ValidRect(&RScurrent->window->portRect); /* no need to do it again */ DrawControls(RScurrent->window); } /* RSchangefont */ void RSchangebold ( short w, short allowBold, short colorBold, short inversebold ) { RSsetwind(w); RScurrent->allowBold = allowBold; RScurrent->colorBold = colorBold; RScurrent->bfstyle = inversebold; VSredraw(screens[scrn].vs,0,0,VSmaxwidth(screens[scrn].vs),VSgetlines(screens[scrn].vs)-1); } short RSgetfont ( short w, /* which window */ short *pfnum, /* where to return font ID */ short *pfsiz /* where to return font size */ ) /* returns the current font ID and size setting for the specified window. */ { if (0 > RSsetwind(w)) return -1; *pfnum = RScurrent->fnum; *pfsiz = RScurrent->fsiz; return(0); } /* RSgetfont */ void RSfontmetrics ( void ) /* calculates various metrics for drawing text with selected font and size in current grafport into *RScurrent. */ { FontInfo finforec; GrafPtr myGP; GetPort(&myGP); GetFontInfo(&finforec); RScurrent->fascent = finforec.ascent; RScurrent->fheight = finforec.ascent + finforec.descent + finforec.leading /* +1 */; RScurrent->monospaced = (CharWidth('W') == CharWidth('i')); RScurrent->fwidth = CharWidth('W'); } pascal void ScrollProc(ControlHandle control, short part) /* scroll-tracking routine which does continuous scrolling of visible region. */ { short w, kind, x1, y2, x2, y1; kind = RSfindscroll(control, &w); VSgetrgn(w, &x1, &y1, &x2, &y2); if (kind == 2) { /* horizontal scroll bar */ switch (part) { case inUpButton: /* Up is left */ VSscrolleft(w, 1); break; case inDownButton: /* Down is right */ VSscrolright(w, 1); break; case inPageUp: VSscrolleft(w, x2 - x1); /* scroll a whole windowful */ break; case inPageDown: VSscrolright(w, x2 - x1); /* scroll a whole windowful */ break; default: break; } /* switch */ } else if (kind == 1) { /* vertical scroll bar */ switch (part) { case inUpButton: VSscrolback(w, 1); break; case inDownButton: VSscrolforward(w, 1); break; case inPageUp: VSscrolback(w, y2 - y1); /* scroll a whole windowful */ break; case inPageDown: VSscrolforward(w, y2 - y1); /* scroll a whole windowful */ break; default: break; } /* switch */ } /* if */ } /* ScrollProc */ void UnHiliteSelection(short w) { RSinvText(w, RSlocal[ w].anchor, RSlocal[w].last, &noConst); RSlocal[w].selected = FALSE; } void HiliteThis(short w, Point begin, Point end) { if (RSlocal[w].selected) UnHiliteSelection(w); RSlocal[w].anchor.v = begin.v; RSlocal[w].anchor.h = begin.h; RSlocal[w].last.v = end.v; RSlocal[w].last.h = end.h; RSinvText(w, RSlocal[ w].anchor, RSlocal[w].last, &noConst); RSlocal[w].selected = TRUE; } void calculateWindowPosition(WindRec *theScreen,Rect *whereAt, short colsHigh, short colsWide) { short offset, currentCount = 0, lastIndex = 0; Boolean done = FALSE, tooFarRight = FALSE; short w = theScreen->vs; Boolean wideCount = 0; theScreen->positionIndex = 0; while (!done) { while (((*topLeftCorners)[theScreen->positionIndex] > currentCount)&& //find an empty spot (theScreen->positionIndex < MaxSess - 1)) theScreen->positionIndex++; offset = ((gApplicationPrefs->StaggerWindows == TRUE) ? gApplicationPrefs->StaggerWindowsOffset : 1) * (theScreen->positionIndex); whereAt->top = GetMBarHeight() + 25 + offset; whereAt->left = 10 + offset; if (!tooFarRight) whereAt->left += (currentCount-wideCount)*gApplicationPrefs->StaggerWindowsOffset; else wideCount += currentCount - 1; whereAt->bottom= 30000 + offset; whereAt->right = 30000 + offset; tooFarRight = (whereAt->left + (colsWide + 1)*RScurrent->fwidth + 16 - CHO > TelInfo->screenRect.right); if (tooFarRight || (whereAt->top + (colsHigh + 1)*RScurrent->fwidth + 16 - CHO > TelInfo->screenRect.bottom)) { // we are off screen if (theScreen->positionIndex == 0) return; //the window is bigger than the screensize; return; currentCount++; // go through again, pick spot with least number already at it lastIndex = theScreen->positionIndex; theScreen->positionIndex = 0; } else done = TRUE; } ((*topLeftCorners)[theScreen->positionIndex])++; //add our window to the number at this spot } void RSUpdatePalette(void) //called when ANSI colors have changed, and we need to update each { //windows palette GrafPtr oldPort; int screenIndex; GetPort(&oldPort); for (screenIndex = 0; screenIndex < TelInfo->numwindows; screenIndex++) { if ((screens[screenIndex].active == CNXN_ACTIVE)|| (screens[screenIndex].active == CNXN_OPENING)) { if (screens[screenIndex].ANSIgraphics) { if (RSsetwind(screens[screenIndex].vs) >= 0) { int i; for (i = 0; i < 16; i++) { RGBColor tempColor; GetEntryColor(TelInfo->AnsiColors, i, &tempColor); SetEntryColor(RScurrent->pal,i+4, &tempColor); //set the new color SetPort(screens[screenIndex].wind); InvalRect(&(RScurrent->window->portRect));//force a redraw } } } } } SetPort(oldPort); } void RSchangeboldfont(short w, short fnum) { RSsetwind(w); RScurrent->bfnum = fnum; VSredraw(screens[scrn].vs,0,0,VSmaxwidth(screens[scrn].vs),VSgetlines(screens[scrn].vs)-1); } /* RSchangeboldfont */ short RSgetboldfont ( short w, /* which window */ short *pfnum /* where to return font ID */ ) /* returns the current font ID and size setting for the specified window. */ { if (0 > RSsetwind(w)) return -1; *pfnum = RScurrent->bfnum; return(0); } /* RSgetboldfont */ \ No newline at end of file diff --git a/source/Screens/rsinterf.proto.h b/source/Screens/rsinterf.proto.h new file mode 100755 index 0000000..0195191 --- /dev/null +++ b/source/Screens/rsinterf.proto.h @@ -0,0 +1 @@ +/* rsinterf.proto.h */ void RSunload(void); void RSselect(short w, Point pt, EventRecord theEvent); void RSzoom(GrafPtr window, short code, short shifted); short RSupdate(GrafPtr wind); short RSTextSelected(short w); void RSskip(short w, Boolean on); short RSsize(GrafPtr window, long *where, long modifiers); void RSshow(short w); Boolean RSsetcolor(short w, short n, RGBColor Color); void RSsendstring(short w, char *ptr, short len); short RSnewwindow(RectPtr wDims,short scrollback, short width, short lines, StringPtr name, short wrapon, short fnum, short fsiz, short showit, short goaway, short forcesave, short screenNumber, short allowBold, short colorBold, short ignoreBeeps, short bfnum, short bfsiz, short bfstyle, short realbold, short oldScrollback); short RSmouseintext(short w, Point myPoint); void RSkillwindow(short w); RGBColor RSgetcolor(short w, short n); void RShide(short w); GrafPtr RSgetwindow(short w); char **RSGetTextSel(short w, short table); RgnHandle RSGetTextSelRgn(short w); short RSfindvwind(GrafPtr wind); void RSdeactivate(short w); void RScursblink(short w); void RScursblinkon(short w); void RScursblinkoff(short w); void RScprompt(short w); void RScalcwsize(short w, short width); short RSclick(GrafPtr window, EventRecord theEvent); void RSactivate(short w); short ClickInContent(Point where, short w); Point getlocalmouse(GrafPtr wind); void RSchangefont(short w, short fnum, long fsiz); void RSchangeboldfont(short w, short fnum); void RSchangebold(short, short, short, short); short RSgetfont(short w, short *pfnum, short *pfsiz); short RSgetboldfont(short w, short *pfnum); void RSfontmetrics(void); pascal void ScrollProc(ControlHandle control, short part); void FlashSelection(short w); Boolean PointInSelection(Point curr, short w); void UnHiliteSelection(short w); void HiliteThis(short w, Point begin, Point end); void RSUpdatePalette(void); Boolean RSisInFront(short w); \ No newline at end of file diff --git a/source/Screens/rsmac.c b/source/Screens/rsmac.c new file mode 100755 index 0000000..c41237c --- /dev/null +++ b/source/Screens/rsmac.c @@ -0,0 +1 @@ +/* * * Virtual Screen Kernel Macintosh Real Screen Interface * (rsmac.c) * * National Center for Supercomputing Applications * by Gaige B. Paulsen * * This file contains the macintosh real screen calls for the NCSA * Virtual Screen Kernel. * * RSbell(w) - Ring window w's bell * RScursoff(w) - Turn the cursor off in w * RScurson(w,x,y) - Turn the cursor on in w at x,y * RSdraw(w,x,y,a,len,ptr) - Draw @x,y in w string@ptr for length len * RSdelchars(w,x,y,n) - Delete n chars in w from x,y * RSdellines(w,t,b,n) - Delete n lines in region t->b in w * RSerase(w,x1,y1,x2,y2) - Erase from x1,y1 to x2,y2 in w * RSinitall() - Initialize the world if necessary * RSinslines(w,t,b,n) - Insert n lines in region t->b in w * RSinsstring(w,x,y,a,len,ptr)- Insert len chars @x,y in w attrib a * RSsendstring(w,ptr,len) - Send string @ptr length len from window w * RSbufinfo( w, total,current)- Tells you the total/current lines in buffer * RSmargininfo( w, total, current) - Tells you total/current columns in VS * * * Macintosh only Routines: * NI RSregnconv( *) - Convert region to rect coords * NI RSsetwind(w) - Set the port and vars to window w * NI RSsetattr(a) - Set font/text style to a * NI RSsetConst(w) * ML RSattach(w,wind) - Attach the RS (w) to window wind * ML RSdetach(w) - Ready window for go-away * ML RSselect(w,pt,shift) - Handle selection RS (w) point (pt) and (shift) if held down * ML RSzoom(window,code,shifted) - Zoom Box handling * ML RSsize( window, where) - Resize handling * IN RSgetwindow(w) - Get the WindowPtr for RS (w) * IN RSfindvwind(wind) - Find the (RS/VS) # of wind * IN RSfindscroll( control, n) - Find which VS the control is in and which control it is * RSupdate(wind) - Handle updates on WIND, return 0 if not an RS * RSactivate(w) - Handle activate events * RSdeactivate(w) - Handle deactivate events * RSGetTextSel(w,table) - Returns handle to text selection of window w, table->tabs * RSnewwindow( wDims, sb, wid, lines * name,wrap,fnum,fsiz, * showit, goaway) - Returns VS # of newly created text window - * wDims (dimension),sb(scrollback),wid(width 80/132), * lines (# of lines, 24 <> 66), * name(window), wrap(0/1),fnum,fsiz, showit(vis),goaway(0,1) * RSkillwindow( w) - Destroys, deallocates, kills window (w) * RSclick(window, eventRecord)- Handle clicks in window (returns false if not RS window) * RShide(w) - Hide RS (w) * RSshow(w) - Show RS (w) * RScprompt(w, FilterProc) - Prompt for colors...FilterProc is for Modal Dialog * RSsetcolor(w,n,r,g,b) - Set one of the 4 colors of RS (w) to R,G,B * RSgetcolor(w,n,r,g,b) - Get one of the 4 colors of RS (w) into R,G,B * RSmouseintext(w,myPoint) - Returns true if Mouse is in text part of current RS window * RSskip(w,on) - Activate/deactivate drawing in an RS * * IN - Informational * ML - Mid Level * NI - Necessary Internal * - Suggested calls * * Version Date Notes * ------- ------ --------------------------------------------------- * 0.01 861102 Initial coding -GBP * 0.25 861106 Added code from screen.c -GBP * 0.50 861113 First compiled edition -GBP * 2.1 871130 NCSA Telnet 2.1 -GBP * 2.2 880715 NCSA Telnet 2.2 -GBP * 2.6 7/92 put globals into struct, cursors into array, and cleaned up * some of the font typedefs Scott Bulmahn * 2.6b4 12/92 Cleaned up the code, and added double clicking -- Scott Bulmahn * */ #ifdef MPW #pragma segment RS #endif #define __ALLNU__ #include "DlogUtils.proto.h" #include "configure.proto.h" // For colorboxmodalproc and colorboxproc #include "maclook.proto.h" #include "network.proto.h" #include "menuseg.proto.h" #include "vskeys.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "vsintern.proto.h" #include "wind.h" #include "rsdefs.h" #include "parse.proto.h" // For SendNAWSinfo proto #include "wdefpatch.proto.h" /* 931112, ragge, NADA, KTH */ #include "drag.proto.h" #include "rsinterf.proto.h" #include "event.proto.h" //notify user proto #define NFDEF {0,0,0} #define NBDEF {65535,65535,65535} #define BFDEF {0,61183,11060} #define BBDEF {61183,2079,4938} #define UFDEF {1,0,0} #define UBDEF {0,0,0} extern WindRec *screens; #include "rsmac.proto.h" short MaxRS; RSdata *RSlocal, *RScurrent; Rect noConst, RScur; /* cursor rectangle */ RgnHandle RSuRgn; /* update region */ short RSw=-1, /* last window used */ RSa=0; /* last attrib used */ extern long RScolors[]; // initializes handling of terminal windows void RSinitall(short max) //max windows to allow { short i; MaxRS = max; RSlocal = (RSdata *) myNewPtr(MaxRS * sizeof(RSdata)); for (i = 0; i < MaxRS; RSlocal[i++].window = 0L) { RScurrent = RSlocal + i; RScurrent->id = 'RSDA'; RScurrent->cursor.top = 0; RScurrent->cursor.bottom = 0; RScurrent->cursor.left = 0; RScurrent->cursor.right = 0; } RSuRgn = NewRgn(); RScur.left = 0; RScur.top = 0; RScur.bottom = 0; RScur.right = 0; if (!TelInfo->haveColorQuickDraw) DisposeHandle((Handle)TelInfo->AnsiColors); } // RSinitall void RSsetConst ( short w ) /* sets "noConst" global to a zero-based rectangle equal in size to the specified terminal window. */ { noConst.left = 0; noConst.top = 0; noConst.right = RSlocal[w].width; noConst.bottom = RSlocal[w].height; } /* RSsetConst */ /****************************************************************************/ /* Given a window record number, do a SetPort() to the window associated with * that window record. */ short RSsetwind ( short w ) { if ((w < 0) || (w > MaxRS)) return(-3); if (RSw != w) /* if last window used is different */ { if (RSlocal[w].window == 0L) return(-4); RScurrent = RSlocal + w; RSw = w; RSa = -1; /* attributes will need setting */ SetPort(RScurrent->window); return(1); } SetPort(RScurrent->window); return(0); } /* RSsetwind */ void RSvalidateRect(short w) { ValidRect(&((RSlocal[w].window)->portRect)); } void RSbell ( short w ) /* gives an audible signal associated with the specified window. */ { RSsetwind(w); if (FrontWindow() != RScurrent->window) { /* beep and temporarily invert the window contents, so the user sees which window is beeping */ InvertRect(&RScurrent->window->portRect); SysBeep(8); InvertRect(&RScurrent->window->portRect); } else /* window is frontmost--just beep */ SysBeep(8); NotifyUser(); } /* RSbell */ void RScursoff ( short w ) /* hides the text cursor for the specified window. Assumes it is currently being shown. */ { if (RSlocal[w].skip || !RSlocal[w].cursorstate) /* BYU 2.4.11 */ return; RSsetwind(w); RScurrent->cursorstate = 0; /* BYU 2.4.11 */ InvertRect(&RScurrent->cursor); } /* RScursoff */ void RScurson ( short w, short x, short y ) /* displays the text cursor for the specified window, at the specified position. Assumes it isn't currently being shown. */ { if (RSlocal[w].skip || RSlocal[w].cursorstate) /* BYU 2.4.11 */ return; RSsetwind(w); RScurrent->cursor.left = x * RScurrent->fwidth; /* BYU 2.4.11 */ RScurrent->cursor.top = y * RScurrent->fheight; /* BYU 2.4.11 */ switch (gApplicationPrefs->CursorType) { /* BYU 2.4.11 */ case UNDERSCORECURSOR: /* BYU 2.4.11 */ RScurrent->cursor.top += RScurrent->fheight; /* BYU 2.4.11 */ RScurrent->cursor.right = RScurrent->cursor.left + RScurrent->fwidth; /* BYU 2.4.11 */ RScurrent->cursor.bottom = RScurrent->cursor.top + 1; /* BYU 2.4.11 */ break; case VERTICALCURSOR: /* BYU 2.4.11 */ RScurrent->cursor.left += 2; /* BYU 2.4.11 */ RScurrent->cursor.right = RScurrent->cursor.left + 1; /* BYU 2.4.11 */ RScurrent->cursor.bottom = RScurrent->cursor.top + RScurrent->fheight; /* BYU 2.4.11 */ break; case BLOCKCURSOR: /* BYU 2.4.11 */ default: /* BYU 2.4.11 */ RScurrent->cursor.right = RScurrent->cursor.left + RScurrent->fwidth; /* BYU 2.4.11 */ RScurrent->cursor.bottom = RScurrent->cursor.top + RScurrent->fheight; /* BYU 2.4.11 */ break; } if (!gApplicationPrefs->BlinkCursor) { /* BYU 2.4.11 */ RScurrent->cursorstate = 1; /* BYU 2.4.11 */ InvertRect(&RScurrent->cursor); /* BYU 2.4.11 */ } /* BYU 2.4.11 */ } /* RScurson */ void RSsetattr(short a) { short fg, bg, tempFontID; // RAB BetterTelnet 1.0fc4 static GrafPtr lastPort; if (RSa!=-1 && RSa==a && qd.thePort==lastPort) return; lastPort = qd.thePort; RSa = a; if (VSisgrph(a)) { GetFNum("\p%NCSA VT", &tempFontID); // RAB BetterTelnet 1.0fc4 TextFont(tempFontID); /* use "NCSA VT" (74) font for special graphics */ } else RSTextFont(RScurrent->fnum,RScurrent->fsiz,((a & bold) && RScurrent->allowBold)); /* BYU - use user-selected text font */ TextSize(RScurrent->fsiz); /* BYU - bold system fonts don't work (they overwrite the scroll bars), but NCSA's 9 point Monaco bold works okay. */ if (VSisbold(a) && RScurrent->realbold) TextFace(((a & outline) >> 1) + 1); else TextFace((a & outline) >> 1); /* BYU - do outline as underline setting */ if (VSisansifg(a)) { fg = 4 +((a>>8)&0x7); if (RScurrent->colorBold && VSisbold(a)) fg += 8; } else if (RScurrent->colorBold && VSisbold(a)) fg = gApplicationPrefs->defaultBoldColor + 4; else fg = 0; if (VSisansibg(a)) bg = 4+ ((a>>12)&0x7); else bg = 1; // set up text modes if (TelInfo->haveColorQuickDraw) { if (VSisrev(a) || ((a & bold) && RScurrent->bfstyle)) TextMode(notSrcCopy); else TextMode(srcCopy); } else { if (VSisrev(a) || ((a & bold) && RScurrent->bfstyle)) { BackPat(PATTERN(qd.black)); /* Reverses current attributes regard */ PenPat(PATTERN(qd.white)); /* less of the color, etc.... */ } else { BackPat(PATTERN(qd.white)); /* Reverses current attributes regard */ PenPat(PATTERN(qd.black)); /* less of the color, etc.... */ } } //set up colors if (TelInfo->haveColorQuickDraw) { if (VSisblnk(a)) { PmForeColor(2); //use colors for blink PmBackColor(3); } else { PmForeColor(fg); PmBackColor(bg); } } else { if (VSisblnk(a)) { ForeColor(RScolors[7]); //use colors for blink BackColor(RScolors[0]); } else { ForeColor(RScolors[0]); BackColor(RScolors[7]); } } } /* RSsetattr */ void RSTextFont(short myfnum, short myfsiz, short myface) /* BYU */ { /* BYU */ short tempFontID; // RAB BetterTelnet 1.0fc4 // RAB BetterTelnet 1.0fc4: For one thing, we use font *names* now. Also, we use NCSA VT Bold // when the user wants, not when it's Monaco 9. if (// (myfnum == monaco) && /* BYU - If Monaco, size 9, and bold, then */ // (myfsiz == 9) && /* BYU */ (myface & bold)) { /* BYU */ // GetFNum("\p%NCSA VT Bold", &tempFontID); // TextFont(tempFontID); /* BYU - use NCSA's Monaco. (75) */ TextFont(RScurrent->bfnum); // RAB BetterTelnet 1.0fc9 } else { /* BYU */ TextFont(myfnum); /* BYU */ } /* BYU */ } /* BYU */ #ifdef NO_UNIVERSAL #define LMGetHiliteMode() (* (unsigned char *) 0x0938) #define LMSetHiliteMode(HiliteModeValue) ((* (unsigned char *) 0x0938) = (HiliteModeValue)) #endif void DoHiliteMode(void) /* BYU LSC */ /* enables use of highlighting in place of simple color inversion for next QuickDraw operation. */ { LMSetHiliteMode(LMGetHiliteMode() & 0x7F); // char *p = (char *) 0x938; /* pointer to HiliteMode low-memory global */ // *p = *p & 0x7f; /* clear the HiliteBit */ } /* HiliteMode */ void RSinvText ( short w, Point curr, Point last, RectPtr constrain /* don't highlight anything outside this rectangle */ ) /* highlights the text from curr to last inclusive. */ { Rect temp, temp2; Point lb, ub; RSsetwind(w); /* normalize coordinates with respect to visible area of virtual screen */ curr.v -= RScurrent->topline; curr.h -= RScurrent->leftmarg; last.v -= RScurrent->topline; last.h -= RScurrent->leftmarg; if (curr.v == last.v) { /* highlighted text all on one line */ if (curr.h < last.h) /* get bounds the right way round */ { ub = curr; lb = last; } else { ub = last; lb = curr; } /* if */ MYSETRECT /* set up rectangle bounding area to be highlighted */ ( temp, (ub.h + 1) * RScurrent->fwidth, ub.v * RScurrent->fheight, (lb.h + 1) * RScurrent->fwidth, (lb.v + 1) * RScurrent->fheight ); SectRect(&temp, constrain, &temp2); /* clip to constraint rectangle */ DoHiliteMode(); /* BYU LSC */ InvertRect(&temp2); } else { /* highlighting across more than one line */ if (curr.v < last.v) ub = curr; else ub = last; if (curr.v > last.v) lb = curr; else lb = last; MYSETRECT /* bounds of first (possibly partial) line to be highlighted */ ( temp, (ub.h + 1) * RScurrent->fwidth, ub.v * RScurrent->fheight, RScurrent->width, (ub.v + 1) * RScurrent->fheight ); SectRect(&temp, constrain, &temp2); /* clip to constraint rectangle */ DoHiliteMode(); /* BYU LSC */ InvertRect(&temp2); MYSETRECT /* bounds of last (possibly partial) line to be highlighted */ ( temp, 0, lb.v * RScurrent->fheight, (lb.h + 1) * RScurrent->fwidth, (lb.v + 1) * RScurrent->fheight ); SectRect(&temp, constrain, &temp2); /* clip to constraint rectangle */ DoHiliteMode(); /* BYU LSC */ InvertRect(&temp2); if (lb.v - ub.v > 1) /* highlight extends across more than two lines */ { /* highlight complete in-between lines */ SetRect ( &temp, 0, (ub.v + 1) * RScurrent->fheight, RScurrent->width, lb.v * RScurrent->fheight ); SectRect(&temp, constrain, &temp2); /* clip to constraint rectangle */ DoHiliteMode(); /* BYU LSC */ InvertRect(&temp2); } /* if */ } /* if */ } /* RSinvText */ void RSdraw ( short w, /* window number */ short x, /* starting column */ short y, /* line on which to draw */ short a, /* text attributes */ short len, /* length of text to draw */ char *ptr /* pointer to text */ ) /* draws a piece of text (assumed to fit on a single line) in a window, using the specified attributes. If any part of the text falls within the current selection, it will be highlighted. */ { Rect rect; short ys; if (RSlocal[w].skip) return; RSsetwind(w); // RSsetattr(0); JMB 2.6.1d4 ys = y * RScurrent->fheight; MYSETRECT /* set up rectangle bounding text being drawn */ ( rect, x * RScurrent->fwidth, ys, (x + len) * RScurrent->fwidth, ys + RScurrent->fheight ); RSsetattr(a); if (x <= 0) /* BYU 2.4.12 - Without this, 1 pixel column of reverse */ rect.left = -3; /* BYU 2.4.12 - video text does not clear at left margin */ if (rect.bottom == RScurrent->rheight) rect.bottom += 1; //CCP take care of updating problems while scrolling EraseRect(&rect); if (x <= 0) /* BYU 2.4.12 - Okay, just putting it back the way it was */ rect.left = 0; /* BYU 2.4.12 */ MoveTo(x * RScurrent->fwidth, ys + RScurrent->fascent); DrawText(ptr, 0, len); if (RScurrent->selected) RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &rect); ValidRect(&rect); } /* RSdraw */ void RSdelcols ( short w, short n /* number of columns to scroll */ ) /* scrolls the entire visible display of a virtual screen the specified number of columns to the left, blanking out the newly-revealed area. */ { Rect rect; if (RSlocal[w].skip) return; RSsetwind(w); MYSETRECT /* bounds of entire text area, for scrolling */ ( rect, 0, 0, RScurrent->width, RScurrent->height ); ScrollRect(&rect, -n * RScurrent->fwidth, 0, RSuRgn); InvalRgn(RSuRgn); ValidRect(&rect); /* any necessary redrawing in newly-revealed area will be done by caller */ MYSETRECT /* bounds of newly-revealed area */ ( rect, RScurrent->width - (n * RScurrent->fwidth), 0, RScurrent->width, RScurrent->height ); if (RScurrent->selected) /* highlight any newly-revealed part of the current selection */ RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &rect); } /* RSdelcols */ void RSdelchars ( short w, /* affected window */ short x, /* column to delete from */ short y, /* line on which to do deletion */ short n /* number of characters to delete */ ) /* deletes the specified number of characters from the specified position to the right, moving the remainder of the line to the left. */ { Rect rect; if (RSlocal[w].skip) return; RSsetwind(w); RSsetattr(0); /* avoid funny pen modes */ MYSETRECT /* bounds of area from starting column to end of line */ ( rect, x * RScurrent->fwidth, y * RScurrent->fheight, RScurrent->width, (y + 1) * RScurrent->fheight ); if ((x + n) * RScurrent->fwidth > RScurrent->width) /* deleting to end of line */ EraseRect(&rect); else { /* scroll remainder of line to the left */ ScrollRect(&rect, - RScurrent->fwidth * n, 0, RSuRgn); InvalRgn(RSuRgn); ValidRect(&rect); /* leave newly-revealed area blank */ if (RScurrent->selected) { /* highlight any part of selection which lies in newly-blanked area */ HLock((Handle) RSuRgn); RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &((*RSuRgn)->rgnBBox)); HUnlock((Handle) RSuRgn); } /* if */ } /* if */ } /* RSdelchars */ void RSdellines ( short w, /* affected window */ short t, /* top line of affected region */ short b, /* bottom line of affected region */ short n, /* number of lines to delete */ short scrolled /* -ve => cancel current selection, if any; +ve => selection has moved up one line; 0 => don't touch selection */ ) /* deletes lines at the top of the specified region of a window, inserting new blank lines at the bottom, and scrolling up the stuff in between. */ { Rect rect; short RSfheightTimesn, RSfheightTimesbplus1; if (RSlocal[w].skip) return; RSsetwind(w); RSsetConst(w); RSsetattr(0); /* avoid funny pen modes */ if (scrolled) { if (RScurrent->selected && scrolled < 0) { /* unhighlight and cancel current selection */ RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &noConst); RScurrent->selected = 0; } else { RScurrent->last.v -= 1; /* Subtract one from each of the */ RScurrent->anchor.v -= 1; /* vertical Selection components */ } /* if */ } /* if */ rect.left = -1; /* BYU 2.4.12 - necessary */ rect.right = RScurrent->width; rect.top = t * RScurrent->fheight; RSfheightTimesbplus1 = (b + 1) * RScurrent->fheight; rect.bottom = RSfheightTimesbplus1; /* adjust the update region to track the scrolled window contents */ RSfheightTimesn = RScurrent->fheight * n; OffsetRgn(((WindowPeek) RScurrent->window)->updateRgn, 0, -RSfheightTimesn); ScrollRect(&rect, 0, -RSfheightTimesn , RSuRgn); RSsetattr(VSIw->attrib); /* restore mode for text drawing */ InvalRgn(RSuRgn); /* validate the area containing the newly-inserted blank lines. */ /* any necessary redrawing in newly-revealed area will be done by caller */ MYSETRECT ( rect, 0, (b - n + 1) * RScurrent->fheight - 1, RScurrent->width, RSfheightTimesbplus1 + 1 ); ValidRect(&rect); } /* RSdellines */ void RSerase ( short w, /* affected window */ short x1, /* left column */ short y1, /* top line */ short x2, /* right column */ short y2 /* bottom line */ ) /* erases a rectangular portion of the screen display, preserving the selection highlight. */ { Rect rect; if (RSlocal[w].skip) return; RSsetwind(w); RSsetattr(0); /* avoid funny pen modes */ SetRect ( &rect, x1 * RScurrent->fwidth , y1 * RScurrent->fheight, (x2 + 1) * RScurrent->fwidth - 1, (y2 + 1) * RScurrent->fheight + 1 ); if (rect.left <= 0) /* little buffer strip on left */ rect.left = CHO; if (rect.right >= RScurrent->width - 1) rect.right = RScurrent->rwidth - 2; /* clear to edge of window, including edge strip */ if (rect.bottom >= RScurrent->height - 2) rect.bottom = RScurrent->rheight + 1; /* clear to bottom edge also */ EraseRect(&rect); if (RScurrent->selected) /* highlight any part of the selection within the cleared area */ RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &rect); } /* RSerase */ void RSinslines ( short w, /* affected window */ short t, /* where to insert blank lines */ short b, /* bottom of area to scroll */ short n, /* number of lines to insert */ short scrolled /* -ve <=> cancel current selection, if any */ ) /* inserts blank lines at the top of the given area of the display, scrolling the rest of it down. */ { Rect rect; if (RSlocal[w].skip) return; RSsetwind(w); RSsetConst(w); RSsetattr(0); /* avoid funny pen modes */ if (RScurrent->selected && (scrolled < 0)) { /* unhighlight and cancel selection */ RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &noConst); RScurrent->selected = 0; } /* if */ rect.left = -1; /* BYU 2.4.12 - necessary */ rect.right = RScurrent->width; rect.top = t * RScurrent->fheight; rect.bottom = (b + 1) * RScurrent->fheight; /* adjust the update region to track the scrolled window contents */ OffsetRgn(((WindowPeek) RScurrent->window)->updateRgn, 0, RScurrent->fheight * n); ScrollRect(&rect, 0, RScurrent->fheight * n, RSuRgn); InvalRgn(RSuRgn); /* newly-inserted area is already blank -- validate it to avoid redrawing. */ /* any necessary redrawing will be done by caller */ SetRect(&rect, 0, t * RScurrent->fheight - 1, RScurrent->width, (t + n) * RScurrent->fheight + 1); ValidRect(&rect); } /* RSinslines */ void RSinscols ( short w, short n /* number of columns to insert */ ) /* inserts blank columns at the left side of the text display in the specified window, scrolling its current contents to the right. Maintains the selection highlight, but doesn't move the selection. Doesn't even unhighlight text which moves out of the selection area. */ { Rect rect; if (RSlocal[w].skip) return; RSsetwind(w); SetRect /* bounds of entire text area */ ( &rect, 0, 0, RScurrent->width, RScurrent->height ); ScrollRect(&rect, n * RScurrent->fwidth, 0, RSuRgn); InvalRgn(RSuRgn); ValidRect(&rect); /* any necessary redrawing in newly-revealed area will be done by caller */ SetRect /* bounds of newly-inserted blank area */ ( &rect, 0, 0, (n + 1) * RScurrent->fwidth - 1, RScurrent->height ); if (RScurrent->selected) /* highlight any part of the selection in the newly-blanked area */ RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &rect); } /* RSinscols */ void RSinsstring ( short w, /* affected window */ short x, /* starting column at which to insert */ short y, /* line on which to insert */ short a, /* attributes for inserted text */ short len, /* length of inserted text */ char *ptr /* pointer to inserted text */ ) /* inserts a string of characters at the specified position, scrolling the rest of the line to the right. Highlights any part of the newly- inserted text lying within the current selection. */ { Rect rect; if (RSlocal[w].skip) return; RSsetwind(w); SetRect /* bounds of part of line from specified position to end of line */ ( &rect, x * RScurrent->fwidth, y * RScurrent->fheight, RScurrent->width, (y + 1) * RScurrent->fheight ); ScrollRect(&rect, len * RScurrent->fwidth, 0, RSuRgn); /* scroll remainder of line to the right */ if (RSa != a) RSsetattr(a); InvalRgn(RSuRgn); ValidRect(&rect); /* any necessary redrawing in newly-revealed area will be done by caller */ SetRect /* bounds area to contain inserted string */ ( &rect, x * RScurrent->fwidth, y * RScurrent->fheight, (x + len) * RScurrent->fwidth, (y + 1) * RScurrent->fheight ); EraseRect(&rect); /* erase area to appropriate background */ MoveTo ( x * RScurrent->fwidth, y * RScurrent->fheight + RScurrent->fascent ); DrawText(ptr, 0, len); if (RScurrent->selected) /* highlight any part of selection covering the newly-inserted text */ RSinvText(w, *(Point *) &RScurrent->anchor, *(Point *) &RScurrent->last, &rect); } /* RSinsstring */ void RSmargininfo ( short w, short total, /* number of invisible character positions (screen width less visible width) */ short current /* leftmost visible character position */ ) /* updates the horizontal scroll bar and associated variables to reflect the current view of the virtual screen within the specified window. */ { RSlocal[w].leftmarg = current; /* Adjust local vars */ if (RSlocal[w].lcurrent != current) SetCtlValue(RSlocal[w].left, (RSlocal[w].lcurrent = current)); if (RSlocal[w].lmax != total) SetCtlMax(RSlocal[w].left, (RSlocal[w].lmax = total)); } /* RSmargininfo */ void RSbufinfo ( short w, /* affected window */ short total, /* number of lines of scrollback */ short current, /* current topmost visible line */ short bottom /* current bottommost visible line */ ) /* readjusts the vertical scroll bar and associated variables to reflect the current view of the virtual screen within the specified window. */ { RSdata *RSthis; short newmax; RSthis = RSlocal + w; newmax = (VSgetlines(w) - 1) - (bottom - current); RSthis->topline = current; /* Adjust local vars */ if (RSthis->min != -total) { if (RSthis->min == 0) //need to activate scrollbars SetCtlMin(RSthis->scroll, (RSthis->min = -total)); (**RSthis->scroll).contrlMin = (RSthis->min = -total); // JMB 2.6.1d4 } /* if */ if (RSthis->current != current) SetCtlValue(RSthis->scroll, (RSthis->current = current)); if (RSthis->max != newmax) (**RSthis->scroll).contrlMax = (RSthis->max = newmax); // JMB 2.6.1d4 } /* RSbufinfo */ short RSfindscroll /* Find screen index by control*/ ( ControlHandle control, short *n ) /* finds the window to which the given scroll bar belongs. Returns the window number in *n if found, and a function result of 1 for a vertical scroll bar, 2 for a horizontal one, or -1 if the window wasn't found. */ { /* look for a vertical scroll bar */ *n = 0; while ((*n < MaxRS) && (control != RSlocal[*n].scroll)) (*n)++; if (*n < MaxRS) return (1); /* found it */ /* look for a horizontal scroll bar */ *n = 0; while ((*n < MaxRS) && (control != RSlocal[*n].left)) (*n)++; if (*n < MaxRS) return (2); /* found it */ return(-1); /* not found */ } /* RSfindscroll */ void RSregnconv ( RgnHandle regn, short *x1, /* left (output) */ short *y1, /* top (output) */ short *x2, /* right (output) */ short *y2, /* bottom (output) */ short fh, /* font character height */ short fw /* font character width */ ) /* converts the bounding box of the specified QuickDraw region into units of character positions (using the specified character height and width) and returns the results in *x1, *y1, *x2 and *y2. */ { HLock((Handle) regn); *y1 = ((*regn)->rgnBBox.top) / fh; *y2 = (((*regn)->rgnBBox.bottom) + fh - 1) / fh; *x1 = ((*regn)->rgnBBox.left) / fw; *x2 = (((*regn)->rgnBBox.right) + fw - 1) / fw; HUnlock((Handle) regn); if (*x1 < 0) *x1 = 0; if (*y1 < 0) *y1 = 0; if (*x2 < 0) *x2 = 0; if (*y2 < 0) *y2 = 0; } /* RSregnconv */ #define Fwidthhalf FWidth/2 Point normalize(Point in, short w, Boolean autoScroll) /* converts in from a pixel position in local coordinates to a character cell position within the virtual screen corresponding to the specified window. Constrains the position to lie within the currently-visible region of the screen, autoscrolling the screen if necessary (and if autoScroll = TRUE). */ { if (in.v <0) { in.v = 0; if (autoScroll) VSscrolback(w, 1); } /* if */ if (in.v > RSlocal[w].height) { in.v = RSlocal[w].height; if (autoScroll) VSscrolforward(w, 1); } /* if */ in.v = in.v / FHeight; if (in.h < 0) { in.h = -1; if (autoScroll) VSscrolleft(w, 1); } /* if */ if (in.h > RSlocal[w].width) { in.h = RSlocal[w].width; if (autoScroll) VSscrolright(w, 1); } /* if */ /* in.h = (in.h + Fwidthhalf) / FWidth - 1; */ /* the MPW C 3.0 compiler has a bug in its register allocation */ /* which keeps the above line from working. So, replace it with this: */ in.h = in.h + Fwidthhalf; in.h = in.h / FWidth - 1; /* note the bug has been fixed in the 3.1 compiler. */ /* convert to virtual screen coordinates */ in.v += RSlocal[w].topline; in.h += RSlocal[w].leftmarg; return(in); } /* normalize */ void RSsortAnchors(short w) { Point temp; if (RSlocal[w].anchor.v > RSlocal[w].last.v) { temp = RSlocal[w].anchor; RSlocal[w].anchor = RSlocal[w].last; RSlocal[w].last = temp; } if ((RSlocal[w].anchor.v == RSlocal[w].last.v) && (RSlocal[w].anchor.h > RSlocal[w].last.h)) { temp = RSlocal[w].anchor; RSlocal[w].anchor = RSlocal[w].last; RSlocal[w].last = temp; } } void RSsetsize( short w, short v, short h) /* saves the new size settings for a window, and repositions the scroll bars accordingly. */ { RSlocal[w].height = ((v - 16 + CVO) / FHeight) * FHeight; RSlocal[w].width = ((h - 16 + CHO) / FWidth) * FWidth; RSlocal[w].rheight = v - 16; RSlocal[w].rwidth = h - 16; /* * Get rid of the scroll bars which were in the old size. * Hiding them causes the region to be updated later. */ if (RSlocal[w].scroll != NULL ) HideControl(RSlocal[w].scroll); if (RSlocal[w].left != NULL ) HideControl(RSlocal[w].left); DrawGrowIcon(RSlocal[w].window); /* Draw in the necessary bugger */ /* move the scroll bars to their new positions and sizes, and redisplay them */ SetCtlValue(RSlocal[w].scroll, RSlocal[w].current); //because we dont always have this if (RSlocal[w].scroll != NULL ) { SizeControl(RSlocal[w].scroll, 16, (v - 13)); MoveControl(RSlocal[w].scroll, (h - 15) + CHO, -1 + CVO); ShowControl(RSlocal[w].scroll); } if (RSlocal[w].left != NULL ) { SizeControl(RSlocal[w].left, (h - 13), 16); MoveControl(RSlocal[w].left, -1 + CHO, (v - 15) + CVO); ShowControl(RSlocal[w].left); } SetRect(&RSlocal[w].textrect, 0, 0, RSlocal[w].rwidth, RSlocal[w].rheight); } /* RSsetsize */ /*--------------------------------------------------------------------------*/ /* NCSA: SB - RSbackground */ /* This procedure allows Telnet to switch from dark background to light */ /* background. Save the current state into the RSdata struct, so that */ /* we know our background state next time we want to do anything. */ /* Make sure the screen contents (and palette) is updated NOW. */ /*--------------------------------------------------------------------------*/ void RSbackground(short w, short value) { RGBColor temp1,temp2; RSsetwind(w); if ((value && !RSlocal[w].flipped) || (!value && RSlocal[w].flipped)) { RSlocal[w].flipped = !RSlocal[w].flipped; if (TelInfo->haveColorQuickDraw) //flip the background and foreground color positions { GetEntryColor(RSlocal[w].pal,0,&temp1); GetEntryColor(RSlocal[w].pal,1,&temp2); SetEntryColor(RSlocal[w].pal,0,&temp2); SetEntryColor(RSlocal[w].pal,1,&temp1); } SetPort(RSlocal[w].window); InvalRect(&RSlocal[w].window->portRect); } } void RScheckmaxwind(Rect *origRect,short origW, short origH, short *endW, short *endH) { Rect *grayRect; *endW = origW; *endH = origH; grayRect = &((*TelInfo->greyRegion)->rgnBBox); if (origW > (grayRect->right - origRect->left)) *endW = grayRect->right - origRect->left; if (origH > (grayRect->bottom - origRect->top -15 )) *endH = grayRect->bottom - origRect->top; } \ No newline at end of file diff --git a/source/Screens/rsmac.proto.h b/source/Screens/rsmac.proto.h new file mode 100755 index 0000000..744fd82 --- /dev/null +++ b/source/Screens/rsmac.proto.h @@ -0,0 +1 @@ + /* rsmac.c */ void RSinitall(short max); void RSsetConst(short w); short RSsetwind(short w); void RSbell(short w); void RScursoff(short w); void RScurson(short w, short x, short y); void RSsetattr(short a); void DoHiliteMode(void); void RSinvText(short w, Point curr, Point last, RectPtr constrain); void RSdraw(short w, short x, short y, short a, short len, char *ptr); void RSdelcols(short w, short n); void RSdelchars(short w, short x, short y, short n); void RSdellines(short w, short t, short b, short n, short scrolled); void RSerase(short w, short x1, short y1, short x2, short y2); void RSinslines(short w, short t, short b, short n, short scrolled); void RSinscols(short w, short n); void RSinsstring(short w, short x, short y, short a, short len, char *ptr); void RSmargininfo(short w, short total, short current); void RSbufinfo(short w, short total, short current, short bottom); void RSattach(short w, GrafPtr wind); void RSdetach(short w); short RSfindscroll(ControlHandle control, short *n); void RSregnconv(RgnHandle regn, short *x1, short *y1, short *x2, short *y2, short fh, short fw); short RSupdprint(WindowPeek wind); Point normalize(Point in_long, short w, Boolean autoScroll); void RSsortAnchors(short w); void RSsetsize(short w, short v, short h); void RSdrawsep(short w, short y1, short draw); void RSbackground(short w, short value); void RScheckmaxwind(Rect *origRect, short origW, short origH, short *endW, short *endH); void RSTextFont(short myfnum, short myfsiz, short myface); Boolean SelectURLAroundPoint(Point current); void RSvalidateRect(short w); \ No newline at end of file diff --git a/source/Screens/vsdata.h b/source/Screens/vsdata.h new file mode 100755 index 0000000..3c57d11 --- /dev/null +++ b/source/Screens/vsdata.h @@ -0,0 +1 @@ +/* * Virtual Screen Kernel Data/Structure Definitions * (vsdata.h) * * National Center for Supercomputing Applications * by Gaige B. Paulsen * * This file contains the control and interface calls for the NCSA * Virtual Screen Kernel. * * Version Date Notes * ------- ------ --------------------------------------------------- * 0.01 861102 Initial coding -GBP * 2.1 871130 NCSA Telnet 2.1 -GBP * 2.2 880715 NCSA Telnet 2.2 -GBP * */ #ifndef __VSDATA__ #define __VSDATA__ #define MAXWID 132 /* The absolute maximum number of chars/line */ typedef struct VSline { struct VSline /* doubly-linked list of lines */ *next, /* Pointer to next line */ *prev; /* Pointer to previous line */ char // Text for the line -- may be part of a block *text; /* of memory containing more than one line */ unsigned short *attr; /* 16 bit attribute; 8 for normal, 8 for ansi color */ short /* flag for memory allocation coordination */ mem; /* nonzero for first line in memory block */ } VSline,*VSlinePtr,**VSlineArray; // RAB BetterTelnet 1.2.1 - added this again for the old scrollback code typedef struct VSattrline //CCP 2.7 ANSI needs shorts { struct VSattrline /* doubly-linked list of lines */ *next, /* Pointer to next line */ *prev; /* Pointer to previous line */ unsigned short // macblue, now use 16 bit attribute; 8 for normal, 8 for ansi color *text; /* of memory containing more than one line */ char *dummy; // keep the pointer lists the same length - RAB BetterTelnet 1.2.1 short /* flag for memory allocation coordination */ mem; /* nonzero for first line in memory block */ } VSattrline, *VSattrlinePtr, **VSattrlineArray; #define maxparms 16 struct VSscrn { OSType id; // VSCR VSlinePtr scrntop, /* topmost line of the current screen (= linest[0]) */ buftop, /* top (i e oldest line) of scrollback buffer */ vistop; /* topmost line within visible region (may be in screen or scrollback area) */ VSlineArray linest; /* pointer to array of screen text lines */ VSattrlineArray attrst; // RAB BetterTelnet 1.2.1 - added this again, too short lines, /* How many lines are in the screen arrays */ maxlines, /* maximum number of lines to save off top */ numlines, /* number of lines currently saved off top */ allwidth, /* allocated width of screen lines */ maxwidth, /* current screen width setting (<= allwidth) */ savelines, /* save lines off top? 0=no */ forcesave, /* NCSA 2.5: always force lines to be saved off top */ possibleForce, //we have receive a "move to 0,0"; if next is EEOl, forcesave ESscroll, /* Scroll screen when ES received */ attrib, /* current character writing attributes */ x,y, /* current cursor positon */ Px,Py,Pattrib, /* saved cursor position and writing attributes */ DECAWM, /* Auto Wrap Mode 0=off */ DECCKM, /* Cursor Key Mode */ DECPAM, /* keyPad Application Mode */ DECORG, /* origin mode */ DECCM, /* Bri 970610: cursor mode (1=visible, 0=invisible) */ G0,G1, /* Character set identifiers */ charset, /* Character set mode */ IRM, /* Insert/Replace Mode */ escflg, /* Current Escape level */ top, bottom, /* Vertical bounds of scrolling region */ Rtop,Rbottom, /* Vertical bounds of visible region */ Rleft,Rright, /* Horizontal bounds of visible region */ parmptr, /* LU - index of current parm */ prredirect, /* LU - printer redirection or not */ qprint, // RAB BetterTelnet 1.0fc3: queue print requests printqueued, // RAB BetterTelnet 1.0fc3: print queue in progress ignoreBeeps, // RAB BetterTelnet 1.0fc7: ignore beeps oldScrollback; // RAB BetterTelnet 1.2.1 - use old scrollback code // (no attribute saving) long prbuf; /* LU - last four chars */ char prbuf2; // RAB BetterTelnet 1.2: and another char short refNum; /* LU - temporary file for printer redirection */ char fname[40]; /* LU - file name for temporary file */ short parms[maxparms]; /* Ansi Parameters */ char *tabs; /* pointer to array for tab settings */ /* contains 'x' at each tab position, blanks elsewhere */ }; typedef struct VSscrn VSscrn; struct VSscrndata { VSscrn *loc; /* Location of the Screen record for this scrn */ short captureRN, /* capture file's RefNum */ /* BYU 2.4.18 */ stat; /* status of this screen (0=Uninitialized, */ /* BYU 2.4.18 */ /* 1=In Use */ /* BYU 2.4.18 */ /* 2=Initialized, but not IU */ /* BYU 2.4.18 */ }; typedef struct VSscrndata VSscrndata; #ifdef VSMASTER VSscrn *VSIw; short VSIwn; #else extern VSscrn *VSIw; extern short VSIwn; #endif #define VSPBOTTOM (VSIw->lines) #endif // __VSDATA__ \ No newline at end of file diff --git a/source/Screens/vsinit.h b/source/Screens/vsinit.h new file mode 100755 index 0000000..a78cf9b --- /dev/null +++ b/source/Screens/vsinit.h @@ -0,0 +1 @@ +/* %W% (NCSA) %G% One define with the # of lines to allocate by default */ #define VSDEFLINES 48 \ No newline at end of file diff --git a/source/Screens/vsinterf.c b/source/Screens/vsinterf.c new file mode 100755 index 0000000..48a1cd4 --- /dev/null +++ b/source/Screens/vsinterf.c @@ -0,0 +1 @@ +/* * * Virtual Screen Kernel Interface * (vsinterf.c) * * by Gaige B. Paulsen * * This file contains the control and interface calls for the NCSA * Virtual Screen Kernal. * * VSinit(maxwidth) - Initialize the VSK * VSnewscreen(maxlines,scrnsave) - Initialize a new screen. * VSdetach(w) - Detach screen w * VSredraw(w,x1,y1,x2,y2) - redraw region for window w * VSwrite(w,ptr,len) - write text @ptr, length len * VSclear(w) - clear w's real screen * VSkbsend(w,k,echo) - send keycode k's rep. out window w (w/echo if req.) * VSclearall(w) - clear w's real and saved screen * VSreset(w) - reset w's emulator (as per TERM) * VSgetline(w,y) - get a ptr to w's line y * VSsetrgn(w,x1,y1,x2,y2) - set local display region * VSscrolback(w,n) - scrolls window w back n lines * VSscrolforward(w,n) - scrolls window w forward n lines * VSscrolleft(w,n) - scrolls window w left n columns * VSscrolright(w,n) - scrolls window w right n columns * VSscrolcontrol(w,scrlon,offtop) - sets scroll vars for w * VSgetrgn(w,&x1,&y1,&x2,&y2) - returns set region * VSsnapshot(w) - takes a snapshot of w * VSgetlines(w) - Returns current # of lines * VSsetlines(w, lines) - Sets the current # of lines to lines * * Version Date Notes * ------- ------ --------------------------------------------------- * 0.01 861102 Initial coding -GBP * 0.10 861113 Added some actual program to this file -GBP * 0.15 861114 Initiated Kludge Operation-GBP * 0.50 8611VSPBOTTOM Parameters added to VSnewscreen -GBP * 0.90 870203 Added the kbsend routine -GBP * 2.1 871130 NCSA Telnet 2.1 -GBP * 2.2 880715 NCSA Telnet 2.2 -GBP * */ #ifdef MPW #pragma segment VS #endif #define VSMASTER #include "rsinterf.proto.h" #include "rsmac.proto.h" #include "vsem.proto.h" #include "vsdata.h" #include "vskeys.h" #include "vsinit.h" #include "vsintern.proto.h" #include "Wind.h" #include "DlogUtils.proto.h" #include "maclook.proto.h" #include "errors.proto.h" #define DEBUGMAC #include "vsinterf.proto.h" extern TelInfoRec *TelInfo; extern WindRec *screens; extern long TempItemsDirID; extern short TempItemsVRefNum; short /* Internal variables for use in managing windows */ VSmax = 0, /* max nr screens allowed */ VSinuse = 0; /* nr screens actually in existence */ VSscrndata *VSscreens; short VSinit ( short max /* max nr screens to allow */ ) /* initializes virtual screen and window handling. */ { short i; RSinitall(max); VSmax = max; VSIwn = 0; if ((VSscreens = (VSscrndata *) myNewPtr(max * sizeof(VSscrndata))) == 0L) return(-2); for (i = 0; i < max; i++) { VSscreens[i].loc = 0L; VSscreens[i].stat = 0; } /* for */ return(0); } /* VSinit */ short VSiscapturing(short w) { /* BYU 2.4.18 */ return(VSscreens[w].captureRN); /* BYU 2.4.18 */ } /* BYU 2.4.18 */ Boolean VSopencapture(short scrn_num, short w) { UNUSED_ARG(scrn_num) static short captNumber = 1; short VRefNum; long DirID; Str255 filename, tempString; Str32 numstring; Point where = {100,100}; SFReply sfr; long junk = 0; OSErr err; NumToString(captNumber++, numstring); GetIndString(filename, MISC_STRINGS, CAPTFILENAME); filename[++(filename[0])] = ' '; pstrcat(filename, numstring); GetIndString(tempString,MISC_STRINGS,SAVE_CAPTURED_TEXT_STRING); SFPutFile(where,tempString, filename, NULL, &sfr); if (sfr.good) { (void) GetWDInfo(sfr.vRefNum, &VRefNum, &DirID, &junk); err = HCreate(VRefNum, DirID, sfr.fName, gApplicationPrefs->CaptureFileCreator, 'TEXT'); if (err == dupFNErr) { HDelete(VRefNum, DirID, sfr.fName); err = HCreate(VRefNum, DirID, sfr.fName, gApplicationPrefs->CaptureFileCreator, 'TEXT'); } if (err != noErr) OperationFailedAlert(CANT_CREATE_FILE, 500, err); else { err = HOpenDF(VRefNum, DirID, sfr.fName, fsRdWrPerm, &VSscreens[w].captureRN); if (err != noErr) OperationFailedAlert(CANT_OPEN_FILE, 501, err); else { SetEOF(VSscreens[w].captureRN, (long) 0); return(TRUE); } } } return(FALSE); } void VSclosecapture(short w) { /* BYU 2.4.18 */ FSClose(VSscreens[w].captureRN); /* BYU 2.4.18 */ VSscreens[w].captureRN = 0; /* BYU 2.4.18 */ } /* BYU 2.4.18 */ void VScapture(unsigned char *ptr, short len) { /* BYU 2.4.18 */ long ln = len; /* BYU 2.4.18 */ if (VSscreens[VSIwn].captureRN) { /* BYU 2.4.18 */ unsigned char captbuf[512]; /* BYU 2.4.18 */ unsigned char *ptr2,*ptr3; /* BYU 2.4.18 */ ptr2 = ptr; /* BYU 2.4.18 */ ptr3 = &captbuf[0]; /* BYU 2.4.18 */ for (len = 0; len < ln; len++) { /* BYU 2.4.18 */ if (*ptr2 >= 32 || /* BYU 2.4.18 */ *ptr2 == 13 || /* BYU 2.4.18 */ *ptr2 == 9) /* BYU 2.4.18 */ *(ptr3++) = *(ptr2++); /* BYU 2.4.18 */ else { /* BYU 2.4.18 */ ptr2++; /* BYU 2.4.18 */ ln--; /* BYU 2.4.18 */ } /* BYU 2.4.18 */ } /* BYU 2.4.18 */ if (ln > 0) { /* BYU 2.4.18 */ if (FSWrite(VSscreens[VSIwn].captureRN, &ln, captbuf)) { /* BYU 2.4.18 */ FSClose(VSscreens[VSIwn].captureRN); /* BYU 2.4.18 */ VSscreens[VSIwn].captureRN = 0; /* BYU 2.4.18 */ } /* BYU 2.4.18 */ } /* BYU 2.4.18 */ } /* BYU 2.4.18 */ } /* BYU 2.4.18 */ short VSisprinting(short w) { if ((VSscreens[w].loc)->qprint) // RAB BetterTelnet 1.0fc4 return ((VSscreens[w].loc)->printqueued); // RAB BetterTelnet 1.0fc4 return ((VSscreens[w].loc)->prredirect); } void ClosePrintingFile(short w) { OSErr sts; char tmp[80]; putln("Attempting to remove print file"); if ((sts=FSClose ((VSscreens[w].loc)->refNum)) != noErr) { SysBeep(1); sprintf(tmp,"FSClose: ERROR %d",sts); putln(tmp); } if ((sts=HDelete(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname)) != noErr) { SysBeep(1); sprintf(tmp,"HDelete: ERROR %d",sts); putln(tmp); } } short VSvalids ( short w ) /* validates a virtual screen number and sets it as the current screen for subsequent operations if success. Returns 0 iff success. */ { if (VSinuse == 0) return(-5); /* -5=no ports in use */ if (VSIwn == w) return(0); /* Currently set to that window */ if ((w > VSmax) || (w < 0)) return(-6); /* blown out the top of the stuff */ VSIwn = w; if (VSscreens[w].stat != 1) return(-3);/* not currently active */ VSIw = VSscreens[w].loc; if (VSIw == 0L) return(-3); /* no space allocated */ return(0); } /* VSvalids */ VSscrn *VSwhereis(short i) /* screen number */ /* returns a pointer to the structure for the specified screen. */ { VSvalids(i); return(VSIw); } /* VSwhereis */ void VSIclrbuf ( void ) /* clears out the text and attribute buffers for the current screen. All text characters are set to blanks, and all attribute bytes are set to zero. Doesn't update the display. */ { register short j, i; register char *tx; register unsigned short *ta; for (i = 0; i <= VSIw->lines; i++) { if (VSIw->oldScrollback) ta = &VSIw->attrst[i]->text[0]; else ta = &VSIw->linest[i]->attr[0]; tx = &VSIw->linest[i]->text[0]; for (j = 0; j <= VSIw->allwidth; j++) { *ta++ = 0; *tx++ = ' '; } /* for */ } /* for */ } /* VSIclrbuf */ short VSnewscreen ( short maxlines, /* max lines to save in scrollback buffer */ short screensave, /* whether to have a scrollback buffer */ short numLines, //numLines initially on screen (CCP 2.7) short maxwid, /* number of columns on screen */ short forcesave, /* NCSA 2.5: force lines to be saved */ short ignoreBeeps, short oldScrollback ) /* creates a new virtual screen, and returns its number. */ { if (maxlines < VSDEFLINES) maxlines = VSDEFLINES; if (VSinuse >= VSmax) /* too many screens in existence */ return(-1); VSIwn = 0; while ((VSIwn < VSmax) && (VSscreens[VSIwn].stat == 1)) VSIwn++; if (VSIwn >= VSmax) /* shouldn't occur? */ return(-1); numLines -= 1; //correct for internal use /* * Fill initial scrollback buffer and screen storage space. * * Memory allocation rules: * line->mem == 0 if not a memory allocation, line->mem == 1 if it is the first * VSline in a block (indeterminate size, may be size == 1) * * attributes array is ALWAYS allocated as one block. Internally represented and * manipulated as a linked list of lines, but only one of the lines will have * line->mem == 1. This list is always supposed to be circular (it is never * extended, as attributes are never scrolled back). * * scrollback and screen line buffer space is allocated in large blocks. Each * block will have line->mem == 1 if the pointer to that VSline is "free"able. * This list will either be circular (which means it has reached its full size), * or it will have a NULL next field at the end. During scrolling, the end may * be augmented until VSIw->numlines > VSIw->maxlines or we run out of memory. * Typically allocate memory 100 lines at a time in two blocks, one is the VSline * list, the other is the mem for the character storage. * */ /* All memory allocation for this function is done at once, to help damage control in low memory situations */ if ((VSscreens[VSIwn].loc = VSIw = (VSscrn *) myNewPtr(sizeof(VSscrn))) == 0L) return(-2); VSIw->oldScrollback = oldScrollback; VSIw->lines = numLines; //VSIw->lines = 23; CCP 2.7 set this from the start VSIw->linest = VSInewlinearray(VSIw->lines + 1); if (VSIw->linest == NULL) { DisposePtr((Ptr)VSIw); VSscreens[VSIwn].loc = VSIw = NULL; return (-2); } if (VSIw->oldScrollback) { VSIw->attrst = (VSattrlinePtr *) VSInewlinearray(VSIw->lines + 1); if (VSIw->attrst == NULL) { DisposePtr((Ptr)VSIw->linest); DisposePtr((Ptr)VSIw); VSscreens[VSIwn].loc = VSIw = NULL; return (-2); } } VSIw->tabs = (char *) myNewPtr(132); /* NCSA: SB - allow 132 column mode */ if (VSIw->tabs == NULL) /* CCP: Hey? Why not check if we got it?! */ { DisposePtr((Ptr)VSIw->linest); DisposePtr((Ptr)VSIw); VSscreens[VSIwn].loc = VSIw = NULL; return (-2); } VSIw->allwidth = 131; /* NCSA: SB - always allocate max lines */ if (!VSIw->oldScrollback) { if (screensave) VSIw->buftop = VSInewlines(VSIw->lines + 1 + VSDEFLINES); /* screen lines plus some initial preallocated scrollback space */ else VSIw->buftop = VSInewlines(VSIw->lines + 1); /* screen lines, no scrollback */ if (VSIw->buftop == NULL) { DisposePtr((Ptr)VSIw->tabs); DisposePtr((Ptr)VSIw->linest); DisposePtr((Ptr)VSIw); VSscreens[VSIwn].loc = VSIw = NULL; return(-2); } VSIw->linest[0] = VSIw->buftop; } else { if (screensave) VSIw->buftop = VSOnewlines(VSIw->lines + 1 + VSDEFLINES,1); /* screen lines plus some initial preallocated scrollback space */ else VSIw->buftop = VSOnewlines(VSIw->lines + 1,1); /* screen lines, no scrollback */ if (VSIw->buftop == NULL) { DisposePtr((Ptr)VSIw->tabs); DisposePtr((Ptr)VSIw->attrst); DisposePtr((Ptr)VSIw->linest); DisposePtr((Ptr)VSIw); VSscreens[VSIwn].loc = VSIw = NULL; return(-2); } VSIw->linest[0] = VSIw->buftop; VSIw->attrst[0] = (VSattrlinePtr)VSOnewlines(VSIw->lines + 1,2); /* new space for attributes (these are never scrolled back) */ if (VSIw->attrst[0] == NULL) { VSIfreelinelist(VSIw->buftop); DisposePtr((Ptr)VSIw->tabs); DisposePtr((Ptr)VSIw->attrst); DisposePtr((Ptr)VSIw->linest); DisposePtr((Ptr)VSIw); VSscreens[VSIwn].loc = VSIw = NULL; return(-2); } } VSIw->vistop = VSIw->scrntop = VSIw->buftop; /* initial view = screen */ if (VSIw->oldScrollback) { VSOlistndx(VSIw->scrntop, VSIw->attrst[0]); VSIw->attrst[0]->prev = VSIw->attrst[VSIw->lines]; /* make attribute list circular, since it is never extended */ VSIw->attrst[VSIw->lines]->next = VSIw->attrst[0]; } else VSIlistndx(VSIw->scrntop); /* Set up screen arrays */ if (!screensave) { /* make text line list circular to indicate no extensions */ VSIw->linest[0]->prev = VSIw->linest[VSIw->lines]; VSIw->linest[VSIw->lines]->next = VSIw->linest[0]; } /* if */ VSIw->maxlines = maxlines; VSIw->numlines = 0; VSscreens[VSIwn].captureRN = 0; /* BYU 2.4.18 - capture file's RefNum */ VSIw->id = 'VSCR'; VSIw->maxwidth = maxwid - 1; VSIw->savelines = screensave; VSIw->forcesave = forcesave; /* NCSA 2.5 */ VSIw->attrib = 0; VSIw->Pattrib = -1; /* initially no saved attribute */ VSIw->x = 0; VSIw->y = 0; VSIw->charset = 0; VSIw->G0 = 0; VSIw->G1 = 1; VSIw->DECAWM = 0; VSIw->DECCKM = 0; VSIw->DECPAM = 0; VSIw->DECORG = 0; VSIw->DECCM = 1; /* Bri 970610 */ VSIw->IRM = 0; VSIw->escflg = 0; VSIw->top = 0; VSIw->bottom = numLines; VSIw->parmptr = 0; VSIw->Rtop = 0; VSIw->Rleft = 0; VSIw->Rright = maxwid - 1; VSIw->Rbottom = numLines; VSIw->ESscroll = 1; VSIw->prredirect = 0; /* LU */ VSIw->qprint = 0; VSIw->ignoreBeeps = ignoreBeeps; VSIw->prbuf = 0; /* LU */ VSIw->refNum = -1; /* LU */ VSIw->possibleForce = 0; VSIclrbuf(); VSItabinit(); VSscreens[VSIwn].stat = 1; VSinuse++; return(VSIwn); } /* VSnewscreen */ short VSdestroy(short w) /* screen number */ /* gets rid of a virtual screen. */ { if (VSvalids(w) != 0) return(-3); VSIfreelines(); if (VSIw->oldScrollback) { VSIfreelinelist((VSlinePtr)VSIw->attrst[0]); if (VSIw->attrst) DisposPtr((Ptr) VSIw->attrst); } if(VSIw->linest) DisposPtr((Ptr) VSIw->linest); if(VSIw->tabs) DisposPtr(VSIw->tabs); if(VSIw) DisposPtr((Ptr) VSIw); VSscreens[w].stat = 0; VSIwn = -1; VSinuse--; /* SCA '87 */ return(0); } /* VSdestroy */ void VSredrawLine(short w) //redraws current line { if (VSvalids(w) != 0) return; VSredraw(w, 0, VSIw->y,VSIw->maxwidth, VSIw->y); VSIcuroff(w); } short VSredraw ( short w, // window to redraw */ short x1, short y1, short x2, short y2 ) /* redisplays the specified portion of a virtual screen. */ { VSlinePtr ypt; short y; short tx1, tx2, ty1, ty2, tn, offset; if (VSvalids(w) != 0) return(-3); if (VSIw->oldScrollback) return VSOredraw(w, x1, y1, x2, y2); x1 += VSIw->Rleft; // Make local coords global again x2 += VSIw->Rleft; y1 += VSIw->Rtop; y2 += VSIw->Rtop; if (x1 < 0) x1 = 0; else if (x1 > VSIw->maxwidth) x1 = VSIw->maxwidth; if (x2 < 0) x2 = 0; else if (x2 > VSIw->maxwidth) x2 = VSIw->maxwidth; if (y1 < -VSIw->numlines) y1 = -VSIw->numlines; else if (y1 > VSIw->lines) y1 = VSIw->lines; if (y2 < -VSIw->numlines) y2 = -VSIw->numlines; /* limit to amount of scrollback */ else if (y2 > VSIw->lines) y2 = VSIw->lines; tx1 = x1; // Set up to clip redraw area to visible area tx2 = x2; ty1 = y1; ty2 = y2; tn = -1; // so we include more than 1 line if (VSIclip(&tx1, &ty1, &tx2, &ty2, &tn, &offset)!=0) return 0; // test clip region VSIcuroff(w); // temporarily hide cursor RSerase(w, tx1, ty1, tx2, ty2); // Erase the offending area // draw visible part of scrollback buffer if (y1 < 0) { tx1 = x1; // Set up to clip redraw area to visible area of scrollback buffer tx2 = x2; ty1 = y1; ty2 = (y2>=0) ? -1 : y2; tn = -1; if (!VSIclip(&tx1, &ty1, &tx2, &ty2, &tn, &offset)) { ypt = VSIw->vistop; for(y=VSIw->Rtop; ynext; // Get pointer to top line we need for (y=ty1; y<=ty2; y++) { char *pt; unsigned short *pa; unsigned short lasta; short x, lastx; pt = ypt->text + VSIw->Rleft; pa = ypt->attr + VSIw->Rleft; lastx = tx1; lasta = pa[tx1]; for(x=tx1+1; x<=tx2; x++) { if (pa[x]!=lasta) { RSdraw(w, lastx, y, lasta, x-lastx, pt + lastx); lastx = x; lasta = pa[x]; } } if (lastx<=tx2) RSdraw(w, lastx, y, lasta, tx2-lastx+1, pt + lastx); ypt = ypt->next; } } y1 = 0; // continue with on-screen buffer, if any } // draw visible part of on-screen buffer, taking account of attributes if (y2 >= 0) { tx1 = x1; // Set up to clip redraw area to visible area of on-screen buffer tx2 = x2; ty1 = y1; ty2 = y2; tn = -1; if (!VSIclip(&tx1, &ty1, &tx2, &ty2, &tn, &offset)) { ypt = VSIw->linest[VSIw->Rtop+ty1]; for (y=ty1; y<=ty2; y++) { char *pt; unsigned short *pa; unsigned short lasta; short x, lastx; pt = ypt->text + VSIw->Rleft; pa = ypt->attr + VSIw->Rleft; lastx = tx1; lasta = pa[tx1]; for(x=tx1+1; x<=tx2; x++) { if (pa[x]!=lasta) { RSdraw(w, lastx, y, lasta, x-lastx, pt + lastx); lastx = x; lasta = pa[x]; } } if (lastx<=tx2) RSdraw(w, lastx, y, lasta, tx2-lastx+1, pt + lastx); ypt = ypt->next; } } } VSIcurson(w, VSIw->x, VSIw->y, 0); /* restore cursor at original position */ tx1 = ty1 = 0; tn = 132; return(0); } /* VSredraw */ short VSOredraw ( short w, // window to redraw */ short x1, short y1, short x2, short y2 ) /* redisplays the specified portion of a virtual screen. */ { VSlinePtr ypt; VSattrlinePtr ypa; short y; short tx1, tx2, ty1, ty2, tn, offset; if (VSvalids(w) != 0) return(-3); x1 += VSIw->Rleft; // Make local coords global again x2 += VSIw->Rleft; y1 += VSIw->Rtop; y2 += VSIw->Rtop; if (x1 < 0) x1 = 0; else if (x1 > VSIw->maxwidth) x1 = VSIw->maxwidth; if (x2 < 0) x2 = 0; else if (x2 > VSIw->maxwidth) x2 = VSIw->maxwidth; if (y1 < -VSIw->numlines) y1 = -VSIw->numlines; else if (y1 > VSIw->lines) y1 = VSIw->lines; if (y2 < -VSIw->numlines) y2 = -VSIw->numlines; /* limit to amount of scrollback */ else if (y2 > VSIw->lines) y2 = VSIw->lines; tx1 = x1; // Set up to clip redraw area to visible area tx2 = x2; ty1 = y1; ty2 = y2; tn = -1; // so we include more than 1 line if (VSIclip(&tx1, &ty1, &tx2, &ty2, &tn, &offset)!=0) return 0; // test clip region VSIcuroff(w); // temporarily hide cursor RSerase(w, tx1, ty1, tx2, ty2); // Erase the offending area // draw visible part of scrollback buffer if (y1 < 0) { tx1 = x1; // Set up to clip redraw area to visible area of scrollback buffer tx2 = x2; ty1 = y1; ty2 = (y2>=0) ? -1 : y2; tn = -1; if (!VSIclip(&tx1, &ty1, &tx2, &ty2, &tn, &offset)) { ypt = VSIw->vistop; for(y=VSIw->Rtop; ynext; // Get pointer to top line we need for (y=ty1; y<=ty2; y++) { RSdraw(w, tx1, y, 0, tn, ypt->text + VSIw->Rleft +tx1); ypt = ypt->next; } } y1 = 0; // continue with on-screen buffer, if any } // draw visible part of on-screen buffer, taking account of attributes if (y2 >= 0) { tx1 = x1; // Set up to clip redraw area to visible area of on-screen buffer tx2 = x2; ty1 = y1; ty2 = y2; tn = -1; if (!VSIclip(&tx1, &ty1, &tx2, &ty2, &tn, &offset)) { ypt = VSIw->linest[VSIw->Rtop+ty1]; ypa = VSIw->attrst[VSIw->Rtop+ty1]; for (y=ty1; y<=ty2; y++) { char *pt; unsigned short *pa; unsigned short lasta; short x, lastx; pt = ypt->text + VSIw->Rleft; pa = ypa->text + VSIw->Rleft; lastx = tx1; lasta = pa[tx1]; for(x=tx1+1; x<=tx2; x++) { if (pa[x]!=lasta) { RSdraw(w, lastx, y, lasta, x-lastx, pt + lastx); lastx = x; lasta = pa[x]; } } if (lastx<=tx2) RSdraw(w, lastx, y, lasta, tx2-lastx+1, pt + lastx); ypt = ypt->next; ypa = ypa->next; } } } VSIcurson(w, VSIw->x, VSIw->y, 0); /* restore cursor at original position */ tx1 = ty1 = 0; tn = 132; return(0); } /* VSOredraw */ short VSwrite ( short w, /* screen to draw into */ char *ptr, /* pointer to text string */ short len /* length of text string */ ) /* sends a stream of characters to the specified window. */ { // _profile = 1; if (len == 0) return 0; if (VSvalids(w) != 0) return(-3); VSIcuroff(w); /* hide cursor momentarily */ VSem((unsigned char *) ptr, len); /* BYU LSC - interpret the character stream */ VSIcurson(w, VSIw->x, VSIw->y, 1); /* restore cursor, force it to be visible. */ // _profile = 0; return(0); } /* VSwrite */ // Utility routine: BetterTelnet 1.0fc3 (RAB) void VSsetprintmode(short w, short printMode) { if (VSvalids(w) != 0) return; VSIw->qprint = printMode; if (!printMode) { VSIw->prredirect = VSIw->printqueued; VSprOFF(); } VSIw->printqueued = 0; } short VSIgetNextTabDistance(void) { short current; if (VSIw->x >= VSIw->maxwidth) return(0); current = VSIw->x + 1; while ((VSIw->tabs[current] != 'x')&&(current < VSIw->maxwidth)) current++; return (current - VSIw->x); } // MAT--We need to define how big the Queue is // MAT--for sending the cursor characters. // MAT--Since MacTCP doesn't like 30+ individual #define MATSbufSize 254 // MAT--SendChar requests. void VSpossendEM // MAT--we can change this to support EMACS ( // MAT--style movement commands. short w, /* affected screen */ // MAT-- short x, /* column to move to */ // MAT-- short y, /* line to move to */ // MAT-- short echo /* local echo flag */ // MAT-- ) // MAT-- /* sends a stream of VT100 cursor-movement sequences to move the // MAT-- cursor on the specified screen to the specified position. */ // MAT-- { // MAT-- UNUSED_ARG(echo) static char // MAT-- tt[MATSbufSize] = ""; // MAT-- char curschar; // MAT-- short localCount; // MAT-- // MAT-- // MAT-- if (x < 0 || y < 0 || x > VSIw->maxwidth || y > VSIw->lines) // MAT-- return; // MAT-- /* convert x and y to relative distance to move */ // MAT-- x -= VSIw->x; // MAT-- y -= VSIw->y; // MAT-- // MAT-- curschar = '\002'; /* EMACS cursor left */ // MAT-- localCount=0; while (x < 0 && localCount < MATSbufSize) // MAT-- { // MAT-- tt[localCount] = curschar; // MAT-- x++; localCount++; // MAT-- } /* while */ // MAT-- if(localCount) RSsendstring(w, tt, localCount); // MAT-- curschar = '\016'; /* EMACS cursor down */ // MAT-- localCount=0; while (y > 0 && localCount < MATSbufSize) // MAT-- why we check to see if localCount is < MATSbufSize { // MAT-- I dont know. But If they had a window > 254 columns tt[localCount] = curschar; // MAT-- maybe it's a good idea. y--; localCount++; // MAT-- but it never hurts to be safe. } /* while */ // MAT-- if(localCount) RSsendstring(w, tt, localCount); // MAT-- curschar = '\020'; /* EMACS cursor up */ // MAT-- localCount=0; while (y < 0 && localCount < MATSbufSize) // MAT-- { // MAT-- tt[localCount] = curschar; // MAT-- y++; localCount++; // MAT-- } /* while */ // MAT-- if(localCount) RSsendstring(w, tt, localCount); // MAT-- curschar = '\006'; /* EMACS cursor right */ // MAT-- localCount=0; while (x > 0 && localCount < MATSbufSize) // MAT-- { // MAT-- tt[localCount] = curschar; // MAT-- x--; localCount++; // MAT-- } /* while */ // MAT-- if(localCount) RSsendstring(w, tt, localCount); // MAT-- // MAT-- if (0) //(note: supposed to look for "echo" here) // MAT-- { // MAT-- VSIcuroff(w); // MAT-- VSIw->x = x; // MAT-- VSIw->y = y; // MAT-- VSIcurson(w, VSIw->x, VSIw->y, 1); /* Force Move */ // MAT-- } /* if */ // MAT-- } /* VSpossendEM */ // changed comment // MAT-- void VSpossend ( short w, /* affected screen */ short x, /* column to move to */ short y, /* line to move to */ short echo /* local echo flag */ ) /* sends a stream of VT100 cursor-movement sequences to move the cursor on the specified screen to the specified position. */ { static char VSkbax[] = "\033O ", /* prefix for auxiliary code */ VSkban[] = "\033[ "; /* prefix for arrows normal */ char *vskptr; if (VSvalids(w) != 0) return; /* NCSA: SB - This would bomb before. You need to get the screens # from the translation routine before you access the record! */ if (screens[findbyVS(w)].arrowmap) { /* NCSA: SB - get the CORRECT screens # */ VSpossendEM(w,x,y,echo); // MAT-- call our cursor movement routine return; // MAT-- then exit } if (VSIw->DECPAM && VSIw->DECCKM) vskptr = VSkbax; else vskptr = VSkban; if (x < 0 || y < 0 || x > VSIw->maxwidth || y > VSIw->lines) return; /* convert x and y to relative distance to move */ x -= VSIw->x; y -= VSIw->y; vskptr[2] = 'D'; /* cursor left */ while (x < 0) { x++; RSsendstring(w, vskptr, 3); } /* while */ vskptr[2] = 'B'; /* cursor down */ while (y > 0) { y--; RSsendstring(w, vskptr, 3); } /* while */ vskptr[2] = 'A'; /* cursor up */ while (y < 0) { y++; RSsendstring(w, vskptr, 3); } /* while */ vskptr[2] = 'C'; /* cursor right */ while (x > 0) { x--; RSsendstring(w, vskptr, 3); } /* while */ if (echo) { VSIcuroff(w); VSIw->x = x; VSIw->y = y; VSIcurson(w, VSIw->x, VSIw->y, 1); /* Force Move */ } /* if */ } /* VSpossend */ char VSkbsend ( short w, /* active window */ unsigned char k, /* special key code if > 128, else ascii code */ short echo /* local echo flag */ ) /* sends the appropriate sequence for the specified key, taking due account of terminal mode settings. */ { static char VSkbkn[] = "\033O ", /* prefix for keypad normal */ VSkbax[] = "\033O ", /* prefix for auxiliary code*/ VSkban[] = "\033[ ", /* prefix for arrows normal */ VSkbfn[] = "\033O ", /* prefix for function keys */ /* BYU 2.4.12 */ VSk220[] = "\033[ ~"; /* prefix for vt220 keys */ /* BYU 2.4.12 */ char *vskptr; short vskplen; if (VSvalids(w) != 0) return(-3); if ( screens[findbyVS(w)].arrowmap && (k <= VSLT) && (k >= VSUP) ) // MAT-- // MAT-- important...we need to check this first before { // MAT-- the next if() statement gets its hands on the string. switch (k) { // MAT-- do the mapping from arrowkeys -> EMACS ctrl keys. case VSLT: // MAT-- k = 0x02; // MAT-- ^B Question: Is there a way to find out if the option break; // MAT-- key was held down with this character? case VSRT: // MAT-- I didn't want to declare myEvent an extern k = 0x06; // MAT-- ^F (I didn't know if that was a no-no) break; // MAT-- If I can.....let me know, I want to make case VSUP: // MAT-- option-arrowkey's do useful things too k = 0x10; // MAT-- ^P break; // MAT-- checking the keymap would be a kludge here. case VSDN: // MAT-- k = 0x0e; // MAT-- ^N break; // MAT-- } /* switch k */ // MAT-- RSsendstring(w,(char *)&k,1); // MAT-- send the character return(0); // MAT-- } // MAT-- if (k < VSF10) /* BYU 2.4.12 */ /* 7-bit ascii code -- send as is */ RSsendstring(w,(char *) &k, 1); /* BYU LSC */ /* Keypad (Not Application Mode): 0-9 , - . Enter */ if ((k > VSLT) && (k < VSF1) && (!VSIw->DECPAM)) { RSsendstring(w, &VSIkpxlate[0][k - VSUP], 1); if (echo) VSwrite(w, &VSIkpxlate[0][k - VSUP], 1); if (k == VSKE) RSsendstring(w, "\012", 1); return(0); } /* if */ if (VSIw->DECPAM && VSIw->DECCKM) { /* aux kp mode */ vskptr = VSkbax; vskplen = 3; vskptr[2] = VSIkpxlate[1][k - VSUP]; /* BYU 2.4.12 */ } else if (k < VSUP) { /* BYU 2.4.12 */ vskptr = VSk220; /* BYU 2.4.12 */ vskplen = VSIkplen[k - VSF10]; /* BYU 2.4.12 */ vskptr[2] = VSIkpxlate2[k - VSF10]; /* BYU 2.4.12 */ vskptr[3] = VSIkpxlate3[k - VSF10]; /* BYU 2.4.12 */ } else { /* BYU 2.4.12 */ vskplen = 3; /* BYU 2.4.12 */ if (k < VSK0) { /* BYU 2.4.13 - arrow keys */ vskptr = VSkban; /* BYU 2.4.12 */ if (VSIw->DECCKM) /* BYU 2.4.13 */ vskptr[1] = 79; /* BYU 2.4.13 */ else /* BYU 2.4.13 */ vskptr[1] = 91; /* BYU 2.4.13 */ } /* BYU 2.4.13 */ else if (k < VSF1) /* BYU 2.4.12 */ vskptr = VSkbkn; /* BYU 2.4.12 */ else /* BYU 2.4.12 */ vskptr = VSkbfn; /* BYU 2.4.12 */ /* BYU 2.4.12 */ vskptr[2] = VSIkpxlate[1][k - VSUP]; /* BYU 2.4.12 */ } /* BYU 2.4.12 */ RSsendstring(w, vskptr, vskplen); if (echo) VSwrite(w, vskptr, vskplen); return(0); } /* VSkbsend */ short VSreset ( short w ) /* resets virtual terminal settings to default state, clears screen and homes cursor. */ { if (VSvalids(w) != 0) return(-3); VSIcuroff(w); /* NCSA: SB -- get rid of extraneous cursor BS */ VSIreset(); /* causes cursor to disappear */ VSIcurson(w, VSIw->x, VSIw->y, 1); /* redisplay cursor at home position */ return(0); } /* VSreset */ void VSscrolright ( short w, short n /* number of columns to scroll */ ) /* moves the view of the virtual screen within its window the specified number of columns to the right. */ { short sn, lmmax; if (VSvalids(w) != 0) return; /* limit scroll amount against number of invisible columns */ lmmax = VSIw->maxwidth - (VSIw->Rright - VSIw->Rleft); if (VSIw->Rleft + n > lmmax) n = lmmax - VSIw->Rleft; /* can't scroll any further right than this */ if (n == 0) return; /* Do nothing if appropriate */ VSIcuroff(w); /* temporarily hide cursor */ VSIw->Rleft += n; /* update visible region */ VSIw->Rright += n; sn = VSIw->Rbottom - VSIw->Rtop; RSmargininfo(w, lmmax, VSIw->Rleft); /* update horizontal scroll bar */ RSdelcols(w, n); /* scroll the window contents */ VSIcurson(w, VSIw->x, VSIw->y, 0); /* restore cursor at original position */ /* redraw newly-revealed portion of screen */ VSredraw(w, (VSIw->Rright - VSIw->Rleft) - n, 0, (VSIw->Rright - VSIw->Rleft), sn); } /* VSscrolright */ void VSscrolleft ( short w, short n /* number of columns to scroll */ ) /* moves the view of the virtual screen within its window the specified number of columns to the left. */ { short sn, lmmax; if (VSvalids(w) != 0) return; lmmax = VSIw->maxwidth - (VSIw->Rright - VSIw->Rleft); /* number of invisible columns */ if (n > VSIw->Rleft) n = VSIw->Rleft; /* can't scroll any further left than this */ if (n == 0) return; /* Do nothing if appropriate */ VSIcuroff(w); /* temporarily hide cursor */ VSIw->Rleft -= n; /* update visible region */ VSIw->Rright -= n; sn = VSIw->Rbottom - VSIw->Rtop; RSmargininfo(w, lmmax, VSIw->Rleft); /* update horizontal scroll bar */ RSinscols(w, n); /* scroll the window contents */ VSIcurson(w, VSIw->x, VSIw->y, 0); /* restore cursor at original position */ VSredraw(w, 0, 0, n, sn); /* redraw newly-revealed portion of screen */ } /* VSscrolleft */ short VSscroltop( short w /* which window */) /* JMB 2.6 */ { /* JMB 2.6 */ if (VSvalids(w) != 0) /* JMB 2.6 */ return(-3); /* JMB 2.6 */ /* JMB 2.6 */ return(VSscrolback(w, VSIw->Rtop + VSIw->numlines)); /* can't scroll back any further than this */ } /* JMB 2.6 */ short VSscrolback ( short w, /* which window */ short in /* number of lines to scroll */ ) /* moves the view of the virtual screen within its window the specified number of lines upwards. */ { short sn, n; n = in; if (VSvalids(w) != 0) return(-3); if (VSIw->numlines < (n - VSIw->Rtop)) n = VSIw->Rtop + VSIw->numlines; /* can't scroll back any further than this */ if (n <= 0) return(0); /* Dont be scrollin' no lines.... */ VSIcuroff(w); /* temporarily hide cursor */ VSIw->Rtop = VSIw->Rtop - n; /* adjust the visible region */ VSIw->Rbottom = VSIw->Rbottom - n; /* find the line list element for the new topmost visible line */ sn = n; while (sn-- > 0) { #ifdef DEBUGMAC if (VSIw->vistop->prev == 0L) DebugStr("\pVSscrolback -- something wrong with linked list structure"); #endif DEBUGMAC VSIw->vistop = VSIw->vistop->prev; } /* while */ sn = VSIw->Rbottom - VSIw->Rtop; /* update vertical scroll bar */ RSbufinfo(w, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); if (n <= VSIw->lines) { RSinslines(w, 0, sn, n, 0); /* scroll, preserving current selection */ VSIcurson(w, VSIw->x, VSIw->y, 0); /* restore cursor at original position */ VSredraw(w, 0, 0, VSIw->maxwidth, n - 1); /* redraw newly-revealed portion */ } else { /* currently-visible contents scrolled completely off the screen-- just redraw everything */ VSredraw(w, 0, 0, VSIw->maxwidth, sn); } return(0); } /* VSscrolback */ short VSscrolforward ( short w, /* which window */ short n /* number of lines to scroll */ ) /* moves the view of the virtual screen within its window the specified number of lines downwards. */ { short sn; if (VSvalids(w) != 0) return(-3); if (n > VSIw->lines - VSIw->Rbottom) n = VSIw->lines - VSIw->Rbottom; /* can't scroll any further forward than this */ if (n <= 0) return(0); /* Dont be scrollin' no lines.... */ VSIcuroff(w); /* temporarily hide cursor */ VSIw->Rtop = n + VSIw->Rtop; /* adjust the visible region */ VSIw->Rbottom = n + VSIw->Rbottom; /* find the line list element for the new topmost visible line */ sn = n; while (sn-- > 0) { #ifdef DEBUGMAC if (VSIw->vistop->next == nil) DebugStr("\pVSscrolforward -- something wrong with linked list structure"); #endif DEBUGMAC VSIw->vistop = VSIw->vistop->next; } /* while */ sn = VSIw->Rbottom - VSIw->Rtop; /* update vertical scroll bar */ RSbufinfo(w, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); if (n <= VSIw->lines) { RSdellines(w, 0, sn, n, 0); /* scroll, preserving current selection */ VSIcurson(w, VSIw->x, VSIw->y, 0); /* restore cursor at original position */ VSredraw(w, 0, (sn + 1) - n, VSIw->maxwidth, sn); /* redraw newly-revealed portion */ } /* if */ else { /* currently-visible contents scrolled completely off the screen-- just redraw everything */ VSredraw(w, 0, 0, VSIw->maxwidth, sn); } return(0); } /* VSscrolforward */ short VSsetrgn ( short w, short x1, /* leftmost column */ short y1, /* uppermost line */ short x2, /* rightmost column */ short y2 /* bottommost line */ ) /* sets the visible region for the specified virtual screen in its window, scrolling its contents as appropriate. Assumes that either the vertical bounds or the height of the region has changed, but not both, and similarly that the horizontal bounds or the width has changed, but not both. */ { short n; if (VSvalids(w) != 0) return(-3); VSIw->Rbottom = VSIw->Rtop + (y2 - y1); /* make change in height of visible region first */ if (x2 > VSIw->maxwidth) { /* trying to make columns visible which aren't there-- adjust the left and right boundaries to avoid this */ n = x2 - VSIw->maxwidth; /* how far to adjust to the left */ if (n > x1) n = x1; /* but I'd rather have unused columns on the right than on the left */ x1 -= n; /* Adjust left */ x2 -= n; /* Adjust right */ } /* if */ if (VSIw->Rleft != x1) { /* left margin changed -- scroll horizontally */ /* (assume width of region hasn't also changed) */ n = x1 - VSIw->Rleft; if (n > 0) VSscrolright(w, n); else VSscrolleft(w, -n); } else /* just update horizontal scroll bar limits for new width of visible region */ RSmargininfo(w, VSIw->maxwidth - (x2 - x1), x1); VSIw->Rleft = x1; VSIw->Rright = x2; if (VSIw->Rbottom > VSIw->lines) /* don't scroll off the bottom of the screen */ n = VSIw->Rbottom - VSIw->lines; else /* scroll to new topmost line as specified */ n = VSIw->Rtop - y1; if (n != 0) /* scroll vertically (assume height of region hasn't also changed) */ if (n > 0) VSscrolback(w, n); else VSscrolforward(w, -n); else /* update vertical scroll bar limits for new height of visible region */ RSbufinfo(w, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); return(0); } /* VSsetrgn */ short VSscrolcontrol ( short w, short scrolon, /* whether to save lines off top */ short offtop /* whether to save lines on clearing entire screen */ ) /* changes scrollback flag settings for a virtual screen. */ { if (VSvalids(w) != 0) return(-3); if (scrolon > -1) VSIw->savelines = scrolon; if (offtop > -1) VSIw->ESscroll = offtop; return(0); } /* VSscrolcontrol */ // RAB BetterTelnet 1.2 - set "ignore beeps" void VSbeepcontrol ( short w, short beep ) { if (VSvalids(w) != 0) return; VSIw->ignoreBeeps = beep; } short VSgetrgn ( short w, short *x1, short *y1, short *x2, short *y2 ) /* returns the current visible region for a virtual screen. */ { if (VSvalids(w) != 0) return(-3); *x1 = VSIw->Rleft; *y1 = VSIw->Rtop; *x2 = VSIw->Rright; *y2 = VSIw->Rbottom; return(0); } /* VSgetrgn */ short VSmaxwidth ( short w ) /* returns one less than the number of columns on a virtual screen. */ { if (VSvalids(w) != 0) return(-3); return(VSIw->maxwidth); } /* VSmaxwidth */ VSlinePtr VSIGetLineStart(short w, short y1) /* returns a pointer to the specified text line (number may be negative for a line in the scrollback buffer). */ { VSlinePtr ptr; short n; if (VSvalids(w) != 0) return((VSlinePtr) -3); if (y1 >= 0) return(VSIw->linest[y1]); n = y1 - VSIw->Rtop; /* Number of lines from VISTOP to scroll forward */ ptr = VSIw->vistop; while (n > 0) { n--; ptr = ptr->next; } /* while */ while (n < 0) { n++; ptr = ptr->prev; } /* while */ return(ptr); } /* VSIGetLineStart */ char *VSIstrcopy(char *src, short len, char *dest, short table, short noClip) /* copies characters from *src (length len) to *dest, dropping trailing blanks. If table is nonzero, then this number (or more) of consecutive embedded blanks will be replaced with a tab. Returns a pointer to the position one past the last character copied to the *dest buffer. */ { char *p, *tempp; short tblck; p = src + len - 1; /* skip trailing blanks, but only if !noClip */ if ((!noClip) || table || gApplicationPrefs->clipTrailingSpaces) // RAB BetterTelnet 1.0fc7, 1.1 while ((*p == ' ') && (p >= src)) p--; if (p < src) return(dest); if (!table) /* straight character copy */ while (src <= p) *dest++ = *src++; else /* tab-replacement copy */ while (src <= p) { while ((src <= p) && (*src != ' ')) *dest++ = *src++; if (src < p) { tempp = dest; /* remember start of run of spaces */ tblck = 0; /* length of run */ while ((src <= p) && (*src == ' ')) { *dest++ = *src++; tblck++; } /* while */ if (tblck >= table) { *tempp++ = '\011'; /* replace first space with a tab */ dest = tempp; /* drop remaining spaces */ } /* if */ } /* if */ } /* while */ return(dest); } /* VSIstrcopy */ long VSgettext(short w, short x1, short y1, short x2, short y2, char *charp, long max, char *EOLS, short table) /* copies a portion of text from the specified virtual screen into the *charp buffer. table, if nonzero, is the minimum length of runs of spaces to be replaced with single tabs. Returns the length of the copied text. max is supposed to be the maximum length to copy, but this is currently ignored! EOLS is the end-of-line sequence to insert at line boundaries. This is currently assumed to be exactly one character long. */ { UNUSED_ARG(max) /* !! */ short EOLlen; short lx,ly, /* Upper bounds of selection */ ux,uy; /* Lower bounds of selection */ short maxwid; char *origcp; VSlinePtr t; if (VSvalids(w) != 0) return(-3); EOLlen = strlen(EOLS); maxwid = VSIw->maxwidth; origcp = charp; if (y1 < -VSIw->numlines) { y1 = -VSIw->numlines; x1 = -1; } /* if */ if (y1 == y2) { /* copying no more than a single line */ t = VSIGetLineStart(w, y1); if (x1 < x2) /* Order the lower and upper bounds */ { ux = x1; uy = y1; lx = x2; ly = y2; } else { ux = x2; uy = y2; lx = x1; ly = y1; } /* if */ if ((long)(lx-ux) < max) charp=VSIstrcopy(&t->text[ux+1], lx-ux, charp, table, 1); else charp=VSIstrcopy(&t->text[ux+1], (short)(max - (long)(charp-origcp)), charp, table, 1); if (lx == maxwid) *charp++ = *EOLS; /* assumes it's only one character! */ } else { /* copying more than one line */ if (y1 < y2) /* Order the lower and upper bounds */ { ux = x1; uy = y1; lx = x2; ly = y2; } else { ux = x2; uy = y2; lx = x1; ly = y1; } /* if */ t = VSIGetLineStart(w, uy); if (((long) (maxwid-ux) < max)) charp=VSIstrcopy(&t->text[ux+1],maxwid-ux,charp,table, 0); else charp=VSIstrcopy(&t->text[ux+1],(short) (max-(long)(charp-origcp)),charp,table, 0); *charp++ = *EOLS; /* assumes it's only one character! */ uy++; t = t->next; while (uy < ly && uy < VSIw->lines) { if ((long)(maxwid+1) < max) charp=VSIstrcopy(t->text,maxwid+1,charp, table, 0); else charp=VSIstrcopy(t->text,(short)(max - (long) (charp-origcp)),charp, table, 0); *charp++=*EOLS; t=t->next; uy++; } /* while */ if (ly > VSIw->lines) lx = maxwid; if ((long) (lx+1) < max) charp=VSIstrcopy(t->text,lx+1,charp,table, 0); else charp=VSIstrcopy(t->text,(short)(max - (long)(charp-origcp)),charp,table, 0); if (lx >= maxwid) *charp++ = *EOLS; /* assumes it's only one character! */ } /* if */ return(charp - origcp); } /* VSgettext */ short VSgetlines ( short w ) /* returns the number of lines in a virtual screen. */ { if (VSvalids(w) != 0) return(-2); return(VSIw->lines + 1); } /* VSgetlines */ short VSsetlines ( short w, /* window number */ short lines /* new number of lines */ ) /* sets the number of lines in a virtual screen, reallocating text and attribute arrays accordingly. Returns the new number of lines on success, or an error otherwise */ { VSlineArray linest; /* For storage of old ones */ VSlinePtr line; /* pointer to a line */ short i, j, oldlines; char *temp; unsigned short *tempa; if (VSvalids(w) != 0) return(-3000); if (VSIw->oldScrollback) return VSOsetlines(w, lines); lines -= 1; /* Correct for internal use */ oldlines = VSIw->lines; if (lines == oldlines) /* no change */ return(0); VSIw->x = 0; VSIw->y = 0; VSIcurson(w, VSIw->x, VSIw->y, 1); /* keeps cursor from pointing outside of window */ VSIw->vistop = VSIw->scrntop; /* Force view to the top of the screen */ linest = VSIw->linest; VSIw->linest = VSInewlinearray(lines + 1); /* allocate new screen buffers */ if (!VSIw->linest) { VSIw->linest = linest; /* mem problems */ return (-2000); } VSIw->lines = lines; /* set new number of screen lines */ VSIw->linest[0] = VSInewlines(lines + 1); /* allocate new text and attribute lines */ if (VSIw->linest[0]) { /* mem is there */ VSIlistndx(VSIw->linest[0]); /* build the new screen arrays */ if (VSIw->savelines) { /* save previous screen contents in scrollback buffer */ line = linest[oldlines]->next; /* save continuation */ linest[oldlines]->next = VSIw->linest[0]; VSIw->linest[lines]->next = line; /* restore continuation */ VSIw->linest[0]->prev = linest[oldlines]; /* backpointer */ if (line) /* if there was a follower */ line->prev = VSIw->linest[lines]; /* new prev for it */ VSIw->numlines += oldlines; /* we made more scrollback */ } else { /* get rid of previous screen contents */ VSIfreelinelist(linest[0]); DisposPtr((Ptr) linest); } } else { /* need more mem - emergency */ if (VSIw->linest[0]) /*if 1/2 of push for memory died, kill the other */ VSIfreelinelist(VSIw->linest[0]); /* Here we should ask if we want to lose the screen buffer!! CCP */ VSIfreelines(); /* release scrollback buffer */ VSIfreelinelist(linest[0]); /* release current visible lines */ DisposPtr((Ptr) linest); VSIw->linest[0] = VSInewlines(lines + 1); /* allocate new screen arrays */ if (!VSIw->linest[0]) { /* still not enough memory; Try to allocate just enough to go back to original size */ if (VSIw->linest[0]) /* this gets rid of useless */ VSIfreelinelist(VSIw->linest[0]); /* memory, since we are giving up */ VSIw->linest[0] = VSInewlines(oldlines + 1); /* try original size */ if (!VSIw->linest[0]) /* damage control: */ { /* Nope. Give up, and signal that */ if (VSIw->linest[0]) /* caller should kill this screen */ VSIfreelinelist(VSIw->linest[0]); /* dont destroy everything, as this will screw up VSdestroy later */ return(-4000); } else { lines = oldlines; VSIw->lines = lines; } } VSIw->buftop = VSIw->linest[0]; VSIw->numlines = 0; /* nothing in scrollback */ } /* if */ VSIw->scrntop = VSIw->linest[0]; /* new top of screen */ VSIw->vistop = VSIw->scrntop; /* Force a scroll to the top of the screen */ VSIlistndx(VSIw->scrntop); /* rebuild screen arrays */ if (!VSIw->savelines) { /* make text line list circular to indicate no extensions */ VSIw->linest[lines]->next = VSIw->linest[0]; VSIw->linest[0]->prev = VSIw->linest[lines]; } /* if */ /* initialize the new screen lines to blank text and no attributes */ for (i = 0; i <= lines; i++) { tempa = VSIw->linest[i]->attr; temp = VSIw->linest[i]->text; for (j = 0; j <= VSIw->allwidth; j++) { *temp++ = ' '; *tempa++ = 0; } /* for */ } /* for */ /* reset scrolling region */ VSIw->top = 0; VSIw->bottom = lines; /* reset visible region */ VSIw->Rtop = 0; VSIw->Rbottom = lines; VSredraw(w, 0, 0, VSIw->maxwidth, lines); /* draw new blank screen */ RSbufinfo(w, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* adjust vertical scroll bar */ return(VSIw->lines); } /* VSsetlines */ short VSOsetlines ( short w, /* window number */ short lines /* new number of lines */ ) /* sets the number of lines in a virtual screen, reallocating text and attribute arrays accordingly. Returns the new number of lines on success, or an error otherwise */ { VSlineArray linest; /* For storage of old ones */ VSattrlineArray attrst; VSlinePtr line; /* pointer to a line */ short i, j, oldlines; char *temp; unsigned short *tempa; if (VSvalids(w) != 0) return(-3000); lines -= 1; /* Correct for internal use */ oldlines = VSIw->lines; if (lines == oldlines) /* no change */ return(0); VSIw->x = 0; VSIw->y = 0; VSIcurson(w, VSIw->x, VSIw->y, 1); /* keeps cursor from pointing outside of window */ VSIw->vistop = VSIw->scrntop; /* Force view to the top of the screen */ attrst = VSIw->attrst; /* save old screen arrays */ linest = VSIw->linest; VSIw->linest = VSInewlinearray(lines + 1); /* allocate new screen buffers */ if (!VSIw->linest) { VSIw->linest = linest; /* mem problems */ return (-2000); } VSIw->attrst = (VSattrlinePtr *)VSInewlinearray(lines + 1); if (!VSIw->attrst) { /* mem problems */ DisposPtr((Ptr) VSIw->linest); VSIw->linest = linest; VSIw->attrst = attrst; return (-2000); } VSIw->lines = lines; /* set new number of screen lines */ VSIw->linest[0] = VSOnewlines(lines + 1,1); /* allocate new text and attribute lines */ VSIw->attrst[0] = (VSattrlinePtr)VSOnewlines(lines + 1,2); if (VSIw->linest[0] && VSIw->attrst[0]) { /* mem is there */ /* dispose of old attribute lines */ VSIfreelinelist((VSlinePtr)attrst[0]); DisposPtr((Ptr) attrst); VSOlistndx(VSIw->linest[0],VSIw->attrst[0]); /* build the new screen arrays */ if (VSIw->savelines) { /* save previous screen contents in scrollback buffer */ line = linest[oldlines]->next; /* save continuation */ linest[oldlines]->next = VSIw->linest[0]; VSIw->linest[lines]->next = line; /* restore continuation */ VSIw->linest[0]->prev = linest[oldlines]; /* backpointer */ if (line) /* if there was a follower */ line->prev = VSIw->linest[lines]; /* new prev for it */ VSIw->numlines += oldlines; /* we made more scrollback */ } else { /* get rid of previous screen contents */ VSIfreelinelist(linest[0]); DisposPtr((Ptr) linest); } } else { /* need more mem - emergency */ if (VSIw->linest[0]) /*if 1/2 of push for memory died, kill the other */ VSIfreelinelist(VSIw->linest[0]); if (VSIw->attrst[0]) VSIfreelinelist((VSlinePtr)VSIw->attrst[0]); /* Here we should ask if we want to lose the screen buffer!! CCP */ VSIfreelines(); /* release scrollback buffer */ VSIfreelinelist(linest[0]); /* release current visible lines */ DisposPtr((Ptr) linest); VSIfreelinelist((VSlinePtr)attrst[0]); /* release current visible attrib */ DisposPtr((Ptr) attrst); VSIw->linest[0] = VSOnewlines(lines + 1,1); /* allocate new screen arrays */ VSIw->attrst[0] = (VSattrlinePtr)VSOnewlines(lines + 1,2); if (!VSIw->linest[0] || !VSIw->attrst[0]) { /* still not enough memory; Try to allocate just enough to go back to original size */ if (VSIw->linest[0]) /* this gets rid of useless */ VSIfreelinelist(VSIw->linest[0]); /* memory, since we are giving up */ if (VSIw->attrst[0]) VSIfreelinelist((VSlinePtr)VSIw->attrst[0]); VSIw->linest[0] = VSOnewlines(oldlines + 1,1); /* try original size */ VSIw->attrst[0] = (VSattrlinePtr)VSOnewlines(oldlines + 1,2); if (!VSIw->linest[0] || !VSIw->attrst[0]) /* damage control: */ { /* Nope. Give up, and signal that */ if (VSIw->linest[0]) /* caller should kill this screen */ VSIfreelinelist(VSIw->linest[0]); if (VSIw->attrst[0]) VSIfreelinelist((VSlinePtr)VSIw->attrst[0]); /* dont destroy everything, as this will screw up VSdestroy later */ return(-4000); } else { lines = oldlines; VSIw->lines = lines; } } VSIw->buftop = VSIw->linest[0]; VSIw->numlines = 0; /* nothing in scrollback */ } /* if */ VSIw->scrntop = VSIw->linest[0]; /* new top of screen */ VSIw->vistop = VSIw->scrntop; /* Force a scroll to the top of the screen */ VSOlistndx(VSIw->scrntop, VSIw->attrst[0]); /* rebuild screen arrays */ VSIw->attrst[0]->prev = VSIw->attrst[lines]; /* Make attribute list circular */ VSIw->attrst[lines]->next = VSIw->attrst[0]; if (!VSIw->savelines) { /* make text line list circular to indicate no extensions */ VSIw->linest[lines]->next = VSIw->linest[0]; VSIw->linest[0]->prev = VSIw->linest[lines]; } /* if */ /* initialize the new screen lines to blank text and no attributes */ for (i = 0; i <= lines; i++) { tempa = VSIw->attrst[i]->text; temp = VSIw->linest[i]->text; for (j = 0; j <= VSIw->allwidth; j++) { *temp++ = ' '; *tempa++ = 0; } /* for */ } /* for */ /* reset scrolling region */ VSIw->top = 0; VSIw->bottom = lines; /* reset visible region */ VSIw->Rtop = 0; VSIw->Rbottom = lines; VSOredraw(w, 0, 0, VSIw->maxwidth, lines); /* draw new blank screen */ RSbufinfo(w, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* adjust vertical scroll bar */ return(VSIw->lines); } /* VSOsetlines */ /*--------------------------------------------------------------------------*/ /* NCSA: SB - VSsetcols */ /* This allows external procedures to set the column width. Used by */ /* routines in main, to allow ARBITRARY column widths */ /*--------------------------------------------------------------------------*/ short VSsetcols(short w, short myWidth) /* NCSA: SB */ { /* NCSA: SB */ if (VSvalids(w) != 0) /* NCSA: SB */ return(-1); /* NCSA: SB */ VSIw->maxwidth = myWidth; /* NCSA: SB */ return 0; } /* NCSA: SB */ /*--------------------------------------------------------------------------*/ /* NCSA: SB - VSgetcols */ /* This returns the column width. Used by SetScreenDimensions, when */ /* the procedure needs to know the initial column width */ /*--------------------------------------------------------------------------*/ short VSgetcols(short w) /* NCSA: SB */ { /* NCSA: SB */ if (VSvalids(w) != 0) /* NCSA: SB */ return(-1); /* NCSA: SB */ return VSIw->maxwidth; /* NCSA: SB */ } /* NCSA: SB */ \ No newline at end of file diff --git a/source/Screens/vsinterf.proto.h b/source/Screens/vsinterf.proto.h new file mode 100755 index 0000000..82245cb --- /dev/null +++ b/source/Screens/vsinterf.proto.h @@ -0,0 +1 @@ + /* vsinterf.c */ short VSinit(short max); short VSiscapturing(short w); short VSisprinting(short w); void ClosePrintingFile(short w); Boolean VSopencapture(short scrn_num, short w); void VSclosecapture(short w); void VScapture(unsigned char *ptr, short len); short VSvalids(short w); VSscrn *VSwhereis(short i); void VSIclrbuf(void); short VSnewscreen(short maxlines, short screensave, short numLines, short maxwid, short forcesave, short ignoreBeeps, short oldScrollback); short VSdestroy(short w); short VSredraw(short w, short x1, short y1, short x2, short y2); short VSOredraw(short, short, short, short, short); short VSwrite(short w, char *ptr, short len); void VSsetprintmode(short, short); short VSclear(short w); void VSpossendEM(short w, short x, short y, short echo); void VSpossend(short w, short x, short y, short echo); char VSkbsend(short w, unsigned char k, short echo); short VSclearall(short w); short VSreset(short w); char *VSgetline(short w, short y); void VSscrolright(short w, short n); void VSredrawLine(short w); void VSscrolleft(short w, short n); short VSscroltop(short w); short VSscrolback(short w, short in); short VSscrolforward(short w, short n); short VSsetrgn(short w, short x1, short y1, short x2, short y2); short VSscrolcontrol(short w, short scrolon, short offtop); void VSbeepcontrol(short, short); short VSgetrgn(short w, short *x1, short *y1, short *x2, short *y2); short VSsnapshot(short w); short VSmaxwidth(short w); VSlinePtr VSIGetLineStart(short w, short y1); char *VSIstrcopy(char*, short, char*, short, short); long VSgettext(short w, short x1, short y1, short x2, short y2, char *charp, long max, char *EOLS, short table); short VSgetlines(short w); short VSsetlines(short w, short lines); short VSOsetlines(short, short); short VSsetcols(short w, short myWidth); short VSgetcols(short w); short VSIgetNextTabDistance(void); \ No newline at end of file diff --git a/source/Screens/vsintern.c b/source/Screens/vsintern.c new file mode 100755 index 0000000..2376d12 --- /dev/null +++ b/source/Screens/vsintern.c @@ -0,0 +1 @@ +/* * * Virtual Screen Kernel Internal Routines * (vsintern.c) * National Center for Supercomputing Applications * * by Gaige B. Paulsen * * This file contains the private internal calls for the NCSA * Virtual Screen Kernel. * * Version Date Notes * ------- ------ --------------------------------------------------- * 0.01 861102 Initial coding -GBP * 0.50 861113 First compiled edition -GBP * 0.70 861114 Internal operation confirmed -GBP * 2.1 871130 NCSA Telnet 2.1 -GBP * 2.2 880715 NCSA Telnet 2.2 -GBP */ #ifdef MPW #pragma segment VS #endif #include "vsdata.h" #include "vskeys.h" #include "vsinterf.proto.h" #include "rsmac.proto.h" #include "rsinterf.proto.h" #include "maclook.proto.h" #include "wind.h" #define ScrollbackQuantum 100 #define VSIclrattrib 0 #include "vsintern.proto.h" extern short TempItemsVRefNum; extern long TempItemsDirID; extern WindRec *screens; short VSIclip ( short *x1, /* starting column */ short *y1, /* line on which to draw (assumed to lie within visible region) */ short *x2, /* ending column (inclusive) (output if *n >= 0) */ short *y2, /* ending line (inclusive) (output if *n >= 0) */ short *n, /* length of text to draw (input and output) */ short *offset /* length of initial part of text to skip (output) */ ) /* clips a text string to the visible region, given the starting line and column in screen coordinates at which it is to be drawn. If the length of the string is given, will also compute the ending line and column. On return, these coordinates will be normalized to the current visible region. Returns a nonzero function result iff the string is completely invisible. */ { if (*n >= 0) { /* compute ending line and column (inclusive) */ *x2 = *x1 + *n - 1; *y2 = *y1; } /* else take these as given */ if ((*x1 > VSIw->Rright) || (*y2 < VSIw->Rtop)) return (-1); /* nothing to draw */ if (*x2 > VSIw->Rright) *x2 = VSIw->Rright; if (*y2 > VSIw->Rbottom) *y2 = VSIw->Rbottom; /* normalize x1, x2, y1, y2 to be relative to current visible region */ *x1 -= VSIw->Rleft; *x2 -= VSIw->Rleft; *y1 -= VSIw->Rtop; *y2 -= VSIw->Rtop; /* clip part of text string lying outside region, if any */ *offset = - *x1; if (*offset < 0) *offset = 0; /* text string starts within region--nothing to clip */ /* don't draw anything outside region */ if (*x1 < 0) *x1 = 0; if (*y1 < 0) *y1 = 0; *n = *x2 - *x1 + 1 ; /* length of string to draw (assuming it's all on one line) */ if ((*n <= 0) || (*y2 - *y1 < 0)) return (-1); /* nothing to draw */ return (0); } /* VSIclip */ short VSIcdellines(short w, short top, short bottom, short n, short scrolled) /* -ve => cancel current selection, if any; +ve => selection has moved up one line; 0 => don't touch selection */ /* updates the display to indicate deletion of the specified number of lines from the top of the specified region. Returns 0 iff any part of the change is visible. */ { short x1 = 0, x2 = VSIw->maxwidth, tn = -1, offset; if (VSIclip(&x1, &top, &x2, &bottom, &tn, &offset)) return(-1); /* affected region is invisible */ tn = bottom - top; if (tn < n) n = tn; /* don't bother scrolling more lines than scrolling region holds */ RSdellines(w, top, bottom, n, scrolled); return(0); /* I delete the whole thing! */ } /* VSIcdellines */ short VSIcinslines(short w, short top, short bottom, short n, short scrolled) /* -ve <=> cancel current selection, if any */ /* updates the display to indicate insertion of the specified number of blank lines at the top of the specified region. Returns 0 iff any part of the change is visible. */ { short x1 = 0, x2 = VSIw->maxwidth, tn = -1, offset; if (VSIclip(&x1, &top, &x2, &bottom, &tn, &offset)) return -1; /* affected region is invisible */ tn = bottom - top; if (tn < n) n = tn; /* don't bother scrolling more lines than scrolling region holds */ RSinslines(w, top, bottom, n, scrolled); return 0; } /* VSIcinslines */ void VSIcurson ( short w, short x, short y, short ForceMove ) /* displays the text cursor at the specified position. If ForceMove is true, I am to do any appropriate scrolling of the display to ensure the cursor is within the visible region. Assumes cursor isn't currently being shown. */ { short x2, y2, n = 1, offset; if (!VSIw->DECCM) return; // Bri 970610 if (!VSIclip(&x, &y, &x2, &y2, &n, &offset)) /* cursor already lies within visible region */ RScurson(w, x, y); /* just make it visible */ else if (ForceMove) { /* scroll to make cursor visible */ x2 = VSIw->Rbottom - VSIw->Rtop; if (x2 >= VSIw->lines) /* visible region is big enough to show entire screen-- make sure I don't scroll off the bottom of the screen. This call will also do any appropriate scrolling and redisplaying of the cursor. */ VSsetrgn(VSIwn, VSIw->Rleft, VSIw->lines - x2, VSIw->Rright, VSIw->lines); else { /* x & y have been normalized relative to left & top of current visible region. Just call the appropriate scroll routine, which will also redisplay the cursor. */ if (y > 0) VSscrolforward(VSIwn, y); else VSscrolback(VSIwn, -y); } /* if */ } /* if */ } /* VSIcurson */ void VSIcuroff ( short w ) /* hides the cursor for the specified screen. Assumes it is currently being shown (or that it's on an invisible part of the screen). */ { short x = VSIw->x, y = VSIw->y, x2, y2, n = 1, offset; if (!VSIclip(&x, &y, &x2, &y2, &n, &offset) || !VSIw->DECCM) // Bri 970610 /* cursor is on visible part of screen */ RScursoff(w); } /* VSIcuroff */ short VSIcursorvisible /* BYU 2.4.12 */ ( /* BYU 2.4.12 */ void /* BYU 2.4.12 */ ) /* BYU 2.4.12 */ { /* BYU 2.4.12 */ short /* BYU 2.4.12 */ x = VSIw->x, /* BYU 2.4.12 */ y = VSIw->y, /* BYU 2.4.12 */ x2, /* BYU 2.4.12 */ y2, /* BYU 2.4.12 */ n = 1, /* BYU 2.4.12 */ offset; /* BYU 2.4.12 */ if (!VSIw->DECCM) return 0; // Bri 970610 /* BYU 2.4.12 */ if (!VSIclip(&x, &y, &x2, &y2, &n, &offset)) /* BYU 2.4.12 */ return 1; /* BYU 2.4.12 */ else /* BYU 2.4.12 */ return 0; /* BYU 2.4.12 */ } /* BYU 2.4.12 */ VSlineArray VSInewlinearray ( short nrlines ) /* allocates an array to hold the specified number of pointers to line elements. */ { return (VSlineArray) myNewPtrCritical(sizeof(VSlinePtr) * nrlines); } /* VSInewlinearray */ VSlinePtr VSInewlines ( short nlines ) /* allocates a doubly-linked list of the specified number of line elements, and returns a pointer to the head of the list, or NULL if ran out of memory. The maximum number of characters each line can hold is controlled by VSIw->allwidth. */ { void* memoryPtr; VSlinePtr linePtr; char* textPtr; unsigned short* attrPtr; long width; long i; /* Allocated one large block that will be broken up as follows: +---------+-------+-------+ | VSlines | texts | attrs | +---------+-------+-------+ This way, we can save tons of time allocating and deallocating memory from the system. BCS 970726 */ width = VSIw->allwidth + 1; memoryPtr = myNewPtrCritical(nlines * (sizeof(VSline) + (width * 3))); if(memoryPtr == NULL) return (VSlinePtr)NULL; // Chop the memory up into its 3 chunks. linePtr = (VSlinePtr)memoryPtr; textPtr = (char*)(linePtr + nlines); attrPtr = (unsigned short*)(textPtr + (nlines * width)); // Loop through the elements, initializing each one. for(i = 0; i < nlines; i++) { linePtr->mem = 0; linePtr->text = textPtr; linePtr->attr = attrPtr; linePtr->prev = linePtr - 1; linePtr->next = linePtr + 1; linePtr++; textPtr += width; attrPtr += width; } // Flag the first line as the free element. // This seems really strange; should be fixed (BCS) ((VSline*)memoryPtr)->mem = 1; // Terminate the beginning and end nodes in the list. ((VSline*)memoryPtr)->prev = NULL; (linePtr-1)->next = NULL; // Return the head. return (VSline*)memoryPtr; } /* VSInewlines */ VSlinePtr VSOnewlines ( short nlines, short elementSize //CCP 2.7 ) /* allocates a doubly-linked list of the specified number of line elements, and returns a pointer to the head of the list, or nil if ran out of memory. The maximum number of characters each line can hold is controlled by VSIw->allwidth. */ { VSlinePtr t2; char *t; register short i; /* allocate one block for the line list elements, and another block for the line contents. These blocks will be divided up and appropriate flags set so I will be able to call DisposPtr the right number of times, with the right arguments. */ if ((t = myNewPtrCritical(nlines * (VSIw->allwidth + 1)*elementSize)) != 0L) { if ((t2 = (VSlinePtr) myNewPtrCritical(nlines * sizeof(VSline))) != 0L) t2->text = t; else { /* clean up gracefully before giving up */ DisposPtr(t); return(0L); } /* if */ } else /* sorree no memoree */ return((VSlinePtr) 0L); /* * indicate to the free routine that the first record is the one to free. */ t2->mem = 1; /* call DisposPtr on this one */ t2->next = t2 + 1; /* point to next one */ /* * Take our allocation for multiple lines and fill in the structures to * point to the right text fields and connect the doubly-linked chain. * */ for (i = 1; i < nlines; i++) { t += (VSIw->allwidth + 1)* elementSize; /* inc to next text space for a line */ t2[i].mem = 0; /* don't DisposPtr any of these */ t2[i].text = t; t2[i].prev = t2 + i - 1; /* point back one */ t2[i].next = t2 + i + 1; /* point forward one */ } /* for */ t2[0].prev = 0L; /* first one has no prev yet */ t2[nlines - 1].next = 0L; /* last one has no next yet */ return(t2); } /* VSOnewlines */ void VSIlistndx ( register VSlinePtr ts ) /* sets up the screen arrays for the current screen to point at the given lists of attribute and text lines. */ { register short i; for (i = 0; i <= VSIw->lines; i++) { VSIw->linest[i] = ts; ts = ts->next; } /* for */ } /* VSIlistndx */ void VSOlistndx ( register VSlinePtr ts, register VSattrlinePtr as ) /* sets up the screen arrays for the current screen to point at the given lists of attribute and text lines. */ { register short i; for (i = 0; i <= VSIw->lines; i++) { VSIw->attrst[i] = as; VSIw->linest[i] = ts; ts = ts->next; as = as->next; } /* for */ } /* VSOlistndx */ void VSIscroff ( void ) /* called to save current screen contents in scrollback buffer, if it is ordained that I should do so. This is called by VSIes (below) just before the entire screen is cleared. */ { VSlinePtr tmp; register short i, j; if ( (!VSIw->savelines) /* not saving lines */ || (VSIw->top != 0) || (VSIw->bottom != VSIw->lines) /* scrolling region isn't exactly the entire screen */ ) return; /* do nothing */ if (VSIw->oldScrollback) { VSOscroff(); return; } tmp = VSIw->linest[VSIw->lines]; /* need VSIw->lines + 1 more lines */ for (i = 0; i <= VSIw->lines; i++) { /* count off the lines in the part of the scrollback buffer below the screen (if any), to see if there's enough to hold a screenful. If the scrollback list isn't circular, then this part contains lines that have been allocated, but not yet used. If the list is circular (meaning it has reached its full size), then this is the part that is next in line for reuse. */ if (!tmp->next) { /* not enough */ j = VSIw->maxlines - VSIw->numlines - i; /* potential unallocated scrollback */ if (j > ScrollbackQuantum) j = ScrollbackQuantum; /* but don't bother allocating more than this */ if (j <= 0) { /* already reached user-specified scrollback limit-- */ /* make the list circular to indicate no more extension. */ tmp->next = VSIw->buftop; VSIw->buftop->prev = tmp; /* connect it up */ } else { /* extend the scrollback buffer to make room for another screenful */ if (j < VSIw->lines - i + 1) j = VSIw->lines - i + 1; /* need at least this many */ if ((tmp->next = VSInewlines(j)) != 0L) tmp->next->prev = tmp; /* got some space--link it up */ else { /* out of memory--no more extensions */ tmp->next = VSIw->buftop; VSIw->buftop->prev = tmp; } /* if */ } /* if */ break; /* only allocate once is enough */ } /* if */ tmp = tmp->next; /* keep counting */ } /* for */ /* * at this point, we know we have enough memory for the whole scroll. * It might be wraparound (reuse of some line elements), might not. */ for (i = 0; i <= VSIw->lines; i++) { /* push another screen line into the scrollback area */ // RAB BetterTelnet 1.2 - bug fix for bad linked list bug // What was NCSA thinking when they wrote this code, anyway? // if (VSIw->linest[i]->next == VSIw->buftop) if (VSIw->linest[VSIw->lines]->next == VSIw->buftop) VSIw->buftop = VSIw->buftop->next; /* reusing old space */ else VSIw->numlines++; /* using some new space */ VSIw->scrntop = VSIw->scrntop->next; /* move another line into the scrollback buffer */ VSIlistndx(VSIw->scrntop); /* and update screen arrays */ /* note that it's up to the caller to clear out the new screen text and attribute lines */ } /* for */ VSIw->vistop = VSIw->scrntop; RSbufinfo(VSIwn, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* update vertical scroll bar */ } /* VSIscroff */ void VSOscroff ( void ) /* called to save current screen contents in scrollback buffer, if it is ordained that I should do so. This is called by VSIes (below) just before the entire screen is cleared. */ { VSlinePtr tmp; register short i, j; if ( (!VSIw->savelines) /* not saving lines */ || (VSIw->top != 0) || (VSIw->bottom != VSIw->lines) /* scrolling region isn't exactly the entire screen */ ) return; /* do nothing */ tmp = VSIw->linest[VSIw->lines]; /* need VSIw->lines + 1 more lines */ for (i = 0; i <= VSIw->lines; i++) { /* count off the lines in the part of the scrollback buffer below the screen (if any), to see if there's enough to hold a screenful. If the scrollback list isn't circular, then this part contains lines that have been allocated, but not yet used. If the list is circular (meaning it has reached its full size), then this is the part that is next in line for reuse. */ if (!tmp->next) { /* not enough */ j = VSIw->maxlines - VSIw->numlines - i; /* potential unallocated scrollback */ if (j > ScrollbackQuantum) j = ScrollbackQuantum; /* but don't bother allocating more than this */ if (j <= 0) { /* already reached user-specified scrollback limit-- */ /* make the list circular to indicate no more extension. */ tmp->next = VSIw->buftop; VSIw->buftop->prev = tmp; /* connect it up */ } else { /* extend the scrollback buffer to make room for another screenful */ if (j < VSIw->lines - i + 1) j = VSIw->lines - i + 1; /* need at least this many */ if ((tmp->next = VSOnewlines(j,1)) != 0L) tmp->next->prev = tmp; /* got some space--link it up */ else { /* out of memory--no more extensions */ tmp->next = VSIw->buftop; VSIw->buftop->prev = tmp; } /* if */ } /* if */ break; /* only allocate once is enough */ } /* if */ tmp = tmp->next; /* keep counting */ } /* for */ /* * at this point, we know we have enough memory for the whole scroll. * It might be wraparound (reuse of some line elements), might not. */ for (i = 0; i <= VSIw->lines; i++) { /* push another screen line into the scrollback area */ // RAB BetterTelnet 1.2.1 - bug fix // if (VSIw->linest[i]->next == VSIw->buftop) if (VSIw->linest[VSIw->lines]->next == VSIw->buftop) VSIw->buftop = VSIw->buftop->next; /* reusing old space */ else VSIw->numlines++; /* using some new space */ VSIw->scrntop = VSIw->scrntop->next; /* move another line into the scrollback buffer */ VSOlistndx(VSIw->scrntop, VSIw->attrst[1]); /* and update screen arrays */ /* note that it's up to the caller to clear out the new screen text and attribute lines */ } /* for */ VSIw->vistop = VSIw->scrntop; RSbufinfo(VSIwn, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* update vertical scroll bar */ } /* VSOscroff */ void VSIelo ( short s /* line to erase, -ve => line containing cursor */ ) /* blanks out the specified line in the screen buffer. Doesn't do anything to the display. */ { char *tt; unsigned short *ta; short i; if (s < 0) s = VSIw->y; if (VSIw->oldScrollback) ta = &VSIw->attrst[s]->text[0]; else ta = &VSIw->linest[s]->attr[0]; tt = &VSIw->linest[s]->text[0]; for (i = 0; i <= VSIw->allwidth; i++) { *ta++ = VSIclrattrib; *tt++ = ' '; } /* for */ } /* VSIelo */ void VSIes ( void ) /* clears the screen, first saving its contents in the scrollback buffer if appropriate. Also updates the display. */ { short i; short x1 = 0, y1 = 0, x2 = VSIw->maxwidth, y2 = VSIw->lines, n = -1, offset; /* save screen contents in scrollback buffer, if appropriate */ if (VSIw->ESscroll) VSIscroff(); /* clear out screen buffer */ for (i = 0; i <= VSIw->lines; i++) VSIelo(i); /* update display to show what I've done */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); VSIw->vistop = VSIw->scrntop; } /* VSIes */ void VSItabclear ( void ) /* clears all current tab settings. */ { short x = 0; while (x <= VSIw->allwidth) { VSIw->tabs[x] = ' '; x++; } /* while */ } /* VSItabclear */ void VSItabinit ( void ) /* sets tab settings to default (every 8 columns). */ { short x = 0; VSItabclear(); while (x <= VSIw->allwidth) { VSIw->tabs[x] = 'x'; x += 8; } VSIw->tabs[VSIw->allwidth] = 'x'; } /* VSItabinit */ void VSIreset ( void ) /* restores terminal mode settings to defaults and clears screen. */ { VSIw->top = 0; VSIw->bottom = VSIw->lines; VSIw->parmptr = 0; VSIw->escflg = 0; VSIw->DECAWM = 0; VSIw->DECCKM = 0; VSIw->DECPAM = 0; VSIw->DECORG = 0; /* NCSA: SB -- is this needed? */ VSIw->DECCM = 1; // Bri 970610 VSIw->Pattrib = -1; /* NCSA: SB -- is this needed? */ VSIw->IRM = 0; VSIw->attrib = 0; VSIw->x = 0; VSIw->y = 0; VSIw->charset = 0; VSIw->prbuf=0; /* LU */ if (VSIw->prredirect) { /* LU - kill redirection */ VSIw->prredirect=0; /* LU */ FSClose (VSIw->refNum); /* LU */ VSIw->refNum=-1; /* LU */ HDelete(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname); /* LU */ } /* LU */ VSIes(); VSItabinit(); } /* VSIreset */ void VSIlistmove(VSlinePtr TD, VSlinePtr BD, VSlinePtr TI, VSlinePtr BI) /* moves the lines from TD to BD inclusive from their present position to between TI and BI. Either of the latter may be nil. */ { /* unlink the lines from TD to BD */ if (TD->prev != 0L) TD->prev->next = BD->next; /* Maintain circularity */ if (BD->next != 0L) BD->next->prev = TD->prev; /* relink them between TI and BI */ TD->prev = TI; /* Place the node in its new home */ BD->next = BI; if (TI != 0L) TI->next = TD; /* Ditto prev->prev */ if (BI != 0L) BI->prev = BD; } /* VSIlistmove */ void VSIdellines ( short n, /* nr lines to delete */ short s /* starting line to delete, -ve => line containing cursor */ ) /* deletes lines from the screen, scrolling up the remainder and inserting new blank lines at the bottom of the scrolling region. */ { short i, j; char *tt; unsigned short *ta; VSlinePtr ts, TD, BD, TI, BI, itt; if (VSIw->oldScrollback) { VSOdellines(n, s); return; } if (s < 0) s = VSIw->y; if (s + n - 1 > VSIw->bottom) n = VSIw->bottom - s + 1; /* don't bother deleting more than scrolling region will hold */ /* find new tops of screen arrays */ if (s == 0 && n <= VSIw->lines) { /* element for line after last one being deleted */ ts = VSIw->linest[n]; } else { /* top line unaffected, or entire screen is being wiped */ ts = VSIw->linest[0]; } /* if */ TD = VSIw->linest[s]; /* topmost line to delete */ BD = VSIw->linest[s + n - 1]; /* bottommost line to delete */ TI = VSIw->linest[VSIw->bottom]; /* insert replacement blank lines after this line */ BI = TI->next; /* insert them before this line (might be nil) */ itt = TD; /* start of text lines to be blanked out */ /* the space taken by the deleted lines will be reused for the inserted blank lines */ if (TD != BI && TI != BD) /* insertion and deletion areas not adjacent -- move the lines to their new position */ VSIlistmove(TD, BD, TI, BI); for (i = 0; i < n; i++) { ta = itt->attr; tt = itt->text; for (j = 0; j <= VSIw->allwidth; j++) { *tt++ = ' '; *ta++ = VSIclrattrib; } /* for */ itt = itt->next; } /* for */ VSIw->scrntop = ts; /* new topmost line (if it's changed) */ /* re-sync screen arrays */ VSIlistndx(ts); if (VSIw->Rtop >= 0) /* make sure vistop still points to same line position on screen that it did before */ VSIw->vistop = VSIw->linest[VSIw->Rtop]; /* and actually display the change on-screen */ VSIcdellines(VSIwn, s, VSIw->bottom, n, -1); /* Cancel current selection */ } /* VSIdellines */ void VSOdellines ( short n, /* nr lines to delete */ short s /* starting line to delete, -ve => line containing cursor */ ) /* deletes lines from the screen, scrolling up the remainder and inserting new blank lines at the bottom of the scrolling region. */ { short i, j; char *tt; unsigned short *ta; VSlinePtr as, ts, TD, BD, TI, BI, itt, ita; if (s < 0) s = VSIw->y; if (s + n - 1 > VSIw->bottom) n = VSIw->bottom - s + 1; /* don't bother deleting more than scrolling region will hold */ /* find new tops of screen arrays */ if (s == 0 && n <= VSIw->lines) { /* element for line after last one being deleted */ ts = VSIw->linest[n]; as = (VSlinePtr)VSIw->attrst[n]; } else { /* top line unaffected, or entire screen is being wiped */ ts = VSIw->linest[0]; as = (VSlinePtr)VSIw->attrst[0]; } /* if */ TD = VSIw->linest[s]; /* topmost line to delete */ BD = VSIw->linest[s + n - 1]; /* bottommost line to delete */ TI = VSIw->linest[VSIw->bottom]; /* insert replacement blank lines after this line */ BI = TI->next; /* insert them before this line (might be nil) */ itt = TD; /* start of text lines to be blanked out */ /* the space taken by the deleted lines will be reused for the inserted blank lines */ if (TD != BI && TI != BD) /* insertion and deletion areas not adjacent -- move the lines to their new position */ VSIlistmove(TD, BD, TI, BI); TD = (VSlinePtr)VSIw->attrst[s]; /* topmost line to delete */ BD = (VSlinePtr)VSIw->attrst[s + n - 1]; /* bottommost line to delete */ TI = (VSlinePtr)VSIw->attrst[VSIw->bottom]; /* insert new lines after this one */ BI = TI->next; /* insert them before this line */ /* perform same rearrangement on attribute lines as on text lines */ if (TD != BI && TI != BD) /* insertion and deletion areas not adjacent -- move the lines to their new position */ VSIlistmove(TD, BD, TI, BI); /* blank out the newly-created replacement lines */ ita = TD; /* start of attribute lines to be blanked out */ for (i = 0; i < n; i++) { ta = ((VSattrlinePtr)ita)->text; tt = itt->text; for (j = 0; j <= VSIw->allwidth; j++) { *tt++ = ' '; *ta++ = VSIclrattrib; } /* for */ ita = ita->next; itt = itt->next; } /* for */ VSIw->scrntop = ts; /* new topmost line (if it's changed) */ /* re-sync screen arrays */ VSOlistndx(ts, (VSattrlinePtr)as); if (VSIw->Rtop >= 0) /* make sure vistop still points to same line position on screen that it did before */ VSIw->vistop = VSIw->linest[VSIw->Rtop]; /* and actually display the change on-screen */ VSIcdellines(VSIwn, s, VSIw->bottom, n, -1); /* Cancel current selection */ } /* VSOdellines */ void VSIinslines ( short n, /* how many to insert */ short s /* where to insert them, -ve => line containing cursor */ ) /* inserts the specified number of blank lines, scrolling the remaining ones down, and dropping off any that fall off the end of the scrolling region. */ { short i, j; char *tt; unsigned short *ta; VSlinePtr ts, TD, BD, TI, BI, itt; if (VSIw->oldScrollback) { VSOinslines(n, s); return; } if (s < 0) s = VSIw->y; if (s + n - 1 > VSIw->bottom) /* don't bother inserting more than scrolling region can hold */ n = VSIw->bottom - s + 1; /* find new tops of screen arrays */ if (s == 0 && n <= VSIw->lines) { /* element for first blank line being inserted */ ts = VSIw->linest[VSIw->bottom - n + 1]; } else { /* top line unaffected, or entire screen is being wiped */ ts = VSIw->linest[0]; } /* if */ BI = VSIw->linest[s]; /* insert blank lines before this one */ TI = BI->prev; /* insert them after this one */ TD = VSIw->linest[VSIw->bottom - n + 1]; /* topmost line to delete */ BD = VSIw->linest[VSIw->bottom]; /* bottommost line to delete */ itt = TD; /* start of text lines to be blanked out */ /* the space occupied by the deleted lines will be reused for the new blank lines */ if (TD != BI && TI != BD) /* new and deleted lines not contiguous -- move the space to its new position */ VSIlistmove(TD, BD, TI, BI); /* blank out the newly-inserted lines */ for (i = 0; i < n; i++) { tt = itt->text; ta = itt->attr; for (j = 0; j <= VSIw->allwidth; j++) { *tt++ = ' '; *ta++ = VSIclrattrib; } itt = itt->next; } /* for */ VSIw->scrntop = ts; VSIlistndx(ts); /* re-sync screen arrays */ if (VSIw->Rtop >= 0) /* make sure vistop still points to same line position on screen that it did before */ VSIw->vistop = VSIw->linest[VSIw->Rtop]; /* update display to match reality */ VSIcinslines(VSIwn, s, VSIw->bottom, n, -1); /* Destroy selection area if this is called tooo */ } /* VSIinslines */ void VSOinslines ( short n, /* how many to insert */ short s /* where to insert them, -ve => line containing cursor */ ) /* inserts the specified number of blank lines, scrolling the remaining ones down, and dropping off any that fall off the end of the scrolling region. */ { short i, j; char *tt; unsigned short *ta; VSlinePtr ts, TD, BD, TI, BI, itt; VSattrlinePtr as, aTD, aBD, aTI, aBI, ita; if (s < 0) s = VSIw->y; if (s + n - 1 > VSIw->bottom) /* don't bother inserting more than scrolling region can hold */ n = VSIw->bottom - s + 1; /* find new tops of screen arrays */ if (s == 0 && n <= VSIw->lines) { /* element for first blank line being inserted */ ts = VSIw->linest[VSIw->bottom - n + 1]; as = VSIw->attrst[VSIw->bottom - n + 1]; } else { /* top line unaffected, or entire screen is being wiped */ ts = VSIw->linest[0]; as = VSIw->attrst[0]; } /* if */ BI = VSIw->linest[s]; /* insert blank lines before this one */ TI = BI->prev; /* insert them after this one */ TD = VSIw->linest[VSIw->bottom - n + 1]; /* topmost line to delete */ BD = VSIw->linest[VSIw->bottom]; /* bottommost line to delete */ itt = TD; /* start of text lines to be blanked out */ /* the space occupied by the deleted lines will be reused for the new blank lines */ if (TD != BI && TI != BD) /* new and deleted lines not contiguous -- move the space to its new position */ VSIlistmove(TD, BD, TI, BI); aBI = VSIw->attrst[s]; /* insert new lines before this one */ aTI = aBI->prev; /* insert them after this one */ aTD = VSIw->attrst[VSIw->bottom - n + 1]; /* topmost line to delete */ aBD = VSIw->attrst[VSIw->bottom]; /* bottommost line to delete */ /* do the same rearrangement on the attribute lines */ if (aTD != aBI && aTI != aBD) /* new and deleted lines not contiguous -- move the space to its new position */ VSIlistmove((VSlinePtr)aTD, (VSlinePtr)aBD, (VSlinePtr)aTI, (VSlinePtr)aBI); /* blank out the newly-inserted lines */ ita = aTD; /* start of attribute lines to be blanked out */ for (i = 0; i < n; i++) { tt = itt->text; ta = ita->text; for (j = 0; j <= VSIw->allwidth; j++) { *tt++ = ' '; *ta++ = VSIclrattrib; } itt = itt->next; ita = ita->next; } /* for */ VSIw->scrntop = ts; VSOlistndx(ts, as); /* re-sync screen arrays */ if (VSIw->Rtop >= 0) /* make sure vistop still points to same line position on screen that it did before */ VSIw->vistop = VSIw->linest[VSIw->Rtop]; /* update display to match reality */ VSIcinslines(VSIwn, s, VSIw->bottom, n, -1); /* Destroy selection area if this is called tooo */ } /* VSOinslines */ void VSIscroll ( void ) /* scrolls scrolling region up one line. */ { register char *temp; register unsigned short *tempa; static VSlinePtr tmp, tmp2, tmp3, tmp4; register short i; short theBottom; /* NCSA 2.5: the correct screen bottom */ if (VSIw->y > VSIw->lines) /* BYU - replaces BYU modification below */ return; /* BYU */ if (VSIw->oldScrollback) { VSOscroll(); return; } if ((!VSIw->savelines) /* no scrollback */ || (VSIw->top != 0) /* NCSA 2.5 */ || ((VSIw->bottom != VSIw->lines) && !VSIw->forcesave)) /* NCSA 2.5 */ /* region being scrolled is not entire screen */ /* no saving of lines */ VSIdellines(1, VSIw->top); else { /* scrolling region is entire screen, and lines are being saved off top */ if (VSIw->linest[VSIw->lines]->next == 0L) { /* all currently-allocated scrollback lines have been used, but scrollback buffer isn't at its full size -- allocate some more space */ i = VSIw->maxlines - VSIw->numlines; /* number of lines that can be allocated */ if (i > ScrollbackQuantum) i = ScrollbackQuantum; /* don't bother allocating more than this at once */ if ((i > 0) && (tmp = VSInewlines(i)) != 0L) { /* link newly-allocated lines into the list */ VSIw->linest[VSIw->lines]->next = tmp; tmp->prev = VSIw->linest[VSIw->lines]; VSIw->numlines++; /* use one of the newly-allocated scrollback lines */ RSbufinfo(VSIwn, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* update vertical scroll bar accordingly */ } else { /* not enough memory to extend scrollback buffer--reuse oldest line and give up on future extensions */ VSIw->linest[VSIw->lines]->next = VSIw->buftop; /* Make it circular */ VSIw->buftop->prev = VSIw->linest[VSIw->lines]; VSIw->buftop = VSIw->buftop->next; /* step one forward */ } /* if */ } else { /* either there's allocated, but not yet used, space at VSIw->linest[VSIw->lines]->next, or the text line list is circular. Either way, don't do any new scrollback allocation. */ if (VSIw->linest[VSIw->lines]->next == VSIw->buftop) /* scrollback buffer is at full size--reuse oldest line */ VSIw->buftop = VSIw->buftop->next; else { /* haven't used up all the space I allocated last time */ VSIw->numlines++; /* count another line */ RSbufinfo(VSIwn, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* update vertical scroll bar accordingly */ } /* if */ } /* if */ VSIw->scrntop = VSIw->scrntop->next; /* scroll the screen buffer */ VSIlistndx(VSIw->scrntop); /* update screen arrays */ /* reflect the change in the display by scrolling up the visible part of the on-screen area, if any */ if (VSIw->forcesave) theBottom = VSIw->bottom; /* NCSA 2.5: get the correct scroll rgn */ else theBottom = VSIw->Rbottom; /* NCSA 2.5: just use whole screen */ if (VSIcdellines(VSIwn, VSIw->Rtop, theBottom, 1, 1)) /* NCSA 2.5 */ { /* no part of on-screen area is visible */ if (VSIw->Rtop > -VSIw->numlines) /* update bounds of visible region to be consistent with portion of scrollback buffer still being displayed */ { VSIw->Rtop--; VSIw->Rbottom--; } else { /* displaying right from top of scrollback buffer. Topmost line being shown has in fact vanished. Update the display to show this fact. */ VSIw->vistop = VSIw->vistop->next; RSdellines(VSIwn, 0, VSIw->Rbottom - VSIw->Rtop, 1, 1); } /* if */ } else VSIw->vistop = VSIw->vistop->next; /* consistent with changed display */ /* blank out newly-revealed bottom line */ tempa = VSIw->linest[VSIw->lines]->attr; temp = VSIw->linest[VSIw->lines]->text; for (i = 0; i <= VSIw->allwidth; i++) { *temp++ = ' '; *tempa++ = 0; } /* for */ // RAB BetterTelnet 1.2.1 - another bug fix for NCSA's insanity! if (VSIw->bottom != VSIw->lines) { // we're forcesaving here... tmp = VSIw->linest[VSIw->lines]->next; tmp2 = VSIw->linest[VSIw->lines]; tmp3 = VSIw->linest[VSIw->bottom]; tmp4 = VSIw->linest[VSIw->lines]->prev; VSIw->linest[VSIw->bottom]->prev->next = tmp2; tmp2->prev = VSIw->linest[VSIw->bottom]->prev; tmp2->next = tmp3; tmp3->prev = tmp2; tmp4->next = tmp; if (tmp4->next) tmp4->next->prev = tmp4; if (VSIw->scrntop == VSIw->linest[VSIw->bottom]) VSIw->scrntop = tmp2; VSIlistndx(VSIw->scrntop); } } /* if */ // if (RSisInFront(VSIwn)) // RSvalidateRect(VSIwn); } /* VSIscroll */ void VSOscroll ( void ) /* scrolls scrolling region up one line. */ { register char *temp; register unsigned short *tempa; register short i; short theBottom; /* NCSA 2.5: the correct screen bottom */ static VSlinePtr tmp, tmp2, tmp3, tmp4; if (VSIw->y > VSIw->lines) /* BYU - replaces BYU modification below */ return; /* BYU */ if ((!VSIw->savelines) /* no scrollback */ || (VSIw->top != 0) /* NCSA 2.5 */ || ((VSIw->bottom != VSIw->lines) && !VSIw->forcesave)) /* NCSA 2.5 */ /* region being scrolled is not entire screen */ /* no saving of lines */ VSOdellines(1, VSIw->top); else { /* scrolling region is entire screen, and lines are being saved off top */ if (VSIw->linest[VSIw->lines]->next == 0L) { /* all currently-allocated scrollback lines have been used, but scrollback buffer isn't at its full size -- allocate some more space */ i = VSIw->maxlines - VSIw->numlines; /* number of lines that can be allocated */ if (i > ScrollbackQuantum) i = ScrollbackQuantum; /* don't bother allocating more than this at once */ if ((i > 0) && (tmp = VSOnewlines(i,1)) != 0L) { /* link newly-allocated lines into the list */ VSIw->linest[VSIw->lines]->next = tmp; tmp->prev = VSIw->linest[VSIw->lines]; VSIw->numlines++; /* use one of the newly-allocated scrollback lines */ RSbufinfo(VSIwn, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* update vertical scroll bar accordingly */ } else { /* not enough memory to extend scrollback buffer--reuse oldest line and give up on future extensions */ VSIw->linest[VSIw->lines]->next = VSIw->buftop; /* Make it circular */ VSIw->buftop->prev = VSIw->linest[VSIw->lines]; VSIw->buftop = VSIw->buftop->next; /* step one forward */ } /* if */ } else { /* either there's allocated, but not yet used, space at VSIw->linest[VSIw->lines]->next, or the text line list is circular. Either way, don't do any new scrollback allocation. */ if (VSIw->linest[VSIw->lines]->next == VSIw->buftop) /* scrollback buffer is at full size--reuse oldest line */ VSIw->buftop = VSIw->buftop->next; else { /* haven't used up all the space I allocated last time */ VSIw->numlines++; /* count another line */ RSbufinfo(VSIwn, VSIw->numlines, VSIw->Rtop, VSIw->Rbottom); /* update vertical scroll bar accordingly */ } /* if */ } /* if */ VSIw->scrntop = VSIw->scrntop->next; /* scroll the screen buffer */ VSOlistndx(VSIw->scrntop, VSIw->attrst[1]); /* update screen arrays */ /* reflect the change in the display by scrolling up the visible part of the on-screen area, if any */ if (VSIw->forcesave) theBottom = VSIw->bottom; /* NCSA 2.5: get the correct scroll rgn */ else theBottom = VSIw->Rbottom; /* NCSA 2.5: just use whole screen */ if (VSIcdellines(VSIwn, VSIw->Rtop, theBottom, 1, 1)) /* NCSA 2.5 */ { /* no part of on-screen area is visible */ if (VSIw->Rtop > -VSIw->numlines) /* update bounds of visible region to be consistent with portion of scrollback buffer still being displayed */ { VSIw->Rtop--; VSIw->Rbottom--; } else { /* displaying right from top of scrollback buffer. Topmost line being shown has in fact vanished. Update the display to show this fact. */ VSIw->vistop = VSIw->vistop->next; RSdellines(VSIwn, 0, VSIw->Rbottom - VSIw->Rtop, 1, 1); } /* if */ } else VSIw->vistop = VSIw->vistop->next; /* consistent with changed display */ /* blank out newly-revealed bottom line */ tempa = VSIw->attrst[VSIw->lines]->text; temp = VSIw->linest[VSIw->lines]->text; for (i = 0; i <= VSIw->allwidth; i++) { *temp++ = ' '; *tempa++ = 0; } /* for */ // RAB BetterTelnet 1.2.1 - Return of the Bug Fix! if (VSIw->bottom != VSIw->lines) { // we're forcesaving here... tmp = VSIw->linest[VSIw->lines]->next; tmp2 = VSIw->linest[VSIw->lines]; tmp3 = VSIw->linest[VSIw->bottom]; tmp4 = VSIw->linest[VSIw->lines]->prev; VSIw->linest[VSIw->bottom]->prev->next = tmp2; tmp2->prev = VSIw->linest[VSIw->bottom]->prev; tmp2->next = tmp3; tmp3->prev = tmp2; tmp4->next = tmp; if (tmp4->next) tmp4->next->prev = tmp4; if (VSIw->scrntop == VSIw->linest[VSIw->bottom]) VSIw->scrntop = tmp2; // now for the attribute lines... VSIw->attrst[VSIw->lines]->next->prev = VSIw->attrst[VSIw->lines]->prev; VSIw->attrst[VSIw->lines]->prev->next = VSIw->attrst[VSIw->lines]->next; VSIw->attrst[VSIw->bottom]->prev->next = VSIw->attrst[VSIw->lines]; VSIw->attrst[VSIw->lines]->prev = VSIw->attrst[VSIw->bottom]->prev; VSIw->attrst[VSIw->lines]->next = VSIw->attrst[VSIw->bottom]; VSIw->attrst[VSIw->bottom]->prev = VSIw->attrst[VSIw->lines]; VSOlistndx(VSIw->scrntop, VSIw->attrst[0]); } } /* if */ // if (RSisInFront(VSIwn)) // RSvalidateRect(VSIwn); } /* VSOscroll */ void VSIindex ( void ) /* moves cursor down one line, unless it's at the bottom of the scrolling region, in which case scrolls up one. */ { if (VSIw->y == VSIw->bottom) /* BYU - changed "==" to ">=" and back again */ VSIscroll(); else if (VSIw->y < VSIw->lines) /* BYU - added "if ... " */ VSIw->y++; } /* VSIindex */ void VSIwrapnow(short *xp, short *yp) /* checks current cursor position for VSIw to see if it's within bounds, wrapping to next line if not. Returns correct cursor position in either case in *xp and *yp. */ { if (VSIw->x > VSIw->maxwidth) { VSIw->x = 0; VSIindex(); } /* if */ *xp = VSIw->x; *yp = VSIw->y; } /* VSIwrapnow */ void VSIeeol ( void ) /* erases characters to the end of the current line. */ { char *tt; unsigned short *ta; short x1 = VSIw->x, y1 = VSIw->y, x2 = VSIw->maxwidth, y2 = VSIw->y, n = -1, offset; short i; if ((VSIw->x == 0)&&(VSIw->y == 0)&&(VSIw->possibleForce == 1)) { VSIw->possibleForce = 0; VSIscroff(); } VSIwrapnow(&x1, &y1); y2 = y1; /* clear out screen line */ if (VSIw->oldScrollback) ta = &VSIw->attrst[y1]->text[x1]; else ta = &VSIw->linest[y1]->attr[x1]; tt = &VSIw->linest[y1]->text[x1]; for (i = VSIw->allwidth - x1 + 1; i > 0; i--) { *ta++ = VSIclrattrib; *tt++ = ' '; } /* update display */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); } /* VSIeeol */ void VSIdelchars ( short x /* how many characters to delete */ ) /* deletes characters at the current cursor position onwards, moving the remainder of the line to the left. */ { short i; short x1 = VSIw->x, y1 = VSIw->y, x2 = VSIw->maxwidth, y2 = VSIw->y, n = -1, offset; char *temp; unsigned short *tempa; VSIwrapnow(&x1, &y1); y2 = y1; if (x > VSIw->maxwidth) x = VSIw->maxwidth; if (VSIw->oldScrollback) tempa = VSIw->attrst[y1]->text; else tempa = VSIw->linest[y1]->attr; temp = VSIw->linest[y1]->text; for (i = x1; i <= VSIw->maxwidth - x; i++) { /* move remainder of line to the left */ temp[i] = temp[x + i]; tempa[i] = tempa[x + i]; } for (i = VSIw->maxwidth - x + 1; i <= VSIw->allwidth; i++) { /* insert blank characters after end of line */ temp[i] = ' '; tempa[i] = VSIclrattrib; } /* update display */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSdelchars(VSIwn, x1, y1, x); } /* VSIdelchars */ void VSIfreelinelist ( VSlinePtr listhead ) /* frees up the list of line elements pointed to by listhead. */ { register VSlinePtr ThisElt, NextElt, ToFree; ThisElt = listhead; ToFree = nil; while (true) { if (ThisElt == nil) break; NextElt = ThisElt->next; if (ThisElt->mem) { ThisElt->next = ToFree; ToFree = ThisElt; } /* if */ ThisElt = NextElt; if (ThisElt == listhead) break; } /* while */ while (ToFree) { NextElt = ToFree->next; DisposPtr((Ptr) ToFree); if (VSIw->oldScrollback) DisposPtr((Ptr) ToFree->text); ToFree = NextElt; } /* while */ } /* VSIfreelinelist */ void VSIfreelines ( void ) /* frees up all the memory allocated for screen and scrollback text lines for the current screen. */ { VSIfreelinelist(VSIw->buftop); } /* VSIfreelines */ void VSIrindex ( void ) /* moves cursor up one line, unless it's at the top of the scrolling region, in which case scrolls down one. */ { if (VSIw->y == VSIw->top) VSIinslines(1, VSIw->top); else VSIw->y--; } /* VSIrindex */ void VSIebol ( void ) /* erases characters from beginning of line to cursor. */ { char *tt; unsigned short *ta; short x1 = 0, y1 = VSIw->y, x2 = VSIw->x, y2 = VSIw->y, n = -1, offset; short i; VSIwrapnow(&x2, &y1); y2 = y1; /* clear from beginning of line to cursor */ if (VSIw->oldScrollback) ta = &VSIw->attrst[y1]->text[0]; else ta = &VSIw->linest[y1]->attr[0]; tt = &VSIw->linest[y1]->text[0]; for (i = 0; i <= x2; i++) { *ta++ = VSIclrattrib; *tt++ = ' '; } /* update display */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); } /* VSIebol */ void VSIel ( short s /* line to clear, -ve => line containing cursor */ ) /* erases the specified line. */ { char *tt; unsigned short *ta; short x1 = 0, y1 = s, x2 = VSIw->maxwidth, y2 = s, n = -1, offset; short i; if (s < 0) { VSIwrapnow(&x1, &y1); s = y2 = y1; x1 = 0; } /* clear out line */ if (VSIw->oldScrollback) ta = &VSIw->attrst[s]->text[0]; else ta = &VSIw->linest[s]->attr[0]; tt = &VSIw->linest[s]->text[0]; for(i = 0; i <= VSIw->allwidth; i++) { *ta++ = VSIclrattrib; *tt++ = ' '; } /* update display */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); } /* VSIel */ void VSIeeos ( void ) /* erases characters from cursor to end of screen. */ { short i; short x1 = 0, y1 = VSIw->y + 1, x2 = VSIw->maxwidth, y2 = VSIw->lines, n = -1, offset; VSIwrapnow(&x1, &y1); y1++; x1 = 0; i = y1; if ((VSIw->forcesave)&&(VSIw->y == 0)&&(VSIw->x == 0)) //trashes screen unless we are in 0,0 VSIscroff(); VSIw->possibleForce = FALSE; //CCP better forcesave stuff /* erase complete lines from screen */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); /* blank out current line from cursor to end */ VSIeeol(); /* this also erases the partial line on-screen */ /* blank out remaining lines to end of screen */ while (i <= VSIw->lines) { VSIelo(i); i++; } /* while */ if (VSIw->y < VSIw->lines && (VSIw->x <= VSIw->maxwidth)) /* erase the partial line (what--again??) */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); } /* VSIeeos */ void VSIebos ( void ) /* erases characters from beginning of screen to cursor. */ { short i; short x1, y1, x2 = VSIw->maxwidth, y2, n = -1, offset; VSIwrapnow(&x1, &y1); y2 = y1 - 1; x1 = 0; y1 = 0; /* blank out current line from beginning to cursor */ VSIebol(); /* this also erases the partial line on-screen */ i = 0; /* blank out remaining lines from beginning of screen to previous line */ while (i < (y2 + 1)) { VSIelo(i); i++; } if (y2 >= 0) /* erase the partial line (what--again??) */ if (!VSIclip(&x1, &y1, &x2, &y2, &n, &offset)) RSerase(VSIwn, x1, y1, x2, y2); } /* VSIebos */ void VSIrange ( void ) /* constrains cursor position to valid range (somewhere on the screen). */ { short wrap = 0; if (VSIw->DECAWM) wrap = 1; if (VSIw->x < 0) VSIw->x = 0; if (VSIw->x > (VSIw->maxwidth + wrap)) VSIw->x = VSIw->maxwidth + wrap; if (VSIw->y < 0) VSIw->y = 0; if (VSIw->y > VSIw->lines) VSIw->y = VSIw->lines; } /* VSIrange */ void VTsendpos ( void ) /* sends an escape sequence representing the current cursor position. */ { char tempbuf[19]; short x = VSIw->x, y = VSIw->y; if (x > VSIw->maxwidth) { /* autowrap pending */ x = 0; y++; } if (y > VSIw->lines) /* scroll pending (because of the autowrap) */ y = VSIw->lines; sprintf(tempbuf, "\033[%d;%dR", y + 1, x + 1); RSsendstring(VSIwn, tempbuf, strlen(tempbuf)); } /* VTsendpos */ void VTsendstat ( void ) /* sends the terminal status string. */ { RSsendstring(VSIwn, "\033[0n", 4); } /* VTsendstat */ void VTsendident ( void ) /* sends an appropriate terminal identification sequence. */ { if (screens[findbyVS(VSIwn)].vtemulation) RSsendstring(VSIwn, "\033[?62;1;6c", 10); /* BYU 2.4.12 - VT200-series*/ else /* BYU 2.4.12 */ RSsendstring(VSIwn, "\033[?6c", 5); /* BYU 2.4.12 - VT102 */ } /* VTsendident */ void VTalign ( void ) /* fills screen with uppercase "E"s, for checking screen alignment. */ /* Yeah, right. */ { char *tt; short i, j; VSIes(); /* erase the screen */ for (j = 0; j < VSIw->lines; j++) { tt = &VSIw->linest[j]->text[0]; for (i = 0; i <= VSIw->maxwidth; i++) *tt++ = 'E'; } /* for */ /* update the display */ VSredraw(VSIwn, 0, 0, (VSIw->Rright - VSIw->Rleft), (VSIw->Rbottom - VSIw->Rtop)); } /* VTalign */ void VSIapclear ( void ) /* initializes all the parameters for the current control sequence, and the current param index, to zero. */ { short parmptr = maxparms; while (--parmptr >= 0) VSIw->parms[parmptr] = -1; VSIw->parmptr = 0; } /* VSIapclear */ void VSIsetoption ( short toggle /* 1 => set, 0 => reset */ ) /* sets/resets various options, as specified by the parms in the current control sequence. Note that this implementation will not set/reset more than one option at a time! */ { short WindWidth = VSIw->Rright - VSIw->Rleft; switch (VSIw->parms[0]) { case -2: /* DEC-private control sequence */ switch (VSIw->parms[1]) { case 1: /* cursor-key mode */ VSIw->DECCKM = toggle; break; case 3: /* 80/132 columns */ // VSIw->x = VSIw->y = 0; /* home cursor */ // VSIes(); /* and clear screen */ if (toggle) /* 132 column mode */ { /* NCSA: SB */ VSIw->maxwidth = 131; /* NCSA: SB */ RScalcwsize(VSIwn,132); /* NCSA: SB */ } /* NCSA: SB */ else /* NCSA: SB */ { /* NCSA: SB */ VSIw->maxwidth = 79; /* NCSA: SB */ RScalcwsize(VSIwn,80); /* NCSA: SB */ } /* NCSA: SB */ /* update scroll bars */ RSmargininfo(VSIwn, VSIw->maxwidth, VSIw->Rleft); /* NCSA: SB */ break; /* NCSA: SB - this next one will allow us to flip the foreground and */ /* background colors. */ case 5: /* NCSA: SB - screen mode */ RSbackground(VSIwn,toggle); break; case 6: /* origin mode */ VSIw->DECORG = toggle; break; case 7: /* autowrap mode */ VSIw->DECAWM = toggle; break; case 25: /* cursor mode */ VSIw->DECCM = toggle; break; default: break; } /* switch */ break; case 4: /* insert/replace character writing mode */ VSIw->IRM = toggle; break; default: break; } /* switch */ } /* VSIsetoption */ void VSItab //BUGG ( void ) /* advances VSIw->x to the next tab position. */ { VSIw->x += VSIgetNextTabDistance(); } /* VSItab */ void VSIinschar ( short x /* number of blanks to insert */ ) /* inserts the specified number of blank characters at the current cursor position, moving the rest of the line along, losing any characters that fall off the right margin. Does not update the display. */ { short i, j; char *temp; unsigned short *tempa; VSIwrapnow(&i, &j); if (VSIw->oldScrollback) tempa = VSIw->attrst[VSIw->y]->text; else tempa = VSIw->linest[VSIw->y]->attr; temp = VSIw->linest[VSIw->y]->text; for (i = VSIw->maxwidth - x; i >= VSIw->x; i--) { /* move along remaining characters on line */ temp[x + i] =temp[i]; tempa[x + i] = tempa[i]; } /* for */ for (i = VSIw->x; i < VSIw->x + x; i++) { /* insert appropriate number of blanks */ temp[i] = ' '; tempa[i] = VSIclrattrib; } /* for */ } /* VSIinschar */ void VSIinsstring ( short len, char *start ) /* updates the screen to show insertion of a string of characters at the current cursor position. The text has already been inserted into the screen buffer. Also, the cursor position has already been updated, so the part needing redrawing begins at column (VSIw->x - len). */ { RSinsstring(VSIwn, VSIw->x - len, VSIw->y, VSIw->attrib, len, start); } /* VSIinsstring */ void VSIsave ( void ) /* saves the current cursor position and attribute settings. */ { VSIw->Px = VSIw->x; VSIw->Py = VSIw->y; VSIw->Pattrib = VSIw->attrib; } /* VSIsave */ void VSIrestore ( void ) /* restores the last-saved cursor position and attribute settings. */ { if (VSIw->Pattrib < 0) /* no previous save */ return; VSIw->x = VSIw->Px; VSIw->y = VSIw->Py; VSIrange(); VSIw->attrib = VSinattr(VSIw->Pattrib); /* hmm, this will clear the graphics character set selection */ } /* VSIrestore */ void VSIdraw ( short VSIwn, /* window number */ short x, /* starting column */ short y, /* line on which to draw */ short a, /* text attributes */ short len, /* length of text to draw */ char *c /* pointer to text */ ) /* displays a piece of text (assumed to fit on a single line) on a screen, using the specified attributes, and clipping to the current visible region. Highlights any part of the text lying within the current selection. */ { short x2, y2, offset; if (!VSIclip(&x, &y, &x2, &y2, &len, &offset)) RSdraw(VSIwn, x, y, a, len, (char *) (c + offset)); /* BYU LSC */ } /* VSIdraw */ \ No newline at end of file diff --git a/source/Screens/vsintern.proto.h b/source/Screens/vsintern.proto.h new file mode 100755 index 0000000..14c8c5b --- /dev/null +++ b/source/Screens/vsintern.proto.h @@ -0,0 +1 @@ + /* vsintern.c */ short VSIclip(short *x1, short *y1, short *x2, short *y2, short *n, short *offset); short VSIcdellines(short w, short top, short bottom, short n, short scrolled); short VSIcinslines(short w, short top, short bottom, short n, short scrolled); void VSIcurson(short w, short x, short y, short ForceMove); void VSIcuroff(short w); short VSIcursorvisible(void); VSlineArray VSInewlinearray(short nrlines); VSlinePtr VSInewlines(short nlines); VSlinePtr VSOnewlines(short, short); void VSIlistndx(register VSlinePtr ts); void VSOlistndx(register VSlinePtr ts, register VSattrlinePtr as); void VSIscroff(void); void VSOscroff(void); void VSIelo(short s); void VSIes(void); void VSItabclear(void); void VSItabinit(void); void VSIreset(void); void VSIlistmove(VSlinePtr TD, VSlinePtr BD, VSlinePtr TI, VSlinePtr BI); void VSIdellines(short n, short s); void VSIinslines(short n, short s); void VSOdellines(short n, short s); void VSOinslines(short n, short s); void VSIscroll(void); void VSOscroll(void); void VSIindex(void); void VSIwrapnow(short *xp, short *yp); void VSIeeol(void); void VSIdelchars(short x); void VSIfreelinelist(VSlinePtr listhead); void VSIfreelines(void); void VSIrindex(void); void VSIebol(void); void VSIel(short s); void VSIeeos(void); void VSIebos(void); void VSIrange(void); void VTsendpos(void); void VTsendstat(void); void VTsendident(void); void VTalign(void); void VSIapclear(void); void VSIsetoption(short toggle); void VSItab(void); void VSIinschar(short x); void VSIinsstring(short len, char *start); void VSIsave(void); void VSIrestore(void); void VSIdraw(short VSIwn, short x, short y, short a, short len, char *c); \ No newline at end of file diff --git a/source/Screens/vskeys.h b/source/Screens/vskeys.h new file mode 100755 index 0000000..4a90afc --- /dev/null +++ b/source/Screens/vskeys.h @@ -0,0 +1 @@ +/* * %W% (NCSA) %G% * * Virtual Screen Kernel Keys and Attribute Definitions * * National Center for Supercomputing Applications * by Gaige B. Paulsen * * This file contains equates used by the program for specification of * special Keyboard characters and definition of the Attribute byte. * * Version Date Notes * ------- ------ --------------------------------------------------- * 0.01 861102 Initial coding -GBP * 2.1 871130 NCSA Telnet 2.1 -GBP * 2.2 880715 NCSA Telnet 2.2 -GBP * */ /* internal codes for identifying special keys */ #define VSF10 96 /* Function key 10 */ /* Mac Key F5 */ /* BYU 2.4.12 */ #define VSF11 97 /* Function key 11 */ /* Mac Key F6 */ /* BYU 2.4.12 */ #define VSF12 98 /* Function key 12 */ /* Mac Key F7 */ /* BYU 2.4.12 */ #define VSF8 99 /* Function key 8 */ /* Mac Key F3 */ /* BYU 2.4.12 */ #define VSF13 100 /* Function key 13 */ /* Mac Key F8 */ /* BYU 2.4.12 */ #define VSF14 101 /* Function key 14 */ /* Mac Key F9 */ /* BYU 2.4.12 */ #define VSF16 103 /* Function key 16 */ /* Mac Key F11 */ /* BYU 2.4.12 */ #define VSF18 105 /* Function key 18 */ /* Mac Key F13 */ /* BYU 2.4.12 */ #define VSF19 107 /* Function key 19 */ /* Mac Key F14 */ /* BYU 2.4.12 */ #define VSF15 109 /* Function key 15 */ /* Mac Key F10 */ /* BYU 2.4.12 */ #define VSF17 111 /* Function key 17 */ /* Mac Key F12 */ /* BYU 2.4.12 */ #define VSF20 113 /* Function key 20 */ /* Mac Key F15 */ /* BYU 2.4.12 */ #define VSHELP 114 /* Help */ /* BYU 2.4.12 */ #define VSHOME 115 /* Home */ /* BYU 2.4.12 */ #define VSPGUP 116 /* Page up */ /* BYU 2.4.12 */ #define VSDEL 117 /* Del */ /* BYU 2.4.12 */ #define VSF9 118 /* Function key 9 */ /* Mac Key F4 */ /* BYU 2.4.12 */ #define VSEND 119 /* End */ /* BYU 2.4.12 */ #define VSF7 120 /* Function key 7 */ /* Mac Key F2 */ /* BYU 2.4.12 */ #define VSPGDN 121 /* Page down */ /* BYU 2.4.12 */ #define VSF6 122 /* Function key 6 */ /* Mac Key F1 */ /* BYU 2.4.12 */ /* Following group is the "Cursor Control" keys */ #define VSUP 129 /* Up Arrow */ #define VSDN 130 /* Down Arrow */ #define VSRT 131 /* Right Arrow */ #define VSLT 132 /* Left Arrow */ /* Following group is the "Auxilliary Keypad" keys */ #define VSK0 133 /* Keypad 0 */ #define VSK1 134 /* Keypad 1 */ #define VSK2 135 /* Keypad 2 */ #define VSK3 136 /* Keypad 3 */ #define VSK4 137 /* Keypad 4 */ #define VSK5 138 /* Keypad 5 */ #define VSK6 139 /* Keypad 6 */ #define VSK7 140 /* Keypad 7 */ #define VSK8 141 /* Keypad 8 */ #define VSK9 142 /* Keypad 9 */ #define VSKC 143 /* Keypad , */ #define VSKM 144 /* Keypad - */ #define VSKP 145 /* Keypad . */ #define VSKE 146 /* Keypad Enter */ #define VSF1 147 /* Function 1 */ /* Mac Keypad Clear */ #define VSF2 148 /* Function 2 */ /* Mac Keypad = */ #define VSF3 149 /* Function 3 */ /* Mac Keypad / */ #define VSF4 150 /* Function 4 */ /* Mac Keypad * */ #ifdef VSMASTER char VSIkpxlate[2][23] = { "ABCD0123456789,-.\15PQRS", "ABCDpqrstuvwxylmnMPQRS" }; char VSIkpxlate2[] = "222122?2?3?3?2?3?3123425161"; /* BYU 2.4.12 */ char VSIkpxlate3[] = "134956?9?2?3?8?1?4~~~~0~8~7"; /* BYU 2.4.12 */ unsigned char VSIkplen[] = /* BYU 2.4.12 */ { 5,5,5,5,5,5,5,5,5,5, /* BYU 2.4.12 */ 5,5,5,5,5,5,5,5,4,4, /* BYU 2.4.12 */ 4,4,5,4,5,4,5 }; /* BYU 2.4.12 */ #else extern char *VSIkpxlate,*VSIkpxlate2,*VSIkpxlate2; /* BYU 2.4.12 */ extern unsigned char *VSIkplen; /* BYU 2.4.12 */ #endif /* * Definition of attribute bits in the Virtual Screen * * 0 - Bold * 1 - * 2 - * 3 - Underline * 4 - Blink * 5 - * 6 - Reverse * 7 - Graphics character set * 8 - bit 0 of ansi foreground color index * 9 - bit 1 of ansi foreground color index * 10 - bit 2 of ansi foreground color index * 11 - use ansi foreground color * 12 - bit 0 of ansi background color index * 13 - bit 1 of ansi background color index * 14 - bit 2 of ansi background color index * 15 - use ansi background color * */ #define VSa(x) ( 1 << ((x)-1) ) #define VSisbold(x) ((x) & 0x01) #define VSisundl(x) ((x) & 0x08) #define VSisblnk(x) ((x) & 0x10) #define VSisrev(x) ((x) & 0x40) #define VSisgrph(x) ((x) & 0x80) #define VSinattr(x) ((x) & 0xff) #define VSgraph(x) ((x) | 0x80) #define VSnotgraph(x) ((x) & 0x7F) #define VSisansifg(x) ((x) & 0x0800) #define VSisansibg(x) ((x) & 0x8000) #define VSisansi(x) ((x) & 0x8800) //#define VSisbold(x) (x & 0x01) //#define VSisundl(x) (x & 0x08) //#define VSisblnk(x) (x & 0x10) //#define VSisrev(x) (x & 0x40) //#define VSisgrph(x) (x & 0x80) //#define VSinattr(x) (x & 0xd9) //#define VSgraph(x) (x | 0x80) //#define VSnotgraph(x) (x & 0x7F) \ No newline at end of file diff --git a/source/Screens/wind.h b/source/Screens/wind.h new file mode 100755 index 0000000..6e8fdf6 --- /dev/null +++ b/source/Screens/wind.h @@ -0,0 +1 @@ +// // MacLook Window Management Data Structure Definition // #define MAXKB 256 // BYU mod #define PASTE_IN_PROGRESS 0x4000 // BYU LSC #define PASTE_DONE 0x0040 //CCP 2.7 // The following are for the "active" field. #define CNXN_NOTINUSE -2 #define CNXN_DNRWAIT -1 #define CNXN_ACTIVE 0 #define CNXN_OPENING 1 #define CNXN_ISCORPSE 2 #define MHOPTS_BASE 37 // Base option for {my,his}opts (Authenticate) // {my,his} opts should only be used for telnet options // in the range starting at MHOPTS_BASE and limited // by MHOPTS_SIZE. This saves memory. #define MHOPTS_SIZE 2 // Number of options supported in {my,his}opts #define SLC_ARRAY_SIZE 30 // This should match the value of SLC_MAX from parse.h struct WindRec { short vs, // virtual screen number port, // TCP/IP port number active, // See above for definition of possible values enabled, // Are we currently enabled for receive? vtemulation, // 0 = VT100, 1 = VT 220 bsdel, // backspace or delete is default eightbit, // eight bit font displayed (false is seven bit display national, // LU/MP: translation table to use for this connection arrowmap, // MAT: should we allow the arrow keys to be mapped?? showErrors, // show ALL errors if this is set pgupdwn, // JMB/MAT: should we have page up/down do local window movement? keypadmap, // CCP 2.7: should we have numeric keypad operators work like regular operators? emacsmeta, // JMB/SMB: should option key work as EMACS meta key? Xterm, // JMB/WNR: should Xterm sequences be recognized? remapCtrlD, // RAB BetterTelnet 1.0fc4: remap Del to ^D halfdup, // If true then half-duplex mode forcesave, // NCSA 2.5: force lines to be saved crmap, // BYU mod - CR's second byte is ... tekclear, // Does tektronix (1) clear screen or (0) add window tektype, // -1 = TEK not allowed, 0 = 4014, 1 = 4105 curgraph, // Associated Tek drawing qprint, // Queue print requests ignoreff, // RAB BetterTelnet 1.0fc8 - ignore FF maxscroll, // Requested amount of scroll back wrap, // whether vtwrap is set or not for this screen echo, // NOTE: this is backwards - I am echoing your chars ESscroll, // will Clear Screen Save Lines? ANSIgraphics, // ANSI color sequences (CCP 2.7) termstate, // Emulation State (-1 is none, 0 is VT100) // = TEKTYPE, send data to VGwrite // = RASTYPE, send data to VRwrite positionIndex, // CCP 2.7: for determining window placement naws, // NCSA: will negotiate NAWS lineAllow, // allow linemode? Isga, // I am supressing go ahead Usga, // You are supressing go ahead Ittype, // I am sending terminal type negotiations.. telstate, // Telnet State timing, // True if waiting for timing mark remote_flow, // true if they are dictating flow_control allow_flow, // true unless prior is true AND the host has told us to turn flow control off restart_any_flow,// true if any character (except XOFF) will restart flow substat, // Telnet Subnegot. State parseIndex, // save an index into the subnegotiation parsed data portNum, // port number from the application save set portNegative, // port number is negative: RAB BetterTelnet 1.0fc4 allowBold, // allow font boldfacing: RAB BetterTelnet 1.0fc4 colorBold, // use color for bold: RAB BetterTelnet 1.0fc4 realbold, ignoreBeeps, // ignore beeps: RAB BetterTelnet 1.0fc7 inversebold, // use inverse for bold: RAB BetterTelnet 1.0fc9 kblen, // Pointer to next char in buffer to be used clientflags; // BYU mod - boolean flags for ftp client short otpautostate, otpauto, otpnoprompt, otpmulti, otphex, otpautolength, otpsavepass, oldScrollback; char otpautobuffer[10], otppassword[64], otpautostring[256]; Str63 machine; // Name of machine we are connecting to Str32 answerback; // Message to send when server sends TERMTYPE Telnet option // The following are used during paste operations short outlen, // Length of text remaining to be pasted pastemethod, // 0 = All at once, 1 = in blocks of size pasteblock pastesize; // Size of paste "blocks" char *outptr, // Pointer to next char to send **outhand; // Handle to text from the Paste long incount, // BYU LSC - Count of bytes into this port outcount; // BYU LSC - Count of bytes out this port short isUploading, // RAB BetterTelnet 1.0fc9 - file upload in progress uploadRefNum; // RAB BetterTelnet 1.0fc9 - refNum for file upload //linemode options short litNext, // next key should be echo'd literal lmodeBits, // Current linemode MODE. Currently support EDIT and TRAPSIG lmode, // linemode is active forwardMask, // should we forward on certain characters numForwardKeys; // how many keys to forward on unsigned char slcLevel[SLC_ARRAY_SIZE+1], //levelBits forwardKeys[32],// which keys to forward on slc[SLC_ARRAY_SIZE+1]; //actual values char TELstop, // Character for scrolling to stop TELgo, // Character for scrolling to go TELip, // Character for interrupt process kbbuf[MAXKB]; // The keyboard buffer (echo mode ) GrafPtr wind; Handle myInitParams; // So we can look up stuff after we have DNS'd. Ptr aedata; unsigned char myopts[MHOPTS_SIZE], // My telnet options. Warning: see MHOPTS_BASE hisopts[MHOPTS_SIZE], // His telnet options. Warning: see MHOPTS_BASE parsedat[450]; // save the subnegotiation data here // must be big enough for a Kerberos AP message char cannon[80]; // Cannonical hostname Boolean authenticate, // true if authenticating connection wanted encrypt; // true if encrypting connection wanted }; typedef struct WindRec WindRec, * WindRecPtr; \ No newline at end of file diff --git a/source/Sets/Sets.c b/source/Sets/Sets.c new file mode 100755 index 0000000..5f2ce15 --- /dev/null +++ b/source/Sets/Sets.c @@ -0,0 +1 @@ +/* * Sets.c * All code relating to loading, parsing, and saving of sets * ***************************************************************** * Revisions: * 7/92 Telnet 2.6: Code moved here from config.c and maclook.c... Jim Browne */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Files #endif #define SAVE_SET_STRINGS_COUNT 73 #include "macros.proto.h" #include "wind.h" /* For WindRec definition */ #include "Sets.proto.h" #include "telneterrors.h" #include "prefs.proto.h" #include "Connections.proto.h" #include "rsinterf.proto.h" #include "rsmac.proto.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "rsdefs.h" #include "DlogUtils.proto.h" extern RSdata *RScurrent; //#define DEBUG_SETS #ifdef DEBUG_SETS #define sets_debug_print(x) putln(x) #else #define sets_debug_print(x) #endif ConnInitParams **SetParams; SessionPrefs *SetSessionPtr; TerminalPrefs *SetTerminalPtr; char *Cspace; extern WindRec *screens; /* Window Records (VS) for : Current Sessions */ extern MenuHandle myMenus[NMENUS]; /* Menu Handles .... */ #define PORTNUM 37 /* NCSA 2.5: the port variable */ void SETSunload(void) {} /* affirmative() checks a token to see if it is a valid Affirmation string. We now get the affirmative strings from the resource */ Boolean affirmative( char *s) { short i; Str255 AffWords; /* Telnet 2.6: get string resources */ for (i=0; iposition; i++) s[i] = tolower(s[i]); for (i=1; i<= AFF_WORDS_COUNT ;i++) { GetIndString(AffWords,AFF_WORDS_ID,i); p2cstr(AffWords); if (!ncstrcmp((char *)AffWords,s)) break; } if (i <= AFF_WORDS_COUNT) return(TRUE); else return(FALSE); } /**************************************************************************/ /* Sissep * is the character a valid separator for the hosts file? * separators are white space, special chars and :;= * */ Boolean Sissep( char c) { if (c < 33) return(1); if (c == ':' || c == ';' || c == '=') return(TRUE); return(FALSE); } /************************************************************************/ /* ncstrcmp * No case string compare. * Only returns 0=match, 1=no match, does not compare greater or less * There is a tiny bit of overlap with the | 32 trick, but shouldn't be * a problem. It causes some different symbols to match. */ short ncstrcmp(char *sa, char *sb) { while (*sa && *sa < 33) /* don't compare leading spaces */ sa++; while (*sb && *sb < 33) sb++; while (*sa && *sb) { if ((*sa != *sb) && ((*sa | 32) != (*sb | 32))) return(1); sa++;sb++; } if (!*sa && !*sb) /* if both at end of string */ return(0); else return(1); } /* confile() now gets all of its keywords from the string resources, for greater ease, flexibility, and overall coolness. */ short confile( char *s) { short i, port, portNeg; Boolean success; unsigned int a,b,c,d; int signedint; Str255 Ckeyw; char tempCstring[256]; sets_debug_print(s); if (!(*s) ) return(0); switch( TelInfo->CONFstate) { case 0: /* No keyword yet! */ for (i=0; iposition; i++) s[i] = tolower(s[i]); for (i=1; i<= SAVE_SET_STRINGS_COUNT ;i++) { GetIndString(Ckeyw,SAVE_SET_STRINGS_ID,i); p2cstr(Ckeyw); if (!ncstrcmp((char *)Ckeyw,s)) break; } if ( i > SAVE_SET_STRINGS_COUNT ) { // OperationFailedAlert(BAD_SET_ERR, 0, 0); TelInfo->CONFstate = 0; break; // return(1); } TelInfo->CONFstate=i; if (TelInfo->CONFstate==5) { SetSessionPtr->bksp = 0; TelInfo->CONFstate=0; } if (TelInfo->CONFstate==6) { SetSessionPtr->bksp = 1; TelInfo->CONFstate=0; } break; case 1: /* NAME */ { char *p; if (NULL == (p = myNewPtr(40000))) /* is there enough memory? */ { /* NOT enough memory for the set! */ DoError(107 | MEMORY_ERRORCLASS, LEVEL2, NULL); /* register the error */ return(-1); } else DisposPtr(p); } if (TelInfo->CONFactive) { success = CreateConnectionFromParams(SetParams); SetParams = NULL; if (!success) { sets_debug_print("ERROR IN OPENING!! "); return(42); } } if (SetParams == NULL) { SetParams = ReturnDefaultConnInitParams(); HLockHi((Handle)SetParams); HLockHi((Handle)(**SetParams).session); SetSessionPtr = *(**SetParams).session; HLockHi((Handle)(**SetParams).terminal); SetTerminalPtr = *(**SetParams).terminal; } strncpy(tempCstring, s, 255); /* Move name in */ CtoPstr(tempCstring); if ((tempCstring[0] == 1) && (tempCstring[1] == ' ')) tempCstring[0] = 0; BlockMove(tempCstring, (**SetParams).WindowName, tempCstring[0]+1); TelInfo->CONFstate=0; TelInfo->CONFactive=1; break; case 2: /* HOST */ strncpy(tempCstring, s, 63); /* Move name in */ CtoPstr(tempCstring); // Process the hosname string. if (ProcessHostnameString((StringPtr)tempCstring, &port, &portNeg)) SetSessionPtr->port = port; BlockMove(tempCstring, SetSessionPtr->hostname, tempCstring[0]+1); TelInfo->CONFstate=0; break; case 3: /* SIZE */ if ( 4 != sscanf(s, "{%d,%d,%d,%d}", &a, &b, &c,&d) ) { sets_debug_print("Error in window size"); return(2); } (**SetParams).WindowLocation.top=a; (**SetParams).WindowLocation.left=b; (**SetParams).WindowLocation.bottom=c; (**SetParams).WindowLocation.right=d; TelInfo->CONFstate=0; break; case 4: if ( 1 != sscanf(s,"%d", &a) ) { sets_debug_print("Scrollback needs parameter"); return(1); } SetTerminalPtr->numbkscroll = a; TelInfo->CONFstate=0; break; case 5: SetSessionPtr->bksp = 0; TelInfo->CONFstate=0; break; case 6: SetSessionPtr->bksp = 1; TelInfo->CONFstate=0; break; case 7: setmacro( 0, s); TelInfo->CONFstate=0; break; case 8: setmacro( 1, s); TelInfo->CONFstate=0; break; case 9: setmacro( 2, s); TelInfo->CONFstate=0; break; case 10: setmacro( 3, s); TelInfo->CONFstate=0; break; case 11: setmacro( 4, s); TelInfo->CONFstate=0; break; case 12: setmacro( 5, s); TelInfo->CONFstate=0; break; case 13: setmacro( 6, s); TelInfo->CONFstate=0; break; case 14: setmacro( 7, s); TelInfo->CONFstate=0; break; case 15: setmacro( 8, s); TelInfo->CONFstate=0; break; case 16: setmacro( 9, s); TelInfo->CONFstate=0; break; case 17: TelInfo->CONFstate=0; // Now ignored (was commandkeys) break; case 18: if (!strcmp(s,"backspace") ) SetSessionPtr->bksp = 0; else SetSessionPtr->bksp = 1; TelInfo->CONFstate=0; break; case 19: case 21: if ( 1 == sscanf(s,"%d", &a) ) SetTerminalPtr->vtwidth = a; TelInfo->CONFstate=0; break; case 20: if (affirmative(s)) SetSessionPtr->tekclear = 1; else SetSessionPtr->tekclear = 0; TelInfo->CONFstate = 0; break; case 22: if ( 3 != sscanf(s, "{%u,%u,%u}", &a, &b, &c)) { /* BYU LSC - "%d" changed to "%u" */ sets_debug_print("Bad Parms to rgb"); return(2); } SetTerminalPtr->nfcolor.red = a; SetTerminalPtr->nfcolor.green = b; SetTerminalPtr->nfcolor.blue = c; TelInfo->CONFstate = 0; break; case 23: if ( 3 != sscanf(s, "{%u,%u,%u}", &a, &b, &c)) { /* BYU LSC - "%d" changed to "%u" */ sets_debug_print("Bad Parms to rgb"); return(2); } SetTerminalPtr->nbcolor.red = a; SetTerminalPtr->nbcolor.green = b; SetTerminalPtr->nbcolor.blue = c; TelInfo->CONFstate = 0; break; case 24: if ( 3 != sscanf(s, "{%u,%u,%u}", &a, &b, &c)) { /* BYU LSC - "%d" changed to "%u" */ sets_debug_print("Bad Parms to rgb"); return(2); } SetTerminalPtr->bfcolor.red = a; SetTerminalPtr->bfcolor.green = b; SetTerminalPtr->bfcolor.blue = c; TelInfo->CONFstate = 0; break; case 25: if ( 3 != sscanf(s, "{%u,%u,%u}", &a, &b, &c)) { /* BYU LSC - "%d" changed to "%u" */ sets_debug_print("Bad Parms to rgb"); return(2); } SetTerminalPtr->bbcolor.red = a; SetTerminalPtr->bbcolor.green = b; SetTerminalPtr->bbcolor.blue = c; TelInfo->CONFstate = 0; break; case 26: /* Font Name */ strncpy(tempCstring, s, 63); /* Move name in */ CtoPstr(tempCstring); BlockMove(tempCstring, &(SetTerminalPtr->DisplayFont[0]), tempCstring[0]+1); TelInfo->CONFstate = 0; break; case 27: /* Font Size */ if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->fontsize = a; TelInfo->CONFstate = 0; break; case 28: /* number of lines to use for window's editable region */ if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->vtheight = a; TelInfo->CONFstate = 0; break; case 29: /* keystop, XOFF key */ if (1 == sscanf( s, "%d", &a)) SetSessionPtr->skey = a; TelInfo->CONFstate = 0; break; case 30: /* keygo, XON key */ if (1 == sscanf( s, "%d", &a)) SetSessionPtr->qkey = a; TelInfo->CONFstate = 0; break; case 31: /* keyip, kill key */ if (1 == sscanf( s, "%d", &a)) SetSessionPtr->ckey = a; TelInfo->CONFstate = 0; break; case 32: /* cr-map */ if ((1 == sscanf( s, "%d", &a)) && (a !=0)) SetSessionPtr->crmap = TRUE; else SetSessionPtr->crmap = FALSE; TelInfo->CONFstate = 0; break; case 33: /* BYU 2.4.9 */ if ((1 == sscanf( s, "%d", &a)) && (a !=0)) /* BYU 2.4.9 */ SetSessionPtr->linemode = TRUE; /* BYU 2.4.9 */ else /* BYU 2.4.9 */ SetSessionPtr->linemode = FALSE; /* BYU 2.4.9 */ TelInfo->CONFstate=0; /* BYU 2.4.9 */ break; /* BYU 2.4.9 */ case 34: /* BYU 2.4.9 */ if ((1 == sscanf( s, "%d", &a)) && (a !=0)) SetTerminalPtr->eightbit = TRUE; /* BYU 2.4.9 */ else /* BYU 2.4.9 */ SetTerminalPtr->eightbit = FALSE; /* BYU 2.4.9 */ TelInfo->CONFstate=0; /* BYU 2.4.9 */ break; /* BYU 2.4.9 */ case 35: /* BYU */ // (**SetParams).ftpstate = 1; /* BYU */ TelInfo->CONFstate=0; /* BYU */ break; /* BYU */ case 36: // ignored TelInfo->CONFstate=0; break; case PORTNUM: /* NCSA 2.5: get the real port # */ if (1 == sscanf( s, "%d", &a)) /* NCSA */ SetSessionPtr->port = a; /* NCSA */ TelInfo->CONFstate = 0; /* NCSA */ break; /* NCSA */ case 38: // translation strncpy((char *) SetSessionPtr->TranslationTable, s, 32); CtoPstr((char *) SetSessionPtr->TranslationTable); TelInfo->CONFstate=0; break; case 39: // tekem if (1 == sscanf(s, "%d", &signedint)) SetSessionPtr->tektype = signedint; TelInfo->CONFstate=0; break; case 40: // answerback strncpy((char *) SetTerminalPtr->AnswerBackMessage, s, 32); CtoPstr((char *) SetTerminalPtr->AnswerBackMessage); TelInfo->CONFstate=0; break; case 41: //authenticate if (affirmative(s)) SetSessionPtr->authenticate = TRUE; else SetSessionPtr->authenticate = FALSE; TelInfo->CONFstate=0; break; case 42: //encrypt if (affirmative(s)) SetSessionPtr->encrypt = TRUE; else SetSessionPtr->encrypt = FALSE; TelInfo->CONFstate=0; break; case 43: //pageup/down map if (affirmative(s)) SetTerminalPtr->MATmappings = TRUE; else SetTerminalPtr->MATmappings = FALSE; TelInfo->CONFstate=0; break; case 44: //keypad map if (affirmative(s)) SetTerminalPtr->remapKeypad = TRUE; else SetTerminalPtr->remapKeypad = FALSE; TelInfo->CONFstate=0; break; case 45: // ansicolor if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->ANSIgraphics = a; TelInfo->CONFstate=0; break; case 46: // arrowmap if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->emacsarrows = a; TelInfo->CONFstate=0; break; case 47: // emacsmeta if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->emacsmetakey = a; TelInfo->CONFstate=0; break; case 48: // pastemethod if (1 == sscanf( s, "%d", &a)) SetSessionPtr->pastemethod = a; TelInfo->CONFstate=0; break; case 49: // pastesize if (1 == sscanf( s, "%d", &a)) SetSessionPtr->pasteblocksize = a; TelInfo->CONFstate=0; break; case 50: // saveclear if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->clearsave = a; TelInfo->CONFstate=0; break; case 51: // vtemulation if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->vtemulation = a; TelInfo->CONFstate=0; break; case 52: // forcesave if (1 == sscanf( s, "%d", &a)) SetSessionPtr->forcesave = a; TelInfo->CONFstate=0; break; case 53: // vtwrap if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->vtwrap = a; TelInfo->CONFstate=0; break; case 54: // xterm if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->Xtermsequences = a; TelInfo->CONFstate=0; break; case 55: // localecho if (1 == sscanf( s, "%d", &a)) SetSessionPtr->localecho = a; TelInfo->CONFstate=0; break; case 56: // halfdup if (1 == sscanf( s, "%d", &a)) SetSessionPtr->halfdup = a; TelInfo->CONFstate=0; break; case 57: // remapctrld if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->remapCtrlD = a; TelInfo->CONFstate=0; break; case 58: // negative if (1 == sscanf( s, "%d", &a)) SetSessionPtr->portNegative = a; TelInfo->CONFstate=0; break; case 59: // allowbold if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->allowBold = a; TelInfo->CONFstate=0; break; case 60: // colorbold if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->colorBold = a; TelInfo->CONFstate=0; break; case 61: // ignorebeeps if (1 == sscanf( s, "%d", &a)) SetSessionPtr->ignoreBeeps = a; TelInfo->CONFstate=0; break; case 62: // ignoreff if (1 == sscanf( s, "%d", &a)) SetSessionPtr->ignoreff = a; TelInfo->CONFstate=0; break; case 63: // boldfont strncpy(tempCstring, s, 63); /* Move name in */ CtoPstr(tempCstring); BlockMove(tempCstring, &(SetTerminalPtr->BoldFont[0]), tempCstring[0]+1); TelInfo->CONFstate = 0; break; case 64: // inversebold if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->boldFontStyle = a; TelInfo->CONFstate = 0; break; case 65: // otpauto if (1 == sscanf( s, "%d", &a)) SetSessionPtr->otpauto = a; TelInfo->CONFstate = 0; break; case 66: // otpmulti if (1 == sscanf( s, "%d", &a)) SetSessionPtr->otpmulti = a; TelInfo->CONFstate = 0; break; case 67: // otphex if (1 == sscanf( s, "%d", &a)) SetSessionPtr->otphex = a; TelInfo->CONFstate = 0; break; case 68: // otpnoprompt if (1 == sscanf( s, "%d", &a)) SetSessionPtr->otpnoprompt = a; TelInfo->CONFstate = 0; break; case 69: // otppassword strncpy(tempCstring, s, 63); /* Move name in */ CtoPstr(tempCstring); BlockMove(tempCstring, &(SetSessionPtr->otppassword[0]), tempCstring[0]+1); TelInfo->CONFstate = 0; break; case 70: // realbold if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->realbold = a; TelInfo->CONFstate = 0; break; case 71: // otpsavepass if (1 == sscanf( s, "%d", &a)) SetSessionPtr->otpsavepass = a; TelInfo->CONFstate = 0; break; case 72: // oldscrollback if (1 == sscanf( s, "%d", &a)) SetTerminalPtr->oldScrollback = a; TelInfo->CONFstate = 0; break; default: TelInfo->CONFstate=0; } return(0); } /* confile */ /************************************************************************/ /* contoken * tokenize the strings which get passed to confile. * Handles quotes and uses separators: <33, ;:= */ short contoken( char c) { short retval; Boolean success; if (c == EOF) { Cspace[TelInfo->position++] = '\0'; sets_debug_print("Eof handler called"); confile(Cspace); if (TelInfo->CONFactive) { success = CreateConnectionFromParams(SetParams); if (!success) { sets_debug_print("ERROR IN OPENING!! "); return(42); } } return(-1); } if (!TelInfo->position && !TelInfo->inquote && Sissep(c)) /*if (!TelInfo->position && Sissep(c)) */ /* old_skip over junk before keyword */ return(0); if (TelInfo->inquote || !Sissep(c)) { if (TelInfo->position > 200) { sets_debug_print("Out of bounds error!"); return(1); } /* * check for quotes, a little mixed up here, could be reorganized */ if (c == '"' ) { if (!TelInfo->inquote) { /* beginning of quotes */ TelInfo->inquote = 1; return(0); } Cspace[TelInfo->position++] =c; return(0); } else { /* include in current string */ if (c != '\012' && c != '\015') /* BYU 2.4.18 - changed \n to \015 and added \012 */ { Cspace[TelInfo->position++] = c; return(0); } } } if (Cspace[TelInfo->position-1] == '"') TelInfo->position--; Cspace[TelInfo->position++] = '\0'; retval = confile(Cspace); /* pass the token along */ TelInfo->position = 0; TelInfo->inquote = 0; Cspace[0] = '\0'; return(retval); } /************************************************************************/ /* readconfig * read the saved set file into our in-memory data structure. * Handle everything by keyword (stored in resources). */ void readconfig(FSSpec theSet) { short c,retval; short fn; OSErr err; Cspace = myNewPtr(256); /* BYU LSC - get room for gathering stuff */ SetParams = ReturnDefaultConnInitParams(); HLockHi((Handle)SetParams); HLockHi((Handle)(**SetParams).session); SetSessionPtr = *(**SetParams).session; HLockHi((Handle)(**SetParams).terminal); SetTerminalPtr = *(**SetParams).terminal; if (NULL == Cspace) /* no memory left for the set to load in */ { /* we're out of memory */ DoError(107 | MEMORY_ERRORCLASS, LEVEL2, NULL); return; } TelInfo->position = TelInfo->CONFstate = TelInfo->CONFactive = TelInfo->inquote = TelInfo->lineno = 0; /* state vars */ err = HOpenDF(theSet.vRefNum, theSet.parID, theSet.name, fsRdPerm, &fn); retval = 0; while (!retval) { c = Myfgetc(fn); if (c == '#' && !TelInfo->inquote) { while (c != EOF && c != '\012' && c != '\015') /* skip to EOL */ /* BYU 2.4.18 - changed \n to \015 and added \012*/ c = Myfgetc(fn); } if (c == '\012' || c == '\015') /* BYU 2.4.18 - changed \n to \015 and added \012 */ TelInfo->lineno++; retval = contoken(c); } FSClose(fn); DisposPtr((Ptr) Cspace); if (retval == EOF) { /* EOF is normal end */ sets_debug_print("EOF termination"); } else { sets_debug_print("NON-EOF termination"); } return; } void LoadSet( void) { SFReply sfr; long junk; SFTypeList typesok = {'CONF'}; Point where; FSSpec set; Str255 tempString; where.h=100;where.v=100; GetIndString(tempString,MISC_STRINGS,SET_TO_LOAD_STRING); SFGetFile( where,tempString, 0L, 1, typesok, 0L, &sfr); if (! sfr.good) return; BlockMove(&sfr.fName, set.name, (*sfr.fName)+1); // pstring copy sfr.fName -> set.name GetWDInfo(sfr.vRefNum, &set.vRefNum, &set.parID, &junk); readconfig(set); } char Myfgetc(short myfile) { OSErr err; long count; unsigned char buffer; count = 1; if ((err = FSRead(myfile, &count, &buffer)) == eofErr) buffer = EOF; return (buffer); } void CStringToFile(short myfile, unsigned char *mystring) { long mycount; /* BYU LSC */ short fstatus; /* BYU LSC */ mycount = strlen((char *) mystring); /* BYU LSC */ fstatus = FSWrite(myfile,&mycount,mystring); /* BYU LSC */ } void SaveSet(short doSaveMacros, short dontSaveTitle) { SFReply sfr; short fn, truncate; WindowPeek wpeek; Rect rect; Point where; long junk; char temp[256], temp2[256]; /* BYU LSC */ short fnum,fsiz; short i; FSSpec set; OSErr err; Str255 scratchPstring,scratchPstring2; where.h = 100; where.v = 100; GetIndString(scratchPstring,MISC_STRINGS,SAVE_SET_STRING); GetIndString(scratchPstring2,MISC_STRINGS,DEFAULT_SAVE_SET_NAME); SFPutFile(where,scratchPstring,scratchPstring2, 0L, &sfr); /* BYU LSC */ if (!sfr.good) return; BlockMoveData(&sfr.fName, set.name, (*sfr.fName)+1); // pstring copy sfr.fName -> set.name GetWDInfo(sfr.vRefNum, &set.vRefNum, &set.parID, &junk); if ((err = HCreate(set.vRefNum, set.parID, set.name, kNCSACreatorSignature, kNCSASetFileType)) == dupFNErr) truncate = 1; err = HOpenDF(set.vRefNum, set.parID, set.name, fsWrPerm, &fn); if (truncate) SetEOF(fn, 0L); if (gApplicationPrefs->CommandKeys) CStringToFile(fn,(unsigned char *) "commandkeys = yes\015"); /* BYU LSC */ else CStringToFile(fn,(unsigned char *) "commandkeys = no\015"); /* BYU LSC */ if (doSaveMacros) for (i = 0; i < 10; i++) { getmacro(i, temp, sizeof(temp)); /* BYU LSC */ if (*temp) { /* BYU LSC */ sprintf(temp2, "key%d = \"", i); /* BYU 2.4.16 */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp); /* BYU LSC */ strcpy(temp2,"\"\015"); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ } /* BYU LSC */ } /* for */ #if 0 /* BYU LSC */ for (i = 0; i < TelInfo->numwindows; i++) { short j; j = RSgetfont(screens[i].vs, &fnum, &fsiz); } /* for */ #endif /* BYU LSC */ for (i = 0; i < TelInfo->numwindows; i++) { if (!dontSaveTitle) { GetWTitle(screens[i].wind, scratchPstring); PtoCstr(scratchPstring); sprintf(temp2, "name= \"%s\"\015", scratchPstring); } else sprintf(temp2, "name= \" \"\015", scratchPstring); CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ BlockMove((Ptr)screens[i].machine, (Ptr)scratchPstring, Length(screens[i].machine)+1); PtoCstr(scratchPstring); sprintf(temp2, "host= \"%s\"\015", scratchPstring); CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf (temp2,"port= %d\015",screens[i].portNum); /* NCSA: save port # */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf(temp2, "scrollback= %d\015", (screens[i].maxscroll)); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ if (screens[i].bsdel) CStringToFile(fn,(unsigned char *) "erase = delete\015"); /* BYU LSC */ else CStringToFile(fn,(unsigned char *) "erase = backspace\015"); /* BYU LSC */ wpeek = (WindowPeek) screens[i].wind; rect = (*wpeek->contRgn)->rgnBBox; if (!dontSaveTitle) { sprintf(temp2, "size = {%d,%d,%d,%d}\015", rect.top, rect.left, /* BYU LSC */ rect.bottom, rect.right); CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ } sprintf(temp2, "vtwidth = %d\015", VSmaxwidth(screens[i].vs) + 1); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ if (screens[i].tekclear) CStringToFile(fn,(unsigned char *) "tekclear = yes\015"); /* BYU LSC */ else CStringToFile(fn,(unsigned char *) "tekclear = no\015"); /* BYU LSC */ if (TelInfo->haveColorQuickDraw) { RGBColor theColor; short j; for (j = 0; j < 4; j++) { theColor = RSgetcolor( screens[i].vs, j); sprintf(temp2, "rgb%d = {%u,%u,%u}\015", j, theColor.red, theColor.green, theColor.blue); CStringToFile(fn,(unsigned char *) temp2); } } RSgetfont( screens[i].vs, &fnum, &fsiz); GetFontName( fnum, (StringPtr)temp); /* BYU LSC */ #ifndef MPW p2cstr((unsigned char *) temp); /* BYU LSC */ #endif sprintf( temp2, "font = \"%s\"\015", temp); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "fsize= %d\015", fsiz); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ RSsetwind(screens[i].vs); fnum = RScurrent->bfnum; GetFontName( fnum, (StringPtr)temp); /* BYU LSC */ #ifndef MPW p2cstr((unsigned char *) temp); /* BYU LSC */ #endif sprintf( temp2, "boldfont = \"%s\"\015", temp); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "nlines= %d\015", VSgetlines(screens[i].vs));/* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "keystop= %d\015", screens[i].TELstop); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "keygo= %d\015", screens[i].TELgo); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "keyip= %d\015", screens[i].TELip); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "crmap= %d\015", screens[i].crmap); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "tekem= %d\015", screens[i].tektype); CStringToFile(fn,(unsigned char *) temp2); // All this stuff was added in BetterTelnet 1.0b3... (RAB) sprintf( temp2, "vtemulation = %d\015", screens[i].vtemulation); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "forcesave = %d\015", screens[i].forcesave); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "eightbit = %d\015", screens[i].eightbit); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "vtwrap = %d\015", screens[i].wrap); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "xterm = %d\015", screens[i].Xterm); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "remapctrld = %d\015", screens[i].remapCtrlD); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "ansicolor = %d\015", screens[i].ANSIgraphics); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "arrowmap = %d\015", screens[i].arrowmap); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "emacsmeta = %d\015", screens[i].emacsmeta); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "pastemethod = %d\015", screens[i].pastemethod); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "pastesize = %d\015", screens[i].pastesize); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "saveclear = %d\015", screens[i].ESscroll); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "linemode = %d\015", screens[i].lineAllow); CStringToFile(fn,(unsigned char *) temp2); // And all this stuff was added a bit later... (RAB BetterTelnet 1.0 and later) sprintf( temp2, "negative = %d\015", screens[i].portNegative); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "allowbold = %d\015", screens[i].allowBold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "colorbold = %d\015", screens[i].colorBold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "ignorebeeps = %d\015", screens[i].ignoreBeeps); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "ignoreff = %d\015", screens[i].ignoreff); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "inversebold = %d\015", screens[i].inversebold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpauto = %d\015", screens[i].otpauto); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpmulti = %d\015", screens[i].otpmulti); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otphex = %d\015", screens[i].otphex); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpnoprompt = %d\015", screens[i].otpnoprompt); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "realbold = %d\015", screens[i].realbold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "oldscrollback = %d\015", screens[i].oldScrollback); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpsavepass = %d\015", screens[i].otpsavepass); CStringToFile(fn,(unsigned char *) temp2); // end of "all this stuff" if (screens[i].otppassword[0]) { // RAB BetterTelnet 1.2 pstrcpy(scratchPstring, (unsigned char *)screens[i].otppassword); p2cstr(scratchPstring); sprintf(temp2, "otppassword = \"%s\"\015", scratchPstring); CStringToFile(fn, (unsigned char *)temp2); } if (screens[i].national) { // Don't do this if using default translation table GetItem(myMenus[National], screens[i].national+1, scratchPstring); PtoCstr(scratchPstring); sprintf(temp2, "translation= \"%s\"\015", scratchPstring); CStringToFile(fn, (unsigned char *)temp2); } BlockMove(screens[i].answerback, scratchPstring, *(screens[i].answerback)+1); PtoCstr(scratchPstring); sprintf(temp2, "answerback= \"%s\"\015", scratchPstring); CStringToFile(fn, (unsigned char *)temp2); if (screens[i].authenticate) CStringToFile(fn,(unsigned char *) "authenticate = yes\015"); //CCP added next four lines for authencrypt else CStringToFile(fn,(unsigned char *) "authenticate = no\015"); if (screens[i].encrypt) CStringToFile(fn,(unsigned char *) "encrypt = yes\015"); else CStringToFile(fn,(unsigned char *) "encrypt = no\015"); if (screens[i].pgupdwn) CStringToFile(fn,(unsigned char *) "pageup = yes\015"); //CCP 2.7 else CStringToFile(fn,(unsigned char *) "pageup = no\015"); if (screens[i].keypadmap) CStringToFile(fn,(unsigned char *) "keypad = yes\015"); //CCP 2.7 else CStringToFile(fn,(unsigned char *) "keypad = no\015"); } /* for i */ FSClose(fn); /* BYU LSC */ } // This is new for BetterTelnet 1.0b4. It saves sessions directly from the Favorites. (RAB) void SaveSetFromSession(SessionPrefs* setSession, TerminalPrefs* setTerminal, short doWeAppend, short doSaveMacros) { SFReply sfr; short fn, truncate; WindowPeek wpeek; Rect rect; Point where; long junk; char temp[256], temp2[256]; /* BYU LSC */ short fnum,fsiz, i; FSSpec set; OSErr err; Str255 scratchPstring,scratchPstring2; SFTypeList typesok = {'CONF'}; where.h = 100; where.v = 100; if (doWeAppend) { GetIndString(scratchPstring,MISC_STRINGS,SAVE_SET_STRING); SFGetFile( where,scratchPstring, 0L, 1, typesok, 0L, &sfr); } else { GetIndString(scratchPstring,MISC_STRINGS,SAVE_SET_STRING); GetIndString(scratchPstring2,MISC_STRINGS,DEFAULT_SAVE_SET_NAME); SFPutFile(where,scratchPstring,scratchPstring2, 0L, &sfr); /* BYU LSC */ } if (!sfr.good) return; BlockMoveData(&sfr.fName, set.name, (*sfr.fName)+1); // pstring copy sfr.fName -> set.name GetWDInfo(sfr.vRefNum, &set.vRefNum, &set.parID, &junk); if (!doWeAppend) if ((err = HCreate(set.vRefNum, set.parID, set.name, kNCSACreatorSignature, kNCSASetFileType)) == dupFNErr) truncate = 1; err = HOpenDF(set.vRefNum, set.parID, set.name, fsWrPerm, &fn); if ((!doWeAppend) && truncate) SetEOF(fn, 0L); if (doWeAppend) SetFPos(fn, 2, 0L); if (doSaveMacros) for (i = 0; i < 10; i++) { getmacro(i, temp, sizeof(temp)); /* BYU LSC */ if (*temp) { /* BYU LSC */ sprintf(temp2, "key%d = \"", i); /* BYU 2.4.16 */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp); /* BYU LSC */ strcpy(temp2,"\"\015"); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ } /* BYU LSC */ } /* for */ sprintf(temp2, "name= \" \"\015"); CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ BlockMove(setSession->hostname, (Ptr)scratchPstring, Length(setSession->hostname)+1); PtoCstr(scratchPstring); sprintf(temp2, "host= \"%s\"\015", scratchPstring); CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf (temp2,"port= %d\015",setSession->port); /* NCSA: save port # */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf(temp2, "scrollback= %d\015", setTerminal->numbkscroll); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ if (setSession->bksp) CStringToFile(fn,(unsigned char *) "erase = delete\015"); /* BYU LSC */ else CStringToFile(fn,(unsigned char *) "erase = backspace\015"); /* BYU LSC */ sprintf(temp2, "vtwidth = %d\015", setTerminal->vtwidth); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ if (setSession->tekclear) CStringToFile(fn,(unsigned char *) "tekclear = yes\015"); /* BYU LSC */ else CStringToFile(fn,(unsigned char *) "tekclear = no\015"); /* BYU LSC */ if (TelInfo->haveColorQuickDraw) { sprintf(temp2, "rgb%d = {%u,%u,%u}\015", 0, setTerminal->nfcolor.red, setTerminal->nfcolor.green, setTerminal->nfcolor.blue); CStringToFile(fn,(unsigned char *) temp2); sprintf(temp2, "rgb%d = {%u,%u,%u}\015", 1, setTerminal->nbcolor.red, setTerminal->nbcolor.green, setTerminal->nbcolor.blue); CStringToFile(fn,(unsigned char *) temp2); sprintf(temp2, "rgb%d = {%u,%u,%u}\015", 2, setTerminal->bfcolor.red, setTerminal->bfcolor.green, setTerminal->bfcolor.blue); CStringToFile(fn,(unsigned char *) temp2); sprintf(temp2, "rgb%d = {%u,%u,%u}\015", 3, setTerminal->bbcolor.red, setTerminal->bbcolor.green, setTerminal->bbcolor.blue); CStringToFile(fn,(unsigned char *) temp2); } BlockMove(setTerminal->DisplayFont, temp, Length(setTerminal->DisplayFont) + 1); #ifndef MPW p2cstr((unsigned char *) temp); /* BYU LSC */ #endif sprintf( temp2, "font = \"%s\"\015", temp); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "fsize= %d\015", setTerminal->fontsize); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ BlockMove(setTerminal->BoldFont, temp, Length(setTerminal->BoldFont) + 1); #ifndef MPW p2cstr((unsigned char *) temp); #endif sprintf( temp2, "boldfont = \"%s\"\015", temp); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "nlines= %d\015", setTerminal->vtheight);/* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "keystop= %d\015", setSession->skey); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "keygo= %d\015", setSession->qkey); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "keyip= %d\015", setSession->ckey); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "crmap= %d\015", setSession->crmap); /* BYU LSC */ CStringToFile(fn,(unsigned char *) temp2); /* BYU LSC */ sprintf( temp2, "tekem= %d\015", setSession->tektype); CStringToFile(fn,(unsigned char *) temp2); // All this stuff was added in BetterTelnet 1.0b3... (RAB) sprintf( temp2, "vtemulation = %d\015", setTerminal->vtemulation); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "forcesave = %d\015", setSession->forcesave); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "eightbit = %d\015", setTerminal->eightbit); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "vtwrap = %d\015", setTerminal->vtwrap); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "xterm = %d\015", setTerminal->Xtermsequences); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "remapctrld = %d\015", setTerminal->remapCtrlD); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "ansicolor = %d\015", setTerminal->ANSIgraphics); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "arrowmap = %d\015", setTerminal->emacsarrows); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "emacsmeta = %d\015", setTerminal->emacsmetakey); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "pastemethod = %d\015", setSession->pastemethod); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "pastesize = %d\015", setSession->pasteblocksize); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "saveclear = %d\015", setTerminal->clearsave); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "linemode = %d\015", setSession->linemode); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "negative = %d\015", setSession->portNegative); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "allowbold = %d\015", setTerminal->allowBold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "colorbold = %d\015", setTerminal->colorBold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "ignorebeeps = %d\015", setSession->ignoreBeeps); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "ignoreff = %d\015", setSession->ignoreff); CStringToFile(fn,(unsigned char *) temp2); // And all this stuff was added in 1.0b5... (RAB) sprintf( temp2, "localecho = %d\015", setSession->localecho); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "halfdup = %d\015", setSession->halfdup); CStringToFile(fn,(unsigned char *) temp2); // end of "all this stuff" (RAB) sprintf( temp2, "otpauto = %d\015", setSession->otpauto); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpmulti = %d\015", setSession->otpmulti); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otphex = %d\015", setSession->otphex); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpnoprompt = %d\015", setSession->otpnoprompt); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "realbold = %d\015", setTerminal->realbold); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "oldscrollback = %d\015", setTerminal->oldScrollback); CStringToFile(fn,(unsigned char *) temp2); sprintf( temp2, "otpsavepass = %d\015", setSession->otpsavepass); CStringToFile(fn,(unsigned char *) temp2); if (screens[i].otppassword[0]) { // RAB BetterTelnet 1.2 pstrcpy(scratchPstring, (unsigned char *)setSession->otppassword); p2cstr(scratchPstring); sprintf(temp2, "otppassword = \"%s\"\015", scratchPstring); CStringToFile(fn, (unsigned char *)temp2); } BlockMove(setSession->TranslationTable, scratchPstring, Length(setSession->TranslationTable) + 1); PtoCstr(scratchPstring); sprintf(temp2, "translation= \"%s\"\015", scratchPstring); CStringToFile(fn, (unsigned char *)temp2); BlockMove(setTerminal->AnswerBackMessage, scratchPstring, *(setTerminal->AnswerBackMessage)+1); PtoCstr(scratchPstring); sprintf(temp2, "answerback= \"%s\"\015", scratchPstring); CStringToFile(fn, (unsigned char *)temp2); if (setSession->authenticate) CStringToFile(fn,(unsigned char *) "authenticate = yes\015"); //CCP added next four lines for authencrypt else CStringToFile(fn,(unsigned char *) "authenticate = no\015"); if (setSession->encrypt) CStringToFile(fn,(unsigned char *) "encrypt = yes\015"); else CStringToFile(fn,(unsigned char *) "encrypt = no\015"); if (setTerminal->MATmappings) CStringToFile(fn,(unsigned char *) "pageup = yes\015"); //CCP 2.7 else CStringToFile(fn,(unsigned char *) "pageup = no\015"); if (setTerminal->remapKeypad) CStringToFile(fn,(unsigned char *) "keypad = yes\015"); //CCP 2.7 else CStringToFile(fn,(unsigned char *) "keypad = no\015"); FSClose(fn); /* BYU LSC */ } \ No newline at end of file diff --git a/source/Sets/Sets.proto.h b/source/Sets/Sets.proto.h new file mode 100755 index 0000000..43e9f93 --- /dev/null +++ b/source/Sets/Sets.proto.h @@ -0,0 +1 @@ +void SETSunload(void); void readconfig(FSSpec theSet); void SaveSet(short, short); void LoadSet(void); char Myfgetc(short myfile); void CStringToFile(short myfile, unsigned char *mystring); short ncstrcmp(char *sa, char *sb); Boolean affirmative( char *s); Boolean Sissep( char c); short confile( char *s); short contoken( char c); void SaveSetFromSession(SessionPrefs*, TerminalPrefs*, short, short); \ No newline at end of file diff --git a/source/TelnetHelp.bh b/source/TelnetHelp.bh new file mode 100755 index 0000000..6e375b6 --- /dev/null +++ b/source/TelnetHelp.bh @@ -0,0 +1 @@ +DIALOG 280 1.1 To connect using the settings entered above, click this button. 1.2 To connect using the settings entered above, click this button. Not available because you have not entered a host name. 2.1 To close this dialog box without connecting, click this button. 4.1 Enter the host name of the host to which you wish to connect here. Optionally, you can also add a colon (:) or space and a port number. For example: myhost.mydomain.com:1010 6.1 You can optionally enter a window name for the new window in this box. If you do not enter a window name here, BetterTelnet will automatically generate one. 7.1 You can select a Favorite to use for configuration information from this pop-up menu. 8.1 Kerberos authentication is currently off. To turn on Kerberos authentication, click here. 8.2 Kerberos authentication is not available, because you have not installed a Kerberos plug-in. 8.3 Kerberos authentication is currently on. To turn off Kerberos authentication, click here. 9.1 Kerberos encryption is currently off. To turn on Kerberos encryption, click here. 9.2 Kerberos encryption is not available, because Kerberos authentication is turned off. 9.3 Kerberos encryption is currently on. To turn off Kerberos encryption, click here. END-DIALOG DIALOG 500 1.1 To close this dialog box and use the new macros you have entered, click here. 2.1 To close this dialog box and discard all changes, click here. 23.1 To import a set of macros from a BetterTelnet macro file, click here. 24.1 To export this set of macros to a BetterTelnet macro file, click here. 25.1 To export this set of macros to the BetterTelnet Macros file in the Preferences folder, so that it will be loaded by default when BetterTelnet is started, click here. END-DIALOG DIALOG 1002 1.1 To close the dialog box and use the new ANSI colors you have entered, click here. 2.1 To close this dialog box and discard all changes, click here. 3.1 To change the appearance of ANSI Black, click here. 4.1 To change the appearance of ANSI Red, click here. 5.1 To change the appearance of ANSI Green, click here. 6.1 To change the appearance of ANSI Yellow (i.e. Brown), click here. 7.1 To change the appearance of ANSI Blue, click here. 8.1 To change the appearance of ANSI Magenta, click here. 9.1 To change the appearance of ANSI Cyan, click here. 10.1 To change the appearance of ANSI White (i.e. Light Grey), click here. 11.1 To change the appearance of ANSI Bold Black (i.e. Dark Grey), click here. 12.1 To change the appearance of ANSI Bold Red (i.e. Orange), click here. 13.1 To change the appearance of ANSI Bold Green (i.e. Light Green), click here. 14.1 To change the appearance of ANSI Bold Yellow (i.e. Yellow), click here. 15.1 To change the appearance of ANSI Bold Blue (i.e. Light Blue), click here. 16.1 To change the appearance of ANSI Bold Magenta (i.e. Pink), click here. 17.1 To change the appearance of ANSI Bold Cyan (i.e. Light Cyan), click here. 18.1 To change the appearance of ANSI Bold White (i.e. White), click here. END-DIALOG DIALOG 7001 1.1 To close this dialog box and save all changes, click here. 2.1 To close this dialog box and discard all changes, click here. 3.1 This option is currently off, so windows will close when their corresponding connections close. To turn it on, so that windows will stay open, click this checkbox. 3.3 This option is currently on, so windows will stay open even after their corresponding connections close. To turn it off, so that windows will close, click this checkbox. 4.1 This option is currently off, so window positions will not automatically be staggered. To turn it on, click this checkbox. 4.3 This option is currently on, so windows will automatically be staggered. To turn it off, click this checkbox. 5.1 This option is currently off, so many menu items will not have command-key equivalents. To turn it on and give these menu items command-key equivalents, click this checkbox. 5.3 This option is currently on, so many menu items will have command-key equivalents. To turn it off and remove these command-key equivalents, click this checkbox. 6.1 This option is currently off, so the backquote ` will not be remapped to ESCape. To turn it on, click this checkbox. 6.3 This option is currently on, so the backquote key ` will be remapped to ESCape. To turn it off, click this checkbox. 7.1 This option is currently off, so the Keypad and Function menus will not be shown. To turn this option on and show those menus, click this checkbox. 7.3 This option is currently on, so the Keypad and Function menus will be shown in the menu bar. To turn this option off and hide those menus, click this checkbox. 8.1 This option is currently off, so the cursor will not blink. To turn this option on and make the cursor blink, click this checkbox. 8.3 This option is currently on, so the cursor will blink. To turn this option off and stop the cursor from blinking, click this checkbox. 9.1 Changes the appearance of the cursor. 9.3 Changes the appearance of the cursor. This option is selected. 10.1 Changes the appearance of the cursor. 10.3 Changes the appearance of the cursor. This option is selected. 11.1 Changes the appearance of the cursor. 11.3 Changes the appearance of the cursor. This option is selected. 12.1 This option is currently off, so BetterTelnet will not flash its icon in the menu bar if a beep is received while it is in the background. To turn this option on, click this checkbox. 12.3 This option is currently on, so BetterTelnet will attempt to flash its icon in the menu bar if a beep is received while it is in the background. To turn this option off, click this checkbox. 13.1 This option is currently off, so Kerberos tickets will not be expired when all connections have been closed. Note that this works only with KClient, not AuthMan. To turn this option on, click here. 13.3 This option is currently on, so Kerberos tickets will be expired when all connections have been closed. Note that this works only with KClient, not AuthMan. To turn this option off, click here. 14.1 Enter the Copy Table Threshhold in this box. When you select Copy Table from the Edit menu, this is the minimum number of consecutive spaces that will be converted to a tab. 15.1 Enter the Send Timeout here in seconds. If connections are unexpectedly closing on you, increase this value. 16.1 Click this button to select an application with which you want captured and saved text files to be associated. 18.1 Enter the Open Timeout here in seconds. If you are having problems opening connections to a busy host, increase this value. 20.1 Enter the Timeslice here, in ticks (sixtieths of a second). This is the amount of time Telnet yields to other applications. Increasing it will decrease Telnet's responsiveness but will increase the responsiveness of other open applications. 21.1 Enter the amount of pixels by which you want windows to be staggered in this box. 23.1 Click this button to select the colors to use in response to ANSI color control sequences. 24.1 Enter the creator code of the application with which you want captured and saved text files to be associated in this box. 30.1 This option is currently off, so the Open Connection dialog will not appear automatically on startup. To turn this option on, click this checkbox. 30.3 This option is currently on, so the Open Connection dialog will appear automatically on startup. To turn this option off, click this checkbox. 31.1 This option is currently off, so you will be warned on quit if any connections are open. To turn this option on, click this checkbox. 31.3 This option is currently on, so you will not be warned on quit to close any open connections. To turn this option off, click this checkbox. 32.1 This option is currently off, so the favorite will not be opened automatically on startup. To turn this option on, click this checkbox. 32.3 This option is currently on, so the favorite will be opened automatically on startup. To turn this option off, click this checkbox. 33.1 This option is currently off, so you cannot type in the name of a Favorite in the Host Name box in the Open Connection dialog to open it. To turn this option on, click this checkbox. 33.3 This option is currently on, so typing in the name of a Favorite in the Host Name box in the Open Connection dialog will open that Favorite, provided that the name contains no spaces or colons. To turn this option off, click this checkbox. 34.1 This option is currently off, so all fonts will be shown in Font menus. To turn this option on and show only monospaced fonts, click this checkbox. Note that this will increase BetterTelnet's startup time. 34.3 This option is currently on, so only monospaced fonts will be shown in Font menus. To turn this option off and show all fonts, click this checkbox. Turning this option off will decrease BetterTelnet's startup time. 36.1 This option is currently off, so trailing spaces will be clipped from each line when copying, saving, or printing only for multiple-line selections. To clip trailing spaces even on single-line selections, click this checkbox. 36.3 This option is currently on, so trailing spaces will always be clipped from each line when copying, saving, or printing. To clip trailing spaces only on multiple-line selections, click this checkbox. END-DIALOG DIALOG 7003 1.1 To close this dialog box and save all changes, click here. 2.1 To close this dialog box and discard all changes, click here. 3.1 Click here to change the foreground color for normal text. 4.1 Click here to change the background color for normal text. 5.1 Click here to change the foreground color for blinking text. 6.1 Click here to change the background color for blinking text. 12.1 The string in this text box will be sent to the remote host in response to a Telnet terminal type query. 14.1 Enter the width of the terminal window in columns in this box. 16.1 Enter the height of the terminal window in rows in this box. 18.1 Enter the name of this Terminal entry in this box. 20.1 Select the font to use for normal text from this pop-up menu. 21.1 Enter the font size in this box. 23.1 Enter the number of lines to use for a scrollback buffer in this box. 24.1 This option is turned off, so ANSI color sequences will not be recognized. To turn this option on, click this checkbox. 24.3 This option is turned on, so ANSI color sequences will be recognized. To turn this option off, click this checkbox. 25.1 This option is turned off, so the xterm sequences to change the window title will not be recognized. To turn this option on, click this checkbox. 25.3 This option is turned on, so the xterm sequences to change the window title will be recognized. To turn this option off, click this checkbox. 26.1 This option is turned off, so long lines will be truncated by default. To turn this option on and wrap long lines to the next line, click this checkbox. 26.3 This option is turned on, so long lines will be wrapped to the next line by default. To turn this option off and truncate large lines, click this checkbox. 28.1 This option is turned off, so the correct VT100/VT220 codes for the arrow keys will be sent. To send emacs-style codes instead, click this checkbox. 28.3 This option is turned on, so emacs-style codes will be sent for the arrow keys. To send the correct VT100/VT220 codes instead, click this checkbox. 29.1 This option is turned off, so the PgUp, PgDown, Home, and End keys will send the correct VT220 codes. To have these keys scroll the scrollback instead, click this checkbox. 29.3 This option is turned on, so the PgUp, PgDown, Home, and End keys will scroll the scrollback. To have these keys send the correct VT220 codes instead, click this checkbox. 30.1 This option is turned off, so the high bit will be clipped off incoming characters. This will break proper character set translation. To keep all 8 bits instead, click this checkbox. 30.3 This option is turned on, so the high bit will be left alone on incoming characters. This will permit character set translation to work correctly. To clip off the high bit instead, click this checkbox. 31.1 This option is turned off. You may want to turn it on by clicking this checkbox if some lines aren't being saved correctly in your scrollback. 31.3 This option is turned on. You may want to turn it off by clicking this checkbox if too many lines are being saved in your scrollback. 32.1 This option is turned off, so keypad keys will send the correct VT100/VT220 codes. To have the keypad keys send the numbers and symbols printed on them instead, turn this option on by clicking this checkbox. 32.3 This option is turned on, so keypad keys will send the number and symbols printed on them. To send the correct VT100/VT220 codes instead, turn this option off by clicking this checkbox. 33.1 Emulation is currently set to VT220. To set it to VT100/VT102 instead, click here. 33.3 This option is selected; emulation is currently set to VT100/VT102. 34.1 Emulation is currently set to VT100/VT102. To set it to VT220 instead, click here. 34.3 This option is selected; emulation is currently set to VT220. 35.1 To set the emacs meta key to Control-Command, click here. 35.3 This option is selected, so the emacs meta key is set to Control-Command. 36.1 To set the emacs meta key to Option, click here. Note that this requires the EMACS KCHR to be installed in your System file. 36.3 This option is selected, so the emacs meta key is set to Option. Note that this requires the EMACS KCHR to be installed in your System file. 37.1 To turn off the emacs meta key, click here. 37.3 This option is selected, so the emacs meta key is turned off. 39.1 This option is off, so the Del (forward delete) key is not mapped to Control-D. To turn this option on, click this checkbox. 39.3 This option is on, so the Del (forward delete) key is mapped to Control-D. To turn this option off, click this checkbox. 40.1 This option is off, so the bold font selected below will not be used for boldfaced text. To turn this option on, click this checkbox. 40.3 This option is on, so the bold font selected below will be used for boldfaced text. To turn this option off, click this checkbox. 41.1 This option is off, so the bold ANSI color set will not be used for boldfaced text. To turn this option on, click this checkbox. 41.3 This option is on, so the bold ANSI color set will be used for boldfaced text. To turn this option off, click this checkbox. 43.1 Use this pop-up menu to select the font used for boldfaced text. 44.1 This option is off, so boldfaced text will not be automatically inversed. To turn this option on, click this checkbox. 44.3 This option is on, so boldfaced text will be automatically inversed as well. To turn this option off, click this checkbox. END-DIALOG DIALOG 7004 1.1 To close this dialog box and save all changes, click here. 2.1 To close this dialog box and discard all changes, click here. 3.1 To turn off Tektronix emulation, click here. 3.3 Tektronix emulation is currently turned off. 4.1 To turn on Tektronix 4014 emulation, click here. 4.3 Tektronix 4014 emulation is currently turned on. 5.1 To turn on Tektronix 4105 emulation, click here. 5.3 Tektronix 4105 emulation is currently turned on. 6.1 To set the Paste Mode to Quick, so that pastes are performed all at once, click here. 6.3 The Paste Mode is set to Quick; pastes are performed all at once. 7.1 To set the Paste Mode to Block, so that pastes are performed in blocks, click here. 7.3 The Paste Mode is set to Block; pastes are performed in blocks. 8.1 The Delete key currently sends Backspace. To have it send Delete instead, click here. 8.3 This option is selected; the Delete key currently sends Delete. 9.1 The Delete key currently sends Delete. To have it send Backspace instead, click here. 9.3 This option is selected; the Delete key currently sends Backspace. 10.1 This option is off. You may want to turn it on if some lines are not being saved into your scrollback. 10.3 This option is on. You may want to turn it off if too many lines are being saved into your scrollback. 11.1 This option is off, so carriage returns will be sent as CR LF. To send carriage returns as CR NULL instead, turn this option on by clicking this checkbox. 11.3 This option is on, so carriage returns will be sent as CR NULL. To send carriage returns as CR LF instead, turn this option off by clicking this checkbox. 12.1 This option is off, so linemode will not be allowed. To turn it on, click this checkbox. 12.3 This option is on, so linemode will be allowed. To turn it off, click this checkbox. 13.1 This option is off, so a Tektronix new page code will open a new window. To have it clear the current Tektronix window instead, click this checkbox. 13.3 This option is on, so a Tektronix new page code will clear the current Tektronix window if possible. To have it open a new window instead, click this checkbox. 14.1 This option is off, so when local echo is active, the user's input will be sent to the server line by line. To send it character by character instead even with local echo on, click this checkbox. 14.3 This option is on, so the user's input will always be sent to the server character by character, even if local echo is on, unless linemode is on. To send the input line by line whenever local echo is on, click this checkbox. 15.1 Kerberos authentication is currently off. To turn it on, click here. 15.3 Kerberos authentication is currently on. To turn it off, click here. 16.1 Kerberos encryption is currently off. To turn it on, click here. 16.3 Kerberos encryption is currently on. To turn it off, click here. 18.1 Enter the name of this Favorite in this box. 19.1 Enter the name of the host to connect to in this box. 20.1 Enter the port number in this box. 21.1 Enter the paste size for block-mode pastes in this box. 22.1 Enter a control character (for example, ^C) to use for sending Interrupt Process signals. 23.1 Enter a control character (for example, ^S) to use for suspending output. 24.1 Enter a control character (for example, ^Q) to use for resuming output. 25.1 Use this pop-up menu to select a set of Terminal settings. 26.1 Use this pop-up menu to select a translation table. ISO 8859-1 is a good choice. 39.1 Enter the network block size in this box. Most users will not need to change this. 40.1 Click this button to save this Favorite in a double-clickable Set file. 41.1 Click this button to add this Favorite to a double-clickable Set file. 42.1 This option is off, so Berkeley 4.3 CR mode will be disabled on ports other than 23. To turn it on, click this checkbox. 42.3 This option is on, so Berkeley 4.3 CR mode will be used on ports other than 23. To turn it off, click this checkbox. 43.1 This option is off, so beeps will not be ignored. To ignore beeps, click this checkbox. 43.3 This option is on, so beeps will be ignored. To stop ignoring beeps, click this checkbox. 44.1 This option is off, so form feeds will be recognized when printing. To ignore form feeds, click this checkbox. 44.3 This option is on, so form feeds will be ignored when printing. To recognize form feeds, click this checkbox. END-DIALOG \ No newline at end of file diff --git a/source/Url/url.c b/source/Url/url.c new file mode 100755 index 0000000..c943ce6 --- /dev/null +++ b/source/Url/url.c @@ -0,0 +1 @@ +// url.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "rsinterf.proto.h" #include "IConfig.proto.h" #include "url.proto.h" #include "vsdata.h"//because the damn prototype on the next line needs it #include "vsinterf.proto.h" #include "ICTypes.h" #include "ICAPI.h" #include "ICKeys.h" // Revised 5/97 to use IC 1.1's new ICLaunchURL routine. (RAB BetterTelnet 1.0b2c2) extern ICInstance inst; TURLKind ParseURL(Handle, short*); Boolean MyStrNEqual (char *s1, char *s2, short n); OSErr FindAppOnVolume (OSType sig, short vRefNum, FSSpec *file); OSErr FindAppFromSig (OSType sig, FSSpec *fSpec, Boolean *running, ProcessSerialNumber *psn); OSErr FindRunningAppBySignature (OSType sig, FSSpec *fSpec, ProcessSerialNumber *psn); OSErr LaunchAppWithEventAndString (Boolean running, FSSpec *appSpec, ProcessSerialNumber *psn, OSType eventClass, OSType eventID, OSType keyword, char *str, unsigned short launchFileFlags, unsigned short launchControlFlags); OSErr OpenHelperWithURL (OSType sig, char *url); OSErr GetLastModDateTime(FSSpec *fSpec, unsigned long *lastModDateTime); OSErr VolHasDesktopDB (short vRefNum, Boolean *hasDesktop); OSErr GetIndVolume (short index, short *vRefNum); #define kGetURLEventClass 'GURL' #define kGetURLEventID 'GURL' static unsigned char gTable[256] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x41, 0x41, 0x43, 0x45, 0x4E, 0x4F, 0x55, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x55, 0x55, 0x55, 0x55, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0x4F, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xAE, 0x4F, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0x22, 0x22, 0xC9, 0x20, 0x41, 0x41, 0x4F, 0xAE, 0xAE, 0xD0, 0xD1, 0x22, 0x22, 0x27, 0x27, 0xD6, 0xD7, 0x59, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, }; char *gURLSchemeNames[] = { ":", /* kNotURL */ "mailto:", "news:", "nntp:", "ftp:", "http:", "gopher:", "wais:", "telnet:", "rlogin:", "tn3270:", "finger:", "whois:", nil }; void UnloadURL(void) { } Boolean MyStrNEqual (char *s1, char *s2, short n) { unsigned char *t = gTable; unsigned char *us1 = (unsigned char *)s1; unsigned char *us2 = (unsigned char *)s2; while (--n >= 0 && t[*us1++] == t[*us2++]) /* do nothing */; return n < 0; } #define CR 0x0d /* the carriage return character */ #define isLWSP(a) ((a) == ' ' || (a) == '\t') #define isLWSPorCR(a) (isLWSP(a) || (a) == CR) void HandleURL(short w) { Handle urlH; TURLKind urlKind; OSErr err; OSType sig; short returnedSize; long fakeSelBegin, fakeSelEnd; urlH = RSGetTextSel(w, 0); if ((urlH == (char **)-1L) || (urlH == nil)) { return; } HLock(urlH); urlKind = ParseURL(urlH, &returnedSize); if (urlKind == 100) return; else if ((urlKind == kTelnetURL)/*||(urlKind == kRloginURL)*/) { //we handle this, send apple event to ourselves ProcessSerialNumber psn; unsigned short launchControlFlags; FlashSelection(w); launchControlFlags = launchContinue | launchNoFileFlags; launchControlFlags |= launchDontSwitch; GetCurrentProcess(&psn); err = LaunchAppWithEventAndString(TRUE, NULL, &psn, kGetURLEventClass, kGetURLEventID, keyDirectObject, *urlH, 0, launchControlFlags); return; } else { fakeSelBegin = 0; fakeSelEnd = returnedSize; ICFindConfigFile(inst, 0, 0); ICLaunchURL(inst, aligned_pstring("\p"), *urlH, returnedSize, &fakeSelBegin, &fakeSelEnd); } // sig = GetHelperInfo(urlKind); // if (sig == NULL) // return; FlashSelection(w); // err = OpenHelperWithURL(sig, *urlH); return; } TURLKind ParseURL(Handle urlH, short *returnedSize) { short size; char *textBegin, *textEnd, *p; TURLKind urlKind; char *schemeName; size = GetHandleSize(urlH); textBegin = *urlH; textEnd = *urlH + size - 1; /* strip off leading white space and lagging white space */ while (isLWSPorCR(*textBegin) && textBegin < textEnd) textBegin++; while (isLWSPorCR(*textBegin) && textBegin < textEnd) textEnd--; /* look for < and > on each end, strip em off */ if (*textBegin == '<') textBegin++; if (*textEnd == '>') textEnd--; /* look for URL:, strip it*/ if ((MyStrNEqual("URL:", textBegin, 4))) textBegin += 4; size = textEnd - textBegin + 1; if (size <= 0) return 100; /* strip CR inside */ p = textBegin; while (p < textEnd) { if (*p == CR) { BlockMoveData(p+1, p,size - (p-textBegin + 1)); size--; textEnd--; } else p++; } /* Clean up and NULL terminate */ BlockMoveData(textBegin, *urlH, size); *(*urlH + size) = 0; /* get url type */ p = *urlH; while ((*p != ':')&&(p < *urlH + size - 1)) p++; if (p - *urlH >= size - 1) // colon not found { /* might be mail address */ //if (isMailAddress(urlH)) // return kMailtoURL; // else return 100; } *returnedSize = size; for (urlKind = kNotURL; ; urlKind++) { schemeName = gURLSchemeNames[urlKind]; if (schemeName == nil) return kNotURL; if (MyStrNEqual(*urlH, schemeName, strlen(schemeName))) return urlKind; } } OSErr FindAppOnVolume (OSType sig, short vRefNum, FSSpec *file) { DTPBRec pb; OSErr err = noErr; short ioDTRefNum, i; FInfo fInfo; FSSpec candidate; unsigned long lastModDateTime, maxLastModDateTime; memset(&pb, 0, sizeof(DTPBRec)); pb.ioCompletion = nil; pb.ioVRefNum = vRefNum; pb.ioNamePtr = nil; err = PBDTGetPath(&pb); if (err != noErr) return err; ioDTRefNum = pb.ioDTRefNum; memset(&pb, 0, sizeof(DTPBRec)); pb.ioCompletion = nil; pb.ioIndex = 0; pb.ioFileCreator = sig; pb.ioNamePtr = file->name; pb.ioDTRefNum = ioDTRefNum; err = PBDTGetAPPLSync(&pb); if (err == fnfErr || err == paramErr) return afpItemNotFound; if (err != noErr) return err; file->vRefNum = vRefNum; file->parID = pb.ioAPPLParID; err = FSpGetFInfo(file, &fInfo); if (err == noErr) return noErr; i = 1; maxLastModDateTime = 0; while (true) { memset(&pb, 0, sizeof(DTPBRec)); pb.ioCompletion = nil; pb.ioIndex = i; pb.ioFileCreator = sig; pb.ioNamePtr = candidate.name; pb.ioDTRefNum = ioDTRefNum; err = PBDTGetAPPLSync(&pb); if (err != noErr) break; candidate.vRefNum = vRefNum; candidate.parID = pb.ioAPPLParID; err = GetLastModDateTime(file, &lastModDateTime); if (err == noErr) { if (lastModDateTime > maxLastModDateTime) { maxLastModDateTime = lastModDateTime; *file = candidate; } } i++; } return maxLastModDateTime > 0 ? noErr : afpItemNotFound; } /*---------------------------------------------------------------------------- GetLastModDateTime Get the last mod date and time of a file. Entry: fSpec = pointer to file spec. Exit: function result = error code. *lastModDateTime = last mod date and time. ----------------------------------------------------------------------------*/ OSErr GetLastModDateTime(FSSpec *fSpec, unsigned long *lastModDateTime) { CInfoPBRec pBlock; OSErr err = noErr; pBlock.hFileInfo.ioNamePtr = fSpec->name; pBlock.hFileInfo.ioVRefNum = fSpec->vRefNum; pBlock.hFileInfo.ioFDirIndex = 0; pBlock.hFileInfo.ioDirID = fSpec->parID; err = PBGetCatInfoSync(&pBlock); if (err != noErr) return err; *lastModDateTime = pBlock.hFileInfo.ioFlMdDat; return noErr; } /*---------------------------------------------------------------------------- VolHasDesktopDB Check to see if a volume supports the new desktop database. Entry: vRefNum = vol ref num of volumn Exit: function result = error code. *hasDesktop = true if volume has the new desktop database. ----------------------------------------------------------------------------*/ OSErr VolHasDesktopDB (short vRefNum, Boolean *hasDesktop) { HParamBlockRec pb; GetVolParmsInfoBuffer info; OSErr err = noErr; pb.ioParam.ioCompletion = nil; pb.ioParam.ioNamePtr = nil; pb.ioParam.ioVRefNum = vRefNum; pb.ioParam.ioBuffer = (Ptr)&info; pb.ioParam.ioReqCount = sizeof(info); err = PBHGetVolParmsSync(&pb); *hasDesktop = err == noErr && (info.vMAttrib & (1L << bHasDesktopMgr)) != 0; return err; } OSErr FindAppFromSig (OSType sig, FSSpec *fSpec, Boolean *running, ProcessSerialNumber *psn) { OSErr err = noErr; short sysVRefNum, vRefNum, index; Boolean hasDesktopDB; long junk; if (running != nil) { err = FindRunningAppBySignature(sig, fSpec, psn); *running = true; if (err == noErr) return noErr; *running = false; if (err != procNotFound) return err; } err = FindFolder(kOnSystemDisk, kSystemFolderType, false, &sysVRefNum, &junk); if (err != noErr) return err; vRefNum = sysVRefNum; index = 0; while (true) { if (index == 0 || vRefNum != sysVRefNum) { err = VolHasDesktopDB(vRefNum, &hasDesktopDB); if (err != noErr) return err; if (hasDesktopDB) { err = FindAppOnVolume(sig, vRefNum, fSpec); if (err != afpItemNotFound) return err; } } index++; err = GetIndVolume(index, &vRefNum); if (err == nsvErr) return fnfErr; if (err != noErr) return err; } } OSErr GetIndVolume (short index, short *vRefNum) { ParamBlockRec pb; OSErr err = noErr; pb.volumeParam.ioCompletion = nil; pb.volumeParam.ioNamePtr = nil; pb.volumeParam.ioVolIndex = index; err = PBGetVInfoSync(&pb); *vRefNum = pb.volumeParam.ioVRefNum; return err; } /*---------------------------------------------------------------------------- FindRunningAppBySignature Find a running app given its signature. Entry: sig = signature of app. Exit: function result = error code. = procNotFound if not running. *fSpec = file spec of app. *psn = process serial number of running app. ----------------------------------------------------------------------------*/ OSErr FindRunningAppBySignature (OSType sig, FSSpec *fSpec, ProcessSerialNumber *psn) { OSErr err = noErr; ProcessInfoRec info; psn->highLongOfPSN = 0; psn->lowLongOfPSN = kNoProcess; while (true) { err = GetNextProcess(psn); if (err != noErr) return err; info.processInfoLength = sizeof(info); info.processName = nil; info.processAppSpec = fSpec; err = GetProcessInformation(psn, &info); if (err != noErr) return err; if (info.processSignature == sig) return noErr; } } /*---------------------------------------------------------------------------- LaunchAppWithEventAndString Launch an application with an initial event with a string parameter. Entry: running = true if application is running, in which case it is sent the odoc event. appSpec = file spec of application. *psn = process serial number of app if it is running. eventClass = event class. eventID = event id. keyword = parameter keyword (keyDirectObject if string is the direct object). str = the string parameter for the event. launchFileFlags = file flags. launchControlFlags = control flags. Exit: function result = error code. ----------------------------------------------------------------------------*/ OSErr LaunchAppWithEventAndString (Boolean running, FSSpec *appSpec, ProcessSerialNumber *psn, OSType eventClass, OSType eventID, OSType keyword, char *str, unsigned short launchFileFlags, unsigned short launchControlFlags) { ProcessSerialNumber thePSN; LaunchParamBlockRec launchThis; AEDesc target = {0, nil}; AEDesc stringDesc = {0, nil}; AEDesc launchDesc = {0, nil}; AppleEvent theEvent = {0, nil}; AppleEvent theReply = {0, nil}; OSErr err = noErr; Boolean autoParamValue = false; if (running) thePSN = *psn; err = AECreateDesc(typeProcessSerialNumber, &thePSN, sizeof(thePSN), &target); if (err != noErr) goto exit; err = AECreateAppleEvent(eventClass, eventID, &target, kAutoGenerateReturnID, kAnyTransactionID, &theEvent); if (err != noErr) goto exit; err = AECreateDesc(typeChar, str, strlen(str), &stringDesc); if (err != noErr) goto exit; err = AEPutParamDesc(&theEvent, keyword, &stringDesc); if (err != noErr) goto exit; if (running) { err = AESend(&theEvent, &theReply, kAENoReply, kAENormalPriority, kNoTimeOut, nil, nil); if (err != noErr) goto exit; if ((launchControlFlags & launchDontSwitch) == 0) { err = SetFrontProcess(psn); if (err != noErr) goto exit; } } else { err = AECoerceDesc(&theEvent, typeAppParameters, &launchDesc); if (err != noErr) goto exit; HLock(theEvent.dataHandle); launchThis.launchAppSpec = appSpec; launchThis.launchAppParameters = (AppParametersPtr)*launchDesc.dataHandle; launchThis.launchBlockID = extendedBlock; launchThis.launchEPBLength = extendedBlockLen; launchThis.launchFileFlags = launchFileFlags; launchThis.launchControlFlags = launchControlFlags; err = LaunchApplication(&launchThis); } exit: if (target.dataHandle != nil) AEDisposeDesc(&target); if (stringDesc.dataHandle != nil) AEDisposeDesc(&stringDesc); if (launchDesc.dataHandle != nil) AEDisposeDesc(&launchDesc); if (theEvent.dataHandle != nil) AEDisposeDesc(&theEvent); if (theReply.dataHandle != nil) AEDisposeDesc(&theReply); return err; } /*---------------------------------------------------------------------------- OpenHelperWithURL Open a helper program and pass it a URL string. Entry: helperInfo = pointer to helper info. url = URL string. Exit: function result = error code. ----------------------------------------------------------------------------*/ OSErr OpenHelperWithURL (OSType sig, char *url) { OSErr err = noErr; ProcessSerialNumber psn; FSSpec appSpec; Boolean running; unsigned short launchControlFlags; launchControlFlags = launchContinue | launchNoFileFlags; err = FindAppFromSig(sig, &appSpec, &running, &psn); if (err != noErr) return err; err = LaunchAppWithEventAndString(running, &appSpec, &psn, kGetURLEventClass, kGetURLEventID, keyDirectObject, url, 0, launchControlFlags); return err; } #define isurlschemechar(c) (isalnum((c)) || c == '+' || c == '.' || c == '-') Boolean FindURLAroundPoint(Point curr, short w) { /* called by RSSelect when Command Click has occured outside any selection. This routine looks for urls around the current point, makes that the selected area if it finds one, and returns TRUE. Otherwise leaves the current selection area untouched and returns FALSE. */ /* Note: the point we receive is already normalized to a character position */ short columns; Handle block; char *original, *start, *end, *textEnd, *p, *q; short i, numLines = 1; char EOLS = CR; short neededLines, endLine = 0, startLine = 0; short blockSize; Point startPoint, endPoint; short currentLine; char *tempBlockPtr; short tempCounter, lineLength[20]; Boolean found = FALSE, allowSpaces=FALSE; columns = VSgetcols(w) + 1; //VSgetcols returns one less than the number of columns /* we need enough space to find a 255 char URL on either side of the cursor */ neededLines = 510/columns; if (255%columns != 0) neededLines += 2; /* want it to be symmetric about this line */ if (neededLines%2 == 0) neededLines += 1; blockSize = neededLines*(columns + 1); //we need space for the \r block = myNewHandle((long)blockSize); textEnd = *block + blockSize; HLock(block); /* get the lines we need */ VSgettext(w, 0, curr.v-(neededLines-1)/2, columns-1, curr.v+(neededLines-1)/2, *block, blockSize, &EOLS, 0); original = *block; for (i = 0; i < (neededLines-1)/2; i++) { while (*original != CR) original++; original++; } original+= curr.h + 1; tempBlockPtr = *block; for (i = 0; i < neededLines; i++) { tempCounter = 0; while (*tempBlockPtr++ != CR) tempCounter++; lineLength[i] = tempCounter; } p = original; q = original - 1; currentLine = (neededLines-1)/2 + 1; while ((!found)&&(p > *block)) { while (p >= *block && !isLWSPorCR(*p) && *p != '<' && *p != '"') p--; if (*p == CR) { if (lineLength[currentLine - 2] == columns) { p--; //this is just a wrapped line currentLine--; } else found = TRUE; } else found = TRUE; } startLine = currentLine; if (*p != '<') p++; else allowSpaces = TRUE; currentLine = (neededLines-1)/2 + 1; found = FALSE; while (!found) { while (q < textEnd && (*q != CR) &&(!isLWSP(*q) || allowSpaces) && *q != '>' && *q != '"') q++; if (*q == CR) { if (lineLength[currentLine-1] == columns) { q++; //this is just a wrapped line currentLine++; } else found = TRUE; } else found = TRUE; } endLine = currentLine; if (*q != '>') q--; if (p >= q) return FALSE; while (p < q && (isLWSPorCR(*p))) p++; while (p < q && (isLWSPorCR(*q))) q--; if (*p == '<') { if (*q != '>') return FALSE; } else { if (*q == '>') return FALSE; } start = p; end = q; UnHiliteSelection(w); HUnlock(block); startPoint.v = curr.v - ((neededLines-1)/2 + 1 - startLine); endPoint.v = curr.v + (endLine -(neededLines-1)/2 - 1); if (startPoint.v == curr.v) startPoint.h = curr.h - (original - start); else { long numChars = 0; for (i = 0; i < startLine - 1; i++) numChars += lineLength[i] + 1; startPoint.h = (start - *block - numChars - 1); } if (endPoint.v == curr.v) endPoint.h = curr.h + (end - original + 1); else { long numChars = 0; for (i = 0; i < endLine - 1; i++) numChars += lineLength[i] + 1; endPoint.h = (end - *block - numChars); } HiliteThis(w, startPoint, endPoint); return TRUE; } \ No newline at end of file diff --git a/source/Url/url.h b/source/Url/url.h new file mode 100755 index 0000000..4a2cd0e --- /dev/null +++ b/source/Url/url.h @@ -0,0 +1 @@ +/*url.h */ typedef enum TURLKind { kNotURL, kMailtoURL, kNewsURL, kNntpURL, kFtpURL, kHttpURL, kGopherURL, kWaisURL, kTelnetURL, kRloginURL, kTn3270URL, kFingerURL, kWhoisURL } TURLKind; \ No newline at end of file diff --git a/source/Url/url.proto.h b/source/Url/url.proto.h new file mode 100755 index 0000000..2a5f8eb --- /dev/null +++ b/source/Url/url.proto.h @@ -0,0 +1 @@ +void HandleURL(short w); Boolean FindURLAroundPoint(Point curr, short w); void UnloadURL(void); \ No newline at end of file diff --git a/source/ae/ae.c b/source/ae/ae.c new file mode 100755 index 0000000..37d6a96 --- /dev/null +++ b/source/ae/ae.c @@ -0,0 +1 @@ +/* * ae.c * Code to handle the AppleEvents we recognize */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "wind.h" // For connections.proto.h #include "ae.proto.h" #include "connections.proto.h" // For OpenConnectionFromURL proto #include "Sets.proto.h" // For readconfig proto #include "macros.proto.h" // For loadMacro proto #include "menuseg.proto.h" // For HandleQuit proto #include "debug.h" // For ShowDebugWindow proto static void ProcessURLEscapeCodes (char *url, char **end); void AEunload(void) { } SIMPLE_UPP(MyHandleODoc, AEEventHandler); pascal OSErr MyHandleODoc (AppleEvent *theAppleEvent, AppleEvent* reply, long handlerRefCon) { FSSpec myFSS; AEDescList docList; OSErr err; long index, itemsInList; Size actualSize; AEKeyword keywd; DescType returnedType; FInfo fileInfo; if ((err = AEGetParamDesc (theAppleEvent, keyDirectObject, typeAEList, &docList)) != noErr) return err; // check for missing parameters if ((err = MyGotRequiredParams (theAppleEvent)) != noErr) return err; // count the number of descriptor records in the list if ((err = AECountItems (&docList, &itemsInList)) != noErr) return err; for (index = 1; index <= itemsInList; index++) { err = AEGetNthPtr (&docList, index, typeFSS, &keywd, &returnedType, (Ptr) &myFSS, sizeof(myFSS), &actualSize); if (err) return err; FSpGetFInfo(&myFSS, &fileInfo); /* make sure it's a data file */ if (fileInfo.fdType == kNCSASetFileType) { TelInfo->gotDocument = 1; readconfig(myFSS); // Read the actual set } else if(fileInfo.fdType == 'TEXT') loadMacros(&myFSS); else if (fileInfo.fdType == 'DBUG') { TelInfo->debug = TRUE; ShowDebugWindow(); } } err = AEDisposeDesc (&docList); return noErr; } SIMPLE_UPP(MyHandlePDoc, AEEventHandler); pascal OSErr MyHandlePDoc (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) { // We don't print files. return (errAEEventNotHandled); } SIMPLE_UPP(MyHandleOApp, AEEventHandler); pascal OSErr MyHandleOApp (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) { // Don't need to do anything for OApp. // Well, actually, we do, because we don't want to show the Open Connection box // automatically if a set file was opened. if (gApplicationPrefs->autoOpenDialog && !TelInfo->gotDocument) PresentOpenConnectionDialog(); return noErr; } SIMPLE_UPP(MyHandleQuit, AEEventHandler); pascal OSErr MyHandleQuit (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon) { if (HandleQuit()) return(-128); // userCancelledErr return(noErr); } SIMPLE_UPP(MyHandleGURL, AEEventHandler); pascal OSErr MyHandleGURL (AppleEvent *theAppleEvent, AppleEvent* reply, long handlerRefCon) { OSErr err; DescType returnedType; Size actualSize; char URLString[255]; char *beg, *end, *user, *password, *portstring, *host; if ((err = AEGetParamPtr(theAppleEvent, keyDirectObject, typeChar, &returnedType, URLString, sizeof(URLString)-1, &actualSize)) != noErr) return err; // check for missing parameters if ((err = MyGotRequiredParams(theAppleEvent)) != noErr) return err; URLString[actualSize] = 0; // Terminate the C string beg = &URLString[0]; end = &URLString[actualSize-1]; // Strip leading spaces while ((beg < end) && (*beg == ' ')) beg++; // Strip trailing spaces while ((end < beg) && (*end == ' ')) end--; // Look for (and strip) beginning and ending angle brackets if (*beg == '<') { if (*end != '>') { // Leading angle bracket, but no trailing angle bracket err = paramErr; goto badExit; } // Nuke the brackets beg++; end--; } // Terminate the string we currently have (for strncmp fn's) *(end+1) = 0; // Look for (and strip) leading "URL:" if (!strncmp(beg, "URL:", 4)) { beg += 4; } // Look for (and strip) leading "telnet://" if (strncmp(beg, "telnet://", 9)) // No leading "telnet://" { if (strncmp(beg, "rlogin://", 9)) { err = paramErr; goto badExit; } } beg += 9; // Drop any ending slash if (*end == '/') { *end = 0; end--; } // Process any escaped characters ProcessURLEscapeCodes(beg, &end); // Set up for URL parsing password = nil; portstring = nil; host = nil; // Assume exists user = beg; // Leading : or @ is a no-no if ((*beg == ':') || (*beg == '@')) { err = paramErr; goto badExit; } // Scan for : or @ or end of string while ((beg <= end) && (*beg != ':') && (*beg != '@')) beg++; // If we reached the end, only a host was given if (beg > end) { host = user; user = nil; goto goodUrl; } // If : was found, scan in the password (or port) if (*beg == ':') { *beg++ = 0; password = beg; // Scan for : or @ or end of string while ((beg <= end) && (*beg != ':') && (*beg != '@')) beg++; if (*beg == ':') { // xxxx:yyyy: is a no-no err = paramErr; goto badExit; } if (*beg != '@') { // End of string. Must be host:port host = user; user = nil; portstring = password; password = nil; goto goodUrl; } // Have xxx:yyy@ *beg++ = 0; // Terminate password string } else { // Found @ *beg++ = 0; // Terminate user string } // Ok at this point have xxx:yyy@ or xxxx@ host = beg; // Scan for : or @ or end of string while ((beg <= end) && (*beg != ':') && (*beg != '@') && (*beg != '/')) //CCP fix bad telnets beg++; if (*beg == '@') { //xxx[:yyyy]@xxx@ is a no-no err = paramErr; goto badExit; } if (*beg != ':') { // End of string, we have xxxx[:yyyy]@zzzz *beg = 0; } else { *beg++ = 0; // Terminate host string portstring = beg; } goodUrl: TelInfo->gotDocument = 1; OpenConnectionFromURL(host, portstring, user, password); err = noErr; badExit: return err; } /*---------------------------------------------------------------------------- ProcessURLEscapeCodes Process "%xx" escape codes in a URL string (replace them by the characters they represent). Entry: url = URL with escape codes. Exit: url = URL with escape codes replaced by the characters they represent. Copyright 1994, Northwestern University. Modified 12/94 Jim Browne for NCSA ----------------------------------------------------------------------------*/ static void ProcessURLEscapeCodes (char *url, char **end) { char *p, *q; char c1, c2; p = q = url; while (*p != 0) { if (*p == '%') { c1 = tolower(*(p+1)); c2 = tolower(*(p+2)); if (isxdigit(c1) && isxdigit(c2)) { c1 = isdigit(c1) ? c1 - '0' : c1 - 'a' + 10; c2 = isdigit(c2) ? c2 - '0' : c2 - 'a' + 10; *q++ = (c1 << 4) + c2; p += 3; } else { *q++ = *p++; } } else { *q++ = *p++; } } *q = 0; *end = q-1; } OSErr MyGotRequiredParams (AppleEvent *theAppleEvent) { DescType returnedType; Size actualSize; OSErr err; err = AEGetAttributePtr (theAppleEvent, keyMissedKeywordAttr, typeWildCard, &returnedType, nil, 0, &actualSize); if (err == errAEDescNotFound) // you got all the required parameters return noErr; else if (!err) // you missed a required parameter return errAEEventNotHandled; else // the call to AEGetAttributePtr failed return err; } \ No newline at end of file diff --git a/source/ae/ae.proto.h b/source/ae/ae.proto.h new file mode 100755 index 0000000..943f550 --- /dev/null +++ b/source/ae/ae.proto.h @@ -0,0 +1 @@ +pascal OSErr MyHandleODoc (AppleEvent *theAppleEvent, AppleEvent* reply, long handlerRefCon); pascal OSErr MyHandlePDoc (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon); pascal OSErr MyHandleOApp (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon); pascal OSErr MyHandleQuit (AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefCon); pascal OSErr MyHandleGURL (AppleEvent *theAppleEvent, AppleEvent* reply, long handlerRefCon); OSErr MyGotRequiredParams (AppleEvent *theAppleEvent); PROTO_UPP(MyHandleODoc, AEEventHandler); PROTO_UPP(MyHandleOApp, AEEventHandler); PROTO_UPP(MyHandlePDoc, AEEventHandler); PROTO_UPP(MyHandleQuit, AEEventHandler); PROTO_UPP(MyHandleGURL, AEEventHandler); void AEunload(void); \ No newline at end of file diff --git a/source/config/IC/ICAPI.h b/source/config/IC/ICAPI.h new file mode 100755 index 0000000..98f95fb --- /dev/null +++ b/source/config/IC/ICAPI.h @@ -0,0 +1 @@ +/* Start Header */ /* File: ICAPI.h (intf) * Generated by: 1.0d4 * For: IC 1.3 * On: Sunday, 14 July 1996, 20:19:55 * * This file is part of the Internet Configuration system and * is placed in the public domain for the benefit of all. */ /* End Header */ /* IMPORTANT NOTES ABOUT THE C CONVERSION -------------------------------------- o Pascal "var" parameters are converted from "var x : y" to "y *x". This means that when you see the parameter "y *x" you should be aware that you *cannot pass in nil*. In future this restriction may be eased, especially for the attr parameter to ICGetPref. Parameters where nil is legal are declared using the explicit pointer type, ie "yPtr x". o Strings are *Pascal* strings. This means that they must be word aligned. MPW and Think C do this automatically. The last time I check, Metrowerks C does not. If it still doesn't, then IMHO it's a bug in their compiler and you should report it to them. o The canonical Internet Config interface is defined in Pascal. These headers have not been thoroughly tested. If there is a conflict between these headers and the Pascal interfaces, the Pascal should take precedence. */ /* ///////////////////////////////////////////////////////////////////////////////// */ #ifndef __ICAPI__ #define __ICAPI__ #ifndef __TYPES__ #include #endif #ifndef __FILES__ #include #endif #ifndef __ICTYPES__ #include "ICTypes.h" #endif #ifndef __ICKEYS__ #include "ICKeys.h" #endif /* ///////////////////////////////////////////////////////////////////////////////// */ #ifdef __cplusplus extern "C" { #endif /* Start ICAPI.h */ /* ***** Starting Up and Shutting Down ***** */ pascal ICError ICStart(ICInstance *inst, OSType creator); /* Call this at application initialisation. Set creator to your application * creator to allow for future expansion of the IC system. Returns * inst as a connection to the IC system. */ pascal ICError ICStop(ICInstance inst); /* It is illegal to call this routine inside a ICBegin/End pair. * Call this at application initialisation, after which inst * is no longer valid connection to IC. */ /* ***** Specifying a Configuration ***** */ pascal ICError ICFindConfigFile(ICInstance inst, short count, ICDirSpecArrayPtr folders); /* It is illegal to call this routine inside a ICBegin/End pair. * Call to configure this connection to IC. * Set count as the number of valid elements in folders. * Set folders to a pointer to the folders to search. * Setting count to 0 and folders to nil is OK. * Searches the specified folders and then the Preferences folder * in a unspecified manner. */ pascal ICError ICFindUserConfigFile(ICInstance inst, ICDirSpec *where); /* Requires IC 1.1. * It is illegal to call this routine inside a ICBegin/End pair. * Similar to ICFindConfigFile except that it only searches the folder * specified in where. If the input parameters are valid the routine * will always successful configure the instance, creating an * empty configuration if necessary * For use with double-clickable preference files. */ pascal ICError ICGeneralFindConfigFile(ICInstance inst, Boolean search_prefs, Boolean can_create, short count, ICDirSpecArrayPtr folders); /* Requires IC 1.2. * It is illegal to call this routine inside a ICBegin/End pair. * Call to configure this connection to IC. * This routine acts as a more general replacement for * ICFindConfigFile and ICFindUserConfigFile. * Set search_prefs to true if you want it to search the preferences folder. * Set can_create to true if you want it to be able to create a new config. * Set count as the number of valid elements in folders. * Set folders to a pointer to the folders to search. * Setting count to 0 and folders to nil is OK. * Searches the specified folders and then optionally the Preferences folder * in a unspecified manner. */ pascal ICError ICChooseConfig(ICInstance inst); /* Requires IC 1.2. * It is illegal to call this routine inside a ICBegin/End pair. * Requests the user to choose a configuration, typically using some * sort of modal dialog. If the user cancels the dialog the configuration * state will be unaffected. */ pascal ICError ICChooseNewConfig(ICInstance inst); /* Requires IC 1.2. * It is illegal to call this routine inside a ICBegin/End pair. * Requests the user to create a new configuration, typically using some * sort of modal dialog. If the user cancels the dialog the configuration * state will be unaffected. */ pascal ICError ICGetConfigName(ICInstance inst, Boolean longname, Str255 name); /* Requires IC 1.2. * You must specify a configuration before calling this routine. * Returns a string that describes the current configuration at a user * level. Set longname to true if you want a long name, up to 255 * characters, or false if you want a short name, typically about 32 * characters. * The returned string is for user display only. If you rely on the * exact format of it, you will conflict with any future IC * implementation that doesn't use explicit preference files. */ pascal ICError ICGetConfigReference(ICInstance inst, ICConfigRefHandle ref); /* Requires IC 1.2. * You must specify a configuration before calling this routine. * Returns a self-contained reference to the instance's current * configuration. * ref must be a valid non-nil handle and it will be resized to fit the * resulting data. */ pascal ICError ICSetConfigReference(ICInstance inst, ICConfigRefHandle ref, long flags); /* Requires IC 1.2. * It is illegal to call this routine inside a ICBegin/End pair. * Reconfigures the instance using a configuration reference that was * got using ICGetConfigReference reference. Set the * icNoUserInteraction_bit in flags if you require that this routine * not present a modal dialog. Other flag bits are reserved and should * be set to zero. * ref must not be nil. */ pascal ICError ICSpecifyConfigFile(ICInstance inst, FSSpec *config); /* It is illegal to call this routine inside a ICBegin/End pair. * For use only by the IC application. * If you call this routine yourself, you will conflict with any * future IC implementation that doesn't use explicit preference files. */ /* ***** Getting Information ***** */ pascal ICError ICGetSeed(ICInstance inst, long *seed); /* You do not have to specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Returns the current seed for the IC prefs database. * This seed changes each time a non-volatile preference is changed. * You can poll this to determine if any cached preferences change. */ pascal ICError ICGetPerm(ICInstance inst, ICPerm *perm); /* You do not have to specify a configuration before calling this routine. * Returns the access permissions currently associated with this instance. * While applications normally know what permissions they have, * this routine is designed for use by override components. */ pascal ICError ICDefaultFileName(ICInstance inst, Str63 name); /* You do not have to specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Returns the default file name for IC preference files. * Applications should never need to call this routine. * If you rely on information returned by this routine yourself, * you may conflict with any future IC implementation that doesn't use * explicit preference files. * The component calls this routine to set up the default IC file name. * This allows this operation to be intercepted by a component that has * captured us. It currently gets it from the component resource file. * The glue version is hardwired to "Internet Preferences". */ pascal ICError ICGetComponentInstance(ICInstance inst, Ptr *component_inst); /* Requires IC 1.2. * You do not have to specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Returns noErr and the connection to the IC component, * if we're using the component. * Returns badComponenInstance and nil if we're operating with glue. * The component_inst parameter is a universal pointer to avoid * us having to include Component.[ph] (which is not available under * some development environments) in order to use IC. */ /* ***** Reading and Writing Preferences ***** */ pascal ICError ICBegin(ICInstance inst, ICPerm perm); /* You must specify a configuration before calling this routine. * It is illegal to call this routine inside a ICBegin/End pair. * Starting reading or writing multiple preferences. * A call to this must be balanced by a call to ICEnd. * Do not call WaitNextEvent between these calls. * The perm specifies whether you intend to read or read/write. * Only one writer is allowed per instance. * Note that this may open resource files that are not closed * until you call ICEnd. */ pascal ICError ICGetPref(ICInstance inst, ConstStr255Param key, ICAttr *attr, Ptr buf, long *size); /* You must specify a configuration before calling this routine. * If you are getting or setting multiple preferences, you should place * these calls within an ICBegin/ICEnd pair. * If you call this routine outside of such a pair, it implicitly * calls ICBegin(inst, icReadOnlyPerm). * Reads the preference specified by key from the IC database to the * buffer pointed to by buf and size. * key must not be the empty string. * If buf is nil then no data is returned. * size must be non-negative. * attr and size are always set on return. On errors (except icTruncatedErr) * attr is set to ICattr_no_change and size is set to 0. * size is the actual size of the data. * attr is set to the attributes associated with the preference. * If this routine returns icTruncatedErr then the other returned * values are valid except that only the first size bytes have been * return. size is adjusted to reflect the true size of the preference. * Returns icPrefNotFound if there is no preference for the key. */ pascal ICError ICSetPref(ICInstance inst, ConstStr255Param key, ICAttr attr, Ptr buf, long size); /* You must specify a configuration before calling this routine. * If you are getting or setting multiple preferences, you should place * these calls within an ICBegin/ICEnd pair. * If you call this routine outside of such a pair, it implicitly * calls ICBegin(inst, icReadWritePerm). * Sets the preference specified by key from the IC database to the * value pointed to by buf and size. * key must not be the empty string. * size must be non-negative. * If buf is nil then the preference value is not set and size is ignored. * If buf is not nil then the preference value is set to the size * bytes pointed to by buf. * If attr is ICattr_no_change then the preference attributes are not set. * Otherwise the preference attributes are set to attr. * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm. * Returns icPermErr if current attr is locked, new attr is locked and buf <> nil. */ pascal ICError ICFindPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr *attr, Handle prefh); /* Requires IC 1.2. * You must specify a configuration before calling this routine. * If you are getting or setting multiple preferences, you should place * these calls within an ICBegin/ICEnd pair. * If you call this routine outside of such a pair, it implicitly * calls ICBegin(inst, icReadWritePerm). * This routine effectively replaces ICGetPrefHandle. * Reads the preference specified by key from the IC database into * a handle, prefh. * key must not be the empty string. * attr is set to the attributes associated with the preference. * You must set prefh to a non-nil handle before calling this routine. * If the preference does not exist, icPrefNotFoundErr is returned. */ pascal ICError ICGetPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr *attr, Handle *prefh); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * If you are getting or setting multiple preferences, you should place * these calls within an ICBegin/ICEnd pair. * If you call this routine outside of such a pair, it implicitly * calls ICBegin(inst, icReadOnlyPerm). * This routine is now obsolete. Use ICFindPrefHandle instead. * Reads the preference specified by key from the IC database into * a newly created handle, prefh. * key must not be the empty string. * attr is set to the attributes associated with the preference. * The incoming value of prefh is ignored. * A new handle is created in the current heap and returned in prefh. * If the routine returns an error, prefh is set to nil. * If the preference does not exist, no error is returned and prefh is set * to an empty handle. */ pascal ICError ICSetPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr attr, Handle prefh); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * If you are getting or setting multiple preferences, you should place * these calls within an ICBegin/ICEnd pair. * If you call this routine outside of such a pair, it implicitly * calls ICBegin(inst, icReadWritePerm). * Sets the preference specified by key from the IC database to the * value contained in prefh. * key must not be the empty string. * If prefh is nil then the preference value is not set. * If buf is not nil then the preference value is set to the data * contained in it. * If attr is ICattr_no_change then the preference attributes are not set. * Otherwise the preference attributes are set to attr. * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm. * Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil. */ pascal ICError ICCountPref(ICInstance inst, long *count); /* You must specify a configuration before calling this routine. * You must be inside an ICBegin/End pair to call this routine. * Counts the total number of preferences. * If the routine returns an error, count is set to 0. */ pascal ICError ICGetIndPref(ICInstance inst, long n, Str255 key); /* You must specify a configuration before calling this routine. * You must be inside an ICBegin/End pair to call this routine. * Returns the key of the Nth preference. * n must be positive. * Returns icPrefNotFoundErr if n is greater than the total number of preferences. * If the routine returns an error, key is undefined. */ pascal ICError ICDeletePref(ICInstance inst, ConstStr255Param key); /* You must specify a configuration before calling this routine. * You must be inside an ICBegin/End pair to call this routine. * Deletes the preference specified by key. * key must not be the empty string. * Returns icPrefNotFound if the preference specified by key is not present. */ pascal ICError ICEnd(ICInstance inst); /* You must specify a configuration before calling this routine. * You must be inside an ICBegin/End pair to call this routine. * Terminates a preference session, as started by ICBegin. * You must have called ICBegin before calling this routine. */ /* ***** User Interface Stuff ***** */ pascal ICError ICEditPreferences(ICInstance inst, ConstStr255Param key); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Instructs IC to display the user interface associated with editing * preferences and focusing on the preference specified by key. * If key is the empty string then no preference should be focused upon. * You must have specified a configuration before calling this routine. * You do not need to call ICBegin before calling this routine. * In the current implementation this launches the IC application * (or brings it to the front) and displays the window containing * the preference specified by key. * It may have a radically different implementation in future * IC systems. */ /* ***** URL Handling ***** */ pascal ICError ICParseURL(ICInstance inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd, Handle url); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Parses a URL out of the specified text and returns it in a canonical form * in a handle. * hint indicates the default scheme for URLs of the form "name@address". * If hint is the empty string then URLs of that form are not allowed. * data points to the start of the text. It must not be nil. * len indicates the length of the text. It must be non-negative. * selStart and selEnd should be passed in as the current selection of * the text. This selection is given in the same manner as TextEdit, * ie if selStart = selEnd then there is no selection only an insertion * point. Also selStart selEnd and 0 selStart len and 0 selEnd len. * selStart and selEnd are returned as the bounds of the URL. If the * routine returns an error then these new boundaries may be * invalid but they will be close. * The incoming url handle must not be nil. The resulting URL is normalised * and copied into the url handle, which is resized to fit. */ pascal ICError ICLaunchURL(ICInstance inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Parses a URL out of the specified text and feeds it off to the * appropriate helper. * hint indicates the default scheme for URLs of the form "name@address". * If hint is the empty string then URLs of that form are not allowed. * data points to the start of the text. It must not be nil. * len indicates the length of the text. It must be non-negative. * selStart and selEnd should be passed in as the current selection of * the text. This selection is given in the same manner as TextEdit, * ie if selStart = selEnd then there is no selection only an insertion * point. Also selStart selEnd and 0 selStart len and 0 selEnd len. * selStart and selEnd are returned as the bounds of the URL. If the * routine returns an error then these new boundaries may be * invalid but they will be close. * The URL is parsed out of the text and passed off to the appropriate * helper using the GURL AppleEvent. */ /* ***** Mappings Routines ***** * * Routines for interrogating mappings database. * * ----- High Level Routines ----- */ pascal ICError ICMapFilename(ICInstance inst, ConstStr255Param filename, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * If you are getting or setting multiple preferences, you should place * these calls within an ICBegin/ICEnd pair. * If you call this routine outside of such a pair, it implicitly * calls ICBegin(inst, icReadWritePerm). * Takes the name of an incoming file and returns the most appropriate * mappings database entry, based on its extension. * filename must not be the empty string. * Returns icPrefNotFoundErr if no suitable entry is found. */ pascal ICError ICMapTypeCreator(ICInstance inst, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You must be inside an ICBegin/End pair to call this routine. * Takes the type and creator (and optionally the name) of an outgoing * file and returns the most appropriate mappings database entry. * The filename may be either the name of the outgoing file or * the empty string. * Returns icPrefNotFoundErr if no suitable entry found. */ /* ----- Mid Level Routines ----- */ pascal ICError ICMapEntriesFilename(ICInstance inst, Handle entries, ConstStr255Param filename, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Takes the name of an incoming file and returns the most appropriate * mappings database entry, based on its extension. * entries must be a handle to a valid IC mappings database preference. * filename must not be the empty string. * Returns icPrefNotFoundErr if no suitable entry is found. */ pascal ICError ICMapEntriesTypeCreator(ICInstance inst, Handle entries, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Takes the type and creator (and optionally the name) of an outgoing * file and returns the most appropriate mappings database entry. * entries must be a handle to a valid IC mappings database preference. * The filename may be either the name of the outgoing file or * the empty string. * Returns icPrefNotFoundErr if no suitable entry found. */ /* ----- Low Level Routines ----- */ pascal ICError ICCountMapEntries(ICInstance inst, Handle entries, long *count); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Counts the number of entries in the mappings database. * entries must be a handle to a valid IC mappings database preference. * count is set to the number of entries. */ pascal ICError ICGetIndMapEntry(ICInstance inst, Handle entries, long ndx, long *pos, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Gets the ndx'th entry in the mappings database. * entries must be a handle to a valid IC mappings database preference. * ndx must be in the range from 1 to the number of entries in the database. * The value of pos is ignored on input. pos is set to the position of * the ndx'th entry in the database and is suitable for passing back * into ICSetMapEntry. * Does not return any user data associated with the entry. */ pascal ICError ICGetMapEntry(ICInstance inst, Handle entries, long pos, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Returns the entry located at position pos in the mappings database. * entries must be a handle to a valid IC mappings database preference. * pos should be 0 to get the first entry. To get the subsequent entries, add * entry.total_size to pos and iterate. * Does not return any user data associated with the entry. */ pascal ICError ICSetMapEntry(ICInstance inst, Handle entries, long pos, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Sets the entry located at position pos in the mappings database. * entries must be a handle to a valid IC mappings database preference. * pos should be either a value returned from ICGetIndMapEntry or a value * calculated using ICGetMapEntry. * entry is a var parameter purely for stack space reasons. It is not * modified in any way. * Any user data associated with the entry is unmodified. */ pascal ICError ICDeleteMapEntry(ICInstance inst, Handle entries, long pos); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Deletes the mappings database entry at pos. * entries must be a handle to a valid IC mappings database preference. * pos should be either a value returned from ICGetIndMapEntry or a value * calculated using ICGetMapEntry. * Also deletes any user data associated with the entry. */ pascal ICError ICAddMapEntry(ICInstance inst, Handle entries, ICMapEntry *entry); /* Requires IC 1.1. * You must specify a configuration before calling this routine. * You do not have to be inside an ICBegin/End pair to call this routine. * Adds an entry to the mappings database. * entries must be a handle to a valid IC mappings database preference. * The entry is added to the end of the entries database. * No user data is added. */ /* End ICAPI.h */ #ifdef __cplusplus } #endif __cplusplus #endif \ No newline at end of file diff --git a/source/config/IC/ICKeys.h b/source/config/IC/ICKeys.h new file mode 100755 index 0000000..5922494 --- /dev/null +++ b/source/config/IC/ICKeys.h @@ -0,0 +1 @@ +/* Start Header */ /* File: ICKeys.h * Generated by: 1.0d4 * For: IC 1.3 * On: Sunday, 14 July 1996, 20:19:55 * * This file is part of the Internet Configuration system and * is placed in the public domain for the benefit of all. */ /* End Header */ /* IMPORTANT NOTES ABOUT THE C CONVERSION -------------------------------------- o Pascal "var" parameters are converted from "var x : y" to "y *x". This means that when you see the parameter "y *x" you should be aware that you *cannot pass in nil*. In future this restriction may be eased, especially for the attr parameter to ICGetPref. Parameters where nil is legal are declared using the explicit pointer type, ie "yPtr x". o Strings are *Pascal* strings. This means that they must be word aligned. MPW and Think C do this automatically. The last time I check, Metrowerks C does not. If it still doesn't, then IMHO it's a bug in their compiler and you should report it to them. o The canonical Internet Config interface is defined in Pascal. These headers have not been thoroughly tested. If there is a conflict between these headers and the Pascal interfaces, the Pascal should take precedence. */ /* ///////////////////////////////////////////////////////////////////////////////// */ #ifndef __ICKEYS__ #define __ICKEYS__ #ifndef __TYPES__ #include #endif #ifndef __ALIASES__ #include #endif /* ///////////////////////////////////////////////////////////////////////////////// */ /* Start ICKeys.h */ #define kICRealName "\pRealName" /* PString */ #define kICEmail "\pEmail" /* PString -- user@host.domain */ #define kICMailAccount "\pMailAccount" /* PString -- user@host.domain */ #define kICMailPassword "\pMailPassword" /* PString -- scrambled */ #define kICNewsAuthUsername "\pNewsAuthUsername" /* PString */ #define kICNewsAuthPassword "\pNewsAuthPassword" /* PString -- scrambled */ #define kICArchiePreferred "\pArchiePreferred" /* PString -- formatted */ #define kICArchieAll "\pArchieAll" /* STR# -- formatted */ #define kICUMichPreferred "\pUMichPreferred" /* PString -- formatted */ #define kICUMichAll "\pUMichAll" /* STR# -- formatted */ #define kICInfoMacPreferred "\pInfoMacPreferred" /* PString -- formatted */ #define kICInfoMacAll "\pInfoMacAll" /* STR# -- formatted */ #define kICPhHost "\pPhHost" /* PString -- host.domain */ #define kICWhoisHost "\pWhoisHost" /* PString -- host.domain */ #define kICFingerHost "\pFingerHost" /* PString -- host.domain */ #define kICFTPHost "\pFTPHost" /* PString -- host.domain */ #define kICTelnetHost "\pTelnetHost" /* PString -- host.domain */ #define kICSMTPHost "\pSMTPHost" /* PString -- host.domain */ #define kICNNTPHost "\pNNTPHost" /* PString -- host.domain */ #define kICGopherHost "\pGopherHost" /* PString -- host.domain */ #define kICLDAPServer "\pLDAPServer" /* PString -- host.domain */ #define kICLDAPSearchbase "\pLDAPSearchbase" /* PString -- string LDAP thing */ #define kICWWWHomePage "\pWWWHomePage" /* PString -- URL */ #define kICWAISGateway "\pWAISGateway" /* PString -- no idea */ #define kICListFont "\pListFont" /* ICFontRecord */ #define kICScreenFont "\pScreenFont" /* ICFontRecord */ #define kICPrinterFont "\pPrinterFont" /* ICFontRecord */ #define kICDownloadFolder "\pDownloadFolder" /* ICFileSpec */ #define kICSignature "\pSignature" /* TEXT */ #define kICOrganization "\pOrganization" /* PString */ #define kICPlan "\pPlan" /* TEXT */ #define kICQuotingString "\pQuotingString" /* PString */ #define kICMailHeaders "\pMailHeaders" /* TEXT */ #define kICNewsHeaders "\pNewsHeaders" /* TEXT */ #define kICMapping "\pMapping" /* ICMapEntries */ #define kICCharacterSet "\pCharacterSet" /* ICCharTable */ #define kICHelper "\pHelper" /* ICAppSpec */ #define kICServices "\pServices" /* ICServices */ #define kICNewMailFlashIcon "\pNewMailFlashIcon" /* Boolean */ #define kICNewMailDialog "\pNewMailDialog" /* Boolean */ #define kICNewMailPlaySound "\pNewMailPlaySound" /* Boolean */ #define kICNewMailSoundName "\pNewMailSoundName" /* PString */ #define kICWebBackgroundColour "\pWebBackgroundColour" /* RGBColor */ #define kICNoProxyDomains "\pNoProxyDomains" /* STR# -- list of domains */ #define kICUseSocks "\pUseSocks" /* Boolean */ #define kICSocksHost "\pSocksHost" /* PString -- host.domain */ #define kICUseHTTPProxy "\pUseHTTPProxy" /* Boolean */ #define kICHTTPProxyHost "\pHTTPProxyHost" /* PString -- host.domain */ #define kICUseGopherProxy "\pUseGopherProxy" /* Boolean */ #define kICGopherProxyHost "\pGopherProxyHost" /* PString -- host.domain */ #define kICUseFTPProxy "\pUseFTPProxy" /* Boolean */ #define kICFTPProxyHost "\pFTPProxyHost" /* PString -- host.domain */ #define kICFTPProxyUser "\pFTPProxyUser" /* PString */ #define kICFTPProxyPassword "\pFTPProxyPassword" /* PString -- scrambled */ #define kICFTPProxyAccount "\pFTPProxyAccount" /* PString */ #define kICUsePassiveFTP "\pUsePassiveFTP" /* Boolean */ /* End ICKeys.h */ #if PRAGMA_ALIGN_SUPPORTED #pragma options align=mac68k #endif struct ICFontRecord { short size; Style face; char pad; Str255 font; }; typedef struct ICFontRecord ICFontRecord, *ICFontRecordPtr, **ICFontRecordHandle; struct ICCharTable { unsigned char net_to_mac[256]; unsigned char mac_to_net[256]; }; typedef struct ICCharTable ICCharTable, *ICCharTablePtr, **ICCharTableHandle; struct ICAppSpec { OSType fCreator; Str63 name; }; typedef struct ICAppSpec ICAppSpec, *ICAppSpecPtr, **ICAppSpecHandle; struct ICFileInfo { OSType fType; OSType fCreator; Str63 name; }; typedef struct ICFileInfo ICFileInfo, *ICFileInfoPtr, **ICFileInfoHandle; struct ICFileSpec { Str31 vol_name; long vol_creation_date; FSSpec fss; AliasRecord alias; /* plus extra data, aliasSize 0 means no alias manager present when ICFileSpecification was created */ }; typedef struct ICFileSpec ICFileSpec, *ICFileSpecPtr, **ICFileSpecHandle; enum { ICfile_spec_header_size = sizeof(ICFileSpec) - sizeof(AliasRecord) }; struct ICMapEntry { short total_length; short fixed_length; short version; OSType file_type; OSType file_creator; OSType post_creator; long flags; /* variable part starts here */ Str255 extension; Str255 creator_app_name; Str255 post_app_name; Str255 MIME_type; Str255 entry_name; }; typedef struct ICMapEntry ICMapEntry, *ICMapEntryPtr, **ICMapEntryHandle; enum { ICmap_binary_bit = 0, /* file should be transfered in binary as opposed to text mode */ ICmap_binary_mask = 0x00000001, ICmap_resource_fork_bit = 1, /* the resource fork of the file is significant */ ICmap_resource_fork_mask = 0x00000002, ICmap_data_fork_bit = 2, /* the data fork of the file is significant */ ICmap_data_fork_mask = 0x00000004, ICmap_post_bit = 3, /* post process using post fields */ ICmap_post_mask = 0x00000008, ICmap_not_incoming_bit = 4, /* ignore this mapping for incoming files */ ICmap_not_incoming_mask = 0x00000010, ICmap_not_outgoing_bit = 5, /* ignore this mapping for outgoing files */ ICmap_not_outgoing_mask = 0x00000020, ICmap_fixed_length = 22 /* number in fixed_length field */ }; struct ICServiceEntry { Str255 name; short port; short flags; }; typedef struct ICServiceEntry ICServiceEntry, *ICServiceEntryPtr, **ICServiceEntryHandle; struct ICServices { short count; ICServiceEntry services[1]; }; typedef struct ICServices ICServices, *ICServicesPtr, **ICServicesHandle; enum { ICservices_tcp_bit = 0, ICservices_tcp_mask = 0x00000001, ICservices_udp_bit = 1, ICservices_udp_mask = 0x00000002 /* both bits can be set, which means the service is both TCP and UDP, eg daytime */ }; #if PRAGMA_ALIGN_SUPPORTED #pragma options align=reset #endif #endif \ No newline at end of file diff --git a/source/config/IC/ICTypes.h b/source/config/IC/ICTypes.h new file mode 100755 index 0000000..19a41cb --- /dev/null +++ b/source/config/IC/ICTypes.h @@ -0,0 +1 @@ +/* Start Header */ /* File: ICTypes.h * Generated by: 1.0d4 * For: IC 1.3 * On: Sunday, 14 July 1996, 20:19:55 * * This file is part of the Internet Configuration system and * is placed in the public domain for the benefit of all. */ /* End Header */ /* IMPORTANT NOTES ABOUT THE C CONVERSION -------------------------------------- o Pascal "var" parameters are converted from "var x : y" to "y *x". This means that when you see the parameter "y *x" you should be aware that you *cannot pass in nil*. In future this restriction may be eased, especially for the attr parameter to ICGetPref. Parameters where nil is legal are declared using the explicit pointer type, ie "yPtr x". o Strings are *Pascal* strings. This means that they must be word aligned. MPW and Think C do this automatically. The last time I check, Metrowerks C does not. If it still doesn't, then IMHO it's a bug in their compiler and you should report it to them. o The canonical Internet Config interface is defined in Pascal. These headers have not been thoroughly tested. If there is a conflict between these headers and the Pascal interfaces, the Pascal should take precedence. */ /* ///////////////////////////////////////////////////////////////////////////////// */ #ifndef __ICTYPES__ #define __ICTYPES__ #ifndef __TYPES__ #include #endif /* ///////////////////////////////////////////////////////////////////////////////// */ #if PRAGMA_ALIGN_SUPPORTED #pragma options align=mac68k #endif enum { icPrefNotFoundErr = -666, /* preference not found (duh!) */ icPermErr = -667, /* cannot set preference */ icPrefDataErr = -668, /* problem with preference data */ icInternalErr = -669, /* hmm, this is not good */ icTruncatedErr = -670, /* more data was present than was returned */ icNoMoreWritersErr = -671, /* you cannot begin a write session because someone else is already doing it */ icNothingToOverrideErr = -672, /* no component for the override component to capture */ icNoURLErr = -673, /* no URL found */ icConfigNotFoundErr = -674, /* no configuration was found */ icConfigInappropriateErr = -675 /* incorrect manufacturer code */ }; enum { ICattr_no_change = 0xFFFFFFFFL, /* supply this to ICSetPref to tell it not to change the attributes */ ICattr_locked_bit = 0, /* bits in the preference attributes */ ICattr_locked_mask = 0x00000001L, /* masks for the above */ ICattr_volatile_bit = 1, ICattr_volatile_mask = 0x00000002L, icNoUserInteraction_bit = 0, icNoUserInteraction_mask = 0x00000001L }; #define ICfiletype 'ICAp' #define ICcreator 'ICAp' #define ICdefault_file_name "\pInternet Preferences" /* default file name, for internal use, overridden by a component resource */ struct ICDirSpec { /* a record that specifies a folder */ short vRefNum; long dirID; }; typedef struct ICDirSpec ICDirSpec; typedef ICDirSpec ICDirSpecArray[4]; /* an array of the above */ typedef ICDirSpec *ICDirSpecArrayPtr; /* a pointer to that array */ typedef long ICAttr; /* type for preference attributes */ typedef long ICError; /* type for error codes */ typedef Ptr ICInstance; /* opaque type for preference reference */ enum { icNoPerm = 0, icReadOnlyPerm = 1, icReadWritePerm = 2 }; typedef unsigned char ICPerm; struct ICConfigRef { OSType manufacturer; /* other private data follows */ }; typedef struct ICConfigRef ICConfigRef, *ICConfigRefPtr, **ICConfigRefHandle; #if PRAGMA_ALIGN_SUPPORTED #pragma options align=reset #endif #endif \ No newline at end of file diff --git a/source/config/IC/IConfig.c b/source/config/IC/IConfig.c new file mode 100755 index 0000000..d96c370 --- /dev/null +++ b/source/config/IC/IConfig.c @@ -0,0 +1 @@ +/* IConfig.c */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "IConfig.proto.h" #include "ICTypes.h" #include "ICAPI.h" #include "ICKeys.h" #define kICftpHelper "\pHelperftp" #define kIChttpHelper "\pHelperhttp" #define kICgopherHelper "\pHelpergopher" #define kICwaisHelper "\pHelperwais" #define kICtelnetHelper "\pHelpertelnet" #define kICtn3270Helper "\pHelpertn3270" #define kICfingerHelper "\pHelperfinger" #define kICwhoisHelper "\pHelperwhois" ICInstance inst; Boolean gHaveIC; char * gICHelperKeys[] = { NULL, /* kNotURL*/ (char *)"\pHelpermailto", (char *)"\pHelpernntp", (char *)"\pHelpernntp", (char *)"\pHelperftp", (char *)"\pHelperhttp", (char *)"\pHelpergopher", (char *)"\pHelperwais", NULL, /* we handle telnet URL */ NULL, /* we handle rlogin URL */ (char *)"\pHelpertn3270", (char *)"\pHelperfinger", (char *)"\pHelperwhois" }; void ICUnload(void) { } OSType GetHelperInfo(TURLKind urlKind) { StringPtr key; ICError icErr; ICAttr attr; long size; ICAppSpec icAppSpec; if (!gHaveIC) return NULL; key = (unsigned char *)gICHelperKeys[urlKind]; if (key == NULL) return NULL; size = sizeof(icAppSpec); icErr = ICBegin(inst, icReadOnlyPerm); //we dont touch icErr |= ICGetPref(inst, aligned_pstring(key), &attr, (Ptr)&icAppSpec, &size); icErr |= ICEnd(inst); if (icErr == noErr) return (icAppSpec.fCreator); else return (NULL); } void ICinit(void) { ICError ICerr; ICDirSpecArray folder_spec; ICerr = ICStart(&inst, 'rlfT'); /* tell it our creator */ folder_spec[0].vRefNum = -1; /* search for prefs in system */ folder_spec[0].dirID = 2; ICerr = ICFindConfigFile(inst, 1, (ICDirSpecArrayPtr) &folder_spec); gHaveIC = (ICerr == noErr); } void stopInternetConfig(void) { ICError ICerr; if (gHaveIC) ICerr = ICStop(inst); } // This hack was written by Jim Matthews, of Fetch fame. Thanks! // It works around a bug in CodeWarrior that doesn't word-align Pascal strings. // Apparently, Internet Config is very sensitive to this. /* * aligned_pstring() -- * Passed a possibly-aligned pstring, we return the address of an aligned * one (either the original or a copy). * * Note: we use static data for the copy. */ StringPtr aligned_pstring(StringPtr pstr) { static Str255 aligned; if (((long) pstr) & 0x1) { memcpy(aligned, pstr, pstr[0] + 1); return aligned; } else return pstr; } /* aligned_pstring() */ \ No newline at end of file diff --git a/source/config/IC/IConfig.h b/source/config/IC/IConfig.h new file mode 100755 index 0000000..821fcb7 --- /dev/null +++ b/source/config/IC/IConfig.h @@ -0,0 +1 @@ +/* IConfig.h */ typedef enum TURLKind { kNotURL, kMailtoURL, kNewsURL, kNntpURL, kFtpURL, kHttpURL, kGopherURL, kWaisURL, kTelnetURL, kTn3270URL, kFingerURL, kWhoisURL } TURLKind; \ No newline at end of file diff --git a/source/config/IC/IConfig.proto.h b/source/config/IC/IConfig.proto.h new file mode 100755 index 0000000..751d8ea --- /dev/null +++ b/source/config/IC/IConfig.proto.h @@ -0,0 +1 @@ +/* IConfig.proto.h */ #include "url.h" //for TURL defines void ICinit(void); OSType GetHelperInfo(TURLKind urlKind); void stopInternetConfig(void); void ICUnload(void); StringPtr aligned_pstring(StringPtr); // Jim Matthews' hack to work around bugs in CW & IC \ No newline at end of file diff --git a/source/config/LinkedList.c b/source/config/LinkedList.c new file mode 100755 index 0000000..cc53fce --- /dev/null +++ b/source/config/LinkedList.c @@ -0,0 +1 @@ +// LinkedList.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "LinkedList.proto.h" short reSortElement(LinkedListNode **theHead, LinkedListNode *theChangedElement) { LinkedListNode *leader, *copyOfNew; short index = 1; copyOfNew = (LinkedListNode *) myNewPtrCritical(sizeof(LinkedListNode)); copyOfNew->name = NewString(*theChangedElement->name); copyOfNew->next = NULL; deleteItem(theHead, *theChangedElement->name); insertInSortedList(theHead, copyOfNew); //now its in there; return where it is leader = *theHead; while ((leader->next != NULL)&& (!(EqualString(*leader->name,*copyOfNew->name,TRUE,FALSE)))) { leader = leader->next; index++; } return index - 1; } void deleteList(LinkedListNode **theHead) { LinkedListNode *current,*nextNode; current = *theHead; if (current == NULL) return; nextNode = current->next; while(current != NULL) { DisposeHandle((Handle)current->name); DisposePtr((Ptr)current); current = nextNode; nextNode = nextNode->next; } *theHead = NULL; } void insertInSortedList(LinkedListNode **head, LinkedListNode *newItem) { LinkedListNode *leader, *trailer; Boolean done = FALSE; short newOneIsBigger; if (*head == NULL)//this is first element in list { *head = newItem; return; } trailer = *head; leader = (*head)->next; if (leader == NULL) { (*head)->next = newItem; newItem->next = NULL; return; } while (!done) { newOneIsBigger = RelString(*(newItem->name),*(leader->name),TRUE,FALSE); if (newOneIsBigger == 1) { if (leader->next == NULL)//end of list { leader->next = newItem; newItem->next = NULL; done = TRUE; } else { trailer = leader; leader = leader->next; } } else { trailer->next = newItem; newItem->next = leader; done = TRUE; } } } //returns position short createNodeAndSort(LinkedListNode **head, Str255 theName) { short index=1; LinkedListNode *leader = *head; LinkedListNode *newNode = (LinkedListNode *)myNewPtrCritical(sizeof(LinkedListNode)); newNode->name = NewString(theName); newNode->next = NULL; if (*head == NULL) { *head = newNode; return 1; } else { insertInSortedList(head, newNode); while ((leader->next != NULL)&& (!(EqualString(*leader->name,theName,TRUE,FALSE)))) { leader = leader->next; index++; } return (index - 1); } } LinkedListNode *createSortedList(ResType ConfigResourceType,short numberofitems,Str255 placeThisFirst) { short index, resID; Handle ItemResource; Str255 ItemName; ResType restype; LinkedListNode *newNode, *theHead = NULL; if (placeThisFirst != NULL) { theHead = (LinkedListNode *) myNewPtrCritical(sizeof(LinkedListNode)); ItemResource = Get1NamedResource(ConfigResourceType,placeThisFirst); theHead->name = NewString(placeThisFirst); //set the head of our list theHead->next = NULL; if (ItemResource != NULL) ReleaseResource(ItemResource); } for (index = 1; index <= numberofitems; index++) { ItemResource = Get1IndResource(ConfigResourceType, index); GetResInfo(ItemResource, &resID, &restype, (StringPtr)&ItemName); if (!(EqualString(placeThisFirst,ItemName,1,0))) { newNode = (LinkedListNode *) myNewPtrCritical(sizeof(LinkedListNode)); newNode->name = NewString(ItemName); insertInSortedList(&theHead, newNode); ReleaseResource(ItemResource); } } return (theHead); } LinkedListNode *createSortedList2(ResType ConfigResourceType,short numberofitems,Str255 placeThisFirst) { short index, resID; Handle ItemResource; Str255 ItemName; ResType restype; LinkedListNode *newNode, *theHead = NULL; if (placeThisFirst != NULL) { theHead = (LinkedListNode *) myNewPtrCritical(sizeof(LinkedListNode)); ItemResource = GetNamedResource(ConfigResourceType,placeThisFirst); theHead->name = NewString(placeThisFirst); //set the head of our list theHead->next = NULL; if (ItemResource != NULL) ReleaseResource(ItemResource); } for (index = 1; index <= numberofitems; index++) { ItemResource = GetIndResource(ConfigResourceType, index); GetResInfo(ItemResource, &resID, &restype, (StringPtr)&ItemName); if (!(EqualString(placeThisFirst,ItemName,1,0))) { newNode = (LinkedListNode *) myNewPtrCritical(sizeof(LinkedListNode)); newNode->name = NewString(ItemName); insertInSortedList(&theHead, newNode); ReleaseResource(ItemResource); } } return (theHead); } void deleteItem(LinkedListNode **theHead,Str255 ItemName) { LinkedListNode *leader = *theHead, *trailer = *theHead; while(!(EqualString(ItemName,*leader->name,TRUE,FALSE))&&(leader->next != NULL)) { trailer = leader; leader = leader->next; } if (leader == *theHead) { *theHead = (*theHead)->next; DisposeHandle((Handle)leader->name); DisposePtr((Ptr)leader); } else { trailer->next = leader->next; DisposeHandle((Handle)leader->name); DisposePtr((Ptr)leader); } } LinkedListNode *findNode(LinkedListNode *theHead,Str255 ItemName) { LinkedListNode *leader = theHead; while ((leader->next != NULL)&&(!(EqualString(ItemName,*leader->name,TRUE,FALSE)))) leader = leader->next; if (!(EqualString(ItemName,*leader->name,TRUE,FALSE))) return NULL; else return(leader); } LinkedListNode *findNodeNC(LinkedListNode *theHead,Str255 ItemName) { LinkedListNode *leader = theHead; while ((leader->next != NULL)&&(!(EqualString(ItemName,*leader->name,FALSE,FALSE)))) leader = leader->next; if (!(EqualString(ItemName,*leader->name,FALSE,FALSE))) return NULL; else return(leader); } short findClosestNodeIndex(LinkedListNode *theHead,Str255 ItemName) { short index=1; LinkedListNode *leader = theHead, *trailer = theHead; while ((leader->next != NULL) && (RelString(*leader->name,ItemName,TRUE,FALSE) == -1)) { trailer = leader; leader = leader->next; index++; } return index-1; } short findNodeIndex(LinkedListNode *theHead,Str255 ItemName) { short index = 1; LinkedListNode *leader = theHead; while ((leader->next != NULL)&& (!(EqualString(*leader->name,ItemName,TRUE,FALSE)))) { leader = leader->next; index++; } return (index - 1); } void addListToMenu(MenuHandle theMenu, LinkedListNode *theHead, short itemIndex) { LinkedListNode *traverser = theHead; // short itemIndex = 1; while(traverser != NULL) { HLock((Handle)traverser->name); AppendMenu(theMenu,"\poops"); //these two avoid diacritcal interpertation of '<' SetItem(theMenu,itemIndex,*traverser->name); HUnlock((Handle)traverser->name); traverser = traverser->next; itemIndex++; } } void getAUniqueName(LinkedListNode *theHead, Str255 theName) { while(findNodeNC(theHead,theName)) { if ((theName[theName[0]] > '9')|| (theName[theName[0]] < '0')) //add a number { theName[++theName[0]] = ' '; theName[++theName[0]] = '1'; } else if (theName[theName[0]] == '9') //add another digit { theName[theName[0]] = '-'; theName[++theName[0]] = '1'; } else theName[theName[0]]++; //incremement the number } } \ No newline at end of file diff --git a/source/config/LinkedList.h b/source/config/LinkedList.h new file mode 100755 index 0000000..2f77b37 --- /dev/null +++ b/source/config/LinkedList.h @@ -0,0 +1 @@ +//LinkedList.h typedef struct LinkedListNode { StringHandle name; struct LinkedListNode *next; } LinkedListNode; \ No newline at end of file diff --git a/source/config/LinkedList.proto.h b/source/config/LinkedList.proto.h new file mode 100755 index 0000000..acafe87 --- /dev/null +++ b/source/config/LinkedList.proto.h @@ -0,0 +1 @@ +//LinkedList.proto.h #include "LinkedList.h" LinkedListNode *createSortedList(ResType ConfigResourceType,short numberofitems,Str255 placeThisFirst); LinkedListNode *createSortedList2(ResType ConfigResourceType,short numberofitems,Str255 placeThisFirst); void deleteItem(LinkedListNode **theHead,Str255 ItemName); LinkedListNode *findNode(LinkedListNode *theHead,Str255 ItemName); LinkedListNode *findNodeNC(LinkedListNode *theHead,Str255 ItemName); short reSortElement(LinkedListNode **theHead, LinkedListNode *theChangedElement); void insertInSortedList(LinkedListNode **head, LinkedListNode *newItem); void deleteList(LinkedListNode **theHead); short createNodeAndSort(LinkedListNode **head, Str255 theName); short findNodeIndex(LinkedListNode *theHead,Str255 ItemName); short findClosestNodeIndex(LinkedListNode *theHead,Str255 ItemName); void addListToMenu(MenuHandle, LinkedListNode*, short); void getAUniqueName(LinkedListNode *theHead, Str255 theName); \ No newline at end of file diff --git a/source/config/Popup.h b/source/config/Popup.h new file mode 100755 index 0000000..58630eb --- /dev/null +++ b/source/config/Popup.h @@ -0,0 +1 @@ +typedef struct { short item; /* Dialog item id */ MenuHandle h; /* Popup menu handle */ short choice; /* Current choice (1...) */ } popup; \ No newline at end of file diff --git a/source/config/configure.c b/source/config/configure.c new file mode 100755 index 0000000..6b0a67e --- /dev/null +++ b/source/config/configure.c @@ -0,0 +1 @@ +/* Configure.c * New Configuration scheme (the death of config.tel) * * Revisions: * 8/92 Telnet 2.6: Initial version. Jim Browne */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Configure #endif #include "DlogUtils.proto.h" #include "popup.h" #include "popup.proto.h" #include "configure.proto.h" #include "netevent.proto.h" /* For Stask proto */ #include "prefs.proto.h" #include "bkgr.proto.h" // For StartUpFTP proto #include "menuseg.proto.h" #include "macutil.proto.h" #include "rsinterf.proto.h" #include "LinkedList.proto.h" #include "Sets.proto.h" #include "movableModal.h" static Boolean isACopy(Str255 theName);//looks for an occurance of "copy" in a string static pascal short TerminalModalProc( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(TerminalModalProc, ModalFilter); static pascal short SessionModalProc(DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(SessionModalProc, ModalFilter); static pascal short MyDlogWListFilter( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(MyDlogWListFilter, ModalFilter); static pascal void listDitemproc(DialogPtr theDlg, short itemNo); PROTO_UPP(listDitemproc, UserItem); extern FTPServerPrefs* gFTPServerPrefs; extern ApplicationPrefs* gApplicationPrefs; extern MenuHandle myMenus[]; static void ZeroNumOnly(void); static Boolean InNumOnly(short item); static char configPassword[256]; static LinkedListNode *currentHead; static ListHandle currentList; #define NUMONLYSIZE 8 short NumOnly[NUMONLYSIZE]; /* Items for which non-number keys are ignored */ // NumOnly[0] is number of "safe" item to return void CONFIGUREunload(void) {} void Cenviron( void) { DialogPtr dptr; short ditem, defaultBoldColor; Str255 scratchPstring; long scratchlong; OSType newtype; PaletteHandle toSave; Boolean tempBoolean; SetUpMovableModalMenus(); dptr = GetNewMySmallStrangeDialog( PrefDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetDialogDefaultItem(dptr, 1); SetDialogCancelItem(dptr, 2); SetDialogTracksCursor(dptr, 1); SetCntrl(dptr, PrefDClose, gApplicationPrefs->WindowsDontGoAway); SetCntrl(dptr, PrefStag, gApplicationPrefs->StaggerWindows); defaultBoldColor = gApplicationPrefs->defaultBoldColor; if (!gApplicationPrefs->StaggerWindows) { HideDItem(dptr,PrefStaggerOffset); HideDItem(dptr,PrefStaggerBY); tempBoolean = FALSE; } else { scratchlong = gApplicationPrefs->StaggerWindowsOffset; NumToString(scratchlong, scratchPstring); SetTEText(dptr, PrefStaggerOffset, scratchPstring); tempBoolean = TRUE; } if (!TelInfo->haveColorQuickDraw) HideDItem(dptr,PrefAnsiColor); SetCntrl(dptr, PrefCMDkey, gApplicationPrefs->CommandKeys); SetCntrl(dptr, PrefTMap, gApplicationPrefs->RemapTilde); SetCntrl(dptr, PrefBlink, gApplicationPrefs->BlinkCursor); SetCntrl(dptr, PrefKeyFuncMenus, gApplicationPrefs->KeyPadAndFuncMenus); SetCntrl(dptr, PrefNotifyUser, gApplicationPrefs->NotifyUser); SetCntrl(dptr, PrefBlockCursor, (gApplicationPrefs->CursorType == 0)); SetCntrl(dptr, PrefUnderscoreCursor, (gApplicationPrefs->CursorType == 1)); SetCntrl(dptr, PrefVerticalCursor, (gApplicationPrefs->CursorType == 2)); SetCntrl(dptr, PrefDestroyTickets, gApplicationPrefs->destroyKTickets); SetCntrl(dptr, 30, gApplicationPrefs->autoOpenDialog); SetCntrl(dptr, 31, gApplicationPrefs->dontWarnOnQuit); SetCntrl(dptr, 32, gApplicationPrefs->autoOpenDefault); SetCntrl(dptr, 33, gApplicationPrefs->parseAliases); SetCntrl(dptr, 34, gApplicationPrefs->monospacedOut); SetCntrl(dptr, 36, gApplicationPrefs->clipTrailingSpaces); SetCntrl(dptr, 37, gApplicationPrefs->globalSavePass); scratchPstring[0] = 4; BlockMove(&(gApplicationPrefs->CaptureFileCreator), &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, PrefCaptTE, scratchPstring); newtype = gApplicationPrefs->CaptureFileCreator; scratchlong = gApplicationPrefs->CopyTableThresh; NumToString(scratchlong, scratchPstring); SetTEText(dptr, PrefCTt, scratchPstring); SelIText(dptr, PrefCTt, 0, 32767); NumToString(gApplicationPrefs->TimeSlice, scratchPstring); SetTEText(dptr, PrefTimeSlice, scratchPstring); scratchlong = (long) gApplicationPrefs->OpenTimeout; NumToString(scratchlong,scratchPstring); SetTEText(dptr,PrefOpenTime, scratchPstring); scratchlong = (long) gApplicationPrefs->SendTimeout; NumToString(scratchlong,scratchPstring); SetTEText(dptr,PrefSendTime, scratchPstring); ShowWindow(dptr); ditem=0; /* initially no hits */ while((ditem>2) || (ditem==0)) { movableModalDialog(0,&ditem); switch(ditem) { case PrefDClose: case PrefCMDkey: case PrefTMap: case PrefBlink: case PrefNotifyUser: case PrefKeyFuncMenus: case PrefDestroyTickets: case 30: case 31: case 32: case 33: case 34: case 36: case 37: FlipCheckBox( dptr, ditem); break; case PrefStag: FlipCheckBox( dptr, ditem); tempBoolean = !tempBoolean; if (!tempBoolean) { HideDItem(dptr,PrefStaggerOffset); HideDItem(dptr,PrefStaggerBY); } else { ShowDItem(dptr, PrefStaggerBY); ShowDItem(dptr, PrefStaggerOffset); scratchlong = gApplicationPrefs->StaggerWindowsOffset; NumToString(scratchlong, scratchPstring); SetTEText(dptr, PrefStaggerOffset, scratchPstring); } break; case PrefBlockCursor: SetCntrl(dptr, PrefBlockCursor, 1); SetCntrl(dptr, PrefUnderscoreCursor, 0); SetCntrl(dptr, PrefVerticalCursor, 0); break; case PrefUnderscoreCursor: SetCntrl(dptr, PrefBlockCursor, 0); SetCntrl(dptr, PrefUnderscoreCursor, 1); SetCntrl(dptr, PrefVerticalCursor, 0); break; case PrefVerticalCursor: SetCntrl(dptr, PrefBlockCursor, 0); SetCntrl(dptr, PrefUnderscoreCursor, 0); SetCntrl(dptr, PrefVerticalCursor, 1); break; case PrefCaptCreat: GetApplicationType(&newtype); scratchPstring[0] = 4; BlockMove(&newtype, &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, PrefCaptTE, scratchPstring); break; case PrefAnsiColor: AnsiPrompt(1, &defaultBoldColor); break; default: break; } /* switch */ } if (ditem==DLOGCancel) { DisposDialog( dptr); ResetMenus(); return; } gApplicationPrefs->defaultBoldColor = defaultBoldColor; GetTEText(dptr, PrefCTt, scratchPstring); StringToNum(scratchPstring, &scratchlong); gApplicationPrefs->CopyTableThresh = (short) scratchlong; GetTEText(dptr, PrefTimeSlice, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 100, 2); gApplicationPrefs->TimeSlice = scratchlong; GetTEText(dptr,PrefOpenTime, scratchPstring); StringToNum(scratchPstring, &scratchlong); gApplicationPrefs->OpenTimeout = (short) scratchlong; GetTEText(dptr,PrefSendTime, scratchPstring); StringToNum(scratchPstring, &scratchlong); gApplicationPrefs->SendTimeout = (short) scratchlong; GetTEText(dptr, PrefCaptTE, scratchPstring); BlockMove(&scratchPstring[1], &(gApplicationPrefs->CaptureFileCreator), sizeof(OSType)); GetTEText(dptr,PrefStaggerOffset, scratchPstring); StringToNum(scratchPstring, &scratchlong); gApplicationPrefs->StaggerWindowsOffset = (short) scratchlong; gApplicationPrefs->CommandKeys = GetCntlVal(dptr, PrefCMDkey); gApplicationPrefs->WindowsDontGoAway = GetCntlVal(dptr, PrefDClose); gApplicationPrefs->RemapTilde = GetCntlVal(dptr, PrefTMap); gApplicationPrefs->StaggerWindows = GetCntlVal(dptr, PrefStag); gApplicationPrefs->BlinkCursor = GetCntlVal(dptr, PrefBlink); gApplicationPrefs->KeyPadAndFuncMenus = GetCntlVal(dptr, PrefKeyFuncMenus); gApplicationPrefs->NotifyUser = GetCntlVal(dptr,PrefNotifyUser); gApplicationPrefs->destroyKTickets = GetCntlVal(dptr,PrefDestroyTickets); gApplicationPrefs->autoOpenDialog = GetCntlVal(dptr,30); gApplicationPrefs->dontWarnOnQuit = GetCntlVal(dptr,31); gApplicationPrefs->autoOpenDefault = GetCntlVal(dptr,32); gApplicationPrefs->parseAliases = GetCntlVal(dptr,33); gApplicationPrefs->monospacedOut = GetCntlVal(dptr,34); gApplicationPrefs->clipTrailingSpaces = GetCntlVal(dptr,36); gApplicationPrefs->globalSavePass = GetCntlVal(dptr,37); gApplicationPrefs->CursorType = (GetCntlVal(dptr, PrefUnderscoreCursor) == 1) + (2 * (GetCntlVal(dptr, PrefVerticalCursor) == 1)); if (TelInfo->haveColorQuickDraw) { RSUpdatePalette(); //reflects any ANSI change UseResFile(TelInfo->SettingsFile); toSave = (PaletteHandle) Get1Resource('pltt', 10001); if (toSave == NULL)//this shouldnt happen; make a new copy { UseResFile(TelInfo->ApplicationFile); toSave = (PaletteHandle)GetNewPalette(9999); UseResFile(TelInfo->SettingsFile); AddResource((Handle)toSave, 'pltt', 10001, "\pANSI Colors");//make the new resource UpdateResFile(TelInfo->SettingsFile); } CopyPalette(TelInfo->AnsiColors,toSave,0,0,16); ChangedResource((Handle)toSave); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)toSave); } switchMenus(gApplicationPrefs->CommandKeys, 1); AdjustMenus(); DoTheMenuChecks(); SaveAppPreferences(); DisposDialog( dptr); ResetMenus(); } void Cftp(void) { DialogPtr dptr; short ditem; Str255 scratchPstring; OSType scratchOSType; SFReply sfr; FInfo fi; Point where = {100,100}; dptr = GetNewMySmallStrangeDialog( FTPDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetCntrl(dptr, FTPServerOff, (gFTPServerPrefs->ServerState == 0)); SetCntrl(dptr, FTPServerUnsecure, (gFTPServerPrefs->ServerState == 1)); SetCntrl(dptr, FTPServerPswdPlease, (gFTPServerPrefs->ServerState == 2)); SetCntrl(dptr, FTPShowFTPlog, gFTPServerPrefs->ShowFTPlog); SetCntrl(dptr, FTPrevDNS, gFTPServerPrefs->DNSlookupconnections); SetCntrl(dptr, FTPUseMacBinaryII, gFTPServerPrefs->UseMacBinaryII); SetCntrl(dptr, FTPResetMacBinary, gFTPServerPrefs->ResetMacBinary); SetCntrl(dptr, FTPISO, gFTPServerPrefs->DoISOtranslation); HideDItem(dptr, FTPrevDNS); // Sometime later, perhaps. scratchPstring[0] = 4; BlockMove(&(gFTPServerPrefs->BinaryCreator), &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, FTPbincreatTE, scratchPstring); BlockMove(&(gFTPServerPrefs->BinaryType), &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, FTPbintypeTE, scratchPstring); SelIText(dptr, FTPbintypeTE, 0, 32767); BlockMove(&(gFTPServerPrefs->TextCreator), &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, FTPtextcreatTE, scratchPstring); ShowWindow(dptr); ditem=0; /* initially no hits */ while((ditem>2) || (ditem==0)) { ModalDialog(DLOGwOK_CancelUPP,&ditem); switch(ditem) { case FTPShowFTPlog: case FTPrevDNS: case FTPUseMacBinaryII: case FTPResetMacBinary: case FTPISO: FlipCheckBox( dptr, ditem); break; case FTPServerOff: SetCntrl(dptr, FTPServerOff, 1); SetCntrl(dptr, FTPServerUnsecure, 0); SetCntrl(dptr, FTPServerPswdPlease, 0); break; case FTPServerUnsecure: SetCntrl(dptr, FTPServerOff, 0); SetCntrl(dptr, FTPServerUnsecure, 1); SetCntrl(dptr, FTPServerPswdPlease, 0); break; case FTPServerPswdPlease: SetCntrl(dptr, FTPServerOff, 0); SetCntrl(dptr, FTPServerUnsecure, 0); SetCntrl(dptr, FTPServerPswdPlease, 1); break; case FTPtextcreatorbutton: if (GetApplicationType(&scratchOSType)) { BlockMove(&scratchOSType, &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, FTPtextcreatTE, scratchPstring); } break; case FTPbinexamplebutton: SFGetFile(where, NULL, NULL, -1, NULL, NULL, &sfr); if (sfr.good) { GetFInfo(sfr.fName, sfr.vRefNum, &fi); scratchPstring[0] = sizeof(OSType); BlockMove(&fi.fdCreator, &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, FTPbincreatTE, scratchPstring); BlockMove(&fi.fdType, &scratchPstring[1], sizeof(OSType)); SetTEText(dptr, FTPbintypeTE, scratchPstring); } break; default: break; } /* switch */ } /* while */ if (ditem==DLOGCancel) { DisposDialog( dptr); return; } gFTPServerPrefs->ServerState = GetCntlVal(dptr, FTPServerUnsecure) + GetCntlVal(dptr, FTPServerPswdPlease) * 2; StartUpFTP(); // Make sure FTP server recognizes new mode. gFTPServerPrefs->ShowFTPlog = GetCntlVal(dptr, FTPShowFTPlog); gFTPServerPrefs->DNSlookupconnections = GetCntlVal(dptr, FTPrevDNS); gFTPServerPrefs->UseMacBinaryII = GetCntlVal(dptr, FTPUseMacBinaryII); gFTPServerPrefs->ResetMacBinary = GetCntlVal(dptr, FTPResetMacBinary); gFTPServerPrefs->DoISOtranslation = GetCntlVal(dptr, FTPISO); GetTEText(dptr, FTPbincreatTE, scratchPstring); BlockMove(&scratchPstring[1], &(gFTPServerPrefs->BinaryCreator), sizeof(OSType)); GetTEText(dptr, FTPbintypeTE, scratchPstring); BlockMove(&scratchPstring[1], &(gFTPServerPrefs->BinaryType), sizeof(OSType)); GetTEText(dptr, FTPtextcreatTE, scratchPstring); BlockMove(&scratchPstring[1], &(gFTPServerPrefs->TextCreator), sizeof(OSType)); SaveFTPPreferences(); DisposDialog( dptr); ResetMenus(); } Boolean GetApplicationType(OSType *type) { SFTypeList types; SFReply sfr; FInfo fi; Point where; SetPt(&where, 100, 100); types[0] = 'APPL'; SFGetFile(where, NULL, NULL, 1, types, NULL, &sfr); if (sfr.good) { GetFInfo(sfr.fName, sfr.vRefNum, &fi); BlockMove(&fi.fdCreator, type, sizeof(OSType)); // Copy the application creator type } return(sfr.good); } // Our standard modal dialog filter with code for handling user items containing lists. SIMPLE_UPP(MyDlogWListFilter, ModalFilter); pascal short MyDlogWListFilter( DialogPtr dptr, EventRecord *evt, short *item) { short key, iType; Handle iHndl; Rect iRect; Point scratchPoint; Cell tempCell; static unsigned long lastTime = 0; static char shortcut[] = {0,0,0,0,0,0,0,0,0,0,0}; SetPort(dptr); if ((evt->what == keyDown)||(evt->what == autoKey)) { key = evt->message & charCodeMask; //keyCode = (evt->message >>8) & 0xff ; if ((key == 0x0d) || (key == 0x03)) { // 0x0d == return, 0x03 == enter // RAB BetterTelnet 1.2 - we let StdFilterProc handle this // *item = 1; // ok // FlashButton(dptr, 1); // return(-1); return CallStdFilterProc(dptr, evt, item); } else if (evt->modifiers & cmdKey) { switch(evt->message & charCodeMask) { case 'e': *item = kChange; break; case 'r': *item = kRemove; break; case 'n': *item = kNew; break; case 'd': *item = kDuplicate; break; default: return(FALSE); break; } FlashButton(dptr, *item); return (-1); } else // a normal key { char keyCode = (evt->message & keyCodeMask) >> 8; if (keyCode >=0x7B) //CCP: arrow keys { tempCell.h = tempCell.v = 0; switch(keyCode) { case 0x7E: //up case 0x7B: //left if (LGetSelect(TRUE,&tempCell,currentList)) { LSetSelect(FALSE,tempCell,currentList);//unselect it tempCell.v--; } else tempCell.v = 0; break; case 0x7D: //down case 0x7C: //right if (LGetSelect(TRUE,&tempCell,currentList)) { LSetSelect(FALSE,tempCell,currentList);//unselect it tempCell.v++; } else tempCell.v = (**currentList).dataBounds.bottom - 1; break; default: return (FALSE); break; } if (tempCell.v > (**currentList).dataBounds.bottom - 1) tempCell.v = (**currentList).dataBounds.bottom - 1; if (tempCell.v < 0) tempCell.v = 0; LSetSelect(TRUE,tempCell,currentList);//select it LAutoScroll(currentList); Hilite(dptr, kRemove, 0); Hilite(dptr, kChange, 0); return(FALSE); } else //CCP go to right list item based on keystroke { if ((TickCount() - lastTime) > GetCaretTime() ) shortcut[0] = 0; lastTime = TickCount(); shortcut[(shortcut[0]++) +1] = key; tempCell.h = tempCell.v = 0; if (LGetSelect(TRUE,&tempCell,currentList)) LSetSelect(FALSE,tempCell,currentList); tempCell.v = findClosestNodeIndex(currentHead,(StringPtr)shortcut); LSetSelect(TRUE,tempCell,currentList); LAutoScroll(currentList); if (shortcut[0] == 10) shortcut[0] = 0; Hilite(dptr, kRemove, 0); Hilite(dptr, kChange, 0); } } } else if (evt->what == updateEvt) { if ((WindowPtr)evt->message == dptr) { // RAB BetterTelnet 1.2 - we let StdFilterProc handle this // GetDItem(dptr,1,&iType,&iHndl,&iRect); // ok // PenSize(3,3); // InsetRect(&iRect,-4,-4); // FrameRoundRect(&iRect,16,16); CallStdFilterProc(dptr, evt, item); return 0; } } else if (evt->what == mouseDown) { GetDItem(dptr, kItemList, &iType, &iHndl, &iRect); scratchPoint = evt->where; GlobalToLocal(&scratchPoint); if (PtInRect(scratchPoint, &iRect)) { *item = kItemList; if (LClick(scratchPoint, evt->modifiers, (ListHandle)GetWRefCon(dptr))) { *item = kChange; FlashButton(dptr, kChange); } return(-1); } } return CallStdFilterProc(dptr, evt, item); } Boolean isACopy(Str255 theName) { Boolean yes=FALSE; char copyString[] = "copy"; p2cstr(theName); if (strstr((char *)theName,copyString)) yes = TRUE; c2pstr((char *)theName); return(yes); } // User Dialog Item Procedure for a list. Assumes the Dialog's refcon contains the list // handle. SIMPLE_UPP(listDitemproc, UserItem); pascal void listDitemproc(DialogPtr theDlg, short itemNo) { short itemType; Handle ControlHndl; Rect scratchRect; GetDItem(theDlg, itemNo, &itemType, &ControlHndl, &scratchRect); PenNormal(); InsetRect(&scratchRect, -1, -1); FrameRect(&scratchRect); LUpdate(theDlg->visRgn, (ListHandle)GetWRefCon(theDlg)); } void BoundsCheck(long *value, long high, long low) { if (*value > high) *value = high; if (*value < low) *value = low; } #define kSCListMods lNoNilHilite+lOnlyOne void EditConfigType(ResType ConfigResourceType, Boolean (*EditFunction)(StringPtr)) { DialogPtr dptr; Handle iHndl; short iType, length, ditem,numberofitems, index; Rect ListBox, ListBounds; Point cellSize, theCell; ListHandle thelist; Handle ItemResource; Str255 ItemName; LinkedListNode *theHead, *leader; SetUpMovableModalMenus(); dptr = GetNewMySmallDialog(kItemDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetDialogDefaultItem(dptr, 1); SetDialogTracksCursor(dptr, 1); ditem = 3; GetDItem(dptr, kItemList, &iType, &iHndl, &ListBox); SetDItem(dptr, kItemList, iType, (Handle)listDitemprocUPP, &ListBox); ListBox.right -= 15; // Make room for scrollbar SetRect(&ListBounds, 0,0,1,0); SetPt(&cellSize,(ListBox.right-ListBox.left),16); thelist = LNew(&ListBox, &ListBounds, cellSize, 0, (WindowPtr)dptr,0,0,0,1); (*(thelist))->listFlags = kSCListMods; currentList = thelist; SetWRefCon(dptr, (long)thelist); // So the Ditem proc can find the list UseResFile(TelInfo->SettingsFile); numberofitems = Count1Resources(ConfigResourceType); if (numberofitems) theHead = createSortedList(ConfigResourceType,numberofitems,"\p"); //now we have a sorted linked list of the names else theHead = NULL; leader = theHead; for(index = 1, theCell.v = 0, theCell.h = 0; index <= numberofitems;index++, theCell.v++) { LAddRow(1,-1, thelist); HLock((Handle)leader->name); LSetCell(*(leader->name) +1, (*leader->name)[0], theCell, thelist); HUnlock((Handle)leader->name); leader = leader->next; } theCell.v = 0; theCell.h = 0; if (numberofitems) LSetSelect(1, theCell, thelist); LDoDraw(1, thelist); currentHead = theHead; //let dialog filter know about the list while (ditem > 1) { movableModalDialog(MyDlogWListFilterUPP, &ditem); switch(ditem) { case kRemove: SetPt(&theCell, 0, 0); if (LGetSelect(TRUE, &theCell, thelist)) { length = 254; LGetCell(ItemName+1, &length, theCell, thelist); ItemName[0] = (char)length; if (!(EqualString(ItemName, "\p", TRUE, FALSE))) { deleteItem(&theHead,ItemName);//delete it from the linked list LDelRow(1,theCell.v,thelist); theCell.v--; LSetSelect(TRUE,theCell,thelist); UseResFile(TelInfo->SettingsFile); ItemResource = Get1NamedResource(ConfigResourceType, ItemName); RmveResource(ItemResource); ReleaseResource(ItemResource); UpdateResFile(TelInfo->SettingsFile); } } break; case kChange: SetPt(&theCell, 0, 0); if (LGetSelect(TRUE, &theCell, thelist)) { short newPosition; length = 254; LGetCell(ItemName+1, &length, theCell, thelist); ItemName[0] = (char)length; leader = findNode(theHead,ItemName); if ((*EditFunction)((StringPtr)&ItemName)) { if (!(EqualString(ItemName,*leader->name,TRUE,FALSE)))//new name { DisposeHandle((Handle)leader->name); leader->name = NewString(ItemName);//set the new name newPosition = reSortElement(&theHead,leader);//resort LDelRow(1,theCell.v,thelist);//delete the old row theCell.v = newPosition; LAddRow(1,newPosition,thelist); //add a new row LSetCell(&ItemName[1], ItemName[0],theCell, thelist);//write the name in LSetSelect(TRUE,theCell,thelist); } } } break; case kNew: ItemName[0] = 0; // Signal new shortcut if ((*EditFunction)((StringPtr)&ItemName)) { short whereAt = createNodeAndSort(&theHead, ItemName); if (LGetSelect(TRUE, &theCell, thelist)) LSetSelect(FALSE,theCell,thelist); //turn off old selection theCell.v = LAddRow(1, whereAt, thelist); LSetCell(ItemName+1, Length(ItemName), theCell, thelist); LSetSelect(TRUE,theCell,thelist); //turn on new selection } break; case kDuplicate: SetPt(&theCell, 0, 0); if (LGetSelect(TRUE, &theCell, thelist)) { Handle oldResource,newResource; unsigned char copyString[] = " copy"; short resourceID; short index; length = 254; LGetCell(ItemName+1, &length, theCell, thelist); LSetSelect(FALSE,theCell,thelist); ItemName[0] = (char)length; leader = findNode(theHead,ItemName); UseResFile(TelInfo->SettingsFile); oldResource = GetNamedResource(ConfigResourceType,ItemName); if (!isACopy(ItemName))//add the copy extension { ItemName[0] += 5; BlockMoveData(copyString, &(ItemName[ItemName[0]-4]),5); } getAUniqueName(theHead,ItemName); resourceID = UniqueID(ConfigResourceType); newResource = myNewHandle(GetHandleSize(oldResource)); BlockMoveData(*oldResource,*newResource,GetHandleSize(newResource)); AddResource((Handle)newResource, ConfigResourceType, resourceID, ItemName); UpdateResFile(TelInfo->SettingsFile); index = createNodeAndSort(¤tHead,ItemName); theCell.v = index; LAddRow(1,index,thelist); //add a new row LSetCell(&ItemName[1], ItemName[0],theCell, thelist);//write the name in LSetSelect(TRUE,theCell,thelist); ReleaseResource((Handle)newResource); ReleaseResource((Handle)oldResource); } break; default: break; } // switch SetPt(&theCell, 0, 0); if (LGetSelect(TRUE, &theCell, thelist)) { Hilite(dptr, kRemove, 0); Hilite(dptr, kChange, 0); } else { Hilite(dptr, kRemove, 255); Hilite(dptr, kChange, 255); } } // while LDispose(thelist); DisposDialog(dptr); ResetMenus(); deleteList(&theHead); } void ZeroNumOnly(void) { short i; for(i=0; iwhat == keyDown) || (evt->what == autoKey)) { key = evt->message & charCodeMask; keyCode = (evt->message >>8) & 0xff; if ((key == 0x0d) || (key == 0x03)) { // 0x0d == return, 0x03 == enter // *item = DLOGOk; // return(-1); /* BYU LSC - pascal doesn't like "1" as true */ return CallStdFilterProc(dptr, evt, item); } if (((key == '.') && (evt->modifiers & cmdKey)) || ((key == 0x1b) && (keyCode == 0x35)) ) { // 0x35 == escKey // *item = DLOGCancel; // return(-1); /* BYU LSC - pascal doesn't like "1" as true */ return CallStdFilterProc(dptr, evt, item); } if ((key < '0' || key > '9') && !(key == 0x08 || key == 0x09 || (key > 0x1B && key < 0x20)) && InNumOnly(((DialogPeek)dptr)->editField + 1)) { /* Reject non-numbers for this TE */ *item = NumOnly[0]; /* Kludge -- Return "safe" item */ return(-1); } } if (evt->what == updateEvt) { if ((WindowPtr)evt->message == dptr) { // RAB BetterTelnet 1.2 - We let StdFilterProc handle this. // GetDItem(dptr,DLOGOk,&iType,&iHndl,&iRect); // ok // PenSize(3,3); // InsetRect(&iRect,-4,-4); // FrameRoundRect(&iRect,16,16); for (index = 0; index < NumberOfColorBoxes; index++) ColorBoxItemProc(dptr, BoxColorItems[index]); // update color boxes } CallStdFilterProc(dptr, evt, item); } Stask(); return CallStdFilterProc(dptr, evt, item); } SIMPLE_UPP(TerminalModalProc, ModalFilter); pascal short TerminalModalProc( DialogPtr dptr, EventRecord *evt, short *item) { if (evt->what == mouseDown) return(PopupMousedown(dptr, evt, item)); return(ColorBoxModalProc(dptr, evt, item)); } SIMPLE_UPP(SessionModalProc, ModalFilter); pascal short SessionModalProc(DialogPtr dptr, EventRecord *evt, short *item) { short key, tempLen; // if ((evt->what == keyDown) || (evt->what == autoKey)) // if ((evt->message & charCodeMask) == ' ') { // *item = NumOnly[0]; /* Kludge -- Return "safe" item */ // return(-1); // } if ((evt->what == keyDown) || (evt->what == autoKey)) if ((((DialogPeek)dptr)->editField + 1) == 52) { key = evt->message & charCodeMask; if (key == 8) { configPassword[0] = 0; SetTEText(dptr, 52, "\p"); *item = 0; return -1; } if (key == 9) return 0; if (key < 32) { *item = 0; StdFilterProc(dptr, evt, item); return -1; } tempLen = strlen(configPassword); if (tempLen < 250) { configPassword[tempLen] = key; configPassword[tempLen+1] = 0; } evt->message = (evt->message & 0xFFFFFF00) + ''; return 0; } return(TerminalModalProc(dptr, evt, item)); } Boolean EditTerminal(StringPtr PrefRecordNamePtr) { DialogPtr dptr; short ditem, scratchshort, resourceID, i, currentPanel, newPanel; long scratchlong; ResType scratchResType; Boolean IsNewPrefRecord, UserLikesNewColor,wasInAliasText; TerminalPrefs** TermPrefsHdl; TerminalPrefs* TermPrefsPtr; Str255 scratchPstring; RGBColor scratchRGBcolor; Point ColorBoxPoint; MenuHandle WeNeedAFontMenuHandle, WeNeedAnotherFontMenuHandle; popup TPopup[] = {{TermFontPopup, (MenuHandle) 0, 1}, {43, (MenuHandle) 0, 1}, {0, (MenuHandle) 0, 0}}; dptr = GetNewMySmallStrangeDialog(TermDLOG, NULL, kInFront, (void *)ThirdCenterDialog); ditem = 3; SetDialogDefaultItem(dptr, 1); SetDialogCancelItem(dptr, 2); SetDialogTracksCursor(dptr, 1); currentPanel = TelInfo->lastPanelTerminal + 1; SetCntrl(dptr, 46, currentPanel); HideDItemRange(dptr, 11, 16); HideDItemRange(dptr, 22, 23); HideDItemRange(dptr, 25, 27); HideDItemRange(dptr, 30, 31); HideDItemRange(dptr, 33, 34); HideDItem(dptr, 48); HideDItemRange(dptr, 28, 29); HideDItem(dptr, 32); HideDItemRange(dptr, 35, 39); DrawBlank(dptr, 20); DrawBlank(dptr, 43); HideDItemRange(dptr, 19, 21); HideDItemRange(dptr, 40, 44); HideDItemRange(dptr, 3, 10); HideDItem(dptr, 24); HideDItem(dptr, 47); switch (currentPanel) { case 1: ShowDItemRange(dptr, 11, 16); ShowDItemRange(dptr, 22, 23); ShowDItemRange(dptr, 25, 27); ShowDItemRange(dptr, 30, 31); ShowDItemRange(dptr, 33, 34); ShowDItem(dptr, 48); break; case 2: ShowDItemRange(dptr, 28, 29); ShowDItem(dptr, 32); ShowDItemRange(dptr, 35, 39); break; case 3: ShowDItemRange(dptr, 19, 21); ShowDItemRange(dptr, 40, 44); DrawPopUp(dptr, 20); DrawPopUp(dptr, 43); ShowDItem(dptr, 47); break; case 4: ShowDItemRange(dptr, 3, 10); ShowDItem(dptr, 24); break; } WeNeedAFontMenuHandle = NewMenu(666, "\p"); //get the fonts from the font menu in the menu bar scratchshort = CountMItems(myMenus[Font]); for (i = 1; i <= scratchshort; i++) { GetItem(myMenus[Font],i,scratchPstring); AppendMenu(WeNeedAFontMenuHandle,scratchPstring); } TPopup[0].h = WeNeedAFontMenuHandle; WeNeedAnotherFontMenuHandle = NewMenu(667, "\p"); //get the fonts from the font menu in the menu bar scratchshort = CountMItems(myMenus[Font]); for (i = 1; i <= scratchshort; i++) { GetItem(myMenus[Font],i,scratchPstring); AppendMenu(WeNeedAnotherFontMenuHandle,scratchPstring); } TPopup[1].h = WeNeedAnotherFontMenuHandle; PopupInit(dptr, TPopup); if (PrefRecordNamePtr[0] != 0) { IsNewPrefRecord = FALSE; UseResFile(TelInfo->SettingsFile); TermPrefsHdl = (TerminalPrefs **)Get1NamedResource(TERMINALPREFS_RESTYPE, PrefRecordNamePtr); if (EqualString(PrefRecordNamePtr, "\p", FALSE, FALSE)) { HideDItem(dptr, TermNameStatText); HideDItem(dptr, TermName); } } else { //make sure we have a unique name TermPrefsHdl = GetDefaultTerminal(); IsNewPrefRecord = TRUE; GetIndString(PrefRecordNamePtr, MISC_STRINGS, MISC_NEWTERM); getAUniqueName(currentHead,PrefRecordNamePtr); } HLock((Handle) TermPrefsHdl); TermPrefsPtr = *TermPrefsHdl; SetTEText(dptr, TermName, PrefRecordNamePtr); SetCntrl(dptr, TermANSI, TermPrefsPtr->ANSIgraphics); SetCntrl(dptr, TermXterm, TermPrefsPtr->Xtermsequences); SetCntrl(dptr, 39, TermPrefsPtr->remapCtrlD); SetCntrl(dptr, 40, TermPrefsPtr->allowBold); SetCntrl(dptr, 41, TermPrefsPtr->colorBold); SetCntrl(dptr, 44, TermPrefsPtr->boldFontStyle); SetCntrl(dptr, 47, TermPrefsPtr->realbold); SetCntrl(dptr, 48, TermPrefsPtr->oldScrollback); SetCntrl(dptr, Termvtwrap, TermPrefsPtr->vtwrap); // SetCntrl(dptr, Termmeta, TermPrefsPtr->emacsmetakey); SetCntrl(dptr, TermMetaIsCmdCntrol, (TermPrefsPtr->emacsmetakey == 1)); SetCntrl(dptr, TermMetaIsOption, (TermPrefsPtr->emacsmetakey == 2)); SetCntrl(dptr, TermMetaIsOff, (TermPrefsPtr->emacsmetakey == 0)); SetCntrl(dptr, Termarrow, TermPrefsPtr->emacsarrows); SetCntrl(dptr, TermMAT, TermPrefsPtr->MATmappings); SetCntrl(dptr, Termeightbit, TermPrefsPtr->eightbit); SetCntrl(dptr, Termclearsave, TermPrefsPtr->clearsave); SetCntrl(dptr, TermVT100, (TermPrefsPtr->vtemulation == 0)); SetCntrl(dptr, TermVT220, (TermPrefsPtr->vtemulation == 1)); SetCntrl(dptr, TermRemapKeypad, TermPrefsPtr->remapKeypad); scratchlong = (long)(TermPrefsPtr->vtwidth); NumToString(scratchlong, scratchPstring); SetTEText(dptr, TermWidth, scratchPstring); scratchlong = (short)(TermPrefsPtr->vtheight); NumToString(scratchlong, scratchPstring); SetTEText(dptr, TermHeight, scratchPstring); scratchlong = TermPrefsPtr->fontsize; NumToString(scratchlong, scratchPstring); SetTEText(dptr, TermFontSize, scratchPstring); scratchlong = TermPrefsPtr->numbkscroll; NumToString(scratchlong, scratchPstring); SetTEText(dptr, TermScrollback, scratchPstring); SetTEText(dptr, TermAnswerback, TermPrefsPtr->AnswerBackMessage); for(scratchshort = CountMItems(TPopup[0].h); scratchshort; scratchshort--) { GetItem(TPopup[0].h, scratchshort, scratchPstring); if (EqualString(scratchPstring, (TermPrefsPtr->DisplayFont), TRUE, FALSE)) TPopup[0].choice = scratchshort; } for(scratchshort = CountMItems(TPopup[1].h); scratchshort; scratchshort--) { GetItem(TPopup[1].h, scratchshort, scratchPstring); if (EqualString(scratchPstring, (TermPrefsPtr->BoldFont), TRUE, FALSE)) TPopup[1].choice = scratchshort; } ZeroNumOnly(); NumOnly[0] = TermSafeItem; NumOnly[1] = TermWidth; NumOnly[2] = TermHeight; NumOnly[3] = TermFontSize; NumOnly[4] = TermScrollback; NumOnly[5] = 0; // if (TermPrefsPtr->vtemulation != 1) // { // HideDItem(dptr,TermRemapKeypad); // HideDItem(dptr,TermMAT); // } if (TelInfo->haveColorQuickDraw) { for (scratchshort = 0, NumberOfColorBoxes = 4; scratchshort < NumberOfColorBoxes; scratchshort++) { BoxColorItems[scratchshort] = TermNFcolor + scratchshort; BlockMove(&(TermPrefsPtr->nfcolor) + scratchshort, &BoxColorData[scratchshort], sizeof(RGBColor)); UItemAssign( dptr, TermNFcolor + scratchshort, ColorBoxItemProcUPP); } } else NumberOfColorBoxes = 0; // B&W machine ColorBoxPoint.h = 0; // Have the color picker center the box on the main ColorBoxPoint.v = 0; // screen SelIText(dptr, TermName, 0, 32767); ShowWindow(dptr); wasInAliasText = FALSE; while (ditem > 2) { movableModalDialog(TerminalModalProcUPP, &ditem); if ((wasInAliasText)&&(ditem != TermName)) { wasInAliasText = FALSE; GetTEText(dptr, TermName,scratchPstring); if (EqualString(scratchPstring,PrefRecordNamePtr,FALSE,FALSE)) goto okayTermName; if (scratchPstring[0] == 0) { DialogPtr alertUser; short alertDItem = 3; alertUser = GetNewMyDialog(kBadPrefNameDLOG, NULL, kInFront, (void *)ThirdCenterDialog); while (alertDItem > 1) { ModalDialog(DLOGwOK_CancelUPP,&alertDItem); DisposeDialog(alertUser); } SetPort(dptr); //back to old dialog SetTEText(dptr,TermName,PrefRecordNamePtr);//set the string back to the original SelIText(dptr,TermName,0,32767); ditem = TermName; //so that if they hit ok or cancel, it doesn't kill the window } else if(findNodeNC(currentHead,scratchPstring)) //we already have that name { DialogPtr alertUser; short alertDItem = 3; alertUser = GetNewMyDialog(kBadPrefNameDLOG, NULL, kInFront, (void *)ThirdCenterDialog); while (alertDItem > 1) { ModalDialog(DLOGwOK_CancelUPP,&alertDItem); DisposeDialog(alertUser); } SetPort(dptr); //back to old dialog SetTEText(dptr,TermName,PrefRecordNamePtr);//set the string back to the original SelIText(dptr,TermName,0,32767); ditem = TermName; //so that if they hit ok or cancel, it doesn't kill the window } else goto okayTermName; } else { okayTermName: switch (ditem) { case TermANSI: case TermXterm: case 39: case 40: case 41: case 44: case 47: case 48: case Termvtwrap: case Termarrow: case TermMAT: case Termeightbit: case Termclearsave: case TermRemapKeypad: FlipCheckBox(dptr, ditem); break; case TermVT100: SetCntrl(dptr, TermVT100, 1); SetCntrl(dptr, TermVT220, 0); SetTEText(dptr, TermAnswerback, "\pVT100"); //HideDItem(dptr,TermRemapKeypad); //HideDItem(dptr,TermMAT); break; case TermVT220: SetCntrl(dptr, TermVT100, 0); SetCntrl(dptr, TermVT220, 1); SetTEText(dptr, TermAnswerback, "\pVT220"); //ShowDItem(dptr,TermRemapKeypad); //ShowDItem(dptr,TermMAT); break; case TermMetaIsCmdCntrol: SetCntrl(dptr, TermMetaIsOption, 0); SetCntrl(dptr, TermMetaIsOff, 0); SetCntrl(dptr, TermMetaIsCmdCntrol, 1); break; case TermMetaIsOption: SetCntrl(dptr, TermMetaIsOff, 0); SetCntrl(dptr, TermMetaIsCmdCntrol, 0); SetCntrl(dptr, TermMetaIsOption, 1); break; case TermMetaIsOff: SetCntrl(dptr, TermMetaIsCmdCntrol, 0); SetCntrl(dptr, TermMetaIsOption, 0); SetCntrl(dptr, TermMetaIsOff, 1); break; case TermNFcolor: case TermNBcolor: case TermBFcolor: case TermBBcolor: if (TelInfo->haveColorQuickDraw) { Str255 askColorString; GetIndString(askColorString,MISC_STRINGS,PICK_NEW_COLOR_STRING); UserLikesNewColor = GetColor(ColorBoxPoint, askColorString, &BoxColorData[ditem-TermNFcolor], &scratchRGBcolor); if (UserLikesNewColor) BoxColorData[ditem-TermNFcolor] = scratchRGBcolor; } break; case 46: // switch tabs newPanel = GetCntlVal(dptr, 46); if (newPanel == currentPanel) break; switch (currentPanel) { case 1: HideDItemRange(dptr, 11, 16); HideDItemRange(dptr, 22, 23); HideDItemRange(dptr, 25, 27); HideDItemRange(dptr, 30, 31); HideDItemRange(dptr, 33, 34); HideDItem(dptr, 48); break; case 2: HideDItemRange(dptr, 28, 29); HideDItem(dptr, 32); HideDItemRange(dptr, 35, 39); break; case 3: DrawBlank(dptr, 20); DrawBlank(dptr, 43); HideDItemRange(dptr, 19, 21); HideDItemRange(dptr, 40, 44); HideDItem(dptr, 47); break; case 4: HideDItemRange(dptr, 3, 10); HideDItem(dptr, 24); break; } switch (newPanel) { case 1: ShowDItemRange(dptr, 11, 16); ShowDItemRange(dptr, 22, 23); ShowDItemRange(dptr, 25, 27); ShowDItemRange(dptr, 30, 31); ShowDItemRange(dptr, 33, 34); ShowDItem(dptr, 48); break; case 2: ShowDItemRange(dptr, 28, 29); ShowDItem(dptr, 32); ShowDItemRange(dptr, 35, 39); break; case 3: ShowDItemRange(dptr, 19, 21); ShowDItemRange(dptr, 40, 44); DrawPopUp(dptr, 20); DrawPopUp(dptr, 43); ShowDItem(dptr, 47); break; case 4: ShowDItemRange(dptr, 3, 10); ShowDItem(dptr, 24); break; } currentPanel = newPanel; break; case TermName: wasInAliasText = TRUE; default: break; } // switch }//else not wasInAliasText } // while GetItem(TPopup[1].h, TPopup[1].choice, scratchPstring); if (Length(scratchPstring) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring, (TermPrefsPtr->BoldFont), scratchPstring[0]+1); GetItem(TPopup[0].h, TPopup[0].choice, scratchPstring); PopupCleanup(); if (ditem == 2) { if (IsNewPrefRecord) DisposeHandle((Handle) TermPrefsHdl); else ReleaseResource((Handle) TermPrefsHdl); TelInfo->lastPanelTerminal = currentPanel - 1; DisposeDialog(dptr); return(FALSE); // No changes should be made. } if (TelInfo->haveColorQuickDraw) { for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) { BlockMove(&BoxColorData[scratchshort], &(TermPrefsPtr->nfcolor) + scratchshort, sizeof(RGBColor)); } } if (Length(scratchPstring) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring, (TermPrefsPtr->DisplayFont), scratchPstring[0]+1); TermPrefsPtr->ANSIgraphics = GetCntlVal(dptr, TermANSI); TermPrefsPtr->Xtermsequences = GetCntlVal(dptr, TermXterm); TermPrefsPtr->remapCtrlD = GetCntlVal(dptr, 39); TermPrefsPtr->allowBold = GetCntlVal(dptr, 40); TermPrefsPtr->colorBold = GetCntlVal(dptr, 41); TermPrefsPtr->realbold = GetCntlVal(dptr, 47); TermPrefsPtr->oldScrollback = GetCntlVal(dptr, 48); TermPrefsPtr->boldFontStyle = GetCntlVal(dptr, 44); TermPrefsPtr->vtwrap = GetCntlVal(dptr, Termvtwrap); if (GetCntlVal(dptr, TermMetaIsCmdCntrol)) TermPrefsPtr->emacsmetakey = 1; else if (GetCntlVal(dptr, TermMetaIsOption)) TermPrefsPtr->emacsmetakey = 2; else TermPrefsPtr->emacsmetakey = 0; TermPrefsPtr->emacsarrows = GetCntlVal(dptr, Termarrow); TermPrefsPtr->MATmappings = GetCntlVal(dptr, TermMAT); TermPrefsPtr->eightbit = GetCntlVal(dptr, Termeightbit); TermPrefsPtr->clearsave = GetCntlVal(dptr, Termclearsave); TermPrefsPtr->remapKeypad = GetCntlVal(dptr, TermRemapKeypad); TermPrefsPtr->vtemulation = (GetCntlVal(dptr, TermVT220) != 0); GetTEText(dptr, TermWidth, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 133, 10); TermPrefsPtr->vtwidth = (short) scratchlong; GetTEText(dptr, TermHeight, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 80, 10); TermPrefsPtr->vtheight = (short) scratchlong; GetTEText(dptr, TermFontSize, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 24, 4); TermPrefsPtr->fontsize = (short) scratchlong; GetTEText(dptr, TermScrollback, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 50000, 24); TermPrefsPtr->numbkscroll = (short) scratchlong; GetTEText(dptr, TermAnswerback, scratchPstring); if (Length(scratchPstring) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring, TermPrefsPtr->AnswerBackMessage, scratchPstring[0]+1); GetTEText(dptr, TermName, PrefRecordNamePtr); if (IsNewPrefRecord) { UseResFile(TelInfo->SettingsFile); resourceID = UniqueID(TERMINALPREFS_RESTYPE); AddResource((Handle)TermPrefsHdl, TERMINALPREFS_RESTYPE, resourceID, PrefRecordNamePtr); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)TermPrefsHdl); } else { UseResFile(TelInfo->SettingsFile); GetResInfo((Handle)TermPrefsHdl, &resourceID, &scratchResType,(StringPtr) &scratchPstring); SetResInfo((Handle)TermPrefsHdl, resourceID, PrefRecordNamePtr); ChangedResource((Handle)TermPrefsHdl); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)TermPrefsHdl); } TelInfo->lastPanelTerminal = currentPanel - 1; DisposeDialog(dptr); return(TRUE); // A resource has changed or been added. } Boolean EditSession(StringPtr PrefRecordNamePtr) { DialogPtr dptr; short ditem, scratchshort, resourceID, currentPanel, newPanel, i; short numberOfTerms; long scratchlong; ResType scratchResType; Boolean IsNewPrefRecord, wasInAliasText; SessionPrefs** SessPrefsHdl; SessionPrefs* SessPrefsPtr; TerminalPrefs** tempTermPrefsHdl; Str255 scratchPstring, scratchPstring2; LinkedListNode *savedList; EventRecord optKeyEvtRec; popup SPopup[] = {{SessTermPopup, (MenuHandle) 0, 1}, {SessTransTablePopup, (MenuHandle) 0, 1}, {0, (MenuHandle) 0, 0}}; dptr = GetNewMySmallStrangeDialog(SessionConfigDLOG, NULL, kInFront, (void *)ThirdCenterDialog); ditem = 3; SetDialogDefaultItem(dptr, 1); SetDialogCancelItem(dptr, 2); SetDialogTracksCursor(dptr, 1); currentPanel = TelInfo->lastPanelSession + 1; savedList = currentHead; //save the current list, so the list that got us here works SPopup[0].h = NewMenu(666, "\p"); UseResFile(TelInfo->SettingsFile); numberOfTerms = Count1Resources(TERMINALPREFS_RESTYPE); currentHead = createSortedList(TERMINALPREFS_RESTYPE,numberOfTerms,"\p"); addListToMenu(SPopup[0].h, currentHead, 1); EnableItem(SPopup[0].h, 0); // Make sure the entire menu is enabled deleteList(¤tHead); UseResFile(TelInfo->ApplicationFile); SPopup[1].h = NewMenu(667, "\p"); numberOfTerms = CountResources(USER_TRSL); currentHead = createSortedList2(USER_TRSL,numberOfTerms,NULL); GetIndString(scratchPstring,MISC_STRINGS,NONE_STRING); //"None" string AppendMenu(SPopup[1].h,scratchPstring); addListToMenu/*3*/(SPopup[1].h, currentHead, 2); EnableItem(SPopup[1].h, 0); // Make sure the entire menu is enabled deleteList(¤tHead); UseResFile(TelInfo->SettingsFile); currentHead = savedList; PopupInit(dptr, SPopup); if (PrefRecordNamePtr[0] != 0) { IsNewPrefRecord = FALSE; UseResFile(TelInfo->SettingsFile); SessPrefsHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, PrefRecordNamePtr); if (EqualString(PrefRecordNamePtr, "\p", FALSE, FALSE)) { HideDItem(dptr, SessAlias); HideDItem(dptr, SessAliasStatText); } } else { SessPrefsHdl = GetDefaultSession(); IsNewPrefRecord = TRUE; GetIndString(PrefRecordNamePtr, MISC_STRINGS, MISC_NEWSESSION); getAUniqueName(currentHead,PrefRecordNamePtr); } HLock((Handle) SessPrefsHdl); SessPrefsPtr = *SessPrefsHdl; SetCntrl(dptr, SessTEKinhib, (SessPrefsPtr->tektype == -1)); SetCntrl(dptr, SessTEK4014, (SessPrefsPtr->tektype == 0)); SetCntrl(dptr, SessTEK4105, (SessPrefsPtr->tektype == 1)); SetCntrl(dptr, SessPasteQuick, (SessPrefsPtr->pastemethod == 0)); SetCntrl(dptr, SessPasteBlock, (SessPrefsPtr->pastemethod == 1)); SetCntrl(dptr, SessDeleteDel, (SessPrefsPtr->bksp == 1)); SetCntrl(dptr, SessDeleteBS, (SessPrefsPtr->bksp == 0)); SetCntrl(dptr, SessForceSave, SessPrefsPtr->forcesave); SetCntrl(dptr, SessBezerkeley, SessPrefsPtr->crmap); SetCntrl(dptr, 42, SessPrefsPtr->alwaysBSD); SetCntrl(dptr, 43, SessPrefsPtr->ignoreBeeps); SetCntrl(dptr, 44, SessPrefsPtr->ignoreff); SetCntrl(dptr, SessLinemode, SessPrefsPtr->linemode); SetCntrl(dptr, SessTEKclear, SessPrefsPtr->tekclear); SetCntrl(dptr, SessHalfDuplex, SessPrefsPtr->halfdup); SetCntrl(dptr, SessAuthenticate, SessPrefsPtr->authenticate); SetCntrl(dptr, SessEncrypt, SessPrefsPtr->encrypt); SetCntrl(dptr, SessLocalEcho, SessPrefsPtr->localecho); SetCntrl(dptr, 47, SessPrefsPtr->otpauto); SetCntrl(dptr, 48, SessPrefsPtr->otpmulti); SetCntrl(dptr, 49, SessPrefsPtr->otphex); SetCntrl(dptr, 50, SessPrefsPtr->otpnoprompt); SetCntrl(dptr, 53, SessPrefsPtr->otpsavepass); configPassword[0] = 0; if (SessPrefsPtr->otppassword[0]) { pstrcpy((unsigned char *)configPassword, (unsigned char *)SessPrefsPtr->otppassword); p2cstr((unsigned char *)configPassword); for (i = 1; i < 250; i++) scratchPstring[i] = ''; scratchPstring[0] = strlen(configPassword); SetTEText(dptr, 52, scratchPstring); } SetTEText(dptr, SessHostName, SessPrefsPtr->hostname); SetTEText(dptr, SessAlias, PrefRecordNamePtr); if (SessPrefsPtr->portNegative) { NumToString((unsigned short)SessPrefsPtr->port, &scratchPstring[1]); scratchPstring[0] = scratchPstring[1] + 1; scratchPstring[1] = '-'; } else NumToString((unsigned short)SessPrefsPtr->port, scratchPstring); SetTEText(dptr, SessPort, scratchPstring); NumToString(SessPrefsPtr->pasteblocksize, scratchPstring); SetTEText(dptr, SessBlockSize, scratchPstring); if (SessPrefsPtr->NetBlockSize <= 512) SessPrefsPtr->NetBlockSize = 512; NumToString(SessPrefsPtr->NetBlockSize, scratchPstring); SetTEText(dptr, SessBlockSizeTE, scratchPstring); scratchPstring[0] = 2; scratchPstring[1] = '^'; if (SessPrefsPtr->ckey != -1) { scratchPstring[2] = SessPrefsPtr->ckey ^ 64; SetTEText(dptr, SessInterrupt, scratchPstring); } if (SessPrefsPtr->skey != -1) { scratchPstring[2] = SessPrefsPtr->skey ^ 64; SetTEText(dptr, SessSuspend, scratchPstring); } if (SessPrefsPtr->qkey != -1) { scratchPstring[2] = SessPrefsPtr->qkey ^ 64; SetTEText(dptr, SessResume, scratchPstring); } for(scratchshort = CountMItems(SPopup[0].h); scratchshort; scratchshort--) { GetItem(SPopup[0].h, scratchshort, scratchPstring); if (EqualString(scratchPstring, (SessPrefsPtr->TerminalEmulation), TRUE, FALSE)) SPopup[0].choice = scratchshort; } for(scratchshort = CountMItems(SPopup[1].h); scratchshort; scratchshort--) { GetItem(SPopup[1].h, scratchshort, scratchPstring); if (EqualString(scratchPstring, (SessPrefsPtr->TranslationTable), TRUE, FALSE)) SPopup[1].choice = scratchshort; } NumberOfColorBoxes = 0; ZeroNumOnly(); NumOnly[0] = SessSafeItem; NumOnly[1] = SessBlockSize; SetCntrl(dptr, 46, currentPanel); HideDItemRange(dptr, 19, 20); HideDItemRange(dptr, 25, 27); HideDItem(dptr, 29); HideDItemRange(dptr, 36, 37); HideDItemRange(dptr, 40, 41); HideDItemRange(dptr, 6, 7); HideDItemRange(dptr, 21, 24); HideDItem(dptr, 12); HideDItem(dptr, 14); HideDItem(dptr, 17); HideDItem(dptr, 31); HideDItemRange(dptr, 33, 35); HideDItemRange(dptr, 38, 39); HideDItemRange(dptr, 3, 5); HideDItemRange(dptr, 8, 11); HideDItem(dptr, 13); HideDItem(dptr, 30); HideDItem(dptr, 32); HideDItemRange(dptr, 42, 44); HideDItemRange(dptr, 15, 16); HideDItemRange(dptr, 47, 53); switch (currentPanel) { case 1: ShowDItemRange(dptr, 19, 20); ShowDItemRange(dptr, 25, 27); ShowDItem(dptr, 29); ShowDItemRange(dptr, 36, 37); ShowDItemRange(dptr, 40, 41); DrawPopUp(dptr, 25); DrawPopUp(dptr, 26); break; case 2: ShowDItemRange(dptr, 6, 7); ShowDItemRange(dptr, 21, 24); ShowDItem(dptr, 12); ShowDItem(dptr, 14); ShowDItem(dptr, 17); ShowDItem(dptr, 31); ShowDItemRange(dptr, 33, 35); ShowDItemRange(dptr, 38, 39); break; case 3: ShowDItemRange(dptr, 3, 5); ShowDItemRange(dptr, 8, 11); ShowDItem(dptr, 13); ShowDItem(dptr, 30); ShowDItem(dptr, 32); ShowDItemRange(dptr, 42, 44); break; case 4: ShowDItemRange(dptr, 15, 16); ShowDItemRange(dptr, 47, 53); } SelIText(dptr, SessAlias, 0, 32767); ShowWindow(dptr); wasInAliasText = FALSE; while ((ditem > 2) || (ditem == 0)) { movableModalDialog(SessionModalProcUPP, &ditem); if (ditem == 0) continue; if ((wasInAliasText)&&(ditem != SessAlias)) { wasInAliasText = FALSE; GetTEText(dptr, SessAlias, scratchPstring); if (EqualString(scratchPstring,PrefRecordNamePtr,FALSE,FALSE)) goto okaySessName; if (scratchPstring[0] == 0) { DialogPtr alertUser; short alertDItem = 3; alertUser = GetNewMyDialog(kBadPrefNameDLOG, NULL, kInFront, (void *)ThirdCenterDialog); while (alertDItem > 1) { ModalDialog(DLOGwOK_CancelUPP,&alertDItem); DisposeDialog(alertUser); } SetPort(dptr); //back to old dialog SetTEText(dptr,SessAlias,PrefRecordNamePtr);//set the string back to the original SelIText(dptr,SessAlias,0,32767); ditem = SessAlias; //so that if they hit ok or cancel, it doesn't kill the window } else if(findNodeNC(currentHead,scratchPstring)) //we already have that name { DialogPtr alertUser; short alertDItem = 3; alertUser = GetNewMyDialog(kBadPrefNameDLOG, NULL, kInFront, (void *)ThirdCenterDialog); while (alertDItem > 1) { ModalDialog(DLOGwOK_CancelUPP,&alertDItem); DisposeDialog(alertUser); } SetPort(dptr); //back to old dialog SetTEText(dptr,SessAlias,PrefRecordNamePtr);//set the string back to the original SelIText(dptr,SessAlias,0,32767); ditem = SessAlias; //so that if they hit ok or cancel, it doesn't kill the window } else goto okaySessName; } else { okaySessName: switch (ditem) { case SessForceSave: case SessBezerkeley: case SessLinemode: case SessTEKclear: case SessHalfDuplex: case SessAuthenticate: case SessEncrypt: case SessLocalEcho: case 42: case 43: case 44: case 47: case 48: case 49: case 50: case 53: FlipCheckBox(dptr, ditem); break; case SessTEKinhib: SetCntrl(dptr, SessTEKinhib, 1); SetCntrl(dptr, SessTEK4014, 0); SetCntrl(dptr, SessTEK4105, 0); break; case SessTEK4014: SetCntrl(dptr, SessTEKinhib, 0); SetCntrl(dptr, SessTEK4014, 1); SetCntrl(dptr, SessTEK4105, 0); break; case SessTEK4105: SetCntrl(dptr, SessTEKinhib, 0); SetCntrl(dptr, SessTEK4014, 0); SetCntrl(dptr, SessTEK4105, 1); break; case SessPasteQuick: SetCntrl(dptr, SessPasteQuick, 1); SetCntrl(dptr, SessPasteBlock, 0); break; case SessPasteBlock: SetCntrl(dptr, SessPasteQuick, 0); SetCntrl(dptr, SessPasteBlock, 1); break; case SessDeleteDel: SetCntrl(dptr, SessDeleteDel, 1); SetCntrl(dptr, SessDeleteBS, 0); break; case SessDeleteBS: SetCntrl(dptr, SessDeleteDel, 0); SetCntrl(dptr, SessDeleteBS, 1); break; case SessInterrupt: case SessSuspend: case SessResume: GetTEText(dptr, ditem, scratchPstring); if ((scratchPstring[1] < 32) && (scratchPstring[1] > 0)) { scratchPstring[0] = 2; scratchPstring[2] = scratchPstring[1] ^ 64; scratchPstring[1] = '^'; SetTEText(dptr, ditem, scratchPstring); } break; case 46: // tab control newPanel = GetCntlVal(dptr, 46); if (newPanel == currentPanel) break; switch (currentPanel) { case 1: DrawBlank(dptr, 25); DrawBlank(dptr, 26); HideDItemRange(dptr, 19, 20); HideDItemRange(dptr, 25, 27); HideDItem(dptr, 29); HideDItemRange(dptr, 36, 37); HideDItemRange(dptr, 40, 41); break; case 2: HideDItemRange(dptr, 6, 7); HideDItemRange(dptr, 21, 24); HideDItem(dptr, 12); HideDItem(dptr, 14); HideDItem(dptr, 17); HideDItem(dptr, 31); HideDItemRange(dptr, 33, 35); HideDItemRange(dptr, 38, 39); break; case 3: HideDItemRange(dptr, 3, 5); HideDItemRange(dptr, 8, 11); HideDItem(dptr, 13); HideDItem(dptr, 30); HideDItem(dptr, 32); HideDItemRange(dptr, 42, 44); break; case 4: HideDItemRange(dptr, 15, 16); HideDItemRange(dptr, 47, 53); } switch (newPanel) { case 1: ShowDItemRange(dptr, 19, 20); ShowDItemRange(dptr, 25, 27); ShowDItem(dptr, 29); ShowDItemRange(dptr, 36, 37); ShowDItemRange(dptr, 40, 41); DrawPopUp(dptr, 25); DrawPopUp(dptr, 26); break; case 2: ShowDItemRange(dptr, 6, 7); ShowDItemRange(dptr, 21, 24); ShowDItem(dptr, 12); ShowDItem(dptr, 14); ShowDItem(dptr, 17); ShowDItem(dptr, 31); ShowDItemRange(dptr, 33, 35); ShowDItemRange(dptr, 38, 39); break; case 3: ShowDItemRange(dptr, 3, 5); ShowDItemRange(dptr, 8, 11); ShowDItem(dptr, 13); ShowDItem(dptr, 30); ShowDItem(dptr, 32); ShowDItemRange(dptr, 42, 44); break; case 4: ShowDItemRange(dptr, 15, 16); ShowDItemRange(dptr, 47, 53); } currentPanel = newPanel; break; case 40: // Save as Set... case 41: // Add to Set... GetItem(SPopup[0].h, SPopup[0].choice, scratchPstring); GetItem(SPopup[1].h, SPopup[1].choice, scratchPstring2); if (Length(scratchPstring) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring, (SessPrefsPtr->TerminalEmulation), scratchPstring[0]+1); if (Length(scratchPstring2) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring2, (SessPrefsPtr->TranslationTable), scratchPstring2[0]+1); SessPrefsPtr->tektype = (-1 * GetCntlVal(dptr, SessTEKinhib)) + GetCntlVal(dptr, SessTEK4105); SessPrefsPtr->pastemethod = !GetCntlVal(dptr, SessPasteQuick); SessPrefsPtr->bksp = GetCntlVal(dptr, SessDeleteDel); SessPrefsPtr->forcesave = GetCntlVal(dptr, SessForceSave); SessPrefsPtr->crmap = GetCntlVal(dptr, SessBezerkeley); SessPrefsPtr->alwaysBSD = GetCntlVal(dptr, 42); SessPrefsPtr->ignoreBeeps = GetCntlVal(dptr, 43); SessPrefsPtr->ignoreff = GetCntlVal(dptr, 44); SessPrefsPtr->linemode = GetCntlVal(dptr, SessLinemode); SessPrefsPtr->tekclear = GetCntlVal(dptr, SessTEKclear); SessPrefsPtr->halfdup = GetCntlVal(dptr, SessHalfDuplex); SessPrefsPtr->authenticate = GetCntlVal(dptr, SessAuthenticate); SessPrefsPtr->encrypt = GetCntlVal(dptr, SessEncrypt); SessPrefsPtr->localecho = GetCntlVal(dptr, SessLocalEcho); SessPrefsPtr->otpauto = GetCntlVal(dptr, 47); SessPrefsPtr->otpmulti = GetCntlVal(dptr, 48); SessPrefsPtr->otphex = GetCntlVal(dptr, 49); SessPrefsPtr->otpnoprompt = GetCntlVal(dptr, 50); SessPrefsPtr->otpsavepass = GetCntlVal(dptr, 53); c2pstr(configPassword); pstrcpy((unsigned char *)SessPrefsPtr->otppassword, (unsigned char *)configPassword); GetTEText(dptr, SessPort, scratchPstring); SessPrefsPtr->portNegative = 0; if (scratchPstring[1] == '-') { SessPrefsPtr->portNegative = 1; scratchPstring[1] = scratchPstring[0] - 1; StringToNum(&scratchPstring[1], &scratchlong); } else StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 65530, 1); SessPrefsPtr->port = (short) scratchlong; GetTEText(dptr, SessBlockSize, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 4097, 10); SessPrefsPtr->pasteblocksize = (short) scratchlong; GetTEText(dptr, SessHostName, scratchPstring); if (Length(scratchPstring) > 63) scratchPstring[0] = 63; /* if (scratchPstring[0] == 0) { scratchPstring[0] = 5; scratchPstring[1] = 'a'; scratchPstring[2] = '.'; scratchPstring[3] = 'e'; scratchPstring[4] = 'd'; scratchPstring[5] = 'u'; } */ BlockMove(scratchPstring, SessPrefsPtr->hostname, scratchPstring[0]+1); GetTEText(dptr, SessAlias, PrefRecordNamePtr); GetTEText(dptr, SessInterrupt, scratchPstring); if (scratchPstring[0]) SessPrefsPtr->ckey = toupper(scratchPstring[2]) ^ 64; else SessPrefsPtr->ckey = -1; GetTEText(dptr, SessSuspend, scratchPstring); if (scratchPstring[0]) SessPrefsPtr->skey = toupper(scratchPstring[2]) ^ 64; else SessPrefsPtr->skey = -1; GetTEText(dptr, SessResume, scratchPstring); if (scratchPstring[0]) SessPrefsPtr->qkey = toupper(scratchPstring[2]) ^ 64; else SessPrefsPtr->qkey = -1; GetTEText(dptr,SessBlockSizeTE,scratchPstring); StringToNum(scratchPstring,&scratchlong); BoundsCheck(&scratchlong, 4096, 512); SessPrefsPtr->NetBlockSize = (short) scratchlong; UseResFile(TelInfo->SettingsFile); tempTermPrefsHdl = (TerminalPrefs **)Get1NamedResource (TERMINALPREFS_RESTYPE, SessPrefsPtr->TerminalEmulation); DetachResource((Handle) tempTermPrefsHdl); HLock((Handle) tempTermPrefsHdl); EventAvail(everyEvent, &optKeyEvtRec); SaveSetFromSession(SessPrefsPtr, *tempTermPrefsHdl, (ditem == 41), (optKeyEvtRec.modifiers & 0x0800)); DisposeHandle((Handle) tempTermPrefsHdl); break; case SessAlias: wasInAliasText = TRUE; break; default: break; } // switch } //else not bad alias } // while GetItem(SPopup[0].h, SPopup[0].choice, scratchPstring); GetItem(SPopup[1].h, SPopup[1].choice, scratchPstring2); PopupCleanup(); if (ditem == 2) { if (IsNewPrefRecord) DisposeHandle((Handle) SessPrefsHdl); else ReleaseResource((Handle) SessPrefsHdl); TelInfo->lastPanelSession = currentPanel - 1; DisposeDialog(dptr); return(FALSE); // No changes should be made. } if (Length(scratchPstring) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring, (SessPrefsPtr->TerminalEmulation), scratchPstring[0]+1); if (Length(scratchPstring2) > 63) scratchPstring[0] = 63; BlockMove(scratchPstring2, (SessPrefsPtr->TranslationTable), scratchPstring2[0]+1); SessPrefsPtr->tektype = (-1 * GetCntlVal(dptr, SessTEKinhib)) + GetCntlVal(dptr, SessTEK4105); SessPrefsPtr->pastemethod = !GetCntlVal(dptr, SessPasteQuick); SessPrefsPtr->bksp = GetCntlVal(dptr, SessDeleteDel); SessPrefsPtr->forcesave = GetCntlVal(dptr, SessForceSave); SessPrefsPtr->crmap = GetCntlVal(dptr, SessBezerkeley); SessPrefsPtr->alwaysBSD = GetCntlVal(dptr, 42); SessPrefsPtr->ignoreBeeps = GetCntlVal(dptr, 43); SessPrefsPtr->ignoreff = GetCntlVal(dptr, 44); SessPrefsPtr->linemode = GetCntlVal(dptr, SessLinemode); SessPrefsPtr->tekclear = GetCntlVal(dptr, SessTEKclear); SessPrefsPtr->halfdup = GetCntlVal(dptr, SessHalfDuplex); SessPrefsPtr->authenticate = GetCntlVal(dptr, SessAuthenticate); SessPrefsPtr->encrypt = GetCntlVal(dptr, SessEncrypt); SessPrefsPtr->localecho = GetCntlVal(dptr, SessLocalEcho); SessPrefsPtr->otpauto = GetCntlVal(dptr, 47); SessPrefsPtr->otpmulti = GetCntlVal(dptr, 48); SessPrefsPtr->otphex = GetCntlVal(dptr, 49); SessPrefsPtr->otpnoprompt = GetCntlVal(dptr, 50); SessPrefsPtr->otpsavepass = GetCntlVal(dptr, 53); c2pstr(configPassword); pstrcpy((unsigned char *)SessPrefsPtr->otppassword, (unsigned char *)configPassword); GetTEText(dptr, SessPort, scratchPstring); SessPrefsPtr->portNegative = 0; if (scratchPstring[1] == '-') { SessPrefsPtr->portNegative = 1; scratchPstring[1] = scratchPstring[0] - 1; StringToNum(&scratchPstring[1], &scratchlong); } else StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 65530, 1); SessPrefsPtr->port = (short) scratchlong; GetTEText(dptr, SessBlockSize, scratchPstring); StringToNum(scratchPstring, &scratchlong); BoundsCheck(&scratchlong, 4097, 10); SessPrefsPtr->pasteblocksize = (short) scratchlong; GetTEText(dptr, SessHostName, scratchPstring); if (Length(scratchPstring) > 63) scratchPstring[0] = 63; /* if (scratchPstring[0] == 0) { scratchPstring[0] = 5; scratchPstring[1] = 'a'; scratchPstring[2] = '.'; scratchPstring[3] = 'e'; scratchPstring[4] = 'd'; scratchPstring[5] = 'u'; } */ BlockMove(scratchPstring, SessPrefsPtr->hostname, scratchPstring[0]+1); GetTEText(dptr, SessAlias, PrefRecordNamePtr); GetTEText(dptr, SessInterrupt, scratchPstring); if (scratchPstring[0]) SessPrefsPtr->ckey = toupper(scratchPstring[2]) ^ 64; else SessPrefsPtr->ckey = -1; GetTEText(dptr, SessSuspend, scratchPstring); if (scratchPstring[0]) SessPrefsPtr->skey = toupper(scratchPstring[2]) ^ 64; else SessPrefsPtr->skey = -1; GetTEText(dptr, SessResume, scratchPstring); if (scratchPstring[0]) SessPrefsPtr->qkey = toupper(scratchPstring[2]) ^ 64; else SessPrefsPtr->qkey = -1; GetTEText(dptr,SessBlockSizeTE,scratchPstring); StringToNum(scratchPstring,&scratchlong); BoundsCheck(&scratchlong, 4096, 512); SessPrefsPtr->NetBlockSize = (short) scratchlong; if (IsNewPrefRecord) { UseResFile(TelInfo->SettingsFile); resourceID = UniqueID(SESSIONPREFS_RESTYPE); AddResource((Handle)SessPrefsHdl, SESSIONPREFS_RESTYPE, resourceID, PrefRecordNamePtr); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)SessPrefsHdl); } else { UseResFile(TelInfo->SettingsFile); GetResInfo((Handle)SessPrefsHdl, &resourceID, &scratchResType,(StringPtr) &scratchPstring); SetResInfo((Handle)SessPrefsHdl, resourceID, PrefRecordNamePtr); ChangedResource((Handle)SessPrefsHdl); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)SessPrefsHdl); } TelInfo->lastPanelSession = currentPanel - 1; DisposeDialog(dptr); return(TRUE); // A resource has changed or been added. } Boolean EditFTPUser(StringPtr PrefRecordNamePtr) { DialogPtr dptr; short ditem, scratchshort, resourceID, vRefNum; ResType scratchResType; Boolean IsNewPrefRecord; FTPUser** FTPUHdl; FTPUser* FTPUptr; Str255 scratchPstring, scratchPstring2; dptr = GetNewMySmallStrangeDialog(FTPUserDLOG, NULL, kInFront, (void *)ThirdCenterDialog); ditem = 3; HideDItem(dptr, FTPUcanchangeCWD); // Sometime later, perhaps if (PrefRecordNamePtr[0] != 0) { IsNewPrefRecord = FALSE; UseResFile(TelInfo->SettingsFile); FTPUHdl = (FTPUser **)Get1NamedResource(FTPUSER, PrefRecordNamePtr); HLock((Handle) FTPUHdl); FTPUptr = *FTPUHdl; SetCntrl(dptr, FTPUcanchangeCWD, FTPUptr->UserCanCWD); SetTEText(dptr, FTPUusername, PrefRecordNamePtr); for (scratchshort = 8, scratchPstring[0] = 8; scratchshort > 0; scratchshort--) scratchPstring[scratchshort] = ''; SetTEText(dptr, FTPUpassword, scratchPstring); vRefNum = VolumeNameToRefNum(FTPUptr->DefaultDirVolName); } else { IsNewPrefRecord = TRUE; FTPUHdl = (FTPUser **)myNewHandle(sizeof(FTPUser)); HLock((Handle) FTPUHdl); FTPUptr = *FTPUHdl; vRefNum = -1; // Default Volume FTPUptr->DefaultDirDirID = 2; // Root directory SetCntrl(dptr, FTPUcanchangeCWD, 0); } PathNameFromDirID(FTPUptr->DefaultDirDirID, vRefNum, scratchPstring); SetTEText(dptr, FTPUDfltDirDsply, scratchPstring); SelIText(dptr, FTPUusername, 0, 32767); ShowWindow(dptr); while (ditem > 2) { ModalDialog(DLOGwOK_CancelUPP, &ditem); switch (ditem) { case FTPUcanchangeCWD: FlipCheckBox(dptr, ditem); break; case FTPUDfltDirButton: SelectDirectory(&vRefNum, &(FTPUptr->DefaultDirDirID)); PathNameFromDirID(FTPUptr->DefaultDirDirID, vRefNum, scratchPstring); SetTEText(dptr, FTPUDfltDirDsply, scratchPstring); break; default: break; } // switch } // while if (ditem == 2) { if (IsNewPrefRecord) DisposeHandle((Handle) FTPUHdl); else ReleaseResource((Handle) FTPUHdl); DisposeDialog(dptr); return(FALSE); // No changes should be made. } FTPUptr->UserCanCWD = GetCntlVal(dptr, FTPUcanchangeCWD); GetDirectoryName(vRefNum, 2, FTPUptr->DefaultDirVolName); GetTEText(dptr, FTPUusername, PrefRecordNamePtr); GetTEText(dptr, FTPUpassword, scratchPstring); if (scratchPstring[0] != '') { // Encrypt the new (or possibly modified) password. PtoCstr(scratchPstring); Sencompass((char *)scratchPstring, (char *)scratchPstring2); CtoPstr((char *)scratchPstring2); BlockMove(scratchPstring2, FTPUptr->EncryptedPassword, Length(scratchPstring2)+1); } if (IsNewPrefRecord) { UseResFile(TelInfo->SettingsFile); resourceID = UniqueID(FTPUSER); AddResource((Handle)FTPUHdl, FTPUSER, resourceID, PrefRecordNamePtr); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)FTPUHdl); } else { UseResFile(TelInfo->SettingsFile); GetResInfo((Handle)FTPUHdl, &resourceID, &scratchResType,(StringPtr) &scratchPstring); SetResInfo((Handle)FTPUHdl, resourceID, PrefRecordNamePtr); ChangedResource((Handle)FTPUHdl); UpdateResFile(TelInfo->SettingsFile); ReleaseResource((Handle)FTPUHdl); } DisposeDialog(dptr); return(TRUE); // A resource has changed or been added. } short AnsiPrompt(short allowDefaultBoldSelect, short *defaultBoldColor) { /* puts up the dialog that lets the user examine and change the ANSI color settings for the specified window. */ short scratchshort, ditem; Point ColorBoxPoint; DialogPtr dptr; Boolean UserLikesNewColor; RGBColorPtr scratchRGB; scratchRGB = (RGBColorPtr) myNewPtr(sizeof(RGBColor)); dptr = GetNewMySmallDialog(ANSIColorDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetDialogDefaultItem(dptr, 1); SetDialogCancelItem(dptr, 2); SetDialogTracksCursor(dptr, 1); NumberOfColorBoxes = 16; if (allowDefaultBoldSelect) SetCntrl(dptr, ANSIBlackRadio+(*defaultBoldColor), 1); else { for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) HideDItem(dptr, scratchshort + ANSIBlackRadio); HideDItem(dptr, 45); } for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) { BoxColorItems[scratchshort] = ANSIBlack + scratchshort; GetEntryColor(TelInfo->AnsiColors, scratchshort, scratchRGB); BlockMove(scratchRGB,&BoxColorData[scratchshort], sizeof(RGBColor)); UItemAssign( dptr, scratchshort + ANSIBlack, ColorBoxItemProcUPP); } ColorBoxPoint.h = 0; // Have the color picker center the box on the main ColorBoxPoint.v = 0; // screen NumOnly[0] = 12; //safe item ditem = 3; while (ditem > 2) { movableModalDialog(ColorBoxModalProcUPP, &ditem); switch (ditem) { case ANSIBlack: case ANSIRed: case ANSIGreen: case ANSIYellow: case ANSIBlue: case ANSIMagenta: case ANSICyan: case ANSIWhite: case ANSIBoldBlack: case ANSIBoldRed: case ANSIBoldGreen: case ANSIBoldYellow: case ANSIBoldBlue: case ANSIBoldMagenta: case ANSIBoldCyan: case ANSIBoldWhite: if (TelInfo->haveColorQuickDraw) { Str255 askColorString; GetIndString(askColorString,MISC_STRINGS,PICK_NEW_COLOR_STRING); UserLikesNewColor = GetColor(ColorBoxPoint,askColorString, &BoxColorData[ditem-ANSIBlack], scratchRGB); if (UserLikesNewColor) BoxColorData[ditem-ANSIBlack] = *scratchRGB; } break; case ANSIBlackRadio: case ANSIRedRadio: case ANSIGreenRadio: case ANSIYellowRadio: case ANSIBlueRadio: case ANSIMagentaRadio: case ANSICyanRadio: case ANSIWhiteRadio: case ANSIBoldBlackRadio: case ANSIBoldRedRadio: case ANSIBoldGreenRadio: case ANSIBoldYellowRadio: case ANSIBoldBlueRadio: case ANSIBoldMagentaRadio: case ANSIBoldCyanRadio: case ANSIBoldWhiteRadio: for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) SetCntrl(dptr, ANSIBlackRadio + scratchshort, 0); SetCntrl(dptr, ditem, 1); default: break; } // switch } // while if (ditem == DLOGCancel) { DisposeDialog(dptr); return -1; } if (allowDefaultBoldSelect) for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) if (GetCntlVal(dptr, ANSIBlackRadio + scratchshort)) *defaultBoldColor = scratchshort; for (scratchshort = 0; scratchshort < NumberOfColorBoxes; scratchshort++) SetEntryColor(TelInfo->AnsiColors, scratchshort, &(BoxColorData[scratchshort])); DisposeDialog(dptr); } \ No newline at end of file diff --git a/source/config/configure.proto.h b/source/config/configure.proto.h new file mode 100755 index 0000000..2c8ce06 --- /dev/null +++ b/source/config/configure.proto.h @@ -0,0 +1 @@ +void CONFIGUREunload(void); void Cenviron( void); void Cftp( void); Boolean GetApplicationType(OSType *type); void BoundsCheck(long *value, long high, long low); void EditConfigType(ResType ConfigResourceType, Boolean (*EditFunction)()); Boolean EditTerminal(StringPtr PrefRecordNamePtr); Boolean EditSession(StringPtr PrefRecordNamePtr); Boolean EditFTPUser(StringPtr PrefRecordNamePtr); pascal short ColorBoxModalProc( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(ColorBoxModalProc, ModalFilter); pascal void ColorBoxItemProc(DialogPtr theDlg, short itemNo); PROTO_UPP(ColorBoxItemProc, UserItem); short AnsiPrompt(short, short*); \ No newline at end of file diff --git a/source/config/popup.c b/source/config/popup.c new file mode 100755 index 0000000..4ffc4d5 --- /dev/null +++ b/source/config/popup.c @@ -0,0 +1 @@ +/* * popup.c * Code for doing popup menus in our dialog boxes * Credit for this goes to Apple Sample Code and a conglomeration of other code I've seen. * * NCSA Revisions: * 8/92 Telnet 2.6: Initial version. Jim Browne */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Configure #endif #include "popup.h" #include "popup.proto.h" static popup *FindPopup(short item); PROTO_UPP(DrawPopUp, UserItem); popup *Popup; /* Current popup structure array */ static popup *FindPopup( short item) { popup *p = Popup; while (p->item) { if (p->item == item) return p; ++p; } return 0; /* Not found */ } SIMPLE_UPP(DrawPopUp, UserItem); pascal void DrawPopUp(DialogPtr dptr, short item) { char text[256]; char* s; PenState savePen; Rect box, title; FontInfo info; short type, width, newwidth; Handle hdl; popup *p; GetPenState(&savePen); GetFontInfo(&info); GetDItem(dptr, item, &type, &hdl, &box); p = FindPopup(item); title = box; title.right = box.left - 1; title.left = title.right - StringWidth((**(p->h)).menuData) - 2; box.top -= 1; box.left -= 1; box.bottom += 2; box.right += 2; EraseRect(&box); if ((**(p->h)).menuData[0] != 0) InvertRect(&title); /* Get and draw menu title. Get item text. */ if (!p || !p->h) return; s = (char *)(**(p->h)).menuData; /* Menu title */ MoveTo(box.left - StringWidth((StringPtr)s) - 2, box.top + info.ascent); DrawString((StringPtr)s); GetItem(p->h, p->choice, (StringPtr)text); width = (box.right - box.left) - (CharWidth(checkMark) + 2); newwidth = StringWidth((StringPtr)text); if (newwidth > width) { width -= CharWidth(''); do { newwidth -= CharWidth(text[text[0]]); --text[0]; } while (newwidth > width && text[0]); ++text[0]; text[text[0]] = ''; } MoveTo(box.left + CharWidth(checkMark) + 2, box.top + info.ascent); DrawString((StringPtr)text); InsetRect(&box, -1, -1); /* A la Apple Sample Code */ PenSize(1, 1); FrameRect(&box); MoveTo(box.left + 2, box.bottom); LineTo(box.right, box.bottom); LineTo(box.right, box.top + 2); SetPenState(&savePen); } Boolean PopupMousedown( DialogPtr dptr, EventRecord *event, short *i) { short item, choice, type; popup *p; Point clikloc; long chosen; Handle hdl; Rect box, title; Boolean result = FALSE; clikloc = event->where; GlobalToLocal(&clikloc); if ((item = FindDItem(dptr, clikloc) + 1) < 1) return result; p = FindPopup(item); if (!p || !p->h) return result; GetDItem(dptr, item, &type, &hdl, &box); clikloc = topLeft(box); LocalToGlobal(&clikloc); title = box; title.right = box.left - 1; title.left = title.right - StringWidth((**(p->h)).menuData) - 2; box.top -= 1; box.left -= 1; box.bottom += 2; box.right += 2; EraseRect(&box); if ((**(p->h)).menuData[0] != 0) InvertRect(&title); InsertMenu(p->h, hierMenu); SetItemMark(p->h, p->choice, checkMark); CalcMenuSize(p->h); chosen = PopUpMenuSelect(p->h, clikloc.v, clikloc.h, p->choice); SetItemMark(p->h, p->choice, noMark); DeleteMenu((**(p->h)).menuID); if (chosen) { choice = chosen & 0xFFFF; /* Apple sez ignore high word */ if (choice != p->choice) { p->choice = choice; *i = item; result = TRUE; } } DrawPopUp(dptr, item); return result; } void PopupInit( DialogPtr dptr, popup *popups) { popup *p; short w; FontInfo info; short type; Handle hdl; Rect box; Popup = p = popups; SetPort(dptr); GetFontInfo(&info); while (p->item) { if (p->h) { /* Correct user item box. */ GetDItem(dptr, p->item, &type, &hdl, &box); CalcMenuSize(p->h); w = (**(p->h)).menuWidth; w += 16; if (w < (box.right - box.left)) box.right = box.left + w; box.bottom = box.top + info.ascent + info.descent + info.leading; SetDItem(dptr, p->item, type, (Handle)DrawPopUpUPP, &box); } ++p; } } void PopupCleanup(void) { popup *p = Popup; while (p->item) { if (p->h) DisposeMenu(/*(Handle)*/p->h); // Since we're using NewMenu's, we need // to do a DisposeMenu, rather than a // Releaseresource ++p; } } \ No newline at end of file diff --git a/source/config/popup.proto.h b/source/config/popup.proto.h new file mode 100755 index 0000000..61fac60 --- /dev/null +++ b/source/config/popup.proto.h @@ -0,0 +1 @@ + /* popup.c */ Boolean PopupMousedown(DialogPtr dptr, EventRecord *event, short *i); void PopupInit(DialogPtr dptr, popup *popups); void PopupCleanup(void); pascal void DrawPopUp(DialogPtr dptr, short item); \ No newline at end of file diff --git a/source/debug:errors/DlogUtils.c b/source/debug:errors/DlogUtils.c new file mode 100755 index 0000000..1e15845 --- /dev/null +++ b/source/debug:errors/DlogUtils.c @@ -0,0 +1 @@ +/* * DlogUtils.c * Very Useful Dialog Utilities Apple SHOULD have provided in the toolbox... * * Revisions: * 8/92 Telnet 2.6: Initial version. Jim Browne */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Debug #endif #include "DlogUtils.proto.h" #include "netevent.proto.h" #include "movableModal.h" #include "Popup.h" #include "popup.proto.h" pascal short modalProc(DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(modalProc, ModalFilter); pascal short FileHook(short item, DialogPtr theDialog); PROTO_UPP(FileHook, DlgHook); pascal Boolean FolderFilter(FileParam *pbp); PROTO_UPP(FolderFilter, FileFilter); void GetTEText( DialogPtr dptr, short item, Str255 str) { short type; Handle itemh; Rect theRect; GetDItem(dptr, item, &type, &itemh, &theRect); GetIText(itemh, str); } void SetTEText( DialogPtr dptr, short item, Str255 str) { short type; Handle itemh; Rect theRect; GetDItem(dptr, item, &type, &itemh, &theRect); SetIText(itemh, str); } void Hilite( DialogPtr dptr, short item, short value) { short Type; Handle Itemh; Rect Box; GetDItem(dptr, item, &Type, &Itemh, &Box); HiliteControl((ControlHandle)Itemh, value); } void FlipCheckBox( DialogPtr dptr, short item) { short type; Handle itemHdl; Rect box; GetDItem(dptr, item, &type, &itemHdl, &box); SetCtlValue((ControlHandle)itemHdl, (GetCtlValue((ControlHandle)itemHdl) == 0) ? 1 : 0); } void FlipRadioButton( DialogPtr dptr, short item) { short type; Handle itemHdl; Rect box; GetDItem(dptr, item, &type, &itemHdl, &box); SetCtlValue((ControlHandle)itemHdl, (GetCtlValue((ControlHandle)itemHdl) == 0) ? 1 : 0); } void SetCntrl( DialogPtr dptr, short item, short value) { short Type; Handle Itemh; Rect Box; GetDItem(dptr, item, &Type, &Itemh, &Box); SetCtlValue((ControlHandle)Itemh, value); } short GetCntlVal( DialogPtr dptr, short item) { short Type; Handle Itemh; Rect Box; GetDItem(dptr, item, &Type, &Itemh, &Box); return GetCtlValue((ControlHandle)Itemh); } short findPopupMenuItem(MenuHandle theHandle, Str255 name) { short id; Str255 tempName; short numItems; numItems = CountMItems(theHandle); for (id = 1; id < numItems; id++) { GetItem(theHandle,id,tempName); if (EqualString(tempName, name, 0, 0)) break; } return id; } #ifndef NO_UNIVERSAL void UItemAssign( DialogPtr dptr, short item, UserItemUPP proc) #else void UItemAssign( DialogPtr dptr, short item, ProcPtr proc) #endif /* sets the handler for a user item to the specified procedure. */ { Rect ibox; char **ihndl; short typ; GetDItem( dptr, item, &typ, &ihndl, &ibox); SetDItem( dptr, item, typ, (Handle) proc, &ibox); } SIMPLE_UPP(OutlineItem, UserItem); pascal void OutlineItem( DialogPtr dptr, short itm) { Rect ibox; char **ihndl; short typ; short item=itm; GetDItem( dptr, item, &typ, &ihndl, &ibox); PenSize( 3,3); InsetRect( &ibox, -4,-4); FrameRoundRect( &ibox, 16,16); } SIMPLE_UPP(VersionNumber, UserItem); pascal void VersionNumber( DialogPtr dptr, short itm) { Rect ibox; char **ihndl; short typ; short item=itm; VersRecHndl version; Str63 versionString; if ((version = (VersRecHndl) GetResource('vers',1)) != nil) { BlockMove((*version)->shortVersion+*(*version)->shortVersion+1, versionString, *((*version)->shortVersion+*(*version)->shortVersion+1)+1); ReleaseResource((Handle)version); } else *versionString = 0; GetDItem( dptr, item, &typ, &ihndl, &ibox); TextFont( 3); TextSize( 9); MoveTo( ibox.left /* +((ibox.right-ibox.left)/2)-(StringWidth(versionString)/2) */, ibox.bottom-2); DrawString(versionString); } SIMPLE_UPP(modalProc, ModalFilter); pascal short modalProc( DialogPtr dptr, EventRecord *evt, short *item) { UNUSED_ARG(dptr) short keyCode, key; if (evt->what == keyDown) { key = evt->message & charCodeMask; keyCode = (evt->message >>8) & 0xff ; if ((key == 0x0d) || (key == 0x03)) { // 0x0d == return, 0x03 == enter *item = DLOGOk; return(-1); /* BYU LSC - pascal doesn't like "1" as true */ } if (((key == '.') && (evt->modifiers & cmdKey)) || ((key == 0x1b) && (keyCode == 0x35)) ) { // 0x35 == escKey *item = DLOGCancel; return(-1); /* BYU LSC - pascal doesn't like "1" as true */ } } Stask(); return(FALSE); } void FlashButton (DialogPtr theDialog, short item) { short itemType; ControlHandle theItem; Rect itemRect; long myticks; if (item > 0) { GetDItem(theDialog,item,&itemType,(Handle *)&theItem,&itemRect); HiliteControl(theItem,1); Delay(8,&myticks); HiliteControl(theItem,0); } } SIMPLE_UPP(DLOGwOK, ModalFilter); pascal short DLOGwOK( DialogPtr dptr, EventRecord *evt, short *item) { return(MyDLOGfilter(dptr, evt, item, true, false, false)); } SIMPLE_UPP(DLOGwOK_Cancel, ModalFilter); pascal short DLOGwOK_Cancel( DialogPtr dptr, EventRecord *evt, short *item) { return(MyDLOGfilter(dptr, evt, item, true, true, false)); } SIMPLE_UPP(DLOGwOK_Cancel_Popup, ModalFilter); pascal short DLOGwOK_Cancel_Popup( DialogPtr dptr, EventRecord *evt, short *item) { return(MyDLOGfilter(dptr, evt, item, true, true, true)); } // Our standard modal dialog box filter. // RAB BetterTelnet 1.2 - we use StdFilterProc now... SIMPLE_UPP(MyDLOGfilter, ModalFilter); pascal short MyDLOGfilter( DialogPtr dptr, EventRecord *evt, short *item, Boolean hasOK, Boolean hasCancel, Boolean hasPopup) { short keyCode, key, iType; Handle iHndl; Rect iRect; if (hasOK) SetDialogDefaultItem(dptr, 1); if (hasCancel) SetDialogCancelItem(dptr, 2); SetDialogTracksCursor(dptr, 1); /* SetPort(dptr); if (evt->what == keyDown) { key = evt->message & charCodeMask; keyCode = (evt->message >>8) & 0xff ; if (((key == 0x0d) || (key == 0x03)) && hasOK) { // 0x0d == return, 0x03 == enter *item = DLOGOk; // ok FlashButton(dptr, DLOGOk); return(-1); } if ((((key == '.') && (evt->modifiers & cmdKey)) || ((key == 0x1b) && (keyCode == 0x35))) && hasCancel) { // 0x35 == escKey *item = DLOGCancel; FlashButton(dptr, DLOGCancel); return(-1); } } else if ((evt->what == updateEvt) && hasOK) { if ((WindowPtr)evt->message == dptr) { // GetDItem(dptr,DLOGOk,&iType,&iHndl,&iRect); // ok // PenSize(3,3); // InsetRect(&iRect,-4,-4); // FrameRoundRect(&iRect,16,16); } } */ if ((evt->what == mouseDown) && hasPopup) return(PopupMousedown(dptr, evt, item)); Stask(); return CallStdFilterProc(dptr, evt, item); } #if 0 // Our standard modal dialog box filter with code to handle popup user items. pascal short MyDLOGfilterWPopupFilter( DialogPtr dptr, EventRecord *evt, short *item) { short keyCode, key, iType; Handle iHndl; Rect iRect; SetPort(dptr); if (evt->what == keyDown) { key = evt->message & charCodeMask; keyCode = (evt->message >>8) & 0xff ; if ((key == 0x0d) || (key == 0x03)) { // 0x0d == return, 0x03 == enter *item = DLOGOk; // ok FlashButton(dptr, DLOGOk); return(-1); } if (((key == '.') && (evt->modifiers & cmdKey)) || ((key == 0x1b) && (keyCode == 0x35)) ) { // 0x35 == escKey *item = DLOGCancel; FlashButton(dptr, DLOGCancel); return(-1); } } else if (evt->what == updateEvt) { if ((WindowPtr)evt->message == dptr) { GetDItem(dptr,DLOGOk,&iType,&iHndl,&iRect); // ok PenSize(3,3); InsetRect(&iRect,-4,-4); FrameRoundRect(&iRect,16,16); } } if (evt->what == mouseDown) return(PopupMousedown(dptr, evt, item)); Stask(); return(FALSE); } #endif #ifdef NO_UNIVERSAL #define LMSetSFSaveDisk(SFSaveDiskValue) ((* (short *) 0x0214) = (SFSaveDiskValue)) #define LMGetSFSaveDisk() (* (short *) 0x0214) #define LMGetCurDirStore() (* (long *) 0x0398) #define LMSetCurDirStore(CurDirStoreValue) ((* (long *) 0x0398) = (CurDirStoreValue)) #endif void SelectDirectory(short *VRefNum, long *DirID) { Point where; SFReply sfr; LMSetSFSaveDisk( - (*VRefNum)); LMSetCurDirStore(*DirID); StandardFileCenter(&where, WDSET_DLOG); TelInfo->setdir = 0; /* clear dir found flag */ SFPGetFile( where, NULL, FolderFilterUPP, -1, NULL, /* BYU LSC */ FileHookUPP, &sfr, WDSET_DLOG, modalProcUPP); if (TelInfo->setdir) /* we got a dir */ { *VRefNum = - LMGetSFSaveDisk(); *DirID = LMGetCurDirStore(); } } SIMPLE_UPP(FileHook, DlgHook); pascal short FileHook( short item, DialogPtr theDialog) { #ifdef MPW #pragma unused(theDialog) #endif if(item == 11) { /* Set Directory Button */ TelInfo->setdir = 1; return(3); /* pretend we hit cancel, but we didn't */ } else if (item == 12) item = 9; /* these don't count, map to disabled item */ return(item); } SIMPLE_UPP(FolderFilter, FileFilter); pascal Boolean FolderFilter(FileParam *pbp) { if (pbp->ioFlAttrib & 0x0010) return(FALSE); else return(-1); } OSErr SetIndString(StringPtr theStr,short resID,short strIndex) { Handle theRes; /* handle pointing to STR# resource */ short numStrings; /* number of strings in STR# */ short ourString; /* counter to index up to strIndex */ char *resStr; /* string pointer to STR# string to replace */ long oldSize; /* size of STR# resource before call */ long newSize; /* size of STR# resource after call */ unsigned long offset; /* resource offset to str to replace*/ OSErr memError; /* make sure index is in bounds */ if (resID < 1) return -1; /* make sure resource exists */ theRes = GetResource('STR#',resID); if (ResError()!=noErr) return ResError(); if (!theRes || !(*theRes)) return resNotFound; HLock(theRes); HNoPurge(theRes); /* get # of strings in STR# */ BlockMove(*theRes,&numStrings,sizeof(short)); if (strIndex > numStrings) return resNotFound; /* get a pointer to the string to replace */ offset = sizeof(short); resStr = (char *) *theRes + sizeof(short); for (ourString=1; ourStringcontR = ((GrafPtr)win)->portRect; */ /* win->qWindow.refCon = CREATOR; */ return(win); } /* Do a GetNewMyDialog, but make the text small... */ WindowPtr GetNewMySmallDialog(short template,Ptr wStorage,WindowPtr behind, void (*centerFunction)(short)) { short size; DialogPtr dlogptr; size = 9; SetDAFont(applFont); dlogptr = GetNewMyDialog(template,wStorage,behind,centerFunction); SetDAFont(systemFont); if (dlogptr==nil) return 0; SetPort(dlogptr); TextSize(size); TextFont(applFont); { TEHandle teh = ((DialogPeek)dlogptr)->textH; ControlHandle cntl = ((WindowPeek)dlogptr)->controlList; (*teh)->txSize = size; (*teh)->lineHeight = GetLeading(applFont,size); (*teh)->fontAscent = GetAscent(applFont,size); } /* For those dialogs with non-system font buttons, make them inititally invisible and then do a ShowWindow. This keeps the Control Manager from every using Chicago on our turf. -- JMB */ if (! ((((DialogPeek) dlogptr)->window).visible)) ShowWindow(dlogptr); return(dlogptr); } /* Do a GetNewMySmallDialog, but read the item titles from a STR#... */ WindowPtr GetNewMySmallStrangeDialog(short template,Ptr wStorage,WindowPtr behind, void (*centerFunction)(short)) { short size, index, limit, itemType; DialogPtr dlogptr; Handle resource; ControlHandle itemHandle; Rect scratchRect; Str255 scratchPstring; size = 9; SetDAFont(applFont); dlogptr = GetNewMyDialog(template,wStorage,behind,centerFunction); SetDAFont(systemFont); if (dlogptr==nil) return 0; SetPort(dlogptr); TextSize(size); TextFont(applFont); { TEHandle teh = ((DialogPeek)dlogptr)->textH; ControlHandle cntl = ((WindowPeek)dlogptr)->controlList; (*teh)->txSize = size; (*teh)->lineHeight = GetLeading(applFont,size); (*teh)->fontAscent = GetAscent(applFont,size); } /* For those dialogs with non-system font buttons, make them inititally invisible and then do a ShowWindow. This keeps the Control Manager from ever using Chicago on our turf. -- JMB */ if ((resource = GetResource('STR#', template)) != NULL) { short base; Str255 baseStr; GetIndString(baseStr, template, 1); base = atoi(p2cstr(baseStr)); limit = *(short *)(*resource); ReleaseResource(resource); for(index = 2; index <= limit; index++) { GetDItem(dlogptr, index + base, &itemType, (Handle *)&itemHandle, &scratchRect); if ((itemType == 7) && ((**itemHandle).contrlRfCon == 1991)) { GetIndString(scratchPstring, template, index); SetCTitle(itemHandle, scratchPstring); } } } return(dlogptr); } // RAB BetterTelnet 1.2: // Do a GetNewMySmallStrange Dialog, but use Geneva 10, not Geneva 9... WindowPtr GetNewMySmall10StrangeDialog(short template,Ptr wStorage,WindowPtr behind, void (*centerFunction)(short)) { short size, index, limit, itemType; DialogPtr dlogptr; Handle resource; ControlHandle itemHandle; Rect scratchRect; Str255 scratchPstring; size = 10; SetDAFont(applFont); dlogptr = GetNewMyDialog(template,wStorage,behind,centerFunction); SetDAFont(systemFont); if (dlogptr==nil) return 0; SetPort(dlogptr); TextSize(size); TextFont(applFont); { TEHandle teh = ((DialogPeek)dlogptr)->textH; ControlHandle cntl = ((WindowPeek)dlogptr)->controlList; (*teh)->txSize = size; (*teh)->lineHeight = GetLeading(applFont,size); (*teh)->fontAscent = GetAscent(applFont,size); } if ((resource = GetResource('STR#', template)) != NULL) { short base; Str255 baseStr; GetIndString(baseStr, template, 1); base = atoi(p2cstr(baseStr)); limit = *(short *)(*resource); ReleaseResource(resource); for(index = 2; index <= limit; index++) { GetDItem(dlogptr, index + base, &itemType, (Handle *)&itemHandle, &scratchRect); if ((itemType == 7) && ((**itemHandle).contrlRfCon == 1991)) { GetIndString(scratchPstring, template, index); SetCTitle(itemHandle, scratchPstring); } } } return(dlogptr); } // Hide a range of dialog items. RAB BetterTelnet 1.2 void HideDItemRange(DialogPtr dlogp, short startItem, short endItem) { short i; for (i = startItem; i <= endItem; i++) HideDItem(dlogp, i); } // Show a range of dialog items. RAB BetterTelnet 1.2 void ShowDItemRange(DialogPtr dlogp, short startItem, short endItem) { short i; for (i = startItem; i <= endItem; i++) ShowDItem(dlogp, i); } // RAB BetterTelnet 1.2 // Draw the background color over an item. Needed to hide NCSA's brain-dead // fake popup menus. One of these days, I'll rip out popup.c, but until then... void DrawBlank(DialogPtr dlogp, short theItem) { Handle hdl; Rect box; short type; GrafPtr savePort; GetDItem(dlogp, theItem, &type, &hdl, &box); GetPort(&savePort); SetPort(dlogp); InsetRect(&box, -5, -5); EraseRect(&box); SetPort(savePort); } /********************************************************************** * write zeroes over an area of memory **********************************************************************/ void WriteZero(Ptr pointer,long size) { while (size--) *pointer++ = 0; } /********************************************************************** * figure out the appropriate leading for a font **********************************************************************/ short GetLeading(short fontID,short fontSize) { FMInput fInInfo; FMOutput *fOutInfo; /* set up the font input struct */ fInInfo.family = fontID; fInInfo.size = fontSize; fInInfo.face = 0; fInInfo.needBits = FALSE; fInInfo.device = 0; fInInfo.numer.h = fInInfo.numer.v = 1; fInInfo.denom.h = fInInfo.denom.v = 1; /* get the actual info */ fOutInfo = FMSwapFont(&fInInfo); return(((fOutInfo->leading + fOutInfo->ascent + fOutInfo->descent)*fOutInfo->numer.v)/fOutInfo->denom.v); } /********************************************************************** * find ascent font **********************************************************************/ short GetAscent(short fontID,short fontSize) { FMInput fInInfo; FMOutput *fOutInfo; /* set up the font input struct */ fInInfo.family = fontID; fInInfo.size = fontSize; fInInfo.face = 0; fInInfo.needBits = FALSE; fInInfo.device = 0; fInInfo.numer.h = fInInfo.numer.v = 1; fInInfo.denom.h = fInInfo.denom.v = 1; /* get the actual info */ fOutInfo = FMSwapFont(&fInInfo); return((fOutInfo->ascent * fOutInfo->numer.v)/fOutInfo->denom.v); } /************************************************************************ * CenterRectIn - center one rect in another ************************************************************************/ void CenterRectIn(Rect *inner,Rect *outer) { OffsetRect(inner,(outer->left+outer->right-inner->left-inner->right)/2, (outer->top+outer->bottom-inner->top-inner->bottom)/2); } /************************************************************************ * TopCenterRectIn - center one rect in (the bottom of) another ************************************************************************/ void TopCenterRectIn(Rect *inner,Rect *outer) { OffsetRect(inner,(outer->left+outer->right-inner->left-inner->right)/2, outer->top-inner->top); } /************************************************************************ * BottomCenterRectIn - center one rect in (the bottom of) another ************************************************************************/ void BottomCenterRectIn(Rect *inner,Rect *outer) { OffsetRect(inner,(outer->left+outer->right-inner->left-inner->right)/2, outer->bottom-inner->bottom); } /************************************************************************ * ThirdCenterRectIn - center one rect in (the top 1/3 of) another ************************************************************************/ void ThirdCenterRectIn(Rect *inner,Rect *outer) { OffsetRect(inner,(outer->left+outer->right-inner->left-inner->right)/2, outer->top-inner->top + (outer->bottom-outer->top-inner->bottom+inner->top)/3); } void SecondThirdCenterRectIn(Rect *inner,Rect *outer) { OffsetRect(inner,(outer->left+outer->right-inner->left-inner->right)/2, outer->top-inner->top + 2*(outer->bottom-outer->top-inner->bottom+inner->top)/3); } void ThirdCenterDialog(short id) { DialogTHndl dTempl; Rect r = qd.screenBits.bounds; r.top += GetMBarHeight(); dTempl=(DialogTHndl)GetResource('ALRT',id); if (!dTempl) dTempl=(DialogTHndl)GetResource('DLOG',id); if (dTempl) ThirdCenterRectIn(&(*dTempl)->boundsRect,&r); } void SecondThirdCenterDialog(short id) { DialogTHndl dTempl; Rect r = qd.screenBits.bounds; r.top += GetMBarHeight(); dTempl=(DialogTHndl)GetResource('ALRT',id); if (!dTempl) dTempl=(DialogTHndl)GetResource('DLOG',id); if (dTempl) SecondThirdCenterRectIn(&(*dTempl)->boundsRect,&r); } /************************************************************************ * StandardFileCenter - figure out where a stdfile dialog should go ************************************************************************/ void StandardFileCenter(Point *where, short id) { Rect r,in; DialogTHndl dTempl; dTempl=(DialogTHndl)GetResource('ALRT',id); if (!dTempl) dTempl=(DialogTHndl)GetResource('DLOG',id); if (dTempl) { r = (*dTempl)->boundsRect; in = qd.screenBits.bounds; in.top += GetMBarHeight(); ThirdCenterRectIn(&r,&in); where->h = r.left; where->v = r.top; } else { where->h = 100; where->v = 100; } } /* Pascal string utilities */ /* pstrcat - add string 'src' to end of string 'dst' */ void pstrcat(StringPtr dst, StringPtr src) { /* copy string in */ BlockMove(src + 1, dst + *dst + 1, *src); /* adjust length byte */ *dst += *src; } /* pstrinsert - insert string 'src' at beginning of string 'dst' */ void pstrinsert(StringPtr dst, StringPtr src) { /* make room for new string */ BlockMove(dst + 1, dst + *src + 1, *dst); /* copy new string in */ BlockMove(src + 1, dst + 1, *src); /* adjust length byte */ *dst += *src; } void pstrcpy(StringPtr dst, StringPtr src) { BlockMove(src, dst, *src + 1); } \ No newline at end of file diff --git a/source/debug:errors/DlogUtils.proto.h b/source/debug:errors/DlogUtils.proto.h new file mode 100755 index 0000000..f103e93 --- /dev/null +++ b/source/debug:errors/DlogUtils.proto.h @@ -0,0 +1 @@ + /* DlogUtils.c */ void HideDItemRange(DialogPtr, short, short); void ShowDItemRange(DialogPtr, short, short); void DrawBlank(DialogPtr, short); void GetTEText(DialogPtr dptr, short item, Str255 str); void SetTEText(DialogPtr dptr, short item, Str255 str); void Hilite(DialogPtr dptr, short item, short value); void FlipCheckBox(DialogPtr dptr, short item); void FlipRadioButton(DialogPtr dptr, short item); void SetCntrl(DialogPtr dptr, short item, short value); short GetCntlVal(DialogPtr dptr, short item); void FlashButton(DialogPtr theDialog, short item); short findPopupMenuItem(MenuHandle theHandle, Str255 name); void SelectDirectory(short *VRefNum, long *DirID); OSErr SetIndString(StringPtr theStr, short resID, short strIndex); WindowPtr GetNewMyDialog(short template, Ptr wStorage, WindowPtr behind, void (*centerFunction )(short)); WindowPtr GetNewMySmallDialog(short template, Ptr wStorage, WindowPtr behind, void (*centerFunction )(short)); WindowPtr GetNewMySmallStrangeDialog(short template, Ptr wStorage, WindowPtr behind, void (*centerFunction )(short)); WindowPtr GetNewMySmall10StrangeDialog(short template, Ptr wStorage, WindowPtr behind, void (*centerFunction )(short)); void WriteZero(Ptr pointer, long size); short GetLeading(short fontID, short fontSize); short GetAscent(short fontID, short fontSize); void CenterRectIn(Rect *inner, Rect *outer); void TopCenterRectIn(Rect *inner, Rect *outer); void BottomCenterRectIn(Rect *inner, Rect *outer); void ThirdCenterRectIn(Rect *inner, Rect *outer); void ThirdCenterDialog(short template); void SecondThirdCenterDialog(short id); void SecondThirdCenterRectIn(Rect *inner,Rect *outer); void StandardFileCenter(Point *where, short id); void pstrcat(StringPtr dst, StringPtr src); void pstrinsert(StringPtr dst, StringPtr src); void pstrcpy(StringPtr dst, StringPtr src); pascal short DLOGwOK( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(DLOGwOK, ModalFilter); pascal short DLOGwOK_Cancel( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(DLOGwOK_Cancel, ModalFilter); pascal short DLOGwOK_Cancel_Popup( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(DLOGwOK_Cancel_Popup, ModalFilter); pascal short MyDLOGfilter( DialogPtr dptr, EventRecord *evt, short *item, Boolean hasOK, Boolean hasCancel, Boolean hasPopup); PROTO_UPP(MyDLOGfilter, ModalFilter); pascal void OutlineItem(DialogPtr dptr, short itm); PROTO_UPP(OutlineItem, UserItem); pascal void VersionNumber(DialogPtr dptr, short itm); PROTO_UPP(VersionNumber, UserItem); #ifndef NO_UNIVERSAL void UItemAssign( DialogPtr dptr, short item, UserItemUPP proc); #else void UItemAssign( DialogPtr dptr, short item, ProcPtr proc); #endif \ No newline at end of file diff --git a/source/debug:errors/debug.c b/source/debug:errors/debug.c new file mode 100755 index 0000000..486f5e7 --- /dev/null +++ b/source/debug:errors/debug.c @@ -0,0 +1 @@ +// debug.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "vsdata.h" #include "vsinterf.proto.h" // For VSwrite proto #include "wind.h" // For WindRec structure #include "parse.proto.h" // For DemangleLinemodeShort #include "rsinterf.proto.h" // For RSshow proto #include "linemode.proto.h" WindRec *console; // Window Record (VS) for console Window extern WindRec *screens; //#define DEBUG_FACILITIES void InitDebug(void) { #ifdef DEBUG_FACILITIES Rect pRect; TerminalPrefs **termHdl; Boolean scratchBoolean; console = (WindRec *) myNewPtr(sizeof(WindRec)); SetRect(&pRect, 50, 150, 700, 350); // Need to make this a resource! console->vs=RSnewwindow( &pRect, 350, 80, 24, "\p", 1, DefFONT, DefSIZE, TelInfo->debug,0,0,0,0,1, DefFONT, DefSIZE, 0, 0); /* NCSA 2.5 */ console->wind = RSgetwindow( console->vs); ((WindowPeek)console->wind)->windowKind = WIN_CONSOLE; VSwrite(console->vs,"\033[24;0H",1); console->active=0; console->port=0; console->termstate=VTEKTYPE; console->national = 0; /* LU: no translation */ UseResFile(TelInfo->SettingsFile); termHdl = (TerminalPrefs **)Get1NamedResource (TERMINALPREFS_RESTYPE, "\p"); DetachResource((Handle) termHdl); HLock((Handle)termHdl); scratchBoolean = RSsetcolor( console->vs, 0, (*termHdl)->nfcolor); scratchBoolean = RSsetcolor( console->vs, 1, (*termHdl)->nbcolor); scratchBoolean = RSsetcolor( console->vs, 2, (*termHdl)->bfcolor); scratchBoolean = RSsetcolor( console->vs, 3, (*termHdl)->bbcolor); DisposeHandle((Handle)termHdl); #else console = NULL; #endif } void putln( char *cp) { #ifdef DEBUG_FACILITIES short temp; if (!TelInfo->debug) return; temp=strlen(cp); if (temp>80) return; VSwrite(console->vs,cp,temp); VSwrite(console->vs,"\015\012",2); #endif } // Called by HandleKeyDown. Allows me to insert debug info keys all in one place // that can be easily #defined out for release versions. Returns TRUE if // HandleKeyDown should do an immediate return after calling us. Boolean DebugKeys(Boolean cmddwn, unsigned char ascii, short s) { #ifdef DEBUG_FACILITIES if (cmddwn && (ascii == ';')) { // 2.6b16.1 char hackhackhack[80]; strcpy(hackhackhack, "Linemode: "); DemangleLineModeShort(hackhackhack, screens[s].lmodeBits); putln(hackhackhack); return(FALSE); } if (cmddwn && (ascii == 39)) //single quote ShowDebugWindow(); return(FALSE); #endif return (FALSE); } void ShowDebugWindow(void) { #ifdef DEBUG_FACILITIES if (console != NULL) { TelInfo->debug = TRUE; RSshow(console->vs); } #endif } \ No newline at end of file diff --git a/source/debug:errors/debug.h b/source/debug:errors/debug.h new file mode 100755 index 0000000..4209405 --- /dev/null +++ b/source/debug:errors/debug.h @@ -0,0 +1 @@ +extern void putln(char *DebugString); void InitDebug(void); Boolean DebugKeys(Boolean cmddwn, unsigned char ascii, short s); void ShowDebugWindow(void); // Don't undef this if compiling for PPC!!!!!!!! Yeah, sure Audit works w/PPC! ;) //#define SUPPORT_AUDIT \ No newline at end of file diff --git a/source/debug:errors/errors.c b/source/debug:errors/errors.c new file mode 100755 index 0000000..973d2ef --- /dev/null +++ b/source/debug:errors/errors.c @@ -0,0 +1 @@ +/* * errors.c * This file handles all of the error printing in one centralized place. * There are several classes of errors (network, memory, etc). * To Handle an error, just call into DoError with the appropriate * mask and error number. The routine goes from there. * ***************************************************************** * Revisions: * 7/92 Telnet 2.6: Initial version. Scott Bulmahn */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Debug #endif #include "InternalEvents.h" #include "DlogUtils.proto.h" #include "mainseg.proto.h" // for forcequit proto #include "errors.proto.h" #include "telneterrors.h" void loadErrors(void) { } // so that we can load this code high and lock it early /*================================= ERROR HANDLING CODE ============================*/ /* This is the main error handling code. Get all the errors out of the resource */ /* file. The resource number that contains the errors depends on what error */ /* class we are talking about */ void DoError(short code, short level, char *mess1) { char buffer1[256],buffer2[256]; short dItem; DialogPtr dtemp; buffer1[0]=0; /* dont print extraneous garbage to the screen... */ buffer2[0]=0; switch (code & ERRORMASK) { case NET_ERRORCLASS: case MEMORY_ERRORCLASS: case RESOURCE_ERRORCLASS: strncpy( buffer1, geterrstring(code), 255); if (mess1) strncpy(buffer2, mess1, 255); break; case NOCODE: /* no code given, just 2 strings */ strncpy(buffer1, mess1, 255); } if (level ==2 || level ==3) { c2pstr(buffer1); c2pstr(buffer2); ParamText((StringPtr) buffer1,(StringPtr) buffer2,"\p","\p"); dtemp=GetNewDialog(OopsDLOG,(Ptr) 0L,kInFront); /* Put up the error notice */ ModalDialog(DLOGwOKUPP,&dItem); /* Get an event */ DisposDialog(dtemp); /* Take it off.....all off......*/ } } /************************************************************************/ /* geterrstring * returns the string associated with a particular error number * NOTE: strings moved to resource # 23237 * error number is formatted %4d at the beginning of the string */ char *geterrstring(short code) { short i; char s[10]; Str255 ErrorString; /* BYU 2.4.16 */ short errorResource, numberOfErrors; switch (code & ERRORMASK) { case NET_ERRORCLASS: errorResource = NETERROR_RESOURCE_ID; numberOfErrors = NETERROR_RESOURCE_COUNT; break; case MEMORY_ERRORCLASS: errorResource = MEMERROR_RESOURCE_ID; numberOfErrors = MEMERROR_RESOURCE_COUNT; break; case RESOURCE_ERRORCLASS: errorResource = RESERROR_RESOURCE_ID; numberOfErrors = RESERROR_RESOURCE_COUNT; break; } code &= FLAGMASK; sprintf(s,"%4d",code); for (i=1; i <= numberOfErrors; i++) { GetIndString(ErrorString,errorResource,i); p2cstr(ErrorString); if (!strncmp((char *) ErrorString,s,4)) return((char *) ErrorString + 5); } GetIndString(ErrorString, errorResource,1); return((char *) ErrorString+5); } void FatalCancelAlert(short messageID, StringPtr DefaultButtonString, short InternalID, short MacID) { Str255 errorString, numberString, numberString2; DialogPtr theDialog; short Type, ditem = 3; Handle Itemh; Rect Box; GetIndString(errorString, GENERAL_MESSAGES_ID, messageID); NumToString((long)InternalID, numberString); NumToString((long)MacID, numberString2); ParamText(errorString, numberString, numberString2, NULL); theDialog = GetNewMyDialog(FATALCANCEL_ID, NULL, kInFront, (void *)ThirdCenterDialog); GetDItem(theDialog, DLOGOk, &Type, &Itemh, &Box); SetCTitle((ControlHandle)Itemh, DefaultButtonString); ShowWindow(theDialog); while (ditem > 2) ModalDialog(DLOGwOK_CancelUPP, &ditem); DisposeDialog(theDialog); // If the user chose quit, then do it... else return. if (ditem == DLOGCancel) forcequit(); } void FatalAlert(short messageID, short InternalID, short MacID) { Str255 errorString, numberString, numberString2; DialogPtr theDialog; short ditem = 3; GetIndString(errorString, GENERAL_MESSAGES_ID, messageID); NumToString((long)InternalID, numberString); NumToString((long)MacID, numberString2); ParamText(errorString, numberString, numberString2, NULL); theDialog = GetNewMyDialog(FATAL_ID, NULL, kInFront, (void *)ThirdCenterDialog); ShowWindow(theDialog); while (ditem > 1) ModalDialog(DLOGwOKUPP, &ditem); forcequit(); // It's a fatal error, so quit } void OperationFailedAlert(short messageID, short InternalID, short MacID) { Str255 errorString, numberString, numberString2; DialogPtr theDialog; short ditem = 3; GetIndString(errorString, OPFAILED_MESSAGES_ID, messageID); NumToString((long)InternalID, numberString); NumToString((long)MacID, numberString2); ParamText(errorString, numberString, numberString2, NULL); theDialog = GetNewMyDialog(OPFAILED_ID, NULL, kInFront, (void *)ThirdCenterDialog); if (theDialog) ShowWindow(theDialog); else return; while (ditem > 1) ModalDialog(DLOGwOKUPP, &ditem); DisposeDialog(theDialog); } void OutOfMemory(short InternalID) { OperationFailedAlert(OUT_OF_MEMORY, InternalID, 0); } // Returns "TRUE" if default button is hit. Boolean AskUserAlert(short messageID, Boolean CancelIsDefault) { Str255 errorString; DialogPtr theDialog; short Type, ditem = 3; Handle Itemh; Rect Box; GetIndString(errorString, GENERAL_MESSAGES_ID, messageID); ParamText(errorString, NULL, NULL, NULL); theDialog = GetNewMyDialog(ASKUSER_ID, NULL, kInFront, (void *)ThirdCenterDialog); if (!CancelIsDefault) { // We need to swap cancel and ok buttons Str255 temp; GetDItem(theDialog, DLOGOk, &Type, &Itemh, &Box); GetIndString(temp,MISC_STRINGS,OK_STRING); SetCTitle((ControlHandle)Itemh, temp); GetDItem(theDialog, DLOGCancel, &Type, &Itemh, &Box); GetIndString(temp,MISC_STRINGS,CANCEL_STRING); SetCTitle((ControlHandle)Itemh, temp); } ShowWindow(theDialog); while (ditem > 2) ModalDialog(DLOGwOK_CancelUPP, &ditem); DisposeDialog(theDialog); if (ditem == 1) return (TRUE); else return (FALSE); } \ No newline at end of file diff --git a/source/debug:errors/errors.proto.h b/source/debug:errors/errors.proto.h new file mode 100755 index 0000000..5b245a6 --- /dev/null +++ b/source/debug:errors/errors.proto.h @@ -0,0 +1 @@ + /* errors.c */ void DoError(short code, short level, char *mess1); char *geterrstring(short code); void FatalCancelAlert(short messageID, StringPtr DefaultButtonString, short InternalID, short MacID); void FatalAlert(short messageID, short InternalID, short MacID); void OperationFailedAlert(short messageID, short InternalID, short MacID); void OutOfMemory(short InternalID); Boolean AskUserAlert(short messageID, Boolean CancelIsDefault); void loadErrors(void); \ No newline at end of file diff --git a/source/debug:errors/movableModal.c b/source/debug:errors/movableModal.c new file mode 100755 index 0000000..4645025 --- /dev/null +++ b/source/debug:errors/movableModal.c @@ -0,0 +1 @@ +//---------------------------------------------------------------------------------- // File : movableModal.c // Date : April 4, 1994 // Author : Jim Stout // Purpose : Implements movableModal dialogs //------------------------------------------------------------------------------------ // This was originally written by Jim Stout (of Jim's CDEFs fame), but was extensively // hacked by Rolf Braun for BetterTelnet 1.2. The most important change is that // the new version of movableModal.c now calls StdFilterProc() instead of doing // its own filtering. #include "movableModal.h" #include "menuseg.proto.h" #include "tekrgmac.proto.h" #include "rsinterf.proto.h" extern MenuHandle myMenus[]; pascal void movableModalDialog(ModalFilterUPP filter, short *theItem) { EventRecord theEvent; DialogPtr d,thisDialog; GrafPtr oldPort; thisDialog = FrontWindow(); GetPort(&oldPort); SetPort(thisDialog); for(;;) { WaitNextEvent(everyEvent, &theEvent, 20, 0L); if( (*theItem = preFilterEvent(thisDialog, &theEvent)) != 0) break; if (filter != nil) { if (CallModalFilterProc(filter, thisDialog, &theEvent, theItem)) break; } else if (CallStdFilterProc(thisDialog, &theEvent, theItem)) break; if (IsDialogEvent(&theEvent)) if (DialogSelect(&theEvent, &d, theItem)) break; } SetPort(oldPort); } // RAB BetterTelnet 1.2 // For some reason, StdFilterProc() doesn't seem to return a meaningful result. // CallStdFilterProc() is a kludge that works around this. short CallStdFilterProc(DialogPtr dptr, EventRecord *theEvent, short *ditem) { *ditem = 0; StdFilterProc(dptr, theEvent, ditem); if (*ditem != 0) return -1; return 0; } short preFilterEvent(DialogPtr d, EventRecord *theEvent) { short ret=0; switch (theEvent->what) { case mouseDown: ret = doMouseDialog(d,theEvent); /* handle drag etc. of dialog */ break; case diskEvt: diskEvent(theEvent); break; case updateEvt: break; case keyDown: case autoKey: break; } return (ret); } short doMouseDialog(DialogPtr d, EventRecord *theEvent) { WindowPtr theWindow; short partCode, ret=0, theItem, theMenu; long mResult; switch (partCode = FindWindow(theEvent->where,&theWindow)) { case inDrag: if(theWindow == d) { DragWindow(d, theEvent->where, &qd.screenBits.bounds); theEvent->what = nullEvent; } else SysBeep(1); break; case inMenuBar: mResult = MenuSelect(theEvent->where); HiliteMenu(0); theMenu = mResult >> 16; theItem = mResult & 0xFFFF; if ((theMenu != editMenu) && (theMenu != NeditMenu)) break; switch (theItem) { case EDcut: DialogCut(d); break; case EDcopy: DialogCopy(d); break; case EDpaste: DialogPaste(d); break; case EDclear: DialogDelete(d); break; default: break; } break; case inGoAway: if (TrackBox (theWindow, theEvent->where, partCode)) { ret = cancel; theEvent->what = nullEvent; } break; /* add code if you need to deal with these mouseDown events */ case inGrow: break; case inZoomIn: case inZoomOut: break; case inContent: if(theWindow != d) { SysBeep(1); } break; default: break; } return(ret); } void diskEvent(EventRecord *theEvent) { Point diskInitPt; if (HiWord (theEvent->message) != noErr) { diskInitPt.v = 120; diskInitPt.h = 100; DILoad (); (void) DIBadMount (diskInitPt, theEvent->message); DIUnload (); theEvent->what = nullEvent; } } void SetUpMovableModalMenus(void) { DisableItem(myMenus[Fil], 0); DisableItem(myMenus[0], 1); DisableItem(myMenus[Emul], 0); DisableItem(myMenus[Conn], 0); DisableItem(myMenus[Net], 0); DisableItem(myMenus[OpSpec], 0); DisableItem(myMenus[Keypad], 0); DisableItem(myMenus[Function], 0); DisableItem(myMenus[Edit], EDundo); EnableItem(myMenus[Edit], EDcut); EnableItem(myMenus[Edit], EDcopy); EnableItem(myMenus[Edit], EDpaste); EnableItem(myMenus[Edit], EDclear); DisableItem(myMenus[Edit], EDcopyt); DisableItem(myMenus[Edit], EDretype); DisableItem(myMenus[Edit], EDmacros); DisableItem(myMenus[Edit], EDprefs+1); DisableItem(myMenus[Edit], EDprefs+2); DisableItem(myMenus[Edit], EDprefs+4); DisableItem(myMenus[Edit], EDprefs+5); DrawMenuBar(); HiliteMenu(0); } void ResetMenus(void) { short i; EnableItem(myMenus[Fil], 0); EnableItem(myMenus[0], 1); EnableItem(myMenus[Net], 0); EnableItem(myMenus[OpSpec], 0); DisableItem(myMenus[Edit], EDcut); DisableItem(myMenus[Edit], EDclear); EnableItem(myMenus[Edit], EDcopyt); EnableItem(myMenus[Edit], EDretype); EnableItem(myMenus[Edit], EDmacros); EnableItem(myMenus[Edit], EDprefs+1); EnableItem(myMenus[Edit], EDprefs+2); EnableItem(myMenus[Edit], EDprefs+4); EnableItem(myMenus[Edit], EDprefs+5); AdjustMenus(); DoTheMenuChecks(); DrawMenuBar(); if (!FrontWindow()) return; if ((i=RSfindvwind(FrontWindow()))>=0) { if (RSTextSelected(i)) { EnableItem(myMenus[Edit],EDcopy); EnableItem(myMenus[Edit],EDcopyt); } else { DisableItem(myMenus[Edit],EDcopy); DisableItem(myMenus[Edit],EDcopyt); } } else { if ( (i = RGgetdnum(FrontWindow())) >-1) { if (( i = RGgetVS( i)) >-1) { EnableItem(myMenus[Edit],EDcopy); // - enable copying DisableItem(myMenus[Edit],EDcopyt); } } } } \ No newline at end of file diff --git a/source/debug:errors/movableModal.h b/source/debug:errors/movableModal.h new file mode 100755 index 0000000..434d912 --- /dev/null +++ b/source/debug:errors/movableModal.h @@ -0,0 +1 @@ +//---------------------------------------------------------------------------------- // File : movableModal.h // Date : April 4, 1994 // Author : Jim Stout // Purpose : Implements movableModal dialogs //---------------------------------------------------------------------------------- pascal void movableModalDialog(ModalFilterUPP filter, short *theItem); short preFilterEvent(DialogPtr d, EventRecord *theEvent); short doMouseDialog(DialogPtr d, EventRecord *theEvent); void diskEvent(EventRecord *theEvent); short CallStdFilterProc(DialogPtr, EventRecord *, short *); void SetUpMovableModalMenus(void); void ResetMenus(void); \ No newline at end of file diff --git a/source/debug:errors/optsdebug.h b/source/debug:errors/optsdebug.h new file mode 100755 index 0000000..14a04c6 --- /dev/null +++ b/source/debug:errors/optsdebug.h @@ -0,0 +1 @@ +char *telstates[15]={ "SE", "NOP", "DM", "BREAK", "IP", "ABORT", "AYT", "ERASE CHAR", "ERASE LINE", "GO AHEAD", "SB", "WILL", "WONT", "DO", "DONT" }; char *teloptions[256]={ "Binary", /* 0 */ "Echo", "Reconnection", "Supress Go Ahead", "Message Size Negotiation", "Status", /* 5 */ "Timing Mark", "Remote Controlled Trans and Echo", "Output Line Width", "Output Page Size", "Output Carriage-Return Disposition", /* 10 */ "Output Horizontal Tab Stops", "Output Horizontal Tab Disposition", "Output Formfeed Disposition", "Output Vertical Tabstops", "Output Vertical Tab Disposition", /* 15 */ "Output Linefeed Disposition", "Extended ASCII", "Logout", "Byte Macro", "Data Entry Terminal", /* 20 */ "SUPDUP", "SUPDUP Output", "Send Location", "Terminal Type", "End of Record", /* 25 */ "TACACS User Identification", "Output Marking", "Terminal Location Number", "3270 Regime", "X.3 PAD", /* 30 */ "Negotiate About Window Size", "Terminal Speed", "Toggle Flow Control", "Linemode", "X Display Location", /* 35 */ "Environment", "Authentication", "Encrypt", "39", "40","41","42","43","44","45","46","47","48","49", "50","51","52","53","54","55","56","57","58","59", "60","61","62","63","64","65","66","67","68","69", "70","71","72","73","74","75","76","77","78","79", "80","81","82","83","84","85","86","87","88","89", "90","91","92","93","94","95","96","97","98","99", "100","101","102","103","104","105","106","107","108","109", "110","111","112","113","114","115","116","117","118","119", "120","121","122","123","124","125","126","127","128","129", "130","131","132","133","134","135","136","137","138","139", "140","141","142","143","144","145","146","147","148","149", "150","151","152","153","154","155","156","157","158","159", "160","161","162","163","164","165","166","167","168","169", "170","171","172","173","174","175","176","177","178","179", "180","181","182","183","184","185","186","187","188","189", "190","191","192","193","194","195","196","197","198","199", "200","201","202","203","204","205","206","207","208","209", "210","211","212","213","214","215","216","217","218","219", "220","221","222","223","224","225","226","227","228","229", "230","231","232","233","234","235","236","237","238","239", "240","241","242","243","244","245","246","247","248","249", "250","251","252","253","254", "Extended Options List" /* 255 */ }; char *LMoptions[]={ "None", "SYNCH", "BREAK", "IP", "ABORT OUTPUT", "AYT", "EOR", "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", "LNEXT", "XON", "XOFF", "FORW1", "FORW2", "MCL", "MCR", "MCWL", "MCWR", "MCBOL", "MCEOL", "INSRT", "OVER", "ECR", "EWR", "EBOL", "EEOL" }; char *LMflags[]={ "NOSUPPORT", "CANTCHANGE", "VALUE", "DEFAULT" }; char *LMmodes[]={ "EDIT ", "TRAPSIG ", "MODE_ACK ", "SOFT_TAB ", "LIT_ECHO " }; char *LMmodeBits[] ={ "E", "T", "A", "S", "L" }; \ No newline at end of file diff --git a/source/debug:errors/telneterrors.h b/source/debug:errors/telneterrors.h new file mode 100755 index 0000000..d97bb55 --- /dev/null +++ b/source/debug:errors/telneterrors.h @@ -0,0 +1 @@ +/*--------------------------------- Error Classes ------------------------------------*/ #define NOCODE 0 /* no code given, just error strings */ #define FLAGMASK 1023 /* mask all of my flag crap */ #define ERRORMASK 64512 /* mask off all the error crap */ #define NET_ERRORCLASS 2048 /* this bit used for network errors */ #define MEMORY_ERRORCLASS 4096 /* memory allocation errors */ #define RESOURCE_ERRORCLASS 8192 /* problem getting resources */ /*--------------------------------- Error Levels -------------------------------------*/ #define LEVEL1 1 /* informative error */ #define LEVEL2 2 /* tell us about it */ #define LEVEL3 3 /* tell us about it, and hammer Telnet */ #include "errors.proto.h" \ No newline at end of file diff --git a/source/drag/drag.c b/source/drag/drag.c new file mode 100755 index 0000000..b311f1f --- /dev/null +++ b/source/drag/drag.c @@ -0,0 +1 @@ +// drag.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include #include #include "wind.h" #include "maclook.proto.h" // For WindowPtr2WindRecPtr proto #include "rsinterf.proto.h" #include "parse.proto.h" #include "drag.proto.h" #ifdef MPW #pragma segment RS #endif Boolean gHaveDragMgr, gDropcanAcceptItems, gDropcursorInContent, gDropDestCanAcceptItems; #define kScrollbarSize 15 pascal OSErr MyReceiveDropHandler(WindowPtr theWindow, unsigned long handlerRefCon, DragReference theDrag); PROTO_UPP(MyReceiveDropHandler, DragReceiveHandler); pascal OSErr MyTrackingHandler(short message, WindowPtr theWindow, void *handlerRefCon, DragReference theDrag); PROTO_UPP(MyTrackingHandler, DragTrackingHandler); static void LocalToGlobalRgn (RgnHandle rgn); static void OutlineRegion (RgnHandle theRgn); void MyDragInit(void) { OSErr err; long dragMgrAttr; err = Gestalt(gestaltDragMgrAttr, &dragMgrAttr); gHaveDragMgr = (err == noErr) && (dragMgrAttr & (1L << gestaltDragMgrPresent)) != 0; #ifdef powerc gHaveDragMgr = gHaveDragMgr && (dragMgrAttr & (1L << gestaltPPCDragLibPresent)) != 0 && ((long) InstallTrackingHandler) != kUnresolvedSymbolAddress; #endif // If the DragManager is available, install our tracking handlers if (gHaveDragMgr) { err = InstallTrackingHandler(MyTrackingHandlerUPP, nil, nil); if (err == noErr) { // If all is ok so far, install the rcv handler err = InstallReceiveHandler(MyReceiveDropHandlerUPP, nil, nil); if (err != noErr) { // If an error ocurred installing the rcv handler, remove the tracking handler RemoveTrackingHandler(MyTrackingHandlerUPP, nil); } } // If any error occurred, turn off DragManager support if (err != noErr) { gHaveDragMgr = false; } } } /* MyReceiveDropHandler * Called by the Drag Manager when a drop occurs over one of Telnet's windows. */ SIMPLE_UPP(MyReceiveDropHandler, DragReceiveHandler); pascal OSErr MyReceiveDropHandler(WindowPtr theWindow, unsigned long handlerRefCon, DragReference theDrag) { OSErr result,memError; Handle dataH; unsigned short items, index; ItemReference theItem; DragAttributes attributes; Size textSize; short mouseDownModifiers, mouseUpModifiers; WindRecPtr tw; if (!gDropcanAcceptItems || !gDropcursorInContent) return(dragNotAcceptedErr); SetPort(theWindow); // No text yet dataH = nil; GetDragAttributes(theDrag, &attributes); GetDragModifiers(theDrag, 0L, &mouseDownModifiers, &mouseUpModifiers); // Loop through all of the drag items contained in this drag and collect the text // into the accumulation handle. CountDragItems(theDrag, &items); for (index = 1; index <= items; index++) { // Get the item's reference number, so we can refer to it. GetDragItemReferenceNumber(theDrag, index, &theItem); // Try to get the flags for a 'TEXT' flavor. If this returns noErr, // then we know that a 'TEXT' flavor exists in the item. result = GetFlavorDataSize(theDrag, theItem, 'TEXT', &textSize); if (result == noErr) { if (dataH == nil) { // No data yet, create a new handle for accumulation dataH = myNewHandle(textSize); if (dataH == nil) { return memFullErr; // Exit if there is an error } } else { // Append to existing TEXT data memError = mySetHandleSize(dataH, GetHandleSize(dataH) + textSize); // Grow the handle if (memError != noErr) { return memFullErr; // Exit if there is a problem } } // Temporarily lock down the accumlation handle HLock(dataH); // Get the drag data GetFlavorData(theDrag, theItem, 'TEXT', *dataH, &textSize, 0L); // Ok to unlock the accumulation handle HUnlock(dataH); } } // Get the length of all that was accumulated textSize = GetHandleSize(dataH); // If we actually received text, insert it into the destination. if (textSize != 0) { if (attributes & dragHasLeftSenderWindow) { HideDragHilite(theDrag); } HLock(dataH); // Send the text to the window. tw = WindowPtr2WindRecPtr(theWindow); if (tw != nil) { SendStringAsIfTyped(tw, *dataH, textSize); } HUnlock(dataH); } if (dataH != nil) { DisposeHandle(dataH); } return(noErr); } /* MyTrackingHandler * This is the drag tracking handler for windows in the DragText application.*/ SIMPLE_UPP(MyTrackingHandler, DragTrackingHandler); pascal OSErr MyTrackingHandler(short message, WindowPtr theWindow, void *handlerRefCon, DragReference theDrag) { short result; unsigned short count, index; unsigned long flavorFlags, attributes; ItemReference theItem; RgnHandle theRgn, selectionRgn; Point theMouse, localMouse; Rect dragRect; GrafPtr savePort; Boolean inOriginalSelection; if ((message != dragTrackingEnterHandler) && (!gDropcanAcceptItems)) return(noErr); if ((message != dragTrackingEnterHandler) && (message != dragTrackingEnterWindow) && (!gDropDestCanAcceptItems)) return(noErr); GetDragAttributes(theDrag, &attributes); switch (message) { case dragTrackingEnterHandler: // We get called with this message the first time that a drag enters ANY // window in our application. gDropcanAcceptItems = true; // Check to see if all of the drag items contain // TEXT. We only accept a drag if all of the items in the drag can be accepted. CountDragItems(theDrag, &count); for (index = 1; index <= count; index++) { GetDragItemReferenceNumber(theDrag, index, &theItem); result = GetFlavorFlags(theDrag, theItem, 'TEXT', &flavorFlags); if (result != noErr) { gDropcanAcceptItems = false; break; } } break; case dragTrackingEnterWindow: // We receive an EnterWindow message each time a drag enters one of our // application's windows. We initialize our global variables for tracking // the drag through the window. // Assume this window can accept the drag gDropDestCanAcceptItems = true; // If it is not a connection window, it cannot accept a drop. if (((WindowPeek)theWindow)->windowKind != WIN_CNXN) { gDropDestCanAcceptItems = false; break; } // Initially no blue box. gDropcursorInContent = false; break; case dragTrackingInWindow: GetPort(&savePort); SetPort(theWindow); // We receive InWindow messages as long as the mouse is in one of our windows // during a drag. We draw the window highlighting when we get these messages. GetDragMouse(theDrag, &theMouse, 0L); // If we are still in the sender window, check to see if we should draw a blue box. // inOriginalSelection is true if the mouse is still within the confines of the // selected text's original location. This allows the user to cancel a drop by // dropping the text somewhere inside of the original selection. if (attributes & dragInsideSenderWindow) { localMouse = theMouse; GlobalToLocal(&localMouse); selectionRgn = RSGetTextSelRgn(WindowPtr2WindRecPtr(theWindow)->vs); inOriginalSelection = PtInRgn(localMouse, selectionRgn); DisposeRgn(selectionRgn); } else { inOriginalSelection = false; } // Show or hide the window highlighting when the mouse enters or leaves the // text area in our window (we don't want to show the highlighting when // the mouse is over the scroll bars). dragRect = (*(((WindowPeek)theWindow)->contRgn))->rgnBBox; // Subtract out the scrollbars. dragRect.right -= kScrollbarSize; dragRect.bottom -= kScrollbarSize; // If the mouse is in the text area and not in the original selection, // draw the blue box. if (PtInRect(theMouse, &dragRect) && !inOriginalSelection) { if (!gDropcursorInContent) { // Set up the blue box region. GlobalToLocal(&topLeft(dragRect)); GlobalToLocal(&botRight(dragRect)); RectRgn(theRgn = NewRgn(), &dragRect); ShowDragHilite(theDrag, theRgn, true); DisposeRgn(theRgn); } // Remember that we are in a valid drop location. gDropcursorInContent = true; } else { // We have moved out of a valid drop region. if (gDropcursorInContent) { // Hide the box if it was drawn. HideDragHilite(theDrag); } // Remember that we are outside of a valid drop region. gDropcursorInContent = false; } SetPort(savePort); break; case dragTrackingLeaveWindow: HideDragHilite(theDrag); break; case dragTrackingLeaveHandler: break; } return(noErr); } OSErr DragText(EventRecord *ev, Point where, short w, Boolean *dragged) { DragReference dragRef; OSErr err = noErr; Boolean haveDragRef = false; RgnHandle dragRgn = nil; Handle textH = nil; long size; *dragged = false; if (!gHaveDragMgr) { return noErr; } dragRgn = RSGetTextSelRgn(w); if (dragRgn == nil) { return noErr; } if (!PtInRgn(where, dragRgn)) { DisposeRgn(dragRgn); return noErr; } if (!WaitMouseMoved(ev->where)) return noErr; *dragged = true; textH = RSGetTextSel(w, 0); if ((textH == (char **)-1L) || (textH == nil)) { textH = nil; goto exit; } HLock(textH); size = GetHandleSize(textH); err = NewDrag(&dragRef); if (err != noErr) goto exit; haveDragRef = true; err = AddDragItemFlavor(dragRef, 1, 'TEXT', *textH, size, 0); if (err != noErr) goto exit; LocalToGlobalRgn(dragRgn); OutlineRegion(dragRgn); err = TrackDrag(dragRef, ev, dragRgn); if (err != noErr && err != userCanceledErr) goto exit; DisposeRgn(dragRgn); DisposeDrag(dragRef); DisposeHandle(textH); return noErr; exit: if (haveDragRef) DisposeDrag(dragRef); if (dragRgn != nil) DisposeRgn(dragRgn); if (textH != nil) DisposeHandle(textH); return err; } static void LocalToGlobalRgn (RgnHandle rgn) { Point where; SetPt(&where, 0, 0); LocalToGlobal(&where); OffsetRgn(rgn, where.h, where.v); } static void OutlineRegion (RgnHandle theRgn) { RgnHandle tempRgn; tempRgn = NewRgn(); CopyRgn(theRgn, tempRgn); InsetRgn(tempRgn, 1, 1); DiffRgn(theRgn, tempRgn, theRgn); DisposeRgn(tempRgn); } \ No newline at end of file diff --git a/source/drag/drag.proto.h b/source/drag/drag.proto.h new file mode 100755 index 0000000..1df7c5a --- /dev/null +++ b/source/drag/drag.proto.h @@ -0,0 +1 @@ +void MyDragInit(void); OSErr DragText (EventRecord *ev, Point where, short w, Boolean *dragged); \ No newline at end of file diff --git a/source/init/iNetwork.c b/source/init/iNetwork.c new file mode 100755 index 0000000..58c1a54 --- /dev/null +++ b/source/init/iNetwork.c @@ -0,0 +1 @@ +// iNetwork.c // General network initialization routines // Called only by init.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 // NCSA Revisions: // 7/92 Telnet 2.6: Initial version. Jim Browne #ifdef MPW #pragma segment INIT #endif #include "iNetwork.proto.h" #include "InternalEvents.h" #include "network.proto.h" // For Mnetinit proto #include "netevent.proto.h" // For Stask & setblocksize proto #include "bkgr.proto.h" // For StartUpFTP proto extern QHdr gEventsQueue, gEventsFreeQueue; extern short gQueueLength; /*************************************************************************/ /* neteventinit * load up the pointers for the event queue * makes a circular list to follow, required for error messages */ void neteventinit( void) { gEventsFreeQueue.qHead = 0; gEventsFreeQueue.qTail = 0; gEventsFreeQueue.qFlags = 0; gEventsQueue.qHead = 0; gEventsQueue.qTail = 0; gEventsQueue.qFlags = 0; ChangeQueueLength(NEVENTS); gQueueLength = NEVENTS; } /* initnet - init all of the network stuff... */ void initnet( void) { neteventinit(); /* initializes for error messages to count */ networkUPPinit(); //initialize UPP's for TCP callbacks // Mnetinit(); StartUpFTP(); } \ No newline at end of file diff --git a/source/init/iNetwork.proto.h b/source/init/iNetwork.proto.h new file mode 100755 index 0000000..b2380de --- /dev/null +++ b/source/init/iNetwork.proto.h @@ -0,0 +1 @@ +/* Public Function */ void initnet( void); /* Private Function */ void neteventinit(void); \ No newline at end of file diff --git a/source/init/init.c b/source/init/init.c new file mode 100755 index 0000000..792edde --- /dev/null +++ b/source/init/init.c @@ -0,0 +1 @@ + // init.c // Top level of init code & general initialization routines // Called only by main() // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 // Revisions: // 7/92 Telnet 2.6: Initial version. Jim Browne #include "init.proto.h" #include "mainseg.proto.h" /* For forcequit() proto */ #include "iNetwork.proto.h" /* For initnet proto */ #include "macros.proto.h" /* For initmacro proto */ #include "wind.h" /* For WindRec definition */ #include "rsinterf.proto.h" /* For RSgetwindow & RSnewwindow protos */ #include "DlogUtils.proto.h" /* For VersionNumber, UItemAssign, GetNewMyDialog protos */ #include "Sets.proto.h" /* For readconfig proto */ #include "prefs.proto.h" #include "vr.h" /* For VRinit proto */ #include "vsdata.h" #include "vsinterf.proto.h" /* For VSinit proto */ #include "vgtek.proto.h" /* For VGinit proto */ #include "vrrgmac.proto.h" /* For MacRGinit proto */ #include "menuseg.proto.h" #include "translate.proto.h" #include "tnae.h" #include "authencrypt.h" #include "authencrypt.proto.h" #include "ae.proto.h" /* For AppleEvent handlers */ #include "MacBinary.h" #include "binsubs.proto.h" /* For init_mb_files proto */ #include "drag.proto.h" /* For MyDragInit */ #include "IConfig.proto.h" #include "errors.proto.h" #include "telneterrors.h" #include "wdefpatch.proto.h" //for wdefLoad #include "memory.proto.h" #include "AddressXLation.h" /*--------------------------------------------------------------------------------*/ #define CurrentVersion 1 /* Last known SysEnvirons version */ #define HFSPtr ((long *)1014) //extern char *tempspot; /* for temp storage only */ extern Cursor *theCursors[]; extern WindRec *screens, /* Window Records (VS) for : Current Sessions */ *ftplog; /* FTP Log */ extern MenuHandle myMenus[]; OSErr io; SysEnvRec theWorld; /* System Environment record */ short TempItemsVRefNum; long TempItemsDirID; Boolean gKeyboardHasControlKey, gAEavail; short **topLeftCorners; //CCP 2.7: Better window positioning scheme Boolean encryptOK; // true if des encryption routines available Boolean authOK; // true if authentication driver available /* checkCONF - check if the user clicked on a configuration file */ void checkCONF( void) { short i,mess,count; AppFile theFile; FSSpec FileSpec; long junk = 0; if (gAEavail) return; // If AppleEvents are available, we'll get ODOCs #ifndef __powerpc__ CountAppFiles(&mess,&count); if (mess==1) return; if (count<1) return; for(i=1;i<=count;i++) { GetAppFiles(i, &theFile); if (theFile.fType=='CONF') { ClrAppFiles(i); BlockMove(&theFile.fName, FileSpec.name, (*theFile.fName)+1); // pstring copy theFile.fName -> FileSpec.name GetWDInfo(theFile.vRefNum, &FileSpec.vRefNum, &FileSpec.parID, &junk); readconfig(FileSpec); /* BYU LSC */ } } #endif return; } void initEvents( void) { EventRecord myEvent; FlushEvents(everyEvent - diskEvt,0); /* Don't Let 'em get off without seeing it. */ WaitNextEvent(everyEvent, &myEvent, gApplicationPrefs->TimeSlice, 0L); /* WNE always avail */ WaitNextEvent(everyEvent, &myEvent, gApplicationPrefs->TimeSlice, 0L); } /* initftplog - initialize the FTP log window */ void initftplog( void) { Rect prect; TerminalPrefs **termHdl; Boolean scratchBoolean; Str255 tempString; SetRect(&prect, 300,256,512,384); ftplog = (WindRec *) myNewPtr(sizeof(WindRec)); GetIndString(tempString,MISC_STRINGS,FTP_LOG_STRING); ftplog->vs=RSnewwindow( &prect, 50, 80, 24, tempString, 1, DefFONT, DefSIZE, gFTPServerPrefs->ShowFTPlog, 1,0,0,0,0,1, DefFONT, DefSIZE, 0, 0, 1); /* NCSA 2.5 */ ftplog->wind = RSgetwindow( ftplog->vs); ((WindowPeek)ftplog->wind)->windowKind = WIN_LOG; UseResFile(TelInfo->SettingsFile); termHdl = (TerminalPrefs **)Get1NamedResource (TERMINALPREFS_RESTYPE, "\p"); DetachResource((Handle) termHdl); HLock((Handle)termHdl); scratchBoolean = RSsetcolor( ftplog->vs, 0, (*termHdl)->nfcolor); scratchBoolean = RSsetcolor( ftplog->vs, 1, (*termHdl)->nbcolor); scratchBoolean = RSsetcolor( ftplog->vs, 2, (*termHdl)->bfcolor); scratchBoolean = RSsetcolor( ftplog->vs, 3, (*termHdl)->bbcolor); DisposeHandle((Handle)termHdl); VSwrite(ftplog->vs,"\033[24;0H",7); /* Move to bottom of screen */ ftplog->active=0; /* Meaningless */ ftplog->port=0; /* As is this */ ftplog->termstate=VTEKTYPE; } /* copies a specified cursor from a resource into a nonrelocatable block and returns a pointer to it in *result. */ void loadcursor( short CursorID, CursPtr *result) { CursHandle tempcurs; OSErr Err; *result = nil; do /* once */ { tempcurs = GetCursor(CursorID); Err = ResError(); if (Err != noErr) break; *result = (CursPtr) myNewPtr(sizeof(Cursor)); /* BYU LSC */ Err = MemError(); if (Err != noErr) break; LoadResource((Handle) tempcurs); /* in case it was purged */ Err = ResError(); if (Err != noErr) break; BlockMove((Ptr) *tempcurs, (Ptr) *result, sizeof(Cursor)); } while (false); if (Err != noErr) { if (*result != nil) DisposPtr((Ptr) *result); *result = &qd.arrow; } } /* loadcursor */ /* initmcurs - Set up the mouse Cursors * NOTE: debug tells if the bug or the pointer is to be used as dflt.*/ void initmcurs ( short debug) { loadcursor(rWatchCursor, &theCursors[watchcurs]); loadcursor(rCrossCursor, &theCursors[graphcurs]); loadcursor(rPOSCURS, &theCursors[poscurs]); loadcursor(rBeamCursor, &theCursors[textcurs]); loadcursor(rGINCURS, &theCursors[gincurs]); loadcursor(rXferCURS, &theCursors[xfercurs]); if (debug) loadcursor(rDbugCURS, &theCursors[normcurs]); else theCursors[normcurs] = &qd.arrow; SetCursor(theCursors[normcurs]); } /* If a file with the filetype "DBUG" was sent to us, set the debug mode. */ short checkdebug( void) { short i,mess,count; AppFile theFile; long junk = 0; if (gAEavail) return(FALSE); // Don't use CountAppFiles if AppleEvents // are available. #ifndef __powerpc__ CountAppFiles(&mess,&count); if (mess==1) return(FALSE); if (count<1) return(FALSE); for(i=1;i<=count;i++) { GetAppFiles(i, &theFile); if (theFile.fType=='DBUG') { ClrAppFiles(i); return(TRUE); } } return(FALSE); #endif } void InquireEnvironment( void) { OSErr err; Boolean HFSflag; long response; long *HFSp=(long *)1014L; HFSflag= (*HFSp) > 0L; if (!HFSflag) FatalAlert(NEED_HFS_ERR, 0, 0); err = SysEnvirons(CurrentVersion, &theWorld); if (err == envVersTooBig) FatalAlert(SYS_ENVIRON_ERR, 0, 0); if (theWorld.systemVersion < 0x0600) FatalAlert(SYSTEM_VERS_ERR, 0, 0); if (theWorld.machineType < 0) FatalAlert(ROM_VERS_ERR, 0, 0); // If there is a problem w/Gestalt, assume our keyboard has a Control key. // Otherwise, we assume we have a control key unless a Mac or MacPlus keyboard is // present. if ((err = Gestalt(gestaltKeyboardType, &response)) != noErr) gKeyboardHasControlKey = TRUE; else gKeyboardHasControlKey = !( (response == gestaltMacKbd) || (response == gestaltMacAndPad) || (response == gestaltMacPlusKbd) ); { short virtualCode = 0; Ptr KCHRPtr; long newStuff; unsigned long state = 0; virtualCode = 0x10;//this will be a 'y' for Querty KCHRPtr = (Ptr)GetScriptManagerVariable(smKCHRCache); newStuff = KeyTranslate(KCHRPtr,virtualCode,&state); newStuff &= 0xFF; //only look at bottom byte TelInfo->isQuerty = ((unsigned char) newStuff == 'y'); } TelInfo->haveColorQuickDraw = theWorld.hasColorQD; } #define kURLEventClass 'GURL' #define kGetURLEvent 'GURL' void initmac( void) { EventRecord myEvent; short i; long gestaltvalue; OSErr err; Handle tempHandle; InitGraf(&qd.thePort); InitFonts(); InitWindows(); InitMenus(); TEInit(); InitDialogs(0L); /* No resume proc */ InitCursor(); TelInfo = (TelInfoRec *)myNewPtr(sizeof(TelInfoRec)); //tempspot = (char *)myNewPtr(256); tempHandle = myNewHandle(sizeof(ApplicationPrefs)); HLockHi(tempHandle); gApplicationPrefs = (ApplicationPrefs *) *tempHandle; tempHandle = myNewHandle(sizeof(FTPServerPrefs)); HLockHi(tempHandle); gFTPServerPrefs = (FTPServerPrefs *)*tempHandle; screens = (WindRec *)myNewPtr(MaxSess*sizeof(WindRec)); for (i = 0; i < MaxSess; i++) screens[i].active = CNXN_NOTINUSE; topLeftCorners = (short **) myNewHandle(MaxSess*sizeof(short)); InquireEnvironment(); for (i=1;i<12;i++) EventAvail( 0xffff, &myEvent); err = Gestalt(gestaltAppleEventsAttr, &gestaltvalue); // See if AppleEvents are available gAEavail = (!err && ((gestaltvalue >> gestaltAppleEventsPresent) & 0x0001)); if (gAEavail) { if ((err = AEInstallEventHandler(kCoreEventClass,kAEOpenApplication, MyHandleOAppUPP,0,FALSE)) != noErr) FatalAlert(AE_PROBLEM_ERR, 0, 0); if ((err = AEInstallEventHandler(kCoreEventClass,kAEOpenDocuments, MyHandleODocUPP,0,FALSE)) != noErr) FatalAlert(AE_PROBLEM_ERR, 0, 0); if ((err = AEInstallEventHandler(kCoreEventClass,kAEPrintDocuments, MyHandlePDocUPP,0,FALSE)) != noErr) FatalAlert(AE_PROBLEM_ERR, 0, 0); if ((err = AEInstallEventHandler(kCoreEventClass,kAEQuitApplication, MyHandleQuitUPP,0,FALSE)) != noErr) FatalAlert(AE_PROBLEM_ERR, 0, 0); if ((err = AEInstallEventHandler(kURLEventClass,kGetURLEvent, MyHandleGURLUPP,0,FALSE)) != noErr) FatalAlert(AE_PROBLEM_ERR, 0, 0); } TelInfo->screenRect = qd.screenBits.bounds; /* well, they have to be set */ /* somewhere, where else ? */ TelInfo->greyRegion = GetGrayRgn(); SetRect(&TelInfo->dragRect, 4, 24, TelInfo->screenRect.right-4, TelInfo->screenRect.bottom-4); } void DoTheGlobalInits(void) { long junk = 0; ParamBlockRec pb; TelInfo->ScrlLock=0; TelInfo->ftplogon=0; TelInfo->done=0; TelInfo->MacBinary=0; TelInfo->numwindows=0; TelInfo->CONFstate=0; TelInfo->CONFactive=0; TelInfo->SettingsFile=-1; TelInfo->ApplicationFile = CurResFile(); TelInfo->ginon = 0; TelInfo->xferon = 0; TelInfo->graphs = 0; TelInfo->debug = 1; TelInfo->myfronttype = NO_WINDOW; TelInfo->myfrontvs = 0; TelInfo->suspended = FALSE; TelInfo->myfrontwindow = 0L; TelInfo->myfrontRgn = 0L; TelInfo->lastCursor = 0L; TelInfo->DefaultDirVRefNum = -1; TelInfo->FTPClientVRefNum = -1; TelInfo->DefaultDirDirID = 2; TelInfo->FTPClientDirID = 2; TelInfo->macrosModeless = 0; TelInfo->ipModeless = 0; TelInfo->otpword[0] = 0; TelInfo->lastPanelSession = 0; TelInfo->lastPanelTerminal = 0; pb.ioParam.ioNamePtr = 0L; PBGetVol(&pb, FALSE); /* see Tech Note 140 for implications of this */ GetWDInfo(pb.ioParam.ioVRefNum, &(TelInfo->ApFolder.vRefNum), &(TelInfo->ApFolder.parID), &junk); TelInfo->ApFolder.name[0] = 0; FindFolder( kOnSystemDisk, kSystemFolderType, kCreateFolder, &(TelInfo->SysFolder.vRefNum), &(TelInfo->SysFolder.parID)); TelInfo->SysFolder.name[0]=0; FindFolder( kOnSystemDisk, kPreferencesFolderType, kCreateFolder, &(TelInfo->PrefFolder.vRefNum), &(TelInfo->PrefFolder.parID)); TelInfo->PrefFolder.name[0]=0; FindFolder( kOnSystemDisk, kTemporaryFolderType, kCreateFolder, &TempItemsVRefNum, &TempItemsDirID); } void init (void) { DialogPtr dtemp; /* Used for dialog display */ Size junk; long junk2; FlushEvents(everyEvent,0); initmac(); /* initialize Macintosh stuff */ DoTheGlobalInits(); OpenPreferencesFile(); LoadPreferences(); UnloadSeg(&LoadPreferences); dtemp = GetNewMySmallDialog(FirstDLOG, NULL, kInFront, (void *)ThirdCenterDialog); /* opening dialog */ UItemAssign( dtemp, 2, VersionNumberUPP); DrawDialog(dtemp); /* while we init everything */ scriptKbdInit(); TelInfo->debug=checkdebug(); /* must return TRUE or FALSE */ initmcurs(TelInfo->debug); /* init the mouse cursor */ SetCursor(theCursors[watchcurs]); setupmenu(gApplicationPrefs->CommandKeys, dtemp); trInit(myMenus[National]); /* LU: Initialize translation routines; must be done */ /* LU: prior to checkdebug(), since even the debug */ /* LU: output goes through the translation routines. */ if (VSinit(MaxSess+2)) { /* initialize the VS (which also inits RS stuff) */ DoError(104 | MEMORY_ERRORCLASS, LEVEL3, NULL); forcequit(); } //UnloadSeg(&VSinit); //MaxMem(&junk2); InitDebug(); initftplog(); /* allocate/initialize ftp log screen */ VGinit(); /* initialize Virtual Graphics after VS so that */ /* init messages can come on console screen */ VRinit(); /* ICR init */ MacRGinit(); /* ditto */ init_mb_files(); /* Initialize file id's to closed state */ switchMenus(gApplicationPrefs->CommandKeys, 0); TelInfo->done = FALSE; // We're not quitting yet. SetCursor(theCursors[normcurs]); initmacros(); CheckGlobalMacros(); ICinit(); UnloadSegments(); //get all of them at once MaxMem(&junk); //so DNR gets locked high in memory TelInfo->startedTCP = 0; /* io = OpenResolver(NULL); if (io) { DialogPtr theErrDialog; short itemhit = 0; theErrDialog = GetNewDialog(RESOLVERERROR, NULL, kInFront); DrawDialog(theErrDialog); while (!itemhit) ModalDialog(DLOGwOKUPP,&itemhit); DisposDialog(theErrDialog); } */ initnet(); /* initialize network stuff */ updateMenuChecks(); DoTheMenuChecks(); MyDragInit(); checkCONF(); /* Did user click on a set? */ DisposDialog(dtemp); /* Remove the splashbox... */ AdjustMenus(); // and adjust the menus again - RAB BetterTelnet 1.2 UnloadSeg(&init_mb_files);//this allows the authencrypt stuff to be locked above the FTP code segment UnloadSeg(&MyDragInit); MaxMem(&junk2); encryptOK = authOK = true; if (!auth_encrypt_init()) { encryptOK = false; authOK = false; } loadWDEF(); //this just loads the WDEF code in so that it doesnt fragment the heap later loadErrors(); //ditto for the error code initMemoryBuffer(5*1024,30*1024); //this gives use a grow zone for emergency situations } \ No newline at end of file diff --git a/source/init/init.proto.h b/source/init/init.proto.h new file mode 100755 index 0000000..74c892b --- /dev/null +++ b/source/init/init.proto.h @@ -0,0 +1 @@ +/* Public Function */ extern void init (void); /* Private Functions */ extern void checkCONF(void); extern void initEvents(void); extern void initftplog(void); extern void loadcursor(short CursorID, CursPtr *result); extern void initmcurs( short debug); extern void initmac(void); extern void DoTheGlobalInits(void); extern void InquireEnvironment( void); short checkdebug( void); \ No newline at end of file diff --git a/source/macros/macros.c b/source/macros/macros.c new file mode 100755 index 0000000..03350a6 --- /dev/null +++ b/source/macros/macros.c @@ -0,0 +1 @@ +/* * macros.c * originally by Gaige B. Paulsen * * NCSA Revisions: * 7/92 Moved here from event.c and maclook.c by JMB * 11/94 Rewritten to use handle based macros JMB */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Macros #endif #include "network.proto.h" /* For netwrite proto */ #include "wind.h" /* For WindRec definition */ #include "DlogUtils.proto.h" #include "parse.proto.h" #include "event.proto.h" #include "menuseg.proto.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "macros.proto.h" #include "Sets.proto.h" //for CStringToFile /* Macro Defines */ #define MACRO_IP 0xff /* Send IP number here */ #define MACRO_LINES 0xfe /* Send # of lines here */ #define MACRO_MAX_LEN 256 // Maximum macro length extern Cursor *theCursors[]; Handle gMacros[10]; void MACROSunload(void) {} void initmacros( void) { short i; for (i=0; i<10 ; i++) { gMacros[i] = nil; } } void CheckGlobalMacros(void) { OSErr err; FSSpec macroFile; Boolean dummy1, dummy2; err = FSMakeFSSpec(TelInfo->PrefFolder.vRefNum, TelInfo->PrefFolder.parID, "\pBetterTelnet Macros", ¯oFile); if (!err) { ResolveAliasFile(¯oFile, FALSE, &dummy1, &dummy2); loadMacros(¯oFile); } } void SaveGlobalMacros(void) { OSErr err; FSSpec macroFile; Boolean dummy1, dummy2; err = FSMakeFSSpec(TelInfo->PrefFolder.vRefNum, TelInfo->PrefFolder.parID, "\pBetterTelnet Macros", ¯oFile); if ((!err) || (err == -43)) { ResolveAliasFile(¯oFile, FALSE, &dummy1, &dummy2); saveMacros(¯oFile); } } void setmacro(short n, char *s) /* Set macro number to the value of s */ { unsigned char *p; short num, pos, escape; short len; OSErr memError; if (n<0 || n>9) return; // Restrict the maximum length of macros to MACRO_MAX_LEN bytes len = strlen(s)+1; if (len > (MACRO_MAX_LEN - 1)) { len = MACRO_MAX_LEN; s[MACRO_MAX_LEN - 1] = 0; } // If this is an empty string, remove whatever storage might have been used previously // by this macro. if (len == 1) { if (gMacros[n] != nil) { DisposeHandle(gMacros[n]); gMacros[n] = nil; } return; } // If neccessary, create storage for the macro if (gMacros[n] == nil) { gMacros[n] = myNewHandle(len); if (gMacros[n] == nil) { // Memory error return; } } // Adjust the handle to the proper size (may be making an existing macro longer) memError = mySetHandleSize(gMacros[n], len); if (memError != noErr) { return; } HLock(gMacros[n]); p = (unsigned char *)*gMacros[n]; num = 0; pos = 0; escape = 0; while ( *s) { if (escape) { escape = 0; switch (*s) { case 'i': if ( pos >0) { *p++=num; *p++=*s; pos=0; } *p++=MACRO_IP; break; case '#': if ( pos >0) { *p++=num; *p++=*s; pos=0; } *p++=MACRO_LINES; break; case 'n': if ( pos >0) { *p++=num; *p++=*s; pos=0; } *p++='\012'; break; case 'r': if ( pos >0) { *p++=num; *p++=*s; pos=0; } *p++='\015'; break; case 't': if ( pos >0) { *p++=num; *p++=*s; pos=0; } *p++='\t'; break; case '"': if ( pos >0) { *p++=num; *p++=*s; pos=0; } *p++='\"'; break; case '\\': if ( pos >0) { *p++=num; escape=1; pos=0; num=0; } else *p++='\\'; break; default: if (*s <='9' && *s >='0' && pos <3) { num= num*8+( *s -'0'); pos++; escape=1; } else { if (pos ==0 && num==0) { *p++='\\'; *p++=*s; } else { *p++=num; pos= 0; s--; /* back up the buffer. */ } } break; } } else { if (*s=='\\') { num=0; pos=0; escape=1; } else *p++=*s; } s++; } if (pos >0) *p++=num; *p=0; // The resultant macro may be shorter than the input string due to escaped characters. // So, recalculate the length of the macro and resize than handle if neccessary. len = strlen(*gMacros[n])+1; HUnlock(gMacros[n]); mySetHandleSize(gMacros[n], len); } /* setmacro */ short sendmacro(struct WindRec *tw, short n) /* send macro number n */ { char temp[20]; unsigned char *mp, *first; unsigned char myipnum[4]; // Invalid number if (n<0 || n>9) { return -1; } // Empty macro, so do nothing if (gMacros[n] == nil) { return 0; } HLock(gMacros[n]); mp = (unsigned char *)*gMacros[n]; first = mp; netgetip(myipnum); while ( *mp) { if (*mp==MACRO_IP) { SendStringAsIfTyped(tw, (char *)first, mp-first); sprintf(temp,"%d.%d.%d.%d", myipnum[0], myipnum[1], myipnum[2], myipnum[3]); SendStringAsIfTyped(tw, temp, strlen(temp)); first = mp+1; } else if ( *mp==MACRO_LINES) { SendStringAsIfTyped(tw, (char *)first, mp-first); sprintf(temp,"%d", VSgetlines(tw->vs)); SendStringAsIfTyped(tw, temp, strlen(temp)); first = mp+1; } mp++; } SendStringAsIfTyped(tw, (char *)first, mp-first); HUnlock(gMacros[n]); return 0; } short getmacro(short n, char *dest, short room) { unsigned char *s; // Invalid number if (n<0 || n>9) { return -1; } // Empty macro, so return empty string if (gMacros[n] == nil) { *dest = 0; return 0; } s = (unsigned char *)*gMacros[n]; while (*s && (room >= 5)) { // 5 = (size of \xxx) + (terminating \0) switch( *s) { case MACRO_IP : *dest++='\\'; *dest++='i'; room--; break; case MACRO_LINES : *dest++='\\'; *dest++='#'; room--; break; case '\\': *dest++='\\'; *dest++='\\'; room--; break; case '\015': *dest++='\\'; *dest++='r'; room--; break; case '\012': *dest++='\\'; *dest++='n'; room--; break; case '\t': *dest++='\\'; *dest++='t'; room--; break; default: if ( isprint(*s)) *dest++=*s; else { *dest++='\\'; *dest++= (*s / 64) +'0'; *dest++= ((*s % 64) / 8)+'0'; *dest++= (*s % 8) +'0'; room = room - 3; } break; } room--; s++; } *dest = 0; return( 0); } void Macros( void) { DialogPtr dtemp; short dItem; short i; Rect dBox; Str255 temp; Handle MacString[10]; SetCursor(theCursors[normcurs]); if (TelInfo->macrosModeless) { SelectWindow(TelInfo->macrosModeless); return; } dtemp=GetNewMyDialog( MacroDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetDialogDefaultItem(dtemp, 1); SetDialogCancelItem(dtemp, 2); SetDialogTracksCursor(dtemp, 1); for (i=0; i<10; i++) { getmacro(i, (char *) &temp, 256); /* BYU LSC */ c2pstr((char *)temp); /* BYU LSC */ GetDItem( dtemp, i+13, &dItem, &MacString[i], &dBox); SetIText( MacString[i], temp ); } TelInfo->macrosModeless = dtemp; } void MacroDialog(EventRecord *theEvent, short dItem) { DialogPtr dtemp; short i; Rect dBox; Str255 temp; Handle MacString[10]; dtemp = TelInfo->macrosModeless; switch (dItem) { case (MacroExport): for (i=0; i<10; i++) { GetDItem( dtemp, i+13, &dItem, &MacString[i], &dBox); GetIText( MacString[i], temp); p2cstr(temp); setmacro(i, (char *) &temp); } saveMacros((FSSpec *) NULL); break; case 25: for (i=0; i<10; i++) { GetDItem( dtemp, i+13, &dItem, &MacString[i], &dBox); GetIText( MacString[i], temp); p2cstr(temp); setmacro(i, (char *) &temp); } SaveGlobalMacros(); break; case (MacroImport): loadMacros((FSSpec *) NULL); for (i=0; i<10; i++) { getmacro(i, (char *) &temp, 256); c2pstr((char *)temp); GetDItem( dtemp, i+13, &dItem, &MacString[i], &dBox); SetIText( MacString[i], temp ); } break; case 1: updateCursor(1); CloseMacros(); break; case 2: updateCursor(1); DisposeDialog(dtemp); TelInfo->macrosModeless = 0; AdjustMenus(); DoTheMenuChecks(); break; default: if (dItem >2 && dItem <13) { i=dItem-3; getmacro( i, (char *) &temp, 256); /* BYU LSC */ c2pstr((char *)temp); GetDItem( dtemp, i+13, &dItem, &MacString[i], &dBox); SetIText( MacString[i], temp ); /* BYU LSC - Revert the mother */ SelIText( dtemp, i+13, 0, 32767); /* And select it... */ } break; } } void CloseMacros(void) { DialogPtr dtemp; short dItem; short i; Rect dBox; Str255 temp; Handle MacString[10]; dtemp = TelInfo->macrosModeless; for (i=0; i<10; i++) { GetDItem( dtemp, i+13, &dItem, &MacString[i], &dBox); GetIText( MacString[i], temp); p2cstr(temp); setmacro(i, (char *) &temp); } DisposeDialog(TelInfo->macrosModeless); TelInfo->macrosModeless = 0; AdjustMenus(); DoTheMenuChecks(); } void saveMacros(FSSpec *theFile) { SFReply whereReply; short refNum,exist; FSSpec macroFile; long junk; short i; char temp[256], temp2[256]; Point where; OSErr err; Str255 tempString,tempString2; where.h = 100; where.v = 100; GetIndString(tempString,MISC_STRINGS,SAVE_MACROS_STRING); GetIndString(tempString2,MISC_STRINGS,DEFAULT_MACRO_SET_NAME); if (theFile == 0) { SFPutFile( where, tempString, tempString2, 0L, &whereReply); if (!whereReply.good) return; BlockMoveData(&whereReply.fName, macroFile.name, (*whereReply.fName)+1); GetWDInfo(whereReply.vRefNum, ¯oFile.vRefNum, ¯oFile.parID, &junk); } else macroFile = *theFile; if ((err = HCreate(macroFile.vRefNum, macroFile.parID, macroFile.name, kNCSACreatorSignature, 'TEXT')) == dupFNErr) exist = 1; err = HOpenDF(macroFile.vRefNum, macroFile.parID, macroFile.name, fsWrPerm, &refNum); if (exist) SetEOF(refNum, 0L); for (i = 0; i < 10; i++) { getmacro(i, temp, sizeof(temp)); sprintf(temp2, "key%d = \"", i); CStringToFile(refNum,(unsigned char *) temp2); if (*temp) { CStringToFile(refNum,(unsigned char *) temp); } strcpy(temp2,"\"\015"); CStringToFile(refNum,(unsigned char *) temp2); } FSClose(refNum); } void loadMacros(FSSpec *theFile) { SFReply sfr; long junk; SFTypeList typesok = {'TEXT'}; Point where; FSSpec macros; OSErr err; short fileRef; where.h=100;where.v=100; if (theFile == 0L) { SFGetFile( where, NULL, 0L, 1, typesok, 0L, &sfr); if (!sfr.good) return; BlockMove(&sfr.fName, macros.name, (*sfr.fName)+1); GetWDInfo(sfr.vRefNum, ¯os.vRefNum, ¯os.parID, &junk); err = HOpenDF(macros.vRefNum, macros.parID, macros.name, fsRdPerm, &fileRef); } else err = HOpenDF(theFile->vRefNum, theFile->parID, theFile->name, fsRdPerm, &fileRef); if (err != noErr) return; parseMacroFile(fileRef); FSClose(fileRef); } void parseMacroFile(short fileRef) { unsigned char buffer[300],*bufferPtr; unsigned char newMacro[256], *newMacroPtr; OSErr fileErr = noErr; short numMacrosRead = 0; short totalLen,i; long count=1; bufferPtr = buffer; for(i = 0; i < 10; i++) { if (gMacros[i] != NULL) DisposHandle(gMacros[i]); } initmacros(); //sets all handles to null while ((fileErr != eofErr)&&(numMacrosRead < 10)) { fileErr = FSRead(fileRef,&count,bufferPtr); while((*bufferPtr != 0x0D)&&(fileErr != eofErr)) //while not CR or EOF { ++bufferPtr; fileErr = FSRead(fileRef,&count,bufferPtr); } totalLen = bufferPtr-buffer; bufferPtr = buffer; newMacroPtr = newMacro; while((*bufferPtr++ != '"')&&(totalLen != 0)) --totalLen; while((*bufferPtr != '"')&&(totalLen != 0)) { *newMacroPtr++ = *bufferPtr++; --totalLen; } *newMacroPtr = NULL; //make this a C string setmacro(numMacrosRead,(char *)newMacro); bufferPtr = buffer; ++numMacrosRead; } } \ No newline at end of file diff --git a/source/macros/macros.proto.h b/source/macros/macros.proto.h new file mode 100755 index 0000000..d664a59 --- /dev/null +++ b/source/macros/macros.proto.h @@ -0,0 +1 @@ + /* macros.c */ void MACROSunload(void); void initmacros(void); void CheckGlobalMacros(void); void setmacro(short n, char *s); short sendmacro(struct WindRec *tw, short n); short getmacro(short n, char *dest, short room); void Macros(void); void saveMacros(FSSpec *theFile); void SaveGlobalMacros(); void loadMacros(FSSpec *theFile); void parseMacroFile(short fileRef); void CloseMacros(void); void MacroDialog(EventRecord *, short); \ No newline at end of file diff --git a/source/main/Connections.c b/source/main/Connections.c new file mode 100755 index 0000000..470f9cc --- /dev/null +++ b/source/main/Connections.c @@ -0,0 +1 @@ +// Connections.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "telneterrors.h" #include "DlogUtils.proto.h" #include "movableModal.h" #include "wind.h" #include "event.proto.h" #include "rsinterf.proto.h" #include "vsdata.h" #include "vskeys.h" #include "vsinterf.proto.h" #include "vgtek.proto.h" #include "tekrgmac.proto.h" #include "vr.h" #include "vrrgmac.proto.h" #include "network.proto.h" #include "mydnr.proto.h" #include "InternalEvents.h" #include "menuseg.proto.h" #include "maclook.proto.h" #include "parse.proto.h" #include "parse.h" #include "configure.proto.h" #include "netevent.proto.h" #include "linemode.proto.h" #include "mainseg.proto.h" #include "prefs.proto.h" #include "popup.h" #include "popup.proto.h" #include "Connections.proto.h" #include "tnae.h" #include "authencrypt.h" #include "authencrypt.proto.h" #include "wdefpatch.proto.h" #include "LinkedList.proto.h" /* These are all of the variables we need... */ extern Cursor *theCursors[NUMCURS]; /* all the cursors in a nice bundle */ extern WindRec *screens; extern short scrn; extern short nNational; // Number of user-installed translation tables extern MenuHandle myMenus[]; extern Boolean authOK; extern Boolean encryptOK; extern unsigned char *gReadspace; extern short gBlocksize; static short WindByPort(short port); static void setSessStates(DialogPtr dptr); static pascal short POCdlogfilter( DialogPtr dptr, EventRecord *evt, short *item); PROTO_UPP(POCdlogfilter, ModalFilter); void OpenPortSpecial(MenuHandle menuh, short item) { ConnInitParams **theParams; Boolean success; Str255 scratchPstring; GetItem(menuh, item, scratchPstring); theParams = NameToConnInitParams(scratchPstring, TRUE, 0); if (theParams == NULL) { OutOfMemory(1020); return; } success = CreateConnectionFromParams(theParams); } SIMPLE_UPP(POCdlogfilter, ModalFilter); pascal short POCdlogfilter( DialogPtr dptr, EventRecord *evt, short *item) { short key; if (evt->what == keyDown) { key = evt->message & charCodeMask; if ( ((key == 'A') || (key == 'a')) && (evt->modifiers & cmdKey) ) { *item = NCauthenticate; return(-1); } if ( ((key == 'E') || (key == 'e')) && (evt->modifiers & cmdKey) ) { *item = NCencrypt; return(-1); } } if ((evt->what == keyDown) || (evt->what == autoKey)) { key = evt->message & charCodeMask; if (key == 0x1F) { *item = 1000; return(-1); } if (key == 0x1E) { *item = 1001; return(-1); } } // if (evt->what == mouseDown) // return(PopupMousedown(dptr, evt, item)); // RAB BetterTelnet 1.2 - we let StdFilterProc handle this now // return(DLOGwOK_Cancel(dptr, evt, item)); return CallStdFilterProc(dptr, evt, item); } void PresentOpenConnectionDialog(void) { ConnInitParams **InitParams; DialogPtr dptr; short ditem, scratchshort, rolfito; Boolean success; long scratchlong; Str255 scratchPstring, terminalPopupString, scritchPstring; Handle ItemHandle; SessionPrefs **defaultSessHdl,**tempSessHdl; short numberOfTerms, sessMark, requestPort; MenuHandle SessPopupHdl, TermPopupHdl; Rect scratchRect; Point SessPopupLoc; short TerminalIndex, itemNumber = 1; popup TPopup[] = {{NCtermpopup, (MenuHandle) 0, 1}, {0, (MenuHandle) 0, 0}}; Size junk; LinkedListNode *theHead; SetCursor(theCursors[normcurs]); SetUpMovableModalMenus(); dptr = GetNewMyDialog(NewCnxnDLOG, NULL, kInFront, (void *)ThirdCenterDialog); if (dptr == NULL) { OutOfMemory(1000); return; } SetDialogDefaultItem(dptr, 1); SetDialogCancelItem(dptr, 2); SetDialogTracksCursor(dptr, 1); ditem = 3; sessMark = 1; GetIndString(scratchPstring,MISC_STRINGS,SESSION_STRING); SessPopupHdl = NewMenu(668, scratchPstring); if (SessPopupHdl == NULL) { DisposeDialog(dptr); OutOfMemory(1000); return; } UseResFile(TelInfo->SettingsFile); numberOfTerms = Count1Resources(SESSIONPREFS_RESTYPE); theHead = createSortedList(SESSIONPREFS_RESTYPE,numberOfTerms,"\p"); EnableItem(SessPopupHdl, 0); // Make sure the entire menu is enabled addListToMenu(SessPopupHdl, theHead, 1); deleteList(&theHead); SetItemMark(SessPopupHdl, 1, 18); GetDItem(dptr, NCsesspopup, &scratchshort, &ItemHandle, &scratchRect); SessPopupLoc.h = scratchRect.left; SessPopupLoc.v = scratchRect.top; // TermPopupHdl = NewMenu(666, "\p"); // if (TermPopupHdl == NULL) { // DisposeHandle((Handle)SessPopupHdl); // DisposeDialog(dptr); // OutOfMemory(1000); // return; // } SetPort(dptr); LocalToGlobal(&SessPopupLoc); // numberOfTerms = Count1Resources(TERMINALPREFS_RESTYPE); // theHead = createSortedList(TERMINALPREFS_RESTYPE,numberOfTerms,"\p"); // addListToMenu(TermPopupHdl, theHead); // deleteList(&theHead); // TPopup[0].h = TermPopupHdl; // PopupInit(dptr, TPopup); // Get default auth/encrypt settings from default session defaultSessHdl = GetDefaultSession(); HLock((Handle)defaultSessHdl); BlockMove("\p", scratchPstring, 15); GetHostNameFromSession(scratchPstring); if ((**defaultSessHdl).port != 23) { NumToString((unsigned short)(**defaultSessHdl).port, scritchPstring); pstrcat(scratchPstring, "\p:"); if ((**defaultSessHdl).portNegative) pstrcat(scratchPstring, "\p-"); pstrcat(scratchPstring, scritchPstring); } SetTEText(dptr, NChostname, scratchPstring); SelIText(dptr, NChostname, 0, 32767); SetCntrl(dptr, NCauthenticate, (**defaultSessHdl).authenticate && authOK); SetCntrl(dptr, NCencrypt, (**defaultSessHdl).encrypt && encryptOK); if (!authOK) { Hilite( dptr, NCauthenticate, 255); Hilite( dptr, NCencrypt, 255); } // TerminalIndex = findPopupMenuItem(TermPopupHdl,(**defaultSessHdl).TerminalEmulation); // TPopup[0].choice = TerminalIndex; // PopupInit(dptr, TPopup); DisposeHandle((Handle)defaultSessHdl); setSessStates(dptr); while (ditem > NCcancel) { movableModalDialog(POCdlogfilterUPP, &ditem); switch(ditem) { case NCauthenticate: case NCencrypt: GetDItem(dptr, ditem, &scratchshort, &ItemHandle, &scratchRect); if ((**(ControlHandle)ItemHandle).contrlHilite == 0) { // if control not disabled FlipCheckBox(dptr, ditem); setSessStates(dptr); } break; case NCsesspopup: GetDItem(dptr, NCsesspopup, &scratchshort, &ItemHandle, &scratchRect); SessPopupLoc.h = scratchRect.left; SessPopupLoc.v = scratchRect.top; SetPort(dptr); LocalToGlobal(&SessPopupLoc); InsertMenu(SessPopupHdl, hierMenu); CalcMenuSize(SessPopupHdl); scratchlong = PopUpMenuSelect(SessPopupHdl, SessPopupLoc.v, SessPopupLoc.h, 0); DeleteMenu(668); if (scratchlong) { scratchshort = scratchlong & 0xFFFF; // Apple sez ignore the high word SetItemMark(SessPopupHdl, sessMark, 0); sessMark = scratchshort; SetItemMark(SessPopupHdl, sessMark, 18); GetItem(SessPopupHdl, scratchshort, scratchPstring); tempSessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, scratchPstring); if (tempSessHdl) { // TerminalIndex = findPopupMenuItem(TermPopupHdl, // (**tempSessHdl).TerminalEmulation); // TPopup[0].choice = TerminalIndex; // DrawPopUp(dptr, NCtermpopup); //update popup strcpy((char *)scratchPstring, (char *)(**tempSessHdl).hostname); if ((**tempSessHdl).port != 23) { NumToString((unsigned short)(**tempSessHdl).port, scritchPstring); pstrcat(scratchPstring, "\p:"); if ((**tempSessHdl).portNegative) pstrcat(scratchPstring, "\p-"); pstrcat(scratchPstring, scritchPstring); } SetTEText(dptr, NChostname, scratchPstring);//update the hostname SelIText(dptr, NChostname, 0, 32767); SetCntrl(dptr, NCauthenticate, (**tempSessHdl).authenticate && authOK);//update the auth status SetCntrl(dptr, NCencrypt, (**tempSessHdl).encrypt && encryptOK); setSessStates(dptr);//encrypt cant be on w/o authenticate ReleaseResource((Handle)tempSessHdl); } } break; case 1001: SetItemMark(SessPopupHdl, sessMark, 0); sessMark--; if (sessMark < 1) sessMark = CountMItems(SessPopupHdl); SetItemMark(SessPopupHdl, sessMark, 18); GetItem(SessPopupHdl, sessMark, scratchPstring); tempSessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, scratchPstring); if (tempSessHdl) { strcpy((char *)scratchPstring, (char *)(**tempSessHdl).hostname); if ((**tempSessHdl).port != 23) { NumToString((unsigned short)(**tempSessHdl).port, scritchPstring); pstrcat(scratchPstring, "\p:"); if ((**tempSessHdl).portNegative) pstrcat(scratchPstring, "\p-"); pstrcat(scratchPstring, scritchPstring); } SetTEText(dptr, NChostname, scratchPstring);//update the hostname SelIText(dptr, NChostname, 0, 32767); SetCntrl(dptr, NCauthenticate, (**tempSessHdl).authenticate && authOK);//update the auth status SetCntrl(dptr, NCencrypt, (**tempSessHdl).encrypt && encryptOK); setSessStates(dptr);//encrypt cant be on w/o authenticate ReleaseResource((Handle)tempSessHdl); } break; case 1000: SetItemMark(SessPopupHdl, sessMark, 0); sessMark++; if (sessMark > CountMItems(SessPopupHdl)) sessMark = 1; SetItemMark(SessPopupHdl, sessMark, 18); GetItem(SessPopupHdl, sessMark, scratchPstring); tempSessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, scratchPstring); if (tempSessHdl) { strcpy((char *)scratchPstring, (char *)(**tempSessHdl).hostname); if ((**tempSessHdl).port != 23) { NumToString((unsigned short)(**tempSessHdl).port, scritchPstring); pstrcat(scratchPstring, "\p:"); if ((**tempSessHdl).portNegative) pstrcat(scratchPstring, "\p-"); pstrcat(scratchPstring, scritchPstring); } SetTEText(dptr, NChostname, scratchPstring);//update the hostname SelIText(dptr, NChostname, 0, 32767); SetCntrl(dptr, NCauthenticate, (**tempSessHdl).authenticate && authOK);//update the auth status SetCntrl(dptr, NCencrypt, (**tempSessHdl).encrypt && encryptOK); setSessStates(dptr);//encrypt cant be on w/o authenticate ReleaseResource((Handle)tempSessHdl); } break; default: break; } // switch } // while if (ditem == NCcancel) { // PopupCleanup(); DisposeMenu(SessPopupHdl); // drh Bug fix: memory leak DisposeDialog(dptr); ResetMenus(); return; } GetTEText(dptr, NChostname, scratchPstring); if (!Length(scratchPstring)) { // PopupCleanup(); DisposeMenu(SessPopupHdl); // drh Bug fix: memory leak DisposeDialog(dptr); ResetMenus(); return; } // GetItem(TPopup[0].h, TPopup[0].choice, terminalPopupString); // PopupCleanup(); for (rolfito = 0; rolfito < Length(scratchPstring); rolfito++) if (scratchPstring[rolfito + 1] == ':') scratchPstring[rolfito + 1] = ' '; MaxMem(&junk); GetItem(SessPopupHdl, sessMark, scritchPstring); InitParams = NameToConnInitParams(scratchPstring, FALSE, scritchPstring); if (InitParams == NULL) { DisposeMenu(SessPopupHdl); // drh Bug fix: memory leak DisposeDialog(dptr); OutOfMemory(1000); return; } // if ((**InitParams).terminal == NULL) //if this is not null, then the string was an alias, // { // so dont use the popup terminal // (**InitParams).terminal = (TerminalPrefs **) // Get1NamedResource(TERMINALPREFS_RESTYPE,terminalPopupString); // DetachResource((Handle)(**InitParams).terminal); // if (InitParams == NULL) { // OutOfMemory(1000); // DisposeDialog(dptr); // return; // } if (GetCntlVal(dptr, NCauthenticate)) (**(**InitParams).session).authenticate = 1; else (**(**InitParams).session).authenticate = 0; if (GetCntlVal(dptr, NCencrypt)) (**(**InitParams).session).encrypt = 1; else (**(**InitParams).session).encrypt = 0; // } HLock((Handle)InitParams); HLock((Handle)(**InitParams).session); GetTEText(dptr, NCwindowname, scratchPstring); // Copy over the user specified window name. If blank, CreateConnectionFromParams // will copy the hostname to the windowname and append a number. if (Length(scratchPstring)) BlockMove(scratchPstring, (**InitParams).WindowName, (Length(scratchPstring) > 63) ? 64 : (Length(scratchPstring) + 1)); HUnlock((Handle)(**InitParams).session); HUnlock((Handle)InitParams); DisposeMenu(SessPopupHdl); // drh Bug fix: memory leak DisposeDialog(dptr); ResetMenus(); success = CreateConnectionFromParams(InitParams); } // Set states of session checkboxes static void setSessStates (DialogPtr dptr) { if (GetCntlVal(dptr, NCauthenticate)) { Hilite(dptr, NCencrypt, (encryptOK)? 0 : 255); } else { Hilite(dptr, NCencrypt, 255); SetCntrl(dptr, NCencrypt, false); } } void OpenConnectionFromURL(char *host, char *portstring, char *user, char *password) { ConnInitParams **Params; Str255 windowName, tempString; short len; long port; Params = ReturnDefaultConnInitParams(); windowName[0] = 0; // Set up window name if user (and password) given if (user != nil) { GetIndString(windowName, MISC_STRINGS, MISC_USERPRMPT); len = strlen(user); BlockMoveData(user,& windowName[Length(windowName)+1], len); windowName[0] += len; if (password != nil) { GetIndString(tempString, MISC_STRINGS, MISC_PSWDPRMPT); BlockMoveData(&tempString[1], &windowName[Length(windowName)+1], tempString[0]); windowName[0] += tempString[0]; len = strlen(password); BlockMoveData(password, &windowName[Length(windowName)+1], len); windowName[0] += len; } if (windowName[0] != 0) { BlockMoveData(windowName, (**Params).WindowName, Length(windowName)+1); } } CtoPstr(host); BlockMoveData(host, (**(**Params).session).hostname, host[0]+1); if (portstring != nil) { CtoPstr(portstring); StringToNum((StringPtr)portstring, &port); (**(**Params).session).port = port; } (void)CreateConnectionFromParams(Params); } Boolean CreateConnectionFromParams( ConnInitParams **Params) { short scratchshort, fontnumber, otherfnum; static short numWind = 1, stagNum = 1; SessionPrefs *SessPtr; TerminalPrefs *TermPtr; short cur; Str32 numPstring; Str255 scratchPstring; Boolean scratchBoolean; WindRec *theScreen; SetCursor(theCursors[watchcurs]); /* We may be here a bit */ // Check if we have the max number of sessions open if (TelInfo->numwindows == MaxSess) return(FALSE); cur = TelInfo->numwindows; /* Adjust # of windows and get this window's number */ TelInfo->numwindows++; theScreen = &screens[cur]; theScreen->active = CNXN_NOTINUSE; // Make sure it is marked as dead (in case we // abort screen creation after initiating DNR. // That way CompleteConnectionOpening will know // we didn't make it. HLockHi((Handle)Params); HLockHi((Handle)(**Params).terminal); HLockHi((Handle)(**Params).session); SessPtr = *((**Params).session); TermPtr = *((**Params).terminal); if (Length((**Params).WindowName) == 0) { BlockMove((**(**Params).session).hostname, (**Params).WindowName, Length((**(**Params).session).hostname)+1); if (SessPtr->port != 23) { NumToString((unsigned short)SessPtr->port, numPstring); pstrcat((**Params).WindowName, "\p:"); pstrcat((**Params).WindowName, numPstring); } NumToString(numWind++, numPstring); pstrcat((**Params).WindowName, "\p ("); pstrcat((**Params).WindowName, numPstring); // tack the number onto the end. pstrcat((**Params).WindowName, "\p)"); } if (SessPtr->hostname[0] == 0) { OperationFailedAlert(5, 0, 0); DisposeHandle((Handle)(**Params).terminal); DisposeHandle((Handle)(**Params).session); DisposeHandle((Handle)Params); TelInfo->numwindows--; updateCursor(1); return(FALSE); } Mnetinit(); // RAB BetterTelnet 1.0fc4 // Get the IP for the host while we set up the connection if (DoTheDNR(SessPtr->hostname, cur) != noErr) { OutOfMemory(1010); DisposeHandle((Handle)(**Params).terminal); DisposeHandle((Handle)(**Params).session); DisposeHandle((Handle)Params); TelInfo->numwindows--; updateCursor(1); return(FALSE); } DoTheMenuChecks(); theScreen->authenticate = SessPtr->authenticate && authOK; theScreen->encrypt = SessPtr->encrypt && encryptOK; theScreen->aedata = NULL; for (scratchshort = 0; scratchshort < sizeof(theScreen->myopts); scratchshort++) { theScreen->myopts[scratchshort] = 0; theScreen->hisopts[scratchshort] = 0; } theScreen->cannon[0] = '\0'; theScreen->vtemulation = TermPtr->vtemulation; theScreen->forcesave = SessPtr->forcesave; theScreen->eightbit = TermPtr->eightbit; // Is this necessary? theScreen->portNum = SessPtr->port; theScreen->portNegative = SessPtr->portNegative; theScreen->allowBold = TermPtr->allowBold; theScreen->colorBold = TermPtr->colorBold; theScreen->realbold = TermPtr->realbold; theScreen->inversebold = TermPtr->boldFontStyle; theScreen->ignoreBeeps = SessPtr->ignoreBeeps; theScreen->otpauto = SessPtr->otpauto; theScreen->otpnoprompt = SessPtr->otpnoprompt; theScreen->otphex = SessPtr->otphex; theScreen->otpmulti = SessPtr->otpmulti; theScreen->otpsavepass = SessPtr->otpsavepass; theScreen->oldScrollback = TermPtr->oldScrollback; pstrcpy((unsigned char *)theScreen->otppassword, (unsigned char *)SessPtr->otppassword); theScreen->otpautostate = 0; theScreen->otpautobuffer[7] = 0; theScreen->emacsmeta = TermPtr->emacsmetakey; theScreen->Xterm = TermPtr->Xtermsequences; theScreen->remapCtrlD = TermPtr->remapCtrlD; theScreen->keypadmap = TermPtr->remapKeypad; theScreen->port = -1; // netxopen will take care of this theScreen->lineAllow = SessPtr->linemode; if (SessPtr->linemode) //we allow linemode initLinemode(&screens[cur]); GetFNum(TermPtr->DisplayFont, &fontnumber); GetFNum(TermPtr->BoldFont, &otherfnum); theScreen->vs = RSnewwindow(&((**Params).WindowLocation),TermPtr->numbkscroll, TermPtr->vtwidth, TermPtr->vtheight, (**Params).WindowName, TermPtr->vtwrap, fontnumber, TermPtr->fontsize, 0, 1, SessPtr->forcesave,cur, TermPtr->allowBold, TermPtr->colorBold, SessPtr->ignoreBeeps, otherfnum, TermPtr->boldFontSize, TermPtr->boldFontStyle, TermPtr->realbold, TermPtr->oldScrollback); if (theScreen->vs <0 ) { /* we have a problem opening up the virtual screen */ OutOfMemory(1011); DisposeHandle((Handle)(**Params).terminal); DisposeHandle((Handle)(**Params).session); DisposeHandle((Handle)Params); TelInfo->numwindows--; DoTheMenuChecks(); updateCursor(1); return(FALSE); } theScreen->wind = RSgetwindow( theScreen->vs); ((WindowPeek)theScreen->wind)->windowKind = WIN_CNXN; /* * Attach our extra part to display encryption status */ PatchWindowWDEF(theScreen->wind, &screens[cur]); theScreen->arrowmap = TermPtr->emacsarrows; /* MAT -- save our arrow setting */ theScreen->maxscroll= TermPtr->numbkscroll; theScreen->bsdel = SessPtr->bksp; theScreen->crmap = SessPtr->crmap; if (theScreen->portNum != 23) // RAB BetterTelnet 1.0b1, 1.0fc4 theScreen->crmap = SessPtr->alwaysBSD; // RAB BetterTelnet 1.0b1, 1.0fc4 theScreen->tekclear = SessPtr->tekclear; theScreen->ESscroll= TermPtr->clearsave; theScreen->ANSIgraphics = TermPtr->ANSIgraphics; //ANSI graphics, 2.7 theScreen->tektype = SessPtr->tektype; theScreen->wrap = TermPtr->vtwrap; theScreen->pgupdwn = TermPtr->MATmappings; /* JMB: map pgup/pgdwn/home/end? */ theScreen->qprint = 0; theScreen->ignoreff = SessPtr->ignoreff; theScreen->TELstop = SessPtr->skey; theScreen->TELgo = SessPtr->qkey; theScreen->TELip = SessPtr->ckey; BlockMove((Ptr)SessPtr->hostname, theScreen->machine, Length(SessPtr->hostname)+1); BlockMove(TermPtr->AnswerBackMessage, theScreen->answerback, 32); theScreen->termstate = VTEKTYPE; theScreen->naws = 0; /* NCSA - set default NAWS to zero */ theScreen->telstate=0; theScreen->timing=0; theScreen->curgraph=-1; /* No graphics screen */ theScreen->clientflags = 0; /* BYU */ theScreen->kblen = 0; /* nothing in the buffer */ theScreen->enabled = 1; /* Gotta be enabled to start with */ theScreen->Ittype = 0; theScreen->Isga = 0; /* I suppress go ahead = no */ theScreen->Usga = 0; /* U suppress go ahead = no */ theScreen->remote_flow = 0; /* they handle toggling remote_flow */ theScreen->allow_flow = 1; /* initially, we allow flow control */ theScreen->restart_any_flow = 0; /* initially, only an XON turns flow control back on */ theScreen->termstate=VTEKTYPE; /* BYU */ theScreen->echo = 1; theScreen->halfdup = SessPtr->halfdup; /* BYU */ theScreen->national = 0; // Default to no translation. // Now see if the desired translation is available, if not use default translation. for(scratchshort = 1; scratchshort <= nNational+1; scratchshort++) { GetItem(myMenus[National], scratchshort, scratchPstring); if (EqualString(SessPtr->TranslationTable, scratchPstring, TRUE, FALSE)) theScreen->national = scratchshort-1; } // Set up paste related variables theScreen->incount = 0; theScreen->outcount = 0; theScreen->outptr = NULL; theScreen->outhand = NULL; theScreen->outlen = 0; theScreen->pastemethod = SessPtr->pastemethod; theScreen->pastesize = SessPtr->pasteblocksize; scratchBoolean = RSsetcolor( theScreen->vs, 0, TermPtr->nfcolor); scratchBoolean = RSsetcolor( theScreen->vs, 1, TermPtr->nbcolor); scratchBoolean = RSsetcolor( theScreen->vs, 2, TermPtr->bfcolor); scratchBoolean = RSsetcolor( theScreen->vs, 3, TermPtr->bbcolor); addinmenu(cur, (**Params).WindowName, diamondMark); theScreen->active = CNXN_DNRWAIT; // Signal we are waiting for DNR. theScreen->myInitParams = (Handle)Params; HUnlock((Handle)(**Params).terminal); HUnlock((Handle)(**Params).session); // Params handle must stay locked because interrupt level DNR completion routine needs to deref it VSscrolcontrol( theScreen->vs, -1, theScreen->ESscroll); updateCursor(1); /* Done stalling the user */ return(TRUE); } void CompleteConnectionOpening(short dat, ip_addr the_IP, OSErr DNRerror, char *cname) { ConnInitParams **Params; if (screens[dat].active != CNXN_DNRWAIT) return; // Something is wrong. Params = (ConnInitParams **)screens[dat].myInitParams; if (DNRerror == noErr) { HLockHi((Handle)(**Params).session); if ((**(**Params).session).NetBlockSize < 512) (**(**Params).session).NetBlockSize = 512; //less than this can really get messy if (setReadBlockSize((**(**Params).session).NetBlockSize,dat) != 0) //couldnt get read buffer return; screens[dat].port = netxopen(the_IP,(**(**Params).session).port,/* BYU 2.4.15 - open to host name */ gApplicationPrefs->OpenTimeout);/* CCP 2.7 allow user set-able timeouts on open */ // We need the cannonical hostname for Kerberos. Make best guess if // DNR did not return a cname. if (cname) strncpy(screens[dat].cannon, cname, sizeof(screens[dat].cannon)); else strncpy(screens[dat].cannon, (char *)(**(**Params).session).hostname, sizeof(screens[dat].cannon)); screens[dat].cannon[sizeof(screens[dat].cannon)-1] = '\0'; DisposeHandle((Handle)(**Params).session); DisposeHandle((Handle)(**Params).terminal); DisposeHandle((Handle)Params); if (screens[dat].port <0) { /* Handle netxopen fail */ destroyport(dat); } screens[dat].active = CNXN_OPENING; SetMenuMarkToOpeningForAGivenScreen(dat); /* Change status mark */ } else { // We should report the real DNR error here! Str255 errorString, numberString, numberString2, scratchPstring; DialogPtr theDialog; short message, ditem = 3; HLockHi((Handle)(**Params).session); BlockMove((**(**Params).session).hostname, scratchPstring, Length((**(**Params).session).hostname)+1); if (DNRerror >= -23048 && DNRerror <= -23041) message = DNRerror + 23050; else message = 1; GetIndString(errorString,DNR_MESSAGES_ID, message); NumToString((long)0, numberString); NumToString((long)DNRerror, numberString2); ParamText(scratchPstring, errorString, numberString, numberString2); theDialog = GetNewMyDialog(DNRErrorDLOG, NULL, kInFront, (void *)ThirdCenterDialog); ShowWindow(theDialog); while (ditem > 1) ModalDialog(DLOGwOKUPP, &ditem); DisposeDialog(theDialog); DisposeHandle((Handle)(**Params).session); DisposeHandle((Handle)(**Params).terminal); DisposeHandle((Handle)Params); destroyport(dat); } } void ConnectionOpenEvent(short port) { short i; i=WindByPort(port); if (i<0) { return; } screens[ i].active= CNXN_ACTIVE; RSshow( screens[i].vs); /* BYU */ SelectWindow(screens[i].wind); /* BYU */ telnet_send_initial_options(&screens[i]); changeport(scrn,i); /* BYU */ SetMenuMarkToLiveForAGivenScreen(scrn); /* BYU */ DoTheMenuChecks(); /* BYU */ } void ConnectionDataEvent(short port) { short i, cnt; i=WindByPort(port); /* BYU */ if (i<0) {return; } /* BYU */ if (TelInfo->ScrlLock || !screens[i].enabled) /* BYU LSC */ netputuev( CONCLASS, CONDATA, port,0); else { cnt = netread(port,gReadspace,gBlocksize); /* BYU LSC */ parse( &screens[i], gReadspace, cnt); /* BYU LSC */ screens[i].incount += cnt; /* BYU LSC */ } } void ConnectionFailedEvent(short port) { short i; Str255 scratchPstring; netclose( port); i= WindByPort(port); if (i<0) { return; } BlockMove((Ptr)screens[i].machine, (Ptr)scratchPstring, Length(screens[i].machine)+1); PtoCstr(scratchPstring); DoError(807 | NET_ERRORCLASS, LEVEL2, (char *)scratchPstring); if (screens[i].active != CNXN_ACTIVE) destroyport(i); // JMB - 2.6 else removeport(&screens[i]); // JMB - 2.6 } void ConnectionClosedEvent(short port) { short i; i= WindByPort(port); if (i<0) { netclose( port); /* We close again.... */ return; } FlushNetwork(i); /* BYU */ netclose( screens[i].port); /* BYU */ removeport(&screens[i]); /* BYU */ } static short WindByPort(short port) { short i=0; while (inumwindows && (screens[i].port != port || ((screens[i].active != CNXN_ACTIVE) && (screens[i].active != CNXN_OPENING))) ) i++; if (i>=TelInfo->numwindows) { /* BYU */ putln("Can't find a window for the port # in WindByPort"); /* BYU */ if (i==0) i=999; /* BYU */ return(-i); /* BYU */ } /* BYU */ return(i); } void destroyport(short wind) { Handle h; short i, callNoWindow=0; Size junk; WindRecPtr tw; tw = &screens[wind]; SetCursor(theCursors[watchcurs]); /* We may be here a while */ if (tw->active == CNXN_ISCORPSE) { if (tw->curgraph>-1) detachGraphics( tw->curgraph); /* Detach the Tek screen */ if (tw->outlen>0) { tw->outlen=0; /* Kill the remaining send*/ HUnlock( tw->outhand); /* buffer */ HPurge ( tw->outhand); } } if (FrontWindow() == tw->wind) callNoWindow=1; if (tw->aedata != NULL) DisposePtr((Ptr)tw->aedata); /* * Get handle to the WDEF patch block, kill the window, and then * release the handle. */ h = GetPatchStuffHandle(tw->wind, tw); RSkillwindow( tw->vs); SetDefaultKCHR(); if (h) DisposeHandle(h); tw->active = CNXN_NOTINUSE; for (i=wind;inumwindows-1;i++) { screens[i]=screens[i+1]; /* Bump all of the pointers */ RePatchWindowWDEF(screens[i].wind, &screens[i]); /* hack hack hack */ } if (scrn>wind) scrn--; /* Adjust for deleting a lower #ered screen */ TelInfo->numwindows--; /* There are now fewer windows */ extractmenu( wind); /* remove from the menu bar */ DoTheMenuChecks(); MaxMem(&junk); /* BYU 2.4.11 - the call to "NoWindow()" changes "myfrontwindow", which is used by "updateCursor()", so we reversed the order of the following two lines. */ if (callNoWindow) NoWindow(); /* BYU 2.4.11 - Update cursor stuff if front window */ updateCursor(1); /* BYU 2.4.11 - Done stalling the user */ } /* destroyport */ void removeport(WindRecPtr tw) { Str255 scratchPstring; SetCursor(theCursors[watchcurs]); /* We may be here a while */ if (tw->curgraph>-1) detachGraphics( tw->curgraph); /* Detach the Tek screen */ if (tw->outlen>0) { tw->outlen=0; /* Kill the remaining send*/ HUnlock( tw->outhand); /* buffer */ HPurge ( tw->outhand); } if (VSiscapturing(tw->vs)) /* NCSA: close up the capture */ CloseCaptureFile(tw->vs); /* NCSA */ if (VSisprinting(tw->vs)) ClosePrintingFile(tw->vs); if ((gApplicationPrefs->destroyKTickets)&&(numberLiveConnections() == 1))//if this is last window DestroyTickets(); if (!gApplicationPrefs->WindowsDontGoAway) destroyport(findbyVS(tw->vs)); else { Str255 temp; GetWTitle(tw->wind, scratchPstring); sprintf((char *)temp, "(%#s)", scratchPstring); CtoPstr((char *)temp); SetWTitle(tw->wind, temp); tw->port = 32700; tw->active = CNXN_ISCORPSE; } updateCursor(1); /* Done stalling the user */ } /* removeport */ // We recognize the following input string: "xxxx yyyy" // If "xxxx" matches a session name, that session record is used. Otherwise, the default // session record is used with "xxxx" as the DNS hostname. "yyyy", if extant, is // converted to a number. If it is a valid number, it is used as the port to connect to. // WARNING: Do not pass this routing a blank string. (We check this in PresentOpenConnectionDialog.) // // CCP 2.7: If second argument is true, get terminal out of session pref; otherwise set it to NULL ConnInitParams **NameToConnInitParams(StringPtr InputString, Boolean useDefaultTerminal, StringPtr otherPstring) { ConnInitParams **theHdl; SessionPrefs **sessHdl; TerminalPrefs **termHdl; short portRequested, portHack, portNegative; Boolean foundPort, wasAlias = FALSE; long junk; theHdl = (ConnInitParams **)myNewHandleCritical(sizeof(ConnInitParams)); if (theHdl == NULL) return NULL; if (useDefaultTerminal) { foundPort = 0; portNegative = 0; } else foundPort = ProcessHostnameString(InputString, &portRequested, &portNegative); UseResFile(TelInfo->SettingsFile); if (useDefaultTerminal) { sessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, InputString); if (sessHdl == NULL) { // Connect to host xxxx w/default session. portHack = 1; sessHdl = GetDefaultSession(); DetachResource((Handle) sessHdl); HLock((Handle)sessHdl); BlockMove(InputString, (**sessHdl).hostname, 64); } else { portHack = 0; DetachResource((Handle) sessHdl); HLock((Handle)sessHdl); wasAlias = TRUE; } } else { sessHdl = NULL; if (gApplicationPrefs->parseAliases) sessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, InputString); if (sessHdl == NULL) { portHack = 1; sessHdl = (SessionPrefs **)Get1NamedResource(SESSIONPREFS_RESTYPE, otherPstring); DetachResource((Handle) sessHdl); HLock((Handle)sessHdl); BlockMove(InputString, (**sessHdl).hostname, 64); } else { portHack = 0; DetachResource((Handle) sessHdl); HLock((Handle)sessHdl); } } (**theHdl).session = sessHdl; UseResFile(TelInfo->SettingsFile); // if ((useDefaultTerminal)||(wasAlias)) // if (1) // { termHdl = (TerminalPrefs **)Get1NamedResource (TERMINALPREFS_RESTYPE, (**sessHdl).TerminalEmulation); if (termHdl == NULL) termHdl = GetDefaultTerminal(); DetachResource((Handle) termHdl); (**theHdl).terminal = termHdl; // } // else // (**theHdl).terminal = NULL; UnloadSeg(&PREFSUnload); MaxMem(&junk); //swap out space so we can make the new window CCP HUnlock((Handle)sessHdl); ((**theHdl).WindowName)[0] = 0; (**sessHdl).ip_address = 0; if (foundPort) { (**sessHdl).port = portRequested; (**sessHdl).portNegative = portNegative; } else if (portHack) (**sessHdl).port = 23; return(theHdl); } ConnInitParams **ReturnDefaultConnInitParams(void) { ConnInitParams **theHdl; theHdl = (ConnInitParams **)myNewHandle(sizeof(ConnInitParams)); (**theHdl).session = GetDefaultSession(); (**(**theHdl).session).ip_address = 0; (**theHdl).terminal = GetDefaultTerminal(); return(theHdl); } short numberLiveConnections(void) { short i; short liveConnections = 0; for(i = 0; i < MaxSess; i++) if ((screens[i].active == CNXN_ACTIVE)||(screens[i].active == CNXN_OPENING)) liveConnections++; return liveConnections; } \ No newline at end of file diff --git a/source/main/Connections.proto.h b/source/main/Connections.proto.h new file mode 100755 index 0000000..c965d42 --- /dev/null +++ b/source/main/Connections.proto.h @@ -0,0 +1 @@ + /* Connections.c */ void OpenPortSpecial(MenuHandle menuh, short item); void PresentOpenConnectionDialog(void); void OpenConnectionFromURL(char *host, char *portstring, char *user, char *password); Boolean CreateConnectionFromParams(ConnInitParams **Params); void CompleteConnectionOpening(short dat, ip_addr the_IP, OSErr DNRerror, char *cname); void ConnectionOpenEvent(short port); void ConnectionDataEvent(short port); void ConnectionFailedEvent(short port); void ConnectionClosedEvent(short port); void destroyport(short wind); void removeport(WindRecPtr tw); ConnInitParams **NameToConnInitParams(StringPtr, Boolean, StringPtr); // ConnInitParams **NameToConnInitParam2(StringPtr InputString, Boolean useDefaultTerminal); // ConnInitParams **NameToConnInitParam3(StringPtr InputString, Boolean useDefaultTerminal, StringPtr otherPstring); ConnInitParams **ReturnDefaultConnInitParams(void); short numberLiveConnections(void); \ No newline at end of file diff --git a/source/main/event.c b/source/main/event.c new file mode 100755 index 0000000..73bd279 --- /dev/null +++ b/source/main/event.c @@ -0,0 +1 @@ +// event.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * Main Event loop code for NCSA Telnet for the Macintosh * * Called by: * maclook.c * * Revisions: * 7/92 Telnet2.6: added 2 support for 2 global structs, put cursors into * an array, cleaned up defines Scott Bulmahn * */ #ifdef MPW #pragma segment 4 #endif /* * Files for inclusion. */ #include "VSkeys.h" #include "wind.h" #include "event.h" //kxplate moved to its own file (CCP 2.7) #include "errors.proto.h" #include "network.proto.h" #include "mydnr.proto.h" #include "bkgr.proto.h" #include "maclook.proto.h" #include "InternalEvents.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "menuseg.proto.h" #include "vrrgmac.proto.h" #include "tekrgmac.proto.h" #include "rsinterf.proto.h" #include "rsmac.proto.h" #include "event.proto.h" #include "macros.proto.h" /* For setmacro proto */ #include "netevent.proto.h" #include "translate.proto.h" #include "parse.proto.h" #include "linemode.proto.h" #include "Connections.proto.h" #include "mainseg.proto.h" #include "movableModal.h" #include // for EMACS meta hack #include //For Notify User Icon Stuff extern short scrn; extern MenuHandle myMenus[NMENUS]; extern Boolean gKeyboardHasControlKey; extern SysEnvRec theWorld; /* BYU 2.4.12 - System Environment record */ extern WindRec *screens, *ftplog; extern Cursor *theCursors[]; extern Boolean gHaveDragMgr; static gHaveInstalledNotification = 0; NMRec *nRecPtr; #include "event.proto.h" short updateCursor(short force) { static Point lastPoint; static short optwasdown; short optDown; Point myPoint; KeyMap allthekeys; /* Someplace to put the keymap */ if (TelInfo->myfrontwindow) { /* BYU 2.4.11 */ SetPort((GrafPtr) TelInfo->myfrontwindow); /* BYU 2.4.11 */ } else { /* BYU 2.4.11 */ SetCursor(theCursors[normcurs]); /* BYU 2.4.11 */ return(0); /* BYU 2.4.11 */ } GetMouse(&myPoint); GetKeys(allthekeys); optDown = ((unsigned char *)allthekeys)[7] &4; if ( (!force) && EqualPt(myPoint,lastPoint) && (optDown ==optwasdown)) return(0); if (force) TelInfo->lastCursor=0L; if (TelInfo->ginon) { if (TelInfo->lastCursor!= theCursors[gincurs]) { SetCursor(theCursors[gincurs]); TelInfo->lastCursor = theCursors[gincurs]; } return(1); } if (TelInfo->xferon && !optDown) { if (TelInfo->lastCursor!= theCursors[xfercurs]) { SetCursor( theCursors[xfercurs]); TelInfo->lastCursor = theCursors[xfercurs]; } return(1); } switch (TelInfo->myfronttype) { case DEC_WINDOW: if (RSmouseintext( TelInfo->myfrontvs, myPoint)) { if ((PointInSelection(normalize(myPoint, TelInfo->myfrontvs, FALSE), TelInfo->myfrontvs))&&(gHaveDragMgr)) //for Drag ability { if (TelInfo->lastCursor != theCursors[normcurs]) { TelInfo->lastCursor = theCursors[normcurs]; SetCursor(theCursors[normcurs]); } } else { if (optDown) /* Option key is down */ { if (TelInfo->lastCursor != theCursors[poscurs]) { TelInfo->lastCursor = theCursors[poscurs]; SetCursor(theCursors[poscurs]); } } else { if (TelInfo->lastCursor != theCursors[textcurs]) { TelInfo->lastCursor = theCursors[textcurs]; SetCursor(theCursors[textcurs]); } } } } else { if (TelInfo->lastCursor != theCursors[normcurs]) { TelInfo->lastCursor = theCursors[normcurs]; SetCursor(theCursors[normcurs]); } } break; case TEK_WINDOW: LocalToGlobal(&myPoint); if (PtInRgn(myPoint, TelInfo->myfrontwindow->contRgn)) { /* BYU LSC */ if (TelInfo->lastCursor != theCursors[graphcurs]) { TelInfo->lastCursor = theCursors[graphcurs]; SetCursor(theCursors[graphcurs]); } } else { if (TelInfo->lastCursor != theCursors[normcurs]) { TelInfo->lastCursor = theCursors[normcurs]; SetCursor(theCursors[normcurs]); } } break; case NO_WINDOW: default: if (force) { SetCursor( theCursors[normcurs]); TelInfo->lastCursor= theCursors[normcurs]; } } lastPoint=myPoint; optwasdown=optDown; return(0); } void NoWindow( void) { TelInfo->myfrontwindow=0L; TelInfo->myfronttype=NO_WINDOW; TelInfo->myfrontRgn=0L; updateCursor(1); } /* The following code was graciously donated by Marc Tamsky. When are YOU going to donate YOUR code, eh? We know you're reading this. -- JMB */ Boolean CheckPageKeys(short code) /* NCSA: SB */ { /* NCSA: SB */ GrafPtr currFW; // current front window holder // MAT-- short ourW; // virtual screen number holder // MAT--kinda short x1, y2, x2, y1; // coordinates from window // MAT--pulled from scrollproc /* NCSA: SB */ currFW = (GrafPtr)FrontWindow(); // MAT-- ourW = RSfindvwind(currFW); // MAT-- /* NCSA: SB */ switch (code) /* NCSA: SB */ { /* NCSA: SB */ case VSPGUP: /* NCSA: SB */ RScursblinkoff(ourW); VSgetrgn(ourW, &x1, &y1, &x2, &y2); // MAT-- VSscrolback(ourW, y2 - y1); /* scroll a whole windowful */ // MAT-- RScursblinkon(ourW); return TRUE; // MAT-- break; /* NCSA: SB */ /* NCSA: SB */ case VSPGDN: // MAT--121 is a PAGE DOWN. RScursblinkoff(ourW); // MAT--in rsmac.c VSgetrgn(ourW, &x1, &y1, &x2, &y2); // MAT-- VSscrolforward(ourW, y2 - y1); /* scroll a whole windowful */ // MAT-- RScursblinkon(ourW); return TRUE; // MAT-- break; /* NCSA: SB */ // MAT-- case VSHOME: /* NCSA: SB */ RScursblinkoff(ourW); VSscroltop(ourW); /* JMB 2.6 -- Created VSscroltop just for this purpose */ return TRUE; /* NCSA: SB */ break; // MAT-- // MAT-- case VSEND: /* NCSA: SB */ RScursblinkoff(ourW); VSgetrgn(ourW, &x1, &y1, &x2, &y2); // MAT-- VSscrolforward(ourW, 32765); /* scroll a whole BUNCH! */ // MAT-- kludge time again. anyone suggest RScursblinkon(ourW); return TRUE; /* NCSA: SB */ break; // MAT-- a better way to hack this part? } // MAT-- /* NCSA: SB */ return FALSE; /* NCSA: SB - we didnt handle event, let us know about it */ } /* NCSA: SB */ /* HandleKeyDown -- By now, we have already gotten a keypress signal from the event handler, so we just need to interpret it. Get the raw code and ascii value, and then decide what to do with it. */ void HandleKeyDown(EventRecord theEvent,struct WindRec *tw) { unsigned char ascii, code; unsigned char sendch; long menuEquiv; short enterkey = 0; Boolean commanddown, optiondown, controldown,shifted; ObscureCursor(); ascii = theEvent.message & charCodeMask; code = ((theEvent.message & keyCodeMask) >> 8); commanddown = ((theEvent.modifiers & cmdKey) != 0); optiondown = ((theEvent.modifiers & optionKey) != 0); controldown = ((theEvent.modifiers & controlKey) != 0); shifted = ((theEvent.modifiers & shiftKey) != 0); if (DebugKeys(commanddown, ascii, tw->vs)) return; if ((tw->emacsmeta == 2)&&(optiondown)) goto emacsHack; //ha ha hack hack if ((code == 0x34)&&(ascii == 3)) //fix for PowerBook 540 bad KCHR ascii = 13; //(map control-c to return) else if ((controldown)&&(shifted)&&(ascii == '2')) ascii = 0;//fix bad KCHR control-@ else if ((controldown)&&(shifted)&&(ascii == '6')) ascii = 0x1e;//fix bad KCHR control-^ if (commanddown) { if (gApplicationPrefs->CommandKeys) { //if optioned, retranslate so we can do menu commands if (optiondown) { short virtualCode = 0; Ptr KCHRPtr; long newStuff; unsigned long state = 0; short modifiersCopy; modifiersCopy = theEvent.modifiers; virtualCode = (short)(code); theEvent.modifiers &= (shiftKey); //turn off option virtualCode |= theEvent.modifiers; KCHRPtr = (Ptr)GetScriptManagerVariable(smKCHRCache); newStuff = KeyTranslate(KCHRPtr,virtualCode,&state); newStuff &= 0xFF; //only look at bottom byte ascii = (unsigned char) newStuff; theEvent.modifiers = modifiersCopy; //reset option state } menuEquiv = MenuKey(ascii); //handle menu keys first if ((menuEquiv & 0xFFFF0000) != 0) { HandleMenuCommand(menuEquiv,theEvent.modifiers); return; } if ((TelInfo->numwindows < 1) || (tw->active != CNXN_ACTIVE)) return; // Check for EMACS meta key. if ((tw->emacsmeta)&&(controldown)) { unsigned char temp[2]; if (ascii <= 32) //control changed the ascii value ascii |= 0x40; //move back to a non-control if ((shifted)||(ascii == 0x5f)) //so we can get meta - { short virtualCode = 0; Ptr KCHRPtr; long newStuff; unsigned long state = 0; virtualCode = (short)(code); theEvent.modifiers &= (shiftKey); //turn of command virtualCode |= theEvent.modifiers; KCHRPtr = (Ptr)GetScriptManagerVariable(smKCHRCache); newStuff = KeyTranslate(KCHRPtr,virtualCode,&state); newStuff &= 0xFF; //only look at bottom byte ascii = (unsigned char) newStuff; } emacsHack: //if the option key KCHR is installled, we will get the right ascii value if ((tw->clientflags & PASTE_IN_PROGRESS)&&(tw->pastemethod)) //queue this { tw->kbbuf[tw->kblen++] = ESC; tw->kbbuf[tw->kblen++] = ascii; return; } if (tw->kblen > 0) { netwrite( tw->port,tw->kbbuf,tw->kblen); tw->kblen=0; } temp[0] = ESC; temp[1] = ascii; if (tw->echo && tw->halfdup) parse(tw,temp,2); netpush(tw->port); netwrite(tw->port,temp,2); return; } else if (ascii >='0' && ascii <='9' ) //now look for macros { sendmacro(tw, ascii-'0'); return; } else if (!((ascii == '`' && gApplicationPrefs->RemapTilde)||(code == BScode))) return; } else //no command key menus { if ((TelInfo->numwindows < 1) || (tw->active != CNXN_ACTIVE)) return; else if (!gKeyboardHasControlKey) //map command to control { ascii &= 0x1f; commanddown = FALSE; } else return; } } else if ((TelInfo->numwindows < 1) || (tw->active != CNXN_ACTIVE)) return; if (((ascii == '@') || (ascii == 32))&& controldown) //this, along with the fixed KCHR that mapps a Cntl-@ to ascii = NULL; //a @, takes care of Apple not posting NULL key values // map '`' to ESC if needed if (ascii == '`' && gApplicationPrefs->RemapTilde && !(commanddown)) ascii = ESC; // map Del to ^D if the user wants it if ((code == 0x75) && tw->remapCtrlD) { code = 0x34; ascii = 4; } if (code == BScode) //handle mapping BS to DEL, flipping on option { if (tw->bsdel) if ((optiondown)||(commanddown)) ascii = BS; else ascii = DEL; else if ((optiondown)||(commanddown)) ascii = DEL; else ascii = BS; } if (!tw->enabled) //if we are suspended, and we have negotiated restart_any { //with the host, then enable the screen on anything but an XOFF. We will //eat the XON later if that is what this is. (RFC 1372 --CCP 2.7) if ((tw->restart_any_flow)&&(ascii != tw->TELstop)) tw->enabled = 1; } /* Remap PgUp,PgDown,Home,End if the user wants it that way */ if ((tw->pgupdwn && (code >= KPlowest))||(!tw->vtemulation)) //do page up/down on vt100 if (CheckPageKeys(code)) return; if (code >= KPlowest) /* BYU - Handle Keypad */ { if (theWorld.keyBoardType == envStandADBKbd) //standard MacII keyboard has keypad +,- { // codes switched if (code == 0x45) code = 0x4e; else if (code == 0x4e) code = 0x45; } if ((tw->vtemulation)||(code >= 0x7B)||(code <= 0x60)) //fkeys dont work in vt100 { if ((!tw->keypadmap)||(code == 0x4c)||(code > 0x51)||(code < 0x43)) //dont remap operators { if ((tw->clientflags & PASTE_IN_PROGRESS)&&(tw->pastemethod)) //queue this { tw->kbbuf[tw->kblen++] = 0; tw->kbbuf[tw->kblen++] = kpxlate[shifted][code - KPlowest]; return; } if (tw->kblen > 0) { netwrite( tw->port,tw->kbbuf,tw->kblen); tw->kblen=0; } ascii = kpxlate[shifted][code - KPlowest]; // Should we check here for ascii being zero? VSkbsend(tw->vs, (unsigned char) ascii, tw->echo); return; } } else // we dont handle function keys in vt100 return; } // Handle whatever mapping is needed. mac_nat(&ascii, tw->national); /* LU/PM: Convert char from mac to nat */ if ((tw->clientflags & PASTE_IN_PROGRESS)&&(tw->pastemethod)) //queue this { tw->kbbuf[tw->kblen++] = ascii; return; } if (tw->lmode) // Some form of linemode is active; we dont touch it after them { process_key(ascii,tw); return; } // BSD-like mapping.... if we don't want this, set chars to zero and it wont work //CCP 2.7: this is now AFTER the linemode stuff, so that linemode can handle it differently if (ascii == tw->TELstop) { if (tw->allow_flow) //remote flow control can turn this off { tw->enabled = 0; return; } } if (ascii == tw->TELgo) { if (tw->allow_flow) //remote flow control can turn this off { tw->enabled = 1; return; } } if (ascii == tw->TELip) { char *tellUser = "\n\r[Interrupt Process]\n\r"; parse(tw,(unsigned char *)tellUser,23); netpush(tw->port); netwrite(tw->port, "\377\364",2); //IAC IP netpush(tw->port); netwrite(tw->port, "\377\375\006",3); // send Do TM tw->timing = 1; // set emulate to TMwait return; } if (tw->echo && !tw->halfdup) // Handle klude-linemode { if (ascii>31 && ascii <127 && code < KPlowest) { if (tw->kblen < (MAXKB -1)) /* Add to buffer if not full */ tw->kbbuf[tw->kblen++] = ascii; else { /* if full send buffer */ netwrite( tw->port, tw->kbbuf,tw->kblen); tw->kbbuf[0] = ascii; tw->kblen=1; } sendch=ascii; parse(tw, &sendch, 1); return; /* OK, were set...*/ } //end if printable key else { if ( code == BScode ) { if (tw->kblen>0) { tw->kblen--; parse(tw,(unsigned char *) "\010 \010",3); /* BYU LSC */ } return; } else if (ascii == KILLCHAR) { while (tw->kblen >0) { parse(tw,(unsigned char *) "\010 \010",3); /* BYU LSC */ tw->kblen--; } return; } else if (code port, tw->kbbuf,tw->kblen); /* if full send buffer */ tw->kblen=0; if (ascii !=CR) { sendch='@'+ascii; parse(tw,(unsigned char *) "^",1); /* BYU LSC */ parse(tw, &sendch, 1); } } }//end else non-printable key }//end if klude-linemode if (ascii == '\015') //CR { // If crmap is on, send CR-NULL instead of CR-LF. netpush(tw->port); if (tw->crmap) netwrite(tw->port,"\015\0",2); else netwrite(tw->port,"\015\012",2); //UNIVAC fix if (tw->echo) parse(tw,(unsigned char *) "\012\015",2); /* BYU LSC */ return; } if (tw->echo && tw->halfdup) parse(tw, &ascii, 1); if (ascii != 255) netwrite(tw->port,&ascii,1); else netwrite(tw->port, "\377\377", 2); } void HandleMouseDown(EventRecord myEvent) { GrafPtr whichWindow; short code, myRGMnum; short growErr, i; short theItem; DialogPtr dlogp; code = FindWindow(myEvent.where, &whichWindow); switch (code) { case inMenuBar: if (myEvent.modifiers & optionKey) { switchToOptionMenus(TRUE); HandleMenuCommand(MenuSelect(myEvent.where),myEvent.modifiers); switchToOptionMenus(FALSE); } else if (myEvent.modifiers & shiftKey) { switchToShiftMenus(TRUE); HandleMenuCommand(MenuSelect(myEvent.where),myEvent.modifiers); switchToShiftMenus(FALSE); } else HandleMenuCommand(MenuSelect(myEvent.where),myEvent.modifiers); break; case inSysWindow: SystemClick(&myEvent, whichWindow); break; case inGoAway: if (TrackGoAway( whichWindow, myEvent.where)) CloseAWindow((WindowPtr)whichWindow); break; case inDrag: if ((whichWindow != FrontWindow()) && (!(myEvent.modifiers & cmdKey)) && (!(myEvent.modifiers & optionKey))) { SelectWindow(whichWindow); } DragWindow(whichWindow, myEvent.where, &TelInfo->dragRect); break; case inZoomIn: case inZoomOut: if (TrackBox( whichWindow, myEvent.where, code)) RSzoom( whichWindow, code, myEvent.modifiers & shiftKey); break; /* NCSA: SB - Telnet now allows you to grow the TEK window, finally. */ /* NCSA: SB - So check to see if the click was in a TEK window */ case inGrow: growErr = RSsize( whichWindow, (long *) &myEvent.where, myEvent.modifiers); switch(growErr) { case (-4): /*bad mem problems, kill window, signal user */ OutOfMemory(-4); if ((i = WindowPtr2ScreenIndex(whichWindow)) >= 0) { netclose(screens[i].port); removeport(&screens[i]); } break; case (-2): /* no resize due to memory error, signal user */ OutOfMemory(-2); break; default: /* ok resize, or window not found */ break; } myRGMnum = RGfindbywind(whichWindow); /* NCSA: SB - is it a TEK window click? */ if (myRGMnum != -1) /* NCSA: SB - Anyone want to play some BOLO? */ { /* NCSA: SB */ RGMgrowme((short)myRGMnum, whichWindow,(long *) &myEvent.where,myEvent.modifiers); /* NCSA: TG */ } /* NCSA: SB */ break; case inContent: if (whichWindow != FrontWindow()) { SelectWindow(whichWindow); } else { if (((WindowPeek)whichWindow)->windowKind == dialogKind) { if (IsDialogEvent(&myEvent)) { if (DialogSelect(&myEvent, &dlogp, &theItem)) HandleModeless(&myEvent, dlogp, theItem); } break; } if (RSclick(whichWindow, myEvent) <0) { SetPort(whichWindow); GlobalToLocal(&myEvent.where); RGmousedown(whichWindow, &myEvent.where ); } } break; default: break; } } #pragma profile off void DoEvents( void) { Boolean gotOne; /* Did we get an event */ short vs; EventRecord myEvent; short scratchshort; DialogPtr dlogp; gotOne = WaitNextEvent(everyEvent, &myEvent, gApplicationPrefs->TimeSlice, 0L); if (!gotOne) { // RAB BetterTelnet 1.2 - null events to dialogs if (TelInfo->macrosModeless) { if (!CallStdFilterProc(TelInfo->macrosModeless, &myEvent, &scratchshort)) if (IsDialogEvent(&myEvent)) DialogSelect(&myEvent, &dlogp, &scratchshort); } } if (gotOne) { /* BYU 2.4.11 - Turn the cursor off when the human makes the slightest move. */ if (gApplicationPrefs->BlinkCursor) { if ( (vs=RSfindvwind(FrontWindow())) >= 0) if (vs == screens[scrn].vs) if (!(myEvent.modifiers & cmdKey) && ((myEvent.what == keyDown) || (myEvent.what == autoKey))) RScursblinkon(vs); else RScursblinkoff(vs); } HandleEvent(&myEvent); } else if (gApplicationPrefs->BlinkCursor && !TelInfo->suspended) { /* BYU 2.4.11 */ if ( (vs=RSfindvwind(FrontWindow())) >= 0) /* BYU 2.4.11 */ if (vs == screens[scrn].vs) /* BYU 2.4.11 */ RScursblink(vs); /* BYU 2.4.11 */ } /* BYU 2.4.11 */ if (FrontWindow() != TelInfo->macrosModeless) // RAB BetterTelnet 1.2 updateCursor(0); } static long currentScript, defaultKCHR, mungeCount; static Boolean haveChangedKCHR; //called at startup to figure out the default roman KCHR and the active script void scriptKbdInit(void) { currentScript = GetScriptManagerVariable(smKeyScript);//get active script defaultKCHR = GetScriptVariable(smRoman, smScriptKeys); //get the smRoman default KCHR mungeCount = GetScriptManagerVariable(smMunged); //Get the mungeCount haveChangedKCHR = FALSE; } void SetDefaultKCHR(void) { if (haveChangedKCHR) { SetScriptVariable(smRoman,smScriptKeys,defaultKCHR); haveChangedKCHR = FALSE; KeyScript(smRoman); } } void CheckDefaultScriptSettings(void) { long tempLong; tempLong = GetScriptManagerVariable(smMunged); if (tempLong > mungeCount) { currentScript = GetScriptManagerVariable(smKeyScript);//get the new active script if ((currentScript != smRoman)&&(haveChangedKCHR)) //roman has been switched out and we need to fix it { SetScriptVariable(smRoman,smScriptKeys,defaultKCHR); currentScript = GetScriptManagerVariable(smKeyScript);//get the new active script haveChangedKCHR = FALSE; //we dont mess with non-roman scripts } mungeCount = tempLong; //update the mungeCount } } void HandleEvent(EventRecord *myEvent) //CCP split this from DoEvents so we can call this from { //other places short i,vs; DialogPtr dlogp; short theItem, tempstatus; short commanddown; switch(myEvent->what) { case mouseDown: HandleMouseDown(*myEvent); break; case updateEvt: switch(((WindowPeek)myEvent->message)->windowKind) { case WIN_CONSOLE: case WIN_LOG: case WIN_CNXN: if (RSupdate((GrafPtr) myEvent->message)) putln("Ack, problem in update!"); break; case WIN_ICRG: if (MacRGupdate((WindowPtr) myEvent->message)) putln("Ack, problem in update!"); break; case WIN_TEK: if (RGupdate((GrafPtr) myEvent->message) ==0) TekDisable(RGgetVG((GrafPtr) myEvent->message)); else putln("Ack, problem in update!"); break; case dialogKind: CallStdFilterProc((GrafPtr) myEvent->message, myEvent, &theItem); if (IsDialogEvent(myEvent)) DialogSelect(myEvent, &dlogp, &theItem); break; default: putln("Bad windowkind!"); break; } break; case keyDown: case autoKey: commanddown = ((myEvent->modifiers & cmdKey) != 0); if (FrontWindow()) if (((WindowPeek)FrontWindow())->windowKind == dialogKind) { tempstatus = 1; if (CallStdFilterProc(FrontWindow(), myEvent, &theItem)) { HandleModeless(myEvent, FrontWindow(), theItem); break; } if (commanddown) { HandleKeyDown(*myEvent, &screens[scrn]); /* All key events are processed through here */ break; } if (IsDialogEvent(myEvent)) { if (DialogSelect(myEvent, &dlogp, &theItem)) HandleModeless(myEvent, dlogp, theItem); else tempstatus = 0; } if (tempstatus) break; } HandleKeyDown(*myEvent, &screens[scrn]); /* All key events are processed through here */ break; case diskEvt: /* check to see if disk needs to be initialized */ myEvent->where.h = 100; myEvent->where.v = 120; if (noErr != (( myEvent->message >> 16 ) & 0xffff )) { /* check hi word */ DILoad(); DIBadMount( myEvent->where, myEvent->message); /* BYU LSC */ DIUnload(); } break; case activateEvt: if ((myEvent->modifiers & activeFlag)==1) //its an activate event { if (((WindowPeek)myEvent->message)->windowKind == dialogKind) { CallStdFilterProc((GrafPtr) myEvent->message, myEvent, &theItem); if (IsDialogEvent(myEvent)) DialogSelect(myEvent, &dlogp, &theItem); if (TelInfo->macrosModeless) if ((GrafPtr)myEvent->message == TelInfo->macrosModeless) { EnableItem(myMenus[Edit],EDcut); EnableItem(myMenus[Edit],EDcopy); EnableItem(myMenus[Edit],EDpaste); EnableItem(myMenus[Edit],EDclear); } else { DisableItem(myMenus[Edit],EDcut); DisableItem(myMenus[Edit],EDcopy); DisableItem(myMenus[Edit],EDpaste); DisableItem(myMenus[Edit],EDclear); } break; } else { DisableItem(myMenus[Edit],EDcut); DisableItem(myMenus[Edit],EDclear); } i=WindowPtr2ScreenIndex((GrafPtr) myEvent->message); // We need to know who CheckDefaultScriptSettings(); //see if someone has changed the script //this next bit takes care of setting the KCHR based on the EMACS hack pref if ((currentScript == smRoman)&&(screens[i].emacsmeta == 2)) { if (!haveChangedKCHR) //if we haven't already done this { SetScriptVariable(currentScript,smScriptKeys,502); //set the KCHR for EMACS KeyScript(smRoman); //Make it active haveChangedKCHR = TRUE; } } else if (haveChangedKCHR) //new active window doesnt want EMACS hack { SetScriptVariable(currentScript,smScriptKeys,defaultKCHR); KeyScript(smRoman); haveChangedKCHR = FALSE; } AdjustMenus(); DrawMenuBar(); i=WindowPtr2ScreenIndex((GrafPtr) myEvent->message); /* We need to know who */ if (i>=0) { if ((screens[i].curgraph>-1) && (!(myEvent->modifiers & optionKey))) detachGraphics(screens[i].curgraph); changeport(scrn,i); scrn=i; } if ((i=RSfindvwind((GrafPtr) myEvent->message))>=0) { if (RSTextSelected(i)) { EnableItem(myMenus[Fil],FLprint); EnableItem(myMenus[Edit],EDcopy); EnableItem(myMenus[Edit],EDcopyt); } else { DisableItem(myMenus[Fil],FLprint); DisableItem(myMenus[Edit],EDcopy); DisableItem(myMenus[Edit],EDcopyt); } RSactivate(i); TelInfo->myfrontwindow=(WindowPeek) myEvent->message; TelInfo->myfronttype=DEC_WINDOW; TelInfo->myfrontvs = i; TelInfo->myfrontRgn =0L; updateCursor(1); } else { TelInfo->myfrontwindow=(WindowPeek) myEvent->message; TelInfo->myfronttype=TEK_WINDOW; TelInfo->myfrontRgn =0L; updateCursor(1); if ( (i = RGgetdnum((GrafPtr) myEvent->message)) >-1) { if (( i = RGgetVS( i)) >-1) { EnableItem(myMenus[Fil],FLprint); // enable printing EnableItem(myMenus[Edit],EDcopy); // - enable copying DisableItem(myMenus[Edit],EDcopyt); i = findbyVS( i); changeport(scrn,i); scrn=i; } } } } else //its a disable event { short i; DisableItem(myMenus[Edit],EDcut); DisableItem(myMenus[Edit],EDclear); DisableItem(myMenus[Edit],EDcopy); DisableItem(myMenus[Edit],EDpaste); AdjustMenus(); DoTheMenuChecks(); DrawMenuBar(); if ((i=RSfindvwind((GrafPtr) myEvent->message))>=0) RSdeactivate(i); NoWindow(); } break; case osEvt: switch(( myEvent->message >>24) &0xff) { case switchEvt: if (myEvent->message & 0x20) /*Convert clipboard here if necc. (it is not)*/; if (myEvent->message & 0x1) { /* Resume Event */ GrafPtr window; TelInfo->suspended = FALSE; /* We are no longer in suspension */ if (gHaveInstalledNotification) { NMRemove(nRecPtr); DisposeHandle(nRecPtr->nmIcon); gHaveInstalledNotification = FALSE; } DisableItem( myMenus[Edit],EDcut); DisableItem( myMenus[Edit],EDundo); DisableItem( myMenus[Edit],EDclear); window = FrontWindow(); /* Who's on first */ if ( (vs=RSfindvwind(window)) >= 0) { CheckDefaultScriptSettings();//update script settings if ((currentScript == smRoman)&&(haveChangedKCHR)) // set it back { SetScriptVariable(currentScript,smScriptKeys,502); //set the KCHR for EMACS KeyScript(smRoman); //Make it active } RSactivate(vs); TelInfo->myfrontwindow = (WindowPeek) window; TelInfo->myfronttype=DEC_WINDOW; TelInfo->myfrontvs = vs; TelInfo->myfrontRgn =0L; updateCursor(1); } else if ( (long)window != 0L) { myEvent->message = (long) window; myEvent->modifiers |= activeFlag; myEvent->what = activateEvt; myEvent->when = TickCount(); SystemEvent( myEvent); } } else { /* Suspend Event */ GrafPtr window; CheckDefaultScriptSettings();//update script settings if ((currentScript == smRoman)&&(haveChangedKCHR)) //switch out to default KCHR when while suspended { SetScriptVariable(currentScript,smScriptKeys,defaultKCHR); KeyScript(smRoman); } TelInfo->suspended=TRUE; /* We be in waitin' */ EnableItem( myMenus[Edit],EDcut); EnableItem( myMenus[Edit],EDundo); EnableItem( myMenus[Edit],EDclear); window = FrontWindow(); /* Who's on first */ if ((window = FrontWindow()) != nil) { if ( (vs=RSfindvwind(window)) >= 0) RSdeactivate(vs); else if ( (long)window != 0L) { myEvent->message = (long) window; myEvent->modifiers &= (~activeFlag); myEvent->what = activateEvt; myEvent->when = TickCount(); SystemEvent( myEvent); } } NoWindow(); } break; /* switch of myEvent->message >>24 */ default: break; } break; case kHighLevelEvent: (void) AEProcessAppleEvent(myEvent); break; } } //#pragma profile on void CloseAWindow(WindowPtr theWindow) { short i; long junk; switch(((WindowPeek)theWindow)->windowKind) { case WIN_CONSOLE: // Debugger(); // Can't close the console window break; case WIN_LOG: if (theWindow == ftplog->wind) { CheckItem(myMenus[Fil],FLlog,FALSE); TelInfo->ftplogon = FALSE; RShide(ftplog->vs); } break; case WIN_CNXN: if ((i = WindowPtr2ScreenIndex(theWindow)) >= 0) { if ( screens[i].active == CNXN_ISCORPSE) destroyport(i); else { if ( !ReallyClose( i) ) break; netclose(screens[i].port); removeport(&screens[i]); } } break; case WIN_ICRG: MacRGdestroy(MacRGfindwind(theWindow)); MaxMem(&junk); break; case WIN_TEK: destroyGraphics(RGgetVG(theWindow)); MaxMem(&junk); break; case dialogKind: CloseModelessDialog(theWindow); break; default: DebugStr("\pBad windowkind!"); break; } NoWindow(); } void NotifyUser (void) { OSErr err = noErr; if ((!TelInfo->suspended)||(!gApplicationPrefs->NotifyUser)||gHaveInstalledNotification) return; nRecPtr = (NMRecPtr) myNewPtr(sizeof(NMRec)); if (nRecPtr == NULL) return; nRecPtr->qType = nmType; nRecPtr->nmMark = 1; err = GetIconSuite(&(nRecPtr->nmIcon), kNCSAIconFamilyId, svAllSmallData); if (err != noErr) nRecPtr->nmIcon = nil; nRecPtr->nmSound = nil; nRecPtr->nmStr = nil; nRecPtr->nmResp = nil; NMInstall(nRecPtr); gHaveInstalledNotification = TRUE; } void HandleModeless(EventRecord *theEvent, DialogPtr dlogp, short theItem) { if (dlogp == TelInfo->ipModeless) if (theItem == 1) { DisposeDialog(TelInfo->ipModeless); TelInfo->ipModeless = 0; } if (dlogp == TelInfo->macrosModeless) MacroDialog(theEvent, theItem); } void CloseModelessDialog(DialogPtr dlogp) { if (dlogp == TelInfo->ipModeless) { DisposeDialog(TelInfo->ipModeless); TelInfo->ipModeless = 0; } if (dlogp == TelInfo->macrosModeless) CloseMacros(); } \ No newline at end of file diff --git a/source/main/event.h b/source/main/event.h new file mode 100755 index 0000000..3ebcacd --- /dev/null +++ b/source/main/event.h @@ -0,0 +1 @@ +//event.h //This is stuff to translate key codes to VS codes. There are two tables, for shifted //and unshifted. The base is 0x41, the code for the keypad period. The max is 0x7e, the //code for the up arrow. This includes everything but the main portion of the keyboard. unsigned char kpxlate[2][62] = { { /* virtual key code */ VSKP, /* $41 */ VSRT, /* $42 (Mac+) */ VSF4, /* $43 (ADB) */ 0, /* $44 */ VSKC, /* $45 (ADB std) */ VSLT, /* $46 (Mac+) */ VSF1, /* $47 */ VSDN, /* $48 (Mac+) */ 0, /* $49 */ 0, /* $4A */ VSF3, /* $4B (ADB) */ VSKE, /* $4C */ VSUP, /* $4D (Mac+) */ VSKM, /* $4E */ 0, /* $4F */ 0, /* $50 */ VSF2, /* $51 (ADB) */ VSK0, /* $52 */ VSK1, /* $53 */ VSK2, /* $54 */ VSK3, /* $55 */ VSK4, /* $56 */ VSK5, /* $57 */ VSK6, /* $58 */ VSK7, /* $59 */ 0, /* $5A */ VSK8, /* $5B */ VSK9, /* $5C */ 0, /* $5D */ 0, /* $5E */ 0, /* $5F */ VSF10, /* $60 */ /* BYU 2.4.12 */ VSF11, /* $61 */ /* BYU 2.4.12 */ VSF12, /* $62 */ /* BYU 2.4.12 */ VSF8, /* $63 */ /* BYU 2.4.12 - was VSF3 */ VSF13, /* $64 */ /* BYU 2.4.12 */ VSF14, /* $65 */ /* BYU 2.4.12 */ 0, /* $66 */ VSF16, /* $67 */ /* BYU 2.4.12 */ 0, /* $68 */ VSF18, /* $69 */ /* BYU 2.4.12 */ 0, /* $6A */ VSF19, /* $6B */ /* BYU 2.4.12 */ 0, /* $6C */ VSF15, /* $6D */ /* BYU 2.4.12 */ 0, /* $6E */ VSF17, /* $6F */ /* BYU 2.4.12 */ 0, /* $70 */ VSF20, /* $71 */ /* BYU 2.4.12 */ VSHELP, /* $72 */ /* BYU 2.4.12 */ VSHOME, /* $73 */ /* BYU 2.4.12 */ VSPGUP, /* $74 */ /* BYU 2.4.12 */ VSDEL, /* $75 (ADB ext) */ /* BYU 2.4.12 - was 0x7f */ VSF9, /* $76 */ /* BYU 2.4.12 - was VSF4 */ VSEND, /* $77 */ /* BYU 2.4.12 */ VSF7, /* $78 */ /* BYU 2.4.12 - was VSF2 */ VSPGDN, /* $79 */ /* BYU 2.4.12 */ VSF6, /* $7A */ /* BYU 2.4.12 - was VSF1 */ VSLT, /* $7B */ VSRT, /* $7C */ VSDN, /* $7D */ VSUP /* $7E */ }, { VSKP, /* $41 */ VSF4, /* $42 (Mac+) */ VSF4, /* $43 (ADB) */ 0, /* $44 */ VSKC, /* $45 (ADB) */ VSKC, /* $46 (Mac+) */ VSF1, /* $47 */ VSF2, /* $48 */ 0, /* $49 */ 0, /* $4A */ VSF3, /* $4B */ VSKE, /* $4C */ VSF3, /* $4D */ VSKM, /* $4E */ 0, /* $4F */ 0, /* $50 */ VSF2, /* $51 */ VSK0, /* $52 */ VSK1, /* $53 */ VSK2, /* $54 */ VSK3, /* $55 */ VSK4, /* $56 */ VSK5, /* $57 */ VSK6, /* $58 */ VSK7, /* $59 */ 0, /* $5A */ VSK8, /* $5B */ VSK9, /* $5C */ 0, /* $5D */ 0, /* $5E */ 0, /* $5F */ VSF10, /* $60 */ /* BYU 2.4.12 */ VSF11, /* $61 */ /* BYU 2.4.12 */ VSF12, /* $62 */ /* BYU 2.4.12 */ VSF8, /* $63 */ /* BYU 2.4.12 - was VSF3 */ VSF13, /* $64 */ /* BYU 2.4.12 */ VSF14, /* $65 */ /* BYU 2.4.12 */ 0, /* $66 */ VSF16, /* $67 */ /* BYU 2.4.12 */ 0, /* $68 */ VSF18, /* $69 */ /* BYU 2.4.12 */ 0, /* $6A */ VSF19, /* $6B */ /* BYU 2.4.12 */ 0, /* $6C */ VSF15, /* $6D */ /* BYU 2.4.12 */ 0, /* $6E */ VSF17, /* $6F */ /* BYU 2.4.12 */ 0, /* $70 */ VSF20, /* $71 */ /* BYU 2.4.12 */ VSHELP, /* $72 */ /* BYU 2.4.12 */ VSHOME, /* $73 */ /* BYU 2.4.12 */ VSPGUP, /* $74 */ /* BYU 2.4.12 */ VSDEL, /* $75 (ADB ext) */ /* BYU 2.4.12 - was 0x7f */ VSF9, /* $76 */ /* BYU 2.4.12 - was VSF4 */ VSEND, /* $77 */ /* BYU 2.4.12 */ VSF7, /* $78 */ /* BYU 2.4.12 - was VSF2 */ VSPGDN, /* $79 */ /* BYU 2.4.12 */ VSF6, /* $7A */ /* BYU 2.4.12 - was VSF1 */ VSLT, /* $7B */ VSRT, /* $7C */ VSDN, /* $7D */ VSUP /* $7E */ } }; /* ASCII character set defines */ #define DELchar 0x7f /* BYU LSC - (DEL is defined in MacLook.h) the delete character */ #define KILLCHAR 0x15 /* the character to kill the local line with */ \ No newline at end of file diff --git a/source/main/event.proto.h b/source/main/event.proto.h new file mode 100755 index 0000000..51dbdb9 --- /dev/null +++ b/source/main/event.proto.h @@ -0,0 +1 @@ + /* event.c */ void HandleMouseDown(EventRecord myEvent); short updateCursor(short force); void NoWindow(void); Boolean CheckPageKeys(short code); void SendOneChar(unsigned char sendch); void HandleKeyDown(EventRecord theEvent,struct WindRec *tw); void DoEvents(void); void CloseAWindow(WindowPtr theWindow); void HandleRemapping(unsigned char *ascii, Boolean *commanddown, Boolean *controldown,Boolean *optiondown, unsigned char *code);//BUGG make it static void HandleEvent(EventRecord *myEvent); void NotifyUser (void); void SetDefaultKCHR(void); void HandleModeless(EventRecord*, DialogPtr, short); void CloseModelessDialog(DialogPtr); \ No newline at end of file diff --git a/source/main/keypadmenus.c b/source/main/keypadmenus.c new file mode 100755 index 0000000..10b1191 --- /dev/null +++ b/source/main/keypadmenus.c @@ -0,0 +1 @@ +// keypadmenus.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "VSkeys.h" /* Baylor - for keypad menu support */ #include "wind.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "keypadmenus.proto.h" extern WindRec *screens; extern short scrn; static unsigned char KeypadMenuMap[] = { /* Baylor - which menu items map to which key */ /* no zero item */ 0, /* find, insert, remove, select, prev, next, */ VSHELP, VSHOME, VSPGUP, VSDEL, VSEND, VSPGDN, /* up, left, down, right, */ VSUP, VSLT, VSDN, VSRT, /* pf1, pf2, pf3, pf4 */ VSF1, VSF2, VSF3, VSF4, /* kp7, kp8, kp9, minus, */ VSK7, VSK8, VSK9, VSKM, /* kp4, kp5, kp6, comma, */ VSK4, VSK5, VSK6, VSKC, /* kp1, kp2, kp3, enter, */ VSK1, VSK2, VSK3, VSKE, /* kp0, period */ VSK0, VSKP }; static unsigned char FuncKeyMenuMap[] = { /* Baylor - which menu items map to which key */ /* no zero item */ 0, /* f6, f7, f8, f9, f10, */ VSF6, VSF7, VSF8, VSF9, VSF10, /* f11, f12, f13, f14, */ VSF11, VSF12, VSF13, VSF14, /* help, do */ VSF15, VSF16, /* f17, f18, f19, f20 */ VSF17, VSF18, VSF19, VSF20 }; void KeyMenu(short theItem) { VSkbsend(screens[scrn].vs, KeypadMenuMap[theItem], screens[scrn].echo); /* Baylor */ } void FuncMenu(short theItem) { VSkbsend(screens[scrn].vs, FuncKeyMenuMap[theItem], screens[scrn].echo); /* Baylor */ } \ No newline at end of file diff --git a/source/main/keypadmenus.proto.h b/source/main/keypadmenus.proto.h new file mode 100755 index 0000000..ec4bf8a --- /dev/null +++ b/source/main/keypadmenus.proto.h @@ -0,0 +1 @@ +void KeyMenu(short theItem); void FuncMenu(short theItem); \ No newline at end of file diff --git a/source/main/maclook.c b/source/main/maclook.c new file mode 100755 index 0000000..3b79710 --- /dev/null +++ b/source/main/maclook.c @@ -0,0 +1 @@ + // maclook.c // User interface code for NCSA Telnet for the Macintosh // originally by Gaige B. Paulsen // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * User interface for basic telnet with background file transfer * capabilities via FTP calls from host. * * This, the Macintosh version also gives each session its own window, * provides advanced keyboard translation, Tek emulation, printing/copying * of text and graphics and the pasting of text into the active session. * * Requires: * menu.c - Aux. file for handling menu calls * event.c - Aux. file for handling events * switch.c- Aux. file for handling swithcher (the J word is in Event and here ) * * * NCSA Revisions: * 7/92 Telnet 2.6: added support for the 2 global structs, and put all the * cursors into one array. Cleaned up defines Scott Bulmahn */ #ifdef MPW #pragma segment 4 #endif #define PREFMASTER /* So pref structure gets defined Scott! */ #include "netevent.proto.h" #include "wind.h" #include "event.proto.h" #include "macutil.proto.h" #include "popup.h" #include "popup.proto.h" #include "rsinterf.proto.h" #include "vsdata.h" #include "vskeys.h" #include "vsinterf.proto.h" #include "vgtek.proto.h" #include "tekrgmac.proto.h" #include "vr.h" #include "vrrgmac.proto.h" #include "network.proto.h" #include "mydnr.proto.h" #include "menuseg.proto.h" #include "prefs.proto.h" #include "maclook.proto.h" #include "DlogUtils.proto.h" #include "telneterrors.h" extern Cursor *theCursors[]; extern WindRec *screens; /* Window Records (VS) for : Current Sessions */ extern short scrn; //extern char *tempspot; /* temporary storage ~255 bytes malloc-ed */ void MiscUnload(void) {} short detachGraphics( short dnum) { short i=0; while((inumwindows) && (dnum!=screens[i].curgraph)) i++; if (i>=TelInfo->numwindows) return(-1); TelInfo->oldgraph[TelInfo->graphs++]=dnum; screens[i].curgraph=-1; screens[i].termstate=VTEKTYPE; screens[i].enabled=1; RGdetach(dnum); return(0); } /* Find screen index by Window */ short WindowPtr2ScreenIndex(WindowPtr wn) { short i=0; while((inumwindows) && (wn!= (WindowPtr)screens[i].wind)) i++; if (i>=TelInfo->numwindows) return(-1); return(i); } WindRecPtr WindowPtr2WindRecPtr(WindowPtr wn) { short winNum; winNum = WindowPtr2ScreenIndex(wn); if (winNum == -1) { return nil; } return &screens[winNum]; } /* Find screen index by VS Number */ short findbyVS( short vs) { short i=0; while((inumwindows) && (vs!=screens[i].vs)) i++; if (i>=TelInfo->numwindows) return(-1); return(i); } void setgraphcurs( void) /* Called at start of gin */ { TelInfo->ginon=1; updateCursor(1); } void unsetgraphcurs( void) /* Called at start of gin */ { TelInfo->ginon=0; updateCursor(1); } short VGalive( short dnum) { short i; i=0; while((inumwindows) && (dnum!=screens[i].curgraph)) i++; if (inumwindows) { return(1); } else { i=0; while ((igraphs) && (dnum!=TelInfo->oldgraph[i])) i++; if (igraphs) return(1); } return(0); } void destroyGraphics( short dnum) { short i; i=0; while((inumwindows) && (dnum!=screens[i].curgraph)) i++; if (inumwindows) { screens[i].curgraph=-1; screens[i].termstate=VTEKTYPE; screens[i].enabled=1; } else { i=0; while ((igraphs) && (dnum!=TelInfo->oldgraph[i])) i++; while (i<(MaxGraph-1)) TelInfo->oldgraph[i]=TelInfo->oldgraph[++i]; /* Bump everyone down one slot */ TelInfo->graphs--; /* One less graph to feed */ } VGclose( dnum); } short FindByVG(short vg) { short i=0; while((inumwindows) && (vg!=screens[i].curgraph)) i++; if (i>=TelInfo->numwindows) return(-1); return(i); } void TekEnable( short vg) { short change; change=FindByVG( vg); if (change>=0) screens[change].enabled=1; } void TekDisable( short vg) { short change; change=FindByVG( vg); if (change>=0) screens[change].enabled=0; } /* showNetNumbers - Show the current network numbers. */ void showNetNumbers( void) { char tmpout[256]; /* IP Number */ DialogPtr dptr; /* dialog box pointer */ short scratchshort; int tmp[4]; /* Integer copy of IP Number */ unsigned char tmp2[4]; if (TelInfo->ipModeless) { SelectWindow(TelInfo->ipModeless); return; } Mnetinit(); // RAB BetterTelnet 1.0fc4 netgetip(tmp2); for(scratchshort=0; scratchshort<4; scratchshort++) tmp[scratchshort] = (int)tmp2[scratchshort]; /* Get integer numbers */ sprintf(&tmpout[0],"IP Address:\r%d.%d.%d.%d",tmp[0],tmp[1],tmp[2],tmp[3]); /* create Human-readable numbers */ c2pstr(tmpout); /* BYU LSC */ // RAB BetterTelnet 1.2 - we can't use ParamText() for modeless dialogs // ParamText(0L, (StringPtr)tmpout,0L,0L); /* BYU LSC - Put Parms in Dlog */ dptr = GetNewDialog(MyIPDLOG, NULL, kInFront); SetDialogDefaultItem(dptr, 1); SetTEText(dptr, 2, (unsigned char *)tmpout); DrawDialog(dptr); /* Display Dialog */ TelInfo->ipModeless = dptr; // ModalDialog(NULL, &scratchshort); /* Wait for a click */ // DisposDialog(dptr); // Alert(MyIPDLOG, 0L); } /*******************************************************************/ /* setupkeys * Prompt the user for which keys to use for kill, stop and start. */ void setupkeys( void) { DialogPtr dtemp; Rect dBox; short dItem,kItem,sItem,eItem; Handle kbox,sbox,ebox; char *tempspot; tempspot = (char *) myNewPtr(256); if (tempspot == NULL) return; //BUGG signal error here dtemp=GetNewMyDialog( SetupDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetCursor(theCursors[normcurs]); GetDItem( dtemp, killbox, &kItem, &kbox, &dBox); GetDItem( dtemp, stopbox, &eItem, &ebox, &dBox); GetDItem( dtemp, startbox, &sItem, &sbox, &dBox); *tempspot = 0; if (screens[scrn].TELstop > 0) { sprintf(tempspot,"^%c",screens[scrn].TELstop^64); c2pstr(tempspot); /* BYU LSC */ SetIText( ebox , (StringPtr)tempspot); SelIText( dtemp, stopbox, 0, 32767); } if (screens[scrn].TELgo > 0) { sprintf(tempspot,"^%c",screens[scrn].TELgo^64); c2pstr(tempspot); /* BYU LSC */ SetIText( sbox , (StringPtr)tempspot); SelIText( dtemp, startbox, 0, 32767); } if (screens[scrn].TELip > 0) { sprintf(tempspot,"^%c",screens[scrn].TELip^64); c2pstr(tempspot); /* BYU LSC */ SetIText( kbox , (StringPtr)tempspot); SelIText( dtemp, killbox, 0, 32767); } dItem=0; /* initially no hits */ while((dItem>3) || (dItem==0)) { /* While we are in the loop */ ModalDialog(DLOGwOK_CancelUPP,&dItem); /* * intermediate check. If they hit a key, put its number in the box. */ GetIText( kbox, (StringPtr)tempspot); /* BYU LSC - Get the string */ p2cstr((StringPtr)tempspot); /* BYU LSC */ if (*tempspot < 32 && *tempspot > 0) { sprintf(tempspot,"^%c",*tempspot^64); c2pstr(tempspot); /* BYU LSC */ SetIText( kbox , (StringPtr)tempspot); /* BYU LSC */ SelIText( dtemp, killbox, 0, 32767 ); } GetIText( ebox, (StringPtr)tempspot); /* BYU LSC - Get the string */ p2cstr((StringPtr)tempspot); /* BYU LSC */ if (*tempspot < 32 && *tempspot > 0) { sprintf(tempspot,"^%c",*tempspot^64); c2pstr(tempspot); /* BYU LSC */ SetIText( ebox , (StringPtr)tempspot); /* BYU LSC */ SelIText( dtemp, stopbox, 0, 32767); } GetIText( sbox, (StringPtr)tempspot); /* BYU LSC - Get the string */ p2cstr((StringPtr)tempspot); /* BYU LSC */ if (*tempspot < 32 && *tempspot > 0) { sprintf(tempspot,"^%c",*tempspot^64); c2pstr(tempspot); /* BYU LSC */ SetIText( sbox , (StringPtr)tempspot); /* BYU LSC */ SelIText( dtemp, startbox, 0, 32767); } } if (dItem==DLOGCancel) { DisposDialog( dtemp); return; } GetIText( kbox, (StringPtr)tempspot); /* BYU LSC - Get the string */ p2cstr((StringPtr)tempspot); /* BYU LSC */ if (*tempspot != '^') screens[scrn].TELip = -1; else screens[scrn].TELip = toupper(*(tempspot+1)) ^ 64; GetIText( ebox, (StringPtr)tempspot); /* BYU LSC - Get the string */ p2cstr((StringPtr)tempspot); /* BYU LSC */ if (*tempspot != '^') screens[scrn].TELstop = -1; else screens[scrn].TELstop = toupper(*(tempspot+1)) ^ 64; GetIText( sbox, (StringPtr)tempspot); /* BYU LSC - Get the string */ p2cstr((StringPtr)tempspot); /* BYU LSC */ if (*tempspot != '^') screens[scrn].TELgo = -1; else screens[scrn].TELgo = toupper(*(tempspot+1)) ^ 64; DisposDialog( dtemp); updateCursor(1); } \ No newline at end of file diff --git a/source/main/maclook.proto.h b/source/main/maclook.proto.h new file mode 100755 index 0000000..f65ab9e --- /dev/null +++ b/source/main/maclook.proto.h @@ -0,0 +1 @@ +typedef struct WindRec WindRec, * WindRecPtr; /* maclook.c */ void MiscUnload(void); short detachGraphics(short dnum); short WindowPtr2ScreenIndex(WindowPtr wn); WindRecPtr WindowPtr2WindRecPtr(WindowPtr wn); short findbyVS(short vs); void setgraphcurs(void); void unsetgraphcurs(void); short VGalive(short dnum); void destroyGraphics(short dnum); short FindByVG(short vg); void TekEnable(short vg); void TekDisable(short vg); void showNetNumbers(void); void setupkeys(void); \ No newline at end of file diff --git a/source/main/mainseg.c b/source/main/mainseg.c new file mode 100755 index 0000000..6edebe0 --- /dev/null +++ b/source/main/mainseg.c @@ -0,0 +1 @@ +// mainseg.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment main #endif #define GLOBALMASTER /* Global structures are charged to us... see below */ #include "event.proto.h" #include "netevent.proto.h" #include "init.proto.h" #include "network.proto.h" // For netshut proto #include "wind.h" #include "MacBinary.h" #include "binsubs.proto.h" // For close_mb_files proto #include "menuseg.proto.h" #include "Connections.proto.h" #include "AddressXlation.h" //the following are for the unload protos #include "vgtek.proto.h" #include "vr.h" #include "vr.proto.h" #include "rsinterf.proto.h" #include "vsem.proto.h" #include "configure.proto.h" #include "macros.proto.h" #include "bkgr.proto.h" #include "printing.proto.h" #include "sets.proto.h" #include "rg0.proto.h" #include "rgmp.proto.h" #include "parse.proto.h" #include "linemode.proto.h" #include "tnae.h" #include "authencrypt.proto.h" #include "mainseg.proto.h" #include "IConfig.proto.h" #include "ae.proto.h" #include "prefs.proto.h" //#define PROFILER // Define to use MW profiler #ifdef PROFILER #include "profiler.h" #endif Cursor *theCursors[NUMCURS]; /* all the cursors in a nice bundle */ WindRec *screens, /* Window Records (VS) for : Current Sessions */ *ftplog; short scrn=0; TelInfoRec *TelInfo; /* This is defined here and externed everywhere else. */ void main(void) { short i; long lastCount = 0; Boolean haveNotifiedLowMemory = FALSE, memOK; MaxApplZone(); for (i=0; i<9; i++) MoreMasters(); #ifdef PERFORMANCE ThePGlobals = nil; if (!InitPerf(&ThePGlobals, 10, 8, TRUE, TRUE, "\pCODE", 0, "\p", FALSE, 0, 0, 0)) Debugger(); PerfControl(ThePGlobals, TRUE); #endif #ifdef PROFILER if (ProfilerInit(collectDetailed, microsecondsTimeBase, 1000, 30) != noErr) DebugStr("\pError starting profiler!"); ProfilerSetStatus(false); ProfilerClear(); #endif init(); /* JMB 2.6 - Call all init routines */ UnloadSeg(&init); /* Bye, bye to init routines... */ if (gApplicationPrefs->autoOpenDefault) OpenSpecial(3); TelInfo->gotDocument = 0; do { /* BYU - Do this forever */ UnloadSegments(); DoEvents(); if (!TelInfo->done) DoNetEvents(); memOK = RecoverReserveMemory(); if (memOK) haveNotifiedLowMemory = false; else if (!haveNotifiedLowMemory) { Alert(MemoryLowAlert, NULL); haveNotifiedLowMemory = true; } } while (!TelInfo->done); /* BYU mod */ #ifdef PERFORMANCE if (!PerfDump(ThePGlobals, "\pPerform.out", TRUE, 80)) DebugStr("\pDump Failed"); Debugger(); TermPerf(ThePGlobals); #endif #ifdef PROFILER if (ProfilerDump("\pProfiler.out") != noErr) { DebugStr("\pDump Failed"); } ProfilerTerm(); #endif } void quit( void) { if (TelInfo->numwindows>0) return; if (TelInfo->startedTCP) { // RAB BetterTelnet 1.0fc4 netshut(); CloseResolver(); /* BYU 2.4.16 */ } // RAB BetterTelnet 1.0fc4 close_mb_files(); /* BYU - Don't leave any files open! */ stopInternetConfig(); TelInfo->done = 1; /* BYU */ } void forcequit(void) { quit(); ExitToShell(); } // This is rather simple right now, but I'll make it smarter when I have the time. //void CheckFreeMemory(void) //{ // long space, block; // PurgeSpace(&space, &block); // if (space < (30 * 1024)) // Alert(MemoryLowAlert, NULL); //} // This unloads the segments that are safe to unload. Right now, the DNR and network // segments ARE NOT safe to unload. Do _not_ add anything to this unless you really // know what you are doing! (I MEAN IT!) void UnloadSegments(void) { UnloadSeg(&TEKMAINunload); UnloadSeg(&ICRunload); UnloadSeg(&CONFIGUREunload); UnloadSeg(&MACROSunload); UnloadSeg(&FTPServerUnload); UnloadSeg(&PrintingUnload); UnloadSeg(&SETSunload); UnloadSeg(&TEKNULLunload); UnloadSeg(&TEKMacPicunload); UnloadSeg(&LinemodeUnload); UnloadSeg(&ICUnload); UnloadSeg(&AEunload); UnloadSeg(&PREFSUnload); } \ No newline at end of file diff --git a/source/main/mainseg.proto.h b/source/main/mainseg.proto.h new file mode 100755 index 0000000..2cc3b66 --- /dev/null +++ b/source/main/mainseg.proto.h @@ -0,0 +1 @@ + /* mainseg.c */ void main(void); void quit(void); void forcequit(void); void UnloadSegments(void); \ No newline at end of file diff --git a/source/main/memory.c b/source/main/memory.c new file mode 100755 index 0000000..3516152 --- /dev/null +++ b/source/main/memory.c @@ -0,0 +1 @@ +// memory.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "memory.proto.h" static Size gCushion; /* size of memory cushion */ static Size gReserve; /* size of memory reserve */ static Handle gReserveBlock = NULL; /* reserve block */ static Boolean gCritical = true; /* true if current memory request is critical */ void initMemoryBuffer(Size cushion, Size reserve) { OSErr err = noErr; static GrowZoneUPP myGrowZoneUPP; gCushion = cushion; gReserve = reserve; gReserveBlock = NewHandle(reserve); myGrowZoneUPP = NewGrowZoneProc(MyGrowZone); SetGrowZone(myGrowZoneUPP); return; } Boolean RecoverReserveMemory (void) { if (gReserveBlock == nil) return true; if (*gReserveBlock != nil) return true; ReallocateHandle(gReserveBlock, gReserve); if (MemError() != noErr) return false; return MemoryAvailable(0); } Boolean MemoryAvailable (Size len) { long total, contig; if (gReserveBlock == nil || *gReserveBlock == nil) { if (!RecoverReserveMemory()) return false; } PurgeSpace(&total, &contig); return len + gCushion < contig; } static pascal long MyGrowZone (Size cbNeeded) { long theA5, result; theA5 = SetCurrentA5(); if (gCritical && gReserveBlock != nil && *gReserveBlock != nil && gReserveBlock != GZSaveHnd()) { EmptyHandle(gReserveBlock); result = gReserve; } else { result = 0; } SetA5(theA5); return result; } Handle myNewHandle(Size len) { Handle tempHandle; if (!MemoryAvailable(len)) return NULL; gCritical = FALSE; tempHandle = NewHandleClear(len); gCritical = TRUE; return tempHandle; } Handle myNewHandleCritical(Size len) { Handle tempHandle; tempHandle = NewHandleClear(len); return tempHandle; } Ptr myNewPtr(Size len) { Ptr tempPtr; if (!MemoryAvailable(len)) return NULL; gCritical = FALSE; tempPtr = NewPtrClear(len); gCritical = TRUE; return tempPtr; } Ptr myNewPtrCritical(Size len) { Ptr tempPtr; tempPtr = NewPtrClear(len); return tempPtr; } OSErr mySetHandleSize (Handle handle, Size len) { Size oldLen; OSErr err = noErr; oldLen = GetHandleSize(handle); if (oldLen < len) { if (!MemoryAvailable(len-oldLen)) return memFullErr; } gCritical = FALSE; SetHandleSize(handle, len); gCritical = TRUE; err = MemError(); if (err == memFullErr) { /* The Memory Manager is too stupid to do this itself. */ MoveHHi(handle); CompactMem(maxSize); gCritical = FALSE; SetHandleSize(handle, len); gCritical = TRUE; err = MemError(); } if (err != noErr) return err; if (oldLen >= len) return noErr; if (MemoryAvailable(0)) return noErr; SetHandleSize(handle, oldLen); return memFullErr; } OSErr MySetHandleSizeCritical (Handle handle, Size len) { SetHandleSize(handle, len); if (MemError() == memFullErr) { /* The Memory Manager is too stupid to do this itself. */ MoveHHi(handle); CompactMem(maxSize); SetHandleSize(handle, len); } return MemError(); } \ No newline at end of file diff --git a/source/main/memory.proto.h b/source/main/memory.proto.h new file mode 100755 index 0000000..b3ad0bb --- /dev/null +++ b/source/main/memory.proto.h @@ -0,0 +1 @@ +//memory.proto.h void initMemoryBuffer(Size cushion, Size reserve); Boolean RecoverReserveMemory (void); Boolean MemoryAvailable (Size len); static pascal long MyGrowZone (Size cbNeeded); Handle myNewHandle(Size len); Handle myNewHandleCritical(Size len); Ptr myNewPtr(Size len); Ptr myNewPtrCritical(Size len); OSErr mySetHandleSize (Handle handle, Size len); OSErr MySetHandleSizeCritical (Handle handle, Size len); \ No newline at end of file diff --git a/source/main/menuseg.c b/source/main/menuseg.c new file mode 100755 index 0000000..10b8734 --- /dev/null +++ b/source/main/menuseg.c @@ -0,0 +1 @@ +// menuseg.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * Menu Handling and initialization code. * * * Revisions: * 7/92 Telnet 2.6 initial version: reorganized defines, put all stray globals in a struct, and * put all cursors in a nice array. Moved some routines to other places - Scott Bulmahn * * 6/94 Added support for Keypad and Function menus - Carl Bell (Baylor U.) */ #ifdef MPW #pragma segment 4 #endif #include "wind.h" #include "menuseg.proto.h" #include "mainseg.proto.h" #include "Sets.proto.h" /* JMB: For Saved Sets functions */ #include "configure.proto.h" #include "parse.proto.h" #include "InternalEvents.h" #include "mydnr.proto.h" #include "rsinterf.proto.h" #include "network.proto.h" #include "maclook.proto.h" #include "vrrgmac.proto.h" #include "rgmp.proto.h" #include "tekrgmac.proto.h" #include "vgtek.proto.h" #include "netevent.proto.h" #include "Connections.proto.h" #include "tnae.h" #include "authencrypt.proto.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "otp.proto.h" #include "event.proto.h" #include "macros.proto.h" #include "DlogUtils.proto.h" /* For VersionNumber, OutlineItem, and DialogProc Protos */ #include "telneterrors.h" #include #include "printing.proto.h" #include "menuseg.proto.h" #include "translate.proto.h" #include "parse.proto.h" // For SendNAWSinfo proto #include "keypadmenus.proto.h" #include "LinkedList.proto.h" #include "movableModal.h" MenuHandle myMenus[NMENUS]; /* Menu Handles .... */ static short lastMenyCommandKeys = -1; //whether last menu set had command keys //char *tempspot; /* temporary storage ~255 bytes malloc-ed */ /* * External variable declarations (those which we borrow ) * */ extern short scrn; extern Cursor *theCursors[]; extern WindRec *screens, /* The screen array from Maclook */ *ftplog; /* The FTP log screen from Maclook */ extern short nNational; void CloseCaptureFile(short w) { VSclosecapture(w); /* BYU 2.4.18 */ CheckItem(myMenus[Emul], EMcapture,FALSE); /* BYU 2.4.18 */ } /* portsOpen() - Count the number of ports open. Returns 3 different answers * 0= no ports at all, 1= at least active, -1= ports/none active. */ short portsOpen(void) { short pnum; pnum=TelInfo->numwindows-1; if (pnum<0) return(0); while (pnum>=0) // if (!screens[pnum--].active && !screens[pnum+1].corpse) return(1); // corpse status now part of active flag if (screens[pnum--].active == CNXN_ACTIVE) return(1); return(-1); } void switchToOptionMenus(Boolean useOptionedStuff) { Str255 theMenuItem; short whichString; if (useOptionedStuff) whichString = CLOSE_ALL_MENU_ITEM; else whichString = CLOSE_MENU_ITEM; GetIndString(theMenuItem,MISC_STRINGS,whichString); SetItem(myMenus[Fil],FLclose,theMenuItem); } void switchToShiftMenus(Boolean useShiftStuff) { Str255 theMenuItem; short whichString; if (useShiftStuff) whichString = PREVIOUS_SESSION_STRING; else whichString = NEXT_SESSION_STRING; GetIndString(theMenuItem,MISC_STRINGS,whichString); SetItem(myMenus[Conn],COnext,theMenuItem); } void AdjustMenus(void) { short i; WindowPtr wind; if ((wind = FrontWindow()) != NULL && ((((WindowPeek)wind)->windowKind >= userKind) || (((WindowPeek)wind)->windowKind == dialogKind))) EnableItem( myMenus[Fil],FLclose); else DisableItem( myMenus[Fil],FLclose); if ((i=portsOpen()) <1) { DisableItem( myMenus[Fil],FLsave); DisableItem( myMenus[Fil],FLsavem); DisableItem( myMenus[Fil],FLprint); DisableItem( myMenus[Fil],FLselect); DisableItem( myMenus[Fil],FLupload); DisableItem( myMenus[Edit],EDcut); DisableItem( myMenus[Edit],EDundo); DisableItem( myMenus[Edit],EDclear); DisableItem( myMenus[Edit],EDcopy); DisableItem( myMenus[Edit],EDretype); DisableItem( myMenus[Edit],EDcopyt); #if 0 // RAB BetterTelnet 1.0fc8 DisableItem( myMenus[Emul],EMbs); DisableItem( myMenus[Emul],EMdel); DisableItem( myMenus[Emul],EMecho); DisableItem( myMenus[Emul],EMwrap); DisableItem( myMenus[Emul],EMcrmap); DisableItem( myMenus[Emul],EMmapkeypad); DisableItem( myMenus[Emul],EMansi); DisableItem( myMenus[Emul],EMxterm); DisableItem( myMenus[Emul],EMmapd); DisableItem( myMenus[Emul],EMbold); DisableItem( myMenus[Emul],EMboldcolor); DisableItem( myMenus[Emul],EMbeep); DisableItem( myMenus[Emul],EMeightbit); DisableItem( myMenus[Emul],EMscroll); DisableItem( myMenus[Emul],EMreset); DisableItem ( myMenus[Emul],EMjump); DisableItem ( myMenus[Emul],EMpage); DisableItem ( myMenus[Emul],EMclear); /* BYU 2.4.14 */ DisableItem ( myMenus[Emul],EMscreensize); DisableItem ( myMenus[Emul],EMsetup); DisableItem ( myMenus[Emul],EMfont); DisableItem ( myMenus[Emul],EMsize); DisableItem ( myMenus[Emul],EMcolor); DisableItem ( myMenus[Emul],EMAnsiColor); DisableItem ( myMenus[Emul],EMcapture); /* BYU 2.4.18 */ DisableItem ( myMenus[Emul],EMqprint); #endif DisableItem ( myMenus[Emul],0); // RAB BetterTelnet 1.0fc8 DisableItem( myMenus[Net ],NEftp); DisableItem( myMenus[Net ],NEip); DisableItem( myMenus[Net ],NEayt); DisableItem( myMenus[Net ],NEao); DisableItem( myMenus[Net ],NEinter); DisableItem( myMenus[Net ],NEipsync); DisableItem( myMenus[Net ],NEsync); DisableItem( myMenus[Net ],NEbrk); DisableItem( myMenus[Net ],NEec); DisableItem( myMenus[Net ],NEel); DisableItem( myMenus[Net ],NEscroll); if (TelInfo->ScrlLock) { TelInfo->ScrlLock=0; CheckItem(myMenus[Net ], NEscroll,FALSE); } } else { EnableItem ( myMenus[Fil],FLsave); EnableItem ( myMenus[Fil],FLsavem); EnableItem ( myMenus[Fil],FLupload); EnableItem ( myMenus[Emul],0); // RAB BetterTelnet 1.0fc8 #if 0 // RAB BetterTelnet 1.0fc8 EnableItem ( myMenus[Emul],EMbs); EnableItem ( myMenus[Emul],EMdel); EnableItem ( myMenus[Emul],EMecho); EnableItem ( myMenus[Emul],EMwrap); EnableItem ( myMenus[Emul],EMcrmap); EnableItem ( myMenus[Emul],EMansi); EnableItem ( myMenus[Emul],EMxterm); EnableItem ( myMenus[Emul],EMmapd); EnableItem ( myMenus[Emul],EMbold); EnableItem ( myMenus[Emul],EMbeep); EnableItem ( myMenus[Emul],EMboldcolor); EnableItem ( myMenus[Emul],EMeightbit); EnableItem ( myMenus[Emul],EMmapkeypad); #endif if (nNational > 0) { EnableItem ( myMenus[National], 0); } #if 0 EnableItem ( myMenus[Emul],EMscroll); EnableItem ( myMenus[Emul],EMreset); EnableItem ( myMenus[Emul],EMjump); EnableItem ( myMenus[Emul],EMpage); EnableItem ( myMenus[Emul],EMclear); /* BYU 2.4.14 */ EnableItem ( myMenus[Emul],EMscreensize); EnableItem ( myMenus[Emul],EMsetup); EnableItem ( myMenus[Emul],EMfont); EnableItem ( myMenus[Emul],EMsize); EnableItem ( myMenus[Emul],EMcapture); /* BYU 2.4.18 */ EnableItem ( myMenus[Emul],EMqprint); #endif if (TelInfo->haveColorQuickDraw) { EnableItem ( myMenus[Emul],EMcolor); EnableItem ( myMenus[Emul],EMAnsiColor); } else { DisableItem ( myMenus[Emul],EMcolor); DisableItem ( myMenus[Emul],EMAnsiColor); } EnableItem ( myMenus[Net ],NEftp); EnableItem ( myMenus[Net ],NEip); EnableItem ( myMenus[Net ],NEayt); EnableItem ( myMenus[Net ],NEao); EnableItem ( myMenus[Net ],NEinter); EnableItem ( myMenus[Net ],NEipsync); EnableItem ( myMenus[Net ],NEbrk); EnableItem ( myMenus[Net ],NEsync); EnableItem ( myMenus[Net ],NEec); EnableItem ( myMenus[Net ],NEel); EnableItem ( myMenus[Net ],NEscroll); } if (TelInfo->macrosModeless) if (FrontWindow() == TelInfo->macrosModeless) { EnableItem(myMenus[Edit],EDcut); EnableItem(myMenus[Edit],EDcopy); EnableItem(myMenus[Edit],EDpaste); EnableItem(myMenus[Edit],EDclear); } } /* switchMenus( which) - Switch from our current menus to the key menus (1) * or the normal menus (0). */ void switchMenus(short which, short force) { short i; Str255 theMenuItem; if ((lastMenyCommandKeys != which) || force) { lastMenyCommandKeys = which; DeleteMenu( fileMenu); /* Take them from the menu bar */ DeleteMenu( editMenu); DeleteMenu( termMenu); DeleteMenu( netMenu); DeleteMenu( keyMenu); /* Baylor */ DeleteMenu( funcMenu); /* Baylor */ DeleteMenu(NfileMenu); DeleteMenu(NeditMenu); DeleteMenu(NtermMenu); DeleteMenu(NnetMenu); if (which) { myMenus[Fil ] = GetMenu(NfileMenu); myMenus[Edit] = GetMenu(NeditMenu); myMenus[Emul] = GetMenu(NtermMenu); myMenus[Net ] = GetMenu(NnetMenu ); myMenus[Keypad] = GetMenu(keyMenu); /* Baylor */ myMenus[Function] = GetMenu(funcMenu); /* Baylor */ DelMenuItem(myMenus[Conn],COnext); InsMenuItem(myMenus[Conn],(StringPtr)"\017Next Session/N\0",0); GetIndString(theMenuItem, MISC_STRINGS, NEXT_SESSION_STRING); SetItem(myMenus[Conn],COnext,theMenuItem); } else { myMenus[Fil ] = GetMenu(fileMenu); myMenus[Edit] = GetMenu(editMenu); myMenus[Emul] = GetMenu(termMenu); myMenus[Net ] = GetMenu( netMenu); myMenus[Keypad] = GetMenu(keyMenu); /* Baylor */ myMenus[Function] = GetMenu(funcMenu); /* Baylor */ DelMenuItem(myMenus[Conn],COnext); InsMenuItem(myMenus[Conn],(StringPtr)"\015Next Session\0",0); GetIndString(theMenuItem, MISC_STRINGS, NEXT_SESSION_STRING); SetItem(myMenus[Conn],COnext,theMenuItem); } } for(i=1; iKeyPadAndFuncMenus) { /* Baylor */ InsertMenu(myMenus[Keypad], 0); /* Baylor */ InsertMenu(myMenus[Function], 0); /* Baylor */ } AdjustMenus(); /* Hilite the right stuff */ if (TelInfo->MacBinary) CheckItem(myMenus[Fil],FLbin,TRUE); /* Check MacBinary ... */ else CheckItem(myMenus[Fil],FLbin,FALSE); if (TelInfo->ftplogon) CheckItem(myMenus[Fil],FLlog,TRUE); /* and the log .... */ else CheckItem(myMenus[Fil],FLlog,FALSE); if (TelInfo->ScrlLock) /* and the Suspend network ... */ CheckItem(myMenus[Net], NEscroll,TRUE); else CheckItem(myMenus[Net], NEscroll,FALSE); if (TelInfo->numwindows>0) /* and set the BSDEL flag */ CheckItem(myMenus[Emul], EMbs+screens[scrn].bsdel,FALSE); DrawMenuBar(); /* Draw what we have done */ SetupOpSpecSubmenu(myMenus[OpSpec]); if (!TelInfo->haveColorQuickDraw) DisableItem( myMenus[Emul], EMcolor); } /* setupmenu - Set up (load) all menus and prepare menu bar. * set default check marks. */ void setupmenu(short def, DialogPtr startupBox) { short scratchshort, i; Str255 scratchPstring; lastMenyCommandKeys = def; myMenus[0] = GetMenu(appleMenu); /* Get all of our friendly menus */ myMenus[Conn] = GetMenu(connMenu); myMenus[Font] = GetMenu(fontMenu); myMenus[FontOther] = GetMenu(fontMenu2); // RAB BetterTelnet 1.0.1 myMenus[Sizem] = GetMenu(sizeMenu); myMenus[OpSpec] = GetMenu(opspecMenu); myMenus[PrefsSub] = GetMenu(prefsMenu); myMenus[National] = GetMenu(transMenu); myMenus[Keypad] = GetMenu(keyMenu); /* Baylor */ myMenus[Function] = GetMenu(funcMenu); /* Baylor */ myMenus[Fil ] = GetMenu(NfileMenu); myMenus[Edit] = GetMenu(NeditMenu); myMenus[Emul] = GetMenu(NtermMenu); myMenus[Net ] = GetMenu(NnetMenu ); AddResMenu(myMenus[0], 'DRVR'); /* Add in the DA's */ InsertMenu(myMenus[0], 0); /* Insert the Menus into the bar */ InsertMenu(myMenus[OpSpec], 0); InsertMenu(myMenus[Conn], 0); if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */ InsertMenu(myMenus[Keypad], 0); /* Baylor */ InsertMenu(myMenus[Function], 0); /* Baylor */ } InsertMenu(myMenus[Font], -1); InsertMenu(myMenus[FontOther], -1); InsertMenu(myMenus[Sizem], -1); // InsertMenu(myMenus[OpSpec], -1); InsertMenu(myMenus[National], -1); InsertMenu(myMenus[PrefsSub], -1); if (!gApplicationPrefs->monospacedOut) AddResMenu(myMenus[Font], 'FONT'); /* Put the fonts in the font menu */ else addMonoSpacedFonts(myMenus[Font], startupBox); scratchshort = CountMItems(myMenus[Font]); for (i = 1; i <= scratchshort; i++) // RAB BetterTelnet 1.0.1 { GetItem(myMenus[Font],i,scratchPstring); AppendMenu(myMenus[FontOther],scratchPstring); } SetupOpSpecSubmenu(myMenus[OpSpec]); switchMenus(def, 0); } void addMonoSpacedFonts(MenuHandle theMenu, DialogPtr startupBox) { Boolean doItAll = FALSE; Handle theGoodFonts, theBadFonts; short numGoodFonts, numBadFonts,numFontsInMenu; short menuIndex; Str255 fontListName,currentFontName; //here begins the caching of fonts to save time caculating proportionality UseResFile(TelInfo->SettingsFile); theGoodFonts = Get1Resource('STR#',4000); //the good fonts if (!theGoodFonts) { UseResFile(TelInfo->ApplicationFile); theGoodFonts = Get1Resource('STR#',4000); theBadFonts = Get1Resource('STR#',5000); DetachResource(theGoodFonts); DetachResource(theBadFonts); UseResFile(TelInfo->SettingsFile); AddResource(theGoodFonts,'STR#',4000,"\pGood Fonts"); AddResource(theBadFonts,'STR#',5000,"\pBad Fonts"); } else theBadFonts = Get1Resource('STR#',5000); redoTheList: numGoodFonts = *(short *)(*theGoodFonts); if (numGoodFonts == 0) doItAll = TRUE; //we haven't created a list of fonts yet else numBadFonts = *(short *)(*theBadFonts); AddResMenu(theMenu,'FONT'); //add them all here numFontsInMenu = CountMItems(theMenu); if (numFontsInMenu != (numBadFonts + numGoodFonts)) { SetHandleSize(theGoodFonts,2); *((short *)*theGoodFonts) = 0; SetHandleSize(theBadFonts,2); *((short *)*theBadFonts) = 0; doItAll = TRUE; } if (!doItAll) //we have a list already { short goodFontIndex, badFontIndex; goodFontIndex = badFontIndex = 1; for (menuIndex = 1; menuIndex <= numFontsInMenu; menuIndex++) { //look at each font, see if its bad, good, or new GetItem(theMenu,menuIndex,currentFontName); GetIndString(fontListName,5000,badFontIndex); if (EqualString(currentFontName,fontListName,TRUE,FALSE)) { DelMenuItem(theMenu,menuIndex); //remove the bad font from the menu numFontsInMenu--; menuIndex--; badFontIndex++; } else { GetIndString(fontListName,4000,goodFontIndex); if (EqualString(currentFontName,fontListName,TRUE,FALSE)) goodFontIndex++; else //its a new font, and we didn't expect it; this means there were an equal { //number of fonts removed and added. Lets start over. short numberInMenu; numberInMenu = CountMItems(theMenu); for (;numberInMenu > 0; numberInMenu--) DelMenuItem(theMenu,numberInMenu);//clear the menu SetHandleSize(theGoodFonts,2);//clear the lists SetHandleSize(theBadFonts,2); goto redoTheList; } } } } else //create a new list { Str255 stemp; // DialogPtr dtemp; // dtemp = GetNewMyDialog(130, NULL, kInFront, (void *)SecondThirdCenterDialog); /* opening dialog */ // DrawDialog(dtemp); GetIndString(stemp, MISC_STRINGS, REBUILDING_FONT_MENU); SetTEText(startupBox, 3, stemp); for (menuIndex = 1; menuIndex <= numFontsInMenu; menuIndex++) { GetItem(theMenu,menuIndex,currentFontName); if (!isMonospacedFont(currentFontName)) { DelMenuItem(theMenu,menuIndex); //remove the bad font from the menu numFontsInMenu--; menuIndex--; PtrAndHand(currentFontName,theBadFonts,currentFontName[0]+1);//add it to the bad list (*(short *)(*theBadFonts))++; } else { PtrAndHand(currentFontName,theGoodFonts,currentFontName[0]+1);//add it to the good list (*(short *)(*theGoodFonts))++; } } // DisposDialog(dtemp); } ChangedResource(theGoodFonts); ChangedResource(theBadFonts); ReleaseResource(theGoodFonts); ReleaseResource(theBadFonts); UpdateResFile(TelInfo->SettingsFile); } Boolean isMonospacedFont(Str255 theFont) { Boolean haveNonRomanScripts,thisOneIsMonospaced = FALSE, doRomanTest = FALSE; short fond; long tempLong; //GrafPtr tempPort, savedPort; //first, open a temporary port to test CharWidth //tempPort = (GrafPtr)myNewPtrCritical(sizeof(GrafPort)); //GetPort(&savedPort); //OpenPort(tempPort); tempLong = GetScriptManagerVariable(smEnabled); //this returns number of scripts enable haveNonRomanScripts = (tempLong > 1); //if there is one, its roman GetFNum(theFont,&fond); if (haveNonRomanScripts) { long thisScriptEnabled; ScriptCode scriptNumber; scriptNumber = FontToScript(fond); if (scriptNumber != 0) //if its non-roman { thisScriptEnabled = GetScriptVariable(scriptNumber,smScriptEnabled); if (thisScriptEnabled) { //check if this font is the preferred monospaced font for its script long theSizeAndFond; short thePreferredFond; theSizeAndFond = GetScriptVariable(scriptNumber, smScriptMonoFondSize); thePreferredFond = theSizeAndFond >> 16; //high word is fond thisOneIsMonospaced = (thePreferredFond == fond); } else thisOneIsMonospaced = FALSE; //this font's script isn't enabled } else doRomanTest = TRUE; } else doRomanTest = TRUE; if (doRomanTest) { TextFont(fond); thisOneIsMonospaced = (CharWidth('W') == CharWidth('.')); } //SetPort(savedPort); //ClosePort(tempPort); //DisposePtr((Ptr)tempPort); return(thisOneIsMonospaced); } void CheckOpSpecSubmenu(void) { // short numItems; // UseResFile(TelInfo->SettingsFile); // numItems = Count1Resources(SESSIONPREFS_RESTYPE); // if ((CountMItems(myMenus[OpSpec]) - 2) != numItems) SetupOpSpecSubmenu(myMenus[OpSpec]); } void SetupOpSpecSubmenu(MenuHandle theMenu) { short scratchshort,numberofitems; LinkedListNode *theHead; scratchshort = (CountMItems(theMenu) - 2); for (; scratchshort>0; scratchshort--) DelMenuItem(theMenu, scratchshort + 2); UseResFile(TelInfo->SettingsFile); numberofitems = Count1Resources(SESSIONPREFS_RESTYPE); if (numberofitems) { theHead = createSortedList(SESSIONPREFS_RESTYPE,numberofitems,"\p"); //now we have a sorted linked list of the names addListToMenu/*2*/(theMenu, theHead, 3); deleteList(&theHead); } } /* updateMenuChecks() - update the check marks for file transfer * (MacBinary) */ void updateMenuChecks( void) { if (TelInfo->MacBinary) CheckItem(myMenus[Fil],FLbin,TRUE); /* Check MacBinary ... */ else CheckItem(myMenus[Fil],FLbin,FALSE); } /* DisplayMacBinary() - Sets the macbinary check mark according to the MacBinary flag */ void DisplayMacBinary( void) { if (TelInfo->MacBinary) CheckItem(myMenus[Fil],FLbin,TRUE); /* Check MacBinary ... */ else CheckItem(myMenus[Fil],FLbin,FALSE); } /*CheckFonts() - Place checkmarks and outlines on the appropriate * menu items for the fonts */ void CheckFonts(void) { short i, fsiz, fnum; long itemFontSize; Str255 temp, itemString; RSgetboldfont( screens[scrn].vs, &fnum); GetFontName(fnum, temp); for(i=1; i<= CountMItems( myMenus[FontOther]); i++) { GetItem( myMenus[FontOther], i, itemString); if (EqualString(temp, itemString, FALSE, FALSE)) CheckItem( myMenus[FontOther], i, TRUE); /* Check the current font */ else CheckItem( myMenus[FontOther], i, FALSE); } RSgetfont( screens[scrn].vs, &fnum, &fsiz); GetFontName(fnum, temp); for(i=1; i<= CountMItems( myMenus[Font]); i++) { GetItem( myMenus[Font], i, itemString); if (EqualString(temp, itemString, FALSE, FALSE)) CheckItem( myMenus[Font], i, TRUE); /* Check the current font */ else CheckItem( myMenus[Font], i, FALSE); } for(i=1; i<=CountMItems( myMenus[Sizem]); i++) { GetItem( myMenus[Sizem], i, itemString); /* JMB 2.6 -- Much safer to do it */ StringToNum(itemString, &itemFontSize); /* this way! */ if (fsiz == (short)itemFontSize) CheckItem( myMenus[Sizem], i, TRUE); /* Check Our Current Size */ else CheckItem( myMenus[Sizem], i, FALSE); if (RealFont( fnum, (short)itemFontSize)) /* Outline All Available REAL Sizes */ SetItemStyle( myMenus[Sizem], i, outline); else SetItemStyle( myMenus[Sizem], i, 0); } } /* applAbout - display the about dialog for the application.*/ void applAbout( void) { DialogPtr About; short itemhit; About=GetNewMyDialog( AboutDLOG, (Ptr) 0L,(WindowPtr) -1L, (void *)ThirdCenterDialog); if (About) { UItemAssign( About, 2, VersionNumberUPP); ModalDialog(NULL, &itemhit); DisposDialog(About); } } short ReallyClose( short scrn) { DialogPtr dtemp; short item; Str255 scratchPstring; SetCursor(theCursors[normcurs]); GetWTitle(screens[scrn].wind, scratchPstring); ParamText(scratchPstring, NULL, NULL, NULL); dtemp = GetNewMyDialog( CloseDLOG, NULL, kInFront, (void *)ThirdCenterDialog); item = DLOGCancel +1; while (item> DLOGCancel) ModalDialog(DLOGwOK_CancelUPP, &item); DisposDialog( dtemp); updateCursor(1); if (item == DLOGCancel) return(0); return(1); } PicHandle RGtoPICT(short i) { short j; PicHandle tpic; Rect trect; SetRect(&trect,0,0,384,384); j=VGnewwin(TEK_DEVICE_PICTURE,VGgetVS(i)); /* NCSA 2.5: get the right VS */ RGMPsize( &trect ); VGzcpy( i, j); /* Love dat zm factr */ tpic=OpenPicture(&trect); ClipRect(&trect); VGredraw(i,j); ClosePicture(); VGclose(j); return(tpic); } /* * copyGraph - Copy the current graphics screen. * dnum - the number of the drawing to copy . */ void copyGraph( short dnum) { long tlong; /* Temporary Variable */ PicHandle tpic; /* Mental picture of the thing */ tpic=RGtoPICT(dnum); /* Get the picture */ tlong=ZeroScrap(); /* Nobody else can live here */ HLock((Handle) tpic); /* Lock it for Puting */ tlong=PutScrap(GetHandleSize((Handle) tpic),'PICT', (Ptr) *tpic); /* Store as a PICT */ HUnlock((Handle) tpic); /* Unlock so we can toss it */ KillPicture(tpic); /* Kill the picture..... */ } /* * copyText - Copy the current selection on the virtual screen * vs - the number of the virtual screen to copy from */ void copyText( short vs) { char **charh; /* where to store the characters */ long tlong; /* Necessary temporary variable */ tlong=ZeroScrap(); /* This Scrap aint big enough for the both of us */ charh=RSGetTextSel(vs,0); /* Get the text selection */ if (charh == (char **)-1L) OutOfMemory(400); else if (charh != (char **)0L) { /* BYU LSC - Can't do anything without characters */ HLock(charh); /* Lock for putting */ tlong=PutScrap(GetHandleSize(charh),'TEXT',*charh); /* Put it as a TEXT resource */ HUnlock(charh); /* Unlock for disposal */ DisposHandle(charh); /* Kill the chars */ } } /* * copyTable - Copy the current selection on the virtual screen * vs - the number of the virtual screen to copy from */ void copyTable( short vs) { char **charh; /* where to store the characters */ long tlong; /* Necessary temporary variable */ tlong=ZeroScrap(); /* This Scrap aint big enough for the both of us */ charh=RSGetTextSel(vs, gApplicationPrefs->CopyTableThresh); /* Get the text selection */ if (charh>(char **)0L) { /* BYU LSC - Can't do anything without characters */ HLock(charh); /* Lock for putting */ tlong=PutScrap(GetHandleSize(charh),'TEXT',*charh); /* Put it as a TEXT resource */ HUnlock(charh); /* Unlock for disposal */ DisposHandle(charh); /* Kill the chars */ } else putln("No characters to copy darn it!"); } /* * paste - Paste the resource from the scrap into the current WIND, if * and only if it is really text */ void paste( void) { long off, /* offset */ length; /* the lenght of what is on the Scrap */ if (screens[scrn].clientflags & PASTE_IN_PROGRESS) { // One paste at a time, please SysBeep(4); return; } /* Flush the buffer if necessary */ //CCP fix for linemode if (screens[scrn].kblen>0) { netpush(screens[scrn].port); netwrite( screens[scrn].port, screens[scrn].kbbuf, screens[scrn].kblen); screens[scrn].kblen=0; } if (GetScrap(0L, 'TEXT', &off)<=0L) /* If there are no TEXT res's */ return; /* then we can't paste it */ screens[scrn].outhand=myNewHandle(0L); /* create a handle to put chars in */ length= GetScrap( screens[scrn].outhand, 'TEXT',&off); /* Store the scrap into the handle */ screens[scrn].outlen = length; /* Set the length */ HLock(screens[scrn].outhand); /* Lock the Handle down for safety */ screens[scrn].outptr=*screens[scrn].outhand; /* Set the pointer */ screens[scrn].clientflags |= PASTE_IN_PROGRESS; screens[scrn].isUploading = 0; screens[scrn].incount = 0; screens[scrn].outcount = 0; trbuf_mac_nat((unsigned char *)screens[scrn].outptr,screens[scrn].outlen, screens[scrn].national); /* LU: translate to national chars */ pasteText( scrn); /* BYU LSC - routine to paste to net, w/echo if neccessary */ } void uploadFile(void) // RAB: routine added in BetterTelnet 1.0fc9 { long length; StandardFileReply sfr; OSErr err; short refNum; if (screens[scrn].clientflags & PASTE_IN_PROGRESS) { // One paste at a time, please SysBeep(4); return; } StandardGetFile(0, -1, 0, &sfr); if (!sfr.sfGood) return; err = FSpOpenDF(&sfr.sfFile, fsCurPerm, &refNum); if (err) return; /* Flush the buffer if necessary */ //CCP fix for linemode if (screens[scrn].kblen>0) { netpush(screens[scrn].port); netwrite( screens[scrn].port, screens[scrn].kbbuf, screens[scrn].kblen); screens[scrn].kblen=0; } screens[scrn].outhand=myNewHandle(16384); // for now, upload block is 16K screens[scrn].outptr = *screens[scrn].outhand; HLock(screens[scrn].outhand); /* Lock the Handle down for safety */ length = 16384; FSRead(refNum, &length, screens[scrn].outptr); if (length == 0) { FSClose(refNum); HUnlock(screens[scrn].outhand); DisposeHandle(screens[scrn].outhand); return; } screens[scrn].outlen = length; /* Set the length */ HUnlock(screens[scrn].outhand); SetHandleSize(screens[scrn].outhand, length); // now REALLY set the length HLock(screens[scrn].outhand); screens[scrn].clientflags |= PASTE_IN_PROGRESS; if (length == 16384) { screens[scrn].isUploading = 1; screens[scrn].uploadRefNum = refNum; } else { FSClose(refNum); screens[scrn].isUploading = 0; } screens[scrn].incount = 0; screens[scrn].outcount = 0; trbuf_mac_nat((unsigned char *)screens[scrn].outptr,screens[scrn].outlen, screens[scrn].national); /* LU: translate to national chars */ pasteText(scrn); /* BYU LSC - routine to paste to net, w/echo if neccessary */ } void autoPaste(short vs) // RAB: routine added in BetterTelnet 1.0fc6 { char **charh; if (screens[scrn].clientflags & PASTE_IN_PROGRESS) { // One paste at a time, please SysBeep(4); return; } /* Flush the buffer if necessary */ //CCP fix for linemode if (screens[scrn].kblen>0) { netpush(screens[scrn].port); netwrite( screens[scrn].port, screens[scrn].kbbuf, screens[scrn].kblen); screens[scrn].kblen=0; } charh=RSGetTextSel(vs,0); /* Get the text selection */ if (charh == (char **)-1L) OutOfMemory(400); else if (charh != (char **)0L) { /* BYU LSC - Can't do anything without characters */ HLock(charh); screens[scrn].outhand=charh; screens[scrn].outlen = GetHandleSize(charh); /* Set the length */ screens[scrn].outptr=*screens[scrn].outhand; /* Set the pointer */ screens[scrn].clientflags |= PASTE_IN_PROGRESS; screens[scrn].isUploading = 0; screens[scrn].incount = 0; screens[scrn].outcount = 0; trbuf_mac_nat((unsigned char *)screens[scrn].outptr,screens[scrn].outlen, screens[scrn].national); /* LU: translate to national chars */ pasteText( scrn); /* BYU LSC - routine to paste to net, w/echo if neccessary */ } } void displayStatus(short n) { DialogPtr dptr; short item; Str255 scratchPstring,anotherString; SetCursor(theCursors[normcurs]); switch(screens[n].active) { case CNXN_ISCORPSE: GetWTitle(screens[n].wind, scratchPstring); GetIndString(anotherString,MISC_STRINGS,AWAITING_DISMISSAL_STRING); ParamText( scratchPstring, anotherString, NULL, NULL); break; case CNXN_OPENING: GetIndString(anotherString,MISC_STRINGS,BEING_OPENED_STRING); ParamText( screens[n].machine,anotherString, NULL, NULL); break; default: GetIndString(anotherString,MISC_STRINGS,BEING_LOOKED_UP); ParamText( screens[n].machine,anotherString, NULL, NULL); } dptr = GetNewMyDialog( StatusDLOG, NULL, kInFront, (void *)ThirdCenterDialog); item = DLOGCancel+1; while (item > DLOGCancel) ModalDialog(DLOGwOK_CancelUPP, &item); updateCursor(1); if (item == DLOGCancel) { netclose(screens[n].port); destroyport( n); } DisposDialog(dptr); } /* * changeport - handle the menu updates for changing from one port to another */ void changeport(short oldprt, short newprt) { //sprintf(tempspot,"oldscrn: %d, newscrn: %d",oldprt,newprt); putln(tempspot); if (screens[oldprt].active == CNXN_ACTIVE) CheckItem(myMenus[Conn], oldprt + FIRST_CNXN_ITEM, FALSE); /* Adjust Conn menu */ CheckItem(myMenus[Conn], newprt + FIRST_CNXN_ITEM, TRUE); CheckItem(myMenus[Emul], EMbs,FALSE); /* Adjust BS */ CheckItem(myMenus[Emul], EMdel,FALSE); CheckItem(myMenus[Emul], EMbs+screens[newprt].bsdel,TRUE); /* and DEL */ if (screens[newprt].tektype < 0) { // TEK is inhibited DisableItem(myMenus[Emul],EMclear); DisableItem(myMenus[Emul],EMpage); } else { EnableItem(myMenus[Emul],EMclear); EnableItem(myMenus[Emul],EMpage); if (screens[newprt].tekclear) /* BYU 2.4.8 */ CheckItem(myMenus[Emul],EMclear,TRUE); /* BYU 2.4.8 */ else /* BYU 2.4.8 */ CheckItem(myMenus[Emul],EMclear,FALSE); /* BYU 2.4.8 */ } if (screens[newprt].ESscroll) CheckItem(myMenus[Emul],EMscroll,TRUE); else CheckItem(myMenus[Emul],EMscroll,FALSE); if (screens[newprt].echo) /* LOCAL ECHO */ CheckItem(myMenus[Emul],EMecho,TRUE); else /* REMOTE ECHO */ CheckItem(myMenus[Emul],EMecho,FALSE); if (screens[newprt].wrap) /* wrap on */ CheckItem(myMenus[Emul],EMwrap,TRUE); else /* wrap off */ CheckItem(myMenus[Emul],EMwrap,FALSE); if (screens[newprt].crmap) CheckItem(myMenus[Emul],EMcrmap,TRUE); else CheckItem(myMenus[Emul],EMcrmap,FALSE); if (screens[newprt].ANSIgraphics) CheckItem(myMenus[Emul],EMansi,TRUE); else CheckItem(myMenus[Emul],EMansi,FALSE); if (screens[newprt].Xterm) CheckItem(myMenus[Emul],EMxterm,TRUE); else CheckItem(myMenus[Emul],EMxterm,FALSE); if (screens[newprt].remapCtrlD) CheckItem(myMenus[Emul],EMmapd,TRUE); else CheckItem(myMenus[Emul],EMmapd,FALSE); if (screens[newprt].allowBold) CheckItem(myMenus[Emul],EMbold,TRUE); else CheckItem(myMenus[Emul],EMbold,FALSE); if (screens[newprt].colorBold) CheckItem(myMenus[Emul],EMboldcolor,TRUE); else CheckItem(myMenus[Emul],EMboldcolor,FALSE); if (screens[newprt].ignoreBeeps) CheckItem(myMenus[Emul],EMbeep,TRUE); else CheckItem(myMenus[Emul],EMbeep,FALSE); if (screens[newprt].inversebold) CheckItem(myMenus[Emul],EMinverse,TRUE); else CheckItem(myMenus[Emul],EMinverse,FALSE); if (screens[newprt].qprint) CheckItem(myMenus[Emul],EMqprint,TRUE); else CheckItem(myMenus[Emul],EMqprint,FALSE); if (screens[newprt].ignoreff) CheckItem(myMenus[Emul],EMff,TRUE); else CheckItem(myMenus[Emul],EMff,FALSE); if (screens[newprt].eightbit) CheckItem(myMenus[Emul],EMeightbit,TRUE); else CheckItem(myMenus[Emul],EMeightbit,FALSE); if (screens[newprt].keypadmap) CheckItem(myMenus[Emul],EMmapkeypad,TRUE); else CheckItem(myMenus[Emul],EMmapkeypad,FALSE); if (VSiscapturing(screens[newprt].vs)) /* BYU 2.4.18 */ CheckItem(myMenus[Emul], EMcapture,TRUE); /* BYU 2.4.18 */ else /* BYU 2.4.18 */ CheckItem(myMenus[Emul], EMcapture,FALSE); /* BYU 2.4.18 */ if (screens[newprt].arrowmap) /* JMB */ CheckItem(myMenus[Emul],EMarrowmap, TRUE); /* JMB */ else /* JMB */ CheckItem(myMenus[Emul],EMarrowmap, FALSE); /* JMB */ if (screens[newprt].pgupdwn) /* JMB */ CheckItem(myMenus[Emul],EMpgupdwn, TRUE); /* JMB */ else /* JMB */ CheckItem(myMenus[Emul],EMpgupdwn, FALSE); /* JMB */ scrn=newprt; CheckFonts(); CheckNational(screens[newprt].national); } // Returns TRUE if the user cancelled the quit Boolean HandleQuit(void) { short i; Boolean liveConnections = FALSE, die = TRUE; if (TelInfo->numwindows>0) { for(i = 0; i < MaxSess; i++) { if ((screens[i].active == CNXN_ACTIVE)||(screens[i].active == CNXN_OPENING)) liveConnections = TRUE; } if (liveConnections) if (!gApplicationPrefs->dontWarnOnQuit) die = AskUserAlert(REALLY_QUIT_QUESTION, FALSE); if (die) { for (i = TelInfo->numwindows - 1; i >= 0; i--) { netclose(screens[i].port); destroyport(i); } } else return (TRUE); } if (gApplicationPrefs->destroyKTickets) DestroyTickets(); quit(); return (FALSE); } /* * HandleMenuCommand - preform a command denoted by the arguments. * mResult - the result of the menu event * modifiers- modifiers from the menu event */ void HandleMenuCommand( long mResult, short modifiers) { register short i; short theItem, theMenu; Boolean doWrap; theMenu = mResult >> 16; theItem = mResult & 0xffff; switch(theMenu) { case appleMenu: if (theItem==1) /* About Dialog */ applAbout(); else { Str255 name; GetItem(myMenus[0], theItem, name); /* Desk accessory */ OpenDeskAcc(name); } break; case fileMenu: case NfileMenu: switch(theItem) { case FLopen: PresentOpenConnectionDialog(); /* Open a connection */ break; case FLclose: /* Close a connection */ if (!FrontWindow()) break; // RAB BetterTelnet 1.2 - bug fix if (!(modifiers & optionKey)) CloseAWindow(FrontWindow()); else { Boolean die = TRUE; if (numberLiveConnections()) die = AskUserAlert(CLOSE_ALL_WINDOWS_Q, FALSE); if (die) { for (i = TelInfo->numwindows - 1; i >= 0; i--) { netclose(screens[i].port); destroyport(i); } } else break; } break; case FLload: /* Load a set */ LoadSet(); break; case FLsave: /* Save a set */ if (TelInfo->numwindows<1) break; SaveSet(0, (modifiers & optionKey)); break; case FLsavem: if (TelInfo->numwindows<1) break; SaveSet(1, (modifiers & optionKey)); break; case FLbin: /* Toggle MacBinary on/off */ TelInfo->MacBinary = !TelInfo->MacBinary; if (TelInfo->MacBinary) { CheckItem(myMenus[Fil], FLbin,TRUE); } else { CheckItem(myMenus[Fil], FLbin,FALSE); } break; case FLlog: /* Toggle FTP window on/off*/ TelInfo->ftplogon=!TelInfo->ftplogon; if(TelInfo->ftplogon) { CheckItem(myMenus[Fil],FLlog,TRUE); RSshow(ftplog->vs); SelectWindow(ftplog->wind); } else { CheckItem(myMenus[Fil],FLlog,FALSE); RShide(ftplog->vs); } break; case FLotp: otpinterface(0, 0, 0, 0, 0, 0, 0); break; case FLprint: /* Print Selection (or gr) */ PrintSelection(); break; case FLselect: SaveSelectionToFile(); break; case FLupload: if (TelInfo->numwindows<1) break; uploadFile(); break; case FLpset: /* Set up for printer */ PrintPageSetup(); break; case FLquit: (void) HandleQuit(); break; } break; case editMenu: case NeditMenu: if (!SystemEdit(theItem-1)) { /* Is this mine? */ switch(theItem) { case EDcopy: /* Copy */ i = MacRGfindwind(FrontWindow()); /* is ICR window? */ if (i >= 0) MacRGcopy(FrontWindow()); /* copy the ICR window */ else { i=RGgetdnum(FrontWindow()); if (i>-1) /* Copy Graphics */ copyGraph( i); else /* Copy Text */ if ( (i=RSfindvwind(FrontWindow())) >-1) copyText( i); } break; case EDcopyt: /* Copy Table */ /* * tech note #180 trick to get MultiFinder to pay attention */ if (!SystemEdit(EDcopy-1)) { /* tell it we did a copy */ i=RGgetdnum(FrontWindow()); if (i>-1) /* Copy Graphics */ copyGraph( i); else /* Copy Text */ if ( (i=RSfindvwind(FrontWindow())) >-1) copyTable( i); } break; case EDpaste: /* Paste */ if (TelInfo->numwindows<1) break; else paste(); /* Paste if there is a wind to do to*/ break; case EDretype: if (TelInfo->numwindows<1) break; i = MacRGfindwind(FrontWindow()); /* is ICR window? */ if (i >= 0) break; else { i=RGgetdnum(FrontWindow()); if (i>-1) /* Copy Graphics */ break; else /* Copy Text */ if ( (i=RSfindvwind(FrontWindow())) >-1) autoPaste( i); } break; case EDmacros: /* Set them Macros */ Macros(); break; case EDmacros+2: Cenviron(); break; case EDmacros+5: Cftp(); break; case EDmacros+4: EditConfigType(SESSIONPREFS_RESTYPE, &EditSession); CheckOpSpecSubmenu(); break; case EDmacros+3: EditConfigType(TERMINALPREFS_RESTYPE, &EditTerminal); break; case EDmacros+6: EditConfigType(FTPUSER, &EditFTPUser); default: break; } } break; case connMenu: case NconnMenu: if (theItem == COnext) { if (TelInfo->numwindows >1) { short scratchshort; if (!(modifiers & shiftKey)) //go forward { scratchshort = WindowPtr2ScreenIndex(FrontWindow()) + 1; // Skip over inactive connections while( (screens[scratchshort].active != CNXN_ACTIVE) && (screens[scratchshort].active != CNXN_ISCORPSE) && (scratchshort <= TelInfo->numwindows+1)) scratchshort++; if ((scratchshort < 0) || (scratchshort >= TelInfo->numwindows)) scratchshort = 0; } else //go backward { scratchshort = WindowPtr2ScreenIndex(FrontWindow()) - 1; // Skip over inactive connections while( (screens[scratchshort].active != CNXN_ACTIVE) && (screens[scratchshort].active != CNXN_ISCORPSE) && (scratchshort >= 0)) scratchshort--; if ((scratchshort < 0) || (scratchshort >= TelInfo->numwindows)) scratchshort = TelInfo->numwindows - 1; } SelectWindow(screens[scratchshort].wind); } break; } if (theItem == COtitle) { ChangeWindowName(FrontWindow()); break; } if (theItem >= FIRST_CNXN_ITEM) { if ((theItem - FIRST_CNXN_ITEM-1)>(TelInfo->numwindows+1)) break; /* rotten danish */ if (screens[theItem - FIRST_CNXN_ITEM].active != CNXN_ACTIVE) { displayStatus(theItem - FIRST_CNXN_ITEM); /* Tell them about it..... */ break; } else { HiliteWindow(screens[scrn].wind, FALSE); changeport(scrn,(theItem - FIRST_CNXN_ITEM)); if (!(modifiers & optionKey)) SelectWindow(screens[scrn].wind); else HiliteWindow(screens[scrn].wind, TRUE); } } break; case netMenu: case NnetMenu: switch(theItem) { case NEftp: /* Send FTP command */ case NEip: /* Send IP Number */ if (TelInfo->numwindows<1) break; { char tmpout[30]; /* Basically the same except for */ unsigned char tmp[4]; /* The ftp -n phrase in NEftp */ if (screens[scrn].echo && (screens[scrn].kblen>0)) { netwrite( screens[scrn].port, screens[scrn].kbbuf, screens[scrn].kblen);/* if not empty send buffer */ screens[scrn].kblen=0; } netgetip(tmp); if (theItem == NEftp) { if ((gFTPServerPrefs->ServerState == 1) && !(modifiers & shiftKey)) sprintf(tmpout,"ftp -n %d.%d.%d.%d\015\012",tmp[0],tmp[1],tmp[2],tmp[3]); else sprintf(tmpout,"ftp %d.%d.%d.%d\015\012",tmp[0],tmp[1],tmp[2],tmp[3]); } else sprintf(tmpout,"%d.%d.%d.%d",tmp[0],tmp[1],tmp[2],tmp[3]); netwrite(screens[scrn].port,tmpout,strlen(tmpout)); if (screens[scrn].echo) VSwrite(screens[scrn].vs,tmpout, strlen(tmpout)); } break; case NEayt: /* Send "Are You There?"*/ if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\366",2); break; case NEao: /* Send "Abort Output"*/ if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\365",2); screens[ scrn].timing = 1; /* set emulate to TMwait */ netwrite(screens[scrn].port, "\377\375\006",3); /* send TM */ break; case NEinter: /* Send "Interrupt Process"*/ if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\364",2); screens[ scrn].timing = 1; /* set emulate to TMwait */ netwrite(screens[scrn].port, "\377\375\006",3); /* send TM */ break; case NEbrk: if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\363",2); // IAC BRK break; case NEsync: if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netUrgent(); // This must be sent TCP Urgent. netwrite(screens[scrn].port, "\377\362",2); // IAC DM break; case NEipsync: if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\364", 2); // IAC IP netpush(screens[scrn].port); netUrgent(); // This must also be sent TCP Urgent. netwrite(screens[scrn].port, "\377\362", 2); // IAC DM netpush(screens[scrn].port); screens[scrn].timing = 1; // set emulate to TMwait netwrite(screens[scrn].port, "\377\375\006", 3); // send Timing Mark break; case NEec: /* Send "Erase Character"*/ if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\367",2); break; case NEel: /* Send "Erase Line"*/ if (TelInfo->numwindows<1) break; netpush(screens[scrn].port); netwrite(screens[scrn].port, "\377\370",2); break; case NEscroll: /* Suspend Network */ TelInfo->ScrlLock=!TelInfo->ScrlLock; if (TelInfo->ScrlLock) CheckItem(myMenus[Net], NEscroll,TRUE); else CheckItem(myMenus[Net], NEscroll,FALSE); break; case NEnet: /* Show Network Numbers */ showNetNumbers(); break; default: break; } break; case termMenu: case NtermMenu: switch(theItem) { case EMbs: /* Backspace for backspace */ if (TelInfo->numwindows<1) break; CheckItem(myMenus[Emul], EMbs+screens[scrn].bsdel,FALSE); screens[scrn].bsdel=0; CheckItem(myMenus[Emul], EMbs+screens[scrn].bsdel,TRUE); break; case EMdel: /* Delete for backspace */ if (TelInfo->numwindows<1) break; CheckItem(myMenus[Emul], EMbs+screens[scrn].bsdel,FALSE); screens[scrn].bsdel=1; CheckItem(myMenus[Emul], EMbs+screens[scrn].bsdel,TRUE); break; case EMecho: /* Toggle Local Echo (if poss.) */ if (TelInfo->numwindows < 1) break; if (screens[scrn].echo && (screens[scrn].kblen>0)) { netwrite( screens[scrn].port, screens[scrn].kbbuf, screens[scrn].kblen); /* if not empty send buffer */ screens[scrn].kblen=0; } screens[scrn].echo= !screens[scrn].echo; /* toggle */ if (screens[scrn].echo) { /* LOCAL ECHO */ if (!(modifiers & optionKey)) send_dont(screens[scrn].port,1); CheckItem(myMenus[Emul],EMecho,TRUE); } else { /* REMOTE ECHO */ if (!(modifiers & optionKey)) send_do(screens[scrn].port,1); CheckItem(myMenus[Emul],EMecho,FALSE); } break; case EMwrap: /* wrap mode */ if (TelInfo->numwindows < 1) break; if (!screens[scrn].wrap) { /* is off, turn on */ screens[scrn].wrap = 1; CheckItem( myMenus[Emul],EMwrap, TRUE); VSwrite(screens[scrn].vs, "\033[?7h",5); /* kick emulator */ } else { screens[scrn].wrap = 0; CheckItem( myMenus[Emul],EMwrap, FALSE); VSwrite(screens[scrn].vs, "\033[?7l",5); } break; case EMarrowmap: /* JMB */ if (TelInfo->numwindows < 1) break; /* JMB */ screens[scrn].arrowmap = !screens[scrn].arrowmap; /* JMB */ if (screens[scrn].arrowmap) /* JMB */ CheckItem( myMenus[Emul], EMarrowmap, TRUE); /* JMB */ else /* JMB */ CheckItem( myMenus[Emul], EMarrowmap, FALSE); /* JMB */ break; /* JMB */ case EMcrmap: if (TelInfo->numwindows < 1) break; screens[scrn].crmap = !screens[scrn].crmap; if (screens[scrn].crmap) CheckItem( myMenus[Emul], EMcrmap, TRUE); else CheckItem( myMenus[Emul], EMcrmap, FALSE); break; case EMansi: if (TelInfo->numwindows < 1) break; screens[scrn].ANSIgraphics = !screens[scrn].ANSIgraphics; if (screens[scrn].ANSIgraphics) CheckItem( myMenus[Emul], EMansi, TRUE); else CheckItem( myMenus[Emul], EMansi, FALSE); break; case EMxterm: if (TelInfo->numwindows < 1) break; screens[scrn].Xterm = !screens[scrn].Xterm; if (screens[scrn].Xterm) CheckItem( myMenus[Emul], EMxterm, TRUE); else CheckItem( myMenus[Emul], EMxterm, FALSE); break; case EMmapd: if (TelInfo->numwindows < 1) break; screens[scrn].remapCtrlD = !screens[scrn].remapCtrlD; if (screens[scrn].remapCtrlD) CheckItem( myMenus[Emul], EMmapd, TRUE); else CheckItem( myMenus[Emul], EMmapd, FALSE); break; case EMbold: if (TelInfo->numwindows < 1) break; screens[scrn].allowBold = !screens[scrn].allowBold; if (screens[scrn].allowBold) CheckItem( myMenus[Emul], EMbold, TRUE); else CheckItem( myMenus[Emul], EMbold, FALSE); RSchangebold(screens[scrn].vs, screens[scrn].allowBold, screens[scrn].colorBold, screens[scrn].inversebold); break; case EMboldcolor: if (TelInfo->numwindows < 1) break; screens[scrn].colorBold = !screens[scrn].colorBold; if (screens[scrn].colorBold) CheckItem( myMenus[Emul], EMboldcolor, TRUE); else CheckItem( myMenus[Emul], EMboldcolor, FALSE); RSchangebold(screens[scrn].vs, screens[scrn].allowBold, screens[scrn].colorBold, screens[scrn].inversebold); break; case EMinverse: if (TelInfo->numwindows < 1) break; screens[scrn].inversebold = !screens[scrn].inversebold; if (screens[scrn].inversebold) CheckItem( myMenus[Emul], EMinverse, TRUE); else CheckItem( myMenus[Emul], EMinverse, FALSE); RSchangebold(screens[scrn].vs, screens[scrn].allowBold, screens[scrn].colorBold, screens[scrn].inversebold); break; case EMbeep: if (TelInfo->numwindows < 1) break; screens[scrn].ignoreBeeps = !screens[scrn].ignoreBeeps; if (screens[scrn].ignoreBeeps) CheckItem( myMenus[Emul], EMbeep, TRUE); else CheckItem( myMenus[Emul], EMbeep, FALSE); VSbeepcontrol(screens[scrn].vs, screens[scrn].ignoreBeeps); break; case EMeightbit: if (TelInfo->numwindows < 1) break; screens[scrn].eightbit = !screens[scrn].eightbit; if (screens[scrn].eightbit) CheckItem( myMenus[Emul], EMeightbit, TRUE); else CheckItem( myMenus[Emul], EMeightbit, FALSE); break; case EMmapkeypad: if (TelInfo->numwindows < 1) break; screens[scrn].keypadmap = !screens[scrn].keypadmap; if (screens[scrn].keypadmap) CheckItem( myMenus[Emul], EMmapkeypad, TRUE); else CheckItem( myMenus[Emul], EMmapkeypad, FALSE); break; case EMpgupdwn: if (TelInfo->numwindows < 1) break; /* JMB */ screens[scrn].pgupdwn = !screens[scrn].pgupdwn; /* JMB */ if (screens[scrn].pgupdwn) /* JMB */ CheckItem( myMenus[Emul], EMpgupdwn, TRUE); /* JMB */ else /* JMB */ CheckItem( myMenus[Emul], EMpgupdwn, FALSE); /* JMB */ break; /* JMB */ case EMscroll: /* Scrollback on CLS */ if (TelInfo->numwindows<1) break; screens[scrn].ESscroll = !screens[scrn].ESscroll; VSscrolcontrol( screens[scrn].vs, -1, screens[scrn].ESscroll); if (screens[scrn].ESscroll) CheckItem(myMenus[Emul],EMscroll, TRUE); else CheckItem(myMenus[Emul],EMscroll, FALSE); break; case EMpage: /* TEK page command */ if (TelInfo->numwindows<1) break; parse( &screens[scrn], (unsigned char *) "\033\014",2); /* BYU LSC */ break; case EMclear: /* BYU 2.4.8 - Clear on TEK page */ if (TelInfo->numwindows<1) break; screens[scrn].tekclear = !screens[scrn].tekclear; if (screens[scrn].tekclear) CheckItem(myMenus[Emul],EMclear, TRUE); else CheckItem(myMenus[Emul],EMclear, FALSE); break; case EMscreensize: if (TelInfo->numwindows<1) break; /* NCSA: SB */ SetScreenDimensions((short)scrn, modifiers); /* NCSA: SB */ break; case EMreset: /* Reset Screen */ //RESTORE WRAP AFTER THE RESET!!! BUGG if (TelInfo->numwindows<1) break; doWrap = screens[scrn].wrap; VSreset(screens[scrn].vs); /* Reset it */ screens[scrn].timing=0; if (doWrap) VSwrite(screens[scrn].vs, "\033[?7h",5); else CheckItem( myMenus[Emul],EMwrap, FALSE); break; case EMjump: /* Jump Scroll */ if (TelInfo->numwindows<1) break; FlushNetwork(scrn); /* Flush it */ break; case EMsetup: /* need dialog to enter new key values */ setupkeys(); break; case EMcolor: /* Set color */ if (TelInfo->numwindows<1) break; if (TelInfo->haveColorQuickDraw) RScprompt(screens[scrn].vs); break; case EMAnsiColor: if (TelInfo->haveColorQuickDraw) { SetUpMovableModalMenus(); AnsiPrompt(0, 0); ResetMenus(); RSUpdatePalette(); } return; case EMqprint: screens[scrn].qprint = !screens[scrn].qprint; CheckItem(myMenus[Emul], EMqprint, screens[scrn].qprint); VSsetprintmode(screens[scrn].vs, screens[scrn].qprint); break; case EMff: screens[scrn].ignoreff = !screens[scrn].ignoreff; CheckItem(myMenus[Emul], EMff, screens[scrn].ignoreff); break; case EMcapture: /* BYU 2.4.18 - Capture session to file */ if (VSiscapturing(screens[scrn].vs)) { /* BYU 2.4.18 */ CloseCaptureFile(screens[scrn].vs); /* BYU 2.4.18 */ } else { /* BYU 2.4.18 */ if(VSopencapture(scrn, screens[scrn].vs)) /* BYU 2.4.18 */ CheckItem(myMenus[Emul], EMcapture,TRUE); /* BYU 2.4.18 */ } /* BYU 2.4.18 */ break; /* BYU 2.4.18 */ default: break; } break; case fontMenu: if (TelInfo->numwindows>0) { short itemFontNum; Str255 temp; GetItem( myMenus[Font], theItem, temp); GetFNum( temp, &itemFontNum); RSchangefont( screens[scrn].vs, itemFontNum, 0); CheckFonts(); } break; case fontMenu2: if (TelInfo->numwindows>0) { short itemFontNum; Str255 temp; GetItem( myMenus[FontOther], theItem, temp); GetFNum( temp, &itemFontNum); RSchangeboldfont( screens[scrn].vs, itemFontNum); CheckFonts(); } break; case sizeMenu: if (TelInfo->numwindows>0) { long itemFontSize; short currentSize, junk; Str255 temp; short numOfItems; numOfItems = CountMItems(myMenus[Sizem]); if (numOfItems == theItem) //use picked 'other...' { RSgetfont(screens[scrn].vs, &junk, ¤tSize); itemFontSize = SetOtherFontSize(currentSize); } else { GetItem( myMenus[Sizem], theItem, temp); /* JMB 2.6 -- Much safer to do it */ StringToNum(temp, &itemFontSize); /* this way! */ } RSchangefont( screens[scrn].vs, -1, itemFontSize); CheckFonts(); } break; case opspecMenu: // JMB switch (theItem) { case 1: EditConfigType(SESSIONPREFS_RESTYPE, &EditSession); CheckOpSpecSubmenu(); break; default: OpenPortSpecial(myMenus[OpSpec], theItem); } break; // JMB case prefsMenu: switch(theItem) { case prfGlobal: Cenviron(); break; case prfFTP: Cftp(); break; case prfSess: EditConfigType(SESSIONPREFS_RESTYPE, &EditSession); CheckOpSpecSubmenu(); break; case prfTerm: EditConfigType(TERMINALPREFS_RESTYPE, &EditTerminal); break; case prfFTPUser: EditConfigType(FTPUSER, &EditFTPUser); } break; case transMenu: if (TelInfo->numwindows>0) { CheckNational(theItem-1); // Set up the menu transBuffer(screens[scrn].national, theItem-1); // Translate the scrollback buffer // and redraw the screen VSredraw(screens[scrn].vs,0,0,VSmaxwidth(screens[scrn].vs),VSgetlines(screens[scrn].vs)-1); /* LU */ screens[scrn].national = theItem-1; } break; case keyMenu: KeyMenu(theItem); break; case funcMenu: FuncMenu(theItem); break; default: break; } HiliteMenu(0); } /* HandleMenuCommand */ // Take the user's new translation choice and make sure the proper tables exist to do // the translations. If there is a problem, return the default translation as the chouce. void CheckNational(short choice) { short i; for(i=1; i<=(nNational+1);i++) if ((choice+1) == i) /* Check the Current NatLang */ CheckItem( myMenus[National], i, TRUE); else CheckItem( myMenus[National], i, FALSE); } /* * extractmenu - remove a connection from the menu. */ void extractmenu(short screen) { DelMenuItem(myMenus[Conn], screen + FIRST_CNXN_ITEM); AdjustMenus(); } /* * addinmenu - add a connection's name to the menu in position pnum. (name is * an str255 pointed at by temps). */ void addinmenu( short screen, Str255 temps, char mark) { InsMenuItem(myMenus[Conn], "\pDoh", (screen-1) + FIRST_CNXN_ITEM); SetItem(myMenus[Conn], screen + FIRST_CNXN_ITEM, temps); // Avoid metas SetItemMark( myMenus[Conn], screen + FIRST_CNXN_ITEM, mark); AdjustMenus(); } /* Set the item mark for to opening connection */ void SetMenuMarkToOpeningForAGivenScreen( short scrn) { unsigned char c=0xa5; SetItemMark( myMenus[Conn], scrn + FIRST_CNXN_ITEM, c ); } /* Set the item mark for to opened connection */ void SetMenuMarkToLiveForAGivenScreen( short scrn) { SetItemMark( myMenus[Conn], scrn + FIRST_CNXN_ITEM, noMark); AdjustMenus(); } void DoTheMenuChecks(void) { short active; short windownum; if (TelInfo->numwindows>0) { EnableItem( myMenus[Conn],0); if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */ EnableItem(myMenus[Keypad], 0); /* Baylor */ EnableItem(myMenus[Function], 0); /* Baylor */ } DrawMenuBar(); } else { DisableItem(myMenus[Conn],0); if (gApplicationPrefs->KeyPadAndFuncMenus) { /* Baylor */ DisableItem(myMenus[Keypad], 0); /* Baylor */ DisableItem(myMenus[Function], 0); /* Baylor */ } DrawMenuBar(); } active =0; for (windownum=0;windownumnumwindows;windownum++) if (screens[windownum].active == CNXN_ACTIVE) active++; if (active<2) DisableItem(myMenus[Conn],COnext); else EnableItem(myMenus[Conn],COnext); if (!active) { DisableItem(myMenus[Edit],EDpaste); DisableItem(myMenus[Emul],0); DrawMenuBar(); } else { EnableItem(myMenus[Edit],EDpaste); EnableItem( myMenus[Emul],0); DrawMenuBar(); } if (TelInfo->macrosModeless) if (FrontWindow() == TelInfo->macrosModeless) { EnableItem(myMenus[Edit],EDcut); EnableItem(myMenus[Edit],EDcopy); EnableItem(myMenus[Edit],EDpaste); EnableItem(myMenus[Edit],EDclear); } } /*--------------------------------------------------------------------------*/ /* SetupMenusForSelection */ /* If there is a selection on screen, then let the user copy and print. */ /* If not, then, oh well....just disable the menus and forget about it */ /* ...and to think that this good stuff USED to be in rsmac.c. */ /* This is called from RSselect after the user clicks in the window, and */ /* was moved here for modularity - SMB */ /*--------------------------------------------------------------------------*/ void SetMenusForSelection (short selected) /* NCSA: SB */ { /* NCSA: SB */ if (!selected) /* NCSA: SB */ { /* NCSA: SB */ DisableItem(myMenus[Fil],FLprint); /* NCSA: SB */ DisableItem(myMenus[Fil],FLselect); DisableItem(myMenus[Edit],EDcopy); /* NCSA: SB */ DisableItem(myMenus[Edit],EDretype); // RAB BetterTelnet 1.0fc6 DisableItem(myMenus[Edit],EDcopyt); /* NCSA: SB */ } /* NCSA: SB */ else /* NCSA: SB */ { /* NCSA: SB */ EnableItem(myMenus[Fil],FLprint); /* NCSA: SB */ EnableItem(myMenus[Fil],FLselect); EnableItem(myMenus[Edit],EDcopy); /* NCSA: SB */ EnableItem(myMenus[Edit],EDretype); // RAB BetterTelnet 1.0fc6 EnableItem(myMenus[Edit],EDcopyt); /* NCSA: SB */ } /* NCSA: SB */ } /* NCSA: SB */ long SetOtherFontSize(short currentSize) { DialogPtr dtemp; Str255 currentSizeStr, newSizeStr; long newSize; Boolean GoodValue; short ditem; dtemp=GetNewMyDialog( OtherFontDLOG, NULL, kInFront, (void *)ThirdCenterDialog); InitCursor(); GoodValue = 0; while (!GoodValue) { GoodValue = TRUE; NumToString((long) currentSize, currentSizeStr); SetTEText(dtemp, FontSizeTE, currentSizeStr); ditem = 0; while(ditem != DLOGOk && ditem != DLOGCancel) ModalDialog(DLOGwOK_CancelUPP, &ditem); if (ditem == DLOGCancel) { DisposeDialog( dtemp); return currentSize; } GetTEText(dtemp, FontSizeTE, newSizeStr); StringToNum(newSizeStr, &newSize); if (newSize < 4) GoodValue = FALSE; if (!GoodValue) SysBeep(4); } DisposeDialog( dtemp); return (newSize); } /*----------------------------------------------------------------------*/ /* NCSA: SB - SetColumnWidth */ /* Allow the user to FINALLY pick how many columns he wants on the */ /* screen. Set up a dialog box to pick the # of columns, and then */ /* size-up the Telnet screen accordingly. NOTE: The user still needs */ /* to do a "resize", unless he is using NAWS */ /*----------------------------------------------------------------------*/ void SetScreenDimensions(short scrn, short modifiers) { DialogPtr dtemp; Str255 ColumnsSTR, LinesSTR; long columns, lines; short ditem, notgood; dtemp=GetNewMyDialog( SizeDLOG, NULL, kInFront, (void *)ThirdCenterDialog); SetCursor(theCursors[normcurs]); notgood = 1; lines = VSgetlines(screens[scrn].vs); columns = VSgetcols(screens[scrn].vs) + 1; while (notgood) { notgood = 0; /* Default to good */ NumToString(columns, ColumnsSTR); NumToString(lines, LinesSTR); SetTEText(dtemp, ColumnsNumber, ColumnsSTR); SetTEText(dtemp, LinesNumber, LinesSTR); SelIText( dtemp, ColumnsNumber, 0, 32767); ditem = 3; while(ditem>2) ModalDialog(DLOGwOK_CancelUPP, &ditem); if (ditem == DLOGCancel) { DisposeDialog( dtemp); return; } GetTEText(dtemp, ColumnsNumber, ColumnsSTR); StringToNum(ColumnsSTR, &columns); GetTEText(dtemp, LinesNumber, LinesSTR); StringToNum(LinesSTR, &lines); if (columns < 10) { columns = 10; notgood = 1; } else if (columns > 132) { columns = 132; notgood = 1; } if (lines < 10) { lines = 10; notgood = 1; } else if (lines > 200) { lines = 200; notgood = 1; } if (notgood) SysBeep(4); } DisposeDialog( dtemp); if (VSsetlines( screens[scrn].vs, lines) < 0) OutOfMemory(-4); else { RScalcwsize( screens[scrn].vs, columns); if ((screens[scrn].naws) && !(modifiers & optionKey)) SendNAWSinfo(&screens[scrn], (short)columns, (short)lines); } updateCursor(1); } void ChangeWindowName(WindowPtr theWindow) { DialogPtr dptr; short itemHit; Str255 theName; if( theWindow != NULL) { InitCursor(); dptr = GetNewMySmallDialog(WinTitlDLOG, NULL, kInFront, (void *)ThirdCenterDialog ); GetWTitle(theWindow, theName); SetTEText( dptr, kWinNameTE, theName); SelIText( dptr, kWinNameTE, 0, 250 ); itemHit = 0; while(itemHit != DLOGOk && itemHit != DLOGCancel) ModalDialog(DLOGwOK_CancelUPP, &itemHit); if(itemHit == DLOGOk) { GetTEText(dptr, kWinNameTE, theName); set_new_window_name(theName, theWindow); } DisposDialog(dptr); } } void set_new_window_name(Str255 theName, WindowPtr theWindow) { short i; if(theName[0]) { i = WindowPtr2ScreenIndex(theWindow); if (i >= 0) { i += FIRST_CNXN_ITEM; SetWTitle(theWindow, theName); SetItem(myMenus[Conn], i, theName); } } } void OpenSpecial(short theItem) { OpenPortSpecial(myMenus[OpSpec], theItem); } void SaveSelectionToFile(void) { short i; if (TelInfo->numwindows<1) return; i = MacRGfindwind(FrontWindow()); /* is ICR window? */ if (i >= 0) return; else { i=RGgetdnum(FrontWindow()); if (i>-1) /* Copy Graphics */ return; else /* Copy Text */ if ( (i=RSfindvwind(FrontWindow())) >-1) SaveThisSelection( i); } } void SaveThisSelection(short vs) { char **charh; OSErr err; StandardFileReply sfr; short refNum, exist; long tempCount; charh=RSGetTextSel(vs,0); /* Get the text selection */ if (charh == (char **)-1L) OutOfMemory(400); else if (charh != (char **)0L) { /* BYU LSC - Can't do anything without characters */ HLock(charh); /* Lock for putting */ StandardPutFile("\p", "\puntitled", &sfr); if (sfr.sfGood) { if ((err = FSpCreate(&sfr.sfFile, gApplicationPrefs->CaptureFileCreator, 'TEXT', sfr.sfScript)) == dupFNErr) exist = 1; err = FSpOpenDF(&sfr.sfFile, fsWrPerm, &refNum); if (exist) SetEOF(refNum, 0L); tempCount = GetHandleSize(charh); err = FSWrite(refNum, &tempCount, *charh); FSClose(refNum); } HUnlock(charh); /* Unlock for disposal */ DisposHandle(charh); /* Kill the chars */ } } \ No newline at end of file diff --git a/source/main/menuseg.proto.h b/source/main/menuseg.proto.h new file mode 100755 index 0000000..8b7e39f --- /dev/null +++ b/source/main/menuseg.proto.h @@ -0,0 +1 @@ + /* menuseg.c */ void CloseCaptureFile(short w); void AdjustMenus(void); void switchMenus(short, short); void setupmenu(short, DialogPtr); void CheckOpSpecSubmenu(void); void SetupOpSpecSubmenu(MenuHandle theMenu); void updateMenuChecks(void); void DisplayMacBinary(void); void CheckFonts(void); void applAbout(void); short ReallyClose(short scrn); PicHandle RGtoPICT(short i); void copyGraph(short dnum); void copyText(short vs); void copyTable(short vs); void paste(void); void autoPaste(short vs); void displayStatus(short n); void changeport(short oldprt, short newprt); Boolean HandleQuit(void); void HandleMenuCommand(long mResult, short modifiers); void CheckNational(short choice); short portsOpen(void); void extractmenu(short screen); void addinmenu(short screen, Str255 temps, char mark); void SetMenuMarkToOpeningForAGivenScreen(short scrn); void SetMenuMarkToLiveForAGivenScreen(short scrn); void DoTheMenuChecks(void); void SetMenusForSelection(short selected); void SetScreenDimensions(short, short); void ChangeWindowName(WindowPtr theWindow); void set_new_window_name(Str255 theName, WindowPtr theWindow); long SetOtherFontSize(short currentSize); void switchToOptionMenus(Boolean useOptionedStuff); void addMonoSpacedFonts(MenuHandle, DialogPtr); void scriptKbdInit(void); void CheckDefaultScriptSettings(void); Boolean isMonospacedFont(Str255 theFont); void switchToShiftMenus(Boolean useShiftStuff); void OpenSpecial(short); void SaveSelectionToFile(void); void SaveThisSelection(short); void uploadFile(void); \ No newline at end of file diff --git a/source/network/InternalEvents.h b/source/network/InternalEvents.h new file mode 100755 index 0000000..035c845 --- /dev/null +++ b/source/network/InternalEvents.h @@ -0,0 +1 @@ +/* first we have all of the neat network defines. Most of them are used by the DoNetEvents loop, as the custom network events */ /* the different types of network events... */ #define USERCLASS 1 /* user defined events */ #define SCLASS 8 #define CONCLASS 16 /* this has all of the connection events */ /* these are all of the connection events */ #define CONOPEN 1 /* connection has opened, CONCLASS */ #define CONDATA 2 /* there is data available on this connection */ #define CONCLOSE 3 /* the other side has closed its side of the connection */ #define CONFAIL 4 /* connection open attempt has failed */ /* all of the user-defined network events */ #define UDPDATA 1 /* UDP data has arrived on listening port, USERCLASS */ #define DOMAIN_DONE 2 /* domain name ready/failed */ #define DOMAIN_DONE2 3 // for reverse DNS lookups - thanks to Dan Hyde #define FTPCOPEN 20 /* FTP command connection has opened */ #define FTPCLOSE 21 /* FTP command connection has closed */ #define FTPBEGIN 22 #define FTPEND 23 /* FTP transfer ending */ #define FTPACT 2 /* FTP transfer is active, keep sending */ #define RCPACT 4 /* rcp is active, needs CPU time */ #define RETRYCON 5 /* retry connection packet, might be lost */ #define CLOSEDONE 6 /* Close completion routine has been called (for Mac Drivers only) */ #define UDATA 7 /* BYU mod - client ftp active */ #define RG_REDRAW 128 /* next two are for keeping track of pasting to session */ #define PASTELEFT 130 /* UserEvent, PASTELEFT causes pasteText */ #define HFTP 21 /* BYU mod: for ftp stuff */ // Port types (determines what routine should be called when data arrives on port) #define NO_TYPE -1 #define CNXN_TYPE 0 #define UDATA_TYPE 1 #define PDATA_TYPE 2 #define PFTP_TYPE 3 /*************************************************************************/ /* event queue * records what happens, especially errors, and keeps them for any * routines that poll, looking for what happened. * Eight event classes are masked in the event class byte. * There can be 256 event types per class. * The data field is handled differently by each event type. */ typedef struct internal_event { Ptr qLink; short qType; short eclass; /* class, defined in netevent.h */ short event; /* which event */ short data1; long data2; } internal_event; \ No newline at end of file diff --git a/source/network/MyMacTCPstructures.h b/source/network/MyMacTCPstructures.h new file mode 100755 index 0000000..3e916bc --- /dev/null +++ b/source/network/MyMacTCPstructures.h @@ -0,0 +1 @@ +#define noError 0 #define TCPBUFSIZ (1024*8) #define MAX_FDS_ELEMS 32 #define MAX_SWDS_ELEMS 16 typedef struct exfds { short inuse; /* Is this being used? */ wdsEntry fds; /* The real data */ } exfds; typedef struct StreamRec { // 470 bytes StreamPtr stream; /* Apple's lovely Stream Pointer */ char *buffer; /* Where the immovable TCP buffer is */ short push; /* TRUE if we should push next data block */ char *sbuffer; /* Where the send buffer is */ wdsEntry fds[MAX_FDS_ELEMS]; /* Free Data Structure list */ exfds exFDS[MAX_FDS_ELEMS]; /* exFDS entries */ short maxFDSused; /* Max of the FDS's that have been used */ // int mseg; /* BYU 2.4.15 */ // int service; /* BYU 2.4.15 */ short portType; /* UDATA, PDATA, PFTP, CNXN, NO_TYPE */ Ptr aedata; /* Ptr to Encryption data */ } StreamRec, *StreamRPtr; typedef struct MyTCPpb { // 106 Bytes TCPiopb pb; long SavedA5; } MyTCPpb, *MyTCPpbPtr; \ No newline at end of file diff --git a/source/network/mydnr.c b/source/network/mydnr.c new file mode 100755 index 0000000..900a2c5 --- /dev/null +++ b/source/network/mydnr.c @@ -0,0 +1 @@ +/* * Util.c * utility library for use with the Network kernel * * version 2, full session layer, TK started 6/17/87 */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment DNR #endif #include "InternalEvents.h" #include "wind.h" #include "bkgr.proto.h" #include "netevent.proto.h" #include "mydnr.proto.h" #include "Connections.proto.h" #include "AddressXlation.h" extern long MyA5; extern WindRec *screens; #ifdef __MWERKS__ #pragma profile off #endif typedef struct { short screen; long MyA5; OSErr theError; Str63 hostname; struct hostInfo *hinfo; } DNRDelayStruct; // for async name resolution pascal void DNRDone(struct hostInfo *hostInfoPtr, DNRDelayStruct *info); pascal void DNRDoneInit(struct hostInfo *hostInfoPtr, DNRDelayStruct *info); PROTO_UPP(DNRDoneInit, Result); // for reverse name lookup pascal void DNRDone2(struct hostInfo *hostInfoPtr, DNRDelayStruct *info); pascal void DNRDone2Init(struct hostInfo *hostInfoPtr, DNRDelayStruct *info); PROTO_UPP(DNRDone2Init, Result); /********************************************************************** * DotToNum - turn an address in dotted decimal into an internet address * returns True if the conversion was successful. This routine is * somewhat limited, in that it will accept only four octets, and does * not permit the abbreviated forms for class A and B networks. <- Steve Dorner **********************************************************************/ Boolean DotToNum(BytePtr string,ip_addr *nPtr) { unsigned long address=0; short b=0; BytePtr cp; short dotcount=0; /* * allow leading spaces */ for (cp=string+1;cp<=string+*string;cp++) if (*cp!=' ') break; /* * the address */ for (;cp<=string+*string;cp++) { if (*cp=='.') { if (++dotcount > 3) return (FALSE); /* only 4 octets allowed */ address <<= 8; address |= b; b=0; } else if (isdigit(*cp)) { b *= 10; b += (*cp - '0'); if (b>255) return (FALSE); /* keep it under 256 */ } else if (*cp==' ') /* allow trailing spaces */ break; else return (FALSE); /* periods or digits ONLY */ } /* * final checks, assignment */ if (dotcount!=3) return (FALSE); address <<= 8; address |= b; *nPtr = (ip_addr) address; return(TRUE); } /**************************************************************************/ /* For FTP to look up the transfer options to use when running */ Boolean TranslateIPtoDNSname(ip_addr ipnum, StringPtr machineName) { UNUSED_ARG(ipnum) UNUSED_ARG(machineName) // NEED TO IMPLEMENT THIS BUGG return(FALSE); } /*********************************************************************/ pascal void DNRDone(struct hostInfo *hostInfoPtr, DNRDelayStruct *info) { UNUSED_ARG(hostInfoPtr) netputevent(USERCLASS,DOMAIN_DONE,info->screen, (long)info); } SIMPLE_UPP(DNRDoneInit, Result); pascal void DNRDoneInit(struct hostInfo *hostInfoPtr, DNRDelayStruct *info) { long saveA5; DNRDelayStruct *mptr; struct hostInfo *hptr; mptr = info; hptr = hostInfoPtr; #ifndef __powerpc__ saveA5 = SetA5(mptr->MyA5); #endif DNRDone(hptr, mptr); #ifndef __powerpc__ SetA5(saveA5); #endif } // The following code for reverse DNS lookups was contributed by Dan Hyde. Thanks! // (added in BetterTelnet 1.0fc9 - RAB) /*********************************************************************/ pascal void DNRDone2(struct hostInfo *hostInfoPtr, DNRDelayStruct *info) { UNUSED_ARG(hostInfoPtr) netputevent(USERCLASS,DOMAIN_DONE2,info->screen, (long)info); } SIMPLE_UPP(DNRDone2Init, Result); pascal void DNRDone2Init(struct hostInfo *hostInfoPtr, DNRDelayStruct *info) { long saveA5; DNRDelayStruct *mptr; struct hostInfo *hptr; mptr = info; hptr = hostInfoPtr; #ifndef __powerpc__ saveA5 = SetA5(mptr->MyA5); #endif DNRDone2(hptr, mptr); #ifndef __powerpc__ SetA5(saveA5); #endif } /*********************************************************************/ // // On request, I'm modifying this to do reverse name lookup, too. // The idea is that we should convert the hostname passed to an IP // address (or series of them), and then convert the IP address to a // name. This gives us the particular machine name of a multihomed // hostname, e.g., login.itd.umich.edu, and allows other parts of // this code build the correct .rcmd string for kerberos use. // Dan Hyde, October 1996 // OSErr DoTheDNR(StringPtr hostname, short window) { DNRDelayStruct *Info; struct hostInfo *HInfo; ip_addr ip; Info = (DNRDelayStruct *)myNewPtr(sizeof(DNRDelayStruct)); HInfo = (struct hostInfo *)myNewPtr(sizeof(struct hostInfo)); if ((Info == NULL) || (HInfo == NULL)) return(memFullErr); Info->screen = window; #ifndef __powerpc__ Info->MyA5 = MyA5; #endif Info->hinfo = HInfo; BlockMove(hostname, Info->hostname, Length(hostname)+1); if (DotToNum(hostname, &ip)) { Info->hinfo->rtnCode = noErr; Info->hinfo->addr[0] = ip; DNRDone(HInfo, Info); return(noErr); } PtoCstr(Info->hostname); Info->theError = StrToAddr((char *)Info->hostname, HInfo, DNRDoneInitUPP, (Ptr)Info); if ((Info->theError != cacheFault) && (Info->theError != inProgress)) DNRDone(HInfo, Info); return(noErr); } // The event queue routines send us the screen number that DNRDone sent. We demangle // this mess of data and call CompleteConnectionOpening to do all of the port and screen // stuff that we shouldn't know about at this level. We are merely a non-interrupt level // flow control point. (i.e. I would do this from DNRDone, but that's interrupt time) // RAB BetterTelnet 1.0fc9 - added glue to Dan Hyde's reverse DNS code // Note that, unlike in Dan Hyde's version, reverse DNS is only done here // when Kerberos authentication is turned on. void HandleDomainDoneMessage(short screen, long data2) { DNRDelayStruct *Info = (DNRDelayStruct *)data2; ip_addr the_IP; struct hostInfo *HInfo; OSErr theErr; // The error, if any HInfo = Info->hinfo; the_IP = Info->hinfo->addr[0]; theErr = Info->hinfo->rtnCode; if (!screens[screen].authenticate) { CompleteConnectionOpening(screen, the_IP, theErr, Info->hinfo->cname); // We also dispose of the DNR memory allocations DisposePtr((Ptr)Info->hinfo); DisposePtr((Ptr)Info); } else { // Did things fail? if (theErr || (!the_IP)) { // pass the buck HandleDomainDone2Message(screen, data2); } else { /* Do reverse name lookup */ Info->theError = AddrToName(the_IP, HInfo, DNRDone2InitUPP, (Ptr)Info); if ((Info->theError != cacheFault) && (Info->theError != inProgress)) { DNRDone2(HInfo, Info); } } } } void HandleDomainDone2Message(short screen, long data2) { DNRDelayStruct *Info = (DNRDelayStruct *)data2; ip_addr the_IP; OSErr theErr; // The error, if any the_IP = Info->hinfo->addr[0]; theErr = Info->hinfo->rtnCode; CompleteConnectionOpening(screen, the_IP, theErr, Info->hinfo->cname); // We also dispose of the DNR memory allocations DisposePtr((Ptr)Info->hinfo); DisposePtr((Ptr)Info); } \ No newline at end of file diff --git a/source/network/mydnr.proto.h b/source/network/mydnr.proto.h new file mode 100755 index 0000000..1fd04b8 --- /dev/null +++ b/source/network/mydnr.proto.h @@ -0,0 +1 @@ +Boolean DotToNum(BytePtr string,ip_addr *nPtr); Boolean TranslateIPtoDNSname(ip_addr ipnum, StringPtr machineName); OSErr DoTheDNR(StringPtr hostname, short window); void HandleDomainDoneMessage(short screen, long infoptr); void HandleDomainDone2Message(short screen, long infoptr); \ No newline at end of file diff --git a/source/network/netevent.c b/source/network/netevent.c new file mode 100755 index 0000000..a117d25 --- /dev/null +++ b/source/network/netevent.c @@ -0,0 +1 @@ +/* * netevent.c * Originally by Gaige B. Paulsen */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* Network event handler for NCSA Telnet for the Macintosh * * Called by: * event.c * maclook.c * * NCSA Revisions: * 7/92 Telnet 2.6: added the 2 global structures, and cleaned up defines -- Scott Bulmahn */ #ifdef MPW #pragma segment Network #endif #include "netevent.proto.h" #include "InternalEvents.h" #include "wind.h" #include "mydnr.proto.h" #include "bkgr.proto.h" #include "maclook.proto.h" #include "network.proto.h" #include "menuseg.proto.h" #include "rsinterf.proto.h" #include "vrrgmac.proto.h" #include "tekrgmac.proto.h" #include "vsdata.h" #include "vskeys.h" #include "translate.proto.h" #include "parse.proto.h" #include "Connections.proto.h" #include "event.proto.h" #include "vsinterf.proto.h" #include "telneterrors.h" extern WindRec *screens; /* The screen array from Maclook */ //extern char *tempspot; /* 256 bytes for temp strings */ extern short scrn; short FileInTransit, gBlocksize[MaxSess], /* how large do we make the blocks when we read? */ gQueueError = 0, // Set to 1 if the queue fills up. gQueueLength = 0, // Used to monitor queue length for debugging purposes. gQueueInUse = 0; // Ditto. QHdr gEventsQueue, gEventsFreeQueue; unsigned char *gReadspace = 0; /* main buffer space */ #define PFTP 1 #define PRCP 2 #define PDATA 3 #ifdef __MWERKS__ #pragma profile off #endif // Our "give time" routine void Stask( void) { } // Every time we open or close a network connection, we add or remove a few elements // to/from the queue to assure that there will always be some free elements laying // around. This allows us to avoid Dequeue'ing at interrupt time, which causes // nasty mutex problems since we walk the queue in netgetevent at non-interrupt time. void ChangeQueueLength(short delta) { internal_event *theEvent; if (delta > 0) while (delta != 0) { theEvent = (internal_event *) myNewPtrCritical(sizeof(internal_event)); Enqueue((QElemPtr)theEvent, &gEventsFreeQueue); gQueueLength++; delta--; } else while (delta != 0) { theEvent = (internal_event *)gEventsFreeQueue.qHead; Dequeue((QElemPtr)theEvent, &gEventsFreeQueue); if (theEvent) DisposePtr((Ptr)theEvent); gQueueLength--; delta++; } } /***********************************************************************/ /* netgetevent * Retrieves the next event (and clears it) which matches bits in * the given mask. Returns the event number or -1 on no event present. * Also returns the exact class and the associated integer in reference * parameters. */ short netgetevent( // short mask, short *class, short *data1, long *data2 ) { internal_event *theEvent; short event; //#define QUEUE_STATS #ifdef QUEUE_STATS char qs[255]; static long timer = 0; if (TickCount() - timer > 60*30) { sprintf(qs, "QueueLength: %d, InUse: %d", gQueueLength, gQueueInUse); timer = TickCount(); putln(qs); } #endif QUEUE_STATS if (gQueueError) // Yikes, we actually ran out of queue elements! DebugStr("\pOut of Queue Elements, please quit as quickly as possible!"); // Spin until we hit the end of the queue or if we Dequeue an element that is not // already dequeued. If we don't do this check on Dequeue, someone else could come // in and dequeue an element that we are about to dequeue. Thus, WHAM! we both have // that queue element. while ((theEvent = (internal_event *)gEventsQueue.qHead) != NULL) { if (Dequeue((QElemPtr)theEvent, &gEventsQueue) == noErr) break; } // while ((theEvent != NULL) && !(theEvent->eclass & mask)) // theEvent = (internal_event *)theEvent->qLink; if (theEvent == NULL) return(-1); // (void) Dequeue((QElemPtr)theEvent, &gEventsQueue); *class = theEvent->eclass; *data1 = theEvent->data1; *data2 = theEvent->data2; event = theEvent->event; Enqueue((QElemPtr)theEvent, &gEventsFreeQueue); gQueueInUse--; return(event); } /***********************************************************************/ /* netputevent * add an event to the queue. * Will probably get the memory for the entry from the free list. * Returns 0 if there was room, 1 if an event was lost. */ short netputevent(short theclass, short what, short data1, long data2) { internal_event *theEvent; while ((theEvent = (internal_event *)gEventsFreeQueue.qHead) != NULL) { if (Dequeue((QElemPtr)theEvent, &gEventsFreeQueue) == noErr) break; } if (theEvent == NULL) { gQueueError = 1; // Darn, we filled the queue, alert the user. return(-1); } else gQueueInUse++; theEvent->qType = 0; theEvent->eclass = theclass; theEvent->event = what; theEvent->data1 = data1; theEvent->data2 = data2; Enqueue((QElemPtr)theEvent, &gEventsQueue); return(0); } /***************************************************************************/ /* netputuev * put a unique event into the queue * First searches the queue for like events */ short netputuev(short tclass, short what, short data1, long data2) { internal_event *theEvent = (internal_event *)gEventsQueue.qHead; while((theEvent != NULL) && ((theEvent->eclass != tclass) || (theEvent->event != what) || (theEvent->data1 != data1) || (theEvent->data2 != data2))) theEvent = (internal_event *)theEvent->qLink; if (theEvent != NULL) return(0); return(netputevent(tclass, what, data1, data2)); } void FlushNetwork(short scrn) { short cnt; RSskip(screens[scrn].vs, 1); /* Don't do any output */ cnt = gBlocksize[scrn]; /* just needs to be positive to begin with */ while (cnt>0) { cnt = netread(screens[scrn].port,gReadspace,gBlocksize[scrn]); parse( &screens[scrn ], gReadspace, cnt); } RSskip(screens[scrn].vs, 0); /* Do output now */ SetPort( screens[scrn].wind); InvalRect(&screens[scrn].wind->portRect); /* Don't forget to redraw */ } void pasteText(short scrn) { short amount; long uploadLength; if (!screens[scrn].outlen) return; if (netpush(screens[scrn].port) != 0) { /* BYU 2.4.16 - wait until not busy */ netputevent( USERCLASS, PASTELEFT, scrn,0); /* BYU 2.4.16 */ return; /* BYU 2.4.16 */ } /* BYU 2.4.16 */ if (screens[scrn].incount) { /* BYU 2.4.16 */ screens[scrn].incount = 0; /* BYU 2.4.16 */ screens[scrn].outcount = 0; /* BYU 2.4.16 */ netputevent( USERCLASS, PASTELEFT, scrn,0); /* BYU 2.4.16 */ return; /* BYU 2.4.16 */ } /* BYU 2.4.16 */ if (screens[scrn].outcount < 2) { /* BYU 2.4.16 */ screens[scrn].outcount++; /* BYU 2.4.16 */ netputevent( USERCLASS, PASTELEFT, scrn,0); /* BYU 2.4.16 */ return; /* BYU 2.4.16 */ } if (netqlen(screens[scrn].port) > 0) { /* BYU 2.4.16 - wait until not full */ netputevent( USERCLASS, PASTELEFT, scrn,0); /* BYU 2.4.16 */ return; /* BYU 2.4.16 */ } /* BYU 2.4.16 */ if (!screens[scrn].pastemethod) { // Do this all at once? amount = netwrite(screens[scrn].port, screens[scrn].outptr, screens[scrn].outlen); } else { // Nope, do it in blocks if (screens[scrn].pastesize <= screens[scrn].outlen) amount = screens[scrn].pastesize; else amount = screens[scrn].outlen; amount = netwrite(screens[scrn].port, screens[scrn].outptr, amount); } if (screens[scrn].echo) parse( &screens[scrn],(unsigned char *) screens[scrn].outptr,amount); screens[scrn].outlen -= amount; screens[scrn].outptr += (long) amount; if ((screens[scrn].isUploading) && (screens[scrn].outlen <= 0)) { HLock(screens[scrn].outhand); // Lock the Handle down for safety screens[scrn].outptr = *screens[scrn].outhand; uploadLength = 16384; FSRead(screens[scrn].uploadRefNum, &uploadLength, screens[scrn].outptr); if (uploadLength > 0) { screens[scrn].outlen = uploadLength; // Set the length HUnlock(screens[scrn].outhand); SetHandleSize(screens[scrn].outhand, uploadLength); // now REALLY set the length HLock(screens[scrn].outhand); screens[scrn].clientflags |= PASTE_IN_PROGRESS; if (uploadLength == 16384) { screens[scrn].isUploading = 1; } else { FSClose(screens[scrn].uploadRefNum); screens[scrn].isUploading = 0; } screens[scrn].incount = 0; screens[scrn].outcount = 0; trbuf_mac_nat((unsigned char *)screens[scrn].outptr,screens[scrn].outlen, screens[scrn].national); // LU: translate to national chars netputevent(USERCLASS, PASTELEFT, scrn, 0); return; } } if ( screens[scrn].outlen <=0) { int left; WindRec *tw = &screens[scrn]; tw->clientflags &= ~PASTE_IN_PROGRESS; if (screens[scrn].isUploading) FSClose(screens[scrn].uploadRefNum); HUnlock(tw->outhand); DisposHandle(tw->outhand); tw->outptr = (char *) 0L; tw->outhand = (char **) 0L; //this next loop is to unload the queue of stuff typed during the paste for (left = 0; left < tw->kblen; left++) { if ((tw->kbbuf[left]) == 0) //this signals a VSkey { left++; //send the VS key VSkbsend(tw->vs, (unsigned char) tw->kbbuf[left], tw->echo); } else { netpush(tw->port); if (tw->kbbuf[left+1] != 0x15) //not a KILLCHAR { if (tw->kbbuf[left] == '\015') // remap CR-> CR LF { netwrite(tw->port,"\015\012",2); if (tw->echo) parse(tw,(unsigned char *) "\012\015",2); return; } netwrite(tw->port,&(tw->kbbuf[left]),1); if (tw->echo && (tw->kbbuf[left]>31) && (tw->kbbuf[left] <127)) parse(tw,(unsigned char *)&(tw->kbbuf[left]),1); else if (tw->echo) { tw->kbbuf[left] += '@'; parse(tw,(unsigned char *) "^",1); /* BYU LSC */ parse(tw, (unsigned char *)&(tw->kbbuf[left]), 1); } } else left++; //user cancelled one keystroke with another } } } else netputevent( USERCLASS, PASTELEFT, scrn,0); } void DoNetEvents(void) { long ftptime = 0; short event, class, data1; long data2, pos; if ((event = netgetevent(&class, &data1, &data2)) < 0) return; if ( (TickCount() - ftptime > 60*2) && FileInTransit) { ftptime = TickCount(); Sftpstat(&pos); /* get transfer status */ if (pos <= 0) ftpmess("FTP Status: transferring\015\012"); else { char *temp; temp = myNewPtr(50); //enough room for this string if (temp == NULL) return; //Not enough memory to print status if (FileInTransit+2) sprintf((char *) temp,"FTP Status: %ld bytes remaining.\015\012", pos); /* BYU LSC */ else sprintf((char *) temp,"FTP Status: %ld bytes transferred.\015\012", pos); /* BYU LSC */ ftpmess((char *) temp); /* BYU LSC */ DisposePtr(temp); } } switch(class) { case SCLASS: switch (event) { case FTPACT: ftpd(0, data1); break; case CLOSEDONE: /* Used in the drivers */ netclose(data1); break; case CLOSEDONE+1: /* Used in the drivers */ netclose(data1); break; default: break; } break; case CONCLASS: /* Connection type event */ switch(GetPortType(data1)) { case PFTP: rftpd(event,data1); /* BYU 2.4.16 */ break; case PDATA: ftpd(event,data1); break; default: case CNXN_TYPE: switch (event) { case CONOPEN: /* connection opened or closed */ ConnectionOpenEvent(data1); break; case CONDATA: /* data arrived for me */ ConnectionDataEvent(data1); break; case CONFAIL: ConnectionFailedEvent(data1); break; case CONCLOSE: ConnectionClosedEvent(data1); break; default: break; } break; /* Case port type = CNXN_TYPE */ } break; /* CONCLASS */ case USERCLASS: switch (event) { case DOMAIN_DONE: // data1 = screen #, data2 = ptr to info structure HandleDomainDoneMessage(data1, data2); break; case DOMAIN_DONE2: // data1 = screen #, data2 = ptr to info structure HandleDomainDone2Message(data1, data2); break; case FTPBEGIN: FileInTransit=data1; ftptime=TickCount(); break; case FTPEND: ftpmess("FTP Transfer Concluding\015\012"); ftpmess("\015\012"); FileInTransit=0; break; case FTPCOPEN: { ip_addrbytes ftpinfo; Str255 remoteMachineName; char *temp; if (gFTPServerPrefs->ResetMacBinary) TelInfo->MacBinary = gFTPServerPrefs->UseMacBinaryII; updateMenuChecks(); TelInfo->xferon=1; updateCursor(1); ftpmess("-----------------------------------------------------------------------------\015\012"); ftpmess("FTP server initiated from host: "); temp = myNewPtr(80); ftpinfo.a.addr = Sftphost(); if (temp != NULL) //enough memory to tell the log about the ftp session { if (!TranslateIPtoDNSname(ftpinfo.a.addr, remoteMachineName)) sprintf((char *) &temp[4],"%u.%u.%u.%u\015\012", (unsigned char)ftpinfo.a.byte[0], (unsigned char)ftpinfo.a.byte[1], (unsigned char)ftpinfo.a.byte[2], (unsigned char)ftpinfo.a.byte[3]); else { PtoCstr(remoteMachineName); sprintf((char *) &temp[4],"%s\015\012",remoteMachineName); } ftpmess((char *) &temp[4]); /* BYU LSC */ DisposePtr(temp); } } break; case FTPCLOSE: TelInfo->xferon=0; updateCursor(1); if (gFTPServerPrefs->ResetMacBinary) TelInfo->MacBinary = gFTPServerPrefs->UseMacBinaryII; updateMenuChecks(); ftpmess("FTP server ending session\015\012"); ftpmess("-----------------------------------------------------------------------------\015\012"); ftpmess("\015\012"); break; case RG_REDRAW: /* RGredraw event */ if (VGalive(data1) && RGsupdate(data1)) TekEnable(data1); break; case PASTELEFT: pasteText(data1); break; default: break; } break; /* USERCLASS */ default: break; } /* switch (CLASS) */ } /* DoNetEvents */ /* setblocksize() Make sure that we have space for the block of data that is to be read each time the netread() is called. 2.7: Different gBlockSize for each scrn, same gReadSpace -- CCP */ short setReadBlockSize(short tosize, short scrn) { short currentSize; gBlocksize[scrn] = tosize; /* keep size of block */ if (tosize < 512) /* minimum buffer */ gBlocksize[scrn] = 512; if (gReadspace == NULL) { gReadspace = (unsigned char *) myNewPtrCritical(tosize+100); if (gReadspace == NULL) return -1; //ick--lets handle this better } else { currentSize = (short) GetPtrSize((Ptr)gReadspace); if (currentSize < (tosize+100)) //increase buffer size, if possible { DisposePtr((Ptr)gReadspace); gReadspace = (unsigned char *)myNewPtrCritical(tosize + 100); if (gReadspace == NULL) { if (NULL == (gReadspace = (unsigned char *)myNewPtrCritical(currentSize))) //try to get old size return(-1); //ick--lets handle this better gBlocksize[scrn] = currentSize; } } } return(0); } \ No newline at end of file diff --git a/source/network/netevent.proto.h b/source/network/netevent.proto.h new file mode 100755 index 0000000..e622c46 --- /dev/null +++ b/source/network/netevent.proto.h @@ -0,0 +1 @@ +void ChangeQueueLength(short delta); void Stask(void); short netputuev ( short class, short what, short data1, long data2 ); short netputevent ( short class, short what, short data1, long data2 ); short netgetevent( short *class, short *data1, long *data2 ); void DoNetEvents(void); short setReadBlockSize(short tosize, short scrn); void pasteText(short scrn); void FlushNetwork(short scrn); \ No newline at end of file diff --git a/source/network/network.c b/source/network/network.c new file mode 100755 index 0000000..067da80 --- /dev/null +++ b/source/network/network.c @@ -0,0 +1 @@ +// network.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * NCSA Revisions: * 10/87 Initial source release, Tim Krauskopf * 2/88 typedef support for other compilers (TK) * 8/88 Gaige Paulsen - support for MacTCP drivers * 1/89 TK - conversion to new drivers, minor update for new calling convention * 6/89 TK - update to MacTCP 1.0 include files and use of GetMyIPAddr() * 7/92 Scott Bulmahn - add support for 2 global structs, put cursors into an array * 11/92 Jim Browne - Fixed more bugs than I care to mention. * */ #ifdef MPW #pragma segment Network #endif #include "InternalEvents.h" #include "wind.h" #include "maclook.proto.h" #include "menuseg.proto.h" #include "mainseg.proto.h" #include "MyMacTCPstructures.h" #include "network.proto.h" #include "netevent.proto.h" #include "tnae.h" #include "authencrypt.h" #include "authencrypt.proto.h" #include "AddressXLation.h" #include "errors.proto.h" #include "telneterrors.h" #ifdef THINK_C #pragma options(!profile) #endif #ifdef __MWERKS__ #pragma profile off #endif //#define NET_DEBUG_MUCHINFO //#define NET_DEBUG #ifdef NET_DEBUG char net_debug_string[256]; #define net_debug_print(x) putln(net_debug_string) #else #define net_debug_print(x) #endif //PROTO_UPP(Notify, TCPNotify); //static TCPIOCompletionProcPtr OpenCompleteInit(TCPiopb *pbp); //PROTO_UPP(OpenCompleteInit, TCPIOCompletion); //static TCPIOCompletionProcPtr CloseCompleteInit(TCPiopb *pbp); //PROTO_UPP(CloseCompleteInit, TCPIOCompletion); //static TCPIOCompletionProcPtr SendCompleteInit(TCPiopb *pbp); //PROTO_UPP(SendCompleteInit, TCPIOCompletion); static TCPIOCompletionUPP OpenCompleteInitUPP = nil; static TCPIOCompletionUPP CloseCompleteInitUPP = nil; static TCPIOCompletionUPP SendCompleteInitUPP = nil; static TCPNotifyUPP NotifyUPP = nil; static void OpenComplete(MyTCPpbPtr pbp); static void SendComplete(MyTCPpbPtr pbp); static void CloseComplete(MyTCPpbPtr pbp); pascal void Notify(StreamPtr streamPtr, unsigned short code, Ptr uptr, unsigned short terminReason, struct ICMPReport *icmpMsg); static wdsEntry *getSWDS(void); static void returnSWDS(wdsEntry *wds); static void MyPBreturn(MyTCPpbPtr pbp); static MyTCPpb *getPB(short driver,short call, StreamPtr stream, short usernum); static void clearPB(MyTCPpbPtr pbp, short driver, short call, StreamPtr stream); static OSErr xPBControlSync(MyTCPpbPtr pbp); static OSErr xPBControlAsync(MyTCPpbPtr pbp, TCPIOCompletionUPP completionUPP); static short makestream(void); static void reclaim(StreamRPtr p); static short giveback(StreamRPtr p, wdsEntry *wds); static void compressfds(wdsEntry *fds); static void NetWriteZero(Ptr pointer,long size); //put this here to keep from loading and unlaoding config segment extern Cursor *theCursors[]; extern WindRec *screens; long MyA5; short TCPd = 0; /* refnum of TCP drivers */ QHdr gFreePBQueue; QHdr gFreeSWDSQueue; short numSWDS=0; /* Number of SWDS's ever alloc'd (PM Only) */ StreamRPtr streams[NPORTS]; ip_port nnfromport = 0; Boolean nextIsUrgent = FALSE; //CCP 2.7 (See NetUrgent ()) void NetWriteZero(Ptr pointer,long size) { while (size--) *pointer++ = 0; } /**************************************************************************/ wdsEntry *getSWDS(void) { short n=0; wdsEntry * wds; if (gFreeSWDSQueue.qHead == NULL) wds = (wdsEntry *) myNewPtrCritical( sizeof(wdsEntry) * MAX_SWDS_ELEMS); else { wds = (wdsEntry *) gFreeSWDSQueue.qHead; Dequeue(gFreeSWDSQueue.qHead, &gFreeSWDSQueue); } if (wds == NULL) { /* sorry, cant allocate WDS (BIG PROBLEM) */ DoError(508 | NET_ERRORCLASS, LEVEL3, NULL); // <- Is 508 correct? forcequit(); // return ((wdsEntry*) 0L); <- ?? perhaps } return(wds); } /**************************************************************************/ void returnSWDS(wdsEntry *wds) { Enqueue((QElemPtr)wds, &gFreeSWDSQueue); } /**************************************************************************/ void MyPBreturn(MyTCPpbPtr pbp) { Enqueue((QElemPtr)pbp, &gFreePBQueue); } /**************************************************************************/ MyTCPpb *getPB(short driver,short call, StreamPtr stream, short usernum) { UNUSED_ARG(usernum) MyTCPpb *pbp; if (gFreePBQueue.qHead == NULL) pbp = (MyTCPpbPtr) myNewPtrCritical( sizeof(MyTCPpb) ); else { pbp = (MyTCPpbPtr) gFreePBQueue.qHead; Dequeue(gFreePBQueue.qHead, &gFreePBQueue); } if (pbp == NULL) { /* sorry, cant allocate TCP buffer (BIG PROBLEM) */ DoError(508 | NET_ERRORCLASS, LEVEL3, NULL); forcequit(); } memset((char *) pbp, '\0', sizeof(MyTCPpb)); pbp->pb.ioCRefNum = driver; pbp->pb.tcpStream = stream; pbp->pb.csCode = call; return(pbp); } /**************************************************************************/ void clearPB(MyTCPpbPtr pbp, short driver, short call, StreamPtr stream) { NetWriteZero((Ptr)pbp, sizeof(MyTCPpb)); /* BYU LSC - Default to all zeros */ pbp->pb.ioCRefNum = driver; pbp->pb.tcpStream = stream; pbp->pb.csCode = call; } /**************************************************************************/ OSErr xPBControlSync(MyTCPpbPtr pbp) { pbp->pb.ioCompletion = 0L; /* Charlie will puke if he ever sees */ return PBControl((ParmBlkPtr)(pbp),false); /* his funtions here. -- JMB */ } /**************************************************************************/ OSErr xPBControlAsync(MyTCPpbPtr pbp, TCPIOCompletionUPP completionUPP) { #ifndef __powerpc__ pbp->SavedA5 = MyA5; #endif pbp->pb.ioCompletion = completionUPP; return(PBControl((ParmBlkPtr)(pbp),true)); /* async */ } void SetPortType(short port, short type) { if (port >= 0 && port < NPORTS && (streams[port] != NULL)) streams[port]->portType = type; } short GetPortType(short port) { if (port >= 0 && port < NPORTS && (streams[port] != NULL)) return(streams[port]->portType); else return(-1); } /**************************************************************************/ /* Returns an empty stream */ short makestream(void) { short pnum, i; StreamRPtr p; MyTCPpbPtr pbp; for ( pnum=0; (streams[pnum]!= NULL) && pnum= NPORTS) return(-2); if (!(p = streams[pnum] = (StreamRPtr) myNewPtrCritical(sizeof(StreamRec)))) return(-1); if ((p->buffer = (char *) myNewPtrCritical( TCPBUFSIZ)) == NULL) { DisposePtr((Ptr)p); streams[pnum] = 0; return(-1); } if ((p->sbuffer = (char *) myNewPtrCritical( TCPBUFSIZ)) == NULL) { DisposePtr((Ptr)p->buffer); DisposePtr((Ptr)p); streams[pnum] = 0; return(-1); } for (i=0; ifds[ i].length =0; p->fds[ i].ptr = 0L; p->exFDS[ i].inuse=0; p->exFDS[ i].fds.length=0;p->exFDS[ i].fds.ptr=0L; } p->fds[0].length = TCPBUFSIZ; p->fds[0].ptr = p->sbuffer; p->maxFDSused=0; p->aedata = NULL; pbp=getPB( TCPd, TCPCreate, (long) 0, 7); /* BYU LSC important - Make create call */ pbp->pb.csParam.create.rcvBuff = p->buffer; pbp->pb.csParam.create.rcvBuffLen = TCPBUFSIZ; pbp->pb.csParam.create.notifyProc = NotifyUPP; if (xPBControlSync(pbp) != noError) DoError (512 | NET_ERRORCLASS, LEVEL2, NULL); p->stream = pbp->pb.tcpStream; net_debug_print("Made new stream"); MyPBreturn(pbp); return(pnum); } /**************************************************************************/ /* reclaim( p) - reclaims buffer space to stream (from pointer p) into the FDS list */ void reclaim(StreamRPtr p) { short n=0, offset=0; while (offset < MAX_FDS_ELEMS && p->fds[offset].ptr != 0L) offset++; if (offset >= MAX_FDS_ELEMS) /* offset too large -- cant reclaim */ return; for (n=0 ; nexFDS[ n].inuse) { p->fds[ offset++]=p->exFDS[ n].fds; p->exFDS[ n].inuse = 0; } } } /************************************************************************** giveback( p, wds) - gives WDS entries back to the stream by putting them in the mutually exclusive buffer. p -> stream wds -> wds array */ short giveback(StreamRPtr p, wdsEntry *wds) { short n=0, m=0; while ( n< MAX_SWDS_ELEMS && wds[n].ptr !=0L) { while (m< MAX_FDS_ELEMS && p->exFDS[ m].inuse) m++; if (m >= MAX_FDS_ELEMS) // This was off by one - JMB 2.6 return(-1); /* No room in the RECLAIMation center */ else { p->exFDS[ m].inuse =1; p->exFDS[ m].fds = wds[n]; m++; } n++; } return 0; } /**************************************************************************/ /* compressfds( fds) compress an fds data structure to make everyone happy */ void compressfds(wdsEntry *fds) { short n,m,compressed; compressed = 0; while ( !compressed) { compressed=1; for (n=0; n< MAX_FDS_ELEMS; n++) { /* Slow Forwards */ if (fds[n].ptr) { /* Do if N exists */ for ( m = MAX_FDS_ELEMS -1; m>=0; m--) { /* Fast Backwards */ if (fds[m].ptr && (fds[m].ptr+fds[m].length == fds[n].ptr)) { fds[n].length+=fds[m].length; fds[n].ptr = fds[m].ptr; fds[m].ptr=0L; fds[m].length=0; compressed=0; } #ifdef CHECKBOTHWAYZ else if (fds[n].ptr+fds[n].length == fds[m].ptr) { fds[m].length+=fds[n].length; fds[n].ptr=0L; fds[n].length=0; compressed=0; } #endif CHECKBOTHWAYZ } } } } m=0;n=0; /* Close the gaps */ while (n+m < MAX_FDS_ELEMS) { while (fds[n+m].ptr ==0L && n+m< MAX_FDS_ELEMS) m++; /* increase gap to valid entry */ if (n+m= NPORTS) /* BYU 2.4.15 */ return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPStatus, p->stream, 1); /* Make status call */ if (xPBControlSync(pbp) != noError) /* status call bombed */ DoError (509 | NET_ERRORCLASS, LEVEL1, "Mnetread"); if (pbp->pb.csParam.status.connectionState !=8) { #ifdef NET_DEBUG sprintf(net_debug_string, "CState: %d is %d",(int)pnum, (int)pbp->pb.csParam.status.connectionState); net_debug_print(net_debug_string); #endif MyPBreturn(pbp); return(-1); /* Connection not established */ } inQ = pbp->pb.csParam.status.amtUnreadData; reqdamt = n >inQ ? inQ : n; clearPB( pbp, TCPd, TCPRcv, p->stream); pbp->pb.csParam.receive.rcvBuff = buffer; pbp->pb.csParam.receive.rcvBuffLen = reqdamt; if (reqdamt<1) { /* Drop out if no data */ MyPBreturn(pbp); return(0); } if ((i = xPBControlSync(pbp)) != noError) { DoError (524 | NET_ERRORCLASS, LEVEL1, NULL); return(-1); } reqdamt = pbp->pb.csParam.receive.rcvBuffLen; if (reqdamtaedata && ((tnParams *)p->aedata)->decrypting) { unsigned char *cp = (unsigned char *)buffer; short len = reqdamt; while (len-- > 0) { *cp = decrypt((tnParams *)p->aedata, (long)(*cp)); cp++; } } MyPBreturn(pbp); return(reqdamt); } //makes the next buffer be sent as urgent data void netUrgent(void) { nextIsUrgent = TRUE; } /************************************************************************/ /* netwrite * write something into the output queue, netsleep routine will come * around and send the data, etc. * */ short netwrite(short pnum, void *buffer, short nsend) { StreamRPtr p; wdsEntry *swds; short remaining, queued, n,m; MyTCPpbPtr pbp; OSErr err; #ifdef NET_DEBUG_MUCHINFO sprintf(net_debug_string, "port: %d\tbuffer: %lx\tnsend %d", pnum, (unsigned int)buffer, (int)nsend); net_debug_print(net_debug_string); #endif if (pnum < 0 || pnum >= NPORTS) /* BYU 2.4.15 */ return(-2); if ( (p = streams[pnum]) == NULL) return(-2); if ( !nsend ) return(0); swds = getSWDS(); if (swds == NULL) return(nsend); // Duh, Mr. Bulmahn. - JMB 2.6 reclaim( p); compressfds( p->fds); n=0; remaining = nsend; // if (p->fds[0].ptr == 0) DebugStr("\pArgh! fds[0] is NULL!"); while (p->fds[n].ptr !=0 && remaining>0 ) { // if (n >= MAX_SWDS_ELEMS) DebugStr("\pOverflowing SWDS in while loop!"); swds[n].ptr = p->fds[n].ptr; if ( p->fds[n].length > remaining) { swds[n].length = remaining; p->fds[n].length -= remaining; p->fds[n].ptr += remaining; remaining=0; } else { swds[n].length = p->fds[n].length; remaining -= p->fds[n].length; p->fds[n].length = 0; p->fds[n].ptr = 0; } n++; } if (n>p->maxFDSused) p->maxFDSused=n; compressfds( p->fds); queued = nsend-remaining; for(m=0; maedata && ((tnParams *)p->aedata)->encrypting) encrypt((tnParams *)p->aedata, (unsigned char *)swds[m].ptr, swds[m].length); buffer=(void *)((char *)buffer + swds[m].length); } swds[m].ptr = 0L; swds[m].length=0; pbp=getPB( TCPd, TCPSend, p->stream, 2); /* Make send call */ pbp->pb.csParam.send.wdsPtr = (Ptr) swds; pbp->pb.csParam.send.pushFlag = p->push; pbp->pb.csParam.open.ulpTimeoutValue = (SInt8)gApplicationPrefs->SendTimeout;// timeout value pbp->pb.csParam.open.ulpTimeoutAction = 1; // Abort pbp->pb.csParam.open.validityFlags = 0xC0; // Timeout and action are valid if (nextIsUrgent) { nextIsUrgent = FALSE; pbp->pb.csParam.send.urgentFlag = TRUE; } p->push=0; if ((err = xPBControlAsync(pbp, SendCompleteInitUPP)) != noError) { char temp_xvvyz[256]; sprintf(temp_xvvyz, "netwrite: %d", err); DoError(510 | NET_ERRORCLASS, LEVEL2, temp_xvvyz); return(-1); } return(queued); } /**************************************************************************/ /* Mnetpush * attempt to push the rest of the data from the queue * and then return whether the queue is empty or not (0 = empty) * returns the number of bytes in the queue. */ short netpush(short pnum) { StreamRPtr p; MyTCPpbPtr pbp; short inQ; OSErr err; if (pnum < 0 || pnum >= NPORTS) /* BYU 2.4.15 */ return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPStatus, p->stream, 3); /* Make status call */ //#ifdef NET_DEBUG_MUCHINFO // sprintf(net_debug_string, "TCPd == %d", TCPd); // net_debug_print(net_debug_string); //#endif if ((err = xPBControlSync(pbp)) != noError) { /* status call bombed */ char temp_xvvyz[256]; sprintf(temp_xvvyz, "netpush: %d", err); DoError(509 | NET_ERRORCLASS, LEVEL2, temp_xvvyz); } inQ = pbp->pb.csParam.status.amtUnackedData; MyPBreturn( pbp); p->push=1; return(inQ); } /**************************************************************************/ /* Mnetqlen * return the number of bytes waiting to be read from the incoming queue. */ short netqlen(short pnum) { StreamRPtr p; MyTCPpbPtr pbp; short inQ; if (pnum < 0 || pnum >= NPORTS) /* BYU 2.4.15 */ return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPStatus, p->stream, 4); /* Make status call */ if (xPBControlSync(pbp) != noError) /* status call failed */ DoError(509 | NET_ERRORCLASS, LEVEL2, "Mnetqlen"); inQ = pbp->pb.csParam.status.amtUnreadData; MyPBreturn( pbp); p->push = 1; return(inQ); } /**************************************************************************/ /* Mnetroom() * return how much room is available in output buffer for a connection */ short netroom(short pnum) { StreamRPtr p; short inQ, n; if (pnum < 0 || pnum >= NPORTS) /* BYU 2.4.15 */ return(-2); if (NULL == (p = streams[pnum])) return(-2); reclaim( p); compressfds( p->fds); #ifdef OLDM pbp=getPB( TCPd, TCPStatus, p->stream, 5); /* Make status call */ if (xPBControlSync(pbp) != noError) DoError(509 | NET_ERRORCLASS, LEVEL1, "Mnetroom"); inQ = pbp->csParam.status.sendWindow - pbp->csParam.status.amtUnackedData; MyPBreturn( pbp); #else /*#pragma unused(pbp) /* BYU LSC */ #endif inQ = n = 0; while (p->fds[n].ptr) { inQ += p->fds[n].length; /* add up free list space */ n++; } return(inQ); } /**************************************************************************/ void netgetip(unsigned char *st) { struct GetAddrParamBlock mypb; /* long netmask; */ net_debug_print("Attempting getmyipaddr"); NetWriteZero((Ptr)&mypb, sizeof(struct GetAddrParamBlock)); mypb.ioCRefNum = TCPd; /* BYU LSC - TCP driver has to be open by now */ mypb.csCode = ipctlGetAddr; if (PBControl((ParmBlkPtr)&mypb, false) != noError) { DoError(511 | NET_ERRORCLASS, LEVEL2, NULL); return; } BlockMove(&mypb.ourAddress, st, 4); /* BYU LSC - copy the address */ /* netmask is here if we want it, too */ } void netfromport /* next "open" will use this port */ ( short port) { nnfromport = (ip_port)port; } /**************************************************************************/ /* Mnetest? * is a particular session established yet? * Returns 0 if the connection is in the established state. */ short netest(short pnum) { StreamRPtr p; MyTCPpbPtr pbp; short inQ; if (pnum < 0 || pnum >= NPORTS) /* BYU 2.4.15 */ return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPStatus, p->stream, 6); /* Make status call */ if (xPBControlSync(pbp) != noError) { DoError(509 | NET_ERRORCLASS, LEVEL2, "Mnetest"); inQ = -1; } else inQ = pbp->pb.csParam.status.connectionState !=8; MyPBreturn( pbp); return(inQ); } /**************************************************************************/ /* Mnetlisten * Listen to a TCP port number and make the connection automatically when * the SYN packet comes in. The TCP layer will notify the higher layers * with a CONOPEN event. Save the port number returned to refer to this * connection. * * usage: portnum = netlisten(service); * short service; * */ short netlisten(ip_port serv) { short pnum; StreamRPtr p; MyTCPpbPtr pbp; pnum = makestream(); if (pnum < 0 || pnum >= NPORTS) /* BYU 2.4.15 */ return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPPassiveOpen, p->stream, 8); /* Make Listen call */ pbp->pb.csParam.open.localPort = serv; if (xPBControlAsync(pbp, OpenCompleteInitUPP) != noError) DoError(513 | NET_ERRORCLASS, LEVEL2, NULL); return(pnum); /* BYU 2.4.16 */ } /***********************************************************************/ /* Mnetgetftp * Provides the information that ftp needs to open a stream back to the * originator of the command connection. The other side's IP number * and the port numbers to be used to calculate the default data connection * number. Returns values in an integer array for convenient use in * PORT commands. */ short netgetftp(short pnum, ip_addr *addr, ip_port *localPort, ip_port *remotePort) { StreamRPtr p; MyTCPpbPtr pbp; if (pnum < 0) return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPStatus, p->stream, 9); /* Make status call */ if (xPBControlSync(pbp) != noError) DoError(514 | NET_ERRORCLASS, LEVEL2, NULL); *addr = pbp->pb.csParam.status.remoteHost; *localPort = pbp->pb.csParam.status.localPort; *remotePort = pbp->pb.csParam.status.remotePort; MyPBreturn( pbp); return 0; } /**************************************************************************/ /* Open a network socket for the user. */ short netxopen( ip_addr machine, ip_port service, short timeout ) // in seconds { short pnum; StreamRPtr p; MyTCPpbPtr pbp; pnum = makestream(); if (pnum < 0) return(-2); if (NULL == (p = streams[pnum])) return(-2); pbp=getPB( TCPd, TCPActiveOpen, p->stream, 10); /* Make Listen call */ pbp->pb.csParam.open.remoteHost = machine; /* IP # */ pbp->pb.csParam.open.remotePort = service; /* Port */ pbp->pb.csParam.open.localPort = nnfromport; /* My Port */ pbp->pb.csParam.open.ulpTimeoutValue = (SInt8)timeout; // timeout value pbp->pb.csParam.open.ulpTimeoutAction = 1; // Abort pbp->pb.csParam.open.validityFlags = 0xC0; // Timeout and action are valid nnfromport=0; /* Next one is random */ if (xPBControlAsync(pbp, OpenCompleteInitUPP) != noError) { DoError(515 | NET_ERRORCLASS, LEVEL2, NULL); return(-1); } SetPortType(pnum, NO_TYPE); // Is allocated to the user #ifdef NET_DEBUG sprintf(net_debug_string, "TCPOpen on port #%d", pnum); net_debug_print(net_debug_string); #endif return(pnum); /* BYU 2.4.16 */ } /**************************************************************************/ /* Mnetclose * Do appropriate actions to return connection state to SCLOSED which * enables the memory for that port to be reused. * * Specifically: * o If status is closed, then release the data structures * o If status is not close, perform bkgrd close which generates CLOSEDONE, * which should make the session layer call us again */ short netclose(short pnum) { StreamRPtr p; MyTCPpbPtr pbp; OSErr errorCode; short status; static short count=0; errorCode = 0; if (pnum < 0 || pnum >= NPORTS) /* is a valid port? */ return(-1); if ((p = streams[pnum]) == NULL) /* nothing there */ return (1); pbp=getPB( TCPd, TCPStatus, p->stream, 11); /* Make status call */ if ((errorCode = xPBControlSync(pbp)) != noError) { if ( errorCode == invalidStreamPtr) { DoError (516 | NET_ERRORCLASS, LEVEL2, "Mnetclose"); return(-1); } else { status=0; count =0; } } else { status = pbp->pb.csParam.status.connectionState; /* The connection Status */ if (count++ ==10) { status= 0; count =0; } } #ifdef NET_DEBUG sprintf(net_debug_string, "Mnetclose:error code=%i status=%d",(int)errorCode, status); net_debug_print(net_debug_string); #endif if (status < 18 && status >2 ) { /* We aren't closed yet ! */ #ifdef NET_DEBUG sprintf(net_debug_string, "TCPClose being attempted state ...[%d]",status); /* Prolly because outstanding close */ net_debug_print(net_debug_string); #endif clearPB( pbp, TCPd, TCPClose, p->stream); /* Make Close call */ if ((errorCode=xPBControlAsync(pbp, CloseCompleteInitUPP)) != noError) { /* TCP close failed */ DoError(517 | NET_ERRORCLASS, LEVEL2, "Mnetclose"); return (errorCode); } /* Go ahead and return... PB is in use by Async Close call. */ return (0); /* Return with OK */ } /* IF we got here, we must be at closed state, so free memory */ #ifdef NET_DEBUG sprintf(net_debug_string, "TCP being released, status = %d", status); net_debug_print(net_debug_string); #endif clearPB( pbp,TCPd, TCPRelease, p->stream); /* Make Release call */ if (xPBControlSync(pbp) != noError) { /* TCP failed to be released. Let us know... */ DoError (518 | NET_ERRORCLASS, LEVEL2, "Mnetclose"); return (-1); } DisposPtr( p->buffer); /* Free Receive Buffer */ DisposPtr( p->sbuffer); /* Free Send Buffer */ DisposPtr((Ptr) p); /* Free Stream Structure */ streams[pnum]=0L; netportencryptstate(pnum, 0); MyPBreturn(pbp); return(0); } /**************************************************************************/ /* Nuke the connection, NOW! */ short netabort(short pnum) { StreamRPtr p; MyTCPpbPtr pbp; OSErr errorCode = noErr; if (pnum < 0 || pnum >= NPORTS) /* is a valid port? */ return(-1); if ((p = streams[pnum]) != NULL) /* something there */ { pbp=getPB( TCPd, TCPAbort, p->stream, 12); /* Make Close call */ if ((errorCode=xPBControlSync(pbp)) != noError) /* TCP abort failed. Bad news */ DoError (519 | NET_ERRORCLASS, LEVEL1, NULL); clearPB( pbp,TCPd, TCPRelease, p->stream); /* Make Close call */ if (xPBControlSync(pbp) != noError) { DoError (518 | NET_ERRORCLASS, LEVEL2, NULL); return(-1); } } else return(1); DisposPtr( p->buffer); /* Free Receive Buffer */ DisposPtr( p->sbuffer); /* Free Send Buffer */ DisposPtr((Ptr) p); /* Free Stream Structure */ streams[pnum]=0L; MyPBreturn(pbp); return(0); } /**************************************************************************/ /* Mnetinit * Calls all of the various initialization routines that set up queueing * variables, static values, reads configuration files, etc. */ void Mnetinit( void) { short i; OSErr err; if (TelInfo->startedTCP) return; // demand-load TCP (RAB BetterTelnet 1.0fc4) TelInfo->startedTCP = 1; // RAB BetterTelnet 1.0fc4 #ifndef __powerpc__ MyA5 = SetCurrentA5(); #endif OpenResolver(NULL); // open DNS and discard any errors (RAB BetterTelnet 1.0fc4) for (i=0; istream))) pnum++; if (pnum >=NPORTS) return(-1); else return(pnum); } /**************************************************************************/ pascal void Notify(StreamPtr streamPtr, unsigned short code, Ptr uptr, unsigned short terminReason, struct ICMPReport *icmpMsg) { UNUSED_ARG(uptr) UNUSED_ARG(terminReason) UNUSED_ARG(icmpMsg) StreamRPtr p; short pnum; pnum = findbystream(streamPtr); if (pnum < 0 || (p = streams[pnum]) == 0L) return; switch( code) { case TCPTerminate: case TCPClosing: netputevent(CONCLASS, CONCLOSE, pnum,0); break; case TCPULPTimeout: netputevent(CONCLASS, CONFAIL, pnum,0); break; case TCPDataArrival: case TCPUrgent: netputuev(CONCLASS, CONDATA, pnum,0); break; case TCPICMPReceived: default: break; } return; } /**************************************************************************/ static void OpenCompleteInit(TCPiopb *pbp) { long saveA5; MyTCPpbPtr myptr; myptr = (MyTCPpbPtr)pbp; #ifndef _powerpc_ saveA5 = SetA5(myptr->SavedA5); #endif OpenComplete(myptr); #ifndef _powerpc_ SetA5(saveA5); #endif } /**************************************************************************/ void OpenComplete(MyTCPpbPtr pbp) { StreamRPtr p; short pnum; pnum= findbystream(pbp->pb.tcpStream); if (pnum < 0 || (p = streams[pnum]) == 0L) { MyPBreturn(pbp); //BUGG: Shouldn't we return here so we don't MyPBreturn twice? return; //I'll assume so (CCP) } if (pbp->pb.ioResult !=noError) netputevent(CONCLASS, CONFAIL, pnum,pbp->pb.ioResult); /* Failure ... */ else netputevent(CONCLASS, CONOPEN, pnum,0); /* Success ! */ MyPBreturn( pbp); } /**************************************************************************/ void SendComplete(MyTCPpbPtr pbp) { StreamRPtr p; short pnum; wdsEntry *swds; swds = (wdsEntry *) pbp->pb.csParam.send.wdsPtr; pnum = findbystream(pbp->pb.tcpStream); if (pnum < 0 || (p = streams[pnum]) == 0L) { MyPBreturn(pbp); return; } MyPBreturn( pbp); giveback( p, (wdsEntry *) pbp->pb.csParam.send.wdsPtr); /* BYU LSC - Give this back.... NOW */ returnSWDS( swds); } /**************************************************************************/ static void SendCompleteInit(TCPiopb *pbp) { long saveA5; MyTCPpbPtr myptr; myptr = (MyTCPpbPtr)pbp; #ifndef _powerpc_ saveA5 = SetA5(myptr->SavedA5); #endif SendComplete(myptr); #ifndef _powerpc_ SetA5(saveA5); #endif } /**************************************************************************/ void CloseComplete(MyTCPpbPtr pbp) { StreamRPtr p; short pnum; pnum= findbystream(pbp->pb.tcpStream); if (pnum < 0 || (p = streams[pnum]) == 0L) { netputevent(SCLASS, CLOSEDONE+1, pnum,0); MyPBreturn(pbp); return; } if (pbp->pb.ioResult !=noError) netputevent(SCLASS, CLOSEDONE+1, pnum,0); else netputevent(SCLASS, CLOSEDONE, pnum,0); /* Success ! */ MyPBreturn( pbp); } /**************************************************************************/ static void CloseCompleteInit(TCPiopb *pbp) { long saveA5; MyTCPpbPtr myptr; myptr = (MyTCPpbPtr)pbp; #ifndef _powerpc_ saveA5 = SetA5(myptr->SavedA5); #endif CloseComplete(myptr); #ifndef _powerpc_ SetA5(saveA5); #endif } short netportencryptstate (short port, Ptr edata) { StreamRPtr p; if (port < 0 || port >= NPORTS) return(-2); if ((p = streams[port]) == NULL) return(-2); p->aedata = edata; return 0; } void networkUPPinit(void) { OpenCompleteInitUPP = NewTCPIOCompletionProc(OpenCompleteInit); CloseCompleteInitUPP = NewTCPIOCompletionProc(CloseCompleteInit); SendCompleteInitUPP = NewTCPIOCompletionProc(SendCompleteInit); NotifyUPP = NewTCPNotifyProc(Notify); } \ No newline at end of file diff --git a/source/network/network.proto.h b/source/network/network.proto.h new file mode 100755 index 0000000..165f542 --- /dev/null +++ b/source/network/network.proto.h @@ -0,0 +1 @@ +void SetPortType(short port, short type); short GetPortType(short port); short netread(short pnum, void *buffer, short n); short netwrite(short pnum, void *buffer, short nsend); short netpush(short pnum); short netqlen(short pnum); short netroom(short pnum); void netgetip(unsigned char *st); void netfromport /* next "open" will use this port */ ( short port ); short netest(short pnum); short netlisten(ip_port serv); short netgetftp(short pnum, ip_addr *addr, ip_port *localPort, ip_port *remotePort); short netxopen( ip_addr machine, ip_port service, short timeout); short netclose(short pnum); short netabort(short pnum); void Mnetinit( void); void netshut(void); short findbystream(StreamPtr streamPtr); short netportencryptstate (short port, Ptr edata); void networkUPPinit(void); void netUrgent(void); \ No newline at end of file diff --git a/source/parse/KrbDriver.h b/source/parse/KrbDriver.h new file mode 100755 index 0000000..f2e3854 --- /dev/null +++ b/source/parse/KrbDriver.h @@ -0,0 +1 @@ +/* KrbDriver.h -- Application interface for Kerberos Client (mac system extension) This interface can be used as is or it can be accessed at a higher level using the c++ interface (Kerberos.h). Set the compiler def KRB_DRIVER only if you are including krb.h in your code (this is only necessary for the driver itself) Copyright 1992 by Cornell University Initial coding 1/92 by Peter Bosanko. */ #ifndef _KrbDriver_ #define _KrbDriver_ /* csCodes for Control Calls */ enum { cKrbKillIO = 1, /* Low level routines, here for compatability with Brown Driver */ cKrbGetLocalRealm, cKrbSetLocalRealm, cKrbGetRealm, cKrbAddRealmMap, cKrbDeleteRealmMap, cKrbGetNthRealmMap, cKrbGetNthServer, cKrbAddServerMap, cKrbDeleteServerMap, cKrbGetNthServerMap, cKrbGetNumSessions, cKrbGetNthSession, cKrbDeleteSession, cKrbGetCredentials, cKrbAddCredentials, cKrbDeleteCredentials, cKrbGetNumCredentials, cKrbGetNthCredentials, /* High Level routines */ cKrbDeleteAllSessions, /* Removes all credentials from storage. The user will be asked to enter user name and password the next time a ticket is requested */ cKrbGetTicketForService, /* Gets a ticket and returns it to application in buf -> service Formal Kerberos name of service -> buf Buffer to receive ticket -> checksum checksum for this service <-> buflen length of ticket buffer (must be at least 1258 bytes) <- sessionKey for internal use <- schedule for internal use */ cKrbGetAuthForService, /* Similiar to cKrbGetTicketForService except it builds a kerberos "SendAuth" style request (with SendAuth and application version numbers preceeding the actual ticket) -> service Formal Kerberos name of service -> buf Buffer to receive ticket -> checksum checksum for this service -> applicationVersion version number of the application (8 byte string) <-> buflen length of ticket buffer (must be at least 1258 bytes) <- sessionKey for internal use <- schedule for internal use */ // Use the same krbHiParmBlock for the routines below that you used to get the ticket for the service. // That way the session key and schedule will get passed back to the driver. cKrbCheckServiceResponse, /* Use the return code from this call to determine if the client is properly authenticated -> buf points to the begining of the server response -> buflen length of the server response -> sessionKey this was returned from cKrbGetTicketForService call -> schedule " -> checksum left over from cKrbGetTicketForService call -> lAddr addresses used for service validation... -> lPort " -> fAddr " -> fPort " */ cKrbEncrypt, /* Encrypt stream, High level version of cKrbMakePrivate -> buf points to the begining of stream buffer -> buflen length of the stream buffer -> sessionKey this was returned from cKrbGetTicketForService call -> schedule " -> lAddr server uses addresses to confirm who we are... -> lPort " -> fAddr " -> fPort " -> encryptBuf output buffer, allow 26 more bytes than input data <- encryptLength actual length of output data */ cKrbDecrypt, /* Decrypt stream, High level version of cKrbReadPrivate -> buf points to the begining of stream buffer -> buflen length of the stream buffer -> sessionKey this was returned from cKrbGetTicketForService call -> schedule " -> lAddr addresses used to confirm source of message... -> lPort " -> fAddr " -> fPort " <- decryptOffset offset in buf to beginning of application data <- decryptLength actual length of decrypted data */ cKrbCacheInitialTicket, /* Gets a ticket for the ticket granting service and optionally another service that you specify. This call always prompts the user for a password. The ticket(s) are placed in the ticket cache but are not returned. Use cKrbGetTicketForService to receive the ticket. NOTE: This call is useful for getting a ticket for the password changing service or any other service that requires that the user be reauthenticated ( that needs an initial ticket ). -> service Formal Kerberos name of service ( NULL service is OK if you just want a ticket granting ticket ) */ cKrbGetUserName, /* Get the kerberos name of the user. If the user is not logged in, returns error cKrbNotLoggedIn. <- user Name that user typed in loggin dialog */ cKrbSetUserName, /* Set the kerberos name of the user. If the user is logged in, cKrbSetUserName logged the user out. -> user Name that will be used as default in loggin dialog */ cKrbSetPassword, /* Sets the password which will be used the next time a password is needed This can be used to bypass the loggin dialog. NOTE: Password is cleared from memory after it is used once or whenever a cKrbSetUserName or cKrbDeleteAllSessions call is made. -> user contains password (of current user) */ cKrbGetDesPointers /* Returns a block of pointers to DES routines so the routines can be called directly. */ }; /* Password changing service */ #define KRB_PASSWORD_SERVICE "changepw.kerberos" // Error codes enum { cKrbCorruptedFile = -1024, /* couldn't find a needed resource */ cKrbNoKillIO, /* can't killIO because all calls sync */ cKrbBadSelector, /* csCode passed doesn't select a recognized function */ cKrbCantClose, /* we must always remain open */ cKrbMapDoesntExist, /* tried to access a map that doesn't exist (index too large, or criteria doesn't match anything) */ cKrbSessDoesntExist, /* tried to access a session that doesn't exist */ cKrbCredsDontExist, /* tried to access credentials that don't exist */ cKrbTCPunavailable, /* couldn't open MacTCP driver */ cKrbUserCancelled, /* user cancelled a log in operation */ cKrbConfigurationErr, /* Kerberos Preference file is not configured properly */ cKrbServerRejected, /* A server rejected our ticket */ cKrbServerImposter, /* Server appears to be a phoney */ cKrbServerRespIncomplete, /* Server response is not complete */ cKrbNotLoggedIn, /* Returned by cKrbGetUserName if user is not logged in */ cKrbOldDriver, /* old version of the driver */ cKrbKerberosErrBlock = -20000 /* start of block of 256 kerberos errors */ }; // Parameter block for high level calls struct krbHiParmBlock { char *service; /* full name -- combined service, instance, realm */ char *buf; unsigned long buflen; long checksum; unsigned long lAddr; unsigned short lPort; unsigned long fAddr; unsigned short fPort; unsigned long decryptOffset; unsigned long decryptLength; char *encryptBuf; unsigned long encryptLength; char *applicationVersion; /* Version string must be 8 bytes long! */ char sessionKey[8]; /* for internal use */ char schedule[128]; /* for internal use */ char *user; }; typedef struct krbHiParmBlock krbHiParmBlock; typedef krbHiParmBlock *KrbParmPtr; typedef KrbParmPtr *KrbParmHandle; /* ********************************************************* */ /* The rest of these defs are for low level calls /* ********************************************************* */ #ifndef KRB_DRIVER /* First some kerberos defs */ #ifdef notdef typedef unsigned char des_cblock[8]; /* crypto-block size */ /* Key schedule */ typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16]; #define C_Block des_cblock #define Key_schedule des_key_schedule #endif /* The maximum sizes for aname, realm, sname, and instance +1 */ #define ANAME_SZ 40 #define REALM_SZ 40 #define SNAME_SZ 40 #define INST_SZ 40 /* Definition of text structure used to pass text around */ #define MAX_KTXT_LEN 1250 struct ktext { long length; /* Length of the text */ unsigned char dat[MAX_KTXT_LEN]; /* The data itself */ unsigned long mbz; /* zero to catch runaway strings */ }; typedef struct ktext *KTEXT; typedef struct ktext KTEXT_ST; /* Structure definition for rd_private_msg and rd_safe_msg */ struct msg_dat { unsigned char *app_data; /* pointer to appl data */ unsigned long app_length; /* length of appl data */ unsigned long hash; /* hash to lookup replay */ long swap; /* swap bytes? */ long time_sec; /* msg timestamp seconds */ unsigned char time_5ms; /* msg timestamp 5ms units */ }; typedef struct msg_dat MSG_DAT; typedef unsigned long u_long; typedef unsigned short u_short; #endif /* Parameter block for low level calls */ struct krbParmBlock { char *uName; char *uInstance; char *uRealm; /* also where local realm or mapping realm passed */ char *sName; char *sInstance; char *sRealm; char *host; /* also netorhost */ long admin; /* isadmin, mustadmin */ long *itemNumber; long *adminReturn; /* when it needs to be passed back */ void *cred; }; typedef struct krbParmBlock krbParmBlock; #endif \ No newline at end of file diff --git a/source/parse/authencrypt.c b/source/parse/authencrypt.c new file mode 100755 index 0000000..96cfc9d --- /dev/null +++ b/source/parse/authencrypt.c @@ -0,0 +1 @@ +/* * Authencrypt.c * Authentication module for NCSA/Telnet and Brown tn3270. */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #include "tnae.h" #include "authencrypt.h" #include "authencrypt.proto.h" #include "KrbDriver.h" #include "DlogUtils.proto.h" #define NAUTHTYPES 10 /* Max number of auth types */ struct codemodule *authmodules = 0; /* list of authentication code modules */ static char nullbuf[] = {IAC, SB, OPT_AUTHENTICATION, TNQ_IS, AUTH_NULL, AUTH_CLIENT_TO_SERVER|AUTH_HOW_ONE_WAY, IAC, SE}; #ifdef powerc enum { uppModule = kCStackBased | RESULT_SIZE(SIZE_CODE(sizeof(long))) | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long))) | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr))) }; #endif #ifdef __MWERKS__ #pragma profile off #endif static void scanFolder(short vRef, long dirID); static void loadCode(HParamBlockRec *pb, long dirid, Str255 name, OSType type, codemodule **header); short hicall (long cscode, krbHiParmBlock *khipb, short kdriver); /* * auth_encrypt_init * Initialize processing for auth/encrypt options. * Find all the modules that support auth/encrypt and add them to our * typepairs and modules table. Load those modules and initialize them. * * Return true if any auth module found. */ Boolean auth_encrypt_init () { short vref; long dirid = 0, fold; SysEnvRec theWorld; /* * Find and load/initialize files with code modules. * First, Try to find the Extensions folder, else use the system folder. */ if (Gestalt('fold', &fold) || ((fold & 1) != 1) || FindFolder(kOnSystemDisk, kExtensionFolderType, false, &vref, &dirid)) { if (SysEnvirons (1, &theWorld) == 0) vref = theWorld.sysVRefNum; else vref = -1; } scanFolder(vref, dirid); // Now scan the folder that Telnet lives in scanFolder(TelInfo->ApFolder.vRefNum, TelInfo->ApFolder.parID); if (authmodules) return true; return false; } static void scanFolder(short vRef, long dirID) { short i; HParamBlockRec pb; Str255 name; OSErr s; for (i = 1; ; i++ ) { pb.fileParam.ioCompletion = 0; pb.fileParam.ioVRefNum = vRef; pb.fileParam.ioFVersNum = 0; pb.fileParam.ioFDirIndex = i; pb.fileParam.ioDirID = dirID; pb.fileParam.ioNamePtr = name; if ((s = PBHGetFInfo(&pb, false)) != noErr) break; /* Check for module types that we are interested in. */ if (pb.fileParam.ioFlFndrInfo.fdType == moduleType) { loadCode(&pb, dirID, name, authType, &authmodules); } } } void loadCode (HParamBlockRec *pb, long dirid, Str255 name, OSType type, codemodule **header) { int i; short rf, oldrf; struct codemodule *code = 0; Handle h; oldrf = CurResFile(); rf = HOpenResFile(pb->fileParam.ioVRefNum, dirid, name, fsRdPerm); if (rf == -1) return; SetResLoad(true); /* * Find all resources of indicated type. */ for (i = 1; ; i++) { if (!((h = Get1IndResource(type, i)))) break; code = (struct codemodule *)myNewPtr(sizeof(struct codemodule)); if (code) { DetachResource(h); HNoPurge(h); HLockHi(h); code->entry = (module)*h; /* * Initialize the module. * It should preset the type/pairs list and return the number of * pairs entered. */ #ifdef powerc code->npairs = CallUniversalProc((UniversalProcPtr)code->entry, uppModule, TNFUNC_INIT_CODE, &code->pairs); code->encryptok = CallUniversalProc((UniversalProcPtr)code->entry, uppModule, TNFUNC_QUERY_ENCRYPT, 0); #else code->npairs = (*code->entry)(TNFUNC_INIT_CODE, &code->pairs); code->encryptok = (*code->entry)(TNFUNC_QUERY_ENCRYPT, 0); #endif qlink(header, code); } else ReleaseResource(h); } CloseResFile(rf); /* ddd for debugging with The Debugger ***/ UseResFile(oldrf); } /* * auth_suboption * Called by the Telnet client when an authentication sub-option is received. * The reply option (if any) is placed into sendbuffer and *sendlength adjusted * by the amount of data placed into sendbuffer. */ void auth_suboption (tnParams **aedata, unsigned char *subbuffer, long sublength, unsigned char *sendbuffer, unsigned long *sendlength, char *cname, Boolean hisencrypt, Boolean myencrypt) { int i; OSErr s; unsigned short pair; unsigned char *cp, *buflimit; struct codemodule *code = 0; tnParams *tn; /* temp params struct */ buflimit = subbuffer + sublength; /* * Initialize session's tnParams if not initialized yet. * Return null auth if no memory and TNQ_SEND. */ if (!(*aedata)) { *aedata = (tnParams *)myNewPtr(sizeof(tnParams)); if (!(*aedata)) { if (subbuffer[SB_SUBOPTION] == TNQ_SEND) { BlockMove((Ptr)nullbuf, (Ptr)sendbuffer, sizeof(nullbuf)); *sendlength -= sizeof(nullbuf); } return; } } tn = *aedata; switch (subbuffer[SB_SUBOPTION]) { case TNQ_IS: case TNQ_NAME: /* The client should not get one of these */ break; case TNQ_SEND: /* * For telnet clients, the buffer contains: * AUTHENTICATION SEND type modifier [type modifier] [...] IAC SE * DDD is IAC SE in the buffer??? * We scan the type/modifier pairs until we find one we can do. * Since they are are in priority order, the first one we * find that we can do wins. */ for (cp = &subbuffer[SB_TYPE]; cp < buflimit; cp += 2) { pair = (cp[0] << 8) | cp[1]; for (code = authmodules; code; code = code->next) { for (i = 0; i < code->npairs; i++) { if (pair == code->pairs[i]) goto brk; } } } brk: if (!code) { /* * If no methods match, send null authentication. */ BlockMove((Ptr)nullbuf, (Ptr)sendbuffer, sizeof(nullbuf)); *sendlength -= sizeof(nullbuf); return; } /* * If no auth data, initialize it now. */ if (!(tn->authdata)) { #ifdef powerc s = CallUniversalProc((UniversalProcPtr)code->entry, uppModule, TNFUNC_INIT_SESSION_AUTH, &tn->authdata); if ((s == 0) && !tn->encryptdata) s = CallUniversalProc((UniversalProcPtr)code->entry, uppModule, TNFUNC_INIT_SESSION_ENCRYPT, &tn->encryptdata); #else s = (*code->entry)(TNFUNC_INIT_SESSION_AUTH, &tn->authdata); if ((s == 0) && !tn->encryptdata) s = (*code->entry)(TNFUNC_INIT_SESSION_ENCRYPT, &tn->encryptdata); #endif if (s) { /* if no memory, etc */ BlockMove((Ptr)nullbuf, (Ptr)sendbuffer, sizeof(nullbuf)); *sendlength -= sizeof(nullbuf); return; } tn->entry = code->entry; } /* * Process the SEND option */ tn->subbuffer = subbuffer; tn->sublength = sublength; tn->sendbuffer = sendbuffer; tn->sendlength = sendlength; tn->cname = cname; tn->hisencrypt = hisencrypt; tn->myencrypt = myencrypt; #ifdef powerc s = CallUniversalProc((UniversalProcPtr)tn->entry, uppModule, TNFUNC_AUTH_SEND, tn); #else s = (*tn->entry)(TNFUNC_AUTH_SEND, tn); #endif if (s) { /* ddd null probably wrong here ??? */ BlockMove((Ptr)nullbuf, (Ptr)sendbuffer, sizeof(nullbuf)); *sendlength -= sizeof(nullbuf); } return; case TNQ_REPLY: /* * Process the reply. */ if (!(tn->authdata)) { DebugStr("\pauth_suboption: tnq_reply no authdata"); return; } tn->subbuffer = subbuffer; tn->sublength = sublength; tn->sendbuffer = sendbuffer; tn->sendlength = sendlength; tn->cname = cname; tn->hisencrypt = hisencrypt; tn->myencrypt = myencrypt; #ifdef powerc s = CallUniversalProc((UniversalProcPtr)tn->entry, uppModule, TNFUNC_AUTH_REPLY, tn); #else s = (*tn->entry)(TNFUNC_AUTH_REPLY, tn); #endif switch (s) { case TNREP_OK: return; case TNREP_AUTH_OK: break; case TNREP_AUTH_ERR: break; } return; } } /* * encrypt_suboption * Called by the Telnet client when an encryption sub-option is received. * The reply option (if any) is placed into sendbuffer and *sendlength adjusted * by the amount of data placed into sendbuffer. */ short encrypt_suboption (tnParams **aedata, unsigned char *subbuffer, long sublength, unsigned char *sendbuffer, unsigned long *sendlength, char *cname, Boolean hisencrypt, Boolean myencrypt) { short s; tnParams *tn; struct codemodule *code = 0; /* * Initialize session's tnParams if not there. * Return null auth if no memory and TNQ_SEND. */ if (!(*aedata)) { *aedata = (tnParams *)myNewPtr(sizeof(tnParams)); if (!(*aedata)) { return 0; } } tn = *aedata; if (!tn->encryptdata) { for (code = authmodules; code; code = code->next) { if (code->encryptok) break; } if (!code) return 0; #ifdef powerc s = CallUniversalProc((UniversalProcPtr)code->entry, uppModule, TNFUNC_INIT_SESSION_ENCRYPT, &tn->encryptdata); #else s = (*code->entry)(TNFUNC_INIT_SESSION_ENCRYPT, &tn->encryptdata); #endif if (s) return TNREP_ERROR; tn->entry = code->entry; } tn->subbuffer = subbuffer; tn->sublength = sublength; tn->sendbuffer = sendbuffer; tn->sendlength = sendlength; tn->cname = cname; tn->hisencrypt = hisencrypt; tn->myencrypt = myencrypt; #ifdef powerc s = CallUniversalProc((UniversalProcPtr)tn->entry, uppModule, TNFUNC_ENCRYPT_SB, tn); #else s = (*tn->entry)(TNFUNC_ENCRYPT_SB, tn); #endif return s; } unsigned char decrypt (tnParams *tn, long value) { tn->data = value; #ifdef powerc CallUniversalProc((UniversalProcPtr)tn->entry, uppModule, TNFUNC_DECRYPT, tn); #else (*tn->entry)(TNFUNC_DECRYPT, tn); #endif return (unsigned char)tn->data; } void encrypt (tnParams *tn, unsigned char *buf, long len) { tn->data = len; tn->ebuf = buf; #ifdef powerc CallUniversalProc((UniversalProcPtr)tn->entry, uppModule, TNFUNC_ENCRYPT, tn); #else (*tn->entry)(TNFUNC_ENCRYPT, tn); #endif } /* * qlink * Add an entry to the end of a linked list */ void qlink (void **flist, void *fentry) { struct dummy { struct dummy *next; } **list, *entry; list = flist; entry = fentry; /* * Find address of last entry in the list. */ while (*list) list = &(*list)->next; /* * Link entry */ *list = entry; entry->next = 0; } /* * qunlink * Remove an entry from linked list * Returns the entry or NULL if not found. */ void *qunlink (void **flist, void *fentry) { struct dummy { struct dummy *next; } **list, *entry; list = flist; entry = fentry; /* * Find entry and unlink it */ while (*list) { if ((*list) == entry) { *list = entry->next; return entry; } list = &(*list)->next; } return NULL; } short hicall (long cscode, krbHiParmBlock *khipb, short kdriver) { short s; ParamBlockRec pb; WriteZero((Ptr)&pb, sizeof(ParamBlockRec)); *(long *)pb.cntrlParam.csParam = (long)khipb; pb.cntrlParam.ioCompletion = nil; pb.cntrlParam.ioCRefNum = kdriver; pb.cntrlParam.csCode = cscode; if (s = PBControl(&pb, false)) return s; if (s = pb.cntrlParam.ioResult) return s; return 0; } void DestroyTickets(void) { OSErr err; //short authRefNumkrb; krbHiParmBlock khpb, *khipb = &khpb; short kdriver; if (!(err = OpenDriver("\p.Kerberos", &kdriver))) { WriteZero((Ptr)khipb, sizeof(krbHiParmBlock)); if (err = hicall(cKrbDeleteAllSessions, khipb, kdriver)) return; } //else if (!(err=openAuthMan(&authRefNum,&authAPIversion))) // if (err=expireV4Ticket(authRefNum,NULL,NULL,NULL)) // return; } \ No newline at end of file diff --git a/source/parse/authencrypt.h b/source/parse/authencrypt.h new file mode 100755 index 0000000..fa3575d --- /dev/null +++ b/source/parse/authencrypt.h @@ -0,0 +1 @@ +typedef struct codemodule { struct codemodule *next; /* pointer to next in list */ module entry; /* module entry point */ short npairs; /* number of type/modifier pairs */ Boolean encryptok; /* module does option 38 encryption */ unsigned short pairs[NTMPAIRS]; /* type/modifier pairs */ } codemodule; \ No newline at end of file diff --git a/source/parse/authencrypt.proto.h b/source/parse/authencrypt.proto.h new file mode 100755 index 0000000..65ec035 --- /dev/null +++ b/source/parse/authencrypt.proto.h @@ -0,0 +1 @@ +/* * :main:authencrypt.c */ Boolean auth_encrypt_init(void); void auth_suboption(tnParams **aedata, unsigned char *subbuffer, long sublength, unsigned char *sendbuffer, unsigned long *sendlength, char *cname, Boolean hisencrypt, Boolean myencrypt); short encrypt_suboption(tnParams **aedata, unsigned char *subbuffer, long sublength, unsigned char *sendbuffer, unsigned long *sendlength, char *cname, Boolean hisencrypt, Boolean myencrypt); unsigned char decrypt(tnParams *tn, long value); void encrypt(tnParams *tn, unsigned char *buf, long len); void qlink(void **flist, void *fentry); void *qunlink(void **flist, void *fentry); void DestroyTickets(void); \ No newline at end of file diff --git a/source/parse/md4.c b/source/parse/md4.c new file mode 100755 index 0000000..5724d39 --- /dev/null +++ b/source/parse/md4.c @@ -0,0 +1 @@ +/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD4 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. */ #include "md4.proto.h" struct otpmdx_ctx { unsigned long state[4]; unsigned long count[2]; unsigned char buffer[64]; }; /* Constants for MD4Transform routine. */ #define S11 3 #define S12 7 #define S13 11 #define S14 19 #define S21 3 #define S22 5 #define S23 9 #define S24 13 #define S31 3 #define S32 9 #define S33 11 #define S34 15 void MD4Transform(unsigned long[4], unsigned char[64]); void md4encode(unsigned char *, unsigned long *, unsigned short); void md4decode(unsigned long *, unsigned char *, unsigned short); static unsigned char PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* F, G and H are basic MD4 functions. */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) #define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) #define H(x, y, z) ((x) ^ (y) ^ (z)) /* ROTATE_LEFT rotates x left n bits. */ #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG and HH are transformations for rounds 1, 2 and 3 */ /* Rotation is separate from addition to prevent recomputation */ #define FF(a, b, c, d, x, s) { \ (a) += F ((b), (c), (d)) + (x); \ (a) = ROTATE_LEFT ((a), (s)); \ } #define GG(a, b, c, d, x, s) { \ (a) += G ((b), (c), (d)) + (x) + (unsigned long)0x5a827999; \ (a) = ROTATE_LEFT ((a), (s)); \ } #define HH(a, b, c, d, x, s) { \ (a) += H ((b), (c), (d)) + (x) + (unsigned long)0x6ed9eba1; \ (a) = ROTATE_LEFT ((a), (s)); \ } /* MD4 initialization. Begins an MD4 operation, writing a new context. */ void otpmd4init (struct otpmdx_ctx *context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; context->state[1] = 0xefcdab89; context->state[2] = 0x98badcfe; context->state[3] = 0x10325476; } /* MD4 block update operation. Continues an MD4 message-digest operation, processing another message block, and updating the context. */ void otpmd4update (struct otpmdx_ctx *context, unsigned char *input, unsigned short inputLen) { unsigned short i, index, partLen; /* Compute number of bytes mod 64 */ index = (unsigned short) ((context->count[0] >> 3) & 0x3F); /* Update number of bits */ if ((context->count[0] += ((unsigned long) inputLen << 3)) < ((unsigned long) inputLen << 3)) context->count[1]++; context->count[1] += ((unsigned long) inputLen >> 29); partLen = 64 - index; /* Transform as many times as possible. */ if (inputLen >= partLen) { memcpy((unsigned char *) & context->buffer[index], (unsigned char *) input, partLen); MD4Transform(context->state, context->buffer); for (i = partLen; i + 63 < inputLen; i += 64) MD4Transform(context->state, &input[i]); index = 0; } else i = 0; /* Buffer remaining input */ memcpy((unsigned char *) & context->buffer[index], (unsigned char *) & input[i], inputLen - i); } /* MD4 finalization. Ends an MD4 message-digest operation, writing the the message digest and zeroizing the context. */ void otpmd4final(unsigned char *digest, struct otpmdx_ctx *context) { unsigned char bits[8]; unsigned short index, padLen; /* Save number of bits */ md4encode(bits, context->count, 8); /* Pad out to 56 mod 64. */ index = (unsigned short) ((context->count[0] >> 3) & 0x3f); padLen = (index < 56) ? (56 - index) : (120 - index); otpmd4update(context, PADDING, padLen); /* Append length (before padding) */ otpmd4update(context, bits, 8); /* Store state in digest */ md4encode(digest, context->state, 16); /* Zeroize sensitive information. */ memset((unsigned char *) context, 0, sizeof(*context)); } /* MD4 basic transformation. Transforms state based on block. */ void MD4Transform(unsigned long state[4], unsigned char block[64]) { unsigned long a = state[0], b = state[1], c = state[2], d = state[3], x[16]; md4decode(x, block, 64); /* Round 1 */ FF(a, b, c, d, x[0], S11); /* 1 */ FF(d, a, b, c, x[1], S12); /* 2 */ FF(c, d, a, b, x[2], S13); /* 3 */ FF(b, c, d, a, x[3], S14); /* 4 */ FF(a, b, c, d, x[4], S11); /* 5 */ FF(d, a, b, c, x[5], S12); /* 6 */ FF(c, d, a, b, x[6], S13); /* 7 */ FF(b, c, d, a, x[7], S14); /* 8 */ FF(a, b, c, d, x[8], S11); /* 9 */ FF(d, a, b, c, x[9], S12); /* 10 */ FF(c, d, a, b, x[10], S13); /* 11 */ FF(b, c, d, a, x[11], S14); /* 12 */ FF(a, b, c, d, x[12], S11); /* 13 */ FF(d, a, b, c, x[13], S12); /* 14 */ FF(c, d, a, b, x[14], S13); /* 15 */ FF(b, c, d, a, x[15], S14); /* 16 */ /* Round 2 */ GG(a, b, c, d, x[0], S21); /* 17 */ GG(d, a, b, c, x[4], S22); /* 18 */ GG(c, d, a, b, x[8], S23); /* 19 */ GG(b, c, d, a, x[12], S24); /* 20 */ GG(a, b, c, d, x[1], S21); /* 21 */ GG(d, a, b, c, x[5], S22); /* 22 */ GG(c, d, a, b, x[9], S23); /* 23 */ GG(b, c, d, a, x[13], S24); /* 24 */ GG(a, b, c, d, x[2], S21); /* 25 */ GG(d, a, b, c, x[6], S22); /* 26 */ GG(c, d, a, b, x[10], S23); /* 27 */ GG(b, c, d, a, x[14], S24); /* 28 */ GG(a, b, c, d, x[3], S21); /* 29 */ GG(d, a, b, c, x[7], S22); /* 30 */ GG(c, d, a, b, x[11], S23); /* 31 */ GG(b, c, d, a, x[15], S24); /* 32 */ /* Round 3 */ HH(a, b, c, d, x[0], S31); /* 33 */ HH(d, a, b, c, x[8], S32); /* 34 */ HH(c, d, a, b, x[4], S33); /* 35 */ HH(b, c, d, a, x[12], S34); /* 36 */ HH(a, b, c, d, x[2], S31); /* 37 */ HH(d, a, b, c, x[10], S32); /* 38 */ HH(c, d, a, b, x[6], S33); /* 39 */ HH(b, c, d, a, x[14], S34); /* 40 */ HH(a, b, c, d, x[1], S31); /* 41 */ HH(d, a, b, c, x[9], S32); /* 42 */ HH(c, d, a, b, x[5], S33); /* 43 */ HH(b, c, d, a, x[13], S34); /* 44 */ HH(a, b, c, d, x[3], S31); /* 45 */ HH(d, a, b, c, x[11], S32); /* 46 */ HH(c, d, a, b, x[7], S33); /* 47 */ HH(b, c, d, a, x[15], S34); /* 48 */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; /* Zeroize sensitive information. */ memset((unsigned char *) x, 0, sizeof(x)); } /* Encodes input (unsigned long) into output (unsigned char). Assumes len is a multiple of 4. */ void md4encode(unsigned char *output, unsigned long *input, unsigned short len) { unsigned short i, j; for (i = 0, j = 0; j < len; i++, j += 4) { output[j] = (unsigned char) (input[i] & 0xff); output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff); output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff); output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff); } } /* Decodes input (unsigned char) into output (unsigned long). Assumes len is a multiple of 4. */ void md4decode(unsigned long *output, unsigned char *input, unsigned short len) { unsigned short i, j; for (i = 0, j = 0; j < len; i++, j += 4) output[i] = ((unsigned long) input[j]) | (((unsigned long) input[j + 1]) << 8) | (((unsigned long) input[j + 2]) << 16) | (((unsigned long) input[j + 3]) << 24); } \ No newline at end of file diff --git a/source/parse/md4.proto.h b/source/parse/md4.proto.h new file mode 100755 index 0000000..72626bf --- /dev/null +++ b/source/parse/md4.proto.h @@ -0,0 +1 @@ +void otpmd4init (struct otpmdx_ctx *context); void otpmd4update (struct otpmdx_ctx *context, unsigned char *input, unsigned short inputLen); void otpmd4final(unsigned char *digest, struct otpmdx_ctx *context); \ No newline at end of file diff --git a/source/parse/md5.c b/source/parse/md5.c new file mode 100755 index 0000000..2579436 --- /dev/null +++ b/source/parse/md5.c @@ -0,0 +1,286 @@ +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + rights reserved. + + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + + These notices must be retained in any copies of any part of this + documentation and/or software. + */ + +#include "md5.proto.h" + +struct otpmdx_ctx { + unsigned long state[4]; + unsigned long count[2]; + unsigned char buffer[64]; +}; + +/* Constants for MD5Transform routine. + */ +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + +void MD5Transform (unsigned long[4], unsigned char[64]); +void EEncode (unsigned char *output, unsigned long *input, unsigned short len); +void EDecode (unsigned long *output, unsigned char *input, unsigned short len); + +static unsigned char PADDING[64] = +{ + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* + * Encodes input (unsigned long) into output (unsigned char). + * Assumes len is a multiple of 4. + */ +void EEncode (unsigned char *output, unsigned long *input, unsigned short len) +{ + unsigned short i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char) (input[i] & 0xff); + output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff); + output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff); + output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff); + } +} + +/* + * Decodes input (unsigned char) into output (unsigned long). + * Assumes len is a multiple of 4. + */ +void EDecode (unsigned long *output, unsigned char *input, unsigned short len) +{ + unsigned short i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((unsigned long) input[j]) | (((unsigned long) input[j + 1]) << 8) | + (((unsigned long) input[j + 2]) << 16) | (((unsigned long) input[j + 3]) << 24); +} + +/* F, G, H and I are basic MD5 functions. */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE_LEFT rotates x left n bits. */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. + Rotation is separate from addition to prevent recomputation. */ + +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (unsigned long)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (unsigned long)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (unsigned long)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (unsigned long)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +/* MD5 initialization. Begins an MD5 operation, writing a new context. */ +void otpmd5init (struct otpmdx_ctx *context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. */ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; +} + +/* + * MD5 block update operation. Continues an MD5 message-digest + * operation, processing another message block, and updating the + * context. + */ +void otpmd5update (struct otpmdx_ctx *context, unsigned char *input, unsigned short inputLen) +{ + unsigned short i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned short) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((unsigned long) inputLen << 3)) < ((unsigned long) inputLen << 3)) + context->count[1]++; + + context->count[1] += ((unsigned long) inputLen >> 29); + partLen = 64 - index; + + /* Transform as many times as possible. */ + if (inputLen >= partLen) { + memcpy((void *)&context->buffer[index], (void *)input, partLen); + MD5Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) + MD5Transform(context->state, &input[i]); + + index = 0; + } else + i = 0; + + /* Buffer remaining input */ + memcpy((void *) & context->buffer[index], + (void *) & input[i], + inputLen - i); +} + +/* MD5 finalization. Ends an MD5 message-digest operation, writing the + the message digest and zeroizing the context. + */ +void otpmd5final (unsigned char *digest, struct otpmdx_ctx *context) +{ + unsigned char bits[8]; + unsigned short index, padLen; + + /* Save number of bits */ + EEncode(bits, context->count, 8); + + /* Pad out to 56 mod 64. */ + index = (unsigned short) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + otpmd5update(context, PADDING, padLen); + + /* Append length (before padding) */ + otpmd5update(context, bits, 8); + + /* Store state in digest */ + EEncode(digest, context->state, 16); + + /* Zeroize sensitive information. */ + memset((void *) context, 0, sizeof(*context)); +} + +/* MD5 basic transformation. Transforms state based on block. */ +void MD5Transform (unsigned long state[4], unsigned char block[64]) +{ + unsigned long a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + + EDecode(x, block, 64); + + /* Round 1 */ + FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ + FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */ + FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */ + FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */ + FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */ + FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */ + FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */ + FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */ + FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */ + FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */ + FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */ + GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */ + GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */ + GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */ + GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */ + GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */ + GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */ + GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */ + GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */ + GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */ + GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */ + HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */ + HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */ + HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */ + HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */ + HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */ + HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */ + HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */ + HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */ + HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */ + II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */ + II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */ + II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */ + II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */ + II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */ + II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */ + II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */ + II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */ + II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information. */ + memset((void *)x, 0, sizeof(x)); +} diff --git a/source/parse/md5.proto.h b/source/parse/md5.proto.h new file mode 100755 index 0000000..9abfe46 --- /dev/null +++ b/source/parse/md5.proto.h @@ -0,0 +1 @@ +void otpmd5init (struct otpmdx_ctx *context); void otpmd5update (struct otpmdx_ctx *context, unsigned char *input, unsigned short inputLen); void otpmd5final (unsigned char *digest, struct otpmdx_ctx *context); \ No newline at end of file diff --git a/source/parse/otp.c b/source/parse/otp.c new file mode 100755 index 0000000..a061ae7 --- /dev/null +++ b/source/parse/otp.c @@ -0,0 +1 @@ +// BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 // otp.c // by Rolf Braun // code to support OTP (One-Time Passwords), OPIE (One-time Passwords In Everything), // and Bellcore's original S/Key system. #include "otp.proto.h" #include "md4.proto.h" #include "md5.proto.h" #include "DlogUtils.proto.h" #include "rsinterf.proto.h" #include "tekrgmac.proto.h" #include "vrrgmac.proto.h" #include "errors.proto.h" #include "wind.h" #include "network.proto.h" #include "movableModal.h" #include "parse.proto.h" struct otpmdx_ctx { unsigned long state[4]; unsigned long count[2]; unsigned char buffer[64]; }; extern short scrn; extern WindRec *screens; static char inputPassword[256]; PROTO_UPP(OTPModalFilter, ModalFilter); pascal short OTPModalFilter (DialogPtr dptr, EventRecord *evt, short *item); SIMPLE_UPP(OTPModalFilter, ModalFilter); pascal short OTPModalFilter(DialogPtr dptr, EventRecord *evt, short *item) { short key, tempLen; if ((evt->what == keyDown) || (evt->what == autoKey)) if ((((DialogPeek)dptr)->editField + 1) == 5) { key = evt->message & charCodeMask; if (key == 8) { inputPassword[0] = 0; SetTEText(dptr, 5, "\p"); *item = 0; return -1; } if (key == 9) return 0; if (key < 32) { *item = 0; StdFilterProc(dptr, evt, item); return -1; } tempLen = strlen(inputPassword); if (tempLen < 250) { inputPassword[tempLen] = key; inputPassword[tempLen+1] = 0; } evt->message = (evt->message & 0xFFFFFF00) + ''; return 0; } *item = 0; StdFilterProc(dptr, evt, item); if (*item != 0) return -1; return 0; } void otpgetselection(char *selection) { short i; Handle charh; *selection = 0; // Here we check for a valid text selection. if (TelInfo->numwindows<1) return; // No windows? No problem! if (MacRGfindwind(FrontWindow()) >= 0) return; // ICR is not text. if (RGgetdnum(FrontWindow()) > -1) return; // Tektronix is also not text. if ((i = RSfindvwind(FrontWindow())) < 0) return; // It had better be a text window... if (!RSTextSelected(i)) return; // ...with something selected! charh = RSGetTextSel(i, 0); // Get the text selection if (charh == (char **)-1L) OutOfMemory(400); if (charh != (char **)0L) { if ((GetHandleSize(charh) != 0) && (GetHandleSize(charh) < 250)) { HLock(charh); BlockMove(*charh, selection + 1, GetHandleSize(charh)); selection[0] = GetHandleSize(charh); } DisposeHandle(charh); } } void otpinterface(short mode, char *parsechallenge, struct WindRec *tw, short usehexin, short noprompt, char *passwordin, short savepass) { short ditem, usehex, i; DialogPtr dptr; static Str255 challenge, response, tempstring; usehex = usehexin; if (mode) { strcpy((char *)challenge, parsechallenge); c2pstr((char *)challenge); } else otpgetselection((char *) challenge); if (mode && noprompt) if (passwordin[0]) { pstrcpy(tempstring, (unsigned char *)passwordin); p2cstr(tempstring); p2cstr(challenge); otpgenerator((char *)challenge, (char *)response, (char *)tempstring, usehex); SendStringAsIfTyped(tw, (char *)response, strlen((char *)response)); // If crmap is on, send CR-NULL instead of CR-LF. if (tw->crmap) SendStringAsIfTyped(tw,"\015\0",2); else SendStringAsIfTyped(tw,"\015\012",2); //UNIVAC fix return; } SetUpMovableModalMenus(); dptr = GetNewDialog(8000, 0, (WindowPtr)-1); SetDialogDefaultItem(dptr, 1); SetDialogCancelItem(dptr, 3); SetDialogTracksCursor(dptr, 1); SetTEText(dptr, 4, challenge); if (mode && usehex) SetCntrl(dptr, 8, 1); else SetCntrl(dptr, 7, 1); ditem = 0; inputPassword[0] = 0; if (gApplicationPrefs->globalSavePass) { strcpy(inputPassword, TelInfo->otpword); for (i = 1; i < 250; i++) tempstring[i] = ''; tempstring[0] = strlen(inputPassword); SetTEText(dptr, 5, tempstring); } if (mode) if (passwordin[0]) { pstrcpy((unsigned char *)inputPassword, (unsigned char *)passwordin); p2cstr((unsigned char *)inputPassword); for (i = 1; i < 250; i++) tempstring[i] = ''; tempstring[0] = strlen(inputPassword); SetTEText(dptr, 5, tempstring); } if (mode || challenge[0]) SelIText(dptr, 5, 0, 32767); while ((ditem != 1) && (ditem != 3)) { movableModalDialog(OTPModalFilterUPP, &ditem); switch (ditem) { case 7: SetCntrl(dptr, 7, 1); SetCntrl(dptr, 8, 0); goto generate; case 8: SetCntrl(dptr, 7, 0); SetCntrl(dptr, 8, 1); case 2: generate: GetTEText(dptr, 4, challenge); usehex = GetCntlVal(dptr, 8); p2cstr(challenge); otpgenerator((char *)challenge, (char *)response, inputPassword, usehex); c2pstr((char *)response); SetTEText(dptr, 6, response); } } if (ditem == 1) { GetTEText(dptr, 4, challenge); usehex = GetCntlVal(dptr, 8); p2cstr(challenge); otpgenerator((char *)challenge, (char *)response, inputPassword, usehex); if ((strlen(inputPassword) < 63) && gApplicationPrefs->globalSavePass) strcpy(TelInfo->otpword, inputPassword); if (savepass && (strlen(inputPassword) < 63)) { // RAB BetterTelnet 1.2.1 strcpy(passwordin, inputPassword); c2pstr(passwordin); } } DisposeDialog(dptr); ResetMenus(); if (TelInfo->numwindows<1) return; // No windows? No problem! if (ditem == 1) { if (mode) { SendStringAsIfTyped(tw, (char *)response, strlen((char *)response)); // If crmap is on, send CR-NULL instead of CR-LF. if (tw->crmap) SendStringAsIfTyped(tw,"\015\0",2); else SendStringAsIfTyped(tw,"\015\012",2); //UNIVAC fix } else { SendStringAsIfTyped(&screens[scrn], (char *)response, strlen((char *)response)); // If crmap is on, send CR-NULL instead of CR-LF. if (screens[scrn].crmap) SendStringAsIfTyped(&screens[scrn],"\015\0",2); else SendStringAsIfTyped(&screens[scrn],"\015\012",2); //UNIVAC fix } } } void otpgenerator(char *challenge, char *response, char *password, short usehex) { short algorithm; unsigned long sequence; char key[8]; char *cptr; char *seed; static char buffer[256]; *response = 0; cptr = challenge; if (strncmp(challenge, "otp-", 4)) { if (strncmp(challenge, "s/key ", 6)) return; else { cptr += 6; algorithm = 0; } } else { cptr += 4; if (strncmp(cptr, "md4 ", 4)) { if (strncmp(cptr, "md5 ", 4)) { if (strncmp(cptr, "sha1 ", 5)) return; else algorithm = 2; cptr++; } else algorithm = 1; } else algorithm = 0; cptr += 4; } if ((sequence = strtoul(cptr, &cptr, 10)) > 9999) return; while(*cptr && isspace(*cptr)) cptr++; if (!*cptr) return; seed = cptr; while (*cptr && !isspace(*cptr)) cptr++; *cptr = 0; if ((sequence < 1) || (sequence > 9999)) return; if ((strlen(seed) + strlen(password)) > 250) return; strcpy(buffer, seed); strcat(buffer, password); otphashlen(algorithm, buffer, key); while (sequence-- != 0) otphash(algorithm, key); if (usehex) otpbtoh(key, response); else otpbtoe(key, response); } void otphashlen(short algorithm, char *buffer, char *key) { static struct otpmdx_ctx mdx; unsigned long mdx_tmp[4]; unsigned long sha1_tmp[5]; static SHA1_CTX sha1data; unsigned long *results = (unsigned long *) key; if (algorithm == 2) { SHA1Init(&sha1data); SHA1Update(&sha1data, (unsigned char *)buffer, strlen(buffer)); SHA1Final((unsigned char *)sha1_tmp, &sha1data); results[0] = sha1_tmp[0] ^ sha1_tmp[2] ^ sha1_tmp[4]; results[1] = sha1_tmp[1] ^ sha1_tmp[3]; return; } if (algorithm == 1) { otpmd5init(&mdx); otpmd5update(&mdx, (unsigned char *)buffer, strlen(buffer)); otpmd5final((unsigned char *)mdx_tmp, &mdx); } else { otpmd4init(&mdx); otpmd4update(&mdx, (unsigned char *)buffer, strlen(buffer)); otpmd4final((unsigned char *)mdx_tmp, &mdx); } results[0] = mdx_tmp[0] ^ mdx_tmp[2]; results[1] = mdx_tmp[1] ^ mdx_tmp[3]; } void otphash(short algorithm, char *key) { static struct otpmdx_ctx mdx; unsigned long mdx_tmp[4]; unsigned long sha1_tmp[5]; static SHA1_CTX sha1data; unsigned long *results = (unsigned long *) key; if (algorithm == 2) { SHA1Init(&sha1data); SHA1Update(&sha1data, (unsigned char *)key, 8); SHA1Final((unsigned char *)sha1_tmp, &sha1data); results[0] = sha1_tmp[0] ^ sha1_tmp[2] ^ sha1_tmp[4]; results[1] = sha1_tmp[1] ^ sha1_tmp[3]; return; } if (algorithm) { otpmd5init(&mdx); otpmd5update(&mdx, (unsigned char *)key, 8); otpmd5final((unsigned char *)mdx_tmp, &mdx); } else { otpmd4init(&mdx); otpmd4update(&mdx, (unsigned char *)key, 8); otpmd4final((unsigned char *)mdx_tmp, &mdx); } results[0] = mdx_tmp[0] ^ mdx_tmp[2]; results[1] = mdx_tmp[1] ^ mdx_tmp[3]; } static char hextochar[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; char* otpbtoh (char *in, char *out) { short i; char *c = out; for (i = 0; i < 4; i++) { *(c++) = hextochar[((*in) >> 4) & 0x0f]; *(c++) = hextochar[(*in++) & 0x0f]; *(c++) = hextochar[((*in) >> 4) & 0x0f]; *(c++) = hextochar[(*in++) & 0x0f]; *(c++) = ' '; } *(--c) = 0; return out; } static char otpenglish[2048][4] = { "A", "ABE", "ACE", "ACT", "AD", "ADA", "ADD", "AGO", "AID", "AIM", "AIR", "ALL", "ALP", "AM", "AMY", "AN", "ANA", "AND", "ANN", "ANT", "ANY", "APE", "APS", "APT", "ARC", "ARE", "ARK", "ARM", "ART", "AS", "ASH", "ASK", "AT", "ATE", "AUG", "AUK", "AVE", "AWE", "AWK", "AWL", "AWN", "AX", "AYE", "BAD", "BAG", "BAH", "BAM", "BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG", "BEN", "BET", "BEY", "BIB", "BID", "BIG", "BIN", "BIT", "BOB", "BOG", "BON", "BOO", "BOP", "BOW", "BOY", "BUB", "BUD", "BUG", "BUM", "BUN", "BUS", "BUT", "BUY", "BY", "BYE", "CAB", "CAL", "CAM", "CAN", "CAP", "CAR", "CAT", "CAW", "COD", "COG", "COL", "CON", "COO", "COP", "COT", "COW", "COY", "CRY", "CUB", "CUE", "CUP", "CUR", "CUT", "DAB", "DAD", "DAM", "DAN", "DAR", "DAY", "DEE", "DEL", "DEN", "DES", "DEW", "DID", "DIE", "DIG", "DIN", "DIP", "DO", "DOE", "DOG", "DON", "DOT", "DOW", "DRY", "DUB", "DUD", "DUE", "DUG", "DUN", "EAR", "EAT", "ED", "EEL", "EGG", "EGO", "ELI", "ELK", "ELM", "ELY", "EM", "END", "EST", "ETC", "EVA", "EVE", "EWE", "EYE", "FAD", "FAN", "FAR", "FAT", "FAY", "FED", "FEE", "FEW", "FIB", "FIG", "FIN", "FIR", "FIT", "FLO", "FLY", "FOE", "FOG", "FOR", "FRY", "FUM", "FUN", "FUR", "GAB", "GAD", "GAG", "GAL", "GAM", "GAP", "GAS", "GAY", "GEE", "GEL", "GEM", "GET", "GIG", "GIL", "GIN", "GO", "GOT", "GUM", "GUN", "GUS", "GUT", "GUY", "GYM", "GYP", "HA", "HAD", "HAL", "HAM", "HAN", "HAP", "HAS", "HAT", "HAW", "HAY", "HE", "HEM", "HEN", "HER", "HEW", "HEY", "HI", "HID", "HIM", "HIP", "HIS", "HIT", "HO", "HOB", "HOC", "HOE", "HOG", "HOP", "HOT", "HOW", "HUB", "HUE", "HUG", "HUH", "HUM", "HUT", "I", "ICY", "IDA", "IF", "IKE", "ILL", "INK", "INN", "IO", "ION", "IQ", "IRA", "IRE", "IRK", "IS", "IT", "ITS", "IVY", "JAB", "JAG", "JAM", "JAN", "JAR", "JAW", "JAY", "JET", "JIG", "JIM", "JO", "JOB", "JOE", "JOG", "JOT", "JOY", "JUG", "JUT", "KAY", "KEG", "KEN", "KEY", "KID", "KIM", "KIN", "KIT", "LA", "LAB", "LAC", "LAD", "LAG", "LAM", "LAP", "LAW", "LAY", "LEA", "LED", "LEE", "LEG", "LEN", "LEO", "LET", "LEW", "LID", "LIE", "LIN", "LIP", "LIT", "LO", "LOB", "LOG", "LOP", "LOS", "LOT", "LOU", "LOW", "LOY", "LUG", "LYE", "MA", "MAC", "MAD", "MAE", "MAN", "MAO", "MAP", "MAT", "MAW", "MAY", "ME", "MEG", "MEL", "MEN", "MET", "MEW", "MID", "MIN", "MIT", "MOB", "MOD", "MOE", "MOO", "MOP", "MOS", "MOT", "MOW", "MUD", "MUG", "MUM", "MY", "NAB", "NAG", "NAN", "NAP", "NAT", "NAY", "NE", "NED", "NEE", "NET", "NEW", "NIB", "NIL", "NIP", "NIT", "NO", "NOB", "NOD", "NON", "NOR", "NOT", "NOV", "NOW", "NU", "NUN", "NUT", "O", "OAF", "OAK", "OAR", "OAT", "ODD", "ODE", "OF", "OFF", "OFT", "OH", "OIL", "OK", "OLD", "ON", "ONE", "OR", "ORB", "ORE", "ORR", "OS", "OTT", "OUR", "OUT", "OVA", "OW", "OWE", "OWL", "OWN", "OX", "PA", "PAD", "PAL", "PAM", "PAN", "PAP", "PAR", "PAT", "PAW", "PAY", "PEA", "PEG", "PEN", "PEP", "PER", "PET", "PEW", "PHI", "PI", "PIE", "PIN", "PIT", "PLY", "PO", "POD", "POE", "POP", "POT", "POW", "PRO", "PRY", "PUB", "PUG", "PUN", "PUP", "PUT", "QUO", "RAG", "RAM", "RAN", "RAP", "RAT", "RAW", "RAY", "REB", "RED", "REP", "RET", "RIB", "RID", "RIG", "RIM", "RIO", "RIP", "ROB", "ROD", "ROE", "RON", "ROT", "ROW", "ROY", "RUB", "RUE", "RUG", "RUM", "RUN", "RYE", "SAC", "SAD", "SAG", "SAL", "SAM", "SAN", "SAP", "SAT", "SAW", "SAY", "SEA", "SEC", "SEE", "SEN", "SET", "SEW", "SHE", "SHY", "SIN", "SIP", "SIR", "SIS", "SIT", "SKI", "SKY", "SLY", "SO", "SOB", "SOD", "SON", "SOP", "SOW", "SOY", "SPA", "SPY", "SUB", "SUD", "SUE", "SUM", "SUN", "SUP", "TAB", "TAD", "TAG", "TAN", "TAP", "TAR", "TEA", "TED", "TEE", "TEN", "THE", "THY", "TIC", "TIE", "TIM", "TIN", "TIP", "TO", "TOE", "TOG", "TOM", "TON", "TOO", "TOP", "TOW", "TOY", "TRY", "TUB", "TUG", "TUM", "TUN", "TWO", "UN", "UP", "US", "USE", "VAN", "VAT", "VET", "VIE", "WAD", "WAG", "WAR", "WAS", "WAY", "WE", "WEB", "WED", "WEE", "WET", "WHO", "WHY", "WIN", "WIT", "WOK", "WON", "WOO", "WOW", "WRY", "WU", "YAM", "YAP", "YAW", "YE", "YEA", "YES", "YET", "YOU", "ABED", "ABEL", "ABET", "ABLE", "ABUT", "ACHE", "ACID", "ACME", "ACRE", "ACTA", "ACTS", "ADAM", "ADDS", "ADEN", "AFAR", "AFRO", "AGEE", "AHEM", "AHOY", "AIDA", "AIDE", "AIDS", "AIRY", "AJAR", "AKIN", "ALAN", "ALEC", "ALGA", "ALIA", "ALLY", "ALMA", "ALOE", "ALSO", "ALTO", "ALUM", "ALVA", "AMEN", "AMES", "AMID", "AMMO", "AMOK", "AMOS", "AMRA", "ANDY", "ANEW", "ANNA", "ANNE", "ANTE", "ANTI", "AQUA", "ARAB", "ARCH", "AREA", "ARGO", "ARID", "ARMY", "ARTS", "ARTY", "ASIA", "ASKS", "ATOM", "AUNT", "AURA", "AUTO", "AVER", "AVID", "AVIS", "AVON", "AVOW", "AWAY", "AWRY", "BABE", "BABY", "BACH", "BACK", "BADE", "BAIL", "BAIT", "BAKE", "BALD", "BALE", "BALI", "BALK", "BALL", "BALM", "BAND", "BANE", "BANG", "BANK", "BARB", "BARD", "BARE", "BARK", "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE", "BATH", "BAWD", "BAWL", "BEAD", "BEAK", "BEAM", "BEAN", "BEAR", "BEAT", "BEAU", "BECK", "BEEF", "BEEN", "BEER", "BEET", "BELA", "BELL", "BELT", "BEND", "BENT", "BERG", "BERN", "BERT", "BESS", "BEST", "BETA", "BETH", "BHOY", "BIAS", "BIDE", "BIEN", "BILE", "BILK", "BILL", "BIND", "BING", "BIRD", "BITE", "BITS", "BLAB", "BLAT", "BLED", "BLEW", "BLOB", "BLOC", "BLOT", "BLOW", "BLUE", "BLUM", "BLUR", "BOAR", "BOAT", "BOCA", "BOCK", "BODE", "BODY", "BOGY", "BOHR", "BOIL", "BOLD", "BOLO", "BOLT", "BOMB", "BONA", "BOND", "BONE", "BONG", "BONN", "BONY", "BOOK", "BOOM", "BOON", "BOOT", "BORE", "BORG", "BORN", "BOSE", "BOSS", "BOTH", "BOUT", "BOWL", "BOYD", "BRAD", "BRAE", "BRAG", "BRAN", "BRAY", "BRED", "BREW", "BRIG", "BRIM", "BROW", "BUCK", "BUDD", "BUFF", "BULB", "BULK", "BULL", "BUNK", "BUNT", "BUOY", "BURG", "BURL", "BURN", "BURR", "BURT", "BURY", "BUSH", "BUSS", "BUST", "BUSY", "BYTE", "CADY", "CAFE", "CAGE", "CAIN", "CAKE", "CALF", "CALL", "CALM", "CAME", "CANE", "CANT", "CARD", "CARE", "CARL", "CARR", "CART", "CASE", "CASH", "CASK", "CAST", "CAVE", "CEIL", "CELL", "CENT", "CERN", "CHAD", "CHAR", "CHAT", "CHAW", "CHEF", "CHEN", "CHEW", "CHIC", "CHIN", "CHOU", "CHOW", "CHUB", "CHUG", "CHUM", "CITE", "CITY", "CLAD", "CLAM", "CLAN", "CLAW", "CLAY", "CLOD", "CLOG", "CLOT", "CLUB", "CLUE", "COAL", "COAT", "COCA", "COCK", "COCO", "CODA", "CODE", "CODY", "COED", "COIL", "COIN", "COKE", "COLA", "COLD", "COLT", "COMA", "COMB", "COME", "COOK", "COOL", "COON", "COOT", "CORD", "CORE", "CORK", "CORN", "COST", "COVE", "COWL", "CRAB", "CRAG", "CRAM", "CRAY", "CREW", "CRIB", "CROW", "CRUD", "CUBA", "CUBE", "CUFF", "CULL", "CULT", "CUNY", "CURB", "CURD", "CURE", "CURL", "CURT", "CUTS", "DADE", "DALE", "DAME", "DANA", "DANE", "DANG", "DANK", "DARE", "DARK", "DARN", "DART", "DASH", "DATA", "DATE", "DAVE", "DAVY", "DAWN", "DAYS", "DEAD", "DEAF", "DEAL", "DEAN", "DEAR", "DEBT", "DECK", "DEED", "DEEM", "DEER", "DEFT", "DEFY", "DELL", "DENT", "DENY", "DESK", "DIAL", "DICE", "DIED", "DIET", "DIME", "DINE", "DING", "DINT", "DIRE", "DIRT", "DISC", "DISH", "DISK", "DIVE", "DOCK", "DOES", "DOLE", "DOLL", "DOLT", "DOME", "DONE", "DOOM", "DOOR", "DORA", "DOSE", "DOTE", "DOUG", "DOUR", "DOVE", "DOWN", "DRAB", "DRAG", "DRAM", "DRAW", "DREW", "DRUB", "DRUG", "DRUM", "DUAL", "DUCK", "DUCT", "DUEL", "DUET", "DUKE", "DULL", "DUMB", "DUNE", "DUNK", "DUSK", "DUST", "DUTY", "EACH", "EARL", "EARN", "EASE", "EAST", "EASY", "EBEN", "ECHO", "EDDY", "EDEN", "EDGE", "EDGY", "EDIT", "EDNA", "EGAN", "ELAN", "ELBA", "ELLA", "ELSE", "EMIL", "EMIT", "EMMA", "ENDS", "ERIC", "EROS", "EVEN", "EVER", "EVIL", "EYED", "FACE", "FACT", "FADE", "FAIL", "FAIN", "FAIR", "FAKE", "FALL", "FAME", "FANG", "FARM", "FAST", "FATE", "FAWN", "FEAR", "FEAT", "FEED", "FEEL", "FEET", "FELL", "FELT", "FEND", "FERN", "FEST", "FEUD", "FIEF", "FIGS", "FILE", "FILL", "FILM", "FIND", "FINE", "FINK", "FIRE", "FIRM", "FISH", "FISK", "FIST", "FITS", "FIVE", "FLAG", "FLAK", "FLAM", "FLAT", "FLAW", "FLEA", "FLED", "FLEW", "FLIT", "FLOC", "FLOG", "FLOW", "FLUB", "FLUE", "FOAL", "FOAM", "FOGY", "FOIL", "FOLD", "FOLK", "FOND", "FONT", "FOOD", "FOOL", "FOOT", "FORD", "FORE", "FORK", "FORM", "FORT", "FOSS", "FOUL", "FOUR", "FOWL", "FRAU", "FRAY", "FRED", "FREE", "FRET", "FREY", "FROG", "FROM", "FUEL", "FULL", "FUME", "FUND", "FUNK", "FURY", "FUSE", "FUSS", "GAFF", "GAGE", "GAIL", "GAIN", "GAIT", "GALA", "GALE", "GALL", "GALT", "GAME", "GANG", "GARB", "GARY", "GASH", "GATE", "GAUL", "GAUR", "GAVE", "GAWK", "GEAR", "GELD", "GENE", "GENT", "GERM", "GETS", "GIBE", "GIFT", "GILD", "GILL", "GILT", "GINA", "GIRD", "GIRL", "GIST", "GIVE", "GLAD", "GLEE", "GLEN", "GLIB", "GLOB", "GLOM", "GLOW", "GLUE", "GLUM", "GLUT", "GOAD", "GOAL", "GOAT", "GOER", "GOES", "GOLD", "GOLF", "GONE", "GONG", "GOOD", "GOOF", "GORE", "GORY", "GOSH", "GOUT", "GOWN", "GRAB", "GRAD", "GRAY", "GREG", "GREW", "GREY", "GRID", "GRIM", "GRIN", "GRIT", "GROW", "GRUB", "GULF", "GULL", "GUNK", "GURU", "GUSH", "GUST", "GWEN", "GWYN", "HAAG", "HAAS", "HACK", "HAIL", "HAIR", "HALE", "HALF", "HALL", "HALO", "HALT", "HAND", "HANG", "HANK", "HANS", "HARD", "HARK", "HARM", "HART", "HASH", "HAST", "HATE", "HATH", "HAUL", "HAVE", "HAWK", "HAYS", "HEAD", "HEAL", "HEAR", "HEAT", "HEBE", "HECK", "HEED", "HEEL", "HEFT", "HELD", "HELL", "HELM", "HERB", "HERD", "HERE", "HERO", "HERS", "HESS", "HEWN", "HICK", "HIDE", "HIGH", "HIKE", "HILL", "HILT", "HIND", "HINT", "HIRE", "HISS", "HIVE", "HOBO", "HOCK", "HOFF", "HOLD", "HOLE", "HOLM", "HOLT", "HOME", "HONE", "HONK", "HOOD", "HOOF", "HOOK", "HOOT", "HORN", "HOSE", "HOST", "HOUR", "HOVE", "HOWE", "HOWL", "HOYT", "HUCK", "HUED", "HUFF", "HUGE", "HUGH", "HUGO", "HULK", "HULL", "HUNK", "HUNT", "HURD", "HURL", "HURT", "HUSH", "HYDE", "HYMN", "IBIS", "ICON", "IDEA", "IDLE", "IFFY", "INCA", "INCH", "INTO", "IONS", "IOTA", "IOWA", "IRIS", "IRMA", "IRON", "ISLE", "ITCH", "ITEM", "IVAN", "JACK", "JADE", "JAIL", "JAKE", "JANE", "JAVA", "JEAN", "JEFF", "JERK", "JESS", "JEST", "JIBE", "JILL", "JILT", "JIVE", "JOAN", "JOBS", "JOCK", "JOEL", "JOEY", "JOHN", "JOIN", "JOKE", "JOLT", "JOVE", "JUDD", "JUDE", "JUDO", "JUDY", "JUJU", "JUKE", "JULY", "JUNE", "JUNK", "JUNO", "JURY", "JUST", "JUTE", "KAHN", "KALE", "KANE", "KANT", "KARL", "KATE", "KEEL", "KEEN", "KENO", "KENT", "KERN", "KERR", "KEYS", "KICK", "KILL", "KIND", "KING", "KIRK", "KISS", "KITE", "KLAN", "KNEE", "KNEW", "KNIT", "KNOB", "KNOT", "KNOW", "KOCH", "KONG", "KUDO", "KURD", "KURT", "KYLE", "LACE", "LACK", "LACY", "LADY", "LAID", "LAIN", "LAIR", "LAKE", "LAMB", "LAME", "LAND", "LANE", "LANG", "LARD", "LARK", "LASS", "LAST", "LATE", "LAUD", "LAVA", "LAWN", "LAWS", "LAYS", "LEAD", "LEAF", "LEAK", "LEAN", "LEAR", "LEEK", "LEER", "LEFT", "LEND", "LENS", "LENT", "LEON", "LESK", "LESS", "LEST", "LETS", "LIAR", "LICE", "LICK", "LIED", "LIEN", "LIES", "LIEU", "LIFE", "LIFT", "LIKE", "LILA", "LILT", "LILY", "LIMA", "LIMB", "LIME", "LIND", "LINE", "LINK", "LINT", "LION", "LISA", "LIST", "LIVE", "LOAD", "LOAF", "LOAM", "LOAN", "LOCK", "LOFT", "LOGE", "LOIS", "LOLA", "LONE", "LONG", "LOOK", "LOON", "LOOT", "LORD", "LORE", "LOSE", "LOSS", "LOST", "LOUD", "LOVE", "LOWE", "LUCK", "LUCY", "LUGE", "LUKE", "LULU", "LUND", "LUNG", "LURA", "LURE", "LURK", "LUSH", "LUST", "LYLE", "LYNN", "LYON", "LYRA", "MACE", "MADE", "MAGI", "MAID", "MAIL", "MAIN", "MAKE", "MALE", "MALI", "MALL", "MALT", "MANA", "MANN", "MANY", "MARC", "MARE", "MARK", "MARS", "MART", "MARY", "MASH", "MASK", "MASS", "MAST", "MATE", "MATH", "MAUL", "MAYO", "MEAD", "MEAL", "MEAN", "MEAT", "MEEK", "MEET", "MELD", "MELT", "MEMO", "MEND", "MENU", "MERT", "MESH", "MESS", "MICE", "MIKE", "MILD", "MILE", "MILK", "MILL", "MILT", "MIMI", "MIND", "MINE", "MINI", "MINK", "MINT", "MIRE", "MISS", "MIST", "MITE", "MITT", "MOAN", "MOAT", "MOCK", "MODE", "MOLD", "MOLE", "MOLL", "MOLT", "MONA", "MONK", "MONT", "MOOD", "MOON", "MOOR", "MOOT", "MORE", "MORN", "MORT", "MOSS", "MOST", "MOTH", "MOVE", "MUCH", "MUCK", "MUDD", "MUFF", "MULE", "MULL", "MURK", "MUSH", "MUST", "MUTE", "MUTT", "MYRA", "MYTH", "NAGY", "NAIL", "NAIR", "NAME", "NARY", "NASH", "NAVE", "NAVY", "NEAL", "NEAR", "NEAT", "NECK", "NEED", "NEIL", "NELL", "NEON", "NERO", "NESS", "NEST", "NEWS", "NEWT", "NIBS", "NICE", "NICK", "NILE", "NINA", "NINE", "NOAH", "NODE", "NOEL", "NOLL", "NONE", "NOOK", "NOON", "NORM", "NOSE", "NOTE", "NOUN", "NOVA", "NUDE", "NULL", "NUMB", "OATH", "OBEY", "OBOE", "ODIN", "OHIO", "OILY", "OINT", "OKAY", "OLAF", "OLDY", "OLGA", "OLIN", "OMAN", "OMEN", "OMIT", "ONCE", "ONES", "ONLY", "ONTO", "ONUS", "ORAL", "ORGY", "OSLO", "OTIS", "OTTO", "OUCH", "OUST", "OUTS", "OVAL", "OVEN", "OVER", "OWLY", "OWNS", "QUAD", "QUIT", "QUOD", "RACE", "RACK", "RACY", "RAFT", "RAGE", "RAID", "RAIL", "RAIN", "RAKE", "RANK", "RANT", "RARE", "RASH", "RATE", "RAVE", "RAYS", "READ", "REAL", "REAM", "REAR", "RECK", "REED", "REEF", "REEK", "REEL", "REID", "REIN", "RENA", "REND", "RENT", "REST", "RICE", "RICH", "RICK", "RIDE", "RIFT", "RILL", "RIME", "RING", "RINK", "RISE", "RISK", "RITE", "ROAD", "ROAM", "ROAR", "ROBE", "ROCK", "RODE", "ROIL", "ROLL", "ROME", "ROOD", "ROOF", "ROOK", "ROOM", "ROOT", "ROSA", "ROSE", "ROSS", "ROSY", "ROTH", "ROUT", "ROVE", "ROWE", "ROWS", "RUBE", "RUBY", "RUDE", "RUDY", "RUIN", "RULE", "RUNG", "RUNS", "RUNT", "RUSE", "RUSH", "RUSK", "RUSS", "RUST", "RUTH", "SACK", "SAFE", "SAGE", "SAID", "SAIL", "SALE", "SALK", "SALT", "SAME", "SAND", "SANE", "SANG", "SANK", "SARA", "SAUL", "SAVE", "SAYS", "SCAN", "SCAR", "SCAT", "SCOT", "SEAL", "SEAM", "SEAR", "SEAT", "SEED", "SEEK", "SEEM", "SEEN", "SEES", "SELF", "SELL", "SEND", "SENT", "SETS", "SEWN", "SHAG", "SHAM", "SHAW", "SHAY", "SHED", "SHIM", "SHIN", "SHOD", "SHOE", "SHOT", "SHOW", "SHUN", "SHUT", "SICK", "SIDE", "SIFT", "SIGH", "SIGN", "SILK", "SILL", "SILO", "SILT", "SINE", "SING", "SINK", "SIRE", "SITE", "SITS", "SITU", "SKAT", "SKEW", "SKID", "SKIM", "SKIN", "SKIT", "SLAB", "SLAM", "SLAT", "SLAY", "SLED", "SLEW", "SLID", "SLIM", "SLIT", "SLOB", "SLOG", "SLOT", "SLOW", "SLUG", "SLUM", "SLUR", "SMOG", "SMUG", "SNAG", "SNOB", "SNOW", "SNUB", "SNUG", "SOAK", "SOAR", "SOCK", "SODA", "SOFA", "SOFT", "SOIL", "SOLD", "SOME", "SONG", "SOON", "SOOT", "SORE", "SORT", "SOUL", "SOUR", "SOWN", "STAB", "STAG", "STAN", "STAR", "STAY", "STEM", "STEW", "STIR", "STOW", "STUB", "STUN", "SUCH", "SUDS", "SUIT", "SULK", "SUMS", "SUNG", "SUNK", "SURE", "SURF", "SWAB", "SWAG", "SWAM", "SWAN", "SWAT", "SWAY", "SWIM", "SWUM", "TACK", "TACT", "TAIL", "TAKE", "TALE", "TALK", "TALL", "TANK", "TASK", "TATE", "TAUT", "TEAL", "TEAM", "TEAR", "TECH", "TEEM", "TEEN", "TEET", "TELL", "TEND", "TENT", "TERM", "TERN", "TESS", "TEST", "THAN", "THAT", "THEE", "THEM", "THEN", "THEY", "THIN", "THIS", "THUD", "THUG", "TICK", "TIDE", "TIDY", "TIED", "TIER", "TILE", "TILL", "TILT", "TIME", "TINA", "TINE", "TINT", "TINY", "TIRE", "TOAD", "TOGO", "TOIL", "TOLD", "TOLL", "TONE", "TONG", "TONY", "TOOK", "TOOL", "TOOT", "TORE", "TORN", "TOTE", "TOUR", "TOUT", "TOWN", "TRAG", "TRAM", "TRAY", "TREE", "TREK", "TRIG", "TRIM", "TRIO", "TROD", "TROT", "TROY", "TRUE", "TUBA", "TUBE", "TUCK", "TUFT", "TUNA", "TUNE", "TUNG", "TURF", "TURN", "TUSK", "TWIG", "TWIN", "TWIT", "ULAN", "UNIT", "URGE", "USED", "USER", "USES", "UTAH", "VAIL", "VAIN", "VALE", "VARY", "VASE", "VAST", "VEAL", "VEDA", "VEIL", "VEIN", "VEND", "VENT", "VERB", "VERY", "VETO", "VICE", "VIEW", "VINE", "VISE", "VOID", "VOLT", "VOTE", "WACK", "WADE", "WAGE", "WAIL", "WAIT", "WAKE", "WALE", "WALK", "WALL", "WALT", "WAND", "WANE", "WANG", "WANT", "WARD", "WARM", "WARN", "WART", "WASH", "WAST", "WATS", "WATT", "WAVE", "WAVY", "WAYS", "WEAK", "WEAL", "WEAN", "WEAR", "WEED", "WEEK", "WEIR", "WELD", "WELL", "WELT", "WENT", "WERE", "WERT", "WEST", "WHAM", "WHAT", "WHEE", "WHEN", "WHET", "WHOA", "WHOM", "WICK", "WIFE", "WILD", "WILL", "WIND", "WINE", "WING", "WINK", "WINO", "WIRE", "WISE", "WISH", "WITH", "WOLF", "WONT", "WOOD", "WOOL", "WORD", "WORE", "WORK", "WORM", "WORN", "WOVE", "WRIT", "WYNN", "YALE", "YANG", "YANK", "YARD", "YARN", "YAWL", "YAWN", "YEAH", "YEAR", "YELL", "YOGA", "YOKE" }; char *otpbtoe(char *c, char *engout) { char cp[9]; /* add in room for the parity 2 bits */ short p, i; engout[0] = '\0'; memcpy(cp, c, 8); /* compute parity */ for (p = 0, i = 0; i < 64; i += 2) p += otpextract(cp, i, 2); cp[8] = (char)(p << 6); strncat(engout, otpenglish[otpextract(cp, 0, 11)], 4); strcat(engout, " "); strncat(engout, otpenglish[otpextract(cp, 11, 11)], 4); strcat(engout, " "); strncat(engout, otpenglish[otpextract(cp, 22, 11)], 4); strcat(engout, " "); strncat(engout, otpenglish[otpextract(cp, 33, 11)], 4); strcat(engout, " "); strncat(engout, otpenglish[otpextract(cp, 44, 11)], 4); strcat(engout, " "); strncat(engout, otpenglish[otpextract(cp, 55, 11)], 4); return (engout); } unsigned long otpextract(char *s, short start, short length) { unsigned long x; unsigned char cl; unsigned char cc; unsigned char cr; cl = s[start / 8]; cc = s[start / 8 + 1]; cr = s[start / 8 + 2]; x = ((unsigned long) (cl << 8 | cc) << 8 | cr); x = x >> (24 - (length + (start % 8))); x = (x & (0xffff >> (16 - length))); return (x); } \ No newline at end of file diff --git a/source/parse/otp.proto.h b/source/parse/otp.proto.h new file mode 100755 index 0000000..fa32e27 --- /dev/null +++ b/source/parse/otp.proto.h @@ -0,0 +1 @@ +void otpgenerator(char *, char *, char *, short); void otphashlen(short, char *, char *); void otphash(short, char *); char *otpbtoh (char *, char *); char *otpbtoe(char *, char *); unsigned long otpextract(char *, short, short); void otpinterface(short, char *, struct WindRec *, short, short, char *, short); void otpgetselection(char *); // SHA1 protos typedef struct { unsigned long state[5]; unsigned long count[2]; unsigned char buffer[64]; } SHA1_CTX; void SHA1Transform(unsigned long state[5], unsigned char buffer[64]); void SHA1Init(SHA1_CTX* context); void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len); void SHA1Final(unsigned char digest[20], SHA1_CTX* context); \ No newline at end of file diff --git a/source/parse/parse.c b/source/parse/parse.c new file mode 100755 index 0000000..4f5cadf --- /dev/null +++ b/source/parse/parse.c @@ -0,0 +1 @@ +// parse.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Parse #endif #include "parse.h" // For our #defines #include "wind.h" /* For WindRec structure */ /* For putln proto */ #include "network.proto.h" /* For net functions */ #include "linemode.proto.h" #include "vgtek.proto.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "maclook.proto.h" #include "tekrgmac.proto.h" #include "menuseg.proto.h" #include "translate.proto.h" #include "vr.h" #include "vr.proto.h" #include "tnae.h" #include "authencrypt.h" #include "authencrypt.proto.h" #include "wdefpatch.proto.h" #include "otp.proto.h" //#define OPTS_DEBUG #ifdef OPTS_DEBUG #include "optsdebug.h" #define opts_debug_print(x) putln(x) static char munger[255]; #else #define opts_debug_print(x) #endif #include "Profiler.h" extern short scrn; extern WindRec *screens; #include "parse.proto.h" static char *getcname(struct WindRec *tw); static void encryptStatechange(struct WindRec *tw); static void process_suboption(struct WindRec *tw, unsigned char *start, unsigned char *end); static void send_will(short port, short option); static void send_wont(short port, short option); static void telnet_do(struct WindRec *tw, short option); static void telnet_dont(struct WindRec *tw, short option); static void telnet_will(struct WindRec *tw, short option); static void telnet_wont(struct WindRec *tw, short option); void Parseunload(void) {} void SendStringAsIfTyped(struct WindRec *tw, char *string, short len) { // trbuf_nat_mac((unsigned char *)string, len, tw->national); trbuf_mac_nat((unsigned char *)string, len, tw->national); // drh - bug fix netpush(tw->port); if (tw->kblen > 0) { /* need to flush buffer */ netwrite(tw->port, tw->kbbuf, tw->kblen); tw->kblen=0; } netwrite(tw->port, string, len); if (tw->echo) parse(tw, (unsigned char *)string, len); } /*********************************************************************/ /* parse * look at the string which has just come in from outside and * check for special sequences that we are interested in. * * Tries to pass through routine strings immediately, waiting for special * characters ESC and 255 to change modes. */ void parse (struct WindRec *tw, unsigned char *st, short cnt) { short i,temptw; unsigned char *mark,*orig; // ProfilerSetStatus(true); orig = st; /* remember beginning point */ mark = st + cnt; /* set to end of input string */ /* * raw mode for debugging, passes through escape sequences and other * special characters as <27> symbols */ if (tw->termstate == DUMBTYPE) { for (i=0; i < cnt; i++,st++) /* put on screen raw */ if (*st == 27 || *st > 126) { sprintf((char *)tw->parsedat,"<%d>",*st); VSwrite(tw->vs,(char *)tw->parsedat,strlen((char *)tw->parsedat)); /* send to virtual screen */ } else VSwrite(tw->vs,(char *) st,1); /* BYU LSC */ } else { /* * traverse string, looking for any special characters which indicate that * we need to change modes. */ while (st < mark) { switch (tw->telstate) { case GS: case ESCFOUND: if (tw->tektype >= 0) { /* we'll allow the TEK */ if ((*st == 12) || (tw->telstate == GS)) { /* esc-FF */ if ((*st == 12) && ((tw->termstate == VTEKTYPE) || (!tw->tekclear))) { if (tw->termstate == VTEKTYPE) putln("Entering Tek mode"); else if (tw->curgraph > -1) detachGraphics(tw->curgraph); if (tw->curgraph <= -1) { // No current TEK window temptw = VGnewwin(TEK_DEVICE_WINDOW,tw->vs); if (temptw > -1) { Str255 scratchPstring; tw->curgraph = temptw; VGgiveinfo(temptw); GetWTitle(tw->wind, scratchPstring); PtoCstr(scratchPstring); RGattach(temptw,tw->vs,(char *)scratchPstring, tw->tektype); } else tw->telstate = TS_NORM; // Can't create TEK window } if (tw->telstate != TS_NORM) tw->termstate = TEKTYPE; } if (tw->telstate == GS) { st++; VGwrite(tw->curgraph,"\035",1); } else if (tw->telstate != TS_NORM) VGwrite(tw->curgraph,"\037\033\014",3); tw->telstate = TS_NORM; break; } // FF or GS } // tw->tektype >= 0 if (*st == '^') { /* ESC- ^ */ tw->termstate = RASTYPE; tw->telstate = TS_NORM; VRwrite("\033^",2); /* Put it through */ orig = ++st; break; } if (tw->termstate == TEKTYPE) VGwrite(tw->curgraph,"\033",1); else if (tw->termstate == RASTYPE) VRwrite("\033",1); else VSwrite(tw->vs,"\033",1); /* send the missing ESC */ tw->telstate = TS_NORM; break; /*------------------------------------------------------------------------------* * IACFOUND: This is the start of the Telnet option negotiation. If Telnet * * gets an IAC character, then negotiation data follows, and is ready to be * * parsed. * *------------------------------------------------------------------------------*/ case IACFOUND: /* telnet option negotiation- START */ if (*st == TEL_IAC) { /* real data = 255 */ orig = st; // MP: translation mod (break will make it miss // this assignment later on in the case, Jim!) st++; /* real 255 will get sent */ tw->telstate = TS_NORM; break; } else { switch (*st++) { case TEL_EOF: /* BYU LSC */ case TEL_EL: /* thanx Quincey!!! */ case TEL_EC: case TEL_AYT: case TEL_AO: case TEL_IP: case TEL_BREAK: case TEL_DM: case TEL_NOP: case TEL_SE: case TEL_GA: #ifdef OPTS_DEBUG sprintf(munger,"RECV: %s",telstates[tw->telstate]); opts_debug_print(munger); #endif tw->telstate = TS_NORM; orig=st; break; case TEL_DOTEL: tw->telstate = TS_DO; orig = st; break; case TEL_WILLTEL: tw->telstate = TS_WILL; orig = st; break; case TEL_DONTTEL: tw->telstate = TS_DONT; orig = st; break; case TEL_WONTTEL: tw->telstate = TS_WONT; orig = st; break; /*------------------------------------------------------------------------------* * SUBNEGOTIATION -- If there is an SB token found, then Telnet needs to do * * some subnegotiating. The subnegotiation data follows, and needs to be put * * somewhere safe. Make sure and update the state, so that we know that * * Telnet is doing some subnegotiations and not just horsing around * *------------------------------------------------------------------------------*/ case TEL_SB: tw->telstate = TS_SB; /* Guess what I'm doing... */ orig=st; tw->parseIndex = 0; /* No data yet! Clear any possible garbage */ break; default: // Means we got IAC where xx isn't recognized orig = st; tw->telstate = TS_NORM; #ifdef OPTS_DEBUG sprintf(munger,"RECVD: IAC %c",*(st-1)); opts_debug_print(munger); #endif break; } // switch (*st++) } // else from it (*st == TEL_IAC) break; // case IACFOUND case TS_DO: telnet_do(tw, *st++); orig = st; tw->telstate = TS_NORM; break; case TS_DONT: telnet_dont(tw, *st++); orig = st; tw->telstate = TS_NORM; break; case TS_WILL: telnet_will(tw, *st++); orig = st; tw->telstate = TS_NORM; break; case TS_WONT: telnet_wont(tw, *st++); orig = st; tw->telstate = TS_NORM; break; case TS_SB: if (*st == TEL_IAC) { st++; if (*st == TEL_SE) //subnegotiation over { st++; process_suboption(tw, st, mark); orig = st; tw->telstate = TS_NORM; } else { if (*st == TEL_IAC) //doubled IAC tw->parsedat[tw->parseIndex++] = *st++; else { //process this, then go IAC found tw->parsedat[tw->parseIndex++] = TEL_IAC; //why do we add this to tw->parsedat[tw->parseIndex++] = *st; //the parsedat? We don't process_suboption(tw, st, mark); //need it for the options tw->substat = IACFOUND; } } } else // Collect subnegotiation data tw->parsedat[tw->parseIndex++] = *st++; break; default: tw->telstate = TS_NORM; break; } // switch(tw->telstate) /* * quick scan of the remaining string, skip chars while they are * uninteresting */ if (tw->telstate == TS_NORM) { /* * skip along as fast as possible until an interesting character is found */ if (!tw->eightbit) { /* BYU 2.4.10 */ while (st < mark) { /* BYU 2.4.10 */ if (*st == IAC) /* BYU 2.4.10 */ break; /* BYU 2.4.10 */ else { /* BYU 2.4.10 */ *st &= 0x7f; /* BYU 2.4.10 */ if (*st == ESC || *st == GS) /* BYU 2.4.10 */ break; /* BYU 2.4.10 */ st++; /* BYU 2.4.10 */ } } /* BYU 2.4.10 */ } else /* BYU 2.4.10 */ while (st < mark && *st != ESC && *st < 255 && *st != GS) // MP: translation mod st++; /* BYU 2.4.10 */ /* * send the string where it belongs */ if (!tw->timing) { if (tw->termstate == TEKTYPE) { short i; i = VGwrite( tw->curgraph,(char *) orig, st-orig); /* BYU LSC */ if (i < (st - orig)) { detachGraphics(tw->curgraph); st = orig + i; } } else if (tw->termstate == RASTYPE) { short i; i= VRwrite((char *) orig, st-orig); /* BYU LSC */ if (i <(st-orig)) { tw->termstate = VTEKTYPE; st = orig +i; /* Next char to parse */ } } else { if (tw->otpauto) otpauto(tw, (char *) orig, st-orig); VSwrite( tw->vs,(char *) orig,st-orig); /* BYU LSC - send to virtual VT102 */ } } orig = st; /* forget what we have sent already */ if (st < mark) switch (*st) { case TEL_IAC: /* telnet IAC */ tw->telstate = IACFOUND; st++; break; case GS: if (tw->telstate != GS) { tw->telstate = GS; } else tw->telstate = TS_NORM; st++; break; case ESC: /* ESCape code */ if (st == mark-1 || *(st+1) == 12 || *(st+1) == '^' ) { tw->telstate = ESCFOUND; } st++; /* strip or accept ESC char */ break; default: if (*st++ > 127) { if (st==mark) /*new addition */ VSwrite(tw->vs,(char *) orig,1); /* BYU LSC */ } break; } // switch(*st) } // tw->telstate == TS_NORM } // while (st < mark) } // tw->termstate != DUMBTYPE // ProfilerSetStatus(false); } /* parse */ void SendNAWSinfo(WindRec *s, short horiz, short vert) { char blah[20]; unsigned char height, width; height = vert & 0xff; width = horiz & 0xff; /* 931112, ragge, NADA, KTH, ugly patch to not send IAC as window size */ if(height == 0xFF) height = 0xFE; if(width == 0xFF) width = 0xFE; netpush (s->port); /* NCSA: syntax for command is: IAC SB NAWS widthHI widthLO heightHI heightLO IAC SE */ netwrite(s->port,"\377\372\037\000",4); sprintf(blah,"%c\000", width); netwrite(s->port,blah,2); sprintf(blah,"%c\377\360", height); netwrite(s->port,blah,3); opts_debug_print("SENT: IAC SB NAWS IAC SE"); } /* * Implementation specific Kerberos routines */ /* * getcname * Return a pointer to the cannonical host name */ static char *getcname (WindRec *tw) { char *cp; static char *b, buf[100]; cp = 0; if (tw->cannon[0]) cp = tw->cannon; // Doing the following is bad because we disposed of our init params! // else if ((*(*(ConnInitParams **)(tw->myInitParams))->session)->hostname) // cp = (char *)(*(*(ConnInitParams **)(tw->myInitParams))->session)->hostname; /* make a local copy to avoid locking handles */ if (cp) { b = buf; while (*cp) *b++ = *cp++; *b++ = '\0'; return buf; } return cp; } /* * encryptStatechange * Called when the encryption state changes */ #define kOurHit 32 static void encryptStatechange (struct WindRec *tw) { MyWDEFPatch(zoomDocProc, tw->wind, wDraw, kOurHit); } void telnet_send_initial_options(WindRec *tw) { if (tw->authenticate) { send_will(tw->port, OPT_AUTHENTICATION); (tw->myopts)[OPT_AUTHENTICATION-MHOPTS_BASE] = 1; if (tw->encrypt) { send_will(tw->port, OPT_ENCRYPT); /* will encrypt */ (tw->myopts)[OPT_ENCRYPT-MHOPTS_BASE] = 1; } } if ((tw->portNum == 23) || tw->portNegative) { send_do(tw->port, N_ECHO); // Do ECHO tw->echo = 1; send_do(tw->port, N_SGA); // Do SGA tw->Usga=1; send_wont(tw->port, N_XDISPLOC); send_will(tw->port, N_NAWS); } else { tw->echo = 1; tw->Usga = 1; } } static void process_suboption(struct WindRec *tw, unsigned char *start, unsigned char *end) { unsigned long sendlength; unsigned char sendbuffer[1500]; short s; char IACSB[] = { TEL_IAC, TEL_SB, 0, 0}; char IACSE[] = { TEL_IAC, TEL_SE}; switch(tw->parsedat[0]) { /*------------------------------------------------------------------------------* * SUBNegotiate Termtype: send the term type data now * *------------------------------------------------------------------------------*/ case N_TERMTYP: if (tw->parsedat[1]==1) { char s[60], termtmp[40]; BlockMove(tw->answerback, termtmp, 32); PtoCstr((StringPtr)termtmp); #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB TERMINAL-TYPE SEND\r\nSEND: SB TERMINAL-TYPE IS %s\r\n",termtmp); opts_debug_print(munger); #endif IACSB[2] = '\030'; IACSB[3] = 0; netpush(tw->port); netwrite(tw->port,IACSB,4); netpush(tw->port); sprintf(s,"%s%c%c",termtmp, TEL_IAC, TEL_SE); netwrite(tw->port, s, strlen(s)); } break; /*------------------------------------------------------------------------------* * SUBNegotiate ENCRYPTION: * *------------------------------------------------------------------------------*/ case N_ENCRYPT: sendlength = sizeof(sendbuffer); s = encrypt_suboption((tnParams **)&tw->aedata, tw->parsedat, tw->parseIndex, sendbuffer, &sendlength, getcname(tw), tw->hisopts[OPT_ENCRYPT - MHOPTS_BASE], tw->myopts[OPT_ENCRYPT - MHOPTS_BASE]); netportencryptstate(tw->port, (Ptr)tw->aedata); encryptStatechange(tw); /* * If we turned on encryption, we must decrypt the rest of the buffer. */ if (s == TNREP_START_DECRYPT) { unsigned char *cp = start; while (cp < end) { *cp = decrypt((tnParams *)tw->aedata, (long)(*cp)); cp++; } } if (sizeof(sendbuffer) - sendlength) netwrite(tw->port, sendbuffer, sizeof(sendbuffer)-sendlength); /* * transfer the encrypting flag here, after the buffer * with encrypt-start has gone out. */ if (((tnParams *)tw->aedata)->startencrypting) { ((tnParams *)tw->aedata)->startencrypting = false; ((tnParams *)tw->aedata)->encrypting = true; } break; /*------------------------------------------------------------------------------* * SUBNegotiate Authentication: send the authentication data now * *------------------------------------------------------------------------------*/ case N_AUTHENTICATION: sendlength = sizeof(sendbuffer); auth_suboption((tnParams **)&tw->aedata, tw->parsedat, tw->parseIndex, sendbuffer, &sendlength, getcname(tw), tw->hisopts[OPT_ENCRYPT-MHOPTS_BASE], tw->myopts[OPT_ENCRYPT-MHOPTS_BASE]); if (sizeof(sendbuffer) - sendlength) { netwrite(tw->port, sendbuffer, sizeof(sendbuffer)-sendlength); } break; /*------------------------------------------------------------------------------* * SUBNegotiate Linemode: set up local characters, modes, and such * *------------------------------------------------------------------------------*/ case N_LINEMODE: linemode_suboption(tw); break; /*------------------------------------------------------------------------------* * SUBNegotiate REMOTE_FLOW_CONTROL: determine whether we control flow, and * * what restarts flow * *------------------------------------------------------------------------------*/ case N_REMOTEFLOW: switch (tw->parsedat[1]) { case FLOW_OFF: #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB REMOTE_FLOW FLOW_OFF"); opts_debug_print(munger); #endif tw->allow_flow = FALSE; break; case FLOW_ON: #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB REMOTE_FLOW FLOW_ON"); opts_debug_print(munger); #endif tw->allow_flow = TRUE; break; case FLOW_RESTART_ANY: #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB REMOTE_FLOW FLOW_RESTART_ANY"); opts_debug_print(munger); #endif tw->restart_any_flow = TRUE; break; case FLOW_RESTART_XON: #ifdef OPTS_DEBUG sprintf(munger,"RECV: SB REMOTE_FLOW FLOW_RESTART_XON"); opts_debug_print(munger); #endif tw->restart_any_flow = FALSE; break; default: break; } default: //dont know this subnegotiation!! break; } } static void telnet_do(struct WindRec *tw, short option) { #ifdef OPTS_DEBUG sprintf(munger,"RECV: %s %s",telstates[TEL_DOTEL-TEL_SE],teloptions[option]); opts_debug_print(munger); #endif switch(option) { case N_SGA: /* Sure we'll supress GA */ if (!tw->Isga) { tw->Isga=1; send_will(tw->port, N_SGA); } break; case N_TERMTYP: /* And we'll even tell you about ourselves */ if (!tw->Ittype) { tw->Ittype=1; send_will(tw->port, N_TERMTYP); } break; case N_NAWS: /* NCSA: sure, I like changing the window size! */ tw->naws =1; /* NCSA: this session is now NAWS */ send_will(tw->port, N_NAWS); SendNAWSinfo(tw, VSmaxwidth(tw->vs) + 1, VSgetlines(tw->vs)); #ifdef OPTS_DEBUG opts_debug_print("SENT: IAC TEL_SB N_NAWS IAC TEL_SE"); #endif break; /* NCSA */ case N_LINEMODE: /* Sure I'll do line mode... */ if (tw->lineAllow) { send_will(tw->port, N_LINEMODE); doLinemode(tw); } else send_wont(tw->port, N_LINEMODE); break; case N_AUTHENTICATION: /* do auth */ if (!tw->myopts[OPT_AUTHENTICATION-MHOPTS_BASE]) { if (tw->authenticate) { (tw->myopts)[OPT_AUTHENTICATION-MHOPTS_BASE] = 1; send_will(tw->port, N_AUTHENTICATION); } else { send_wont(tw->port, N_AUTHENTICATION); } } break; case N_ENCRYPT: /* do encrypt */ if (!tw->myopts[OPT_ENCRYPT-MHOPTS_BASE]) { if (tw->encrypt) { (tw->myopts)[OPT_ENCRYPT-MHOPTS_BASE] = 1; send_will(tw->port, N_ENCRYPT); } else { send_wont(tw->port, N_ENCRYPT); } } break; case N_REMOTEFLOW: if (!tw->remote_flow) { tw->remote_flow = TRUE; send_will(tw->port, option); } break; default: /* But, we won't do .... */ send_wont(tw->port, option); break; } } static void telnet_dont(struct WindRec *tw, short option) { #ifdef OPTS_DEBUG sprintf(munger,"RECV: %s %s",telstates[TEL_DONTTEL-TEL_SE],teloptions[option]); opts_debug_print(munger); #endif switch (option) { case N_ENCRYPT: /* dont encrypt */ case N_AUTHENTICATION: /* dont authenticate */ tw->myopts[option - MHOPTS_BASE] = 0; send_wont(tw->port, option); break; case N_LINEMODE: /* Ok. turn it off if its on */ if (tw->lmode) { send_wont(tw->port, N_LINEMODE); if (tw->kblen > 0) { netpush(tw->port); netwrite(tw->port, tw->kbbuf, tw->kblen); } tw->lmode = 0; tw->lmodeBits = 0; tw->litNext = 0; } break; } } static void telnet_will(struct WindRec *tw, short option) { #ifdef OPTS_DEBUG sprintf(munger,"RECV: %s %s",telstates[TEL_WILLTEL-TEL_SE],teloptions[option]); opts_debug_print(munger); #endif switch(option) { case N_ECHO: /* Echo on the other end*/ #ifdef OPTS_DEBUG if (!tw->echo) opts_debug_print("tw->echo is False."); #endif if (!tw->echo) break; tw->echo = 0; /* Ok, in that case they can echo... */ changeport(scrn,scrn); send_do(tw->port, N_ECHO); break; case N_SGA: /* Supress GA */ #ifdef OPTS_DEBUG if (tw->Usga) opts_debug_print("tw->Usga is True."); #endif if (tw->Usga) break; tw->Usga = 1; /* Go Ahead and supress GA */ send_do(tw->port, N_SGA); break; case N_TIMING: /* Timing Mark */ tw->timing = 0; break; case N_AUTHENTICATION: /* will auth */ if (!tw->hisopts[OPT_AUTHENTICATION-MHOPTS_BASE]) { if (tw->authenticate) { (tw->hisopts)[OPT_AUTHENTICATION-MHOPTS_BASE] = 1; send_do(tw->port, N_AUTHENTICATION); } else { send_dont(tw->port, N_AUTHENTICATION); } } break; case N_ENCRYPT: /* will encrypt */ if (!tw->hisopts[OPT_ENCRYPT-MHOPTS_BASE]) { if (tw->encrypt) { (tw->hisopts)[OPT_ENCRYPT-MHOPTS_BASE] = 1; send_do(tw->port, N_ENCRYPT); } else { send_dont(tw->port, N_ENCRYPT); } } break; case N_REMOTEFLOW: /* they want to toggle flow control */ if (!tw->remote_flow) { tw->remote_flow = 1; #ifdef OPTS_DEBUG opts_debug_print("tw->remote_flow is True."); #endif send_do(tw->port, N_REMOTEFLOW); } default: send_dont(tw->port, option); } } static void telnet_wont(struct WindRec *tw, short option) { #ifdef OPTS_DEBUG sprintf(munger,"RECV: %s %s",telstates[TEL_WONTTEL-TEL_SE],teloptions[option]); opts_debug_print(munger); #endif switch(option) { /* which option? */ case N_ECHO: /* echo */ if (tw->echo) break; tw->echo = 1; /* Ok, I will echo if I have to... */ changeport(scrn,scrn); send_dont(tw->port,N_ECHO); break; case N_SGA: if (!tw->Usga) break; tw->Usga = 0; send_dont(tw->port,N_SGA); break; case N_TIMING: /* Timing Mark */ tw->timing = 0; break; case N_ENCRYPT: /* wont encrypt */ case N_AUTHENTICATION: /* wont authenticate */ tw->hisopts[option-MHOPTS_BASE] = 0; send_dont(tw->port, option); break; default: break; } } void send_do(short port, short option) { char data[] = { IAC, TEL_DOTEL, 0}; data[2] = option; netpush(port); netwrite(port, data, 3); #ifdef OPTS_DEBUG sprintf(munger,"SENT: DO %s",teloptions[option]); opts_debug_print(munger); #endif } void send_dont(short port, short option) { char data[] = { IAC, TEL_DONTTEL, 0}; data[2] = option; netpush(port); netwrite(port, data, 3); #ifdef OPTS_DEBUG sprintf(munger,"SENT: DONT %s",teloptions[option]); opts_debug_print(munger); #endif } static void send_will(short port, short option) { char data[] = { IAC, TEL_WILLTEL, 0}; data[2] = option; netpush(port); netwrite(port, data, 3); #ifdef OPTS_DEBUG sprintf(munger,"SENT: WILL %s",teloptions[option]); opts_debug_print(munger); #endif } static void send_wont(short port, short option) { char data[] = { IAC, TEL_WONTTEL, 0}; data[2] = option; netpush(port); netwrite(port, data, 3); #ifdef OPTS_DEBUG sprintf(munger,"SENT: WONT %s",teloptions[option]); opts_debug_print(munger); #endif } void otpauto(struct WindRec *tw, char *string, short len) { short i; short templen; char *tempstring; templen = len; tempstring = string; while (templen) { switch (tw->otpautostate) { case 0: // waiting for otp prompt for (i = 0; i < 8; i++) tw->otpautobuffer[i] = tw->otpautobuffer[i + 1]; tw->otpautobuffer[8] = *tempstring; if (!strncmp(tw->otpautobuffer, "otp-sha1 ", 9)) { tw->otpautostate = 1; strncpy(tw->otpautostring, "otp-sha1 ", 9); tw->otpautolength = 9; } else if (!strncmp(tw->otpautobuffer + 1, "otp-md5 ", 8)) { tw->otpautostate = 1; strncpy(tw->otpautostring, "otp-md5 ", 8); tw->otpautolength = 8; } else if (!strncmp(tw->otpautobuffer + 1, "otp-md4 ", 8)) { tw->otpautostate = 1; strncpy(tw->otpautostring, "otp-md4 ", 8); tw->otpautolength = 8; } else if (!strncmp(tw->otpautobuffer + 3, "s/key ", 6)) { tw->otpautostate = 1; strncpy(tw->otpautostring, "s/key ", 6); tw->otpautolength = 6; } break; case 1: // checking for sequence number if ((*tempstring >= '0') && (*tempstring <= '9')) { tw->otpautostate = 2; tw->otpautostring[tw->otpautolength] = *tempstring; tw->otpautolength++; } else tw->otpautostate = 0; break; case 2: // moving through sequence number if (tw->otpautolength > 250) { tw->otpautostate = 0; break; } if ((*tempstring >= '0') && (*tempstring <= '9')) { tw->otpautostring[tw->otpautolength] = *tempstring; tw->otpautolength++; break; } if (*tempstring == ' '){ tw->otpautostate = 3; tw->otpautostring[tw->otpautolength] = ' '; tw->otpautolength++; break; } tw->otpautostate = 0; break; case 3: // moving through string if (tw->otpautolength > 250) { tw->otpautostate = 0; break; } if ((*tempstring <= ' ') || (*tempstring == ']')) { tw->otpautostring[tw->otpautolength] = 0; tw->otpautostate = 0; tw->otpauto = tw->otpmulti; otpinterface(1, tw->otpautostring, tw, tw->otphex, tw->otpnoprompt, tw->otppassword, tw->otpsavepass); } else { tw->otpautostring[tw->otpautolength] = *tempstring; tw->otpautolength++; } break; } templen--; tempstring++; } } \ No newline at end of file diff --git a/source/parse/parse.h b/source/parse/parse.h new file mode 100755 index 0000000..78b0818 --- /dev/null +++ b/source/parse/parse.h @@ -0,0 +1 @@ + /* These are the different Telnet option negotiation tags */ #define TEL_EOF 236 /* BYU LSC */ #define TEL_SUSP 237 #define TEL_ABORT 238 //CCP for linemode rfc #define TEL_SE 240 /* end sub-negitiation */ // 360 #define TEL_NOP 241 /* No Operation */ #define TEL_DM 242 /* data mark */ #define TEL_BREAK 243 #define TEL_IP 244 /* the ole' Interrupt Process */ #define TEL_AO 245 /* Abort Output */ #define TEL_AYT 246 /* Are You There???? */ #define TEL_EC 247 /* Erase Char */ #define TEL_EL 248 /* Erase Line */ #define TEL_GA 249 /* Telnet Go-Ahead */ #define TEL_SB 250 /* start a Subnegotion */ // 372 #define TEL_WILLTEL 251 /* Negotiate: Will do this option */ // 373 #define TEL_WONTTEL 252 /* Negotiate: Wont do this option */ // 374 #define TEL_DOTEL 253 /* Negotiate: Do this option */ // 375 #define TEL_DONTTEL 254 /* Negotiate: Dont do this option */ // 376 #define TEL_IAC 255 /* these are the rest of the defines needed for the option negitiations */ #define TS_NORM 0 /* parsing data normal */ #define TS_SB 1 /* Subnegotiation data follows */ #define TS_SE 2 #define TS_WILL 3 #define TS_WONT 4 #define TS_DO 7 #define TS_DONT 8 #define ESCFOUND 5 /* we have found an ESC sequence */ #define IACFOUND 6 /* negotiation data follows */ #define SEXECUTE 200 #define IAC 255 /* signals negotiation data is coming */ #define GS 29 /* we can drop into TEK from here */ /* these are some of the various options that we can negotiate about */ #define N_BINARY 0 /* binary data transfer */ #define N_ECHO 1 /* for local echo stuff */ #define N_SGA 3 /* Go ahead */ #define N_STATUS 5 #define N_TIMING 6 /* timing mark */ #define N_TERMTYP 24 /* set the terminal type */ #define N_NAWS 31 /* Negotiate About Window Size */ #define N_TERMSPEED 32 /* how fast can we go? */ #define N_REMOTEFLOW 33 /* do Remote Flow Control */ //flow control suboptions #define FLOW_OFF 0 // dont allow flow control #define FLOW_ON 1 // allow flow control #define FLOW_RESTART_ANY 2 // restart flow on any character #define FLOW_RESTART_XON 3 // restart flow only on XON #define N_LINEMODE 34 /* Ah yes, the infamous Line Mode option */ #define L_MODE 1 #define L_FORWARDMASK 2 #define L_SLC 3 #define N_XDISPLOC 35 #define N_AUTHENTICATION 37 /* Authentication */ #define N_ENCRYPT 38 /* Encryption */ /* Values for LINEMODE MODE */ #define L_EDIT 1 #define L_TRAPSIG 2 #define L_MODE_ACK 4 #define L_SOFT_TAB 8 #define L_LIT_ECHO 16 #define L_MODE_MASK 31 /* these are the local keys, defined right before our very eyes!! */ /* used for line-mode negotiations */ #define SLC_NOSUPPORT 0 #define SLC_CANTCHANGE 1 #define SLC_VALUE 2 #define SLC_DEFAULT 3 #define SLC_LEVELBITS 3 #define SLC_FLUSHOUT 32 #define SLC_FLUSHIN 64 #define SLC_AWK 128 #define SLC_MAX 30 #define SLC_SYNCH 1 #define SLC_BRK 2 #define SLC_IP 3 #define SLC_AO 4 #define SLC_AYT 5 #define SLC_EOR 6 #define SLC_ABORT 7 #define SLC_EOF 8 #define SLC_SUSP 9 #define SLC_EC 10 #define SLC_EL 11 #define SLC_EW 12 #define SLC_RP 13 #define SLC_LNEXT 14 #define SLC_XON 15 #define SLC_XOFF 16 #define SLC_FORW1 17 #define SLC_FORW2 18 #define DEFAULT_SLC_AO 21 #define DEFAULT_SLC_IP 3 #define DEFAULT_SLC_EC 127 #define DEFAULT_SLC_EL 21 #define DEFAULT_SLC_EOF 4 #define DEFAULT_SLC_ABORT 3 #define DEFAULT_SLC_SUSP 26 #define DEFAULT_SLC_EW 23 #define DEFAULT_SLC_RP 18 #define DEFAULT_SLC_LNEXT 22 #define DEFAULT_SLC_XON 17 #define DEFAULT_SLC_XOFF 19 #define DEFAULT_SLC_FORW1 22 #define DEFAULT_SLC_FORW2 254 #define substate tw->substat \ No newline at end of file diff --git a/source/parse/parse.proto.h b/source/parse/parse.proto.h new file mode 100755 index 0000000..cb5c4e3 --- /dev/null +++ b/source/parse/parse.proto.h @@ -0,0 +1 @@ + /* parse.c */ void SendStringAsIfTyped(struct WindRec *tw, char *string, short len); void Parseunload(void); void parse(struct WindRec *tw, unsigned char *st, short cnt); void SendNAWSinfo(WindRec *s, short horiz, short vert); void telnet_send_initial_options(WindRec *tw); void send_do(short port, short option); void send_dont(short port, short option); void otpauto(struct WindRec *, char *, short); \ No newline at end of file diff --git a/source/parse/sha1.c b/source/parse/sha1.c new file mode 100755 index 0000000..a2ffb11 --- /dev/null +++ b/source/parse/sha1.c @@ -0,0 +1 @@ +/* SHA-1 in C By Steve Reid 100% Public Domain Test Vectors (from FIPS PUB 180-1) "abc" A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 A million repetitions of "a" 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ /* #define LITTLE_ENDIAN * This should be #define'd if true. */ /* #define SHA1HANDSOFF * Copies data before messing with it. */ //typedef struct { // unsigned long state[5]; // unsigned long count[2]; // unsigned char buffer[64]; //} SHA1_CTX; #include "otp.proto.h" #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* blk0() and blk() perform the initial expand. */ /* I got the idea of expanding during the round function from SSLeay */ #ifdef LITTLE_ENDIAN #define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) #else #define blk0(i) block->l[i] #endif #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); /* Hash a single 512-bit block. This is the core of the algorithm. */ void SHA1Transform(unsigned long state[5], unsigned char buffer[64]) { unsigned long a, b, c, d, e; typedef union { unsigned char c[64]; unsigned long l[16]; } CHAR64LONG16; CHAR64LONG16* block; #ifdef SHA1HANDSOFF static unsigned char workspace[64]; block = (CHAR64LONG16*)workspace; memcpy(block, buffer, 64); #else block = (CHAR64LONG16*)buffer; #endif /* Copy context->state[] to working vars */ a = state[0]; b = state[1]; c = state[2]; d = state[3]; e = state[4]; /* 4 rounds of 20 operations each. Loop unrolled. */ R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); /* Add the working vars back into context.state[] */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; /* Wipe variables */ a = b = c = d = e = 0; } /* SHA1Init - Initialize new context */ void SHA1Init(SHA1_CTX* context) { /* SHA1 initialization constants */ context->state[0] = 0x67452301; context->state[1] = 0xEFCDAB89; context->state[2] = 0x98BADCFE; context->state[3] = 0x10325476; context->state[4] = 0xC3D2E1F0; context->count[0] = context->count[1] = 0; } /* Run your data through this. */ void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len) { unsigned int i, j; j = (context->count[0] >> 3) & 63; if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++; context->count[1] += (len >> 29); if ((j + len) > 63) { memcpy(&context->buffer[j], data, (i = 64-j)); SHA1Transform(context->state, context->buffer); for ( ; i + 63 < len; i += 64) { SHA1Transform(context->state, &data[i]); } j = 0; } else i = 0; memcpy(&context->buffer[j], &data[i], len - i); } /* Add padding and return the message digest. */ void SHA1Final(unsigned char digest[20], SHA1_CTX* context) { unsigned long i, j; unsigned char finalcount[8]; for (i = 0; i < 8; i++) { finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */ } SHA1Update(context, (unsigned char *)"\200", 1); while ((context->count[0] & 504) != 448) { SHA1Update(context, (unsigned char *)"\0", 1); } SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ for (i = 0; i < 20; i++) { digest[i] = (unsigned char) ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); } /* Wipe variables */ i = j = 0; memset(context->buffer, 0, 64); memset(context->state, 0, 20); memset(context->count, 0, 8); memset(&finalcount, 0, 8); #ifdef SHA1HANDSOFF /* make SHA1Transform overwrite it's own static vars */ SHA1Transform(context->state, context->buffer); #endif } \ No newline at end of file diff --git a/source/parse/tnae.h b/source/parse/tnae.h new file mode 100755 index 0000000..fca93a8 --- /dev/null +++ b/source/parse/tnae.h @@ -0,0 +1 @@ +#define authType 'TNae' /* auth/encrypt module resource type */ #define moduleType 'TNae' /* auth/encrypt module file type */ #define NTMPAIRS 10 /* max type/modifier pairs */ #define IAC 255 #define SB 250 #define SE 240 #define BOGUS 0x50015001 /* * Kerberos, encryption */ #define OPT_AUTHENTICATION 37 #define OPT_ENCRYPT 38 #define KRB_REJECT 1 /* Rejected (reason might follow) */ #define KRB_AUTH 0 /* Authentication data follows */ #define KRB_ACCEPT 2 /* Accepted */ #define KRB_CHALLENGE 3 /* Challenge for mutual auth */ #define KRB_RESPONSE 4 /* Response for mutual auth */ #define TNQ_IS 0 /* Option is ... */ #define TNQ_SEND 1 /* send option */ #define TNQ_REPLY 2 /* suboption reply */ #define TNQ_NAME 3 /* suboption name */ /* * AUTHENTICATION option types */ #define AUTH_NULL 0 /* no authentication */ #define AUTH_KERBEROS_V4 1 /* Kerberos version 4 */ #define AUTH_KERBEROS_V5 2 /* Kerberos version 5 */ /* * AUTHENTICATION option modifiers */ #define AUTH_WHO_MASK 1 #define AUTH_CLIENT_TO_SERVER 0 #define AUTH_SERVER_TO_CLIENT 1 #define AUTH_HOW_MASK 2 #define AUTH_HOW_ONE_WAY 0 #define AUTH_HOW_MUTUAL 2 /* * suboption buffer offsets */ #define SB_OPTION 0 /* option byte */ #define SB_SUBOPTION 1 /* is, send, reply, name */ #define SB_TYPE 2 /* authentication type */ #define SB_MODIFIER 3 /* type modifier */ #define SB_DATATYPE 4 /* type of data */ #define SB_DATA 5 /* offset to first data byte */ /* * ENCRYPTION suboptions */ #define ENCRYPT_IS 0 /* I pick encryption type ... */ #define ENCRYPT_SUPPORT 1 /* I support encryption types ... */ #define ENCRYPT_REPLY 2 /* Initial setup response */ #define ENCRYPT_START 3 /* Am starting to send encrypted */ #define ENCRYPT_END 4 /* Am ending encrypted */ #define ENCRYPT_REQSTART 5 /* Request you start encrypting */ #define ENCRYPT_REQEND 6 /* Request you send encrypting */ #define ENCRYPT_ENC_KEYID 7 #define ENCRYPT_DEC_KEYID 8 #define ENCRYPT_CNT 9 #define ENCTYPE_ANY 0 #define ENCTYPE_DES_CFB64 1 #define ENCTYPE_DES_OFB64 2 #define ENCTYPE_CNT 3 /* * authentication or encryption module entry point */ typedef long (*module)(long func, void *parameters); /* * TNAE functions. */ enum { TNFUNC_INIT_SESSION_AUTH = 1, /* init auth session data */ TNFUNC_INIT_SESSION_ENCRYPT, /* init encrypt session data */ TNFUNC_QUERY_ENCRYPT, /* query encryption capability */ TNFUNC_INIT_CODE, /* init code module */ TNFUNC_AUTH_SEND, /* process auth send sub-option */ TNFUNC_AUTH_REPLY, /* process auth reply sub-option */ TNFUNC_ENCRYPT_SB, /* process encryption sub-options */ TNFUNC_DECRYPT, /* decrypt data */ TNFUNC_ENCRYPT /* encrypt data */ }; /* * TN code module return codes */ enum { TNREP_OK = 0, /* no error */ TNREP_START_DECRYPT, /* start decrypting (not an error) */ TNREP_AUTH_OK, /* authentication ok */ TNREP_AUTH_ERR, /* authentication rejected */ TNREP_ERROR, /* generic error */ TNREP_NOMEM /* no memory */ }; /* * Parameters */ typedef struct tnParams_ { void *authdata; /* auth data */ void *encryptdata; /* encrypt data */ /* parameters for auth/encrypt_suboption */ unsigned char *subbuffer; /* sub options buffer */ unsigned long sublength; unsigned char *sendbuffer; /* buffer to return option data */ unsigned long *sendlength; /* length of return buffer */ Boolean hisencrypt; /* his encrypt option state */ Boolean myencrypt; /* my encrypt option state */ char *cname; /* pointer to cannonical hostname */ /* used by authencrypt.c */ module entry; /* auth/encrypt code module entry point */ /* data and flags for client */ Boolean encrypting; /* we are encrypting */ Boolean startencrypting; /* time to start encrypting */ Boolean decrypting; /* we are decrypting */ long data; /* for encrypt/decrypt */ unsigned char *ebuf; /* encrypt buf */ } tnParams; \ No newline at end of file diff --git a/source/parse/translate.c b/source/parse/translate.c new file mode 100755 index 0000000..92fc4b5 --- /dev/null +++ b/source/parse/translate.c @@ -0,0 +1 @@ +/* * translate.c * written by Roland Mnsson, Lund University Computing Center, Sweden * roland_m@ldc.lu.se * July 1992 * * Modified by Pascal Maes * UCL/ELEC * Place du Levant, 3 * B-1348 Louvain-la-Neuve * Modified 7/93 by Jim Browne for NCSA. */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment 4 #endif #include "wind.h" #include "vsdata.h" #include "translate.proto.h" #include "vsinterf.proto.h" #include "LinkedList.proto.h" //#define DEBUG_TRANSLATION /*************** external variables ***************/ extern WindRec *screens; /* The screen array from maclook.c */ extern short scrn; /* The current screen from maclook.c */ /*************** global variables ***************/ BytePtr DefaultTable, FTPinTable, FTPoutTable; Handle transTablesHdl; short nNational; #if 0 Boolean get_trsl (short id, Byte **table) { Handle h; long size; h = GetResource (TRSL,id); if ((h==NULL) || (ResError()!=noErr)) { DoError(106 | RESOURCE_ERRORCLASS, LEVEL2, NULL); return (FALSE); } size = GetHandleSize(h); if (size != 256) { DoError(107 | RESOURCE_ERRORCLASS, LEVEL2, NULL); return (FALSE); } HLockHi(h); *table = (Byte *) *h; return (TRUE); } #endif short transBuffer(short oldtable, short newtable) /* translate entire buffer */ { VSscrn *vsscreen; VSline *vslin,*p; short lineNo,maxLineNo; short width; /* allocated witdth of window (80/132) */ char tmp[80]; /* only for debugging */ vsscreen = VSwhereis (screens[scrn].vs); vslin = vsscreen->buftop; #ifdef DEBUG_TRANSLATION putln ("in transBuffer, well and alive"); sprintf (tmp,"VSgetlines(screens[scrn].vs):%d", VSgetlines(screens[scrn].vs)); putln (tmp); sprintf (tmp,"VSmaxwidth(screens[scrn].vs):%d", VSmaxwidth(screens[scrn].vs)); putln (tmp); sprintf (tmp,"vsscreen->lines:%d\n",vsscreen->lines); putln (tmp); sprintf (tmp,"vsscreen->maxlines:%d\n",vsscreen->maxlines); putln (tmp); sprintf (tmp,"vsscreen->numlines:%d\n",vsscreen->numlines); putln (tmp); sprintf (tmp,"vsscreen->allwidth:%d\n",vsscreen->allwidth); putln (tmp); sprintf (tmp,"vsscreen->maxwidth:%d\n",vsscreen->maxwidth); putln (tmp); sprintf (tmp,"vsscreen:%08x\n",vsscreen); putln (tmp); sprintf (tmp,"vslin:%08x\n",vslin); putln (tmp); sprintf (tmp,"next:%08x\n",vslin->next); putln (tmp); sprintf (tmp,"prev:%08x\n",vslin->prev); putln (tmp); sprintf (tmp,"text:%08x\n\n",vslin->text); putln (tmp); #endif width = VSmaxwidth(screens[scrn].vs)+1; /* VSmaxwidth returns 79 or 131 */ p = vslin; maxLineNo = vsscreen->numlines+VSgetlines(screens[scrn].vs); /* VSgetlines returns 24 or whatever */ for (lineNo=1; lineNo<=maxLineNo; lineNo++) { /*sprintf(tmp,"lineNo:%d, p:%08x, starts with:%c%c%c%c",lineNo,p,*(p->text),*(p->text+1),*(p->text+2),*(p->text+3)); putln(tmp);*/ if (p==NULL) { putln ("p is NULL"); return (-1); } if (p->text==NULL) { putln ("p->text is NULL"); return (-1); } // First convert the line back to Mac US format, and then to the new format. trbuf_nat_mac((unsigned char *)p->text,width, oldtable); trbuf_mac_nat((unsigned char *)p->text,width, newtable); p = p->next; } sprintf (tmp, "transBuffer:did convert %d lines", lineNo-1); putln (tmp); return (0); } BytePtr GetTranslationResource(short id) { Handle h; h = GetResource(MY_TRSL, id); if ((h == NULL) || (ResError() != noErr)) { // Do nasty mean error here. BUGG } DetachResource(h); HLockHi(h); return((BytePtr) *h); } // table #'s 1...n correspond to tables in our master array, table #0 is the default table BytePtr ReturnTablePtr(short table, Boolean out) { if (table > nNational || table < 1) return(DefaultTable + ((out == TRUE) * 256)); return((BytePtr)(*transTablesHdl + ((table - 1) * 512) + ((out == TRUE) * 256))); } // The Default table (i.e. no translation) and the two FTP tables are stored in the // Application's resource fork as resources of type TRSL. The // tables added and removed by the user are stored in the prefs file as resources of // type taBL. This routine loads the default table and the two FTP tables into memory. // Failures can only be caused by an incorrect application resource fork. void Setup_Default_Tables(void) { DefaultTable = GetTranslationResource(TRSL_DEFAULT_TABLE); FTPinTable = GetTranslationResource(TRSL_FTP_TABLE); FTPoutTable = FTPinTable + 256; } /* * Be very careful with calling putln from this procedure, since * putln uses the translation tables. If the tables are not setup * garbage output will appear. This is not harmful, but very * annoying. */ void trInit (MenuHandle whichMenu) { short i, numTables; Handle h; LinkedListNode *theHead; nNational = 0; Setup_Default_Tables(); transTablesHdl = myNewHandle(0); UseResFile(TelInfo->ApplicationFile); numTables = CountResources(USER_TRSL); if (numTables) { Str255 NoneString; theHead = createSortedList2(USER_TRSL,numTables,NULL); //now we have a sorted linked list of the names GetIndString(NoneString,MISC_STRINGS,NONE_STRING); AppendMenu(whichMenu,NoneString); addListToMenu/*3*/(whichMenu, theHead, 2); deleteList(&theHead); for (i = 2; i <= numTables + 1; i++) //start adding things from the second menu item (first is none) { Str255 menuItemName; GetItem(whichMenu, i,menuItemName); h = GetNamedResource(USER_TRSL,menuItemName); if (ResError() == noErr && (GetHandleSize(h) == 512)) { nNational++; // Append the table's data to the master array of table data HUnlock(transTablesHdl); mySetHandleSize(transTablesHdl, (nNational * 512));//we're at init time; we have the mem HLockHi(transTablesHdl); HLock(h); BlockMove(*h, (*transTablesHdl) + ((nNational - 1) * 512), 512); } // Release the resource ReleaseResource(h); } } UseResFile(TelInfo->SettingsFile); } /* Converts a char from 8-bit National to 8-bit Macintosh */ void trbuf_nat_mac(unsigned char *buf, short len, short table) { short i; unsigned char *p; BytePtr table_data; table_data = ReturnTablePtr(table, FALSE); for (i=0,p=buf; iprredirect = 1; if (VSIw->qprint && VSIw->printqueued) { GetEOF(VSIw->refNum, &myEOF); if (myEOF >= 3) SetEOF(VSIw->refNum, myEOF - 3); SetFPos(VSIw->refNum, 2, 0L); return; } if (VSIw->qprint) VSIw->printqueued = 1; VSIw->prbuf = 0x00000000; VSIw->prbuf2 = 0x00; sprintf (VSIw->fname,"NCSA Telnet tempfile #%d",VSIwn); c2pstr(VSIw->fname); /* BYU 2.4.18 */ if ((sts = HCreate(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname, '????', 'TEXT')) != noErr) { if (sts != dupFNErr) { SysBeep(1); VSIw->prredirect = 0; sprintf(tmp,"Create: ERROR %d",sts); putln(tmp); return; } } if ((sts = HOpenDF(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname, fsRdWrPerm, &(VSIw->refNum))) != noErr) { SysBeep(1); VSIw->prredirect = 0; sprintf(tmp,"FSOpen: ERROR %d",sts); putln(tmp); HDelete(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname); return; } if (SetEOF(VSIw->refNum, 0L)) { SysBeep(1); VSIw->prredirect = 0; putln("VSPRON:SETEOF ERROR"); HDelete(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname); return; } } /* LU - we just got the escape sequence to turn OFF redirection. Take what we have and dump it to the printer */ void VSprOFF(void) { Str255 Title; TPrStatus prStatus; /* Status record */ TPPrPort prPort; /* the Printer port */ OSErr sts; GrafPtr savePort; char tmp[100]; /* only for debugging */ short temp; /* NCSA: SB - the screen # */ THPrint PrRecHandle; putln ("printer redirection OFF"); if (VSIw->prredirect==0) /* no redirection started! */ return; VSIw->prredirect = 0; if (VSIw->qprint) return; GetPort (&savePort); /* save old port */ PrOpen(); PrRecHandle = PrintSetupRecord(); GetWTitle ((GrafPtr) RSgetwindow(VSIwn),Title); SetCursor(theCursors[normcurs]); if (PrJobDialog(PrRecHandle)) { /* Cancel the print if FALSE */ if ((sts=PrError()) != noErr){ sprintf(tmp,"PrJobDialog: ERROR %d",sts); putln(tmp); } prPort=PrOpenDoc(PrRecHandle,0L,0L); if ((sts=PrError()) != noErr) { SysBeep(1); sprintf(tmp,"PrOpenDoc: ERROR %d",sts); putln(tmp); } else { temp = findbyVS(VSIwn); /* NCSA: SB */ if (temp < 0) { PrClose(); /* NCSA: SB */ DisposeHandle((Handle)PrRecHandle); return; /* NCSA: SB */ } printPages (prPort, PrRecHandle, Title, VSmaxwidth(VSIwn), NULL, VSIw->refNum, 0L,temp); PrCloseDoc(prPort); if ((sts=PrError()) != noErr) { sprintf(tmp,"PrCloseDoc: ERROR %d",sts); putln(tmp); } if (((*PrRecHandle)->prJob.bJDocLoop == bSpoolLoop) && (PrError()==0)) { PrPicFile(PrRecHandle,0L,0L,0L,&prStatus); /* Spool if necessary */ if ((sts=PrError()) != noErr) { sprintf(tmp,"PrPicFile: ERROR %d",sts); putln(tmp); } } } } PrClose(); DisposeHandle((Handle)PrRecHandle); SetPort (savePort); /* restore old port */ if ((sts=FSClose (VSIw->refNum)) != noErr) { SysBeep(1); sprintf(tmp,"FSClose: ERROR %d",sts); putln(tmp); } VSIw->refNum = -1; if ((sts=HDelete(TempItemsVRefNum, TempItemsDirID, (StringPtr)VSIw->fname)) != noErr) { SysBeep(1); sprintf(tmp,"HDelete: ERROR %d",sts); putln(tmp); } updateCursor(1); } #define ENDOFPRT '\033[4i' /* [4i (0x1b5b3469) */ #define ENDOFPRT2 '[?4i' // only valid if (prbuf2 == '\033') void VSpr(unsigned char **pc, short *pctr) { long count; /* number of chars to print to file */ char *start; /* original start of buffer */ OSErr sts; char tmp[100]; /* only for debugging */ short rdy; /* true if [4i or [?4i */ count=0; start=(char *)*pc; rdy=0; while ((*pctr>0) && (!rdy)) { VSIw->prbuf2=(VSIw->prbuf>>24); VSIw->prbuf=(VSIw->prbuf<<8) + **pc; if (VSIw->prbuf==ENDOFPRT) { /* i.e. no more redirection */ rdy=1; count--; /* will be incremented again below */ } if ((VSIw->prbuf==ENDOFPRT2) && (VSIw->prbuf2 == '\033')) { /* i.e. no more redirection */ rdy=1; count--; /* will be incremented again below */ count--; } count++; if (**pc == 0) { // RAB BetterTelnet 1.0fc7 // We don't want NULLs here! count--; trbuf_nat_mac ((unsigned char *)start,count, screens[findbyVS(VSIwn)].national); FSWrite(VSIw->refNum,&count,start); start += (count + 1); count = 0; } (*pc)++; (*pctr)--; } trbuf_nat_mac ((unsigned char *)start,count, screens[findbyVS(VSIwn)].national); if ((sts=FSWrite(VSIw->refNum,&count,start)) != noErr) { SysBeep(1); sprintf(tmp,"FSWrite: ERROR %d",sts); putln(tmp); } if (rdy || sts) VSprOFF(); } /* LU - that is the end of the new routines needed for printer redirection */ /* LU - now we just patch up VSem() to use this code, and were done! */ void VSem ( unsigned char *c, /* pointer to character string */ short ctr /* length of character string */ ) /* basic routine for placing characters on a virtual screen, and interpreting control characters and escape sequences. Simple interpretation of controls & escapes is done here, while the harder stuff is done by calling VSIxx routines in vsintern.c. */ { register short sx; register short escflg; /* state of escape sequence interpretation */ short insert, attrib, extra, offend; char *current, *start; unsigned short *acurrent; escflg = VSIw->escflg; while (ctr > 0) { if (VSIw->prredirect) /* PR - printer redirection? */ VSpr(&c,&ctr); /* PR -if yes, call VSpr */ /* PR - when we return from VSpr there may (ctr!=0) */ /* PR - or may not (ctr==0) be chars left in *c to print */ while ((escflg == 0) && (ctr > 0) && (*c < 32)) { switch (*c) { case 0x1b: /* esc */ escflg++; break; case 0x0e: /* shift out */ if (VSIw->G1) VSIw->attrib = VSgraph(VSIw->attrib); else VSIw->attrib = VSnotgraph(VSIw->attrib); VSIw->charset = 1; break; case 0x0f: /* shift in */ if (VSIw->G0) VSIw->attrib = VSgraph(VSIw->attrib); else VSIw->attrib = VSnotgraph(VSIw->attrib); VSIw->charset = 0; break; case 0x07: /* bell */ if (!VSIw->ignoreBeeps) RSbell(VSIwn); break; case 0x08: /* backspace */ VSIw->x--; if (VSIw->x < 0) /* hit left margin */ VSIw->x = 0; break; case 0x0c: /* ff */ VSIindex(); break; case 0x09: /* ht */ /* Later change for versatile tabbing */ VSItab(); VScapture(c,1); break; case 0x0a: /* lf */ VSIindex(); break; case 0x0d: /* cr */ VSIw->x = 0; VScapture(c,1); break; case 0x0b: /* vt */ VSIindex(); break; } c++; ctr--; } if ((escflg == 0) && (ctr > 0) && (*c & 0x80) && (*c < 0xA0) && (screens[findbyVS(VSIwn)].vtemulation == 1)) // VT220 eightbit starts here { switch (*c) { case 0x84: /* ind */ //same as ESC D VSIindex(); goto ShortCut; case 0x85: /* nel */ //same as ESC E VSIw->x = 0; VSIindex(); goto ShortCut; case 0x88: /* hts */ //same as ESC H VSIw->tabs[VSIw->x] = 'x'; goto ShortCut; case 0x8d: /* ri */ //same as ESC M VSIrindex(); goto ShortCut; case 0x9b: /* csi */ //same as ESC [ VSIapclear(); escflg = 2; c++; //CCP ctr--; break; case 0x86: /* ssa */ // - same as ESC F */ case 0x87: /* esa */ // - same as ESC G */ case 0x8e: /* ss2 */ // - same as ESC N */ case 0x8f: /* ss3 */ // - same as ESC O */ case 0x90: /* dcs */ // - same as ESC P */ case 0x93: /* sts */ // - same as ESC S */ case 0x96: /* spa */ // - same as ESC V */ case 0x97: /* epa */ // - same as ESC W */ case 0x9d: /* osc */ // - same as ESC ] */ case 0x9e: /* pm */ // - same as ESC ^ */ case 0x9f: /* apc */ // - same as ESC _ */ default: goto ShortCut; } }//end if vt220 while ((ctr > 0) && (escflg == 0) && (*c >= 32) &&!((*c & 0x80) && (*c < 0xA0) && (screens[findbyVS(VSIwn)].vtemulation == 1))) { //loop around, printing lines of text one at a time start = &VSIw->linest[VSIw->y]->text[VSIw->x]; /* start of area needing redrawing */ current = start; /* where to put next char */ if (VSIw->oldScrollback) acurrent = &VSIw->attrst[VSIw->y]->text[VSIw->x]; else acurrent = &VSIw->linest[VSIw->y]->attr[VSIw->x]; /* where to put corresponding attribute byte */ attrib = VSIw->attrib; /* current writing attribute */ insert = VSIw->IRM; /* insert mode (boolean) */ offend = 0; /* wrapped to next line (boolean) */ extra = 0; /* overwriting last character of line */ sx = VSIw->x; /* starting column of area needing redrawing */ if (VSIw->x > VSIw->maxwidth) { if (VSIw->DECAWM) { // wrap to next line VSIw->x = 0; VSIindex(); } else //stay at right margin VSIw->x = VSIw->maxwidth; current = start = &VSIw->linest[VSIw->y]->text[VSIw->x]; if (VSIw->oldScrollback) acurrent = &VSIw->attrst[VSIw->y]->text[VSIw->x]; else acurrent = &VSIw->linest[VSIw->y]->attr[VSIw->x]; sx = VSIw->x; } /* if */ while ((ctr > 0) && (*c >= 32) && (offend == 0) && !((*c & 0x80) && (*c < 0xA0) && (screens[findbyVS(VSIwn)].vtemulation == 1))) {//Write characters on a single line trbuf_nat_mac(c,1, screens[findbyVS(VSIwn)].national); //translate to national chars if (insert) //make room for the char VSIinschar(1); *current = *c; *acurrent = attrib; c++; ctr--; if (VSIw->x < VSIw->maxwidth) //advance the cursor position { acurrent++; current++; VSIw->x++; } else //hit right margin { if (VSIw->DECAWM) //autowrap to start of next line { VSIw->x++; offend = 1; // terminate inner loop } else //stay at right margin { VSIw->x = VSIw->maxwidth; extra = 1; // cursor position doesn't advance } } } //we've got a line full of text in the virtual screen //now update the screen to show what we've done extra += VSIw->x - sx; if (insert) RSinsstring(VSIwn, VSIw->x - extra, VSIw->y,VSIw->attrib, extra, start); else { short x2,y2,offset, sxCopy=sx,yCopy = VSIw->y, extraCopy = extra; if (!VSIclip(&sxCopy, &yCopy, &x2, &y2, &extraCopy, &offset)) RSdraw(VSIwn, sxCopy,yCopy, VSIw->attrib,extraCopy,(char *) (start + offset)); } //if (RSisInFront(VSIwn)) //CCP if we are front window, validate the screen // RSvalidateRect(VSIwn); VScapture((unsigned char *) start, extra); } /* while */ while((ctr > 0) && (escflg == 1)) { /* basic escape sequence processing */ switch (*c) { case 0x08: VSIw->x--; if (VSIw->x < 0) VSIw->x = 0; break; case '[': /* csi */ VSIapclear(); escflg++; break; case '7': VSIsave(); goto ShortCut; /* BYU 2.4.12 */ case '8': VSIrestore(); goto ShortCut; /* BYU 2.4.12 */ case 'c': VSIreset(); break; case 'D': VSIindex(); goto ShortCut; /* BYU 2.4.12 */ case 'E': VSIw->x = 0; VSIindex(); goto ShortCut; /* BYU 2.4.12 */ case 'M': VSIrindex(); goto ShortCut; /* BYU 2.4.12 */ case '>': VSIw->DECPAM = 0; goto ShortCut; /* BYU 2.4.12 */ case '=': VSIw->DECPAM = 1; goto ShortCut; /* BYU 2.4.12 */ case 'Z': VTsendident(); goto ShortCut; /* BYU 2.4.12 */ case ' ': /* BYU 2.4.12 */ case '*': /* BYU 2.4.12 */ case '#': escflg = 3; break; case '(': escflg = 4; break; case ')': escflg = 5; break; case 'H': VSIw->tabs[VSIw->x] = 'x'; goto ShortCut; /* BYU 2.4.12 */ #ifdef CISB case 'I': bp_ESC_I(); break; #endif CISB case ']': // WNR - XTerm if (screens[findbyVS(VSIwn)].Xterm) // WNR - XTerm escflg = 6; // WNR - XTerm break; // WNR - XTerm default: goto ShortCut; /* BYU 2.4.12 */ } /* switch */ c++; ctr--; } /* while */ while ((escflg == 2) && (ctr > 0)) { /* "control sequence" processing */ switch (*c) { case 0x08: VSIw->x--; if (VSIw->x < 0) VSIw->x = 0; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* parse numeric parameter */ if (VSIw->parms[VSIw->parmptr] < 0) VSIw->parms[VSIw->parmptr] = 0; VSIw->parms[VSIw->parmptr] = VSIw->parms[VSIw->parmptr] * 10; VSIw->parms[VSIw->parmptr] += *c - '0'; break; case '?': /* DEC-private control sequence */ VSIw->parms[VSIw->parmptr++] = -2; break; case ';': /* parameter separator */ VSIw->parmptr++; break; case 'A': /* cursor up */ #if 1 /* BYU */ if (VSIw->parms[0]<1) VSIw->y--; /* BYU */ else VSIw->y-=VSIw->parms[0]; /* BYU */ if ( VSIw->y < 0 ) VSIw->y=0; /* BYU */ if (VSIw->y < VSIw->top) /* NCSA: SB */ VSIw->y = VSIw->top; /* NCSA: SB */ #else /* BYU */ if (VSIw->y < VSIw->top) { /* outside scrolling region */ if (VSIw->parms[0] < 1) VSIw->y--; else VSIw->y -= VSIw->parms[0]; } else { /* don't leave scrolling region */ if (VSIw->parms[0] < 1) VSIw->y--; else VSIw->y -= VSIw->parms[0]; if (VSIw->y < VSIw->top) VSIw->y = VSIw->top; } #endif /* BYU */ VSIrange(); goto ShortCut; /* BYU 2.4.12 */ case 'B': /* cursor down */ #if 1 /* BYU */ if (VSIw->parms[0]<1) VSIw->y++; /* BYU */ else VSIw->y+=VSIw->parms[0]; /* BYU */ if (VSIw->y > VSIw->bottom) /* NCSA: SB */ VSIw->y = VSIw->bottom; /* NCSA: SB */ #else /* BYU */ if (VSIw->y > VSIw->bottom) { /* outside scrolling region */ if (VSIw->parms[0] < 1) VSIw->y++; else VSIw->y += VSIw->parms[0]; } else { /* don't leave scrolling region */ if (VSIw->parms[0] < 1) VSIw->y++; else VSIw->y += VSIw->parms[0]; if (VSIw->y > VSIw->bottom) VSIw->y = VSIw->bottom; } #endif /* BYU */ VSIrange(); goto ShortCut; /* BYU 2.4.12 */ case 'C': /* cursor right */ if (VSIw->parms[0] < 1) VSIw->x++; else VSIw->x += VSIw->parms[0]; VSIrange(); if (VSIw->x > VSIw->maxwidth) VSIw->x = VSIw->maxwidth; goto ShortCut; /* BYU 2.4.12 */ case 'D': /* cursor left */ if (VSIw->parms[0] < 1) VSIw->x--; else VSIw->x -= VSIw->parms[0]; VSIrange(); goto ShortCut; /* BYU 2.4.12 */ case 'f': case 'H': /* absolute cursor positioning */ VSIw->x = VSIw->parms[1] - 1; if (VSIw->DECORG) /* origin mode -- position relative to top of scrolling region */ VSIw->y = VSIw->parms[0] - 1 + VSIw->top; else VSIw->y = VSIw->parms[0] - 1; /* Don't use actual VSIrange 'cause it will wrap us to first column if we are past screen edge. This causes "resize" to break */ if (VSIw->x < 0) /* JMB 2.6 */ VSIw->x = 0; /* JMB 2.6 */ if (VSIw->x > (VSIw->maxwidth)) /* JMB 2.6 */ VSIw->x = VSIw->maxwidth; /* JMB 2.6 */ if (VSIw->y < 0) /* JMB 2.6 */ VSIw->y = 0; /* JMB 2.6 */ if (VSIw->y > VSIw->lines) /* JMB 2.6 */ VSIw->y = VSIw->lines; /* JMB 2.6 */ if ((VSIw->forcesave)&&(VSIw->y == 0)&&(VSIw->x == 0)) //CCP better FORCESAVE VSIw->possibleForce = TRUE; goto ShortCut; /* BYU 2.4.12 */ case 'i': /* PR: media copy */ if (VSIw->parms[VSIw->parmptr]==5) { /* PR */ /*c++; ctr--; */ /* PR */ VSprON(); /* PR - set status and open temp file etc */ /* PR - chars will be redirected at top of loop */ /* PR - in this procedure */ } /* PR */ escflg = 0; /* PR */ break; /* PR */ case 'K': /* erase to beginning/end/whole of line */ switch (VSIw->parms[0]) { case -1: case 0: VSIeeol(); break; case 1: VSIebol(); break; case 2: VSIel(-1); break; default: goto ShortCut; /* BYU 2.4.12 */ } /* switch */ goto ShortCut; /* BYU 2.4.12 */ case 'J': /* erase to beginning/end/whole of screen */ switch (VSIw->parms[0]) { case -1: case 0: VSIeeos(); break; case 1: VSIebos(); break; case 2: VSIes(); break; default: goto ShortCut; /* BYU 2.4.12 */ } /* switch */ goto ShortCut; /* BYU 2.4.12 */ case 'm': /* set/clear attributes */ { short temp = 0; while (temp <= VSIw->parmptr) { short p; if (VSIw->parms[VSIw->parmptr] < 0) VSIw->parms[VSIw->parmptr] = 0; p = VSIw->parms[temp]; if (p == 0) VSIw->attrib &= 0x80; //all off else if (p<8) VSIw->attrib |= VSa(p);//set an attribute else if (p>21 && p<28) VSIw->attrib &= ~VSa(p-20); //clear an attribute else if (screens[findbyVS(VSIwn)].ANSIgraphics) { if (p>=30 && p<38) VSIw->attrib = (VSIw->attrib&~0x0700) | ((p-30)<<8) | 0x0800; else if (p>=40 && p<48) VSIw->attrib = (VSIw->attrib&~0x7000) | ((p-40)<<12) | 0x8000; } temp++; } /* while */ } goto ShortCut; /* BYU 2.4.12 */ case 'q': /* flash dem LEDs. What LEDs? */ goto ShortCut; /* BYU 2.4.12 */ case 'c': VTsendident(); goto ShortCut; /* BYU 2.4.12 */ case 'n': switch (VSIw->parms[0]) { case 5: VTsendstat(); break; case 6: VTsendpos(); break; } /* switch */ goto ShortCut; /* BYU 2.4.12 */ case 'L': if (VSIw->parms[0] < 1) VSIw->parms[0] = 1; VSIinslines(VSIw->parms[0], -1); goto ShortCut; /* BYU 2.4.12 */ case 'M': if (VSIw->parms[0] < 1) VSIw->parms[0] = 1; VSIdellines(VSIw->parms[0], -1); goto ShortCut; /* BYU 2.4.12 */ case '@': if (VSIw->parms[0] < 1) VSIw->parms[0] = 1; VSIinschar(VSIw->parms[0]); VSredrawLine(VSIwn); //redraws current line goto ShortCut; case 'P': if (VSIw->parms[0] < 1) VSIw->parms[0] = 1; VSIdelchars(VSIw->parms[0]); goto ShortCut; /* BYU 2.4.12 */ case 'r': /* set scrolling region */ if (VSIw->parms[0] < 0) VSIw->top = 0; else VSIw->top = VSIw->parms[0] - 1; if (VSIw->parms[1] < 0) VSIw->bottom = VSIw->lines; else VSIw->bottom = VSIw->parms[1] - 1; if (VSIw->top < 0) VSIw->top = 0; if (VSIw->top > VSIw->lines - 1) VSIw->top = VSIw->lines - 1; if (VSIw->bottom < 1) VSIw->bottom = VSIw->lines; if (VSIw->bottom > VSIw->lines) VSIw->bottom = VSIw->lines; if (VSIw->top >= VSIw->bottom) /* NCSA: SB */ { /* NCSA: SB */ if (VSIw->bottom >=1) /* NCSA: SB */ VSIw->top = VSIw->bottom -1; /* NCSA: SB */ else VSIw->bottom = VSIw->top +1; /* NCSA: SB */ } /* NCSA: SB */ VSIw->x = 0; VSIw->y = 0; if (VSIw->DECORG) VSIw->y = VSIw->top; /* origin mode relative */ goto ShortCut; /* BYU 2.4.12 */ case 'h': /* set options */ VSIsetoption(1); goto ShortCut; /* BYU 2.4.12 */ case 'l': /* reset options */ VSIsetoption(0); goto ShortCut; /* BYU 2.4.12 */ case 'g': if (VSIw->parms[0] == 3) /* clear all tabs */ VSItabclear(); else if (VSIw->parms[0] <= 0) /* clear tab at current position */ VSIw->tabs[VSIw->x] = ' '; goto ShortCut; /* BYU 2.4.12 */ case '!': /* BYU 2.4.12 - More private DEC stuff? */ case '\'': /* BYU 2.4.12 - More private DEC stuff? */ case '\"': /* BYU 2.4.12 - More private DEC stuff? */ escflg++; /* BYU 2.4.12 */ break; /* BYU 2.4.12 */ default: /* Dang blasted strays... */ goto ShortCut; /* BYU 2.4.12 */ } /* switch */ c++; ctr--; } /* while */ while ((escflg == 3) && (ctr > 0)) { /* "#" handling */ /* no support for double-width and double-height characters yet */ switch (*c) { case 0x08: VSIw->x--; if (VSIw->x < 0) VSIw->x = 0; break; case '8': /* alignment display */ VTalign(); goto ShortCut; /* BYU 2.4.12 */ default: goto ShortCut; /* BYU 2.4.12 */ } /* switch */ c++; ctr--; } /* while */ while ((escflg == 4) && (ctr > 0)) { /* "(" handling (selection of G0 character set) */ switch (*c) { case 0x08: VSIw->x--; if (VSIw->x < 0) VSIw->x = 0; break; case 'A': /* UK */ case 'B': /* US */ case '1': /* "soft" */ VSIw->G0 = 0; if (!VSIw->charset) VSIw->attrib = VSnotgraph(VSIw->attrib); goto ShortCut; /* BYU 2.4.12 */ case '0': /* DEC special graphics */ case '2': /* "soft" */ VSIw->G0 = 1; if (!VSIw->charset) VSIw->attrib = VSgraph(VSIw->attrib); goto ShortCut; /* BYU 2.4.12 */ default: goto ShortCut; /* BYU 2.4.12 */ } /* switch */ c++; ctr--; } /* while */ while ((escflg == 5) && (ctr > 0)) { /* ")" handling (selection of G1 character set) */ switch (*c) { case 0x08: VSIw->x--; if (VSIw->x < 0) VSIw->x = 0; break; case 'A': /* UK */ case 'B': /* US */ case '1': /* "soft" */ VSIw->G1 = 0; if (VSIw->charset) VSIw->attrib = VSnotgraph(VSIw->attrib); goto ShortCut; /* BYU 2.4.12 */ case '0': /* DEC special graphics */ case '2': /* "soft" */ VSIw->G1 = 1; if (VSIw->charset) VSIw->attrib = VSgraph(VSIw->attrib); goto ShortCut; /* BYU 2.4.12 */ default: goto ShortCut; /* BYU 2.4.12 */ } /* switch */ c++; ctr--; } /* while */ // Handle XTerm rename functions, code contributed by Bill Rausch // Modified by JMB to handle ESC]2; case as well. if( (escflg >= 6) && (ctr > 0) ) { static char *tmp; static Str255 newname; if( (escflg == 6) && ((*c == '0') || (*c == '2'))) { escflg++; c++; ctr--; } if( (escflg == 7 ) && (ctr > 0) && (*c == ';') ) { ctr--; c++; escflg++; newname[0] = 0; tmp = (char *)&newname[1]; } while( (escflg == 8) && (ctr > 0) && (*c != 07) && (*c != 033)) { if(*newname < 255) { *tmp++ = *c; (*newname)++; } c++; ctr--; } if( (escflg == 8) && (*c == 07 || *c == 033) && (ctr > 0) ) { set_new_window_name( newname, RSgetwindow(VSIwn) ); if(*c != 07) { /* This will be undone in the ShortCut below. */ c--; ctr++; } goto ShortCut; } } /* if */ /* while( (escflg == 8) && (ctr > 0) && (*c != 07) ) { *tmp++ = *c++; ctr--; (*newname)++; } if( (escflg == 8) && (*c == 07) && (ctr > 0) ) { set_new_window_name( newname, RSgetwindow(VSIwn) ); goto ShortCut; } } /* if */ if ((escflg > 2) && (ctr > 0)) { ShortCut: /* BYU 2.4.12 - well, sacrificing style for speed */ if ((VSIw->possibleForce)&&(*c != 'H')) //CCP better forcesave VSIw->possibleForce = FALSE; escflg = 0; c++; ctr--; } /* if */ } /* while (ctr > 0) */ VSIw->escflg = escflg; } /* VSem */ \ No newline at end of file diff --git a/source/parse/vsem.proto.h b/source/parse/vsem.proto.h new file mode 100755 index 0000000..4284bb3 --- /dev/null +++ b/source/parse/vsem.proto.h @@ -0,0 +1 @@ + /* vsem.c */ void VSunload(void); void VSprON(void); void VSprOFF(void); void VSpr(unsigned char **pc, short *pctr); void VSem(unsigned char *c, short ctr); \ No newline at end of file diff --git a/source/printing/printing.c b/source/printing/printing.c new file mode 100755 index 0000000..856256c --- /dev/null +++ b/source/printing/printing.c @@ -0,0 +1 @@ +/* * printing.c * * This now contains the PrintPages() code from Roland Mansson, from Lund * University Computing Center. This allows for printer redirection, and also * printing page numbers (and other goodies). Thanks for all of your work! * * Code to handle printing. */ // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 #ifdef MPW #pragma segment Printing #endif #include "wind.h" #include "rsinterf.proto.h" /* For RSGetSelText */ #include "netevent.proto.h" #include "vgtek.proto.h" #include "rgmp.proto.h" #include "event.proto.h" #include "tekrgmac.proto.h" #include "vsdata.h" #include "vsinterf.proto.h" extern Cursor *theCursors[]; extern WindRec *screens; /* The screen array from Maclook */ extern short scrn; PROTO_UPP(printsleep, PrIdle); extern void printsleep(void); THPrint gPrRecHandle = NULL; #define PGRECT (*PrRecHandle)->prInfo.rPage /* Macro for making the pagerect more accessible */ #define VMARGINS 4 #define PAPRECT (*PrRecHandle)->rPaper /* Macro for making the paperrect more accessible */ #define bDevCItoh 1 /* from Printing.h */ #define ascLF 10 #define ascFF 12 #define ascCR 13 #include "printing.proto.h" void PrintingUnload(void) {} /* userabort - check to see if the user wants to abort */ short userabort(void) { EventRecord theEvent; while (GetNextEvent(24,&theEvent)) { if ((theEvent.modifiers & cmdKey) && (theEvent.message & 0xff) =='.') return(-1); } return(0); } /* printsleep() - Provide the network keep alive while we are in print * mode. Also set the abort flag if necessary. */ SIMPLE_UPP(printsleep, PrIdle); void printsleep(void) { short CurrentResFile; CurrentResFile = CurResFile(); /* Save the current resource file just in case. */ Stask(); /* act like the postman */ if (userabort()) (*gPrRecHandle)->prJob.fFromUsr=TRUE; UseResFile(CurrentResFile); /* Restore this in case we were bad and changed it. */ } /* printGraph - Print the graphics on the current window * vg - which graphics window to print */ void printGraph(short dnum) /* Which drawing to print */ { short h,v; /* used for centering (h=horiz. , v=vert.) */ short wh,wv; /* Window horiz and vert */ TPrStatus prStatus; /* Printing status record */ Rect prRect; /* the rectangle to print in */ TPPrPort prPort; /* the printing port */ short j; /* VG identifier for pass-through */ THPrint PrRecHandle; /* our print record handle */ PrRecHandle = PrintSetupRecord(); SetCursor(theCursors[normcurs]); if (PrJobDialog(PrRecHandle)) { /* Cancel the print if FALSE */ prPort=PrOpenDoc(PrRecHandle,0L,0L); /* Open Printer Port */ if (PrError() == 0) { /* If we can't, then die */ PrOpenPage(prPort, 0L); /* Open a page */ (*PrRecHandle)->prJob.pIdleProc = printsleepUPP; /* our sleep/cancel*/ prRect=PGRECT; /* Get the page rectangle */ h=prRect.right - prRect.left; /* Get the width */ v=prRect.bottom- prRect.top; /* Get the height */ if (3*h<4*v) { /* Center the little bugger */ wh = h; wv = (3 * h)/ 4; } else { /* On the page rectangle */ wv = v; wh = (4 * v)/ 3; } prRect.top = (v- wv) /2; prRect.left = (h- wh) /2; prRect.bottom = prRect.top + wv; prRect.right = prRect.left + wh; j=VGnewwin(TEK_DEVICE_PICTURE,VGgetVS(dnum)); /* NCSA 2.5: fixed the print call */ RGMPsize( &prRect ); VGzcpy( dnum, j); /* Love dat zm factr */ VGredraw(dnum,j); /* Copy the picture in i to j */ VGclose(j); /* OK, we're done, give it to someone else */ PrClosePage(prPort); /* Page out.... */ } PrCloseDoc(prPort); /* Done with the document */ putln("Doc is closed... the printing begins...."); if (PrError()==0) /* BYU 2.4.20 - changed for HP DeskWriter*/ PrPicFile(PrRecHandle,0L,0L,0L,&prStatus); /* Print the spooled file if applicable */ } /* if PrJobDialog */ DisposeHandle((Handle)PrRecHandle); updateCursor(1); } /* LU - this is the NEW PrintPages code. This handles page numbering, and also allows us to dump the redirected output to the printer. Written by Roland Mansson, Lund University Computing Center. Thank HIM for this code... */ /* Some patches had to be made to get it to compile under THINK C, and to work */ /* with some of the changes we have recently made. - SMB */ /* printPages(prPort,charh,title, columns) - * Prints on the printer through port with * using <columns>. */ void printPages(TPPrPort prPort, THPrint PrRecHandle, Str255 Title, short columns, char **charh, short refNum, short useTitle, short theScreen) { char *charp, *start; long charlen,count=0L; short v, h, scount, lines, pgcount, pgtmplen, maxlines; char pagetemp[20]; FMetricRec info; short pFheight, pFwidth; unsigned char buf[256]; /* to build a line in from the file */ unsigned char nextchar; /* next unprocessed char in file */ short rdy; short indent; /* indent to give reasonable left marginal */ OSErr sts; long dummyCount; char tmp[100]; /* only for debugging */ char stupidarray[160]; /* used in menuseg for finding string widths */ for (v=0; v<150; v++) stupidarray[v]='W'; /* Set up the width array */ indent = ((*PrRecHandle)->prInfo.iHRes * 180)/254; /* 1.8 centimeters left margin */ if (-PAPRECT.left > indent) indent = 0; else indent += PAPRECT.left; // if ( ((*PrRecHandle)->prStl.wDev>>8) == bDevCItoh ) { // /* Think about this: put def. font in rsrc fork- STR255 */ // TextFont(monaco); /* gives monaco on ImageWriters */ // v=9; // } // else { /* NCSA: SB - use current font */ TextFont((*(screens[theScreen].wind)).txFont); /* NCSA: SB */ TextFace((*(screens[theScreen].wind)).txFace); /* NCSA: SB */ v = (*(screens[theScreen].wind)).txSize; /* NCSA: SB */ // } /* NCSA: SB */ do { TextSize(v); FontMetrics( &info ); pFheight = FixRound( info.ascent + info.descent + info.leading); pFwidth = FixRound( info.widMax); //pFwidth = CharWidth('W'); /* Re-assign to largest char */ v--; } while ( TextWidth(stupidarray,0,columns+1) > (PGRECT.right - PGRECT.left - indent)); sprintf (tmp,"Fheight:%d, Fwidth:%d, TextSize:%d",pFheight,pFwidth,v+1); putln (tmp); if (charh!=NULL) { HLock(charh); start=charp=*charh; charlen= GetHandleSize(charh); } else { if ((sts=GetFPos(refNum, &charlen)) != noErr) { sprintf(tmp,"GetFPos: ERROR %d",(short)sts); putln(tmp); } charlen-=3; /* skip last 3 chars, as they are part of ESC seq */ if ((sts=SetFPos(refNum,(short) fsFromStart,0L)) != noErr) /* rewind to beginning of file */ { sprintf(tmp,"SetFPos: ERROR %d",sts); putln(tmp); } start = (char *)buf; /* always (the array doesn't move) */ dummyCount=1; if ((sts=FSRead(refNum,&dummyCount,&nextchar)) != noErr) /* get first char */ { sprintf(tmp,"FSRead: ERROR %d",sts); putln(tmp); } } h=PGRECT.right - PGRECT.left - indent; /* Get the width */ v=PGRECT.bottom- PGRECT.top; /* Get the height */ maxlines = v/pFheight-1; pgcount = 0; while (count<charlen) { pgcount++; lines = 1; PrOpenPage(prPort, 0L); /* Open the Printer Page */ if ((sts=PrError()) != noErr) { sprintf(tmp,"PrOpenPage: ERROR %d",sts); putln(tmp); } (*PrRecHandle)->prJob.pIdleProc= printsleepUPP; /* our netsleep */ sprintf (tmp,"printing page:%d",pgcount); putln(tmp); if (useTitle) { Str255 SessionNameString; GetIndString(SessionNameString,MISC_STRINGS,SESSION_NAME_STRING); MoveTo( indent, lines*pFheight); DrawString(SessionNameString); /* BYU LSC */ DrawString( Title); /* BYU LSC */ sprintf(pagetemp, "Page %d", pgcount); pgtmplen=strlen(pagetemp); MoveTo( PGRECT.right-(pgtmplen * pFwidth)-1, lines++*pFheight); DrawText( pagetemp, 0, pgtmplen); lines++; /* one blank line after title line */ } if (charh!=NULL) { /* print from handle */ while (lines <= maxlines && count<charlen) { scount=0; while ((count<charlen) && (*charp++!='\r')) { count++; scount++; } MoveTo(indent,lines++*pFheight); if (scount>0) DrawText(start, 0, scount); count++; start=charp; } } else { /* print from file */ while (lines <= maxlines && count<charlen) { rdy = 0; scount = 0; while ((count<charlen) && (!rdy)) { if (scount > 250) nextchar = ascLF; switch (nextchar) { case ascCR: rdy=1; break; case ascLF: rdy=1; break; case ascFF: rdy=1; break; default: buf[scount++]=nextchar; count++; dummyCount=1; if ((sts=FSRead (refNum,&dummyCount,&nextchar)) != noErr) { sprintf(tmp,"FSRead: ERROR %d",sts); putln(tmp); } break; } } MoveTo(indent,lines*pFheight); if (scount>0) DrawText(start, 0, scount); if (nextchar==ascLF) lines++; /* LF -> new line */ if (nextchar==ascFF) if (screens[theScreen].ignoreff) // RAB BetterTelnet 1.0fc8 lines++; else lines = maxlines+1; /* FF -> new page */ dummyCount=1; if ((sts=FSRead (refNum,&dummyCount,&nextchar)) != noErr) { sprintf(tmp,"FSRead: ERROR %d",sts); putln(tmp); } count++; } } PrClosePage(prPort); /* Close the Printer page */ if ((sts=PrError()) != noErr) { sprintf(tmp,"PrClosePage: ERROR %d",sts); putln(tmp); } } if (charh!=NULL) HUnlock(charh); } /* printText - Print the text selected on the screen * vs - which vs to print from */ void printText ( short vs, /* Which screen to print */ Str255 Title, /* The title string */ short scrn ) { char **charh; /* The character handle */ TPrStatus prStatus; /* Status record */ TPPrPort prPort; /* the Printer port */ THPrint PrRecHandle; /* our print record handle */ charh = RSGetTextSel(vs,0); /* Get the characters to print */ if ( charh==0L) return; /* don't print anything.... */ PrRecHandle = PrintSetupRecord(); SetCursor(theCursors[normcurs]); if (PrJobDialog(PrRecHandle)) { /* Cancel the print if FALSE */ prPort=PrOpenDoc(PrRecHandle,0L,0L); if (PrError() == 0) { printPages( prPort, PrRecHandle, Title, VSmaxwidth(vs), charh, (short) -1, TRUE,scrn); } PrCloseDoc(prPort); if (((*PrRecHandle)->prJob.bJDocLoop == bSpoolLoop) && (PrError()==0)) PrPicFile(PrRecHandle,0L,0L,0L,&prStatus); /* Spool the print */ } HPurge(charh); /* Kill the printed chars */ updateCursor(1); DisposeHandle((Handle)PrRecHandle); } void PrintPageSetup(void) { THPrint PrRecHandle; /* our print record handle */ PrOpen(); PrRecHandle = (THPrint)GetResource('JOHN',169); /* AISD: JSA */ if ( PrRecHandle != NULL ) { /* AISD: JSA */ PrStlDialog(PrRecHandle); /* AISD: JSA */ ChangedResource((Handle)PrRecHandle); /* AISD: JSA */ UpdateResFile(TelInfo->SettingsFile); /* AISD: JSA */ } /* AISD: JSA */ else { /* AISD: JSA */ PrRecHandle=(THPrint)myNewHandle((long)sizeof(TPrint)); /* AISD: JSA */ PrintDefault(PrRecHandle); /* AISD: JSA */ PrStlDialog(PrRecHandle); /* AISD: JSA */ UseResFile(TelInfo->SettingsFile); /* AISD: JSA */ AddResource((Handle)PrRecHandle,'JOHN',169,"\p"); /* AISD: JSA */ UpdateResFile(TelInfo->SettingsFile); /* AISD: JSA */ } /* AISD: JSA */ ReleaseResource((Handle)PrRecHandle); /* AISD: JSA */ PrClose(); } void PrintSelection(void) { short i; PrOpen(); i=RGgetdnum(FrontWindow()); if (i>-1) printGraph( i); /* Print Graphics */ else if ( (i=RSfindvwind(FrontWindow())) >-1 ) { Str255 Title; GetWTitle( FrontWindow(), Title); printText(i, Title,scrn); /* Print Text selection */ } PrClose(); } THPrint PrintSetupRecord(void) { THPrint PrRecHandle; PrRecHandle = (THPrint)GetResource('JOHN',169); /* AISD: JSA */ if ( PrRecHandle != NULL ) { PrValidate(PrRecHandle); DetachResource((Handle)PrRecHandle); } else { PrRecHandle=(THPrint)myNewHandle((long)sizeof(TPrint)); PrintDefault(PrRecHandle); } gPrRecHandle = PrRecHandle; return (PrRecHandle); } \ No newline at end of file diff --git a/source/printing/printing.proto.h b/source/printing/printing.proto.h new file mode 100755 index 0000000..107a53e --- /dev/null +++ b/source/printing/printing.proto.h @@ -0,0 +1 @@ + /* printing.c */ void PrintingUnload(void); short userabort(void); void printGraph(short dnum); void printPages(TPPrPort prPort, THPrint PrPrintRec, Str255 Title, short columns, char **charh, short refNum, short useTitle, short theScreen); void printText(short vs, Str255 Title, short scrn); void PrintPageSetup(void); void PrintSelection(void); THPrint PrintSetupRecord(void); \ No newline at end of file diff --git a/source/tek/rg0.c b/source/tek/rg0.c new file mode 100755 index 0000000..5680900 --- /dev/null +++ b/source/tek/rg0.c @@ -0,0 +1 @@ +// BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* rgnull.c by Aaron Contorer for NCSA Copyright 1987, board of trustees, University of Illinois routines for "null" device -- calling these routines has no effect, but they are compatible with all RG calls. */ #ifdef MPW #pragma segment TEKNULL #endif #include "rg0.proto.h" void TEKNULLunload(void){} short RG0newwin(void) { return(0); } char *RG0devname(void) { return(nil); } void RG0oneshort(short x) { UNUSED_ARG(x) } void RG0void(void) {} short RG0returnshort(short x) { UNUSED_ARG(x) return 0; } short RG0pencolor(short w, short color) { UNUSED_ARG(w) UNUSED_ARG(color) return 0; } short RG0point(short w, short x, short y) { UNUSED_ARG(w) UNUSED_ARG(x) UNUSED_ARG(y) return 0; } short RG0drawline(short w, short a, short b, short c, short d) { UNUSED_ARG(w) UNUSED_ARG(a) UNUSED_ARG(b) UNUSED_ARG(c) UNUSED_ARG(d) return 0; } void RG0dataline(short w, short data, short count) { UNUSED_ARG(w) UNUSED_ARG(data) UNUSED_ARG(count) } void RG0charmode(short w, short rotation, short size) { UNUSED_ARG(w) UNUSED_ARG(rotation) UNUSED_ARG(size) } void RG0info(short w, short a, short b, short c, short d, short v) { UNUSED_ARG(w) UNUSED_ARG(a) UNUSED_ARG(b) UNUSED_ARG(c) UNUSED_ARG(d) UNUSED_ARG(v) } \ No newline at end of file diff --git a/source/tek/rg0.proto.h b/source/tek/rg0.proto.h new file mode 100755 index 0000000..17c101c --- /dev/null +++ b/source/tek/rg0.proto.h @@ -0,0 +1 @@ +void TEKNULLunload(void); short RG0newwin(void); char *RG0devname(void); void RG0oneshort(short x); void RG0void(void); short RG0returnshort(short x); short RG0pencolor(short w, short color); short RG0point(short w, short x, short y); short RG0drawline(short w, short a, short b, short c, short d); void RG0dataline(short w, short data, short count); void RG0charmode(short w, short rotation, short size); void RG0info(short w, short a, short b, short c, short d, short v); \ No newline at end of file diff --git a/source/tek/rgmp.c b/source/tek/rgmp.c new file mode 100755 index 0000000..eade487 --- /dev/null +++ b/source/tek/rgmp.c @@ -0,0 +1 @@ +// BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* rgmp.c by Gaige B. Paulsen spawned from rgp.c by Aaron Contorer for NCSA Copyright 1987, board of trustees, University of Illinois Routines for Macintosh Picture output. Only one Real device is available */ #ifdef MPW #pragma segment TEKMacPic #endif #define INXMAX 4096 #define INYMAX 4096 #include "rgmp.proto.h" void TEKMacPicunload(void) {} char RGMPbusy; /* is device already in use */ short RGMPwidth, RGMPheight, RGMPxoffset=0, RGMPyoffset=0; int RGMPcolor[]= { 30, /* black */ 33, /* white */ 205, /* red */ 341, /* green */ 409, /* blue */ 273, /* cyan */ 137, /* magenta */ 69 /* yellow */ }; short RGMPnewwin(void) { RGMPbusy=1; /* RGMPwidth=4096; RGMPheight=4096; */ RGMPxoffset=0; RGMPyoffset=0; return(0); } char *RGMPdevname(void) { return("Macintosh PICTURE output"); } void RGMPinit(void) { RGMPbusy=0; /* RGMPwidth=4096; RGMPheight=4096; */ RGMPxoffset=0; RGMPyoffset=0; } short RGMPpencolor(short w, short color) { UNUSED_ARG(w) ForeColor( (long) RGMPcolor[color] ); return 0; } short RGMPclose(short w) { UNUSED_ARG(w) RGMPbusy=0; return 0; } short RGMPpoint(short w, short x, short y) { UNUSED_ARG(w) MoveTo(x,y); LineTo(x,y); return 0; } short RGMPdrawline(short w, short x0, short y0, short x1, short y1) { UNUSED_ARG(w) x0 = RGMPxoffset + (short) ((long) x0 * RGMPwidth / INXMAX); y0 = RGMPyoffset + RGMPheight - (short) ((long) y0 * RGMPheight / INYMAX); x1 = RGMPxoffset + (short) ((long) x1 * RGMPwidth/INXMAX); y1 = RGMPyoffset + RGMPheight - (short) ((long) y1 * RGMPheight / INYMAX); MoveTo(x0,y0); LineTo(x1,y1); return 0; } void RGMPinfo(short w, short v, short a, short b, short c, short d) { UNUSED_ARG(w) UNUSED_ARG(v) UNUSED_ARG(a) UNUSED_ARG(b) UNUSED_ARG(c) UNUSED_ARG(d) } void RGMPdataline(short blah, short blam, short bluh) { UNUSED_ARG(blah) UNUSED_ARG(blam) UNUSED_ARG(bluh) } void RGMPcharmode(short w, short rotation, short size) { UNUSED_ARG(w) UNUSED_ARG(rotation) UNUSED_ARG(size) } short RGMPsize(Rect *incoming) { RGMPheight= incoming->bottom-incoming->top; RGMPwidth = incoming->right - incoming->left; RGMPyoffset= incoming->top; RGMPxoffset= incoming->left; return(0); } \ No newline at end of file diff --git a/source/tek/rgmp.proto.h b/source/tek/rgmp.proto.h new file mode 100755 index 0000000..979793c --- /dev/null +++ b/source/tek/rgmp.proto.h @@ -0,0 +1 @@ + /* rgmp.c */ void TEKMacPicunload(void); short RGMPnewwin(void); char *RGMPdevname(void); void RGMPinit(void); short RGMPpencolor(short w, short color); short RGMPclose(short w); short RGMPpoint(short w, short x, short y); short RGMPdrawline(short w, short x0, short y0, short x1, short y1); void RGMPinfo(short w, short v, short a, short b, short c, short d); void RGMPcharmode(short w, short rotation, short size); short RGMPsize(Rect *incoming); void RGMPdataline(short blah, short blam, short bluh); \ No newline at end of file diff --git a/source/tek/tekdefs.h b/source/tek/tekdefs.h new file mode 100755 index 0000000..9434363 --- /dev/null +++ b/source/tek/tekdefs.h @@ -0,0 +1 @@ +/*--------------------------------------------------------------------------*/ /* TEKDEFS -- This file contains all of the defines, and other related */ /* stuff for TEK, bundled up into one neat package */ /* First come the #defines */ /*--------------------------------------------------------------------------*/ #define TEK_DEVICE_MAX 2 #define SPLASH_SQUARED 4 /* NCSA: sb - used by tekrgmac.c */ #define MAXWIND 20 #define WINXMAX 4095 #define WINYMAX 3139 #define INXMAX 4096 #define INYMAX 4096 #define NUMSIZES 6 /* number of char sizes */ #define PREDCOUNT 50 /* MORE vgtek specific stuff */ #define MAXVG 20 /* maximum number of VG windows */ /* temporary states */ #define HIY 0 /* waiting for various pieces of coordinates */ #define EXTRA 1 #define LOY 2 #define HIX 3 #define LOX 4 #define DONE 5 /* not waiting for coordinates */ #define ENTERVEC 6 /* entering vector mode */ #define CANCEL 7 /* done but don't draw a line */ #define RS 8 /* RS - incremental plot mode */ #define ESCOUT 9 /* when you receive an escape char after a draw command */ #define CMD0 50 /* got esc, need 1st cmd letter */ #define SOMEL 51 /* got esc L, need 2nd letter */ #define IGNORE 52 /* ignore next char */ #define SOMEM 53 /* got esc M, need 2nd letter */ #define IGNORE2 54 #define INTEGER 60 /* waiting for 1st integer part */ #define INTEGER1 61 /* waiting for 2nd integer part */ #define INTEGER2 62 /* waiting for 3rd (last) integer part */ #define COLORINT 70 #define GTSIZE0 75 #define GTSIZE1 76 #define GTEXT 77 /* TEK4105 GraphText 17jul90dsw */ #define MARKER 78 /* TEK4105 Marker select 17jul90dsw */ #define GTPATH 79 /* TEK4105 GraphText path 17jul90dsw */ #define SOMET 80 #define JUNKARRAY 81 #define STARTDISC 82 #define DISCARDING 83 #define FPATTERN 84 /* TEK4105 FillPattern 17jul90dsw */ #define GTROT 85 /* TEK4105 GraphText rotation 17jul90dsw */ #define GTROT1 86 #define GTINDEX 87 /* TEK4105 GraphText color 17jul90dsw */ #define PANEL 88 /* TEK4105 Begin Panel 23jul90dsw */ #define SUBPANEL 89 /* TEK4105 Begin^2 Panel 25jul90dsw */ #define TERMSTAT 90 /* TEK4105 Report Term Status 24jul90dsw */ #define SOMER 91 /* TEK4105 for ViewAttributes 10jan91dsw */ #define VIEWAT 92 /* TEK4105 ViewAttributes 10jan91dsw */ #define VIEWAT2 93 /* output modes */ #define ALPHA 0 #define DRAW 1 #define MARK 3 #define TEMPDRAW 101 #define TEMPMOVE 102 #define TEMPMARK 103 /* stroked fonts */ #define CHARWIDE 51 /* total horz. size */ #define CHARTALL 76 /* total vert. size */ #define CHARH 10 /* horz. unit size */ #define CHARV 13 /* vert. unit size */ /*--------------------------------------------------------------------------*/ /* Next come the typedefs for the various tek structures */ /*--------------------------------------------------------------------------*/ typedef struct TPOINT *pointlist; typedef struct TPOINT { short x,y; pointlist next; } point/*,*pointlist*/; /* BYU LSC */ typedef struct { short (*newwin)(void); char * (*devname)(void); void (*init)(void); short (*gin)(short), (*pencolor)(short, short), (*clrscr)(short), (*close)(short), (*point)(short, short, short), (*drawline)(short, short, short, short, short); void (*info)(short, short, short, short, short, short), (*pagedone)(short), (*dataline)(short, short, short), (*charmode)(short, short, short), (*gmode)(void), (*tmode)(void), (*showcur)(void), (*lockcur)(void), (*hidecur)(void), (*bell)(short), (*uncover)(short); } RGLINK; /*--------------------------------------------------------------------------*/ /* VGwintype structure -- this is the main high level TEK structure, where */ /* everything happens */ /*--------------------------------------------------------------------------*/ struct VGWINTYPE { OSType id; // VGWN short RGdevice,RGnum,theVS; char mode,modesave; /* current output mode */ char loy,hiy,lox,hix,ex,ey; /* current graphics coordinates */ char nloy,nhiy,nlox,nhix,nex,ney; /* new coordinates */ short curx,cury; /* current composite coordinates */ short savx,savy; /* save the panel's x,y */ short winbot,wintop,winleft,winright,wintall,winwide; /* position of window in virutal space */ short textcol; /* text starts in 0 or 2048 */ short intin; /* integer parameter being input */ short pencolor; /* current pen color */ short fontnum,charx,chary; /* char size */ short count; /* for temporary use in special state loops */ char TEKtype; /* 4105 or 4014? added: 16jul90dsw */ char TEKMarker; /* 4105 marker type 17jul90dsw */ char TEKOutline; /* 4105 panel outline boolean */ short TEKPath; /* 4105 GTPath */ short TEKPattern; /* 4105 Panel Fill Pattern */ short TEKIndex; /* 4105 GTIndex */ short TEKRot; /* 4105 GTRotation */ short TEKSize; /* 4105 GTSize */ short TEKBackground; /* 4105 Background color */ pointlist TEKPanel; /* 4105 Panel's list of points */ pointlist current; /* current point in the list */ }; /*--------------------------------------------------------------------------*/ /* RGMwindow structure -- this is the display structure for tek stuff. It */ /* contains all the display specific info (location, scale, etc) */ /*--------------------------------------------------------------------------*/ struct RGMwindows { OSType id; // RGMW GrafPtr wind; short xorigin, yorigin, xscale, yscale, vg, vs, ingin; unsigned char *name; short width, height; ControlHandle zoom, vert, horiz; }; /* *RGMwind[ MAXWIND ]; *//* BYU - changed from an array of structure to an array of pointers */ typedef struct { long thiselnum; /* number of currently-viewing element */ Handle dataHandle; /* Handle to the data */ } TEKSTORE, *TEKSTOREP; \ No newline at end of file diff --git a/source/tek/tekrgmac.c b/source/tek/tekrgmac.c new file mode 100755 index 0000000..7f8aacb --- /dev/null +++ b/source/tek/tekrgmac.c @@ -0,0 +1 @@ +// BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* rgmac.c by Gaige B. Paulsen spawned from rgp.c by Aaron Contorer for NCSA Copyright 1987, board of trustees, University of Illinois Routines for Macintosh Window output. */ #ifdef MPW #pragma segment TEKMAIN #endif #include "tekrgmac.proto.h" #include "maclook.proto.h" #include "vgtek.proto.h" #include "mydnr.proto.h" #include "rsinterf.proto.h" #include "netevent.proto.h" #include "rg0.proto.h" #include "rgmp.proto.h" #include "InternalEvents.h" #include "tekdefs.h" /* NCSA: sb - all the TEK defines are now here */ //#define TEK_DEBUG1 #ifdef TEK_DEBUG1 #define TEK_DEBUG_PRINT(x) putln(x) char TEK_DEBUG_STRING [512]; #else #define TEK_DEBUG_PRINT(x) #endif /*--------------------------------------------------------------------------*/ /* Some variable definitions are needed before we give the code */ /* */ /*--------------------------------------------------------------------------*/ long RGMlastclick; short RGMcolor[]= { 30, /* black */ 33, /* white */ 205, /* red */ 341, /* green */ 409, /* blue */ 273, /* cyan */ 137, /* magenta */ 69 /* yellow */ }; struct RGMwindows *RGMwind[ MAXWIND ]; char *RGMdevname(void) { return("Macintosh Windows"); } short RGMnewwin(void) { short i = 0; while ((i < MAXWIND) && (RGMwind[i] != nil)) i++; if (i >= MAXWIND) return(-1); RGMwind[i] = (struct RGMwindows *) myNewPtr(sizeof(struct RGMwindows)); if (RGMwind[i] == nil) { return -1; } RGMwind[i]->id = 'RGMW'; RGMwind[i]->wind = GetNewWindow(256, NULL, kInFront); if (RGMwind[i]->wind == 0L) { DisposePtr((Ptr)RGMwind[i]); RGMwind[i] = nil; return -1; } ((WindowPeek)RGMwind[i]->wind)->windowKind = WIN_TEK; RGMwind[i]->vg = -1; /* BYU */ RGMwind[i]->vs = -1; /* BYU */ RGMwind[i]->xorigin = 0; RGMwind[i]->yorigin = 0; RGMwind[i]->xscale = WINXMAX; /* BYU LSC - need the "W" here */ RGMwind[i]->yscale = WINYMAX; /* BYU LSC - need the "W" here */ RGMwind[i]->width = 400; /* BYU LSC - was 256 (size of old window resource */ RGMwind[i]->height = 300; /* BYU LSC - was 342 (size of old window resource */ RGMwind[i]->ingin = 0; /* BYU LSC */ ValidRect(&RGMwind[i]->wind->portRect); return(i); } void RGMinit(void) { short i; for (i = 0; i < MAXWIND; i++) RGMwind[i] = nil; } short RGMgin(short w) { if (RGsetwind(w)) return(-1); setgraphcurs(); RGMwind[w]->ingin=1; } short RGMpencolor(short w, short color) { if (RGsetwind(w) ) return(-1); ForeColor((long) RGMcolor[color] ); #ifdef TEK_DEBUG_1 sprintf(TEK_DEBUG_STRING, "TEK: Setting pen color to %d", color); putln(TEK_DEBUG_STRING); #endif } short RGMclrscr(short w) { if (RGsetwind(w) ) return(-1); PaintRect(&RGMwind[w]->wind->portRect); TEK_DEBUG_PRINT("TEK: Clearing screen"); } short RGMclose(short w) { if (RGsetwind(w) ) return(-1); DisposeWindow(RGMwind[w]->wind); DisposePtr((Ptr)RGMwind[w]->name); DisposePtr((Ptr)RGMwind[w]); RGMwind[w] = nil; } short RGMpoint(short w, short x, short y) { if (RGsetwind(w) ) return(-1); MoveTo(x,y); LineTo(x,y); } short RGMdrawline(short w, short x0, short y0, short x1, short y1) { long xl0, yl0, xl1, yl1; if (RGsetwind(w) ) return(-1); xl0 = ((long)x0 * RGMwind[w]->width) / INXMAX; yl0 = (long)RGMwind[w]->height - (((long)y0 * RGMwind[w]->height) / INYMAX); xl1 = ((long)x1 * RGMwind[w]->width) / INXMAX; yl1 = (long)RGMwind[w]->height - (((long)y1 * RGMwind[w]->height) / INYMAX); MoveTo((short)xl0, (short)yl0); LineTo((short)xl1, (short)yl1); } void RGMinfo(short w, short v, short a, short b, short c, short d) { UNUSED_ARG(a) UNUSED_ARG(b) UNUSED_ARG(c) UNUSED_ARG(d) RGMwind[w]->vg=v; } void RGMpagedone(short w) { UNUSED_ARG(w) } void RGMdataline(short w, short data, short count) { UNUSED_ARG(w) UNUSED_ARG(data) UNUSED_ARG(count) } void RGMcharmode(short w, short rotation, short size) { UNUSED_ARG(w) UNUSED_ARG(rotation) UNUSED_ARG(size) } void RGMgmode(void) {} void RGMtmode(void) {} void RGMshowcur(void) { } void RGMlockcur(void) { } void RGMhidecur(void) { } void RGMbell(short w) { UNUSED_ARG(w) } void RGMuncover(short w) { UNUSED_ARG(w) } short RGMoutfunc(short (*f )()) { UNUSED_ARG(f) return(0); // Unused } short RGsetwind(short dnum) { if (dnum<0 || dnum>=MAXWIND) return(-1); if (RGMwind[dnum] == nil) return -1; SetPort( RGMwind[dnum]->wind); return(0); } short RGfindbyVG(short vg) { short i = 0; while (i < MAXWIND) { if (RGMwind[i] != nil) { if (RGMwind[i]->vg == vg) break; } i++; } if (i >= MAXWIND) return(-1); return(i); } short RGattach(short vg, short virt, char *name, short TEKtype) { short dnum; unsigned long time; char myname[256],ts[256]; if ((dnum = RGfindbyVG(vg)) < 0) return(-1); RGMwind[dnum]->vs = virt; RGMwind[dnum]->name = (unsigned char *) myNewPtr((long) 256); /* BYU LSC */ if (RGMwind[dnum]->name == 0L) return(-2); myname[0] = ''; if (TEKtype) strcpy(&myname[1], "[4105] "); else strcpy(&myname[1], "[4014] "); strncpy(&myname[strlen(myname)],name,120); GetDateTime(&time); IUTimeString(time,FALSE,(StringPtr) ts); /* BYU LSC - Put time in the temp string */ p2cstr((StringPtr)ts); /* BYU LSC */ strncat(myname," ",2); /* BYU - was 4 - Space, please */ strncat(myname,ts,64); /* BYU - Place the time string at the end */ strcpy((char *) RGMwind[dnum]->name,myname); /* BYU LSC */ if (RGMwind[dnum]->wind != (GrafPtr) 0) { /* BYU LSC */ c2pstr(myname); /* BYU LSC */ SetWTitle(RGMwind[dnum]->wind,(StringPtr)myname); /* BYU LSC */ } return(0); } short RGdetach( short vg) { short dnum; /* BYU */ char myname[256]; /* BYU LSC */ if ((dnum = RGfindbyVG(vg)) < 0) return(-1); /* BYU */ if (dnum >= MAXWIND) return(-1); /* BYU */ if (RGMwind[dnum]->vs != -1) { /* BYU */ if (RGMwind[dnum]->wind != (GrafPtr) 0) { /* BYU */ #if 1 strncpy((char *) RGMwind[dnum]->name, /* BYU LSC */ (char *) &RGMwind[dnum]->name[1],255); /* BYU LSC */ strncpy(myname, (char *) RGMwind[dnum]->name,256); /* BYU LSC */ c2pstr(myname); /* BYU LSC */ SetWTitle(RGMwind[dnum]->wind,(StringPtr)myname); /* BYU LSC */ #else strncpy((char *) RGMwind[dnum]->name, /* BYU LSC */ (char *) &RGMwind[dnum]->name[1],255); /* BYU LSC */ SetWTitle(RGMwind[dnum]->wind,RGMwind[dnum]->name); /* BYU LSC */ #endif } /* BYU */ } /* BYU */ return(0); /* BYU */ } short RGfindbywind( GrafPtr wind) { short i = 0; while (i < MAXWIND) { if (RGMwind[i] != nil) { if (RGMwind[i]->wind == wind) break; } i++; } if (i >= MAXWIND) return(-1); return(i); } short RGupdate( GrafPtr wind) { short i = 0, done; if ((i = RGfindbywind(wind)) < 0) return(-1); SetPort(wind); BeginUpdate(wind); VGstopred(RGMwind[i]->vg); VGpage(RGMwind[i]->vg); done = VGpred(RGMwind[i]->vg,RGMwind[i]->vg); EndUpdate(wind); if (!done) netputevent(USERCLASS,RG_REDRAW,RGMwind[i]->vg,0); return(done); } short RGsupdate( short i) { short rg; rg = RGfindbyVG(i); if (rg < 0) return(0); SetPort(RGMwind[rg]->wind); if (!VGpred(RGMwind[rg]->vg,RGMwind[rg]->vg)) { netputevent(USERCLASS,RG_REDRAW,i,0); } else return(1); return(0); } short RGgetVG(GrafPtr wind) { short i; i = RGfindbywind(wind); return(RGMwind[i]->vg); } short RGgetdnum(GrafPtr wind) { return(RGfindbywind(wind)); } short RGgetVS(short dnum) { return(RGMwind[dnum]->vs); } short inSplash(Point *p1, Point *p2) { if ((p1->h - p2->h > 3) || (p2->h - p1->h > 3)) return(0); if ((p1->v - p2->v > 3) || (p2->v - p1->v > 3)) return(0); return(1); } void VidSync( void) { long a; a = TickCount(); /* BYU LSC */ while (a == TickCount()) /* loop*/; /* BYU LSC */ } void RGmousedown ( GrafPtr wind, Point *wherein ) { unsigned long lx,ly; /* NCSA: SB */ char thispaceforent[6]; short i; Point where; char dum[32]; where = *wherein; if ((i = RGfindbywind(wind)) < 0) return; if (!RGMwind[i]->ingin) { Point anchor,current,last; #if 0 /* BYU LSC - was "#ifndef MPW" */ long TickCount(); #endif MPW long tc; short x0,y0,x1,y1; Rect rect; SetPort(wind); last = where; current = where; anchor = where; PenPat(PATTERN(qd.gray)); PenMode(patXor); SetRect(&rect,0,0,0,0); while (StillDown()) { GetMouse(¤t); if (inSplash(¤t,&anchor)) continue; tc = TickCount(); while(TickCount() == tc) /* loop */; VidSync(); FrameRect(&rect); if (anchor.v < current.v) { rect.top = anchor.v; rect.bottom = current.v; } else { rect.top = current.v; rect.bottom = anchor.v; } if (anchor.h < current.h) { rect.left = anchor.h; rect.right = current.h; } else { rect.right = anchor.h; rect.left = current.h; } FrameRect(&rect); last = current; } FrameRect(&rect); PenPat(PATTERN(qd.black)); PenMode(patCopy); if (!inSplash(&anchor,¤t)) { x0 = (short) ((long) rect.left * RGMwind[i]->xscale / RGMwind[i]->width ); y0 = (short) (RGMwind[i]->yscale - (long) rect.top * RGMwind[i]->yscale / RGMwind[i]->height); x1 = (short) ((long) rect.right * RGMwind[i]->xscale / RGMwind[i]->width); y1 = (short) (RGMwind[i]->yscale - (long) rect.bottom * RGMwind[i]->yscale / RGMwind[i]->height); x1 = (x1 < x0+2) ? x0 + 4 : x1; y0 = (y0 < y1+2) ? y1 + 4 : y0; VGzoom( i, x0 + RGMwind[i]->xorigin, y1 + RGMwind[i]->yorigin, x1 + RGMwind[i]->xorigin, y0 + RGMwind[i]->yorigin); VGpage(RGMwind[i]->vg); RGMwind[i]->xscale = x1 - x0; RGMwind[i]->yscale = y0 - y1; RGMwind[i]->xorigin = x0 + RGMwind[i]->xorigin; RGMwind[i]->yorigin = y1 + RGMwind[i]->yorigin; while(!VGpred(RGMwind[i]->vg,RGMwind[i]->vg)) Stask(); RGMlastclick = 0L; } else { if (RGMlastclick && ((RGMlastclick + GetDblTime()) > TickCount())) { RGMwind[i]->xscale = WINXMAX; /* BYU LSC - need the "W" here */ RGMwind[i]->yscale = WINYMAX; /* BYU LSC - need the "W" here */ RGMwind[i]->xorigin = 0; RGMwind[i]->yorigin = 0; VGzoom(i,0,0,WINXMAX-1,WINYMAX-1); /* BYU LSC - need the "W" here */ VGpage( RGMwind[i]->vg); while(!VGpred(RGMwind[i]->vg,RGMwind[i]->vg)) Stask(); RGMlastclick = 0L; } else RGMlastclick = TickCount(); } return; } /* NCSA: SB */ /* NCSA: SB - These computations are being truncated and turned into signed ints. */ /* NCSA: SB - Just make sure everything is cast correctly, and were fine */ lx = ((unsigned long)RGMwind[i]->xscale * (unsigned long)where.h) /* NCSA: SB */ / (unsigned long)RGMwind[i]->width; /* NCSA: SB */ ly = (unsigned long)RGMwind[i]->yscale - /* NCSA: SB */ ((unsigned long)RGMwind[i]->yscale * (unsigned long)where.v) / (unsigned long)RGMwind[i]->height; /* NCSA: SB */ VGgindata(RGMwind[i]->vg,(unsigned short) lx,(unsigned short)ly,' ',thispaceforent); /* NCSA: SB */ #if 0 /* BYU LSC - not needed */ sprintf(dum,"GIN i: %d, vs: %d\015",i,RGMwind[i]->vs); /* BYU 2.4.18 - changed \n to \015 */ putln(dum); #endif /* BYU LSC - not needed */ RSsendstring(RGMwind[i]->vs,thispaceforent,5); sprintf(dum," \r\n"); RSsendstring(RGMwind[i]->vs,dum,3); /* RGMwind[i]->ingin = 0; */ unsetgraphcurs(); RGMlastclick = TickCount(); } /*--------------------------------------------------------------------------*/ /* NCSA: SB - RGMgrowme */ /* This allows the TEK window to be grown like any other real window. */ /* The grow box is not shown on the screen, but it acts accordingly - SMB */ /*--------------------------------------------------------------------------*/ void RGMgrowme(short myRGMnum,GrafPtr window, long *where, short modifiers) { UNUSED_ARG(modifiers) long size; Rect SizRect; SetRect(&SizRect, 50, 50, 1500, 1500); /* NCSA: SB - max size - arbitrary */ if (where) { size = GrowWindow(window, *(Point *) where, &SizRect); if (size != 0L) { SizeWindow(window, size & 0xffff, (size >> 16) & 0xffff, FALSE); RGMwind[myRGMnum]->width = window->portRect.right - window->portRect.left; RGMwind[myRGMnum]->height = window->portRect.bottom - window->portRect.top; VGpage(RGMwind[myRGMnum]->vg); InvalRect(&window->portRect); RGupdate(window); } else return; /* user skipped growing */ } } \ No newline at end of file diff --git a/source/tek/tekrgmac.proto.h b/source/tek/tekrgmac.proto.h new file mode 100755 index 0000000..a28ee7b --- /dev/null +++ b/source/tek/tekrgmac.proto.h @@ -0,0 +1 @@ + /* tekrgmac.c */ char *RGMdevname(void); short RGMnewwin(void); void RGMinit(void); short RGMgin(short w); short RGMpencolor(short w, short color); short RGMclrscr(short w); short RGMclose(short w); short RGMpoint(short w, short x, short y); short RGMdrawline(short w, short x0, short y0, short x1, short y1); void RGMinfo(short w, short v, short a, short b, short c, short d); void RGMpagedone(short w); void RGMdataline(short w, short data, short count); void RGMcharmode(short w, short rotation, short size); void RGMgmode(void); void RGMtmode(void); void RGMshowcur(void); void RGMlockcur(void); void RGMhidecur(void); void RGMbell(short w); void RGMuncover(short w); short RGMoutfunc(short (*f )()); short RGsetwind(short dnum); short RGfindbyVG(short vg); short RGattach(short vg, short virt, char *name, short TEKtype); short RGdetach(short vg); short RGfindbywind(GrafPtr wind); short RGupdate(GrafPtr wind); short RGsupdate(short i); short RGgetVG(GrafPtr wind); short RGgetdnum(GrafPtr wind); short RGgetVS(short dnum); short inSplash(Point *p1, Point *p2); void VidSync(void); void RGmousedown(GrafPtr wind, Point *wherein); void RGMgrowme(short myRGMnum, GrafPtr window, long *where, short modifiers); \ No newline at end of file diff --git a/source/tek/tekstor.c b/source/tek/tekstor.c new file mode 100755 index 0000000..afee67f --- /dev/null +++ b/source/tek/tekstor.c @@ -0,0 +1 @@ +// tekstor.c // BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* This has been rewritten to use one damn handle to hold all of the data. -- JMB */ #ifdef MPW #pragma segment TEKMAIN #endif #include "vgtek.proto.h" #include "rg0.proto.h" #include "rgmp.proto.h" #include "tekrgmac.proto.h" #include "tekdefs.h" /* NCSA: sb - all defines are now here, for easy access */ #include "tekstor.proto.h" // thiselnum runs from 0 to (handlesize-1), which is in accordance with C style // arrays. The handle is indexed 0...(handlesize-1) as well. This is why you see // the various +-1's. -- JMB 8/93 TEKSTOREP newTEKstore(void) { TEKSTOREP s; s = (TEKSTOREP) myNewPtr(sizeof(TEKSTORE)); if (s == NULL) return (NULL); if (!(s->dataHandle = myNewHandle(0L))) return (NULL); s->thiselnum = 0; return(s); } void freeTEKstore(TEKSTOREP s) { DisposeHandle(s->dataHandle); DisposePtr((Ptr) s); } short addTEKstore(TEKSTOREP s, char d) { Size handlesize; OSErr memErr; handlesize = GetHandleSize(s->dataHandle); memErr = mySetHandleSize(s->dataHandle, ++handlesize); if (memErr) return (-1); (*(s->dataHandle))[handlesize-1] = d; // Save in last position return(0); } void topTEKstore(TEKSTOREP s) { s->thiselnum = 0; } short nextTEKitem(TEKSTOREP s) { if (s->thiselnum == (GetHandleSize(s->dataHandle))) return(-1); // At end of data return((short) ((*(s->dataHandle))[(s->thiselnum)++]) ); } short TEKunstore(TEKSTOREP s) { Size handlesize; OSErr memErr; if ((handlesize = GetHandleSize(s->dataHandle)) == 0) return (-1); // Nothing in store memErr = mySetHandleSize(s->dataHandle, --handlesize); if (memErr) return(-1); if (s->thiselnum >= handlesize) s->thiselnum = handlesize - 1; return(0); } #ifdef AARON_CONTORER_HAS_A_BRAIN // Never true #define MINPOOL 0x0200 /* smallest allowable pool */ #define MAXPOOL 0x2000 /* largest allowable pool */ STOREP newstore(void) /* create a new, empty store and return a pointer to it. Returns NULL if not enough memory to create a new store. */ { STOREP s; s=(STOREP) myNewPtr((long) sizeof(STORE)); /* BYU LSC */ if (s==NULL) { return(NULL); } else { s->lasth = s->thish = s->firsth = (HANDLEP) myNewPtr((long) sizeof(HANDLE)); /* BYU LSC */ if (s->firsth==NULL) { DisposPtr((Ptr) s); return(NULL); } else { s->firsth->pool = myNewPtr((long) MINPOOL); /* BYU LSC */ if (s->firsth->pool==NULL) { DisposPtr((Ptr) s->firsth); DisposPtr((Ptr) s); return(NULL); } else { s->lastelnum = s->thiselnum = -1; s->firsth->poolsize = MINPOOL; s->firsth->next = NULL; } } } return(s); } void freestore(STOREP s) /* Frees all pools and other memory space associated with store s. */ { HANDLEP h,h2; h = s->firsth; while (h != NULL) { h2 = h; DisposPtr(h->pool); h = h->next; DisposPtr((Ptr) h2); } DisposPtr((Ptr) s); } int addstore(STOREP s, char d) /* Adds character d to the end of store s. Returns 0 if successful, -1 if unable to add character (no memory). */ { int n; /* temp storage */ long size; /* BYU LSC */ HANDLEP h; n = ++(s->lastelnum); size = s->lasth->poolsize; if (n < s->lasth->poolsize) { s->lasth->pool[n] = d; } else { /* Pool full; allocate a new one. */ if (size<MAXPOOL) size <<= 1; h = (HANDLEP)myNewPtr((long) sizeof(HANDLE)); /* BYU LSC */ if (h==NULL) { (s->lastelnum)--; return(-1); } else { h->pool = myNewPtr(size); if (h->pool==NULL) { DisposPtr((Ptr) h); (s->lastelnum)--; return(-1); } else { h->poolsize = size; h->next = NULL; s->lasth->next = h; s->lasth = h; s->lastelnum = 0; h->pool[0] = d; } } } /* end of new pool allocation */ return(0); } /* end addstore() */ topstore(STOREP s) /* Reset stats so that a call to nextitem(s) will be retrieving the first item in store s. */ { s->thish = s->firsth; s->thiselnum = -1; } int nextitem(STOREP s) /* Increment the current location in store s. Then return the character at that location. Returns -1 if no more characters. */ { HANDLEP h; if (s->thish==s->lasth && s->thiselnum==s->lastelnum) return(-1); else { h = s->thish; if (++(s->thiselnum) < s->thish->poolsize) { return((int)(s->thish->pool[s->thiselnum])); } else { /* move to next pool */ h = h->next; s->thish = h; s->thiselnum = 0; return((int)(h->pool[0])); } } } /* end nextitem() */ int unstore(STOREP s) /* Removes ("pops") the last item from the specified store. Returns that item (in range 0-255), or returns -1 if there are no items in the store. */ { HANDLEP nextolast; if (s->lastelnum > -1) { /* last pool not empty */ return((int)(s->lasth->pool[(s->lastelnum)--])); } else { /* last pool empty */ if (s->lasth == s->firsth) return(-1); else { /* move back one pool */ nextolast = s->firsth; while (nextolast->next != s->lasth) nextolast = nextolast->next; DisposPtr((Ptr) nextolast->next); s->lasth = nextolast; s->lastelnum = nextolast->poolsize - 2; if (s->thish == nextolast->next) { s->thish = nextolast; s->thiselnum = s->lastelnum; } nextolast->next = NULL; return((int)(nextolast->pool[s->lastelnum+1])); } } } #endif \ No newline at end of file diff --git a/source/tek/tekstor.proto.h b/source/tek/tekstor.proto.h new file mode 100755 index 0000000..d7caead --- /dev/null +++ b/source/tek/tekstor.proto.h @@ -0,0 +1 @@ +TEKSTOREP newTEKstore(void); void freeTEKstore(TEKSTOREP s); short addTEKstore(TEKSTOREP s, char d); void topTEKstore(TEKSTOREP s); short nextTEKitem(TEKSTOREP s); short TEKunstore(TEKSTOREP s); #ifdef AARON_CONTORER_HAS_A_BRAIN // Never true STOREP newstore(void); void freestore(STOREP s); int addstore(STOREP s, char d); int topstore(STOREP s); int nextitem(STOREP s); int unstore(STOREP s); #endif \ No newline at end of file diff --git a/source/tek/vgfont.h b/source/tek/vgfont.h new file mode 100755 index 0000000..4de7bff --- /dev/null +++ b/source/tek/vgfont.h @@ -0,0 +1 @@ +/* * Stroked font designed by Aaron Contorer */ char *VGfont[95] = { "", /* space */ /* ! thru / */ /* ! " */ "4d1t1h1b1f3w5t", "4w4t4d4b", /* # $ % */ "2w8h4w8f2e8b4d8t", "4d8t1x3d6f1v1b1n6h1n1b1v6f", "8y6a2f2b2h2t6c2f2b2h2t", /* & */ "8d6r2f2t4h4v4b4h4y", /* ' */ "2w3e3y", /* ( ) */ "4d2r4t2y", "4d2y4t2r", /* * + , - */ "4d8t1x3d6v6w6n", "4d2w4t2x3a6h", "2c3y", "3w8h", /* . */ "2d2h2t2f2b", "8y", /* 0-9 */ "2d4h2y4t2r4f2v4b2n2a8y", "2d4h2a8t2v", "8w6h2n2v4f2v2b8h", "6h2y2r4f4d2y2r6f", "6e2w8b2e8f6y", "6h2y2r6f4t8h", "2w2y4h2n2v4f2r4t2y4h", "8y8f", "2d4h2y2r4f2v2n4w2r2y4h2n2v", "2d4h2y4t2r4f2v2n4h2y", /* : thru @ */ /* : */ "2d2h2t2f2b4w2h2t2f2b", /* ; */ "2c4y2w2t2f2b2h", "4d4r4y", "1w8h3w8f", "4y4r", "4d1h1t1f1b2w2t3h1y2t1r6f1v", "7w1y6h1n6b1v2f4t1x1r3f1v2b1n3h1y", /* A-Z */ "4t4y4n4b2w8f", "6h2y2r6f6d2y2r6f8b", "6d2e2v4f2r4t2y4h2n", "6h2y4t2r6f8b", "8d8f8t8h4x8f", "8t8h4x8f", "7e1d1r5f2v4b2n4h2y2t3f", "8t4x8h4w8b", "8h4a8t4a8h", "2w2n4h2y6t", /* K */ "8t4x4h4y4z4n", "8d8f8t", "8t4n4y8b", "8t8n8t", "2d4h2y4t2r4f2v4b2n", "8t7h1n2b1v7f", "2d2r4t2y4h2n4b2v4f2e4n", /* R */ "8t7h1n2b1v7f4d4n", "6h2y2r4f2r2y6h", "4d8t4a8h", "8w6b2n4h2y6t", "8w4b4n4y4t", "8w8b4y4n8t", "8y8a8n", "4d4t4r4c4y", "8w8h8v8h", /* [ thru ` */ "6d4f8t4h", "8w8n", "2d4h8t4f", "4w4y4n", "8h", "8w2d3n", /* a */ "1w2t1y6h1n1t1x2b1n1q1v6f1r", "4w7h1n2b1v7f8t", "8d7f1r2t1y7h", "8e8b7f1r2t1y7h", "2w8h1t1r6f1v2b1n6h", /* f */ "4w7h1d3w1r4f1v7b", "1d6h1y2t1r6f1v2b1n7h4w5b1v6f1r", "8t5x1y6h1n3b", "4d4t3w1t1h1b1f", "2n4h2y4t3w1t1f1b1h", /* k */ "2d8w8b2w1h2y2z2n", /* l */ "5d1f1r7t", "4t1x1y2h1n3b3w1y2h1n3b", "4w1h4b3w1y5h1n3b", "1d6h1y2t1r6f1v2b1n", /* p */ "2x6t1x1y6h1n2b1v6f1r", "1d6h1y2t1r6f1v2b1n7d4w6b", "4w1h4b3w1y5h1n", "1d6h1y1r6f1r1y6h", "4w7h4w5a7b1n4h1y", "4w3b1n5h1y1c1f4t", /* v */ "4w4n4y", "4w2b2n2y2n2y2t", "2d4y4a4n", "2x2d6y4z4r", "2w2e4h4v4h", /* end of lower-case letters */ /* { thru ~ */ "8d3f1r2t1r2f2d1y2t1y3h", "4d8t", "3h1y2t1y2h2a1r2t1r3f", "6w2y2n2y" }; /* * Stroked font designed by Aaron Contorer. * Redone for tek4105 by David Whittington. */ char *VGTEKfont[106] = { "", /* space */ /* ! thru / */ /* ! " */ "2d0t2w4t", "1d6w2b2h2t", /* # $ % */ "1d6t2d6b1h2w4f2w4h", "1w3h1y1r2f1r1y3h1w2a6b", "1w4y3a1f1t1h6x2d1h1t1f", /* & */ "4d4r1t1y1n1b2v1b2n1h2y", /* ' */ "1d4w2y", /* ( ) */ "3d1r4t1y", "1d1y4t1r", /* * + , - */ "1w4y4a4n1x2a6t", "3w4h2r4b", "1d2x2y1t", "3w4h", /* . */ "2d1h1t1f", "1w4y", /* 0-9 */ "1w4t1y2h1n4b1v2f1r4y", "1d2h1a6t1x1f", "6w1y2h1n1b1v2f1v2b4h", "1w1n2h1y1t1r1f1d1y1t1r2f1v", "3d6t3v1x4h", "1w1n2h1y2t1r3f2t4h", "3d6w1f2v3b1n2h1y1t1r3f", "1d2t3y1t4f", "1d2h1y1t1r1f1d1y1t1r2f1v1b1n1h1a1v1b1n", "1d1h2y3t1r2f1v1b1n3h", /* : thru @ */ /* : */ "1d1h1t1f2w1h1t1r", /* ; */ "1x1c2y1t2w2t", "3d3r3y", "2w4h2w4f", "3y3r", "2d0t2w2y1t1r2f1v", "4d3f1r5t1y2h1n4b2f1t2y", /* A-Z */ "4t2y2n4b2w4f", "6t3h1n1b1v3f3d1n1b1v3f", "4d1w1v2f1r4t1y2h1n", "6t2h2n2b2v2f", "4d4f6t4h1z2x3f", "6t4h3x1a3f", "3d3w1h3b3f1r4t1y2h1n", "6t4d6b3w4f", "1d2h1a6t1d2f", "1w1n2h1y5t", /* K */ "6t4d3v3n", "6w6b4h", "6t2n1b1w2y6b", "6t4n2x6t", "1w1n2h1y4t1r2f1v4b", "6t3h1n1b1v3f", "1w1n2h1y4t1r2f1v4b2d1b1d1b1h", /* R */ "6t3h1n1b1v3f1d3n", "1w1n2h1y1t1r2f1r1t1y2h1n", "2d6t2a4h", "6w5b1n2h1y5t", "6w4b2n2y4t", "6w6b2y1t1x2n6t", "1t4y1t4a1b4n1b", "2d3t2y1t4a1b2n", "6w4h1b4v1b4h", /* [ thru ` */ "2d2f6t2h", "5w4n", "2d2h6t2f", "4w2y2n", "3x4h", "5w4n", /* a */ "1d4w2h1n3b3f1r1y3h", "6t4x2y1h1n2b1v1f2r", "4d3f1r2t1y3h", "4d6t4b2r1f1v2b1n1h2y", "3d2f1r2t1y2h1n1b4f", /* f */ "1d5t1y1h1n2x2a2f", "1x1n2h1y5t1z1r1f1v1b1n1h1y1t", "6t4x2y1h1n3b", "1d2h1a4t1f1e1w0h", "1x1n1h1y4t2w0h", /* k */ "6t4x2h2y4x2r", /* l */ "1d2h1a6t1f", "4t1h1n2b2w1y1n3b", "4t2x2y1h1n3b", "1w1n2h1y2t1r2f1v2b", /* p */ "2x6t2x2y1h1n2b1v1f2r", "2x4d6t2x2r1f1v2b1n1h2y", "4t2x2y1h1n", "3h1y1r2f1r1y2h", "1d4w2h1f2w5b1n1y", "4w3b1n1h2y2x4t", /* v */ "4w2b2n2y2t", "4w3b1n1y2t2x1n1y3t", "4y4a4n", "4w2b1n1h2y1w5b1v2f1r", "4w4h4v4h", /* end of lower-case letters */ /* { thru ~ */ "3d1r1t1r1y1t1y", "2d6t", "1d1y1t1y1r1t1r", "5w1y2n1y", /* marker definitions */ "0t", "1x2t1c2f", "2x4t2c4f", "3x6t2d1x4v4d4r", "3x1a2h1e4t1q2f1z4b", "3x2a1t4y1t4a1b4n1b", "2z4t4h4b4f", "2a2y2n2v2r", "0t2z4t4h4b4f", "0t2x2r2y2n2v", "2z4t4h4b4f4y4x4r" }; \ No newline at end of file diff --git a/source/tek/vgtek.c b/source/tek/vgtek.c new file mode 100755 index 0000000..4d8bc4b --- /dev/null +++ b/source/tek/vgtek.c @@ -0,0 +1 @@ +// BetterTelnet // copyright 1997 Rolf Braun // This is free software under the GNU General Public License (GPL). See the file COPYING // which comes with the source code and documentation distributions for details. // based on NCSA Telnet 2.7b5 /* * vgtek.c by Aaron Contorer 1987 for NCSA * bugfixes by Tim Krauskopf 1988 for NCSA * TEK4105 support by Dave Whittington 1990 (for NCSA, of course) * * Takes Tektronix codes as input; sends output to real graphics devices. * * CHANGES TO MAKE: * create a function to make sure a window is attached to a real window. * Calling program will call this whenever switching between active windows. * Pass virtual window number to RG driver so it can call back. */ #ifdef MPW #pragma segment TEKMAIN #endif #include "event.proto.h" #include "maclook.proto.h" #include "wind.h" #include "vsdata.h" #include "vsinterf.proto.h" #include "vgfont.h" #include "vgtek.proto.h" #include "rg0.proto.h" #include "rgmp.proto.h" #include "tekrgmac.proto.h" #include "tekdefs.h" /* NCSA: sb - all defines are now here, for easy access */ #include "tekstor.proto.h" static RGLINK RG[TEK_DEVICE_MAX] = { RGMnewwin, RGMdevname, RGMinit, RGMgin, RGMpencolor, RGMclrscr, RGMclose, RGMpoint, RGMdrawline, RGMinfo, RGMpagedone, RGMdataline, RGMcharmode, RGMgmode, RGMtmode, RGMshowcur, RGMlockcur, RGMhidecur, RGMbell, RGMuncover, RGMPnewwin, RGMPdevname, RGMPinit, RG0returnshort, RGMPpencolor, RG0returnshort, RGMPclose, RGMPpoint, RGMPdrawline, RGMPinfo, RG0oneshort, RGMPdataline, RGMPcharmode, RG0void, RG0void, RG0void, RG0void, RG0void, RG0oneshort, RG0oneshort }; extern WindRec *screens; static fontnum(short vw, short n); static storexy(short vw, short x, short y); static joinup(short hi, short lo, short e); static newcoord(short vw); static linefeed(short vw); static clipvec(short vw, short xa, short ya, short xb, short yb); static short VGcheck(short dnum); static struct VGWINTYPE *VGwin[MAXVG]; /* BYU - virtual window descriptors */ static char state[MAXVG],savstate[MAXVG]; /* save state in a parallel array for speed */ static TEKSTOREP VGstore[MAXVG]; /* the store where data for this window is kept */ static char storing[MAXVG]; /* are we currently saving data from this window */ static short drawing[MAXVG]; /* redrawing or not? */ static short charxset[NUMSIZES] = {56,51,34,31,112,168}; static short charyset[NUMSIZES] = {88,82,53,48,176,264}; /*******************************************************************/ void TEKMAINunload(void) {} short donothing(void) /* BYU LSC */ { return 0; } /* * Set font for window 'vw' to size 'n'. * Sizes are 0..3 in Tek 4014 standard. * Sizes 4 & 5 are used internally for Tek 4105 emulation. */ static fontnum(short vw, short n) { if ((n < 0) || (n >= NUMSIZES)) return(-1); VGwin[vw]->fontnum = n; VGwin[vw]->charx = charxset[n]; VGwin[vw]->chary = charyset[n]; return(0); } static storexy(short vw, short x, short y) /* set graphics x and y position */ { VGwin[vw]->curx = x; VGwin[vw]->cury = y; } static joinup(short hi, short lo, short e) /* returns the number represented by the 3 pieces */ { #if 1 return (((hi & 31) << 7) | ((lo & 31) << 2) | (e & 3)); #else return (((hi /* & 31 */ ) << 7) | ((lo /* & 31 */ ) << 2) | (e /* & 3 */)); #endif } /* end joinup() */ static newcoord(short vw) /* * Replace x,y with nx,ny */ { VGwin[vw]->hiy = VGwin[vw]->nhiy; VGwin[vw]->hix = VGwin[vw]->nhix; VGwin[vw]->loy = VGwin[vw]->nloy; VGwin[vw]->lox = VGwin[vw]->nlox; VGwin[vw]->ey = VGwin[vw]->ney; VGwin[vw]->ex = VGwin[vw]->nex; VGwin[vw]->curx = joinup(VGwin[vw]->nhix,VGwin[vw]->nlox,VGwin[vw]->nex); VGwin[vw]->cury = joinup(VGwin[vw]->nhiy,VGwin[vw]->nloy,VGwin[vw]->ney); } static linefeed(short vw) /* * Perform a linefeed & cr (CHARTALL units) in specified window. */ { /* short y = joinup(VGwin[vw]->hiy,VGwin[vw]->loy,VGwin[vw]->ey);*/ short y = VGwin[vw]->cury; short x; if (y > VGwin[vw]->chary) y -= VGwin[vw]->chary; else { y = 3119 - VGwin[vw]->chary; VGwin[vw]->textcol = 2048 - VGwin[vw]->textcol; } x = VGwin[vw]->textcol; storexy(vw,x,y); } /* * Draw a vector in vw's window from x0,y0 to x1,y1. * Zoom the vector to the current visible window, * and clip it before drawing it. * Uses Liang-Barsky algorithm from ACM Transactions on Graphics, * Vol. 3, No. 1, January 1984, p. 7. * * Note: since QuickDraw on the Mac already handles clipping, we * will not do any processing here. * 14may91dsw * */ static clipvec(short vw, short xa, short ya, short xb, short yb) { short t,b,l,r; struct VGWINTYPE *vp; long hscale, vscale; vp = VGwin[vw]; /* BYU mod */ hscale = INXMAX / (long) vp->winwide; vscale = INYMAX / (long) vp->wintall; t = vp->wintop; b = vp->winbot; l = vp->winleft; r = vp->winright; (*RG[vp->RGdevice].drawline) (vp->RGnum, (short) ((long)(xa - l) * INXMAX / (long) vp->winwide), (short) ((long)(ya- b) * INYMAX / (long) vp->wintall), (short) ((long)(xb - l) * INXMAX / (long) vp->winwide), (short) ((long)(yb- b) * INYMAX / (long) vp->wintall) ); } /* end clipvec() */ /* * Draw a stroked character at the current cursor location. * Uses simple 8-directional moving, 8-directional drawing. * * Modified 17jul90dsw: TEK4105 character set added. */ short drawc(short vw, short c) /* character to draw */ { short x,y,savex,savey; short strokex,strokey; short n; /* number of times to perform command */ char *pstroke; /* pointer into stroke data */ short hmag,vmag; short xdir,ydir; short height; xdir = 1; ydir = 0; if (c == 10) { linefeed(vw); return(0); } if (c == 7) { (*RG[VGwin[vw]->RGdevice].bell) (VGwin[vw]->RGnum); TEKunstore(VGstore[vw]); return(0); } savey = y = VGwin[vw]->cury; savex = x = VGwin[vw]->curx; if (c == 8) { if (savex <= VGwin[vw]->textcol) return(0); savex -= VGwin[vw]->charx; if (savex < VGwin[vw]->textcol) savex = VGwin[vw]->textcol; VGwin[vw]->cury = savey; VGwin[vw]->curx = savex; return(0); } if (VGwin[vw]->TEKtype) { height = VGwin[vw]->TEKSize; if (c > 126) { height = 1; (*RG[VGwin[vw]->RGdevice].pencolor)(VGwin[vw]->RGnum,VGwin[vw]->pencolor); } else (*RG[VGwin[vw]->RGdevice].pencolor)(VGwin[vw]->RGnum,VGwin[vw]->TEKIndex); hmag = (height*8); vmag = (height*8); xdir = 0; switch(VGwin[vw]->TEKRot) { case 0: xdir = 1; break; case 90: ydir = 1; break; case 180: xdir = -1; break; case 270: ydir = -1; break; } } else { hmag = VGwin[vw]->charx / 10; vmag = VGwin[vw]->chary / 10; } if ((c < 32) || (c > 137)) return(0); // Is this return value correct? c -= 32; pstroke = (VGwin[vw]->TEKtype) ? VGTEKfont[c] : VGfont[c]; while (*pstroke) { strokex = x; strokey = y; n = (*(pstroke++) - 48); /* run length */ c = *(pstroke++); /* direction code */ switch(c) /* horizontal movement: positive = right */ { case 'e': case 'd': case 'c': case 'y': case 'h': case 'n': x += (n * hmag) * xdir; y += (n * hmag) * ydir; break; case 'q': case 'a': case 'z': case 'r': case 'f': case 'v': x -= (n * hmag) * xdir; y -= (n * hmag) * ydir; } switch(c) /* vertical movement: positive = up */ { case 'q': case 'w': case 'e': case 'r': case 't': case 'y': x -= (n * vmag) * ydir; y += (n * vmag) * xdir; break; case 'z': case 'x': case 'c': case 'v': case 'b': case 'n': x += (n * vmag) * ydir; y -= (n * vmag) * xdir; } switch(c) /* draw or move */ { case 'r': case 't': case 'y': case 'f': case 'h': case 'v': case 'b': case 'n': clipvec (vw,strokex,strokey,x,y); break; } } /* end while not at end of string */ /* Update cursor location to next char position */ savex += VGwin[vw]->charx * xdir; savey += VGwin[vw]->charx * ydir; if ((savex < 0) || (savex > 4095) || (savey < 0) || (savey > 3119)) { savex = savex < 0 ? 0 : savex > 4095 ? 4095 : savex; savey = savey < 0 ? 0 : savey > 3119 ? 3119 : savey; } if (VGwin[vw]->TEKtype) (*RG[VGwin[vw]->RGdevice].pencolor)(VGwin[vw]->RGnum,VGwin[vw]->pencolor); VGwin[vw]->cury = savey; VGwin[vw]->curx = savex; } /*********************************************************** ************************************************************ *** *** ** All routines given below may be called by the user ** ** program. No routines given above may be called from ** ** the user program. ** *** *** ************************************************************ ***********************************************************/ /* Initialize the whole VG environment. Should be called ONCE * at program startup before using the VG routines. */ void VGinit(void) { short i; for (i = 0; i < MAXVG; i++) { VGwin[i] = nil; } for (i=0; i<TEK_DEVICE_MAX; i++) (*RG[i].init)(); /* BYU LSC */ } short VGgetVS(short theVGnum) /* NCSA 2.5: give us the VS */ { /* NCSA 2.5 */ if (VGcheck(theVGnum)) { return -1; } return VGwin[theVGnum]->theVS; /* NCSA 2.5 */ } /* NCSA 2.5 */ static short VGcheck(short dnum) { if ((dnum >= MAXVG) || (dnum < 0)) return -1; if (VGwin[dnum] == nil) return -1; return 0; } /* * create a new VG window and return its number. * New window will be attached to specified real device. * Returns -1 if unable to create a new VG window. * * Modified 16jul90dsw: Support selection of 4105 or 4014. */ short VGnewwin ( short device, /* number of RG device to use */ short theVS ) { short vw = 0; short theScrn; while ((vw < MAXVG) && (VGwin[vw] != nil)) vw++; if (vw == MAXVG) return(-1); VGwin[vw] = (struct VGWINTYPE *) myNewPtr(sizeof(struct VGWINTYPE)); if (VGwin[vw] == nil) { return -1; } VGstore[vw] = newTEKstore(); if (VGstore[vw] == nil) { DisposePtr((Ptr)VGwin[vw]); VGwin[vw] = nil; return -1; } VGwin[vw]->id = 'VGWN'; VGwin[vw]->RGdevice = device; VGwin[vw]->RGnum = (*RG[device].newwin)(); theScrn = findbyVS(theVS); VGwin[vw]->TEKtype = screens[theScrn].tektype; // 0 = 4014, 1 = 4105 if (VGwin[vw]->RGnum < 0) { /* no windows available on device */ DisposePtr((Ptr)VGwin[vw]); VGwin[vw] = nil; freeTEKstore(VGstore[vw]); return(-1); } VGwin[vw]->mode = ALPHA; VGwin[vw]->TEKPanel = (pointlist) NULL; VGwin[vw]->theVS = theVS; state[vw] = DONE; storing[vw] = TRUE; VGwin[vw]->textcol = 0; drawing[vw] = 1; fontnum(vw,0); (*RG[device].pencolor)(VGwin[vw]->RGnum,1); storexy(vw,0,3071); #if 1 /* BYU LSC */ VGzoom(vw,0,0,4095,3119); /* BYU LSC - important */ #else /* BYU LSC */ VGzoom(vw,0,0,INXMAX-1,INYMAX-1); #endif /* BYU LSC */ return(vw); } /* Release its real graphics device and its store. */ void VGclose(short vw) { if (VGcheck(vw)) { return; } (*RG[VGwin[vw]->RGdevice].close)(VGwin[vw]->RGnum); freeTEKstore(VGstore[vw]); DisposePtr((Ptr)VGwin[vw]); VGwin[vw] = nil; } /* Detach window from its current device and attach it to the * specified device. Returns negative number if unable to do so. * Sample application: switching an image from #9 to Hercules. * Must redraw after calling this. */ short VGdevice(short vw, short dev) { short newwin; if (VGcheck(vw)) { return -1; } newwin = (*RG[dev].newwin)(); if (newwin<0) return(newwin); /* unable to open new window */ (*RG[VGwin[vw]->RGdevice].close)(VGwin[vw]->RGnum); VGwin[vw]->RGdevice = dev; VGwin[vw]->RGnum = newwin; VGwin[vw]->pencolor = 1; VGwin[vw]->TEKBackground = 0; fontnum(vw,1); return(0); } /* Clear the store associated with window vw. * All contents are lost. * User program can call this whenever desired. * Automatically called after receipt of Tek page command. */ void VGclrstor(short vw) { if (VGcheck(vw)) { return; } freeTEKstore(VGstore[vw]); VGstore[vw] = newTEKstore(); /* Don't have to check for errors -- */ /* there was definitely enough memory. */ } /* Successively call the function pointed to by 'func' for each * character stored from window vw. Each character will * be passed in integer form as the only parameter. A value of -1 * will be passed on the last call to indicate the end of the data. */ void VGdumpstore(short vw, short (*func )(short)) { short data; TEKSTOREP st; if (VGcheck(vw)) { return; } st = VGstore[vw]; topTEKstore(st); while ((data = nextTEKitem(st)) != -1) (*func)(data); (*func)(-1); } /* This is the main Tek emulator process. Pass it the window and * the latest input character, and it will take care of the rest. * Calls RG functions as well as local zoom and character drawing * functions. * * Modified 16jul90dsw: * Added 4105 support. */ void VGdraw(short vw, char c) /* the latest input char */ { char cmd; char value; char goagain; /* true means go thru the function a second time */ char temp[80]; RgnHandle PanelRgn; struct VGWINTYPE *vp; pointlist temppoint; if (VGcheck(vw)) { return; } vp = VGwin[vw]; /* BYU */ temp[0] = c; temp[1] = (char) 0; /*** MAIN LOOP ***/ do { c &= 0x7f; /* BYU 2.4.15 */ cmd = (c >> 5) & 0x03; value = c & 0x1f; goagain = FALSE; switch(state[vw]) { case HIY: /* beginning of a vector */ vp->nhiy = vp->hiy; vp->nhix = vp->hix; vp->nloy = vp->loy; vp->nlox = vp->lox; vp->ney = vp->ey; vp->nex = vp->ex; switch(cmd) { case 0: if (value == 27) /* escape sequence */ { state[vw] = ESCOUT; savstate[vw] = HIY; } else if (value < 27) /* ignore */ { break; } else { state[vw] = CANCEL; goagain = TRUE; } break; case 1: /* hiy */ vp->nhiy = value; state[vw] = EXTRA; break; case 2: /* lox */ vp->nlox = value; state[vw] = DONE; break; case 3: /* extra or loy */ vp->nloy = value; state[vw] = LOY; break; } break; case ESCOUT: if ((value != 13) && (value != 10) && (value != 27) && (value != '~')) { state[vw] = savstate[vw]; /* skip all EOL-type characters */ goagain = TRUE; } break; case EXTRA: /* got hiy; expecting extra or loy */ switch(cmd) { case 0: if (value == 27) /* escape sequence */ { state[vw] = ESCOUT; savstate[vw] = EXTRA; } else if (value < 27) /* ignore */ { break; } else { state[vw] = DONE; goagain = TRUE; } break; case 1: /* hix */ vp->nhix = value; state[vw] = LOX; break; case 2: /* lox */ vp->nlox = value; state[vw] = DONE; break; case 3: /* extra or loy */ vp->nloy = value; state[vw] = LOY; break; } break; case LOY: /* got extra or loy; next may be loy or something else */ switch(cmd) { case 0: if (value == 27) /* escape sequence */ { state[vw] = ESCOUT; savstate[vw] = LOY; } else if (value < 27) /* ignore */ { break; } else { state[vw] = DONE; goagain = TRUE; } break; case 1: /* hix */ vp->nhix = value; state[vw] = LOX; break; case 2: /* lox */ vp->nlox = value; state[vw] = DONE; break; case 3: /* this is loy; previous loy was really extra */ vp->ney = (vp->nloy >> 2) & 3; vp->nex = vp->nloy & 3; vp->nloy = value; state[vw] = HIX; break; } break; case HIX: /* hix or lox */ switch(cmd) { case 0: if (value == 27) /* escape sequence */ { state[vw] = ESCOUT; savstate[vw] = HIX; } else if (value < 27) /* ignore */ { break; } else { state[vw] = DONE; goagain = TRUE; } break; case 1: /* hix */ vp->nhix = value; state[vw] = LOX; break; case 2: /* lox */ vp->nlox = value; state[vw] = DONE; break; } break; case LOX: /* must be lox */ switch(cmd) { case 0: if (value == 27) /* escape sequence */ { state[vw] = ESCOUT; savstate[vw] = LOX; } else if (value < 27) /* ignore */ { break; } else { state[vw] = DONE; goagain = TRUE; } break; case 2: vp->nlox = value; state[vw] = DONE; break; } break; case ENTERVEC: if (c == 7) vp->mode = DRAW; if (c < 32) { state[vw] = DONE; goagain = TRUE; vp->mode = DONE; break; } state[vw] = HIY; vp->mode = TEMPMOVE; vp->modesave = DRAW; goagain = TRUE; break; case RS: switch (c) { case ' ': /* pen up */ vp->modesave = vp->mode; vp->mode = TEMPMOVE; break; case 'P': /* pen down */ vp->mode = DRAW; break; case 'D': /* move up */ vp->cury++; break; case 'E': vp->cury++; vp->curx++; break; case 'A': vp->curx++; break; case 'I': vp->curx++; vp->cury--; break; case 'H': vp->cury--; break; case 'J': vp->curx--; vp->cury--; break; case 'B': vp->curx--; break; case 'F': vp->cury++; vp->curx--; break; case 27: savstate[vw] = RS; state[vw] = ESCOUT; break; default: /* storexy(vw,vp->curx,vp->cury);*/ state[vw] = CANCEL; goagain = TRUE; break; } if (vp->mode == DRAW) clipvec(vw,vp->curx,vp->cury,vp->curx,vp->cury); break; case CMD0: /* *->CMD0: get 1st letter of cmd */ switch(c) { case 29: /* GS, start draw */ state[vw] = DONE; goagain = TRUE; break; case '%': state[vw] = TERMSTAT; break; case '8': fontnum(vw,0); state[vw] = DONE; break; case '9': fontnum(vw,1); state[vw] = DONE; break; case ':': fontnum(vw,2); state[vw] = DONE; break; case ';': fontnum(vw,3); state[vw] = DONE; break; case 12: /* form feed = clrscr */ if (screens[findbyVS(vp->theVS)].tekclear) { VGpage(vw); VGclrstor(vw); } break; case 'L': state[vw] = SOMEL; break; case 'K': state[vw] = IGNORE; break; case 'M': state[vw] = SOMEM; break; case 'R': state[vw] = SOMER; break; case 'T': state[vw] = SOMET; break; case 26: (*RG[vp->RGdevice].gin)(vp->RGnum); TEKunstore(VGstore[vw]); TEKunstore(VGstore[vw]); break; case 10: case 13: case 27: case '~': savstate[vw] = DONE; state[vw] = ESCOUT; break; /* completely ignore these after ESC */ default: state[vw] = DONE; } break; case TERMSTAT: switch(c) { case '!': state[vw] = INTEGER; /* Drop the next integer */ savstate[vw] = DONE; break; } break; case SOMER: switch(c) { case 'A': state[vw] = INTEGER; savstate[vw] = VIEWAT; break; default: state[vw] = DONE; } break; case VIEWAT: state[vw] = INTEGER; savstate[vw] = VIEWAT2; goagain = TRUE; break; case VIEWAT2: vp->TEKBackground = vp->intin < 0 ? 0 : vp->intin > 7 ? 7 : vp->intin; state[vw] = INTEGER; savstate[vw] = DONE; goagain = TRUE; break; case SOMET: /* Got ESC T; now handle 3rd char. */ switch(c) { case 'C': /* GCURSOR */ vp->intin = 3; state[vw] = STARTDISC; break; case 'D': vp->intin = 2; state[vw] = STARTDISC; break; case 'F': /* set dialog area color map */ state[vw] = JUNKARRAY; break; case 'G': /* set surface color map */ state[vw] = INTEGER; savstate[vw] = JUNKARRAY; break; default: state[vw] = DONE; } break; case JUNKARRAY: /* This character is the beginning of an integer array to be discarded. Get array size. */ savstate[vw] = STARTDISC; state[vw] = INTEGER; break; case STARTDISC: /* Begin discarding integers. */ vp->count = vp->intin + 1; goagain = TRUE; state[vw] = DISCARDING; break; case DISCARDING: /* We are in the process of discarding an integer array. */ goagain = TRUE; if (!(--(vp->count))) state[vw] = DONE; else if (vp->count == 1) { state[vw] = INTEGER; savstate[vw] = DONE; } else { state[vw] = INTEGER; savstate[vw] = DISCARDING; } break; case INTEGER: if (c & 0x40) { vp->intin = c & 0x3f; state[vw] = INTEGER1; } else { vp->intin = c & 0x0f; if (!(c & 0x10)) vp->intin *= -1; state[vw] = savstate[vw]; } break; case INTEGER1: if (c & 0x40) { vp->intin = (vp->intin << 6) | (c & 0x3f); state[vw] = INTEGER2; } else { vp->intin = (vp->intin << 4) | (c & 0x0f); if (!(c & 0x10)) vp->intin *= -1; state[vw] = savstate[vw]; } break; case INTEGER2: vp->intin = (vp->intin << 4) | (c & 0x0f); if (!(c & 0x10)) vp->intin *= -1; state[vw] = savstate[vw]; break; case IGNORE: /* ignore next char; it's not supported */ state[vw] = DONE; break; case IGNORE2: /* ignore next 2 chars */ state[vw] = IGNORE; break; case SOMEL: /* now process 2nd letter */ switch(c) { case 'E': /* END PANEL 25jul90dsw */ if (vp->TEKtype) { if (vp->TEKPanel) { if ((vp->current->x != vp->savx) || (vp->current->y != vp->savy)) { temppoint = (pointlist) myNewPtr(sizeof(point)); temppoint->x = vp->savx; temppoint->y = vp->savy; temppoint->next = (pointlist) NULL; vp->current->next = temppoint; } temppoint = vp->current = vp->TEKPanel; vp->savx = vp->curx = vp->current->x; vp->savy = vp->cury = vp->current->y; vp->current = vp->current->next; DisposPtr((Ptr) temppoint); PanelRgn = NewRgn(); OpenRgn(); while (vp->current) { clipvec(vw,vp->curx,vp->cury, vp->current->x,vp->current->y); temppoint = vp->current; vp->curx = vp->current->x; vp->cury = vp->current->y; vp->current = vp->current->next; DisposPtr((Ptr) temppoint); } CloseRgn(PanelRgn); if (vp->TEKPattern <= 0) (*RG[vp->RGdevice].pencolor)(vp->RGnum,-vp->TEKPattern); PaintRgn(PanelRgn); /* if (vp->TEKOutline) FrameRgn(PanelRgn); */ DisposeRgn(PanelRgn); (*RG[vp->RGdevice].pencolor)(vp->RGnum,vp->pencolor); vp->TEKPanel = (pointlist) NULL; vp->curx = vp->savx; vp->cury = vp->savy; } } state[vw] = DONE; break; case 'F': /* MOVE */ vp->modesave = vp->mode; vp->mode = TEMPMOVE; state[vw] = HIY; break; case 'G': /* DRAW */ vp->modesave = vp->mode; vp->mode = TEMPDRAW; state[vw] = HIY; break; case 'H': /* MARKER */ vp->modesave = vp->mode; vp->mode = TEMPMARK; state[vw] = HIY; break; case 'I': /* DAINDEX 24jul90dsw*/ state[vw] = STARTDISC; vp->intin = 3; break; case 'L': state[vw] = INTEGER; savstate[vw] = DONE; break; case 'P': /* BEGIN PANEL 17jul90dsw */ if (vp->TEKtype) /* 4105 only */ { state[vw] = HIY; vp->mode = PANEL; } else state[vw] = DONE; break; case 'T': /* GTEXT 17jul90dsw */ if (vp->TEKtype) /* 4105 only */ { savstate[vw] = GTEXT; state[vw] = INTEGER; } else state[vw] = DONE; break; default: state[vw] = DONE; } break; case SOMEM: switch(c) { case 'C': /* set graphtext size */ savstate[vw] = GTSIZE0; state[vw] = INTEGER; break; case 'L': /* set line index */ savstate[vw] = COLORINT; state[vw] = INTEGER; break; case 'M': /* MARKERTYPE 17jul90dsw */ if (vp->TEKtype) { savstate[vw] = MARKER; state[vw] = INTEGER; } else state[vw] = DONE; break; case 'N': /* GTPATH 17jul90dsw */ if (vp->TEKtype) { savstate[vw] = GTPATH; state[vw] = INTEGER; } else state[vw] = DONE; break; case 'P': /* FillPattern 17jul90dsw */ if (vp->TEKtype) { savstate[vw] = FPATTERN; state[vw] = INTEGER; } else state[vw] = DONE; break; case 'R': /* GTROT 17jul90dsw */ if (vp->TEKtype) { savstate[vw] = GTROT; state[vw] = INTEGER; } else state[vw] = DONE; break; case 'T': /* GTINDEX 17jul90dsw */ if (vp->TEKtype) { savstate[vw] = GTINDEX; state[vw] = INTEGER; } else state[vw] = DONE; break; case 'V': if (vp->TEKtype) { state[vw] = INTEGER; savstate[vw] = DONE; } else state[vw] = DONE; break; default: state[vw] = DONE; } break; case COLORINT: /* set line index; have integer */ vp->pencolor = vp->intin; (*RG[vp->RGdevice].pencolor)(vp->RGnum,vp->intin); state[vw] = CANCEL; goagain = TRUE; /* we ignored current char; now process it */ break; case GTSIZE0: /* discard the first integer; get the 2nd */ state[vw] = INTEGER; /* get the important middle integer */ savstate[vw] = GTSIZE1; goagain = TRUE; break; case GTSIZE1: /* integer is the height */ if (vp->TEKtype) { if (vp->intin < 88) vp->TEKSize = 1; else if ((vp->intin > 87) && (vp->intin < 149)) vp->TEKSize = 2; else if ((vp->intin > 148) && (vp->intin < 209)) vp->TEKSize = 3; else if (vp->intin > 208) vp->TEKSize = vp->intin / 61; VGwin[vw]->charx = (vp->TEKSize * 52); VGwin[vw]->chary = (vp->TEKSize * 64); } else { if (vp->intin < 88) fontnum(vw,0); else if (vp->intin < 149) fontnum(vw,4); else fontnum(vw,5); } state[vw] = INTEGER; /* discard last integer */ savstate[vw] = DONE; goagain = TRUE; break; case GTEXT: /* TEK4105 GraphText output. 17jul90dsw */ if (vp->intin > 0) { drawc(vw,(short) c); /* Draw the character */ vp->intin--; /* One less character in the string... */ } else { goagain = TRUE; state[vw] = DONE; newcoord(vw); } break; case MARKER: /* TEK4105 Set marker type. 17jul90dsw */ vp->TEKMarker = vp->intin; if (vp->TEKMarker > 10) vp->TEKMarker = 10; if (vp->TEKMarker < 0) vp->TEKMarker = 0; state[vw] = DONE; goagain = TRUE; break; case GTPATH: vp->TEKPath = vp->intin; state[vw] = DONE; goagain = TRUE; break; case FPATTERN: vp->TEKPattern = (vp->intin < -7) ? -7 : (vp->intin > 149) ? 149 : vp->intin; state[vw] = DONE; goagain = TRUE; break; case GTROT: vp->TEKRot = vp->intin; state[vw] = INTEGER; savstate[vw] = GTROT1; goagain = TRUE; break; case GTROT1: vp->TEKRot = (vp->TEKRot) << (vp->intin); vp->TEKRot = ((vp->TEKRot + 45) / 90) * 90; state[vw] = DONE; goagain = TRUE; break; case GTINDEX: vp->TEKIndex = (vp->intin < 0) ? 0 : (vp->intin > 7) ? 7 : vp->intin; state[vw] = DONE; goagain = TRUE; break; case PANEL: vp->TEKOutline = (vp->intin == 0) ? 0 : 1; temppoint = (pointlist) myNewPtr(sizeof(point)); if (vp->TEKPanel) { if ((vp->current->x != vp->savx) && (vp->current->y != vp->savy)) { temppoint->x = vp->savx; temppoint->y = vp->savy; vp->current->next = temppoint; vp->current = temppoint; temppoint = (pointlist) myNewPtr(sizeof(point)); } vp->current->next = temppoint; } else vp->TEKPanel = temppoint; vp->current = temppoint; vp->current->x = vp->savx = joinup(vp->nhix,vp->nlox,vp->nex); vp->current->y = vp->savy = joinup(vp->nhiy,vp->nloy,vp->ney); vp->current->next = (pointlist) NULL; state[vw] = INTEGER; savstate[vw] = PANEL; vp->mode = DONE; newcoord(vw); state[vw] = DONE; goagain = TRUE; break; case DONE: /* ready for anything */ switch(c) { case 31: /* US - enter ALPHA mode */ vp->mode = ALPHA; state[vw] = CANCEL; break; case 30: state[vw] = RS; break; case 28: vp->mode = MARK; state[vw] = HIY; break; case 29: /* GS - enter VECTOR mode */ state[vw] = ENTERVEC; break; case 27: state[vw] = CMD0; break; default: if (vp->mode == ALPHA) { state[vw] = DONE; if (! vp->TEKtype) drawc(vw,(short) c); else { VSwrite(vp->theVS,&c,1); TEKunstore(VGstore[vw]); } return; } else if ((vp->mode == DRAW) && cmd) { state[vw] = HIY; goagain = TRUE; } else if ((vp->mode == MARK) && cmd) { state[vw] = HIY; goagain = TRUE; } else if ((vp->mode == DRAW) && ((c == 13) || (c == 10))) { /* break drawing mode on CRLF */ vp->mode = ALPHA; state[vw] = CANCEL; } else { state[vw] = DONE; /* do nothing */ return; } } } if (state[vw] == DONE) { if (vp->mode == PANEL) { vp->mode = DONE; state[vw] = INTEGER; savstate[vw] = PANEL; } else if ((vp->TEKPanel) && ((vp->mode == DRAW) || (vp->mode == TEMPDRAW) || (vp->mode == MARK) || (vp->mode == TEMPMARK) || (vp->mode == TEMPMOVE))) { temppoint = (pointlist) myNewPtr(sizeof(point)); vp->current->next = temppoint; vp->current = temppoint; vp->current->x = joinup(vp->nhix,vp->nlox,vp->nex); vp->current->y = joinup(vp->nhiy,vp->nloy,vp->ney); vp->current->next = (pointlist) NULL; if ((vp->mode == TEMPDRAW) || (vp->mode == TEMPMOVE) || (vp->mode == TEMPMARK)) vp->mode = vp->modesave; newcoord(vw); } else if (vp->mode == TEMPMOVE) { vp->mode = vp->modesave; newcoord(vw); } else if ((vp->mode == DRAW) || (vp->mode == TEMPDRAW)) { clipvec(vw,vp->curx,vp->cury, joinup(vp->nhix,vp->nlox,vp->nex), joinup(vp->nhiy,vp->nloy,vp->ney)); newcoord(vw); if (vp->mode == TEMPDRAW) vp->mode = vp->modesave; } else if ((vp->mode == MARK) || (vp->mode == TEMPMARK)) { newcoord(vw); if (vp->TEKtype) drawc(vw,127 + vp->TEKMarker); newcoord(vw); if (vp->mode == TEMPMARK) vp->mode = vp->modesave; } } if (state[vw] == CANCEL) state[vw] = DONE; } while (goagain); return; } /* Clear screen and have a few other effects: * - Return graphics to home position (0,3071) * - Switch to alpha mode * This is a standard Tek command; don't look at me. */ void VGpage(short vw) { if (VGcheck(vw)) { return; } if (VGwin[vw]->TEKtype) (*RG[VGwin[vw]->RGdevice].pencolor)(VGwin[vw]->RGnum,VGwin[vw]->TEKBackground); else (*RG[VGwin[vw]->RGdevice].pencolor)(VGwin[vw]->RGnum,0); (*RG[VGwin[vw]->RGdevice].clrscr)(VGwin[vw]->RGnum); (*RG[VGwin[vw]->RGdevice].pencolor)(VGwin[vw]->RGnum,1); VGwin[vw]->mode = ALPHA; state[vw] = DONE; VGwin[vw]->textcol = 0; fontnum(vw,0); storexy(vw,0,3071); } /* Redraw window 'vw' in pieces to window 'dest'. * Must call this function repeatedly to draw whole image. * Only draws part of the image at a time, to yield CPU power. * Returns 0 if needs to be called more, or 1 if the image * is complete. Another call would result in the redraw beginning again. * User should clear screen before beginning redraw. */ short VGpred(short vw, short dest) { short data; TEKSTOREP st; short count = 0; if (VGcheck(vw)) { return -1; } st = VGstore[vw]; if (drawing[vw]) /* wasn't redrawing */ { topTEKstore(VGstore[vw]); drawing[vw] = 0; /* redraw incomplete */ } while (++count < PREDCOUNT && ((data = nextTEKitem(st)) != -1)) VGdraw(dest,data); if (data == -1) drawing[vw] = 1; /* redraw complete */ return(drawing[vw]); } /* Abort VGpred redrawing of specified window. Must call this routine if you decide not to complete the redraw. */ void VGstopred(short vw) { if (VGcheck(vw)) { return; } drawing[vw] = 1; } /* Redraw the contents of window 'vw' to window 'dest'. * Does not yield CPU until done. * User should clear the screen before calling this, to avoid * a messy display. */ void VGredraw(short vw, short dest) { short data; if (VGcheck(vw)) { return; } topTEKstore(VGstore[vw]); while ((data = nextTEKitem(VGstore[vw])) != -1) VGdraw(dest,data); } /* Send interesting information about the virtual window down to * its RG, so that the RG can make VG calls and display zoom values */ void VGgiveinfo(short vw) { if (VGcheck(vw)) { return; } (*RG[VGwin[vw]->RGdevice].info)(VGwin[vw]->RGnum, vw, VGwin[vw]->winbot, VGwin[vw]->winleft, VGwin[vw]->wintop, VGwin[vw]->winright); } /* Set new borders for zoom/pan region. * x0,y0 is lower left; x1,y1 is upper right. * User should redraw after calling this. */ void VGzoom(short vw, short x0, short y0, short x1, short y1) { if (VGcheck(vw)) { return; } VGwin[vw]->winbot = y0; VGwin[vw]->winleft = x0; VGwin[vw]->wintop = y1; VGwin[vw]->winright = x1; VGwin[vw]->wintall = y1 - y0 + 1; VGwin[vw]->winwide = x1 - x0 + 1; VGgiveinfo(vw); } void VGwhatzoom(short vw, short *px0, short *py0, short *px1, short *py1) { if (VGcheck(vw)) { return; } *py0 = VGwin[vw]->winbot; *px0 = VGwin[vw]->winleft; *py1 = VGwin[vw]->wintop; *px1 = VGwin[vw]->winright; } /* Set zoom/pan borders for window 'dest' equal to those for window 'src'. * User should redraw window 'dest' after calling this. */ void VGzcpy(short src, short dest) { VGzoom(dest,VGwin[src]->winleft, VGwin[src]->winbot, VGwin[src]->winright, VGwin[src]->wintop); } /* Close virtual window. /* Draw the data pointed to by 'data' of length 'count' * on window vw, and add it to the store for that window. * This is THE way for user program to pass Tektronix data. */ short VGwrite(short vw, char *data, short count) { char *c = data; char *end = &(data[count]); char storeit; if (VGcheck(vw)) { return -1; } storeit = storing[vw]; while (c != end) { if (*c == 24) /* ASC CAN character */ return(c-data+1); if (storeit) addTEKstore(VGstore[vw],*c); VGdraw(vw,*c++); } return(count); } /* Return a pointer to a human-readable string * which describes the specified real device */ char * VGrgname(short rgdev) { return(*RG[rgdev].devname)(); } /* Put the specified real device into text mode */ void VGtmode(short rgdev) { (*RG[rgdev].tmode)(); } /* Translate data for output as GIN report. * * User indicates VW number and x,y coordinates of the GIN cursor. * Coordinate space is 0-4095, 0-4095 with 0,0 at the bottom left of * the real window and 4095,4095 at the upper right of the real window. * 'c' is the character to be returned as the keypress. * 'a' is a pointer to an array of 5 characters. The 5 chars must * be transmitted by the user to the remote host as the GIN report. */ void VGgindata( short vw, unsigned short x, /* NCSA: SB - UNSIGNED data */ unsigned short y, /* NCSA: SB - " " */ char c, char *a) { long x2,y2; if (VGcheck(vw)) { return; } x2 = ((x * VGwin[vw]->winwide) / INXMAX + VGwin[vw]->winleft) >> 2; y2 = ((y * VGwin[vw]->wintall) / INYMAX + VGwin[vw]->winbot) >> 2; a[0] = c; a[1] = 0x20 | ((x2 & 0x03E0) >> 5); a[2] = 0x20 | (x2 & 0x001F); a[3] = 0x20 | ((y2 & 0x03E0) >> 5); a[4] = 0x20 | (y2 & 0x001F); } \ No newline at end of file diff --git a/source/tek/vgtek.proto.h b/source/tek/vgtek.proto.h new file mode 100755 index 0000000..c9e4202 --- /dev/null +++ b/source/tek/vgtek.proto.h @@ -0,0 +1 @@ + /* vgtek.c */ void TEKMAINunload(void); short donothing(void); short drawc(short vw, short c); void VGinit(void); short VGdevice(short vw, short dev); short VGnewwin(short device, short theVS); void VGclrstor(short vw); void VGdumpstore(short vw, short (*func )(short)); void VGdraw(short vw, char c); void VGpage(short vw); short VGpred(short vw, short dest); void VGstopred(short vw); void VGredraw(short vw, short dest); void VGgiveinfo(short vw); void VGzoom(short vw, short x0, short y0, short x1, short y1); void VGwhatzoom(short vw, short *px0, short *py0, short *px1, short *py1); void VGzcpy(short src, short dest); void VGclose(short vw); short VGwrite(short vw, char *data, short count); char *VGrgname(short rgdev); void VGtmode(short rgdev); void VGgindata(short vw, unsigned short x, unsigned short y, char c, char *a); short VGgetVS(short theVGnum); \ No newline at end of file diff --git a/source/telnet.68k.r b/source/telnet.68k.r new file mode 100644 index 0000000..a93160d --- /dev/null +++ b/source/telnet.68k.r @@ -0,0 +1,11 @@ +data 'vers' (1) { + $"0122 8000 0000 0531 2E32 2E32 2131 2E32" /* ."....1.2.2!1.2 */ + $"2E32 2036 386B 2043 5731 3020 284F 6374" /* .2 68k CW10 (Oct */ + $"6F62 6572 2032 392C 2031 3939 3729" /* ober 29, 1997) */ +}; + +data 'vers' (2) { + $"0122 8000 0000 0531 2E32 2E32 1242 6574" /* ."....1.2.2.Bet */ + $"7465 7254 656C 6E65 7420 312E 322E 32" /* terTelnet 1.2.2 */ +}; + diff --git a/source/telnet.ppc.r b/source/telnet.ppc.r new file mode 100644 index 0000000..17f57d2 --- /dev/null +++ b/source/telnet.ppc.r @@ -0,0 +1,11 @@ +data 'vers' (1) { + $"0122 8000 0000 0531 2E32 2E32 2131 2E32" /* ."....1.2.2!1.2 */ + $"2E32 2050 5043 2043 5731 3020 284F 6374" /* .2 PPC CW10 (Oct */ + $"6F62 6572 2032 392C 2031 3939 3729" /* ober 29, 1997) */ +}; + +data 'vers' (2) { + $"0122 8000 0000 0531 2E32 2E32 1242 6574" /* ."....1.2.2.Bet */ + $"7465 7254 656C 6E65 7420 312E 322E 32" /* terTelnet 1.2.2 */ +}; + diff --git a/source/telnet.r b/source/telnet.r new file mode 100644 index 0000000..4ae5c24 --- /dev/null +++ b/source/telnet.r @@ -0,0 +1,7582 @@ +data 'aete' (0) { + $"0100 0000 0000 0002 0E52 6571 7569 7265" /* .........Require */ + $"6420 5375 6974 652C 4576 656E 7473 2074" /* d Suite,Events t */ + $"6861 7420 6576 6572 7920 6170 706C 6963" /* hat every applic */ + $"6174 696F 6E20 7368 6F75 6C64 2073 7570" /* ation should sup */ + $"706F 7274 7265 7164 0001 0001 0000 0000" /* portreqd........ */ + $"0000 0000 0955 524C 2053 7569 7465 2C53" /* ....URL Suite,S */ + $"7461 6E64 6172 6420 5375 6974 6520 666F" /* tandard Suite fo */ + $"7220 556E 6966 6F72 6D20 5265 736F 7572" /* r Uniform Resour */ + $"6365 204C 6F63 6174 6F72 7300 4755 524C" /* ce Locators.GURL */ + $"0001 0001 0001 0667 6574 7572 6C2B 4F70" /* .......geturl+Op */ + $"656E 2061 2074 656C 6E65 7420 636F 6E6E" /* en a telnet conn */ + $"6563 7469 6F6E 2073 7065 6369 6669 6564" /* ection specified */ + $"2062 7920 6120 5552 4C00 4755 524C 4755" /* by a URL.GURLGU */ + $"524C 7368 6F72 0B72 6573 756C 7420 636F" /* RLshor.result co */ + $"6465 0000 5445 5854 0C61 2074 656C 6E65" /* de..TEXT.a telne */ + $"7420 5552 4C00 0000 0000 0000 0000 0000" /* t URL........... */ +}; + +data 'ALRT' (200, "Low Memory Alert", preload) { + $"0028 0028 0093 01C2 00C8 5555 0065" /* .(.(...UU.e */ +}; + +data 'ALRT' (259, "My IP Number ALRT") { + $"0028 0028 0096 012C 0103 4444 300A" /* .(.(..,..DD0 */ +}; + +data 'CNTL' (130, "Small WFONT button") { + $"0081 0132 0091 017D 0000 0100 0001 0000" /* ..2..}........ */ + $"000A 0000 07C7 00" /* ..... */ +}; + +data 'CNTL' (131, "Large WFONT Checkbox") { + $"00FE 0060 010E 0179 0000 0100 0001 0000" /* ..`...y........ */ + $"0009 0000 07C7 00" /* ..... */ +}; + +data 'CNTL' (132, "Small WFONT Checkbox") { + $"0096 005F 00A6 00D9 0000 0100 0001 0000" /* .._.......... */ + $"0009 0000 07C7 00" /* ..... */ +}; + +data 'CNTL' (133, "Large WFONT button") { + $"00FE 0060 010E 0140 0000 0100 0001 0000" /* ..`...@........ */ + $"000A 0000 07C7 00" /* ..... */ +}; + +data 'CNTL' (1000, "Tabs (Terminals)") { + $"0004 0004 0014 0140 0001 0100 0004 00D2" /* .......@....... */ + $"4550 0000 0000 1C54 6572 6D69 6E61 6C0D" /* EP.....Terminal. */ + $"4B65 7962 6F61 7264 0D46 6F6E 740D 436F" /* Keyboard.Font.Co */ + $"6C6F 72" /* lor */ +}; + +data 'CNTL' (128) { + $"0000 0000 0000 0000 0000 0100 0000 0000" /* ................ */ + $"0000 0000 0000 00" /* ....... */ +}; + +data 'CNTL' (1001, "Tabs (Favorites)") { + $"0004 0004 0014 0140 0001 0100 0004 00D2" /* .......@....... */ + $"4550 0000 0000 2147 656E 6572 616C 0D4E" /* EP....!General.N */ + $"6574 776F 726B 0D54 6572 6D69 6E61 6C0D" /* etwork.Terminal. */ + $"5365 6375 7269 7479" /* Security */ +}; + +data 'crsr' (129) { + $"8001 0000 0060 0000 0092 0000 0000 0000" /* ....`......... */ + $"0000 0000 0000 0000 0000 FFFF FFEF FFE7" /* .......... */ + $"F803 FFE7 FFEF FFFF FFFF FFFF FFFF FFFF" /* . */ + $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* .......... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"0000 0000 0003 0001 0000 0000 0000 0000" /* ................ */ + $"0000 0000 8004 0000 0000 0010 0010 0000" /* ............... */ + $"0000 0000 0000 0048 0000 0048 0000 0000" /* .......H...H.... */ + $"0002 0001 0002 0000 0000 0000 00D2 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 FFFF" /* .............. */ + $"FFFF FFFF FDFF FFFF FD7F FFD5 555F FFFF" /* .U_ */ + $"FD7F FFFF FDFF FFFF FFFF FFFF FFFF FFFF" /* . */ + $"FFFF FFFF FFFF FFFF FFFF 0000 0000 0000" /* ...... */ + $"0000 0000 0000 0000 0002 0000 FFFF FFFF" /* ............ */ + $"FFFF 0001 FC00 F37D 052F 0003 0000 0000" /* ...}./...... */ + $"0000" /* .. */ +}; + +data 'crsr' (130) { + $"8001 0000 0060 0000 0092 0000 0000 0000" /* ....`......... */ + $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* .......... */ + $"FFFF FFFF F7FF E7FF C01F E7FF F7FF FFFF" /* . */ + $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* .......... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"0000 0000 0003 0001 0000 0000 0000 0000" /* ................ */ + $"0000 0000 8004 0000 0000 0010 0010 0000" /* ............... */ + $"0000 0000 0000 0048 0000 0048 0000 0000" /* .......H...H.... */ + $"0002 0001 0002 0000 0000 0000 00D2 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 FFFF" /* .............. */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FF7F FFFF FD7F FFFF F555 57FF FD7F" /* ..UW. */ + $"FFFF FF7F FFFF FFFF FFFF 0000 0000 0000" /* ....... */ + $"0000 0000 0000 0000 0002 0000 FFFF FFFF" /* ............ */ + $"FFFF 0001 FC00 F37D 052F 0003 0000 0000" /* ...}./...... */ + $"0000" /* .. */ +}; + +data 'crsr' (131) { + $"8001 0000 0060 0000 0092 0000 0000 0000" /* ....`......... */ + $"0000 0000 0000 0000 0000 FFFF FFFF FC3F" /* ..........? */ + $"FBDF FBDF F00F F00F F00F F00F FFFF FFFF" /* .... */ + $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* .......... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"0000 0000 0008 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 8004 0000 0000 0010 0010 0000" /* ............... */ + $"0000 0000 0000 0048 0000 0048 0000 0000" /* .......H...H.... */ + $"0002 0001 0002 0000 0000 0000 00D2 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 FFFF" /* .............. */ + $"FFFF FFFF FFFF FFFD 7FFF FFF7 DFFF FFF7" /* . */ + $"DFFF FFD5 57FF FFD5 57FF FFD5 57FF FFD5" /* WWW */ + $"57FF FFFF FFFF FFFF FFFF 0000 0000 0000" /* W...... */ + $"0000 0000 0000 0000 0002 0000 FFFF FFFF" /* ............ */ + $"FFFF 0001 FC00 F37D 052F 0003 0000 0000" /* ...}./...... */ + $"0000" /* .. */ +}; + +data 'CURS' (256, "CPos", purgeable, preload) { + $"0000 0000 0FE0 0FE0 0FE0 0FE0 0FE0 0FE0" /* .......... */ + $"0FE0 0FE0 0FE0 0FE0 0FE0 0FE0 0000 0000" /* .......... */ + $"0000 0000 0FE0 0820 0820 0820 0820 0820" /* ...... . . . . */ + $"0820 0820 0820 0820 0820 0FE0 0000 0000" /* . . . . . ..... */ + $"0007 000A" /* ... */ +}; + +data 'CURS' (257, "Graphics", purgeable, preload) { + $"0000 0080 0000 0080 0000 0080 0000 2AAA" /* ...........* */ + $"0000 0080 0000 0080 0000 0080 0000 0000" /* ............. */ + $"0000 0100 0000 0100 0000 0100 0000 5554" /* ..............UT */ + $"0000 0100 0000 0100 0000 0100 0000 0000" /* ................ */ + $"0007 0008" /* .... */ +}; + +data 'CURS' (268, "Debug", purgeable, preload) { + $"0000 0000 0000 0188 13D0 0BD0 07E0 0420" /* ........... */ + $"1E78 0660 0660 0C30 0BD0 1BD8 1008 0000" /* .x.`.`.0...... */ + $"0000 0000 0000 0188 13D0 0BD0 07E0 07E0" /* ........... */ + $"1FF8 07E0 07E0 0FF0 0BD0 1BD8 1008 0000" /* .......... */ + $"0003 0007" /* .... */ +}; + +data 'CURS' (290, "Xfer in progress", purgeable, preload) { + $"0000 0000 0FC0 0820 0B90 0808 0B68 0808" /* ...... ....h.. */ + $"0AC8 0808 0BA8 0808 0808 0FF8 0000 0000" /* ............ */ + $"0000 0000 0FC0 0FE0 0FF0 0FF8 0FF8 0FF8" /* .......... */ + $"0FF8 0FF8 0FF8 0FF8 0FF8 0FF8 0000 0000" /* .......... */ + $"0008 0006" /* .... */ +}; + +data 'dctb' (500) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (1001, purgeable) { + $"0000 0000 0000 FFFF" /* ...... */ +}; + +data 'dctb' (7001) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (7003, "Terminal Config", purgeable) { + $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (290) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (7004) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (280) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (1002) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (150) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (151) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (130) { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (8000, "OTP Password Entry") { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'dctb' (259, "My IP Number") { + $"0000 0000 0000 0004 0000 FFFF FFFF FFFF" /* .......... */ + $"0001 0000 0000 0000 0002 0000 0000 0000" /* ................ */ + $"0003 0000 0000 0000 0004 FFFF FFFF FFFF" /* .......... */ +}; + +data 'DITL' (128, "Resolver Error", purgeable) { + $"0001 0000 0000 0076 0119 008A 0153 0402" /* .......v....S.. */ + $"4F4B 0000 0000 0013 0023 0043 014A 8842" /* OK.......#.C.JB */ + $"556E 6162 6C65 2074 6F20 6F70 656E 204D" /* Unable to open M */ + $"6163 5443 5027 7320 444E 5320 7265 736F" /* acTCP's DNS reso */ + $"6C76 6572 2E20 2044 6F6D 6169 6E20 6E61" /* lver. Domain na */ + $"6D65 7320 7769 6C6C 206E 6F74 2077 6F72" /* mes will not wor */ + $"6B2E" /* k. */ +}; + +data 'DITL' (129, "FTP Info", purgeable) { + $"0006 0000 0000 006D 0026 0081 0060 0402" /* .......m.&..`.. */ + $"4F4B 0000 0000 0025 004D 0038 0115 9009" /* OK.....%.M.8.. */ + $"4564 6974 2054 6578 7461 0000 0000 0027" /* Edit Texta.....' */ + $"0005 0038 003A 8805 6E61 6D65 3A64 0000" /* ...8.:.name:d.. */ + $"0000 004C 0051 0061 011A 9009 4564 6974" /* ...L.Q.a..Edit */ + $"2054 6578 7461 0000 0000 004D 0003 005D" /* Texta.....M...] */ + $"004E 8809 7061 7373 776F 7264 3A6C 0000" /* .Npassword:l.. */ + $"0000 0007 001C 001B 011B 881E 506C 6561" /* ...........Plea */ + $"7365 2045 6E74 6572 204E 616D 6520 616E" /* se Enter Name an */ + $"6420 5061 7373 776F 7264 0000 0000 006E" /* d Password.....n */ + $"0096 0082 00D0 0406 4361 6E63 656C" /* .....Cancel */ +}; + +data 'DITL' (160, "FatalCancelAlert", purgeable) { + $"0003 0000 0000 0074 0120 0088 015A 0400" /* .......t. ..Z.. */ + $"0000 0000 0074 00DE 0088 0118 0404 5175" /* .....t......Qu */ + $"6974 0000 0000 0004 000A 0024 002A A002" /* it........$.*. */ + $"0000 0000 0000 0004 0038 006C 015A 8825" /* .........8.l.Z% */ + $"5E30 0D49 6E74 6572 6E61 6C20 6572 726F" /* ^0.Internal erro */ + $"7220 235E 310D 4D61 634F 5320 6572 726F" /* r #^1.MacOS erro */ + $"7220 235E 3200" /* r #^2. */ +}; + +data 'DITL' (170, "FatalAlert", purgeable) { + $"0002 0000 0000 0074 0120 0088 015A 0404" /* .......t. ..Z.. */ + $"5175 6974 0000 0000 0004 000A 0024 002A" /* Quit........$.* */ + $"A002 0000 0000 0000 0004 0038 006C 015A" /* ..........8.l.Z */ + $"8825 5E30 0D49 6E74 6572 6E61 6C20 6572" /* %^0.Internal er */ + $"726F 7220 235E 310D 4D61 634F 5320 6572" /* ror #^1.MacOS er */ + $"726F 7220 235E 3200" /* ror #^2. */ +}; + +data 'DITL' (175, "Operation Failed Alert", purgeable) { + $"0002 0000 0000 0074 0120 0088 015A 0402" /* .......t. ..Z.. */ + $"4F4B 0000 0000 0004 000A 0024 002A A002" /* OK........$.*. */ + $"0000 0000 0000 0004 0038 006C 015A 8850" /* .........8.l.ZP */ + $"5468 6174 206F 7065 7261 7469 6F6E 2063" /* That operation c */ + $"616E 6E6F 7420 6265 2063 6F6D 706C 6574" /* annot be complet */ + $"6564 2062 6563 6175 7365 205E 300D 496E" /* ed because ^0.In */ + $"7465 726E 616C 2065 7272 6F72 2023 5E31" /* ternal error #^1 */ + $"0D4D 6163 4F53 2065 7272 6F72 2023 5E32" /* .MacOS error #^2 */ +}; + +data 'DITL' (180, "AlertAskUser", purgeable) { + $"0003 0000 0000 005E 00F8 0072 0132 0406" /* .......^..r.2.. */ + $"4361 6E63 656C 0000 0000 005E 00A5 0072" /* Cancel.....^..r */ + $"00DF 0402 4F4B 0000 0000 000B 000E 002B" /* ...OK.........+ */ + $"002E A002 0000 0000 0000 000B 0038 0056" /* ............8.V */ + $"0132 8802 5E30" /* .2.^0 */ +}; + +data 'DITL' (190, "Change Window Title", purgeable) { + $"0003 0000 0000 002E 00CE 0042 0108 0402" /* ..........B.... */ + $"4F4B 0000 0000 002E 0087 0042 00C1 0406" /* OK........B... */ + $"4361 6E63 656C 0000 0000 0010 006D 001F" /* Cancel.......m.. */ + $"0104 1000 0000 0000 000F 0010 0020 0068" /* ............. .h */ + $"880F 4E65 7720 5769 6E64 6F77 204E 616D" /* .New Window Nam */ + $"6500" /* e. */ +}; + +data 'DITL' (195, "DNR Error Alert", purgeable) { + $"0002 0000 0000 0074 0120 0088 015A 0402" /* .......t. ..Z.. */ + $"4F4B 0000 0000 0004 000A 0024 002A A002" /* OK........$.*. */ + $"0000 0000 0000 0004 0038 006C 015A 8853" /* .........8.l.ZS */ + $"5468 6520 636F 6E6E 6563 7469 6F6E 2074" /* The connection t */ + $"6F20 5E30 2063 616E 6E6F 7420 6265 206F" /* o ^0 cannot be o */ + $"7065 6E65 6420 6265 6361 7573 6520 5E31" /* pened because ^1 */ + $"0D49 6E74 6572 6E61 6C20 6572 726F 7220" /* .Internal error */ + $"235E 320D 4D61 634F 5320 6572 726F 7220" /* #^2.MacOS error */ + $"235E 3300" /* #^3. */ +}; + +data 'DITL' (200, "Low Memory Alert", preload) { + $"0002 0000 0000 004F 0153 0063 018D 0402" /* .......O.S.c... */ + $"4F4B 0000 0000 0010 002E 0048 018C 8870" /* OK.........H.p */ + $"5969 6B65 7321 2020 5465 6C6E 6574 2069" /* Yikes! Telnet i */ + $"7320 7275 6E6E 696E 6720 6F75 7420 6F66" /* s running out of */ + $"206D 656D 6F72 792E 2020 4920 7375 6767" /* memory. I sugg */ + $"6573 7420 796F 7520 7175 6974 206E 6F77" /* est you quit now */ + $"2061 6E64 2069 6E63 7265 6173 6520 5465" /* and increase Te */ + $"6C6E 6574 2773 2064 6566 6175 6C74 206D" /* lnet's default m */ + $"656D 6F72 7920 7061 7274 6974 696F 6E2E" /* emory partition. */ + $"0000 0000 000F 0006 002F 0026 A002 0002" /* ........./.&... */ +}; + +data 'DITL' (259, "My IP Number", purgeable) { + $"0002 0000 0000 0050 00BE 0064 00FA 0402" /* .......P..d... */ + $"4F4B 0000 0000 000A 0048 003C 0104 880E" /* OK......H.<... */ + $"4950 2041 6464 7265 7373 3A0D 5E31 0000" /* IP Address:.^1.. */ + $"0000 000A 0014 002A 0034 A002 0001" /* ......*.4... */ +}; + +data 'DITL' (270, "Connection Status", purgeable) { + $"0003 0000 0000 0046 00FA 005A 0136 0402" /* .......F..Z.6.. */ + $"4F4B 0000 0000 0046 00B4 005A 00F0 0405" /* OK.....F..Z... */ + $"4162 6F72 7400 0000 0000 000A 0048 003C" /* Abort.......H.< */ + $"0130 0815 D25E 30D3 2069 7320 6375 7272" /* .0..^0 is curr */ + $"656E 746C 7920 5E31 2E00 0000 0000 000A" /* ently ^1....... */ + $"0014 002A 0034 A002 0002" /* ...*.4... */ +}; + +data 'DITL' (273, "setup keys", purgeable) { + $"0008 0000 0000 008E 00D8 00A2 0114 0402" /* ............. */ + $"4F4B 0000 0000 008F 007C 00A3 00B8 0406" /* OK......|.... */ + $"4361 6E63 656C 0000 0000 000E 000B 0024" /* Cancel.........$ */ + $"0146 0830 456E 7465 7220 6B65 7973 2074" /* .F.0Enter keys t */ + $"6F20 7573 652E 2020 426C 616E 6B20 656E" /* o use. Blank en */ + $"7472 6965 7320 6172 6520 6469 7361 626C" /* tries are disabl */ + $"6564 2E20 0000 0000 0064 002A 0076 0048" /* ed. .....d.*.v.H */ + $"1000 0000 0000 0064 008E 0076 00AC 1000" /* .......d..v... */ + $"0000 0000 0064 00F2 0076 0110 1000 0000" /* .....d..v...... */ + $"0000 002D 001A 0050 0060 0813 496E 7465" /* ...-...P.`..Inte */ + $"7272 7570 740D 5072 6F63 6573 7320 2000" /* rrupt.Process . */ + $"0000 0000 002D 0080 0050 00C6 080E 5375" /* .....-..P...Su */ + $"7370 656E 640D 4F75 7470 7574 0000 0000" /* spend.Output.... */ + $"002D 00E6 0050 012C 080D 5265 7375 6D65" /* .-..P.,..Resume */ + $"0D4F 7574 7075 7400" /* .Output. */ +}; + +data 'DITL' (281, "New Open Connection COPY", purgeable) { + $"000A 0000 0000 0098 00E7 00AC 0123 0407" /* .........#.. */ + $"436F 6E6E 6563 7400 0000 0000 0098 0095" /* Connect....... */ + $"00AC 00D1 0406 4361 6E63 656C 0000 0000" /* ....Cancel.... */ + $"000D 0007 001D 006F 0809 486F 7374 206E" /* .......o.Host n */ + $"616D 6500 0000 0000 000D 0073 001D 011B" /* ame........s.... */ + $"1000 0000 0000 002D 0007 003D 006F 080B" /* .......-...=.o.. */ + $"5769 6E64 6F77 204E 616D 6500 0000 0000" /* Window Name..... */ + $"002D 0073 003D 011B 1000 0000 0000 0045" /* .-.s.=.........E */ + $"0070 0059 00FE 0510 4654 5020 7365 7373" /* .p.Y...FTP sess */ + $"696F 6E20 2811 4629 0000 0000 0060 006D" /* ion (.F).....`.m */ + $"006F 00CE 8000 0000 0000 007A 006D 0089" /* .o.΀......z.m. */ + $"00CE 8000 0000 0000 0060 00D6 0074 0112" /* .΀......`..t.. */ + $"0404 4564 6974 0000 0000 007A 00D6 008E" /* ..Edit.....z.. */ + $"0112 0404 4564 6974" /* ....Edit */ +}; + +data 'DITL' (303, "Couldnt Connect", purgeable) { + $"0002 0000 0000 0005 002E 0019 00BB 0814" /* ............... */ + $"436F 756C 646E 2774 2063 6F6E 6E65 6374" /* Couldn't connect */ + $"2074 6F3A 0000 0000 001D 002E 0031 00BC" /* to:.........1. */ + $"0802 5E30 0000 0000 0035 0002 005B 00E7" /* ..^0.....5...[. */ + $"0802 5E33" /* ..^3 */ +}; + +data 'DITL' (500, "Macros", purgeable) { + $"0019 0000 0000 00E0 01A4 00F4 01E8 0402" /* ............ */ + $"4F4B 0000 0000 00E0 00A4 00F4 00E4 0406" /* OK.......... */ + $"4361 6E63 656C 0000 0000 0008 0000 0020" /* Cancel......... */ + $"0018 0402 1130 0000 0000 0030 0000 0048" /* .....0.....0...H */ + $"0018 0402 1131 0000 0000 0058 0000 0070" /* .....1.....X...p */ + $"0018 0402 1132 0000 0000 0080 0000 0098" /* .....2........ */ + $"0018 0402 1133 0000 0000 00A8 0000 00C0" /* .....3........ */ + $"0018 0402 1134 0000 0000 0008 00F8 0020" /* .....4........ */ + $"0110 0402 1135 0000 0000 0030 00F8 0048" /* .....5.....0..H */ + $"0110 0402 1136 0000 0000 0058 00F8 0070" /* .....6.....X..p */ + $"0110 0402 1137 0000 0000 0080 00F8 0098" /* .....7....... */ + $"0110 0402 1138 0000 0000 00A8 00F8 00C0" /* .....8....... */ + $"0110 0402 1139 0000 0000 0008 0020 0028" /* .....9....... .( */ + $"00E8 1000 0000 0000 0030 0020 0050 00E8" /* ........0. .P. */ + $"1000 0000 0000 0058 0020 0078 00E8 1000" /* .......X. .x... */ + $"0000 0000 0080 0020 00A0 00E8 1000 0000" /* ...... ...... */ + $"0000 00A8 0020 00C8 00E8 1000 0000 0000" /* .... ........ */ + $"0008 0118 0028 01E0 1000 0000 0000 0030" /* .....(........0 */ + $"0118 0050 01E0 1000 0000 0000 0058 0118" /* ...P........X.. */ + $"0078 01E0 1000 0000 0000 0080 0118 00A0" /* .x........... */ + $"01E0 1000 0000 0000 00A8 0118 00C8 01E0" /* ............ */ + $"1000 0000 0000 00E0 0144 00F4 0194 0409" /* ........D... */ + $"496D 706F 7274 2E2E 2E02 0000 0000 00E0" /* Import......... */ + $"00EC 00F4 013C 0409 4578 706F 7274 2E2E" /* ...<.Export.. */ + $"2E02 0000 0000 00E0 0007 00F4 007F 040F" /* .............. */ + $"5361 7665 2061 7320 4465 6661 756C 7400" /* Save as Default. */ + $"0000 0000 0000 0000 0000 0000 0104 0001" /* ................ */ + $"01F4" /* . */ +}; + +data 'DITL' (640, "Generic Errors", preload) { + $"0002 0000 0000 0050 00DC 0064 0118 0402" /* .......P..d.... */ + $"4F4B 0000 0000 000A 0048 004C 011F 8805" /* OK......H.L... */ + $"5E30 0D5E 3100 0000 0000 000A 0014 002A" /* ^0.^1.........* */ + $"0034 A002 0000" /* .4... */ +}; + +data 'DITL' (1001, "Color Selection", purgeable) { + $"0009 0000 0000 0095 009A 00A9 00D6 0402" /* ........... */ + $"4F4B 0000 0000 0095 0023 00A9 005F 0406" /* OK......#.._.. */ + $"4361 6E63 656C 0000 0000 0011 0086 0025" /* Cancel........% */ + $"00CE 0000 0000 0000 0031 0086 0045 00CF" /* ........1..E. */ + $"0000 0000 0000 0051 0086 0065 00CF 0000" /* .......Q..e... */ + $"0000 0000 0071 0086 0085 00CF 0000 0000" /* .....q....... */ + $"0000 0012 001D 0022 0084 080C 4E6F 726D" /* ......."...Norm */ + $"616C 2054 6578 7420 0000 0000 0033 001D" /* al Text .....3.. */ + $"0043 0084 0811 4E6F 726D 616C 2042 6163" /* .C...Normal Bac */ + $"6B67 726F 756E 6400 0000 0000 0055 001D" /* kground......U.. */ + $"0062 0084 080D 426C 696E 6B69 6E67 2054" /* .b...Blinking T */ + $"6578 7467 0000 0000 0072 001D 0083 0084" /* extg.....r.... */ + $"0813 426C 696E 6B69 6E67 2042 6163 6B67" /* ..Blinking Backg */ + $"726F 756E 6400" /* round. */ +}; + +data 'DITL' (4001, "Set Dir", purgeable) { + $"000B 0000 0000 008A 0101 009D 014F 0404" /* ...........O.. */ + $"4F70 656E 0000 0000 0000 02BB 0050 02CD" /* Open........P. */ + $"0406 4869 6464 656E 0000 0000 00A3 0100" /* ..Hidden....... */ + $"00B5 0150 0406 4361 6E63 656C 0000 0000" /* ..P..Cancel.... */ + $"0027 00E8 003B 015B 8000 0000 0000 0044" /* .'..;.[......D */ + $"0100 0056 0150 0405 456A 6563 7400 0000" /* ...V.P..Eject... */ + $"0000 005D 0100 006F 0150 0405 4472 6976" /* ...]...o.P..Driv */ + $"6500 0000 0000 0027 000C 00B9 00E6 0000" /* e......'...... */ + $"0000 0000 0027 00E5 00B9 00F6 0000 0000" /* .....'....... */ + $"0000 007C 00FC 007D 0154 8000 0000 0000" /* ...|..}.T..... */ + $"0000 0294 0065 02F4 8800 0000 0000 00C1" /* ....e....... */ + $"00FA 00D3 015A 040D 5365 7420 4469 7265" /* ...Z..Set Dire */ + $"6374 6F72 7900 0000 0000 00C1 000D 00F4" /* ctory......... */ + $"00E8 0848 D253 6574 2044 6972 6563 746F" /* ..HSet Directo */ + $"7279 D320 7365 6C65 6374 7320 7468 6520" /* ry selects the */ + $"6469 7265 6374 6F72 7920 696E 6469 6361" /* directory indica */ + $"7465 6420 696E 2074 6865 2070 6F70 7570" /* ted in the popup */ + $"206D 656E 7520 6162 6F76 652E" /* menu above. */ +}; + +data 'DITL' (7002, "FTP Config", purgeable) { + $"0013 0000 0000 00ED 011B 0101 0157 0402" /* ............W.. */ + $"4F4B 0000 0000 00ED 000E 0101 004A 0406" /* OK..........J.. */ + $"4361 6E63 656C 0000 0000 002B 0061 003B" /* Cancel.....+.a.; */ + $"00AC 0702 0082 0000 0000 003A 0061 004A" /* .........:.a.J */ + $"00AC 0702 0085 0000 0000 0049 0061 0059" /* .........I.a.Y */ + $"00AC 0702 0085 0000 0000 0069 0024 0079" /* .........i.$.y */ + $"013D 0702 0083 0000 0000 005A 0024 006A" /* .=........Z.$.j */ + $"013D 0702 0083 0000 0000 0078 0024 0088" /* .=........x.$. */ + $"013D 0702 0083 0000 0000 0087 0024 0097" /* .=.........$. */ + $"013D 0702 0083 0000 0000 0096 0024 00A6" /* .=.........$. */ + $"013D 0702 0083 0000 0000 00AE 006D 00BE" /* .=.........m. */ + $"0090 1004 5757 5757 0000 0000 00AE 00C6" /* ...WWWW...... */ + $"00BE 00E9 1004 5757 5757 0000 0000 00AC" /* ....WWWW..... */ + $"00FD 00C0 0139 0407 4578 616D 706C 6500" /* ...9..Example. */ + $"0000 0000 00CE 0095 00DE 00B8 1004 5757" /* ..........WW */ + $"5757 0000 0000 00CD 00C4 00E1 0142 0412" /* WW........B.. */ + $"5365 6C65 6374 2041 7070 6C69 6361 7469" /* Select Applicati */ + $"6F6E 0000 0000 0006 0086 0016 00DA 8810" /* on..........ڈ. */ + $"4654 5020 5365 7276 6572 2050 7265 6673" /* FTP Server Prefs */ + $"0000 0000 002C 001F 003C 0062 880B 5365" /* .....,...<.b.Se */ + $"7276 6572 204D 6F64 6500 0000 0000 00AE" /* rver Mode...... */ + $"0022 00BE 006A 880F 4269 6E61 7279 2046" /* ."..j.Binary F */ + $"696C 6574 7970 6500 0000 0000 00AE 009E" /* iletype....... */ + $"00BE 00C3 8807 4372 6561 746F 7200 0000" /* ..È.Creator... */ + $"0000 00CE 0051 00DE 0092 880C 5465 7874" /* ....Q...Text */ + $"2043 7265 6174 6F72" /* Creator */ +}; + +data 'DITL' (7005, "FTP User Config", purgeable) { + $"0009 0000 0000 00A1 00AA 00B5 00E4 0402" /* ........... */ + $"4F4B 0000 0000 00A1 0061 00B5 009B 0406" /* OK......a.... */ + $"4361 6E63 656C 0000 0000 0078 000D 0088" /* Cancel.....x... */ + $"0126 0702 0083 0000 0000 000A 004C 0019" /* .&.........L.. */ + $"00CE 1000 0000 0000 0027 004C 0037 00CE" /* ........'.L.7. */ + $"1000 0000 0000 003E 0048 005D 00E8 8800" /* .......>.H.].. */ + $"0000 0000 0060 0024 0073 00D5 0418 4368" /* .....`.$.s...Ch */ + $"616E 6765 2044 6566 6175 6C74 2044 6972" /* ange Default Dir */ + $"6563 746F 7279 0000 0000 000A 0015 001A" /* ectory......... */ + $"0049 8808 5573 6572 6E61 6D65 0000 0000" /* .I.Username.... */ + $"0027 0015 0037 0049 8808 5061 7373 776F" /* .'...7.I.Passwo */ + $"7264 0000 0000 003E 0014 0057 0048 8811" /* rd.....>...W.H. */ + $"4465 6661 756C 7420 4469 7265 6374 6F72" /* Default Director */ + $"7900" /* y. */ +}; + +data 'DITL' (290, "Other Font Size", purgeable) { + $"0003 0000 0000 0044 0074 0058 00B8 0402" /* .......D.t.X... */ + $"4F4B 0000 0000 0044 0020 0058 0060 0406" /* OK.....D. .X.`.. */ + $"4361 6E63 656C 0000 0000 0014 001C 0024" /* Cancel.........$ */ + $"0060 880A 466F 6E74 2053 697A 653A 0000" /* .`Font Size:.. */ + $"0000 0014 006C 0024 0094 1000" /* .....l.$... */ +}; + +data 'DITL' (1002, "ANSI Color Selection", purgeable) { + $"002C 0000 0000 00F9 00AF 010D 00EB 0402" /* .,........... */ + $"4F4B 0000 0000 00F9 0069 010D 00A5 0406" /* OK......i..... */ + $"4361 6E63 656C 0000 0000 001A 0057 002E" /* Cancel.......W.. */ + $"00A0 0000 0000 0000 0032 0057 0046 00A0" /* ........2.W.F. */ + $"0000 0000 0000 004A 0057 005E 00A0 0000" /* .......J.W.^... */ + $"0000 0000 0062 0057 0076 00A0 0000 0000" /* .....b.W.v..... */ + $"0000 007A 0057 008E 00A0 0000 0000 0000" /* ...z.W........ */ + $"0092 0057 00A6 00A0 0000 0000 0000 00AA" /* ..W......... */ + $"0057 00BE 00A0 0000 0000 0000 00C2 0057" /* .W..........W */ + $"00D6 00A0 0000 0000 0000 001A 00A3 002E" /* ............. */ + $"00EB 0000 0000 0000 0032 00A3 0046 00EB" /* ........2..F. */ + $"0000 0000 0000 004A 00A3 005E 00EB 0000" /* .......J..^... */ + $"0000 0000 0062 00A3 0076 00EB 0000 0000" /* .....b..v..... */ + $"0000 007A 00A3 008E 00EB 0000 0000 0000" /* ...z......... */ + $"0092 00A3 00A6 00EB 0000 0000 0000 00AA" /* ........... */ + $"00A3 00BE 00EB 0000 0000 0000 00C2 00A3" /* ........... */ + $"00D6 00EB 0000 0000 0000 001C 0008 002D" /* .............- */ + $"0047 8805 426C 6163 6BBA 0000 0000 0034" /* .G.Black.....4 */ + $"0008 0045 0047 8803 5265 6445 0000 0000" /* ...E.G.RedE.... */ + $"004C 0008 005D 0047 8805 4772 6565 6E77" /* .L...].G.Greenw */ + $"0000 0000 0064 0008 0075 0047 8806 5965" /* .....d...u.G.Ye */ + $"6C6C 6F77 0000 0000 007C 0008 008D 0047" /* llow.....|....G */ + $"8804 426C 7565 0000 0000 0094 0008 00A5" /* .Blue........ */ + $"0047 8807 4D61 6765 6E74 61BA 0000 0000" /* .G.Magenta.... */ + $"00AC 0008 00BD 0047 8804 4379 616E 0000" /* .....G.Cyan.. */ + $"0000 00C4 0008 00D5 0047 8805 5768 6974" /* .......G.Whit */ + $"6500 0000 0000 0008 00B7 0017 00D7 8804" /* e...........׈. */ + $"426F 6C64 0000 0000 0000 0000 0000 0000" /* Bold............ */ + $"0104 0001 03EA 0000 0000 001C 0045 002E" /* ............E.. */ + $"0057 0600 0000 0000 0034 0045 0046 0057" /* .W.......4.E.F.W */ + $"0600 0000 0000 004C 0045 005E 0057 0600" /* .......L.E.^.W.. */ + $"0000 0000 0064 0045 0076 0057 0600 0000" /* .....d.E.v.W.... */ + $"0000 007C 0045 008E 0057 0600 0000 0000" /* ...|.E..W...... */ + $"0094 0045 00A6 0057 0600 0000 0000 00AC" /* ..E..W....... */ + $"0045 00BE 0057 0600 0000 0000 00C4 0045" /* .E..W........E */ + $"00D6 0057 0600 0000 0000 001C 00EB 002E" /* ..W........... */ + $"00FD 0600 0000 0000 0034 00EB 0046 00FD" /* ........4..F. */ + $"0600 0000 0000 004C 00EB 005E 00FD 0600" /* .......L..^... */ + $"0000 0000 0064 00EB 0076 00FD 0600 0000" /* .....d..v..... */ + $"0000 007C 00EB 008E 00FD 0600 0000 0000" /* ...|......... */ + $"0094 00EB 00A6 00FD 0600 0000 0000 00AC" /* ........... */ + $"00EB 00BE 00FD 0600 0000 0000 00C4 00EB" /* ........... */ + $"00D6 00FD 0600 0000 0000 00D8 0046 00F5" /* ..........F. */ + $"00F5 8845 5573 6520 7468 6520 7261 6469" /* .EUse the radi */ + $"6F20 6275 7474 6F6E 7320 746F 2073 656C" /* o buttons to sel */ + $"6563 7420 7468 6520 6465 6661 756C 7420" /* ect the default */ + $"636F 6C6F 7220 666F 7220 626F 6C64 6661" /* color for boldfa */ + $"6365 6420 7465 7874 2E00" /* ced text.. */ +}; + +data 'DITL' (151, "Duplicate Name Dialog", purgeable) { + $"0002 0000 0000 0044 0100 0058 0144 0402" /* .......D...X.D.. */ + $"4F4B 0000 0000 000C 0004 002C 0024 A002" /* OK.........,.$. */ + $"0002 0000 0000 000C 0034 0030 0140 8848" /* .........4.0.@H */ + $"5468 6520 616C 6961 7320 6E61 6D65 2066" /* The alias name f */ + $"6F72 2074 6865 206C 6174 6573 7420 7365" /* or the latest se */ + $"6C65 6374 696F 6E20 636F 6E66 6C69 6374" /* lection conflict */ + $"7320 7769 7468 2061 6E20 6578 6973 7469" /* s with an existi */ + $"6E67 206E 616D 652E" /* ng name. */ +}; + +data 'DITL' (150, "Edit Config Type", purgeable) { + $"0005 0000 0000 00BB 00D0 00CF 0112 0402" /* ............. */ + $"4F4B 0000 0000 004C 00C8 0060 0124 0409" /* OK.....L..`.$. */ + $"5265 6D6F 7665 2011 5202 0000 0000 0030" /* Remove .R......0 */ + $"00C8 0044 0124 0409 4368 616E 6765 2011" /* ..D.$.Change . */ + $"4502 0000 0000 0014 00C8 0028 0124 0406" /* E.........(.$.. */ + $"4E65 7720 114E 0000 0000 000A 0009 00C9" /* New .N....... */ + $"00C3 8000 0000 0000 0068 00C8 007C 0124" /* .À......h..|.$ */ + $"040C 4475 706C 6963 6174 6520 1144" /* ..Duplicate .D */ +}; + +data 'DITL' (280, "New Open Connection", purgeable, preload) { + $"0009 0000 0000 0091 010E 00A5 014A 0407" /* ..........J.. */ + $"436F 6E6E 6563 7400 0000 0000 0091 00C8" /* Connect....... */ + $"00A5 0104 0406 4361 6E63 656C 0000 0000" /* .....Cancel.... */ + $"000A 000A 0019 0076 080A 486F 7374 204E" /* .....v.Host N */ + $"616D 653A 0000 0000 001C 000D 002C 0121" /* ame:.........,.! */ + $"1000 0000 0000 0032 000A 0042 00C3 0817" /* .......2..B... */ + $"5769 6E64 6F77 204E 616D 6520 286F 7074" /* Window Name (opt */ + $"696F 6E61 6C29 3A00 0000 0000 0045 000D" /* ional):......E.. */ + $"0055 0121 1000 0000 0000 001A 0127 002E" /* .U.!.........'.. */ + $"013E 4002 0080 0000 0000 0061 006F 0073" /* .>@.......a.o.s */ + $"00F9 0511 4175 7468 656E 7469 6361 7465" /* ...Authenticate */ + $"2028 1141 2900 0000 0000 0072 006F 0084" /* (.A)......r.o. */ + $"00D6 050C 456E 6372 7970 7420 2811 4529" /* ...Encrypt (.E) */ + $"0000 0000 0000 0000 0000 0000 0104 0001" /* ................ */ + $"0118" /* .. */ +}; + +data 'DITL' (5500, "Screen Size", purgeable) { + $"0006 0000 0000 007C 0098 0090 00D4 0402" /* .......|..... */ + $"4F4B 0000 0000 007C 0048 0090 0084 0406" /* OK.....|.H.... */ + $"4361 6E63 656C 0000 0000 0047 000C 005B" /* Cancel.....G...[ */ + $"0095 0812 4E75 6D62 6572 206F 6620 436F" /* ...Number of Co */ + $"6C75 6D6E 733A 0000 0000 0047 0098 005B" /* lumns:.....G..[ */ + $"00B5 1003 3133 3202 0000 0000 002C 000C" /* ...132......,.. */ + $"003B 0092 8810 4E75 6D62 6572 206F 6620" /* .;..Number of */ + $"4C69 6E65 733A 0000 0000 002A 0098 003D" /* Lines:.....*..= */ + $"00B5 1002 3234 0000 0000 000C 0010 001D" /* ...24.......... */ + $"00D2 8818 5365 6C65 6374 2053 6372 6565" /* .҈.Select Scree */ + $"6E20 6469 6D65 6E73 696F 6E73" /* n dimensions */ +}; + +data 'DITL' (7004, "Session Config", purgeable) { + $"0034 0000 0000 00DC 0106 00F0 0140 0402" /* .4.........@.. */ + $"4F4B 0000 0000 00DC 00C0 00F0 00FA 0406" /* OK.......... */ + $"4361 6E63 656C 0000 0000 0049 0055 0059" /* Cancel.....I.U.Y */ + $"00A0 0702 0082 0000 0000 0049 009F 0059" /* .........I..Y */ + $"00EA 0702 0082 0000 0000 0049 00ED 0059" /* .........I..Y */ + $"0138 0702 0082 0000 0000 0033 0055 0043" /* .8........3.U.C */ + $"00A0 0702 0082 0000 0000 0033 009F 0043" /* .........3..C */ + $"00EA 0702 0082 0000 0000 0033 0055 0043" /* .........3.U.C */ + $"00A0 0702 0082 0000 0000 0033 009F 0043" /* .........3..C */ + $"00EA 0702 0082 0000 0000 005F 000A 006F" /* ........._..o */ + $"0084 0702 0084 0000 0000 006E 000A 007E" /* .........n..~ */ + $"0084 0702 0084 0000 0000 005F 000A 006F" /* ........._..o */ + $"0084 0702 0084 0000 0000 008C 000A 009C" /* ........... */ + $"0084 0702 0084 0000 0000 006E 000A 007E" /* .........n..~ */ + $"0084 0702 0084 0000 0000 0033 000A 0043" /* .........3..C */ + $"0123 0702 0083 0000 0000 0042 000A 0052" /* .#........B..R */ + $"0123 0702 0083 0000 0000 007D 000A 008D" /* .#........}.. */ + $"0084 0702 0084 0000 0000 001F 004A 002C" /* ...........J., */ + $"00F5 1000 0000 0000 0034 004A 0041 00F5" /* ........4.J.A. */ + $"1000 0000 0000 0049 004A 0056 0086 1005" /* .......I.J.V... */ + $"3530 3030 3000 0000 0000 0036 00F2 0044" /* 50000......6..D */ + $"0117 1003 3230 3000 0000 0000 0050 0100" /* ....200......P.. */ + $"0060 0117 1000 0000 0000 006B 0100 007B" /* .`.........k...{ */ + $"0117 1000 0000 0000 0086 0100 0096 0117" /* .............. */ + $"1000 0000 0000 005F 0063 006F 00C0 0000" /* ......._.c.o... */ + $"0000 0000 0074 0063 0084 00C0 0000 0000" /* .....t.c...... */ + $"0000 0033 000A 0043 0044 880A 486F 7374" /* ...3..C.DHost */ + $"204E 616D 653A 0000 0000 001E 000A 002E" /* Name:......... */ + $"0044 8806 416C 6961 733A 0000 0000 0049" /* .D.Alias:.....I */ + $"000A 0059 0044 8805 506F 7274 3A00 0000" /* ..Y.D.Port:... */ + $"0000 0049 000A 0059 0032 8804 5445 4B3A" /* ...I..Y.2.TEK: */ + $"0000 0000 0033 000A 0043 0053 880D 5061" /* .....3..C.S.Pa */ + $"7374 6520 4D65 7468 6F64 3A00 0000 0000" /* ste Method:..... */ + $"0033 000A 0043 0053 880D 4465 6C65 7465" /* .3..C.S.Delete */ + $"2053 656E 6473 3A00 0000 0000 0050 00C6" /* Sends:......P. */ + $"0060 00F8 880A 496E 7465 7272 7570 743A" /* .`.Interrupt: */ + $"0000 0000 006B 00C6 007B 00F8 8808 5375" /* .....k..{..Su */ + $"7370 656E 643A 0000 0000 0086 00C6 0096" /* spend:....... */ + $"00F8 8807 5265 7375 6D65 3A00 0000 0000" /* ..Resume:..... */ + $"005F 000A 006F 0046 8809 5465 726D 696E" /* ._..o.FTermin */ + $"616C 3A00 0000 0000 0074 000A 0082 0061" /* al:......t...a */ + $"8812 5472 616E 736C 6174 696F 6E20 5461" /* .Translation Ta */ + $"626C 653A 0000 0000 0049 000A 0059 006E" /* ble:.....I..Y.n */ + $"8813 4E65 7477 6F72 6B20 426C 6F63 6B20" /* .Network Block */ + $"5369 7A65 3A00 0000 0000 0048 0074 0058" /* Size:......H.t.X */ + $"009C 1000 0000 0000 0078 00C8 008C 0136" /* ........x...6 */ + $"040E 5361 7665 2061 7320 5365 742E 2E2E" /* ..Save as Set... */ + $"0000 0000 005F 00C8 0073 0136 040D 4164" /* ....._..s.6..Ad */ + $"6420 746F 2053 6574 2E2E 2E00 0000 0000" /* d to Set........ */ + $"007D 000A 008D 0084 0702 0084 0000 0000" /* .}.......... */ + $"005F 00A5 006F 011F 0702 0084 0000 0000" /* ._..o......... */ + $"006E 00A5 007E 011F 0702 0084 0000 0000" /* .n..~......... */ + $"0000 0000 0000 0000 0104 0001 1B5C 0000" /* .............\.. */ + $"0000 0004 0004 0014 0140 0702 03E9 0000" /* .........@..... */ + $"0000 0051 000A 0061 0123 0702 0083 0000" /* ...Q..a.#..... */ + $"0000 0060 000A 0070 0123 0702 0083 0000" /* ...`..p.#..... */ + $"0000 006F 000A 007F 0123 0702 0083 0000" /* ...o....#..... */ + $"0000 007E 000A 008E 0123 0702 0083 0000" /* ...~...#..... */ + $"0000 0091 000A 00A1 0055 880D 4F54 5020" /* ......U.OTP */ + $"5061 7373 776F 7264 3A00 0000 0000 0091" /* Password:...... */ + $"005D 00A1 00C8 1000 0000 0000 00A5 000A" /* .].......... */ + $"00B5 0123 0702 0083" /* ..#... */ +}; + +data 'DITL' (2001, "Close Connection", purgeable, preload) { + $"0003 0000 0000 0055 0140 0069 017C 0402" /* .......U.@.i.|.. */ + $"4F4B 0000 0000 0055 00FA 0069 0136 0406" /* OK.....U..i.6.. */ + $"4361 6E63 656C 0000 0000 000A 0048 003C" /* Cancel......H.< */ + $"017C 0839 4172 6520 796F 7520 6365 7274" /* .|.9Are you cert */ + $"6169 6E20 796F 7520 7761 6E74 2074 6F20" /* ain you want to */ + $"636C 6F73 6520 7468 6520 636F 6E6E 6563" /* close the connec */ + $"7469 6F6E 2074 6F20 D25E 30D3 3F00 0000" /* tion to ^0?... */ + $"0000 000A 0014 002A 0034 A002 0002" /* ......*.4... */ +}; + +data 'DITL' (130, purgeable) { + $"0000 0000 0000 0011 002C 0028 00B4 8815" /* .........,.(.. */ + $"4275 696C 6469 6E67 2066 6F6E 7420 6C69" /* Building font li */ + $"7374 2E2E 2E00" /* st.... */ +}; + +data 'DITL' (132, purgeable) { + $"FFFF" /* */ +}; + +data 'DITL' (501, "flash.about", purgeable) { + $"0001 0000 0000 0000 0000 012C 0190 4002" /* ...........,.@. */ + $"0401 0000 0000 0000 00DB 0014 018C 0000" /* .............. */ +}; + +data 'DITL' (7001, "Main Prefs", purgeable) { + $"0024 0000 0000 00FA 0136 010E 0172 0402" /* .$......6...r.. */ + $"4F4B 0000 0000 00FA 00F0 010E 012C 0406" /* OK.........,.. */ + $"4361 6E63 656C 0000 0000 0084 000C 0094" /* Cancel........ */ + $"0086 0702 0084 0000 0000 0094 000C 00A4" /* ............ */ + $"0086 0702 0084 0000 0000 007A 00BC 008A" /* .........z.. */ + $"01D5 0702 0083 0000 0000 008A 00BC 009A" /* ........... */ + $"01D5 0702 0083 0000 0000 0015 00BC 0025" /* ............% */ + $"0136 0702 0084 0000 0000 0025 00BC 0035" /* .6........%..5 */ + $"0136 0702 0084 0000 0000 0035 00BC 0045" /* .6........5..E */ + $"0107 0702 0082 0000 0000 0045 00BC 0055" /* ..........E..U */ + $"0107 0702 0082 0000 0000 0055 00BC 0065" /* ..........U..e */ + $"0107 0702 0082 0000 0000 009A 00BC 00AA" /* ............ */ + $"01D5 0702 0083 0000 0000 006A 00BC 007A" /* .........j..z */ + $"01D5 0702 0083 0000 0000 0018 0079 0028" /* ...........y.( */ + $"009A 1000 0000 0000 0030 0079 0040 009A" /* ........0.y.@. */ + $"1000 0000 0000 00DE 00BC 00F2 0145 0412" /* ..........E.. */ + $"5365 6C65 6374 2041 7070 6C69 6361 7469" /* Select Applicati */ + $"6F6E 0000 0000 00DF 000C 00EF 0085 8815" /* on.......... */ + $"4361 7074 7572 6520 4669 6C65 2043 7265" /* Capture File Cre */ + $"6174 6F72 3A00 0000 0000 0048 0079 0058" /* ator:......H.y.X */ + $"009A 1000 0000 0000 0048 000C 0058 0071" /* ........H...X.q */ + $"880D 4F70 656E 2054 696D 656F 7574 3A00" /* .Open Timeout:. */ + $"0000 0000 0060 0079 006F 009A 1000 0000" /* .....`.y.o..... */ + $"0000 0095 008D 00A5 00A5 1000 0000 0000" /* ............ */ + $"0030 000C 0041 006F 880D 5365 6E64 2054" /* .0...A.o.Send T */ + $"696D 656F 7574 3A00 0000 0000 00FA 000C" /* imeout:........ */ + $"010E 006E 040B 414E 5349 2043 6F6C 6F72" /* ...n..ANSI Color */ + $"7302 0000 0000 00DF 008D 00EF 00AE 1000" /* s........... */ + $"0000 0000 0096 0078 00A5 0086 8802 6279" /* ......x...by */ + $"0000 0000 0018 000C 0028 0075 0815 436F" /* .........(.u..Co */ + $"7079 2054 6162 6C65 2074 6872 6573 686F" /* py Table thresho */ + $"6C64 3A00 0000 0000 005F 000C 006F 006D" /* ld:......_...o.m */ + $"880A 5469 6D65 736C 6963 653A 0000 0000" /* Timeslice:.... */ + $"0003 000A 000F 0057 C002 0100 0000 0000" /* ......W....... */ + $"0010 000A 0011 0168 C002 0800 0000 0000" /* ......h....... */ + $"00AA 00BC 00BA 01D5 0702 0083 0000 0000" /* ........... */ + $"0074 000C 0084 0086 0702 0084 0000 0000" /* .t........... */ + $"00A4 000C 00B4 0086 0702 0084 0000 0000" /* ............ */ + $"00B4 000C 00C4 0086 0702 0084 0000 0000" /* ............ */ + $"00C4 000C 00D4 0086 0702 0084 0000 0000" /* ............ */ + $"0000 0000 0000 0000 0104 0001 1B59 0000" /* .............Y.. */ + $"0000 00BA 00BC 00CA 01D5 0702 0083 0000" /* ........... */ + $"0000 00CA 00BC 00DA 01D5 0702 0083" /* ......... */ +}; + +data 'DITL' (1023, "Opening Dialog", purgeable, preload) { + $"0002 0000 0000 0000 0000 012C 0190 4002" /* ...........,.@. */ + $"0401 0000 0000 0000 00DB 0014 018C 0000" /* .............. */ + $"0000 0000 012D 0001 013B 00B6 880E 5374" /* .....-...;..St */ + $"6172 7469 6E67 2055 702E 2E2E" /* arting Up... */ +}; + +data 'DITL' (8000, "OTP Password Entry", purgeable) { + $"000B 0000 0000 00A7 00E1 00BB 015E 040E" /* ..........^.. */ + $"436F 6D70 7574 6520 2620 5365 6E64 0000" /* Compute & Send.. */ + $"0000 00A7 007D 00BB 00D7 0407 436F 6D70" /* ....}....Comp */ + $"7574 6500 0000 0000 00A7 002D 00BB 0073" /* ute.......-..s */ + $"0406 4361 6E63 656C 0000 0000 001B 000F" /* ..Cancel........ */ + $"002B 013B 1000 0000 0000 0049 000F 0059" /* .+.;.......I...Y */ + $"013B 1000 0000 0000 0078 000F 0088 013B" /* .;.......x....; */ + $"1000 0000 0000 008D 006A 009F 00D4 0605" /* ........j.... */ + $"576F 7264 7364 0000 0000 008D 00D4 009F" /* Wordsd....... */ + $"013E 0603 4865 78F5 0000 0000 0005 000C" /* .>..Hex........ */ + $"0015 0072 880B 4F54 5020 5072 6F6D 7074" /* ...r.OTP Prompt */ + $"3A78 0000 0000 0033 000C 0043 0072 8809" /* :x.....3...C.r */ + $"5061 7373 776F 7264 3A65 0000 0000 0062" /* Password:e.....b */ + $"000C 0072 0072 8807 5265 7375 6C74 3A00" /* ...r.r.Result:. */ + $"0000 0000 008E 000C 009E 0065 8808 5365" /* .........e.Se */ + $"6E64 2041 733A" /* nd As: */ +}; + +data 'DITL' (7003, "Terminal Configuration", purgeable) { + $"002F 0000 0000 00DC 0106 00F0 0140 0402" /* ./.........@.. */ + $"4F4B 0000 0000 00DC 00C0 00F0 00FA 0406" /* OK.......... */ + $"4361 6E63 656C 0000 0000 0035 00A1 0045" /* Cancel.....5..E */ + $"00DC 0000 0000 0000 004A 00A1 005A 00DC" /* ........J..Z. */ + $"0000 0000 0000 005F 00A1 006F 00DC 0000" /* ......._..o... */ + $"0000 0000 0075 00A1 0085 00DC 0000 0000" /* .....u....... */ + $"0000 0037 000B 0047 00A1 8818 4E6F 726D" /* ...7...G..Norm */ + $"616C 2066 6F72 6567 726F 756E 6420 636F" /* al foreground co */ + $"6C6F 723A 0000 0000 004C 000B 005C 00A1" /* lor:.....L...\. */ + $"8818 4E6F 726D 616C 2062 6163 6B67 726F" /* .Normal backgro */ + $"756E 6420 636F 6C6F 723A 0000 0000 0061" /* und color:.....a */ + $"000B 0071 00A1 881A 426C 696E 6B69 6E67" /* ...q..Blinking */ + $"2066 6F72 6567 726F 756E 6420 636F 6C6F" /* foreground colo */ + $"723A 0000 0000 0077 000B 0087 00A1 881A" /* r:.....w..... */ + $"426C 696E 6B69 6E67 2062 6163 6B67 726F" /* Blinking backgro */ + $"756E 6420 636F 6C6F 723A 0000 0000 009B" /* und color:..... */ + $"000B 00AB 0074 8813 416E 7377 6572 6261" /* ....t.Answerba */ + $"636B 204D 6573 7361 6765 3A00 0000 0000" /* ck Message:..... */ + $"009B 007F 00AB 0102 1009 4445 432D 5654" /* .......DEC-VT */ + $"3130 3000 0000 0000 0050 000B 0060 005F" /* 100......P...`._ */ + $"880D 5363 7265 656E 2057 6964 7468 3A00" /* .Screen Width:. */ + $"0000 0000 0050 0069 0060 008C 1002 3830" /* .....P.i.`...80 */ + $"0000 0000 0069 000B 007C 0057 880E 5363" /* .....i...|.W.Sc */ + $"7265 656E 2048 6569 6768 743A 0000 0000" /* reen Height:.... */ + $"0069 0069 0079 008C 1002 3234 0000 0000" /* .i.i.y...24.... */ + $"001E 000B 002E 0064 880E 5465 726D 696E" /* .......d.Termin */ + $"616C 204E 616D 653A 0000 0000 001E 0069" /* al Name:.......i */ + $"002E 0136 1004 6E61 6D65 0000 0000 0037" /* ...6..name.....7 */ + $"000B 0048 0043 8805 466F 6E74 3A00 0000" /* ...H.C.Font:... */ + $"0000 0037 0044 0048 009D 0000 0000 0000" /* ...7.D.H....... */ + $"0038 00A7 0048 00C1 1001 3900 0000 0000" /* .8..H...9..... */ + $"0082 000B 0092 0056 880B 5363 726F 6C6C" /* .....V.Scroll */ + $"6261 636B 3A00 0000 0000 0081 0069 0091" /* back:.......i. */ + $"0096 1003 3230 3000 0000 0000 009B 000B" /* ...200........ */ + $"00AB 0085 0702 0084 0000 0000 0050 00B2" /* ..........P. */ + $"0060 012C 0702 0084 0000 0000 005F 00B2" /* .`.,........_. */ + $"006F 012C 0702 0084 0000 0000 0037 000B" /* .o.,........7.. */ + $"0047 0063 880A 456D 756C 6174 696F 6E3A" /* .G.cEmulation: */ + $"0000 0000 0037 00BE 0047 0138 0702 0084" /* .....7..G.8... */ + $"0000 0000 0055 00BE 0065 0138 0702 0084" /* .....U..e.8... */ + $"0000 0000 006E 00B2 007E 012C 0702 0084" /* .....n..~.,... */ + $"0000 0000 007D 00B2 008D 012C 0702 0084" /* .....}...,... */ + $"0000 0000 0046 00BE 0056 0138 0702 0084" /* .....F..V.8... */ + $"0000 0000 0037 0067 0047 00B2 0702 0082" /* .....7.g.G.... */ + $"0000 0000 0037 00B9 0047 0104 0702 0082" /* .....7..G..... */ + $"0000 0000 0038 0067 0048 00B2 0702 0082" /* .....8.g.H.... */ + $"0000 0000 004B 0067 005B 00B2 0702 0082" /* .....K.g.[.... */ + $"0000 0000 005E 0067 006E 00B2 0702 0082" /* .....^.g.n.... */ + $"0000 0000 0037 000B 0049 0060 880F 456D" /* .....7...I.`.Em */ + $"6163 7320 4D65 7461 204B 6579 3A00 0000" /* acs Meta Key:... */ + $"0000 0064 00BE 0074 0138 0702 0084 0000" /* ...d..t.8..... */ + $"0000 0069 000B 0079 0085 0702 0084 0000" /* ...i...y...... */ + $"0000 0078 000B 0088 0085 0702 0084 0000" /* ...x......... */ + $"0000 0053 000B 0064 0043 880A 426F 6C64" /* ...S...d.CBold */ + $"2046 6F6E 743A 0000 0000 0052 0044 0063" /* Font:.....R.D.c */ + $"009D 0000 0000 0000 0087 000B 0097 0085" /* ............ */ + $"0702 0084 0000 0000 0000 0000 0000 0000" /* ............... */ + $"0104 0001 1B5B 0000 0000 0004 0004 0014" /* .....[.......... */ + $"0140 0702 03E8 0000 0000 0052 00A6 0062" /* .@........R..b */ + $"0120 0702 0084 0000 0000 00B0 000A 00C0" /* . .......... */ + $"0123 0702 0083" /* .#... */ +}; + +data 'DLOG' (128, "Resolver Error", purgeable) { + $"0052 0058 00E6 01B1 0001 0100 0000 0000" /* .R.X.......... */ + $"0000 0080 0A4E 6577 2044 6961 6C6F 67" /* ...New Dialog */ +}; + +data 'DLOG' (129, "FTP info", purgeable) { + $"004A 0088 00DB 01B5 0001 0100 0100 0000" /* .J........... */ + $"0000 0081 00" /* .... */ +}; + +data 'DLOG' (160, "FatalCancelAlert", purgeable) { + $"006C 004C 0101 01B9 0001 0000 0000 0000" /* .l.L........... */ + $"0000 00A0 00" /* .... */ +}; + +data 'DLOG' (170, "FatalAlert", purgeable) { + $"006C 004C 0101 01B9 0001 0000 0000 0000" /* .l.L........... */ + $"0000 00AA 00" /* .... */ +}; + +data 'DLOG' (175, "OperationFailedAlert", purgeable) { + $"006C 004C 0101 01B9 0001 0000 0000 0000" /* .l.L........... */ + $"0000 00AF 00" /* .... */ +}; + +data 'DLOG' (180, "AlertAskUser", purgeable) { + $"006A 005C 00E7 01A2 0001 0100 0000 0000" /* .j.\.......... */ + $"0000 00B4 00" /* .... */ +}; + +data 'DLOG' (195, "DNR Error Alert", purgeable) { + $"006C 004C 0101 01B9 0001 0000 0000 0000" /* .l.L........... */ + $"0000 00C3 00" /* .... */ +}; + +data 'DLOG' (259, "My IP Number", purgeable) { + $"0062 007F 00CC 0186 0000 0100 0100 0000" /* .b............ */ + $"0000 0103 0A49 5020 4164 6472 6573 7300" /* ....IP Address. */ + $"300A" /* 0 */ +}; + +data 'DLOG' (270, "Status Dialog", purgeable, preload) { + $"0060 007A 00C4 01BA 0001 0100 0100 0000" /* .`.z.......... */ + $"0000 010E 0A4E 6577 2044 6961 6C6F 67" /* ....New Dialog */ +}; + +data 'DLOG' (273, "setup keys", purgeable) { + $"0026 0030 00DA 017A 0001 0100 0000 0000" /* .&.0..z........ */ + $"0000 0111 1053 6574 2055 7361 626C 6520" /* .....Set Usable */ + $"4C69 6E65 73" /* Lines */ +}; + +data 'DLOG' (281, "New Open Connection COPY", purgeable) { + $"0046 005E 00F7 018C 0001 0100 0000 0000" /* .F.^.......... */ + $"0000 0119 0A4E 6577 2044 6961 6C6F 67" /* ....New Dialog */ +}; + +data 'DLOG' (303, "Couldn't Connect", purgeable) { + $"004C 008E 00B4 0180 0001 0100 0100 0000" /* .L........... */ + $"0000 012F 0A4E 6577 2044 6961 6C6F 67" /* .../New Dialog */ +}; + +data 'DLOG' (500, "Macros", purgeable) { + $"003C 000A 0136 01FE 0004 0100 0100 0000" /* .<..6......... */ + $"0000 01F4 0D53 6574 204D 6163 726F 732E" /* ....Set Macros. */ + $"2E2E 4546" /* ..EF */ +}; + +data 'DLOG' (640, "Generic Errors", preload) { + $"004C 0078 00BA 019F 0001 0100 0100 0000" /* .L.x.......... */ + $"0000 0280 0A4E 6577 2044 6961 6C6F 67" /* ...New Dialog */ +}; + +data 'DLOG' (1001, "Color Selection", purgeable) { + $"0028 0028 00DB 0118 0001 0100 0100 0000" /* .(.(........... */ + $"0000 03E9 0A4E 6577 2044 6961 6C6F 67" /* ...New Dialog */ +}; + +data 'DLOG' (4001, "set dir", purgeable) { + $"0000 0000 00FE 0160 0001 0000 0000 0000" /* ......`........ */ + $"0000 0FA1 00" /* .... */ +}; + +data 'DLOG' (7002, "FTP config", purgeable) { + $"0022 003C 0130 01A1 0001 0000 0000 0000" /* .".<.0......... */ + $"0000 1B5A 00" /* ...Z. */ +}; + +data 'DLOG' (7005, "FTP User Config", purgeable) { + $"004C 0082 0106 0171 0001 0100 0100 0000" /* .L....q........ */ + $"0000 1B5D 00" /* ...]. */ +}; + +data 'DLOG' (290, "Other Font Size", purgeable) { + $"00C8 0192 012C 026E 0001 0100 0100 0000" /* ...,.n........ */ + $"0000 0122 0F4F 7468 6572 2046 6F6E 7420" /* ...".Other Font */ + $"5369 7A65 0000" /* Size.. */ +}; + +data 'DLOG' (1002, "ANSI Color Selection", purgeable) { + $"0031 0085 0144 0189 0005 0100 0100 0000" /* .1..D......... */ + $"0000 03EA 0B41 4E53 4920 436F 6C6F 7273" /* ....ANSI Colors */ + $"0000" /* .. */ +}; + +data 'DLOG' (151, "Duplicate Session Alert", purgeable) { + $"0136 0191 019A 02E1 0001 0100 0000 0000" /* .6........... */ + $"0000 0097 264E 6577 2044 4954 4C20 3133" /* ...&New DITL 13 */ + $"3020 6672 6F6D 206D 772F 3638 6BA5 2D2D" /* 0 from mw/68k-- */ + $"5465 6C6E 6574 2E72 7372 6300 0000" /* Telnet.rsrc... */ +}; + +data 'DLOG' (150, "Edit Shortcuts", purgeable) { + $"003E 0064 011E 018C 0005 0100 0100 0000" /* .>.d........... */ + $"0000 0096 0020 022F" /* .... ./ */ +}; + +data 'DLOG' (5500, "Screen Size", purgeable) { + $"004A 006A 00E6 0152 0001 0100 0000 0000" /* .J.j..R........ */ + $"0000 157C 1053 6574 2055 7361 626C 6520" /* ...|.Set Usable */ + $"4C69 6E65 7300 022F" /* Lines../ */ +}; + +data 'DLOG' (7004, "Session Config", purgeable) { + $"0044 0034 0139 017E 0005 0000 0100 0000" /* .D.4.9.~........ */ + $"0000 1B5C 1045 6469 7420 4661 766F 7269" /* ...\.Edit Favori */ + $"7465 2E2E 2EFF 7FFF" /* te.... */ +}; + +data 'DLOG' (2001, "Close Connection Dialog", purgeable, preload) { + $"005A 0046 00CD 01CC 0001 0100 0100 0000" /* .Z.F.......... */ + $"0000 07D1 0A4E 6577 2044 6961 6C6F 67" /* ...New Dialog */ +}; + +data 'DLOG' (7003, "Terminal Config", purgeable) { + $"0038 0047 012D 0191 0005 0000 0100 0000" /* .8.G.-......... */ + $"0000 1B5B 1045 6469 7420 5465 726D 696E" /* ...[.Edit Termin */ + $"616C 2E2E 2E00 0000" /* al...... */ +}; + +data 'DLOG' (130, purgeable) { + $"0210 01D0 0242 02AD 0001 0100 0100 0000" /* ....B......... */ + $"0000 0082 1242 7569 6C64 696E 6720 666F" /* ....Building fo */ + $"6E74 206C 6973 7400 0000" /* nt list... */ +}; + +data 'DLOG' (501, "flash.about", purgeable) { + $"001E 001E 0149 01AD 0002 0100 0100 0000" /* .....I......... */ + $"0000 01F5 0A4E 6577 2044 6961 6C6F 67" /* ...New Dialog */ +}; + +data 'DLOG' (1023, "Opening Dialog", purgeable, preload) { + $"002E 0042 0169 01D1 0002 0100 0100 0000" /* ...B.i......... */ + $"0000 03FF 0A4E 6577 2044 6961 6C6F 67" /* ...New Dialog */ +}; + +data 'DLOG' (190, "Change Window Title", purgeable) { + $"0088 006C 00D9 0183 0001 0100 0100 0000" /* ..l.......... */ + $"0000 00BE 00" /* .... */ +}; + +data 'DLOG' (280, "New Open Connection", purgeable, preload) { + $"005E 005C 010D 01B0 0005 0100 0000 0000" /* .^.\........... */ + $"0000 0118 124F 7065 6E20 436F 6E6E 6563" /* .....Open Connec */ + $"7469 6F6E 2E2E 2E" /* tion... */ +}; + +data 'DLOG' (8000, "OTP Password Entry") { + $"002E 0028 00F3 0199 0005 0100 0000 0000" /* ...(.......... */ + $"0000 1F40 124F 6E65 2D54 696D 6520 5061" /* ...@.One-Time Pa */ + $"7373 776F 7264 7300 280A" /* sswords.( */ +}; + +data 'DLOG' (7001, "Main Prefs", purgeable) { + $"0088 00D0 01A0 0253 0005 0000 0000 0000" /* ....S........ */ + $"0000 1B59 0E50 7265 6665 7265 6E63 6573" /* ...Y.Preferences */ + $"2E2E 2E00 0000" /* ...... */ +}; + +data 'FOND' (74, "%NCSA VT", purgeable) { + $"0000 004A 0000 0000 0000 0000 0000 0000" /* ...J............ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0003 0009 0000 2509 0009 0001" /* .........%... */ + $"2509 000C 0000 250C 000C 0001 250C" /* %....%.....%. */ +}; + +data 'FOND' (75, "NCSA VT Bold", purgeable) { + $"0000 004B 0000 0000 0000 0000 0000 0000" /* ...K............ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0009 0000 2589" /* .........% */ +}; + +data 'FREF' (129, "Application") { + $"4150 504C 0000 00" /* APPL... */ +}; + +data 'FREF' (130, "DEBUG") { + $"4442 5547 0002 00" /* DBUG... */ +}; + +data 'FREF' (131, "Document") { + $"434F 4E46 0003 00" /* CONF... */ +}; + +data 'FREF' (132, "IP Number Document") { + $"4950 4E4F 0004 00" /* IPNO... */ +}; + +data 'FREF' (133, "Macro Set Document") { + $"5445 5854 0005 00" /* TEXT... */ +}; + +data 'FREF' (-32768) { + $"4150 504C 0000 00" /* APPL... */ +}; + +data 'icl4' (128) { + $"00DF FFFF FD00 0000 0DFF FFFF D000 0000" /* ........ */ + $"00FC CCCC CF00 0000 0FCC CCCC F000 0000" /* ........ */ + $"00FC EEEE CF00 0000 0FCE EEEC F000 0000" /* ........ */ + $"00FC ECC0 CF00 0000 0FCE CC0C F000 0000" /* ......... */ + $"00FC E000 CF00 0000 0FCE 000C F000 0000" /* ........... */ + $"00FC CCCC CF00 0000 0FCC CCCC F000 0000" /* ........ */ + $"FFFF FFFF FFFF 000F FFFF FFFF FFFD DDD0" /* .. */ + $"FCCC CCCC C3CF DDDF CCCC CCCC 3CF0 00D0" /* <. */ + $"FCCC CCCC CCCF 000F CCCC CCCC CCF0 00D0" /* ... */ + $"FFFF FFFF FFFF 000F FFFF FFFF FFF0 00D0" /* ... */ + $"0000 0000 0000 0000 0000 0000 0000 00D0" /* ............... */ + $"0000 0000 0FFF FFFF FFFF 0000 0000 00D0" /* .......... */ + $"0000 0000 0FDE DEDE DEDF 0000 0000 00D0" /* .......... */ + $"0000 0000 0FDE DEDE DEDF 0000 0000 00D0" /* .......... */ + $"0000 0000 0FDE DEDE DEDF 0000 0000 00D0" /* .......... */ + $"0000 0000 0FDE DEDE DEDF 0000 0000 00D0" /* .......... */ + $"0000 0000 0FDE DEDE DEDF 0000 0000 00D0" /* .......... */ + $"0000 0000 0FDE DEDE DEDF 0000 0000 00D0" /* .......... */ + $"0000 00FF FFFF FFFF FFFF FFFD DDDD DD00" /* .... */ + $"0000 00FD DDDD DDDD DDDD DDF0 0000 00D0" /* ...... */ + $"0000 00FD DDDD DDDD DDDD DDF0 0000 00D0" /* ...... */ + $"0000 00FF FFFF FFFF FFFF FFF0 0000 00D0" /* ...... */ + $"0000 0000 0000 0000 0000 0000 0000 00D0" /* ............... */ + $"DFFF FFD0 000D FFFF FD00 00DF FFFF D0D0" /* .... */ + $"FCCC CCF0 000F CCCC CF00 00FC CCCC F0D0" /* .... */ + $"FCEE 0CF0 000F CEE0 CF00 00FC EE0C F0D0" /* ...... */ + $"FCEC 0CF0 000F CEC0 CF00 00FC EC0C FDD0" /* ...... */ + $"FCEC 0CFD DDDF CEC0 CFDD DDFC EC0C F000" /* ... */ + $"FC00 0CF0 000F C000 CF00 00FC 000C F000" /* .......... */ + $"F8CE ECF0 000F 8CEE CF00 00F8 CEEC F000" /* ..... */ + $"FCCC CCF0 000F CCCC CF00 00FC CCCC F000" /* ..... */ + $"0FFF FF00 0000 FFFF F000 000F FFFF 0000" /* ......... */ +}; + +data 'icl4' (131) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"EEEE EEEE EEEE EEEE EEEE EEEE EE00 0000" /* ... */ + $"E000 0000 0000 0000 0000 0000 0EE0 0000" /* .............. */ + $"E000 0000 0000 0000 0000 0000 0ECE 0000" /* .............. */ + $"E000 0000 0000 0000 0000 0000 0ECC E000" /* ............. */ + $"E000 0FFF FFFF FFFF FF00 0000 0ECC CE00" /* ....... */ + $"E000 FCCC CCCC CCCC CCF0 0000 0ECC CCE0" /* .... */ + $"E000 FCCF FFFF FFFF CCF0 0000 0EEE EEEE" /* .... */ + $"E000 FCFC CCCC CCCC 0CF0 0000 0000 000E" /* ........ */ + $"E000 FCFC CCCC CCCC 0CF0 0000 F000 000E" /* ....... */ + $"E000 FCFC CCCC CCCC 0CF0 0000 0F00 000E" /* ........ */ + $"E000 FCFC CCCC CCCC 0CF0 FFFF FFF0 000E" /* .... */ + $"E000 FCFC CCCC CCCC 0CF0 0000 0F00 000E" /* ........ */ + $"E000 FCFC CCCC CCCC 0CF0 00F0 F000 000E" /* ...... */ + $"E000 FCC0 0000 0000 CCF0 0F00 0000 000E" /* ........... */ + $"E000 FCCC CCCC CCCC CCF0 FFFF FFF0 000E" /* ... */ + $"E000 FCCC CCCC FFFF FCF0 0F00 0000 000E" /* ....... */ + $"E000 FCCC CCCC CCCC CCF0 00F0 0000 000E" /* ...... */ + $"E000 FCCC CCCC CCCC CCF0 0000 0000 000E" /* ....... */ + $"E000 FFFF FFFF FFFF FFF0 0000 0000 000E" /* ....... */ + $"E000 0FCC CCCC CCCC CF00 0000 0000 000E" /* ......... */ + $"E000 0FFF FFFF FFFF FF00 0000 0000 000E" /* ......... */ + $"E000 0000 000F 0000 0000 0000 0000 000E" /* ............... */ + $"E000 CCDD EEF0 FEED DCC0 0000 0000 000E" /* ....... */ + $"E000 0000 0000 0000 0000 0000 0000 000E" /* ............... */ + $"EEEE EEEE EEEE EEEE EEEE EEEE EFFE EEEE" /* */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icl4' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF FFFF FFFF FFF0 0000 0000 0000 0000" /* ......... */ + $"0FCC CCCC CCCC CCCF 0000 0D00 00D0 0000" /* ........ */ + $"0FCC EEEE EEEE ECCF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCE CCCC CCCC C0CF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCE CFFF CFFC C0CF 0DDD DDDD DDDD DD00" /* ... */ + $"0FCE CCFC CFCF C0CF 00EE EDEE EEDE EEE0" /* .. */ + $"0FCE CCFC CFFC C0CF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCE CFFF CFCC C0CF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCE CCCC CCCC C0CF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCC 0000 0000 0CCF 0DDD DDDD DDDD DD00" /* ........ */ + $"0FCC CCCC CCCC CCCF 00EE EDEE EEDE EEE0" /* .. */ + $"0FCC CCCC CFFF FFCF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCC CCCC CCCC CCCF 0000 0DE0 00DE 0000" /* ....... */ + $"0FCC CCCC CCCC CCCF 0000 0DE0 00DE 0000" /* ....... */ + $"0FFF FFFF FFFF FFFF 0000 00E0 000E 0000" /* ........ */ + $"00FC CCCC CCCC CCF0 0000 0000 0000 0000" /* ......... */ + $"00FF FFFF FFFF FFF0 0000 0000 0000 0000" /* ......... */ + $"0000 0000 F000 0000 0000 0000 0000 0000" /* ............... */ + $"0000 000F 0F00 0000 0000 0000 0000 0000" /* ................ */ + $"0000 000F 0F00 0000 0000 0000 0000 0000" /* ................ */ + $"0000 000F 0F00 0000 0000 0000 0000 0000" /* ................ */ + $"FFFF FFF0 00FF FFFF F000 0000 0000 0000" /* ........ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icl4' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF FFFF FFFF FFF0 0000 0000 0000 0000" /* ......... */ + $"0FCC CCCC CCCC CCCF 0000 0000 0000 0000" /* ......... */ + $"0FCC EEEE EEEE ECCF 0000 0000 0000 0000" /* ......... */ + $"0FCE CCCC CCCC C0CF 000F F000 FF00 0000" /* ....... */ + $"0FCE CCCC CCCC C0CF 00F0 0F0F 00F0 0000" /* ....... */ + $"0FCE CCCC CCCC C0CF 00F0 0F0F 00F0 0000" /* ....... */ + $"0FCE CCCC CCCC C0CF 000F FFFF FF00 0000" /* ...... */ + $"0FCE CCCC CCCC C0CF 0000 0F0F 0000 0000" /* ......... */ + $"0FCE CCCC CCCC C0CF 000F FFFF FF00 0000" /* ...... */ + $"0FCC 0000 0000 0CCF 00F0 0F0F 00F0 0000" /* ............ */ + $"0FCC CCCC CCCC CCCF 00F0 0F0F 00F0 0000" /* ....... */ + $"0FCC CCCC CFFF FFCF 000F F000 FF00 0000" /* ....... */ + $"0FCC CCCC CCCC CCCF 0000 0000 0000 0000" /* ......... */ + $"0FCC CCCC CCCC CCCF 0000 0000 0000 0000" /* ......... */ + $"0FFF FFFF FFFF FFFF 0000 0000 0000 0000" /* ......... */ + $"00FC CCCC CCCC CCF0 0000 0000 0000 0000" /* ......... */ + $"00FF FFFF FFFF FFF0 0000 0000 0000 0000" /* ......... */ + $"0000 0000 F000 0000 0000 0000 0000 0000" /* ............... */ + $"0000 000F 0F00 0000 0000 0000 0000 0000" /* ................ */ + $"0000 000F 0F00 0000 0000 0000 0000 0000" /* ................ */ + $"0000 000F 0F00 0000 0000 0000 0000 0000" /* ................ */ + $"FFFF FFF0 00FF FFFF F000 0000 0000 0000" /* ........ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icl8' (128) { + $"0000 F9FF FFFF FFFF FFF9 0000 0000 0000" /* ........ */ + $"00F9 FFFF FFFF FFFF F900 0000 0000 0000" /* ........ */ + $"0000 FF2B 2B2B 2B2B 2BFF 0000 0000 0000" /* ..++++++...... */ + $"00FF 2B2B 2B2B 2B2B FF00 0000 0000 0000" /* .++++++....... */ + $"0000 FF2B FCFC FCFC 2BFF 0000 0000 0000" /* ..++...... */ + $"00FF 2BFC FCFC FC2B FF00 0000 0000 0000" /* .++....... */ + $"0000 FF2B FC2A 2AF5 2BFF 0000 0000 0000" /* ..+**+...... */ + $"00FF 2BFC 2A2A F52B FF00 0000 0000 0000" /* .+**+....... */ + $"0000 FF2B FCF5 F5F5 2BFF 0000 0000 0000" /* ..++...... */ + $"00FF 2BFC F5F5 F52B FF00 0000 0000 0000" /* .++....... */ + $"0000 FF2B 2B2B 2B2B 2BFF 0000 0000 0000" /* ..++++++...... */ + $"00FF 2B2B 2B2B 2B2B FF00 0000 0000 0000" /* .++++++....... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF 0000 00FF" /* ... */ + $"FFFF FFFF FFFF FFFF FFFF FFFA FAFA FA00" /* . */ + $"FF2B 2B2B 2B2B 2B2B 2BD8 2BFF FAFA FAFF" /* +++++++++ */ + $"2B2B 2B2B 2B2B 2B2B D82B FF00 0000 FA00" /* +++++++++.... */ + $"FF2B 2B2B 2B2B 2B2B 2B2B 2BFF 0000 00FF" /* ++++++++++... */ + $"2B2B 2B2B 2B2B 2B2B 2B2B FF00 0000 FA00" /* ++++++++++.... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF 0000 00FF" /* ... */ + $"FFFF FFFF FFFF FFFF FFFF FF00 0000 FA00" /* .... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 FA00" /* ............... */ + $"0000 0000 0000 0000 00FF FFFF FFFF FFFF" /* ......... */ + $"FFFF FFFF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 0000 00FF F9FC F9FC F9FC" /* ......... */ + $"F9FC F9FF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 0000 00FF F9FC F9FC F9FC" /* ......... */ + $"F9FC F9FF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 0000 00FF F9FC F9FC F9FC" /* ......... */ + $"F9FC F9FF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 0000 00FF F9FC F9FC F9FC" /* ......... */ + $"F9FC F9FF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 0000 00FF F9FC F9FC F9FC" /* ......... */ + $"F9FC F9FF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 0000 00FF F9FC F9FC F9FC" /* ......... */ + $"F9FC F9FF 0000 0000 0000 0000 0000 FA00" /* ........... */ + $"0000 0000 0000 FFFF FFFF FFFF FFFF FFFF" /* ...... */ + $"FFFF FFFF FFFF FFFA FAFA FAFA FAFA 0000" /* .. */ + $"0000 0000 0000 FFF9 F9F9 F9F9 F9F9 F9F9" /* ...... */ + $"F9F9 F9F9 F9F9 FF00 0000 0000 0000 FA00" /* ........ */ + $"0000 0000 0000 FFF9 F9F9 F9F9 F9F9 F9F9" /* ...... */ + $"F9F9 F9F9 F9F9 FF00 0000 0000 0000 FA00" /* ........ */ + $"0000 0000 0000 FFFF FFFF FFFF FFFF FFFF" /* ...... */ + $"FFFF FFFF FFFF FF00 0000 0000 0000 FA00" /* ........ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 FA00" /* ............... */ + $"F9FF FFFF FFFF F900 0000 00F9 FFFF FFFF" /* .... */ + $"FFF9 0000 0000 F9FF FFFF FFFF F900 FA00" /* ...... */ + $"FF2B 2B2B 2B2B FF00 0000 00FF 2B2B 2B2B" /* +++++....++++ */ + $"2BFF 0000 0000 FF2B 2B2B 2B2B FF00 FA00" /* +....+++++.. */ + $"FF2B FCFC F52B FF00 0000 00FF 2BFC FCF5" /* ++....+ */ + $"2BFF 0000 0000 FF2B FCFC F52B FF00 FA00" /* +....++.. */ + $"FF2B FC2A F52B FF00 0000 00FF 2BFC 2AF5" /* +*+....+* */ + $"2BFF 0000 0000 FF2B FC2A F52B FFFA FA00" /* +....+*+. */ + $"FF2B FC2A F52B FFFA FAFA FAFF 2BFC 2AF5" /* +*++* */ + $"2BFF FAFA FAFA FF2B FC2A F52B FF00 0000" /* ++*+... */ + $"FF2B F5F5 F52B FF00 0000 00FF 2BF5 F5F5" /* ++....+ */ + $"2BFF 0000 0000 FF2B F5F5 F52B FF00 0000" /* +....++... */ + $"FFE3 2BFC FC2B FF00 0000 00FF E32B FCFC" /* ++....+ */ + $"2BFF 0000 0000 FFE3 2BFC FC2B FF00 0000" /* +....++... */ + $"FF2B 2B2B 2B2B FF00 0000 00FF 2B2B 2B2B" /* +++++....++++ */ + $"2BFF 0000 0000 FF2B 2B2B 2B2B FF00 0000" /* +....+++++... */ + $"00FF FFFF FFFF 0000 0000 0000 FFFF FFFF" /* ....... */ + $"FF00 0000 0000 00FF FFFF FFFF 0000 0000" /* .......... */ +}; + +data 'icl8' (131) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"FCFC FCFC FCFC FCFC FCFC FCFC FCFC FCFC" /* */ + $"FCFC FCFC FCFC FCFC FCFC 0000 0000 0000" /* ...... */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5" /* */ + $"F5F5 F5F5 F5F5 F5F5 F5FC FC00 0000 0000" /* ..... */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5" /* */ + $"F5F5 F5F5 F5F5 F5F5 F5FC F6FC 0000 0000" /* .... */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5" /* */ + $"F5F5 F5F5 F5F5 F5F5 F5FC F6F6 FC00 0000" /* ... */ + $"FCF5 F5F5 F5FF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF F5F5 F5F5 F5F5 F5FC F6F6 F6FC 0000" /* .. */ + $"FCF5 F5F5 FF2B 2B2B 2B2B 2B2B 2B2B 2B2B" /* +++++++++++ */ + $"2B2B FFF5 F5F5 F5F5 F5FC F6F6 F6F6 FC00" /* ++. */ + $"FCF5 F5F5 FF2B 2BFF FFFF FFFF FFFF FFFF" /* ++ */ + $"2B2B FFF5 F5F5 F5F5 F5FC FCFC FCFC FCFC" /* ++ */ + $"FCF5 F5F5 FF2B FF2A 2A2A 2A2A 2A2A 2A2A" /* +********* */ + $"002B FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* .+ */ + $"FCF5 F5F5 FF2B FF2A 2A2A 2A2A 2A2A 2A2A" /* +********* */ + $"002B FFF5 F5F5 F5F5 FFF5 F5F5 F5F5 F5FC" /* .+ */ + $"FCF5 F5F5 FF2B FF2A 2A2A 2A2A 2A2A 2A2A" /* +********* */ + $"002B FFF5 F5F5 F5F5 F5FF F5F5 F5F5 F5FC" /* .+ */ + $"FCF5 F5F5 FF2B FF2A 2A2A 2A2A 2A2A 2A2A" /* +********* */ + $"002B FFF5 FFFF FFFF FFFF FFF5 F5F5 F5FC" /* .+ */ + $"FCF5 F5F5 FF2B FF2A 2A2A 2A2A 2A2A 2A2A" /* +********* */ + $"002B FFF5 F5F5 F5F5 F5FF F5F5 F5F5 F5FC" /* .+ */ + $"FCF5 F5F5 FF2B FF2A 2A2A 2A2A 2A2A 2A2A" /* +********* */ + $"002B FFF5 F5F5 FFF5 FFF5 F5F5 F5F5 F5FC" /* .+ */ + $"FCF5 F5F5 FF2B 2BF5 F5F5 F5F5 F5F5 F5F5" /* ++ */ + $"2B2B FFF5 F5FF F5F5 F5F5 F5F5 F5F5 F5FC" /* ++ */ + $"FCF5 F5F5 FF2B 2B2B 2B2B 2B2B 2B2B 2B2B" /* +++++++++++ */ + $"2B2B FFF5 FFFF FFFF FFFF FFF5 F5F5 F5FC" /* ++ */ + $"FCF5 F5F5 FF2B 2B2B 2B2B 2B2B FFFF FFFF" /* +++++++ */ + $"FF2B FFF5 F5FF F5F5 F5F5 F5F5 F5F5 F5FC" /* + */ + $"FCF5 F5F5 FF2B 2B2B 2B2B 2B2B 2B2B 2B2B" /* +++++++++++ */ + $"2B2B FFF5 F5F5 FFF5 F5F5 F5F5 F5F5 F5FC" /* ++ */ + $"FCF5 F5F5 FF2B 2B2B 2B2B 2B2B 2B2B 2B2B" /* +++++++++++ */ + $"2B2B FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* ++ */ + $"FCF5 F5F5 FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* */ + $"FCF5 F5F5 F5FF 2B2B 2B2B 2B2B 2B2B 2B2B" /* ++++++++++ */ + $"2BFF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* + */ + $"FCF5 F5F5 F5FF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5FF F5F5 F5F5" /* */ + $"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* */ + $"FCF5 2BF7 F8F9 FAFB FCFD FEF5 FEFD FCFB" /* + */ + $"FAF9 F8F7 2BF6 F5F5 F5F5 F5F5 F5F5 F5FC" /* + */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5" /* */ + $"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* */ + $"FCFC FCFC FCFC FCFC FCFC FCFC FCFC FCFC" /* */ + $"FCFC FCFC FCFC FCFC FCFF FFFC FCFC FCFC" /* */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icl8' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 0000 00F9 0000 0000 F900 0000 0000" /* .............. */ + $"00FF 2B2B FCFC FCFC FCFC FCFC FC2B 2BFF" /* .++++ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2BFC 2AFF FFFF 2AFF FF2A 2AF5 2BFF" /* .+****+ */ + $"00F9 F9F9 F9F9 F9F9 F9F9 F9F9 F9F9 0000" /* ... */ + $"00FF 2BFC 2A2A FF2A 2AFF 2AFF 2AF5 2BFF" /* .+******+ */ + $"0000 FCFC FCF9 FCFC FCFC F9FC FCFC FC00" /* ... */ + $"00FF 2BFC 2A2A FF2A 2AFF FF2A 2AF5 2BFF" /* .+******+ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2BFC 2AFF FFFF 2AFF 2A2A 2AF5 2BFF" /* .+*****+ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2B2B F5F5 F5F5 F5F5 F5F5 F52B 2BFF" /* .++++ */ + $"00F9 F9F9 F9F9 F9F9 F9F9 F9F9 F9F9 0000" /* ... */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 FCFC FCF9 FCFC FCFC F9FC FCFC FC00" /* ... */ + $"00FF 2B2B 2B2B 2B2B 2BFF FFFF FFFF 2BFF" /* .++++++++ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 0000 00F9 FC00 0000 F9FC 0000 0000" /* ............ */ + $"00FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* . */ + $"0000 0000 0000 FC00 0000 00FC 0000 0000" /* .............. */ + $"0000 FF2B 2B2B 2B2B 2B2B 2B2B 2B2B FF00" /* ..+++++++++++. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 FF00 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 00FF 00FF 0000 0000 0000" /* .............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 00FF 00FF 0000 0000 0000" /* .............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 00FF 00FF 0000 0000 0000" /* .............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"FFFF FFFF FFFF FF00 0000 FFFF FFFF FFFF" /* ... */ + $"FF00 0000 0000 0000 0000 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icl8' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF 2B2B FCFC FCFC FCFC FCFC FC2B 2BFF" /* .++++ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 00FF FF00 0000 FFFF 0000 0000 0000" /* ............ */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 FF00 00FF 00FF 0000 FF00 0000 0000" /* ............ */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 FF00 00FF 00FF 0000 FF00 0000 0000" /* ............ */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 00FF FFFF FFFF FFFF 0000 0000 0000" /* ......... */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 0000 00FF 00FF 0000 0000 0000 0000" /* .............. */ + $"00FF 2BFC 2A2A 2A2A 2A2A 2A2A 2AF5 2BFF" /* .+*********+ */ + $"0000 00FF FFFF FFFF FFFF 0000 0000 0000" /* ......... */ + $"00FF 2B2B F5F5 F5F5 F5F5 F5F5 F52B 2BFF" /* .++++ */ + $"0000 FF00 00FF 00FF 0000 FF00 0000 0000" /* ............ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 FF00 00FF 00FF 0000 FF00 0000 0000" /* ............ */ + $"00FF 2B2B 2B2B 2B2B 2BFF FFFF FFFF 2BFF" /* .++++++++ */ + $"0000 00FF FF00 0000 FFFF 0000 0000 0000" /* ............ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF 2B2B 2B2B 2B2B 2B2B 2B2B 2B2B 2BFF" /* .+++++++++++++ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* . */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 FF2B 2B2B 2B2B 2B2B 2B2B 2B2B FF00" /* ..+++++++++++. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 FF00 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 00FF 00FF 0000 0000 0000" /* .............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 00FF 00FF 0000 0000 0000" /* .............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 00FF 00FF 0000 0000 0000" /* .............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"FFFF FFFF FFFF FF00 0000 FFFF FFFF FFFF" /* ... */ + $"FF00 0000 0000 0000 0000 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm#' (131) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm#' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm#' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm4' (131) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm4' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm4' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm8' (131) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm8' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'icm8' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'ICN#' (128, "Application") { + $"3FC0 7F80 2040 4080 2F40 5E80 2840 5080" /* ?. @@/@^(@P */ + $"2840 5080 2040 4080 FFF1 FFFE 801F 0022" /* (@P @@.." */ + $"8011 0022 FFF1 FFE2 0000 0002 007F F002" /* .."....... */ + $"0055 5002 0055 5002 0055 5002 0055 5002" /* .UP..UP..UP..UP. */ + $"0055 5002 0055 5002 03FF FFFC 0200 0202" /* .UP..UP...... */ + $"0200 0202 03FF FE02 0000 0002 FE1F C3FA" /* ........... */ + $"8210 420A B216 42CA A214 428E A3F4 7E88" /* .B².Bʢ.B~ */ + $"8210 4208 9A13 4268 8210 4208 7C0F 81F0" /* .B..Bh.B.|. */ + $"3FC0 7F80 3FC0 7F80 3FC0 7F80 3FC0 7F80" /* ?.?.?.?. */ + $"3FC0 7F80 3FC0 7F80 FFF1 FFFE FFFF FFE2" /* ?.?. */ + $"FFF1 FFE2 FFF1 FFE2 0000 0002 007F F002" /* ....... */ + $"007F F002 007F F002 007F F002 007F F002" /* ............ */ + $"007F F002 007F F002 03FF FFFC 03FF FE02" /* ......... */ + $"03FF FE02 03FF FE02 0000 0002 FE1F C3FA" /* ......... */ + $"FE1F C3FA FE1F C3FA FE1F C3FE FFFF FFF8" /* ... */ + $"FE1F C3F8 FE1F C3F8 FE1F C3F8 7C0F 81F0" /* ...|. */ +}; + +data 'ICN#' (130, "DEBUG") { + $"3FC0 7F80 2040 4080 2F40 5E80 2F40 5E80" /* ?. @@/@^/@^ */ + $"2040 4080 FFF1 FFE0 B01F 603E 80F1 03E2" /* @@.`>. */ + $"FFF1 FFE2 0000 0002 0003 2AA2 0003 1542" /* ......*...B */ + $"000F CAA2 0010 2542 0010 22A2 0013 2142" /* ..ʢ..%B.."..!B */ + $"0017 A0A2 0013 2042 0017 A022 0013 2002" /* .... B..".. . */ + $"0017 A002 0010 2002 001F E002 FE1F C3FA" /* ..... ..... */ + $"8210 420A BA17 42EA BA17 42EE BBF7 7EE8" /* .Bº.B.B~ */ + $"8210 4208 FE1F C3F8 8610 4208 FE1F C3F8" /* .B...B.. */ + $"3FC0 7F80 3FC0 7F80 3FC0 7F80 3FC0 7F80" /* ?.?.?.?. */ + $"3FC0 7F80 FFF1 FFE0 FFFF FFFE FFF1 FFE2" /* ?. */ + $"FFF1 FFE2 0000 0002 0003 2AA2 0003 1FC2" /* ......*... */ + $"000F CFE2 001F E7C2 001F E3E2 001F E1C2" /* ........ */ + $"001F E0E2 001F E042 001F E022 001F E002" /* ....B.."... */ + $"001F E002 001F E002 001F E002 FE1F C3FA" /* .......... */ + $"FE1F C3FA FE1F C3FA FE1F C3FE FFFF FFF8" /* ... */ + $"FE1F C3F8 FE1F C3F8 FE1F C3F8 FE1F C3F8" /* .... */ +}; + +data 'ICN#' (131, "Document") { + $"0000 0000 0000 0000 0000 0000 FFFF FFC0" /* ............ */ + $"8000 0060 8000 0050 8000 0048 87FF C044" /* ..`..P..HD */ + $"8800 2042 89FF 207F 8A00 A001 8A00 A081" /* . B .... */ + $"8A00 A041 8A00 AFE1 8A00 A041 8A00 A281" /* .A..A. */ + $"89FF 2401 8800 2FE1 880F A401 8800 2201" /* $../...". */ + $"8800 2001 8FFF E001 8400 4001 87FF C001" /* . ...@.. */ + $"8010 0001 8AEE A001 8000 0001 FFFF FFFF" /* ....... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 FFFF FFC0" /* ............ */ + $"FFFF FFE0 FFFF FFF0 FFFF FFF8 FFFF FFFC" /* */ + $"FFFF FFFE FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'ICN#' (132, "IP Number Document") { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 3FFE 0000" /* ............?.. */ + $"4001 0420 4FF9 0630 5005 0630 5765 7FFC" /* @.. O.0P..0We. */ + $"5255 3FFE 5265 0630 5745 0630 5005 0630" /* RU?Re.0WE.0P..0 */ + $"4FF9 7FFC 4001 3FFE 407D 0630 4001 0630" /* O.@.?@}.0@..0 */ + $"4001 0630 7FFF 0210 2002 0000 3FFE 0000" /* @..0... ...?.. */ + $"0080 0000 0140 0000 0140 0000 0140 0000" /* ....@...@...@.. */ + $"FE3F 8000 0000 0000 0000 0000 0000 0000" /* ?............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 3FFE 0000" /* ............?.. */ + $"7FFF 0420 7FFF 0630 7FFF 0630 7FFF 7FFC" /* .. ..0..0.. */ + $"7FFF 3FFE 7FFF 0630 7FFF 0630 7FFF 0630" /* .?..0..0..0 */ + $"7FFF 7FFC 7FFF 3FFE 7FFF 0630 7FFF 0630" /* ...?..0..0 */ + $"7FFF 0630 7FFF 0210 3FFE 0000 3FFE 0000" /* ..0...?..?.. */ + $"0080 0000 0140 0000 0140 0000 0140 0000" /* ....@...@...@.. */ + $"FE3F 8000 0000 0000 0000 0000 0000 0000" /* ?............. */ +}; + +data 'ICN#' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 3FFE 0000" /* ............?.. */ + $"4001 0000 4FF9 0000 5005 18C0 5005 2520" /* @...O..P..P.% */ + $"5005 2520 5005 1FC0 5005 0500 5005 1FC0" /* P.% P..P...P.. */ + $"4FF9 2520 4001 2520 407D 18C0 4001 0000" /* O% @.% @}.@... */ + $"4001 0000 7FFF 0000 2002 0000 3FFE 0000" /* @...... ...?.. */ + $"0080 0000 0140 0000 0140 0000 0140 0000" /* ....@...@...@.. */ + $"FE3F 8000 0000 0000 0000 0000 0000 0000" /* ?............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 3FFE 0000" /* ............?.. */ + $"7FFF 0000 7FFF 0000 7FFF 18C0 7FFF 3DE0" /* .........= */ + $"7FFF 3DE0 7FFF 1FC0 7FFF 0700 7FFF 1FC0" /* .=....... */ + $"7FFF 3DE0 7FFF 3DE0 7FFF 18C0 7FFF 0000" /* .=.=..... */ + $"7FFF 0000 7FFF 0000 3FFE 0000 3FFE 0000" /* ......?..?.. */ + $"0080 0000 0140 0000 0140 0000 0140 0000" /* ....@...@...@.. */ + $"FE3F 8000 0000 0000 0000 0000 0000 0000" /* ?............. */ +}; + +data 'ics#' (128) { + $"01F8 0204 02F4 0284 0284 0204 0FFF 7C01" /* .........|. */ + $"8201 B3FF A202 A200 82AA 9A00 8200 7C00" /* .....|. */ + $"01F8 03FC 03FC 03FC 03FC 03FC 0FFF 7FFF" /* ........ */ + $"FFFF FFFF FE02 FE00 FEAA FE00 FE00 7C00" /* ....|. */ +}; + +data 'ics#' (131) { + $"0000 FFF8 800C 9F0A A08F AE89 A8BD A889" /* ...  */ + $"A091 A6BD A091 9F01 8001 FFFF 0000 0000" /* ...... */ + $"0000 FFF8 FFFC FFFE FFFF FFFF FFFF FFFF" /* .. */ + $"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000" /* .... */ +}; + +data 'ics#' (132) { + $"0000 0000 0000 3E00 4124 597E 5124 5124" /* ......>.A$Y~Q$Q$ */ + $"417E 4D24 4100 3E00 0800 1400 1400 A3AA" /* A~M$A.>....... */ + $"0000 0000 0000 7F00 7F24 7F7E 7F24 7F24" /* .........$.~.$.$ */ + $"7F7E 7F24 7F00 3E00 0800 1400 1400 E3FE" /* .~.$..>....... */ +}; + +data 'ics#' (133) { + $"0000 0000 0000 3E00 4122 5955 513E 5114" /* ......>.A"YUQ>Q. */ + $"413E 4D55 4122 3E00 0800 1400 1400 A3AA" /* A>MUA">....... */ + $"0000 0000 0000 7F00 7F22 7F77 7F3E 7F1C" /* .........".w.>.. */ + $"7F3E 7F77 7F22 3E00 0800 1400 1400 E3FE" /* .>.w.">....... */ +}; + +data 'ics4' (128) { + $"0000 00DE EEEE ED00 0000 00EC CCCC CE00" /* ........ */ + $"0000 00EC EEEE CE00 0000 00EC ECC0 CE00" /* ........ */ + $"0000 00EC E000 CE00 0000 00EC CCCC CE00" /* ......... */ + $"0000 DEEE EEEE EEEE DEEE EEDC CCCC C3CE" /* .. */ + $"ECCC CCEC CCCC CCCE ECEE 0CEE EEEE EEEE" /* . */ + $"ECEC 0CE0 0000 00D0 ECEC 0CE0 0000 00D0" /* ........ */ + $"EC00 0CED DDDD DDD0 E9CE ECE0 0000 0000" /* ...... */ + $"ECCC CCE0 0000 0000 0EEE EE00 0000 0000" /* .......... */ +}; + +data 'ics4' (131) { + $"0000 0000 0000 0000 EEEE EEEE EEEE E000" /* ......... */ + $"E000 0000 0000 EE00 E0DF FFFF D000 ECE0" /* ....... */ + $"E0FC CCCC F000 EEEE E0FC FF0C F000 F00E" /* .... */ + $"E0FC FC0C F0FF FF0E E0FC FC0C F000 F00E" /* ..... */ + $"E0FC 000C F00F 000E E0F8 CFFC F0FF FF0E" /* ...... */ + $"E0FC CCCC F00F 000E E00F FFFF 0000 000E" /* ........ */ + $"E000 0000 0000 000E EEEE EEEE EEEE FFEE" /* ....... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'ics4' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0DFF FFFD 0000 0000" /* ............. */ + $"0FCC CCCF 00F0 0F00 0FCE E0CF 0FFF FFF0" /* ...... */ + $"0FCE C0CF 00F0 0F00 0FCE C0CF 00F0 0F00" /* ........ */ + $"0FC0 00CF 0FFF FFF0 0FCC EECF 00F0 0F00" /* ....... */ + $"0FCC CCCF 0000 0000 00FF FFF0 0000 0000" /* .......... */ + $"0000 F000 0000 0000 000F 0F00 0000 0000" /* ............... */ + $"000F 0F00 0000 0000 CDE0 00EE EDDD CCC0" /* ......... */ +}; + +data 'ics4' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0DFF FFFD 0000 0000" /* ............. */ + $"0FCC CCCF 00F0 00F0 0FCE E0CF 0F0F 0F0F" /* ........ */ + $"0FCE C0CF 00FF FFF0 0FCE C0CF 000F 0F00" /* ....... */ + $"0FC0 00CF 00FF FFF0 0FCC EECF 0F0F 0F0F" /* ........ */ + $"0FCC CCCF 00F0 00F0 00FF FFF0 0000 0000" /* ........ */ + $"0000 F000 0000 0000 000F 0F00 0000 0000" /* ............... */ + $"000F 0F00 0000 0000 CDE0 00EE EDDD CCC0" /* ......... */ +}; + +data 'ics8' (128) { + $"0000 0000 0000 F9FC FCFC FCFC FCF9 0000" /* ........ */ + $"0000 0000 0000 FC2B 2B2B 2B2B 2BFC 0000" /* ......++++++.. */ + $"0000 0000 0000 FC2B FCFC FCFC 2BFC 0000" /* ......++.. */ + $"0000 0000 0000 FC2B FC2B 2B00 2BFC 0000" /* ......+++.+.. */ + $"0000 0000 0000 FC2B FC00 0000 2BFC 0000" /* ......+...+.. */ + $"0000 0000 0000 FC2B 2B2B 2B2B 2BFC 0000" /* ......++++++.. */ + $"0000 0000 F9FC FCFC FCFC FCFC FCFC FCFC" /* .... */ + $"F9FC FCFC FCFC F92B 2B2B 2B2B 2BD8 2BFC" /* +++++++ */ + $"FC2B 2B2B 2B2B FC2B 2B2B 2B2B 2B2B 2BFC" /* +++++++++++++ */ + $"FC2B FCFC 002B FCFC FCFC FCFC FCFC FCFC" /* +.+ */ + $"FC2B FC2B 002B FC00 0000 0000 0000 F900" /* ++.+........ */ + $"FC2B FC2B 002B FC00 0000 0000 0000 F900" /* ++.+........ */ + $"FC2B 0000 002B FCF9 F9F9 F9F9 F9F9 F900" /* +...+. */ + $"FCE3 2BFC FC2B FC00 0000 0000 0000 0000" /* ++......... */ + $"FC2B 2B2B 2B2B FC00 0000 0000 0000 0000" /* +++++......... */ + $"00FC FCFC FCFC 0000 0000 0000 0000 0000" /* ........... */ +}; + +data 'ics8' (131) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"FCFC FCFC FCFC FCFC FCFC FCFC FC00 0000" /* ... */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5F5 FCFC 0000" /* .. */ + $"FCF5 F9FF FFFF FFFF F9F5 F5F5 FC2B FC00" /* +. */ + $"FCF5 FF2B 2B2B 2B2B FFF5 F5F5 FCFC FCFC" /* +++++ */ + $"FCF5 FF2B FFFF 002B FFF5 F5F5 FFF5 F5FC" /* +.+ */ + $"FCF5 FF2B FF2A 002B FFF5 FFFF FFFF F5FC" /* +*.+ */ + $"FCF5 FF2B FF2A 002B FFF5 F5F5 FFF5 F5FC" /* +*.+ */ + $"FCF5 FF2B 0000 002B FFF5 F5FF F5F5 F5FC" /* +...+ */ + $"FCF5 FFE3 2BFF FF2B FFF5 FFFF FFFF F5FC" /* ++ */ + $"FCF5 FF2B 2B2B 2B2B FFF5 F5FF F5F5 F5FC" /* +++++ */ + $"FCF5 F5FF FFFF FFFF F5F5 F5F5 F5F5 F5FC" /* */ + $"FCF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FC" /* */ + $"FCFC FCFC FCFC FCFC FCFC FCFC FFFF FCFC" /* */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'ics8' (132) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00F9 FFFF FFFF FFF9 0000 0000 0000 0000" /* ......... */ + $"00FF 2B2B 2B2B 2BFF 0000 FF00 00FF 0000" /* .+++++...... */ + $"00FF 2BFC FCF5 2BFF 00FF FFFF FFFF FF00" /* .++.. */ + $"00FF 2BFC 2AF5 2BFF 0000 FF00 00FF 0000" /* .+*+...... */ + $"00FF 2BFC 2AF5 2BFF 0000 FF00 00FF 0000" /* .+*+...... */ + $"00FF 2BF5 F5F5 2BFF 00FF FFFF FFFF FF00" /* .++.. */ + $"00FF 2B2B FCFC 2BFF 0000 FF00 00FF 0000" /* .+++...... */ + $"00FF 2B2B 2B2B 2BFF 0000 0000 0000 0000" /* .+++++........ */ + $"0000 FFFF FFFF FF00 0000 0000 0000 0000" /* ........... */ + $"0000 0000 FF00 0000 0000 0000 0000 0000" /* ............... */ + $"0000 00FF 00FF 0000 0000 0000 0000 0000" /* .............. */ + $"0000 00FF 00FF 0000 0000 0000 0000 0000" /* .............. */ + $"2BF9 FC00 0000 FCFC FCF9 F9F9 2B2B 2B00" /* +...+++. */ +}; + +data 'ics8' (133) { + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"00F9 FFFF FFFF FFF9 0000 0000 0000 0000" /* ......... */ + $"00FF 2B2B 2B2B 2BFF 0000 FF00 0000 FF00" /* .+++++...... */ + $"00FF 2BFC FCF5 2BFF 00FF 00FF 00FF 00FF" /* .++.... */ + $"00FF 2BFC 2AF5 2BFF 0000 FFFF FFFF FF00" /* .+*+... */ + $"00FF 2BFC 2AF5 2BFF 0000 00FF 00FF 0000" /* .+*+...... */ + $"00FF 2BF5 F5F5 2BFF 0000 FFFF FFFF FF00" /* .++... */ + $"00FF 2B2B FCFC 2BFF 00FF 00FF 00FF 00FF" /* .+++.... */ + $"00FF 2B2B 2B2B 2BFF 0000 FF00 0000 FF00" /* .+++++...... */ + $"0000 FFFF FFFF FF00 0000 0000 0000 0000" /* ........... */ + $"0000 0000 FF00 0000 0000 0000 0000 0000" /* ............... */ + $"0000 00FF 00FF 0000 0000 0000 0000 0000" /* .............. */ + $"0000 00FF 00FF 0000 0000 0000 0000 0000" /* .............. */ + $"2BF9 FC00 0000 FCFC FCF9 F9F9 2B2B 2B00" /* +...+++. */ +}; + +data 'MBAR' (256, "New Menus", purgeable, preload) { + $"0005 0001 0200 0201 0202 0203" /* ............ */ +}; + +data 'MDEF' (128, "Picture MDEF") { + $"600A 0000 4D44 4546 0080 0000 48E7 E0C8" /* `..MDEF...H */ + $"4EBA 00F2 41FA FFEA 2008 A055 4EBA 0090" /* N.A .UN. */ + $"4CDF 1307 4EFA 00F2 41FA FFD6 D1FC 0000" /* L..N.A.. */ + $"04FB 2008 A055 4E75 48E7 0600 594F 206F" /* . .UNuH..YO o */ + $"0010 226F 0014 2C2F 0018 1E98 1F58 0001" /* .."o..,/....X.. */ + $"1F58 0002 1F58 0003 2A17 7400 6044 1218" /* .X...X..*.t.`D.. */ + $"1001 0240 0080 670C D201 1001 4880 48C0" /* ...@.g....HH */ + $"D480 6028 1E81 1F58 0001 1001 0240 0040" /* Ԁ`(..X.....@.@ */ + $"670C 3017 E548 E240 48C0 D480 600E 1F58" /* g.0.H@HԀ`..X */ + $"0002 1F58 0003 2417 E58A E282 DDB1 2800" /* ...X..$.ݱ(. */ + $"5385 4A85 6EB8 584F 4CDF 0060 4E75 48E7" /* SJnXOL.`NuH */ + $"1020 2440 202C 0000 260A 9680 6740 4A80" /* . $@ ,..&–g@J */ + $"661C 422C 0004 303C A89F A746 2F08 303C" /* f.B,..0<F/.0< */ + $"A198 A346 B1DF 56C0 4400 1940 0004 2F03" /* FVD..@../. */ + $"2F0A 4EBA FF44 2F00 4EBA FF4E 4FEF 000C" /* /ND/.NNO.. */ + $"294A 0000 4A2C 0004 6704 7001 A198 4CDF" /* )J..J,..g.p.L */ + $"0408 4E75 41FA FEFA D1FC 0000 04F6 2008" /* ..NuA... . */ + $"A055 C18C 4E75 4E75 4E56 0000 48E7 0030" /* UNuNuNV..H.0 */ + $"266E 0014 246E 0010 302E 0018 670A 5340" /* &n..$n..0...gS@ */ + $"6714 5340 6728 6032 2F0A 2F0B 4EB9 0000" /* g.S@g(`2//.N.. */ + $"01E2 504F 6024 2F2E 0008 2F2E 000C 2F0A" /* .PO`$/.../.../ */ + $"2F0B 4EB9 0000 033A 4FEF 0010 600C 2F0A" /* /.N...:O..`./ */ + $"2F0B 4EB9 0000 0180 504F 4CDF 0C00 4E5E" /* /.N...POL..N^ */ + $"205F 4FEF 0012 4ED0 846D 6169 6E00 0000" /* _O..NЄmain... */ + $"4E56 FFF8 48E7 1030 266E 0008 95CA 2053" /* NVH.0&n.. S */ + $"3610 594F 3F03 A9BC 205F 2448 200A 672A" /* 6.YO?. _$H g* */ + $"2052 2D68 0002 FFF8 2D68 0006 FFFC 302E" /* R-h..-h..0. */ + $"FFFE 906E FFFA 2053 3140 0002 302E FFFC" /* n S1@..0. */ + $"906E FFF8 2053 3140 0004 4CDF 0C08 4E5E" /* n S1@..L..N^ */ + $"4E75 8D44 6F53 697A 654D 6573 7361 6765" /* NuDoSizeMessage */ + $"0000 4E56 FFF0 48E7 1830 282E 0008 95CA" /* ..NVH.0(... */ + $"97CB 2044 2050 3610 594F 3F03 A9BC 205F" /* D P6.YO?. _ */ + $"2448 200A 6736 47F9 0000 0254 200B 672C" /* $H g6G...T .g, */ + $"2D4A FFF4 2D6E 000C FFF8 2044 2050 2D68" /* -J-n.. D P-h */ + $"000A FFFC 486E FFF0 A874 206E FFF0 2F28" /* .Hnt n/( */ + $"0018 2F0B 486E FFF4 42A7 ABCA 4CDF 0C18" /* ../.HnBL.. */ + $"4E5E 4E75 8D44 6F44 7261 774D 6573 7361" /* N^NuDoDrawMessa */ + $"6765 0000 4E56 FFD0 2F0A 246E 0008 486E" /* ge..NV/$n..Hn */ + $"FFF0 A874 200A 6700 00B4 4A92 6706 4AAA" /* t g..Jg.J */ + $"0004 6604 6000 00A6 2F12 2F2A 0004 A8F6" /* ..f.`.././*.. */ + $"70FF B0AA 0008 6700 0094 4AAE 000C 675E" /* p..g..J..g^ */ + $"486E FFFA AA19 486E FFEA AA1A 2D6E FFFA" /* Hn.Hn.-n */ + $"FFF4 3D6E FFFE FFF8 554F 2F2E 000C 486E" /* =nUO/...Hn */ + $"FFEA 486E FFF4 303C 0C19 AAA2 101F 672E" /* Hn0<....g. */ + $"486E FFF4 AA14 206E FFF0 4868 0002 206E" /* Hn. nHh.. n */ + $"FFF0 4868 0002 2F2A 0004 2F2A 0004 3F3C" /* Hh../*...*..?< */ + $"0009 42A7 A8EC 486E FFFA AA14 602E 486E" /* .BHn.`.Hn */ + $"FFD8 A898 3F3C 000F A89C 486E FFD0 2F3C" /* ب?<..Hn/< */ + $"0004 0000 4EB9 0000 04B8 486E FFD0 A89D" /* ....N...HnШ */ + $"2F2A 0004 A8A2 486E FFD8 A899 245F 4E5E" /* /*..Hnب$_N^ */ + $"205F 4FEF 000C 4ED0 8F44 5241 5754 4845" /* _O..NЏDRAWTHE */ + $"4D45 4E55 5052 4F43 0000 4E56 FFF4 48E7" /* MENUPROC..NVH */ + $"1F30 2C2E 000C 266E 0014 7E00 95CA 7A00" /* .0,...&n..~.z. */ + $"2D6E 0010 FFFC 7800 206E 0008 2050 70FF" /* -n..x. n.. Pp */ + $"B0A8 000A 6600 012A 206E 0008 2050 3610" /* .f..* n.. P6. */ + $"594F 2F3C 5052 4354 3F03 A9A0 205F 2E08" /* YO/<PRCT?. _.. */ + $"4A87 6606 4253 6000 0108 2047 A029 594F" /* Jf.BS`... G)YO */ + $"2F07 4EB9 0000 04AA 201F E688 3A00 2047" /* /.N... .:. G */ + $"2450 554F 2F2E FFFC 2F06 A8AD 101F 6700" /* $PUO/./...g. */ + $"00AA 2046 3010 916E FFFC 2046 3028 0002" /* . F0.n F0(.. */ + $"916E FFFE 7600 601E 554F 2F2E FFFC 3043" /* nv.`.UO/.0C */ + $"2008 E788 204A D1C0 4850 A8AD 101F 6704" /* . JHP..g. */ + $"3803 5244 5243 B645 6C04 4A44 67DA 4A53" /* 8.RDRCEl.JDgJS */ + $"6F30 B853 672C 3013 5340 48C0 E788 204A" /* o0Sg,0.S@H J */ + $"D1C0 2D50 FFF4 2D68 0004 FFF8 486E FFF4" /* -P-h..Hn */ + $"2046 3F28 0002 2046 3F10 A8A8 486E FFF4" /* F?(.. F?.Hn */ + $"A8A4 B853 6766 3684 4A53 6760 3013 5340" /* Sgf6JSg`0.S@ */ + $"48C0 E788 204A D1C0 2D50 FFF4 2D68 0004" /* H J-P-h.. */ + $"FFF8 486E FFF4 2046 3F28 0002 2046 3F10" /* Hn F?(.. F?. */ + $"A8A8 486E FFF4 A8A4 6032 4A53 6F2E 3013" /* Hn`2JSo.0. */ + $"5340 48C0 E788 204A D1C0 2D50 FFF4 2D68" /* S@H J-P-h */ + $"0004 FFF8 486E FFF4 2046 3F28 0002 2046" /* ..Hn F?(.. F */ + $"3F10 A8A8 486E FFF4 A8A4 4253 2047 A02A" /* ?.HnBS G* */ + $"4CDF 0CF8 4E5E 4E75 8F44 6F43 686F 6F73" /* L.N^NuDoChoos */ + $"654D 6573 7361 6765 0000 225F 205F A025" /* eMessage.."_ _% */ + $"2E80 6A02 4297 4ED1 4E56 0000 594F 2F3C" /* .j.BNNV..YO/< */ + $"5041 5423 3F2E 000A A9A0 226E 000C 201F" /* PAT#?..©"n.. . */ + $"671C 2040 2050 3018 322E 0008 6710 B240" /* g. @ P0.2...g.@ */ + $"620C 5341 6704 5048 60F8 22D8 2290 4E5E" /* b.SAg.PH`""N^ */ + $"205F 508F 4ED0 0000 0000 0000 0000 0640" /* _PN.........@ */ + $"9F8B 8840 5240 7F40 47" /* @R@.@G */ +}; + +data 'MENU' (1, "Apple Menu", preload) { + $"0001 0000 0000 0000 0000 FFFF FFFB 0114" /* ............ */ + $"1541 626F 7574 2042 6574 7465 7254 656C" /* .About BetterTel */ + $"6E65 742E 2E2E 0000 0000 012D 0000 0000" /* net........-.... */ + $"00" /* . */ +}; + +data 'MENU' (130, "Open Special Sub-Menu", preload) { + $"0082 0000 0000 0000 0000 FFFF FFFB 0946" /* .........F */ + $"6176 6F72 6974 6573 1145 6469 7420 4661" /* avorites.Edit Fa */ + $"766F 7269 7465 732E 2E2E 0000 0000 012D" /* vorites........- */ + $"0000 0000 00" /* ..... */ +}; + +data 'MENU' (131, "Preferences SubMenu", preload) { + $"0083 0000 0000 0000 0000 FFFF FFFF 0100" /* ........... */ + $"0647 6C6F 6261 6C00 0000 0009 5465 726D" /* .Global....Term */ + $"696E 616C 7300 0000 0008 5365 7373 696F" /* inals.....Sessio */ + $"6E73 0000 0000 0A46 5450 2053 6572 7665" /* ns....FTP Serve */ + $"7200 0000 0009 4654 5020 5573 6572 7300" /* r....FTP Users. */ + $"0000 0000" /* .... */ +}; + +data 'MENU' (256, "File") { + $"0100 0000 0000 0000 0000 FFFB DAE3 0446" /* ...........F */ + $"696C 6510 4F70 656E 2043 6F6E 6E65 6374" /* ile.Open Connect */ + $"696F 6EC9 0000 0000 012D 0000 0000 0543" /* ion.....-.....C */ + $"6C6F 7365 0000 0000 012D 0000 0000 094C" /* lose.....-....L */ + $"6F61 6420 5365 74C9 0000 0000 0953 6176" /* oad Set....Sav */ + $"6520 5365 74C9 0000 0000 1753 6176 6520" /* e Set.....Save */ + $"5365 7420 7769 7468 204D 6163 726F 732E" /* Set with Macros. */ + $"2E2E 0000 0000 012D 0000 0000 144D 6163" /* .......-.....Mac */ + $"4269 6E61 7279 2049 4920 456E 6162 6C65" /* Binary II Enable */ + $"6400 0000 0001 2D00 0000 000C 5368 6F77" /* d.....-.....Show */ + $"2046 5450 204C 6F67 0000 0000 154F 6E65" /* FTP Log.....One */ + $"2D54 696D 6520 5061 7373 776F 7264 732E" /* -Time Passwords. */ + $"2E2E 0000 0000 012D 0000 0000 1250 7269" /* .......-.....Pri */ + $"6E74 2053 656C 6563 7469 6F6E 2E2E 2E00" /* nt Selection.... */ + $"0000 000D 5061 6765 2053 6574 7570 2E2E" /* ....Page Setup.. */ + $"2E00 0000 0019 5361 7665 2053 656C 6563" /* ......Save Selec */ + $"7469 6F6E 2074 6F20 4669 6C65 2E2E 2E00" /* tion to File.... */ + $"0000 000E 5570 6C6F 6164 2046 696C 652E" /* ....Upload File. */ + $"2E2E 0000 0000 012D 0000 0000 0451 7569" /* .......-.....Qui */ + $"7400 0000 0000" /* t..... */ +}; + +data 'MENU' (257, "Edit") { + $"0101 0000 0000 0000 0000 FFFF B5FB 0445" /* ...........E */ + $"6469 7404 556E 646F 0000 0000 012D 0000" /* dit.Undo.....-.. */ + $"0000 0343 7574 0000 0000 0443 6F70 7900" /* ...Cut.....Copy. */ + $"0000 0005 5061 7374 6500 0000 0005 436C" /* ....Paste.....Cl */ + $"6561 7200 0000 000A 436F 7079 2054 6162" /* ear....Copy Tab */ + $"6C65 0000 0000 0E54 7970 6520 5365 6C65" /* le.....Type Sele */ + $"6374 696F 6E00 0000 0001 2D00 0000 000B" /* ction.....-..... */ + $"5365 7420 4D61 6372 6F73 C900 0000 0001" /* Set Macros..... */ + $"2D00 0000 000E 5072 6566 6572 656E 6365" /* -.....Preference */ + $"732E 2E2E 0000 0000 0C54 6572 6D69 6E61" /* s........Termina */ + $"6C73 2E2E 2E00 0000 0001 2D00 0000 000D" /* ls........-..... */ + $"4654 5020 5365 7276 6572 2E2E 2E00 0000" /* FTP Server...... */ + $"000C 4654 5020 5573 6572 732E 2E2E 0000" /* ..FTP Users..... */ + $"0000 00" /* ... */ +}; + +data 'MENU' (259, "Connections") { + $"0103 0000 0000 0000 0000 FFFF FFF4 0657" /* ...........W */ + $"696E 646F 770C 4E65 7874 2053 6573 7369" /* indow.Next Sessi */ + $"6F6E 004E 0000 1443 6861 6E67 6520 5769" /* on.N...Change Wi */ + $"6E64 6F77 2054 6974 6C65 C900 0000 0001" /* ndow Title..... */ + $"2D00 0000 0000" /* -..... */ +}; + +data 'MENU' (512, "nFile", preload) { + $"0200 0000 0000 0000 0000 FFFB DAE3 0446" /* ...........F */ + $"696C 6510 4F70 656E 2043 6F6E 6E65 6374" /* ile.Open Connect */ + $"696F 6EC9 004F 0000 012D 0000 0000 0543" /* ion.O...-.....C */ + $"6C6F 7365 0057 0000 012D 0000 0000 094C" /* lose.W...-....L */ + $"6F61 6420 5365 74C9 0000 0000 0953 6176" /* oad Set....Sav */ + $"6520 5365 74C9 0000 0000 1753 6176 6520" /* e Set.....Save */ + $"5365 7420 7769 7468 204D 6163 726F 732E" /* Set with Macros. */ + $"2E2E 0000 0000 012D 0000 0000 144D 6163" /* .......-.....Mac */ + $"4269 6E61 7279 2049 4920 456E 6162 6C65" /* Binary II Enable */ + $"6400 0000 0001 2D00 0000 000C 5368 6F77" /* d.....-.....Show */ + $"2046 5450 204C 6F67 0000 0000 154F 6E65" /* FTP Log.....One */ + $"2D54 696D 6520 5061 7373 776F 7264 732E" /* -Time Passwords. */ + $"2E2E 0000 0000 012D 0000 0000 1250 7269" /* .......-.....Pri */ + $"6E74 2053 656C 6563 7469 6F6E 2E2E 2E00" /* nt Selection.... */ + $"5000 000D 5061 6765 2053 6574 7570 2E2E" /* P...Page Setup.. */ + $"2E00 0000 0019 5361 7665 2053 656C 6563" /* ......Save Selec */ + $"7469 6F6E 2074 6F20 4669 6C65 2E2E 2E00" /* tion to File.... */ + $"0000 000E 5570 6C6F 6164 2046 696C 652E" /* ....Upload File. */ + $"2E2E 0000 0000 012D 0000 0000 0451 7569" /* .......-.....Qui */ + $"7400 5100 0000" /* t.Q... */ +}; + +data 'MENU' (515, "nConnections", preload) { + $"0203 0000 0000 0000 0000 FFFF FFF8 0657" /* ...........W */ + $"696E 646F 770C 4E65 7874 2053 6573 7369" /* indow.Next Sessi */ + $"6F6E 0000 0000 012D 0000 0000 00" /* on.....-..... */ +}; + +data 'MENU' (1000, "Keypad") { + $"03E8 0000 0000 0080 0000 FFFF FFFF 034B" /* .........K */ + $"6579 00" /* ey. */ +}; + +data 'MENU' (1002, "Function") { + $"03EA 0000 0000 0080 0000 FFFF FFFF 0446" /* .........F */ + $"756E 6300" /* unc. */ +}; + +data 'MENU' (129, "Size", preload) { + $"0081 0000 0000 0000 0000 FFFF FEFF 0453" /* ..........S */ + $"697A 6501 3400 0000 0001 3900 0000 0002" /* ize.4.....9..... */ + $"3130 0000 0000 0231 3100 0000 0002 3132" /* 10.....11.....12 */ + $"0000 0000 0231 3400 0000 0002 3138 0000" /* .....14.....18.. */ + $"0000 012D 0000 0000 084F 7468 6572 2E2E" /* ...-.....Other.. */ + $"2E00 0000 0000" /* ...... */ +}; + +data 'MENU' (128, "Font") { + $"0080 0000 0000 0000 0000 FFFF FFFF 0446" /* ..........F */ + $"6F6E 7400" /* ont. */ +}; + +data 'MENU' (1004) { + $"03EC 0000 0000 0000 0000 FFFF FFFF 0100" /* ........... */ + $"00" /* . */ +}; + +data 'MENU' (1005) { + $"03ED 0000 0000 0000 0000 FFFF FFFF 0100" /* ........... */ + $"00" /* . */ +}; + +data 'MENU' (258, "Session", preload) { + $"0102 0000 0000 0000 0000 FFFE EFD7 0753" /* ...........S */ + $"6573 7369 6F6E 0942 6163 6B73 7061 6365" /* essionBackspace */ + $"0000 0000 0644 656C 6574 6500 0000 0001" /* .....Delete..... */ + $"2D00 0000 0010 5365 7420 5363 7265 656E" /* -.....Set Screen */ + $"2053 697A 65C9 0000 0000 012D 0000 0000" /* Size.....-.... */ + $"0B53 6574 7570 204B 6579 73C9 0000 0000" /* .Setup Keys.... */ + $"0446 6F6E 7400 1B80 0009 426F 6C64 2046" /* .Font...Bold F */ + $"6F6E 7400 1B85 0004 5369 7A65 001B 8100" /* ont....Size... */ + $"0643 6F6C 6F72 C900 0000 000D 414E 5349" /* .Color.....ANSI */ + $"2043 6F6C 6F72 2E2E 2E00 0000 0001 2D00" /* Color........-. */ + $"0000 0018 4361 7074 7572 6520 5365 7373" /* ....Capture Sess */ + $"696F 6E20 746F 2046 696C 6500 0000 0000" /* ion to File..... */ + $"1051 7565 7565 2050 7269 6E74 204A 6F62" /* .Queue Print Job */ + $"7300 0000 0011 4967 6E6F 7265 2046 6F72" /* s.....Ignore For */ + $"6D20 4665 6564 7300 0000 0001 2D00 0000" /* m Feeds.....-... */ + $"000A 4C6F 6361 6C20 4563 686F 0000 0000" /* .Local Echo.... */ + $"0957 7261 7020 4D6F 6465 0000 0000 1242" /* Wrap Mode.....B */ + $"5344 2034 2E33 2043 5220 6D61 7070 696E" /* SD 4.3 CR mappin */ + $"6700 0000 0014 414E 5349 2063 6F6C 6F72" /* g.....ANSI color */ + $"2073 6571 7565 6E63 6573 0000 0000 0F58" /* sequences.....X */ + $"7465 726D 2073 6571 7565 6E63 6573 0000" /* term sequences.. */ + $"0000 1138 2D62 6974 2063 6F6E 6E65 6374" /* ...8-bit connect */ + $"696F 6E73 0000 0000 0C52 656D 6170 204B" /* ions.....Remap K */ + $"6579 7061 6400 0000 0013 454D 4143 5320" /* eypad.....EMACS */ + $"6172 726F 7720 6D61 7070 696E 6700 0000" /* arrow mapping... */ + $"0018 4D61 7020 5067 5570 2F50 6744 6F77" /* ..Map PgUp/PgDow */ + $"6E2F 486F 6D65 2F45 6E64 0000 0000 0B54" /* n/Home/End.....T */ + $"7261 6E73 6C61 7469 6F6E 001B 8400 1843" /* ranslation....C */ + $"6C65 6172 2053 6372 6565 6E20 5361 7665" /* lear Screen Save */ + $"7320 4C69 6E65 7300 0000 000E 5265 7365" /* s Lines.....Rese */ + $"7420 5465 726D 696E 616C 0000 0000 0B4A" /* t Terminal.....J */ + $"756D 7020 5363 726F 6C6C 0000 0000 0B54" /* ump Scroll.....T */ + $"454B 2050 6167 652E 2E2E 0000 0000 1B54" /* EK Page........T */ + $"454B 2066 6F72 6D20 6665 6564 2063 6C65" /* EK form feed cle */ + $"6172 7320 7363 7265 656E 0000 0000 0F52" /* ars screen.....R */ + $"656D 6170 2044 656C 2074 6F20 5E44 0000" /* emap Del to ^D.. */ + $"0000 1041 6C6C 6F77 2062 6F6C 6466 6163" /* ...Allow boldfac */ + $"696E 6700 0000 0012 5573 6520 636F 6C6F" /* ing.....Use colo */ + $"7220 666F 7220 626F 6C64 0000 0000 1455" /* r for bold.....U */ + $"7365 2069 6E76 6572 7365 2066 6F72 2062" /* se inverse for b */ + $"6F6C 6400 0000 000C 4967 6E6F 7265 2062" /* old.....Ignore b */ + $"6565 7073 0000 0000 00" /* eeps..... */ +}; + +data 'MENU' (516, "nNetwork", preload) { + $"0204 0000 0000 0000 0000 FFFF AFF7 034E" /* ...........N */ + $"6574 1053 656E 6420 4654 5020 436F 6D6D" /* et.Send FTP Comm */ + $"616E 6400 4600 000F 5365 6E64 2049 5020" /* and.F...Send IP */ + $"4164 6472 6573 7300 4900 0001 2D00 0000" /* Address.I...-... */ + $"0015 5365 6E64 2022 4172 6520 596F 7520" /* ..Send "Are You */ + $"5468 6572 653F 2200 5400 0013 5365 6E64" /* There?".T...Send */ + $"2022 4162 6F72 7420 4F75 7470 7574 2200" /* "Abort Output". */ + $"4100 0018 5365 6E64 2022 496E 7465 7272" /* A...Send "Interr */ + $"7570 7420 5072 6F63 6573 7322 0000 0000" /* upt Process".... */ + $"1653 656E 6420 2245 7261 7365 2043 6861" /* .Send "Erase Cha */ + $"7261 6374 6572 2200 4800 0011 5365 6E64" /* racter".H...Send */ + $"2022 4572 6173 6520 4C69 6E65 2200 5500" /* "Erase Line".U. */ + $"000B 5365 6E64 2022 5359 4E43 2200 0000" /* ..Send "SYNC"... */ + $"0012 5365 6E64 2022 4252 4B20 2842 7265" /* ..Send "BRK (Bre */ + $"616B 2922 0000 0000 0E53 656E 6420 4950" /* ak)".....Send IP */ + $"202B 2053 594E 4300 5900 0001 2D00 0000" /* + SYNC.Y...-... */ + $"000F 5375 7370 656E 6420 4E65 7477 6F72" /* ..Suspend Networ */ + $"6B00 0000 0001 2D00 0000 0010 5368 6F77" /* k.....-.....Show */ + $"2049 5020 4164 6472 6573 73C9 0000 0000" /* IP Address.... */ + $"00" /* . */ +}; + +data 'MENU' (132, "Translation SubMenu", preload) { + $"0084 0000 0000 0000 0000 FFFF FFFF 0100" /* ........... */ + $"00" /* . */ +}; + +data 'MENU' (513, "nEdit", preload) { + $"0201 0000 0000 0000 0000 FFFF B5FB 0445" /* ...........E */ + $"6469 7404 556E 646F 005A 0000 012D 0000" /* dit.Undo.Z...-.. */ + $"0000 0343 7574 0058 0000 0443 6F70 7900" /* ...Cut.X...Copy. */ + $"4300 0005 5061 7374 6500 5600 0005 436C" /* C...Paste.V...Cl */ + $"6561 7200 0000 000A 436F 7079 2054 6162" /* ear....Copy Tab */ + $"6C65 0042 0000 0E54 7970 6520 5365 6C65" /* le.B...Type Sele */ + $"6374 696F 6E00 4400 0001 2D00 0000 000B" /* ction.D...-..... */ + $"5365 7420 4D61 6372 6F73 C900 4D00 0001" /* Set Macros.M... */ + $"2D00 0000 000E 5072 6566 6572 656E 6365" /* -.....Preference */ + $"732E 2E2E 0000 0000 0C54 6572 6D69 6E61" /* s........Termina */ + $"6C73 2E2E 2E00 0000 0001 2D00 0000 000D" /* ls........-..... */ + $"4654 5020 5365 7276 6572 2E2E 2E00 0000" /* FTP Server...... */ + $"000C 4654 5020 5573 6572 732E 2E2E 0000" /* ..FTP Users..... */ + $"0000 00" /* ... */ +}; + +data 'MENU' (514, "Session", preload) { + $"0202 0000 0000 0000 0000 FFFE EFD7 0753" /* ...........S */ + $"6573 7369 6F6E 0942 6163 6B73 7061 6365" /* essionBackspace */ + $"0000 0000 0644 656C 6574 6500 0000 0001" /* .....Delete..... */ + $"2D00 0000 0010 5365 7420 5363 7265 656E" /* -.....Set Screen */ + $"2053 697A 65C9 0000 0000 012D 0000 0000" /* Size.....-.... */ + $"0B53 6574 7570 204B 6579 73C9 0053 0000" /* .Setup Keys.S.. */ + $"0446 6F6E 7400 1B80 0009 426F 6C64 2046" /* .Font...Bold F */ + $"6F6E 7400 1B85 0004 5369 7A65 001B 8100" /* ont....Size... */ + $"0643 6F6C 6F72 C900 0000 000D 414E 5349" /* .Color.....ANSI */ + $"2043 6F6C 6F72 2E2E 2E00 0000 0001 2D00" /* Color........-. */ + $"0000 0018 4361 7074 7572 6520 5365 7373" /* ....Capture Sess */ + $"696F 6E20 746F 2046 696C 6500 004B 0000" /* ion to File..K.. */ + $"1051 7565 7565 2050 7269 6E74 204A 6F62" /* .Queue Print Job */ + $"7300 0000 0011 4967 6E6F 7265 2046 6F72" /* s.....Ignore For */ + $"6D20 4665 6564 7300 0000 0001 2D00 0000" /* m Feeds.....-... */ + $"000A 4C6F 6361 6C20 4563 686F 0000 0000" /* .Local Echo.... */ + $"0957 7261 7020 4D6F 6465 0000 0000 1242" /* Wrap Mode.....B */ + $"5344 2034 2E33 2043 5220 6D61 7070 696E" /* SD 4.3 CR mappin */ + $"6700 0000 0014 414E 5349 2063 6F6C 6F72" /* g.....ANSI color */ + $"2073 6571 7565 6E63 6573 0000 0000 0F58" /* sequences.....X */ + $"7465 726D 2073 6571 7565 6E63 6573 0000" /* term sequences.. */ + $"0000 1138 2D62 6974 2063 6F6E 6E65 6374" /* ...8-bit connect */ + $"696F 6E73 0000 0000 0C52 656D 6170 204B" /* ions.....Remap K */ + $"6579 7061 6400 0000 0013 454D 4143 5320" /* eypad.....EMACS */ + $"6172 726F 7720 6D61 7070 696E 6700 0000" /* arrow mapping... */ + $"0018 4D61 7020 5067 5570 2F50 6744 6F77" /* ..Map PgUp/PgDow */ + $"6E2F 486F 6D65 2F45 6E64 0000 0000 0B54" /* n/Home/End.....T */ + $"7261 6E73 6C61 7469 6F6E 001B 8400 1843" /* ranslation....C */ + $"6C65 6172 2053 6372 6565 6E20 5361 7665" /* lear Screen Save */ + $"7320 4C69 6E65 7300 0000 000E 5265 7365" /* s Lines.....Rese */ + $"7420 5465 726D 696E 616C 0052 0000 0B4A" /* t Terminal.R...J */ + $"756D 7020 5363 726F 6C6C 004A 0000 0B54" /* ump Scroll.J...T */ + $"454B 2050 6167 652E 2E2E 0000 0000 1B54" /* EK Page........T */ + $"454B 2066 6F72 6D20 6665 6564 2063 6C65" /* EK form feed cle */ + $"6172 7320 7363 7265 656E 0000 0000 0F52" /* ars screen.....R */ + $"656D 6170 2044 656C 2074 6F20 5E44 0000" /* emap Del to ^D.. */ + $"0000 1041 6C6C 6F77 2062 6F6C 6466 6163" /* ...Allow boldfac */ + $"696E 6700 0000 0012 5573 6520 636F 6C6F" /* ing.....Use colo */ + $"7220 666F 7220 626F 6C64 0000 0000 1455" /* r for bold.....U */ + $"7365 2069 6E76 6572 7365 2066 6F72 2062" /* se inverse for b */ + $"6F6C 6400 0000 000C 4967 6E6F 7265 2062" /* old.....Ignore b */ + $"6565 7073 0000 0000 00" /* eeps..... */ +}; + +data 'MENU' (133, "Font") { + $"0085 0000 0000 0000 0000 FFFF FFFF 0446" /* ..........F */ + $"6F6E 7400" /* ont. */ +}; + +data 'MENU' (260, "Network", preload) { + $"0104 0000 0000 0000 0000 FFFF AFF7 034E" /* ...........N */ + $"6574 1053 656E 6420 4654 5020 436F 6D6D" /* et.Send FTP Comm */ + $"616E 6400 0000 000F 5365 6E64 2049 5020" /* and.....Send IP */ + $"4164 6472 6573 7300 0000 0001 2D00 0000" /* Address.....-... */ + $"0015 5365 6E64 2022 4172 6520 596F 7520" /* ..Send "Are You */ + $"5468 6572 653F 2200 0000 0013 5365 6E64" /* There?".....Send */ + $"2022 4162 6F72 7420 4F75 7470 7574 2200" /* "Abort Output". */ + $"0000 0018 5365 6E64 2022 496E 7465 7272" /* ....Send "Interr */ + $"7570 7420 5072 6F63 6573 7322 0000 0000" /* upt Process".... */ + $"1653 656E 6420 2245 7261 7365 2043 6861" /* .Send "Erase Cha */ + $"7261 6374 6572 2200 0000 0011 5365 6E64" /* racter".....Send */ + $"2022 4572 6173 6520 4C69 6E65 2200 0000" /* "Erase Line"... */ + $"000B 5365 6E64 2022 5359 4E43 2200 0000" /* ..Send "SYNC"... */ + $"0012 5365 6E64 2022 4252 4B20 2842 7265" /* ..Send "BRK (Bre */ + $"616B 2922 0000 0000 0E53 656E 6420 4950" /* ak)".....Send IP */ + $"202B 2053 594E 4300 0000 0001 2D00 0000" /* + SYNC.....-... */ + $"000F 5375 7370 656E 6420 4E65 7477 6F72" /* ..Suspend Networ */ + $"6B00 0000 0001 2D00 0000 0012 5368 6F77" /* k.....-.....Show */ + $"2049 5020 4164 6472 6573 732E 2E2E 0000" /* IP Address..... */ + $"0000 00" /* ... */ +}; + +data 'NFNT' (9484, "%NCSA VT 12") { + $"9000 0000 00D9 0007 FFFF FFFE 0007 000E" /* .......... */ + $"03C7 000C 0002 0000 0035 0000 0000 0000" /* ........5...... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0015 4800" /* ..............H. */ + $"0000 0008 0408 FE00 0008 1100 2000 0005" /* ........... ... */ + $"4402 B294 0000 0000 0000 0000 0000 0000" /* D............. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 C000 0000 0003 0000 0022 D600 0000" /* .........."... */ + $"0000 00DC 0010 000C 0000 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0001 C1C0 000A C800 0000 0008 0408" /* ............ */ + $"0000 0008 1100 2000 0000 4404 0000 0000" /* ...... ...D..... */ + $"0030 0000 0000 0000 0000 0000 0000 0E00" /* .0.............. */ + $"0000 0000 0000 0000 0000 0001 0000 0000" /* ................ */ + $"0004 0000 0010 0000 0000 0000 015C D539" /* .............\9 */ + $"2C52 2000 02E5 CE17 CDF7 3800 01C0 3BCE" /* ,R ...8..; */ + $"F7FE E8C3 1846 2EF3 BCEF C631 8C7F 2048" /* .F.1. H */ + $"0015 4800 0000 0008 0408 0000 0008 1100" /* ..H............. */ + $"2000 0007 39DF 8BA2 2210 0D48 0482 0190" /* ...9ߋ"..H.. */ + $"6890 C034 4820 1300 D103 DC00 7AD0 3DC0" /* h4H ....z= */ + $"0001 1003 FF01 1EE7 0004 8064 0000 0039" /* ........d...9 */ + $"CE78 0013 B700 015C DFD6 B252 A800 031E" /* x....\ֲR... */ + $"3134 1018 C408 2220 4631 8C21 18C3 286E" /* 14..." F1!.(n */ + $"318C 6312 4631 8C43 2054 000A F9C4 4000" /* 1c.F1C T.@. */ + $"0008 0408 0000 0008 1100 2000 0008 C630" /* .......... ...0 */ + $"8C62 4129 5648 0845 2A6D B109 2558 8452" /* bA)VH.E*m%XR */ + $"BC81 0805 63CE 2F00 5220 0090 A032 2A01" /* ..c/.R .2*. */ + $"2318 8004 8044 0000 0046 31A0 0024 9900" /* #..D...F1.$. */ + $"149C D552 D261 7100 0514 2154 2018 C410" /* .Raq...!T .. */ + $"102F 4631 8C21 08C3 4857 318C 6302 4631" /* ./F1!.HW1c.F1 */ + $"8C43 1062 0095 490A 4181 2908 0408 0000" /* C.b.IA)..... */ + $"0008 1100 2000 0008 C630 CC62 0000 0030" /* .... ...0b...0 */ + $"0000 0000 0000 0000 0000 1491 1405 6221" /* .............b! */ + $"2E01 5220 2109 F009 0A01 2318 8000 0044" /* ..R !.#...D */ + $"0800 0046 31A0 0037 2E20 009C 8531 D421" /* ...F1.7. .1! */ + $"7100 0514 2697 BC27 46A7 C850 C7D0 8C21" /* q...&'FPЌ! */ + $"08C3 8846 B18C 6302 4631 5445 1040 01CA" /* .ÈFc.F1TE.@. */ + $"C988 4249 A908 0408 01FC 0008 1100 2000" /* ɈBI........ . */ + $"00C8 C610 AC62 F7BD EF7B 9CE7 3A52 B39C" /* ..b{:R */ + $"E73A 318C 5339 1275 6596 800F D260 2204" /* :1S9.ue.`". */ + $"489C 8AF9 2318 B9C4 804E 710B 4046 31A2" /* H#.ĀNq.@F1 */ + $"8000 0001 235C 8F98 8821 AFC0 0914 41F8" /* ...#\!.A */ + $"6248 C6C0 0496 FE30 8FBD 3FC3 0846 71F4" /* bH.0?.Fq */ + $"7CE2 4631 2289 0840 03F5 4F0A 7249 6A7F" /* |F1".@.OrIj. */ + $"FFFF 0003 F80F FFFF E488 8538 C61E 9C63" /* ...䈅8.c */ + $"18C6 318C 6318 C652 CC63 18C6 318C 5057" /* .1c.Rc.1PW */ + $"89FD 6558 8002 7EBB FC03 F8A4 4A51 1EE8" /* eX.~.JQ. */ + $"D664 FC44 8914 A046 31BD 4000 00FA A35C" /* dD.F1@..\ */ + $"8515 5421 210F 8914 8110 6248 BC27 C896" /* .T!!...bH'Ȗ */ + $"C630 8C21 18C3 8846 3184 6212 4631 5111" /* 0!.ÈF1b.F1Q. */ + $"0840 01CA 8577 1DBF 2400 C008 0000 0008" /* .@.ʅw.$...... */ + $"1002 2857 090F FE10 8C63 18C6 318C 3FFF" /* ..(W..c.1? */ + $"FE52 8C63 18C6 318C 4051 05FB E398 800F" /* Rc.1@Q.㘀. */ + $"D335 2204 48C4 8A51 0008 DEA8 8444 72A8" /* 5".HĊQ..ިDr */ + $"507F F1A5 FFC0 0004 635C 0015 B2A1 0100" /* P...c\.... */ + $"1115 0110 6248 8410 1017 C630 8C21 18E3" /* ....bH...0!. */ + $"4846 3184 6212 4635 8921 0440 0095 0442" /* HF1b.F5!.@..B */ + $"9008 4380 C008 0000 0008 1002 3035 7D08" /* .C.......05}. */ + $"C610 8C63 18C6 318C 2108 4252 8C63 18C6" /* .c.1!.BRc. */ + $"318C 4051 22F9 6356 8004 523B 2108 48C5" /* 1@Q"cV.R;!.H */ + $"0A51 3FF5 5330 8744 82A8 5046 31A5 0000" /* Q?S0DPF1.. */ + $"0022 A35C 8056 B112 0010 5116 1114 6248" /* ."\V...Q...bH */ + $"8A88 2090 4631 8C21 18E3 2846 3184 6312" /* F1!.(F1c. */ + $"455B 8921 0440 000A 8463 1808 4100 C008" /* E[!.@.„c..A.. */ + $"0000 0008 1002 2845 1388 C630 8C63 39CE" /* ......(E.0c9 */ + $"739C 6318 C252 8C63 18C6 739C C055 3171" /* sc.Rc.sU1q */ + $"6221 0000 5220 0090 49CA 2A51 0005 5631" /* b!..R .I*Q..V1 */ + $"80C4 0454 A046 31A5 4000 0001 235C 803A" /* .TF1@...#\: */ + $"4E92 0010 60E7 EE13 9C47 3280 008F 47CE" /* N..`.G2.G */ + $"F7E0 E8DD 1FC6 2E83 A2E2 3891 893F 0241" /* ..8?.A */ + $"FC15 0442 903E 4100 C008 0000 0008 1002" /* ..B>A........ */ + $"2485 7D08 C5DF 8B9C D6B5 AD6B 9CE7 3E52" /* $}.ߋֵk>R */ + $"8B9C E739 AD6B 403B CE01 6DCE 0000 5DC0" /* 9k@;.m..] */ + $"FFFE 4EB3 EA51 000D B9CE 8044 07CB 4AC6" /* NQ..΀D.J */ + $"2E7A 8000 0000 1F5C 0010 000C 0010 2000" /* .z....\...... . */ + $"0000 0000 0080 0000 0000 0000 0000 0000" /* ............... */ + $"0001 0000 0000 0001 C3C0 000A 8442 9000" /* .........„B. */ + $"7100 C008 0000 07F8 1002 2000 2100 0080" /* q....... .!.. */ + $"0000 0000 0001 0000 0000 0000 0000 0000" /* ................ */ + $"0010 0000 2000 0000 0000 0000 0800 0001" /* .... ........... */ + $"0000 0000 0004 0000 0000 0000 0000 0000" /* ................ */ + $"035C 0000 0000 0020 0000 0000 0000 0100" /* .\..... ........ */ + $"0000 0000 0000 0000 0000 0000 8000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 C008 0000" /* ............... */ + $"0008 1002 3FE0 43C0 0080 0000 0000 0001" /* ....?C....... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0800 0006 0000 0000 0018" /* ................ */ + $"0000 0000 0000 0000 0000 035C 0000 0000" /* ...........\.... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 C008 0000 0008 1002 2000" /* ............. . */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0001 0004 0009" /* ............... */ + $"000E 0013 0019 001A 001D 0020 0025 002A" /* ........... .%.* */ + $"002C 0031 0032 0037 003C 003E 0043 0048" /* .,.1.2.7.<.>.C.H */ + $"004D 0052 0057 005C 0061 0066 0067 0069" /* .M.R.W.\.a.f.g.i */ + $"006D 0072 0076 007B 0081 0086 008B 0090" /* .m.r.v.{.... */ + $"0095 009A 009F 00A4 00A9 00AA 00AF 00B4" /* ........ */ + $"00B9 00BE 00C3 00C8 00CD 00D2 00D7 00DC" /* ........ */ + $"00E1 00E6 00EB 00F0 00F5 00FA 00FF 0102" /* ......... */ + $"0107 010A 010F 0116 011B 0121 0127 012C" /* ..........!.'., */ + $"0131 0136 013A 013F 0144 0149 014D 0151" /* .1.6.:.?.D.I.M.Q */ + $"0155 0159 0160 0167 016E 0175 017C 017C" /* .U.Y.`.g.n.u.|.| */ + $"0180 0184 018B 0192 0193 0197 019B 01A1" /* ........ */ + $"01A6 01AB 01AC 01AC 01B1 01B6 01BB 01C0" /* ........ */ + $"01C5 01CA 01CF 01D4 01D9 01DE 01E3 01E8" /* ........ */ + $"01ED 01F2 01F7 01FC 0201 0206 0208 020A" /* ........... */ + $"020D 0210 0215 021A 021F 0224 0229 022E" /* ...........$.).. */ + $"0233 0238 023D 0242 0245 0249 024E 0253" /* .3.8.=.B.E.I.N.S */ + $"0258 025D 0262 0267 026C 0271 0277 0279" /* .X.].b.g.l.q.w.y */ + $"027C 0281 0286 028B 0290 0295 029A 029F" /* .|....... */ + $"02A4 02A9 02AE 02B3 02B8 02BD 02C2 02C7" /* ........ */ + $"02CC 02D1 02D6 02DB 02E0 02E1 02E6 02EB" /* ........ */ + $"02F0 02F5 02FA 02FF 0304 0309 0309 030E" /* .......... */ + $"0313 0318 031D 0322 0325 032A 032F 0334" /* .......".%.*...4 */ + $"0336 0338 033D 0342 0347 034B 034E 0100" /* .6.8.=.B.G.K.N.. */ + $"0100 0100 0100 0100 0100 FFFF 0101 FFFF" /* ............ */ + $"0807 FFFF FFFF FFFF 0100 FFFF FFFF FFFF" /* .... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0807" /* .. */ + $"0407 0307 0207 0207 0207 0107 0407 0307" /* ................ */ + $"0307 0207 0207 0307 0207 0407 0207 0207" /* ................ */ + $"0307 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0407 0307 0207 0207 0307 0207 0107" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0407 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0207 0307 0207 0307 0207 0107 0207" /* ................ */ + $"0107 0107 0107 0107 0107 0207 0107 0107" /* ................ */ + $"0107 0107 0107 0407 0407 0107 0107 0107" /* ................ */ + $"0107 0107 0807 0407 0107 0107 0107 0407" /* ................ */ + $"0107 0107 0107 0007 0107 0407 0100 0207" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0407 0307 0307 0307 0207 0207 0207" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0307" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0106" /* ................ */ + $"0106 0107 0407 0307 0207 0207 0207 0207" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0407 0207 0207 0207 0207 0207 0207 0207" /* ................ */ + $"0207 0807 0207 0207 0207 0207 0207 0307" /* ................ */ + $"0207 0207 0207 0407 0407 0207 0207 0207" /* ................ */ + $"0307 0204 FFFF" /* .... */ +}; + +data 'NFNT' (9609, "%NCSA Special Bold") { + $"9000 0000 00D9 0006 FFFF FFF7 0006 000B" /* .......... */ + $"0328 0009 0002 0000 0035 0000 0000 0000" /* .(......5...... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0A20" /* .............. */ + $"04D5 2800 0000 0000 0000 0000 0000 0000" /* .(............. */ + $"0000 001C 0000 0000 0000 0000 0000 0000" /* ................ */ + $"3000 0000 0003 0000 0021 AD00 0000 0000" /* 0........!..... */ + $"0000 0000 0008 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 03F0 0050 0960 0044 201A" /* ........P`.D . */ + $"6009 0403 20D1 2080 6890 4006 0322 0798" /* `.. h@..". */ + $"0000 0000 0000 0000 0000 4000 0000 0004" /* ..........@..... */ + $"0000 0012 D600 0000 0000 0000 0000 FA9C" /* ............. */ + $"F667 8400 0037 3738 7F77 DCE0 0001 CE77" /* g..778.w..w */ + $"9DEF FDDB C79C 462E F3BC EFDE F71D FFE7" /* ǜF.. */ + $"4040 C006 0306 378C 0000 0000 1800 0000" /* @@...7........ */ + $"06D9 AE73 BF17 4482 52AC 9010 8A54 DB62" /* .ٮs.DR.Tb */ + $"114A B108 A529 0492 0AA7 9CF5 A07B 8003" /* .J.).§{. */ + $"2204 FFC0 4767 0004 8004 0000 0039 CE78" /* ".Gg......9x */ + $"000A AE00 2807 B000 FFFB 5D6C DF20 003F" /* .®.(..]l .? */ + $"FFFC FFFF FFF0 1FF3 FFFF FFFF FFFB C7BC" /* .Ǽ */ + $"6F3F DFFF 9FDE F7BD FFE7 E060 C006 0706" /* o?`... */ + $"019C 0000 0000 1800 0000 06DB F18C 6198" /* ..........a */ + $"C400 0000 6000 0000 0000 0000 0000 0079" /* ...`..........y */ + $"2428 EAC4 425E 02A4 4044 9402 4A80 4998" /* $(B^.@D.JI */ + $"8000 0064 0900 0046 31A0 0014 B242 03F4" /* ..d..F1..B. */ + $"9000 C2B9 6E18 6E20 0069 B9CD FEC0 F7BD" /* .¹n.n .i */ + $"B7DA 7FDE 73BC 631F C7EC 7FBB FEF7 86DE" /* .sc.. */ + $"F6ED 8F33 A02F F39E E67F B7BD EB3B CFB3" /* 3/.;ϳ */ + $"FF7B AC77 F6DA D18C 2158 C5EF 7BDE F739" /* {wь!X{9 */ + $"CE74 A567 39CE 7463 18A6 7725 FACB 2D5C" /* tg9tc.w%-\ */ + $"1FA4 F648 7F23 22BE 4998 B9C4 804E 7100" /* .H.#"IĀNq. */ + $"0046 31A2 8015 5C05 4404 9000 C7DC A418" /* .F1.\.D..ܤ. */ + $"7FF8 F86A B31B 7FF1 9DF0 600C DFFF B1BF" /* .j..`. */ + $"7B7F C7CC 7EFB F6FC E6DE F647 1B33 001F" /* {.~G.3.. */ + $"FFFF BFFF F7ED FFFF FFFE 1B7B AEF7 ECDC" /* .{ */ + $"1FFC 3D38 C631 8C63 18C6 318C A598 C631" /* .=81c.11 */ + $"8C63 18A0 AC13 F7CA B100 04F5 6BF4 8925" /* c..ʱ..k% */ + $"1294 4768 D668 FC84 8A93 207F F1B5 7FE0" /* .Ghh .. */ + $"01F8 C7F4 9000 C28E DE98 6420 F8CC B64F" /* ..Žޘd ̶O */ + $"E3DB 3EF0 37D8 DEDF F3BC 7B7B F7EC 6E7B" /* >7{{n{ */ + $"C6F6 36DE FEE2 331B 0019 DE37 F6DE F7ED" /* 63...7 */ + $"5DEF 7BCB 9B7B FBB6 46D8 118C 2118 C631" /* ]{˛{F.!.1 */ + $"8C63 187F FFFC A518 C631 8C63 18A0 A40B" /* c...1c.. */ + $"F2C7 2D00 1FA6 7643 3F29 2294 4008 DEB0" /* -..vC?)"@.ް */ + $"8684 72A4 9046 31A5 C000 0005 4404 9000" /* rF1...D.. */ + $"002F 5D0C C020 00CF BFFF FFFB 3630 1FF0" /* ./]. .Ͽ60. */ + $"18DE 7FFF E3FB FFBF EE3F C7F7 36FB B7B2" /* ..?6 */ + $"7F9F 1F9F FFFF 86FE F7BD 5DFF FFC0 DFEE" /* ..] */ + $"FEFE F6D8 118C 6118 C673 9CE7 3842 1084" /* .a.s8B. */ + $"A518 C631 8CE7 3980 AC64 E2C6 C200 08A4" /* .19d.. */ + $"4040 0929 4A94 4FF5 5331 8504 8464 9046" /* @@)JOS1.dF */ + $"31A5 0000 0042 47F4 9000 C01D 2687 8003" /* 1...BG..&. */ + $"0787 3FB8 6E73 1CED 8000 CFDF 9DEF E1DB" /* .?ns..ߝ */ + $"DD9F EE2E C3B6 E671 2312 7F8F 1F8D F3DE" /* ݟ.öq#... */ + $"F67E F797 5DBB CFC7 8DA4 545F F6D8 118B" /* ~]ǍT_. */ + $"BF17 39AD 6B5A D7BD EF7C A517 39CE 735A" /* .9kZ׽|.9sZ */ + $"D680 77A2 02D8 1C00 00BB 81FF C9D6 FA94" /* րw.... */ + $"400D BDCE 8104 07D3 2AC6 2E7A C000 0000" /* @.΁..*.z... */ + $"3C07 B000 0008 0000 0003 0180 0000 0000" /* <............. */ + $"0001 8000 0000 0000 0000 0000 0000 00C0" /* .............. */ + $"0000 0000 0008 0000 0000 0018 0E00 0003" /* ................ */ + $"0300 0000 0006 03F0 0000 0000 0000 0000" /* ............... */ + $"0200 0000 0000 0000 0000 0000 201C 0040" /* ............ ..@ */ + $"0000 0000 0000 0100 0000 4000 0000 0004" /* ..........@..... */ + $"0000 0000 0000 0000 0000 0400 0000 0000" /* ................ */ + $"0000 0006 0000 0000 0000 0003 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0070 0C00 0003 0300 0000 003C" /* .....p.........< */ + $"0000 0000 0000 0000 0000 0400 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0100 0001 8000 0000 0018 0000 0000 0000" /* ............... */ + $"0000 0000 3800 0000 0000 0000 0000 0000" /* ....8........... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0002 0005" /* ................ */ + $"000A 000F 0014 0019 001B 001F 0023 0028" /* ............#.( */ + $"002D 0030 0035 0037 003C 0041 0044 0049" /* .-.0.5.7.<.A.D.I */ + $"004E 0053 0058 005D 0062 0067 006C 006E" /* .N.S.X.].b.g.l.n */ + $"0071 0075 007A 007E 0083 0088 008D 0092" /* .q.u.z.~.... */ + $"0097 009C 00A1 00A6 00AB 00B0 00B2 00B7" /* ........ */ + $"00BC 00C1 00C6 00CB 00D0 00D5 00DA 00DF" /* ........ */ + $"00E4 00E8 00ED 00F2 00F7 00FC 0101 0106" /* .......... */ + $"0109 010D 0110 0113 0119 011B 0120 0125" /* ............ .% */ + $"012A 012F 0134 0138 013D 0142 0144 0147" /* .*...4.8.=.B.D.G */ + $"014C 014F 0154 0159 015E 0163 0168 016D" /* .L.O.T.Y.^.c.h.m */ + $"0172 0176 017B 0180 0185 018A 018F 0194" /* .r.v.{..... */ + $"0198 019A 019E 01A3 01A3 01A8 01AD 01B2" /* ........ */ + $"01B7 01BC 01C1 01C6 01CB 01D0 01D5 01DA" /* ........ */ + $"01DF 01E4 01E9 01EE 01F3 01F8 01FD 01FF" /* ........ */ + $"0201 0204 0207 020C 0211 0216 021B 0220" /* ............... */ + $"0225 022A 022F 0234 0239 023C 0240 0245" /* .%.*...4.9.<.@.E */ + $"024A 024F 0254 0259 025E 0263 0268 026E" /* .J.O.T.Y.^.c.h.n */ + $"0270 0273 0278 027D 0282 0287 028C 028F" /* .p.s.x.}.... */ + $"0292 0297 029C 02A0 02A5 02AA 02AF 02B4" /* ........ */ + $"02B8 02BC 02C1 02C6 02CB 02D0 02D1 02D6" /* ........ */ + $"02DB 02E0 02E5 02EA 02EF 02F4 02F9 02F9" /* ........ */ + $"02FE 0303 0308 030D 0312 0315 031B 031F" /* ............... */ + $"0323 0325 0327 032C 0331 0336 033C 0342" /* .#.%.'.,.1.6.<.B */ + $"0000 0100 0100 0100 0100 0100 FFFF FFFF" /* ............ */ + $"FFFF 0706 FFFF FFFF FFFF 0100 FFFF FFFF" /* .... */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"0706 0306 0206 0106 0106 0106 0106 0306" /* ................ */ + $"0206 0306 0106 0106 0106 0106 0206 0206" /* ................ */ + $"0106 0306 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0206 0106 0206 0106 0206 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0306 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0206 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0306 0206 0306 0206 0106" /* ................ */ + $"0306 0106 0106 0106 0106 0106 0206 0106" /* ................ */ + $"0106 0306 0106 0106 0306 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0206 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0306 0306 0106 0106 0100" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0306 0206 0206 0206 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0206 0206 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0306 0206 0106 0106 0106" /* ................ */ + $"0106 0106 0206 0306 0106 0106 0206 0106" /* ................ */ + $"0106 0106 0106 0206 0206 0106 0106 0106" /* ................ */ + $"0106 0406 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0706 0106 0106 0106 0106 0106" /* ................ */ + $"0206 0106 0206 0206 0306 0306 0106 0106" /* ................ */ + $"0106 0106 0106 0000" /* ........ */ +}; + +data 'NFNT' (9481, "%NCSA VT 9") { + $"9000 0000 00D9 0006 FFFF FFF7 0006 000B" /* .......... */ + $"031D 0009 0002 0000 0034 0000 0000 0000" /* ........4...... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 002B 4E22 0000" /* ...........+N".. */ + $"0101 047E 0000 0104 8020 0000 0510 026A" /* ...~.... .....j */ + $"9400 0000 0000 0000 0000 0000 0000 0000" /* ............... */ + $"000E 0000 0000 0000 0000 0000 0000 1800" /* ................ */ + $"0000 0001 8000 0010 D680 0000 0000 0000" /* .......ր...... */ + $"0000 0010 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0001 4852 0812 9101 0400 0000 0104" /* ....HR......... */ + $"8020 0000 0028 04B0 0022 100D 3004 8201" /* ...(.."..0.. */ + $"9068 9040 3448 2003 0191 03CC 0000 0000" /* h@4H ....... */ + $"0000 0000 0000 2000 0000 0002 0000 0009" /* ...... ........ */ + $"6B00 0000 0000 0000 0000 D539 EC98 4000" /* k.........9@. */ + $"0B97 385F 77DC E000 1CE7 79DE FFDD 1863" /* .8_w..y.c */ + $"08C5 DE77 9DF8 C631 8FF8 D115 CC42 149A" /* .w1.B. */ + $"9101 0400 0000 0104 8020 0000 C739 DF8B" /* ....... ..9ߋ */ + $"A241 2956 4808 452A 6DB1 08A5 5884 5294" /* A)VH.E*m.XR */ + $"8249 0553 CE7A D03D C001 9102 7FE0 23B3" /* I.Sz=...# */ + $"8002 4002 0000 001C E73C 0005 5700 1403" /* .@.....<..W... */ + $"C000 DFD6 B2A5 5200 0C78 C4D0 8063 1041" /* .ֲR..xЀc.A */ + $"2318 C631 8423 1865 0DE6 318C 6248 C62A" /* #.1#.e.1bH* */ + $"8868 6B81 4853 8896 A101 0401 F800 0104" /* hkHS...... */ + $"8024 8885 28C6 30CC 6200 0000 3000 0000" /* $(0b...0... */ + $"0000 0000 0000 003C 9214 7562 212F 0152" /* .......<.ub!/.R */ + $"2022 4A01 2540 24CC 4000 0032 0480 0023" /* "J.%@$@..2..# */ + $"18D0 000A 5921 01FA 4000 8552 D442 E200" /* ..Y!.@.RB. */ + $"1450 855E F063 1ABE 83D8 C611 8421 1869" /* .P^c..!.i */ + $"0AD6 318C 6048 C624 88A4 47EB 4BB8 E3F2" /* 1`H$GK */ + $"4101 0400 0000 0104 8028 5709 08C6 10AC" /* A.......(W.. */ + $"62F7 BDEF 7B9C E73A 52B3 9CE7 3A31 8C53" /* b{:R:1S */ + $"3B92 FD65 96AE 0FD2 7B24 3F91 915F 24CC" /* ;e.{$?_$ */ + $"5CE2 4027 3880 0023 18D1 400A AE02 A202" /* \@'8.#.@®.. */ + $"4000 8FB9 4843 5F9F 1451 1A41 889D 1100" /* @.HC_.Q.A.. */ + $"455F FA11 F7A7 F871 08CE 3E8F 9C48 C624" /* E_.q.>H$ */ + $"5124 4380 7214 8084 3FFF FF80 07E0 01FF" /* Q$Cr.?.. */ + $"FFF0 357D 1FFE 1E9C 6318 C631 8C63 18C6" /* 5}..c.1c. */ + $"52CC 6318 C631 8C50 5609 FBE5 5880 027A" /* Rc.1PVX.z */ + $"B5FA 4492 894A 23B4 6B34 7E42 4549 903F" /* DJ#k4~BEI? */ + $"F8DA BFF0 00FC 63FA 4000 8515 B542 4200" /* ڿ.c@..BB. */ + $"2452 07E1 8922 F0BE 89E8 C611 8423 1C69" /* $R.".#.i */ + $"08C6 308C 4248 C6A4 2222 4114 2318 C084" /* .0BHƤ""A.#. */ + $"1030 0400 0000 0104 0228 4513 88C6 108C" /* .0.......(E.. */ + $"6318 C631 8C3F FFFE 528C 6318 C631 8C50" /* c.1?Rc.1P */ + $"5205 F963 9680 0FD3 3B21 9F94 914A 2004" /* R.c.;!J . */ + $"6F58 4342 3952 4823 18D2 E000 0002 A202" /* oXCB9RH#..... */ + $"4000 0056 B224 0200 2454 4451 8922 1041" /* @..V$..$TDQ".A */ + $"0108 C631 8423 1C65 08C6 308C 6248 AB6A" /* ..1#.e.0bHj */ + $"2422 4000 2214 83E4 1030 0400 0000 0104" /* $"@."..0...... */ + $"0224 857D 08C6 308C 6339 CE73 9C21 0842" /* .$}.0c9s!.B */ + $"528C 6318 C673 9CC0 5632 7163 6100 0452" /* Rc.sV2qca..R */ + $"2020 0494 A54A 27FA A998 C282 4232 4823" /* .J'‚B2H# */ + $"18D2 8000 0021 23FA 4000 803A 4D18 0020" /* .Ҁ..!#@.:M.. */ + $"C39F B84E 711C EA00 08E8 F9DE FC1D 1BA3" /* ßNq..... */ + $"F8C5 D074 5C47 1231 27F1 C02A 2214 8007" /* t\G.1'*".. */ + $"1030 0400 001F 8104 0220 0021 08C5 DF8B" /* .0...... .!.ߋ */ + $"9CD6 B5AD 6BDE F7BE 528B 9CE7 39AD 6B40" /* ֵkR9k@ */ + $"3BD1 016C 0E00 005D C0FF E4EB 7D4A 2006" /* ;.l...]}J . */ + $"DEE7 4082 03E9 9563 173D 6000 0000 1E03" /* @.c.=`..... */ + $"C000 0010 0000 0020 4000 0000 0000 0200" /* ...... @....... */ + $"0000 0000 0000 0000 0000 0008 0000 0000" /* ................ */ + $"0001 0000 0000 0000 0030 0400 0000 0104" /* .........0...... */ + $"023F E043 C000 0000 0000 0000 0100 0000" /* .?C........... */ + $"0000 0000 0000 0000 100E 0020 0000 0000" /* ........... .... */ + $"0000 0080 0000 2000 0000 0002 0000 0000" /* ..... ......... */ + $"0000 0000 0000 0200 0000 0000 0000 0040" /* ...............@ */ + $"0000 0000 0000 0400 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0030 0400 0000 7F04 0220 0001 2000 0000" /* .0....... .. ... */ + $"0000 0000 0200 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0080 0000 C000" /* .............. */ + $"0000 000C 0000 0000 0000 0000 0000 1C00" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0001 0004 0009 000E 0013" /* ............... */ + $"0018 0019 001C 001F 0024 0029 002B 0030" /* .........$.).+.0 */ + $"0031 0035 003A 003C 0041 0046 004B 0050" /* .1.5.:.<.A.F.K.P */ + $"0055 005A 005F 0064 0065 0067 006A 006F" /* .U.Z._.d.e.g.j.o */ + $"0072 0077 007C 0081 0086 008B 0090 0095" /* .r.w.|..... */ + $"009A 009F 00A4 00A5 00AA 00AF 00B4 00B9" /* ........ */ + $"00BE 00C3 00C8 00CD 00D2 00D7 00DC 00E1" /* ........ */ + $"00E6 00EB 00F0 00F5 00FA 00FC 0100 0102" /* .......... */ + $"0105 0105 010A 010F 0114 0119 011E 0123" /* ..............# */ + $"0126 012B 0130 0135 0138 013B 013F 0143" /* .&.+.0.5.8.;.?.C */ + $"0149 014F 0155 015B 0161 0167 016B 016E" /* .I.O.U.[.a.g.k.n */ + $"0174 017A 017B 017F 0183 0189 018E 0193" /* .t.z.{...... */ + $"0194 0194 0199 019E 01A3 01A8 01AD 01B2" /* ........ */ + $"01B7 01BC 01C1 01C6 01CB 01D0 01D5 01DA" /* ........ */ + $"01DF 01E4 01E9 01EE 01F0 01F2 01F5 01F8" /* ........ */ + $"01FD 0202 0207 020C 0211 0216 021B 0220" /* .............. */ + $"0225 022A 022D 0231 0236 023B 0240 0245" /* .%.*.-.1.6.;.@.E */ + $"024A 024F 0254 0259 025F 0261 0264 0269" /* .J.O.T.Y._.a.d.i */ + $"026E 0273 0278 027D 0280 0283 0288 028D" /* .n.s.x.}.... */ + $"0291 0296 029B 02A0 02A5 02A9 02AD 02B2" /* ........ */ + $"02B7 02BC 02C1 02C2 02C7 02CC 02D1 02D6" /* ........ */ + $"02DB 02E0 02E5 02EA 02EA 02EF 02F4 02F9" /* ........ */ + $"02FE 0303 0306 030C 0310 0314 0316 0318" /* ............... */ + $"031D 0322 0327 032D 0333 0100 0100 0100" /* ...".'.-.3...... */ + $"0100 0100 0100 FFFF FFFF FFFF 0706 FFFF" /* ........ */ + $"FFFF FFFF 0100 FFFF FFFF FFFF FFFF FFFF" /* .. */ + $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* */ + $"FFFF FFFF FFFF FFFF FFFF 0706 0306 0206" /* ...... */ + $"0106 0106 0106 0106 0306 0206 0306 0106" /* ................ */ + $"0106 0206 0106 0306 0206 0106 0306 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0306" /* ................ */ + $"0206 0206 0106 0206 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0306 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0306 0206 0306 0206 0806 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0206 0106 0106 0106 0106" /* ................ */ + $"0106 0306 0306 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0306 0106 0106 0106 0306 0106 0106" /* ................ */ + $"0106 0006 0106 0306 0100 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0306" /* ................ */ + $"0206 0206 0206 0106 0106 0106 0106 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0206 0206 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0106" /* ................ */ + $"0306 0206 0106 0106 0106 0106 0106 0206" /* ................ */ + $"0306 0106 0106 0206 0106 0106 0106 0106" /* ................ */ + $"0206 0206 0106 0106 0106 0106 0406 0106" /* ................ */ + $"0106 0106 0106 0106 0106 0106 0106 0706" /* ................ */ + $"0106 0106 0106 0106 0106 0206 0106 0206" /* ................ */ + $"0206 0306 0306 0106 0106 0106 0106 0106" /* ................ */ + $"000B" /* .. */ +}; + +data 'PICT' (128, purgeable) { + $"0083 00A0 00F2 00B2 0106 1101 A000 8201" /* .......... */ + $"000A 0000 0000 02D0 0240 9000 0400 A000" /* .......@.... */ + $"F000 B201 0800 A000 F200 B201 0600 A000" /* .......... */ + $"F200 B201 0600 003F FFF8 0020 0008 0020" /* .....?. ... */ + $"000C 0020 000C 0020 000C 0020 000C 0023" /* ... ... ... ...# */ + $"FF8C 0021 FF0C 0020 FE0C 0020 7C0C 0020" /* .!.. .. |.. */ + $"380C 0020 100C 0020 000C 0020 000C 0020" /* 8.. ... ... ... */ + $"000C 0020 000C 003F FFFC 000F FFFC 00A0" /* ... ...?... */ + $"0083 FF" /* . */ +}; + +data 'PICT' (1002, "Function", purgeable) { + $"0925 0021 0120 00A4 01C3 1101 0100 0A00" /* %.!. ....... */ + $"0000 0001 E002 8098 0016 0021 0120 00A4" /* ........!. . */ + $"01C8 0021 0120 00A4 01C3 0021 0120 00A4" /* ..!. ...!. . */ + $"01C3 0000 02EB 0002 EB00 02EB 0017 130F" /* ............ */ + $"FFFF FC0F FFFF FC0F FFFF FC0F FFFF FC0F" /* .... */ + $"FFFF FCFF 0017 1310 0000 0210 0000 0210" /* ............ */ + $"0000 0210 0000 0210 0000 02FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1313 9800 0313 B800 0313" /* ............. */ + $"9000 0313 9000 0313 9100 03FF 0017 1312" /* ............ */ + $"2000 0312 0800 0312 2800 0312 2800 0312" /* .......(...(... */ + $"3280 03FF 0017 1313 3000 0313 1000 0313" /* 2.....0....... */ + $"1000 0313 1800 0313 1280 03FF 0017 1312" /* .............. */ + $"2800 0312 1000 0312 2800 0312 0800 0312" /* (.......(....... */ + $"1280 03FF 0017 1312 1000 0312 1000 0312" /* .............. */ + $"1000 0312 1000 0312 1100 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0017 1310 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FF 0017 1310" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FF 0016 000F FEFF 000F FEFF 000F" /* ........... */ + $"FEFF 000F FEFF 000F FEFF FF00 1713 07FF" /* ........ */ + $"FFFE 07FF FFFE 07FF FFFE 07FF FFFE 07FF" /* .... */ + $"FFFE FF00 02EB 0002 EB00 02EB 0013 0F0F" /* .......... */ + $"FFFF FC0F FFFF FC0F FFFF FC0F FFFF FCFB" /* ... */ + $"0013 0F10 0000 0210 0000 0210 0000 0210" /* ................ */ + $"0000 02FB 0013 0F10 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 03FB 0013 0F13 9100 0313" /* .............. */ + $"9300 0313 9300 0313 9200 03FB 0013 0F12" /* ............ */ + $"3300 0312 3080 0312 3080 0312 3280 03FB" /* 3...0..0..2. */ + $"0013 0F13 1100 0313 1100 0313 1100 0313" /* ................ */ + $"1380 03FB 0013 0F12 1100 0312 1200 0312" /* .............. */ + $"1080 0312 1080 03FB 0013 0F12 1100 0312" /* ............. */ + $"1380 0312 1300 0312 1080 03FB 0013 0F10" /* ............. */ + $"0000 0310 0000 0310 0000 0310 0000 03FB" /* ............... */ + $"0013 0F10 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FB 0013 0F10 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 03FB 0013 0F10 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FB 0013 0F10" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 03FB" /* ............... */ + $"0013 0F10 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FB 0013 0F10 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 03FB 0013 0F10 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FB 0013 0F10" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 03FB" /* ............... */ + $"0013 0F10 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FB 0013 0F10 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 03FB 0013 0F10 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FB 0013 0F10" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 03FB" /* ............... */ + $"0013 0F10 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FB 0013 0F10 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 03FB 0013 0F10 0000 0310" /* ............... */ + $"0000 0310 0000 0310 0000 03FB 0013 0F10" /* ............... */ + $"0000 0310 0000 0310 0000 0310 0000 03FB" /* ............... */ + $"0013 0F10 0000 0310 0000 0310 0000 0310" /* ................ */ + $"0000 03FB 0013 0F10 0000 0310 0000 0310" /* ............... */ + $"0000 0310 0000 03FB 0012 000F FEFF 000F" /* ............. */ + $"FEFF 000F FEFF 000F FEFF FB00 130F 07FF" /* ........ */ + $"FFFE 07FF FFFE 07FF FFFE 07FF FFFE FB00" /* .... */ + $"02EB 0002 EB00 02EB 000C 040F FFFF FC0F" /* .......... */ + $"FBFF 00FC F700 0C04 1000 0002 10FB 0000" /* ........... */ + $"02F7 000C 0410 0000 0310 FB00 0003 F700" /* ............. */ + $"0C04 1000 0003 10FB 0000 03F7 000C 0410" /* .............. */ + $"0000 0310 FB00 0003 F700 0C04 1000 0003" /* .............. */ + $"10FB 0000 03F7 000C 0410 0000 0310 FB00" /* ............. */ + $"0003 F700 0C04 1000 0003 10FB 0000 03F7" /* ............. */ + $"000C 0410 0000 0310 FB00 0003 F700 0C04" /* .............. */ + $"1000 0003 10FB 0000 03F7 000C 0410 0000" /* .............. */ + $"0310 FB00 0003 F700 0F0B 1057 4603 1000" /* .........WF... */ + $"0006 2000 0003 F700 0F0B 1054 4503 1000" /* .. .......TE... */ + $"0005 5000 0003 F700 0F0B 1076 4603 1000" /* ..P.......vF... */ + $"0005 5000 0003 F700 0F0B 1054 4403 1000" /* ..P.......TD... */ + $"0005 5000 0003 F700 0F0B 1057 7403 1000" /* ..P.......Wt... */ + $"0006 2000 0003 F700 0C04 1000 0003 10FB" /* .. ........... */ + $"0000 03F7 000C 0410 0000 0310 FB00 0003" /* .............. */ + $"F700 0C04 1000 0003 10FB 0000 03F7 000C" /* ............. */ + $"0410 0000 0310 FB00 0003 F700 0C04 1000" /* .............. */ + $"0003 10FB 0000 03F7 000C 0410 0000 0310" /* .............. */ + $"FB00 0003 F700 0C04 1000 0003 10FB 0000" /* ............. */ + $"03F7 000C 0410 0000 0310 FB00 0003 F700" /* ............. */ + $"0C04 1000 0003 10FB 0000 03F7 000C 0410" /* .............. */ + $"0000 0310 FB00 0003 F700 0C04 1000 0003" /* .............. */ + $"10FB 0000 03F7 000A 000F FEFF 000F FAFF" /* ......... */ + $"F700 0C04 07FF FFFE 07FB FF00 FEF7 0002" /* ........ */ + $"EB00 02EB 0002 EB00 130F 0FFF FFFC 0FFF" /* ......... */ + $"FFFC 0FFF FFFC 0FFF FFFC FB00 130F 1000" /* ....... */ + $"0002 1000 0002 1000 0002 1000 0002 FB00" /* ............... */ + $"130F 1000 0003 1000 0003 1000 0003 1000" /* ................ */ + $"0003 FB00 130F 1393 8003 1391 0003 1391" /* ........... */ + $"0003 13B1 0003 FB00 130F 1230 8003 1232" /* .........0..2 */ + $"8003 1232 8003 120A 8003 FB00 130F 1311" /* ..2..€...... */ + $"0003 1311 0003 1311 8003 1312 8003 FB00" /* ............. */ + $"130F 1211 0003 1212 8003 1210 8003 1222" /* ............." */ + $"8003 FB00 130F 1211 0003 1211 0003 1211" /* .............. */ + $"0003 1239 0003 FB00 130F 1000 0003 1000" /* ...9........... */ + $"0003 1000 0003 1000 0003 FB00 130F 1000" /* ............... */ + $"0003 1000 0003 1000 0003 1000 0003 FB00" /* ............... */ + $"130F 1000 0003 1000 0003 1000 0003 1000" /* ................ */ + $"0003 FB00 130F 1000 0003 1000 0003 1000" /* ............... */ + $"0003 1000 0003 FB00 130F 1000 0003 1000" /* ............... */ + $"0003 1000 0003 1000 0003 FB00 130F 1000" /* ............... */ + $"0003 1000 0003 1000 0003 1000 0003 FB00" /* ............... */ + $"130F 1000 0003 1000 0003 1000 0003 1000" /* ................ */ + $"0003 FB00 130F 1000 0003 1000 0003 1000" /* ............... */ + $"0003 1000 0003 FB00 130F 1000 0003 1000" /* ............... */ + $"0003 1000 0003 1000 0003 FB00 130F 1000" /* ............... */ + $"0003 1000 0003 1000 0003 1000 0003 FB00" /* ............... */ + $"130F 1000 0003 1000 0003 1000 0003 1000" /* ................ */ + $"0003 FB00 130F 1000 0003 1000 0003 1000" /* ............... */ + $"0003 1000 0003 FB00 130F 1000 0003 1000" /* ............... */ + $"0003 1000 0003 1000 0003 FB00 130F 1000" /* ............... */ + $"0003 1000 0003 1000 0003 1000 0003 FB00" /* ............... */ + $"130F 1000 0003 1000 0003 1000 0003 1000" /* ................ */ + $"0003 FB00 130F 1000 0003 1000 0003 1000" /* ............... */ + $"0003 1000 0003 FB00 130F 1000 0003 1000" /* ............... */ + $"0003 1000 0003 1000 0003 FB00 130F 1000" /* ............... */ + $"0003 1000 0003 1000 0003 1000 0003 FB00" /* ............... */ + $"130F 1000 0003 1000 0003 1000 0003 1000" /* ................ */ + $"0003 FB00 1200 0FFE FF00 0FFE FF00 0FFE" /* .......... */ + $"FF00 0FFE FFFB 0013 0F07 FFFF FE07 FFFF" /* ....... */ + $"FE07 FFFF FE07 FFFF FEFB 0002 EB00 02EB" /* ...... */ + $"0002 EB00 FF" /* ... */ +}; + +data 'PICT' (1022, "NCSA logo", purgeable) { + $"1410 0000 0000 0036 0090 0011 02FF 0C00" /* .......6...... */ + $"FFFF FFFF 0000 0000 0000 0000 0090 0000" /* ........... */ + $"0036 0000 0000 0000 001E 0001 000A 0000" /* .6............. */ + $"0000 0036 0090 0098 8090 0000 0000 0036" /* ...6.......6 */ + $"0090 0000 0000 0000 0000 0000 0000 0000" /* ............... */ + $"0000 0000 0008 0001 0008 0000 0000 0014" /* ................ */ + $"BA5C 0000 0000 0000 0B68 0000 0040 0000" /* \.......h...@.. */ + $"FFFF FFFF FFFF 0001 FC00 FC00 FC00 0002" /* ....... */ + $"F800 F800 F800 0003 F400 F400 F400 0004" /* .......... */ + $"F000 F000 F000 0005 EC00 EC00 EC00 0006" /* .......... */ + $"E800 E800 E800 0007 E400 E400 E400 0008" /* .......... */ + $"E000 E000 E000 0009 DC00 DC00 DC00 000A" /* ........ */ + $"D800 D800 D800 000B D400 D400 D400 000C" /* .......... */ + $"D000 D000 D000 000D CC00 CC00 CC00 000E" /* .......... */ + $"C800 C800 C800 000F C400 C400 C400 0010" /* .......... */ + $"C000 C000 C000 0011 BC00 BC00 BC00 0012" /* .......... */ + $"B800 B800 B800 0013 B400 B400 B400 0014" /* .......... */ + $"B000 B000 B000 0015 AC00 AC00 AC00 0016" /* .......... */ + $"A800 A800 A800 0017 A400 A400 A400 0018" /* .......... */ + $"A000 A000 A000 0019 9C00 9C00 9C00 001A" /* .......... */ + $"9800 9800 9800 001B 9400 9400 9400 001C" /* .......... */ + $"9000 9000 9000 001D 8C00 8C00 8C00 001E" /* .......... */ + $"8800 8800 8800 001F 8400 8400 8400 0020" /* ......... */ + $"8000 8000 8000 0021 7C00 7C00 7C00 0022" /* ....!|.|.|.." */ + $"7800 7800 7800 0023 7400 7400 7400 0024" /* x.x.x..#t.t.t..$ */ + $"7000 7000 7000 0025 6C00 6C00 6C00 0026" /* p.p.p..%l.l.l..& */ + $"6800 6800 6800 0027 6400 6400 6400 0028" /* h.h.h..'d.d.d..( */ + $"6000 6000 6000 0029 5C00 5C00 5C00 002A" /* `.`.`..)\.\.\..* */ + $"5800 5800 5800 002B 5400 5400 5400 002C" /* X.X.X..+T.T.T.., */ + $"5000 5000 5000 002D 4C00 4C00 4C00 002E" /* P.P.P..-L.L.L... */ + $"4800 4800 4800 002F 4400 4400 4400 0030" /* H.H.H../D.D.D..0 */ + $"4000 4000 4000 0031 3C00 3C00 3C00 0032" /* @.@.@..1<.<.<..2 */ + $"3800 3800 3800 0033 3400 3400 3400 0034" /* 8.8.8..34.4.4..4 */ + $"3000 3000 3000 0035 2C00 2C00 2C00 0036" /* 0.0.0..5,.,.,..6 */ + $"2800 2800 2800 0037 2400 2400 2400 0038" /* (.(.(..7$.$.$..8 */ + $"2000 2000 2000 0039 1C00 1C00 1C00 003A" /* . . ..9.......: */ + $"1800 1800 1800 003B 1400 1400 1400 003C" /* .......;.......< */ + $"1000 1000 1000 003D 0C00 0C00 0C00 003E" /* .......=.......> */ + $"0800 0800 0800 003F 0400 0400 0400 0040" /* .......?.......@ */ + $"0000 0000 0000 0000 0000 0036 0090 0000" /* ...........6... */ + $"0000 0036 0090 0000 0481 00F1 000C FB00" /* ...6........ */ + $"0001 A000 0201 0303 DC00 2EFC 0009 0204" /* ............ */ + $"0403 0000 0101 0303 F000 0201 0302 F200" /* .............. */ + $"0101 01F9 0000 01D7 0000 01FE 0000 02F6" /* ............ */ + $"0000 01FE 0200 01ED 0020 FB00 0001 FB00" /* ....... .... */ + $"0001 ED00 0001 F500 0201 0201 F500 0102" /* ............. */ + $"01D9 0003 0108 0901 DD00 4F0D 0000 0100" /* .......O..... */ + $"060B 0B09 0800 0101 0001 F000 0402 0909" /* ............ */ + $"0C02 F800 1401 0200 0002 0608 0C11 1617" /* ............... */ + $"1612 0D09 0802 0000 0201 F300 0001 FC00" /* ............. */ + $"0001 F402 0A03 0404 0B22 3A3A 1E02 0101" /* ......."::.... */ + $"F900 040B 0909 0A06 ED00 680D 0001 0104" /* .....h..... */ + $"243B 3C3E 3713 0204 0001 F100 0703 1F3A" /* $;<>7.........: */ + $"3E3A 1403 02FB 0006 0101 0009 0E1F 37FE" /* >:..........7 */ + $"3D01 3E3E FE3D 073E 3A26 1205 0001 01F6" /* =.>>=.>:&..... */ + $"0012 0100 0001 070A 0F17 1F26 292B 2D2B" /* ..........&)+-+ */ + $"292B 2C2C 2DFE 2F03 3133 343B FE40 0339" /* )+,,-/.134;@.9 */ + $"1003 03FC 000A 0200 1338 3E3B 3C2C 0803" /* .......8>;<,.. */ + $"01F0 0052 0400 0201 052D FD40 032B 0B04" /* ..R.....-@.+.. */ + $"04F2 0009 0100 0429 4040 3F14 0402 FC00" /* .....)@@?.... */ + $"0601 0006 1835 3E3F F540 053D 2D12 0301" /* .....5>?@.=-... */ + $"02F9 0009 0102 0003 0E1D 343C 3C3E EC40" /* ........4<<>@ */ + $"043F 1705 0201 FD00 0A01 062C 4040 3F40" /* .?.......,@@?@ */ + $"3C11 0503 F000 6A0D 0001 0104 293F 403F" /* <....j.....)?@? */ + $"403E 2306 0501 F200 0701 0427 3F40 3D11" /* @>#.......'?@=. */ + $"02FC 000A 0300 0C2A 3C40 403F 4040 3FFD" /* .....*<@@?@@? */ + $"3D0B 3C3F 403F 3E40 403A 2206 0202 FB00" /* =.<?@?>@@:".... */ + $"0602 0201 1028 3A3D FC40 FB3F 033E 3E3F" /* .....(:=@?.>>? */ + $"3FFE 3E03 3D3D 3C3F FE40 043E 1503 0201" /* ?>.==<?@.>.... */ + $"FE00 0B01 000E 3D40 3D3F 403F 1F05 02F0" /* .....=@=?@?... */ + $"0069 FD00 0923 3E40 403D 4037 0D02 04F0" /* .i.#>@@=@7... */ + $"0004 213E 403C 0EFC 001C 0301 0A2A 4040" /* ..!>@<.....*@@ */ + $"3C3E 403C 3823 0F06 0404 0A21 373E 403D" /* <>@<8#....!7>@= */ + $"3D40 3C1B 0203 01FD 0011 0102 041A 363F" /* =@<..........6? */ + $"4040 3E3C 3B32 251C 1917 1615 FD13 0112" /* @@><;2%........ */ + $"11FE 1208 0E0C 1D38 3F40 340E 02FA 0008" /* ......8?@4.... */ + $"1C3D 3F40 403F 3F30 08EF 005C FD00 0324" /* .=?@@??0..\..$ */ + $"3E40 3FFE 3E03 1F04 0301 F100 0422 3F40" /* >@?>......."?@ */ + $"3D0F FD00 0B02 0105 213F 3E3C 403D 2E13" /* =......!?><@=.. */ + $"05FA 000A 0617 3640 3E3C 4037 1101 03FE" /* ....6@><@7... */ + $"000B 0102 061A 3840 3E3B 3926 1206 F000" /* ......8@>;9&... */ + $"0501 071D 2928 13F9 000B 0532 403F 3D34" /* ....)(....2@?=4 */ + $"3D40 3B0C 0002 F100 5CFE 000B 0127 403F" /* =@;....\...'@? */ + $"3F40 3D40 3811 0104 F100 0422 3F40 3D10" /* ?@=@8....."?@=. */ + $"FE00 0A01 0202 1F3C 3F3C 4037 1705 F600" /* .....<?<@7... */ + $"140A 273F 3E3D 402A 0602 0100 0102 051D" /* .'?>=@*........ */ + $"3840 392D 1B0B F800 F801 0603 1A35 3A34" /* 8@9-.......5:4 */ + $"1A02 FA00 0D01 000B 3B40 3D26 153A 403C" /* .......;@=&.:@< */ + $"1800 03F1 0065 FD00 0B26 3F3F 403A 403D" /* ....e..&??@:@= */ + $"4028 0502 02F2 0004 1F3F 403D 11FE 0008" /* @(......?@=... */ + $"0400 1239 403B 4030 10F6 0021 0100 0007" /* ...9@;@0..!.... */ + $"2A40 3C40 3B0F 0001 0003 0113 3540 351F" /* *@<@;.......5@5. */ + $"0B00 0005 0B14 212B 333A 3B3B 3C3B FA3C" /* ......!+3:;;<;< */ + $"013A 3CFE 4002 3309 02F9 000C 1E3C 403E" /* .:<@.3....<@> */ + $"1406 3A40 3F30 0501 01F2 005F FD00 0B24" /* ..:@?0...._..$ */ + $"3E40 3A1E 393F 3F3B 1500 03F2 0012 1F3F" /* >@:.9??;......? */ + $"403D 1000 0002 0007 2D40 3C40 3410 0003" /* @=......-@<@4... */ + $"01F6 0017 0300 0C37 403E 3E1B 0100 0101" /* ......7@>>..... */ + $"092E 4035 1702 0412 2437 3B3C F040 063F" /* .@5....$7;<@.? */ + $"3D40 4013 0301 FD00 0F01 0005 3540 403A" /* =@@........5@@: */ + $"0B00 283D 403B 0E00 03F2 0067 FD00 0C23" /* ..(=@;....g..# */ + $"3D40 3907 2340 3D40 310A 0002 F300 111D" /* =@9.#@=@1..... */ + $"3F40 3D11 0000 0101 1F3D 3E3F 3B16 0003" /* ?@=......=>?;... */ + $"01F3 0001 011E FE3E 0D2E 0501 0500 133A" /* .....>.......: */ + $"3A18 0413 2B39 3CFE 40FE 3EFD 3D02 3C3D" /* :...+9<@>=.<= */ + $"3DFC 3C01 3B3F FE40 0336 0E04 02FD 0010" /* =<.;?@.6..... */ + $"0100 0D3C 403E 2A05 000F 3C40 3E25 0302" /* ...<@>*...<@>%.. */ + $"01F3 006A FE00 0D01 253E 403C 0409 323F" /* ..j...%>@<.2? */ + $"3E3E 1C01 03F3 0004 1D3F 403D 12FE 0008" /* >>......?@=... */ + $"0A38 403D 4023 0402 01F3 001A 0100 0A3D" /* 8@=@#.......= */ + $"4040 3C09 0003 042A 3E22 061D 3A3C 3F40" /* @@<...*>"..:<?@ */ + $"3B38 2817 0E0A 07FE 050E 0304 0503 0205" /* ;8(........... */ + $"0502 0620 363D 361A 01FA 000F 0123 3D40" /* ... 6=6.....#=@ */ + $"3F16 0000 043B 4040 3A0C 0001 F300 58FD" /* ?....;@@:....X */ + $"000D 233F 403C 0A00 183F 3D40 360A 0104" /* ..#?@<..?=@6.. */ + $"F400 041E 3F40 3E13 FE00 071A 3D3E 403C" /* ...?@>....=>@< */ + $"1100 02F0 0013 0635 3D3C 370E 0100 043B" /* ......5=<7....; */ + $"3C0E 0F35 403C 3A2D 1608 F100 0404 080A" /* <..5@<:-...... */ + $"0807 F800 0505 373F 403A 0CFE 0006 2B40" /* .....7?@:...+@ */ + $"403E 1D00 01F3 005F FD00 0E20 3F40 3A0A" /* @>...._.. ?@: */ + $"0006 3540 3D3E 1C01 0301 F500 0D1B 3E40" /* ..5@=>.......>@ */ + $"3D13 0000 0531 403E 402D 08ED 0003 0809" /* =....1@>@-.... */ + $"0907 FE00 090B 3C27 0926 3D39 3522 0BFD" /* ...<'&=95". */ + $"00FB 01FE 0208 0304 020C 2B3B 3723 02F9" /* ........+;7#. */ + $"0007 0100 0D3B 403E 2504 FE00 0714 3E40" /* .....;@>%....>@ */ + $"3F33 0600 01F4 0061 FD00 0E1F 3F40 3A06" /* ?3....a...?@:. */ + $"0000 1B3D 3E40 380F 0004 F500 0E1B 3E40" /* ...=>@8......>@ */ + $"3D13 0200 073B 4040 3E18 0101 EC00 0001" /* =....;@@>...... */ + $"FD00 0F1E 3C11 1337 3A26 1100 0009 111F" /* ...<..7:&..... */ + $"2F39 3BFC 3C05 3D3C 3C3D 3B3B FE40 033C" /* /9;<.=<<=;;@.< */ + $"1306 02FA 0005 0122 3C40 3C12 FD00 0708" /* ......"<@<.... */ + $"3B40 403C 0C00 02F4 0058 FD00 0C1F 3F40" /* ;@@<....X...?@ */ + $"3B04 0000 0429 403D 4023 FE02 F600 0C1D" /* ;....)@=@#.... */ + $"3F40 3D13 0000 153D 3F40 3A0B EB00 0102" /* ?@=....=?@:.... */ + $"02FD 000C 323A 0D2C 3F25 0B03 1022 373C" /* ...2:.,?%..."7< */ + $"3FF2 4006 3E40 4017 0603 01FD 0007 0100" /* ?@.>@@........ */ + $"0839 403E 2D06 FD00 0602 2A40 3F3E 2001" /* .9@>-....*@?> . */ + $"F300 64FD 0004 223F 403C 05FE 0008 123A" /* .d.."?@<....: */ + $"3F3E 3A14 0003 01F7 000C 1F3F 403E 1500" /* ?>:.......?@>.. */ + $"002A 3F40 402A 03E6 0016 063B 2E0C 3B36" /* .*?@@*....;..;6 */ + $"0D0B 2137 3E40 3D3D 3E3D 3D3C 3C3D 3D3C" /* ..!7>@==>==<<==< */ + $"3BFE 3C01 3A3A FE40 0438 0E02 0101 FD00" /* ;<.::@.8..... */ + $"0802 0013 3C40 3D19 0001 FD00 0714 3E40" /* ....<@=......>@ */ + $"4038 0800 01F5 005D FD00 0422 3F40 3D09" /* @8....].."?@= */ + $"FE00 0801 2240 3D40 3410 0103 F700 0B1F" /* ..."@=@4...... */ + $"3F40 3D14 0001 3740 403E 18E5 0020 083A" /* ?@=...7@@>.. .: */ + $"2418 3D1C 0C2C 3E40 3A2F 1B0F 0801 0203" /* $.=..,>@:/...... */ + $"0200 0204 0100 0102 010B 283B 371D 02F9" /* ..........(;7.. */ + $"0005 0227 3D40 3B0D FB00 0708 3A40 3F3D" /* ...'=@;....:@?= */ + $"1200 02F5 0057 FD00 1122 3F40 3C0A 0000" /* ....W.."?@<.. */ + $"0100 0C38 403C 4028 0502 02F8 000B 1E3F" /* ...8@<@(......? */ + $"403D 1300 013A 4040 3E10 E500 1307 2C1D" /* @=...:@@>....,. */ + $"2B36 0D22 4039 2910 0601 0000 0308 0E0D" /* +6."@9)......... */ + $"05F9 0002 0106 06F7 0005 0939 403E 2805" /* ........9@>(. */ + $"FB00 0702 2640 3F3E 2605 01F5 0051 FD00" /* ...&@?>&...Q. */ + $"0421 3F40 3C0A FC00 071A 3E3E 3F3B 1502" /* .!?@<...>>?;.. */ + $"04F8 000B 1B3E 403D 1100 043B 4040 3C0A" /* ....>@=...;@@< */ + $"E500 0903 151C 3319 0D3A 3814 06FE 0008" /* ....3..:8.... */ + $"0823 383A 3B3B 3A2B 0CEE 0005 163C 403D" /* .#8:;;:+....<@= */ + $"1601 FA00 070F 3E40 403A 0B00 01F6 0057" /* .....>@@:....W */ + $"FD00 041F 3F40 3D0B FC00 0807 3240 3C40" /* ...?@=....2@<@ */ + $"2B05 0102 F900 0B1B 3E40 3D10 0008 3B40" /* +......>@=...;@ */ + $"403B 07E4 000D 051D 3A09 203C 1B01 0004" /* @;.....: <.... */ + $"0004 293E FB40 032F 0A02 01FE 0002 0105" /* ..)>@./...... */ + $"03F8 0005 0229 3D40 3C0D F900 0708 3840" /* ....)=@<....8@ */ + $"3F3D 1100 02F6 0057 FD00 041D 3F40 3C0A" /* ?=....W...?@< */ + $"FB00 0718 3D3E 3F3C 1400 04F9 000B 1C3F" /* ...=>?<......? */ + $"403E 1200 0C3C 4040 3C08 E300 0D16 370D" /* @>...<@@<....7. */ + $"362D 0603 0300 0019 3D40 3EFE 4005 3E40" /* 6-......=@>@.>@ */ + $"3E1A 0202 FD00 0102 01FA 0007 0100 0739" /* >............9 */ + $"403E 2C05 F800 051B 3E40 3E25 03F5 0059" /* @>,....>@>%..Y */ + $"FD00 041F 3F40 3C08 FB00 0804 2B40 3C40" /* ...?@<....+@<@ */ + $"2F08 0103 FA00 0B19 3E40 3E11 0011 3D40" /* /......>@>...=@ */ + $"403B 08E3 001C 0C26 0E36 1700 0300 0005" /* @;....&.6...... */ + $"3440 3D40 3F3E 3F40 3E3F 3008 0102 0000" /* 4@=@?>?@>?0..... */ + $"0108 01F8 0005 133C 403E 1901 F800 0709" /* ......<@>.... */ + $"3B40 403A 0B00 02F7 0059 FD00 041E 3F40" /* ;@@:....Y...?@ */ + $"3C08 FA00 0711 3840 3D3D 1D00 02FA 000B" /* <....8@==..... */ + $"183E 403D 0F00 133D 4040 3A08 E300 0404" /* .>@=...=@@:.... */ + $"160F 2F09 FD00 0406 3B40 3F40 FE3E 0B40" /* ../...;@?@>.@ */ + $"3F40 3B09 0002 0000 0618 07FB 0007 0100" /* ?@;........... */ + $"022A 3E40 3B0D F700 0702 293F 403D 1500" /* .*>@;....)?@=.. */ + $"02F7 0058 FD00 041B 3E40 3C08 FB00 0901" /* ..X...>@<... */ + $"001D 3D3D 4037 0C00 03FB 000B 193E 403E" /* ..==@7......>@> */ + $"1100 153D 4040 3807 E200 030B 1326 03FD" /* ...=@@8.....&. */ + $"0003 053A 4040 FD3E 0C3F 3F40 3B07 0000" /* ...:@@>.??@;... */ + $"0100 0824 1601 FC00 0702 000C 3A40 3E2A" /* ...$.......:@>* */ + $"05F6 0005 123E 403E 2B04 F600 5AFD 0004" /* ....>@>+..Z.. */ + $"1B3F 403C 09F9 0008 0629 403D 3F22 0202" /* .?@<...)@=?".. */ + $"01FC 000B 193E 403D 1000 143D 4040 3604" /* ....>@=...=@@6. */ + $"E200 0301 0B19 02FD 0003 053B 403F FC3E" /* .........;@?> */ + $"0D3F 403A 0900 0002 0314 2824 0800 01FD" /* .?@:.....($... */ + $"0007 0224 3E40 3E17 0101 F700 0707 3B40" /* ...$>@>......;@ */ + $"403B 0B00 01F8 0058 FD00 041D 3F40 3C09" /* @;....X...?@< */ + $"F800 0710 3B3F 3F39 0F00 03FC 000B 1A3F" /* ...;??9......? */ + $"403D 1100 103C 4040 3A03 E100 0201 0801" /* @=...<@@:...... */ + $"FD00 0406 3840 3E3F FE3E FE3F 0130 08FE" /* ...8@>?>?.0. */ + $"0005 0829 2425 1003 FE00 0701 000A 3940" /* ...)$%......9@ */ + $"403B 0CF5 0007 0227 3F40 3D1A 0101 F800" /* @;....'?@=.... */ + $"53FD 0004 1D3F 403C 08F8 0008 0227 403D" /* S...?@<....'@= */ + $"3F25 0201 02FD 000B 193E 403D 1200 0C3C" /* ?%......>@=...< */ + $"4040 3C05 E000 0001 FB00 0323 3F3E 3CFE" /* @@<......#?>< */ + $"3F0D 3C3E 3E1E 0000 0200 0D37 1C27 1C11" /* ?.<>>......7.'.. */ + $"FC00 0517 3D40 3F29 04F4 0005 113E 403F" /* ...=@?)....>@? */ + $"2F05 F700 57FD 0004 1F3F 403D 08F7 0007" /* /..W...?@=... */ + $"0F3A 403E 3A11 0004 FD00 0B18 3E40 3D10" /* .:@>:......>@=. */ + $"0009 3C40 403C 08E1 0002 0303 01FC 001E" /* .<@@<........ */ + $"0D37 403D 3E3E 3D3D 4037 0D00 0302 001E" /* .7@=>>==@7...... */ + $"3C16 3122 2405 0001 0003 2E3E 3F3F 18F3" /* <.1"$......>??. */ + $"0007 083C 403F 3B09 0002 F900 57FD 0004" /* ...<@?;...W.. */ + $"1E3F 403C 08F7 0008 0122 3F3D 4029 0500" /* .?@<...."?=@).. */ + $"02FE 000B 193E 403D 1200 043B 4040 3C0A" /* ....>@=...;@@< */ + $"E200 0402 0000 0201 FC00 081A 363D 3D3F" /* ..........6==? */ + $"3E3E 361A FD00 1014 3B37 1336 1C32 0F00" /* >>6....;7.6.2.. */ + $"0200 0B3A 3F40 3B0A F200 062A 4040 3B18" /* ...:?@;..*@@;. */ + $"0001 F900 5EFD 0004 1B3E 403C 08F6 0005" /* ...^...>@<... */ + $"0A35 403D 3D1C FE01 0D00 0019 3E40 3D14" /* 5@==......>@=. */ + $"0001 3B40 403D 12E1 0001 0405 F900 060B" /* ..;@@=........ */ + $"1D2C 3633 200B FE00 1802 0F35 3F1B 1539" /* .,63 .....5?..9 */ + $"1539 1600 0001 1F3D 3F3F 310B 0402 0406" /* .9.....=??1..... */ + $"0403 FC05 0B04 0203 031B 3D40 3F2F 0500" /* .........=@?/.. */ + $"01FA 0063 FD00 041B 3E40 3C09 F500 161B" /* ..c...>@<... */ + $"3D3E 4038 1500 0200 0019 3E40 3D13 0001" /* =>@8......>@=... */ + $"3940 403E 2202 E300 0613 272A 1403 0001" /* 9@@>"....'*.... */ + $"FB00 2A01 0102 0000 0607 0E25 3740 290A" /* .*........%7@) */ + $"2B3E 103A 1B02 0006 3640 3F40 3F38 3633" /* +>.:....6@?@?863 */ + $"383A 3633 3637 3637 3939 3435 373B FE40" /* 8:63676799457;@ */ + $"033B 1200 02FA 005F FD00 041D 3F40 3D09" /* .;...._...?@= */ + $"F500 0606 2D40 3C40 3309 FE00 0719 3E40" /* ...-@<@3...>@ */ + $"3E12 0000 2CFE 4001 3305 E600 2501 0011" /* >...,@.3..%... */ + $"3840 403B 2B1D 1A19 1513 1517 1714 1316" /* 8@@;+........... */ + $"212B 3338 3A3F 4034 0E11 3D37 0F3A 1E03" /* !+38:?@4..=7.:.. */ + $"000E 3CFE 4003 3F40 3F3F F640 003F FB40" /* ..<@.?@??@.?@ */ + $"032A 0500 01FB 0065 FD00 041C 3F40 3C08" /* .*....e...?@<. */ + $"F400 0512 3A40 3D3E 1DFE 000E 183E 403E" /* ...:@=>....>@> */ + $"1200 0017 3E40 403B 0B00 01ED 0002 0102" /* ....>@@;....... */ + $"01FE 0001 031C FC40 093E 3F3F 3E3E 3D3D" /* .....@>??>>== */ + $"3E3F 40FE 3F10 4040 3E38 2E14 0A2B 3D1C" /* >?@?.@@>8..+=. */ + $"133A 1B00 0024 3FFE 4002 3F3E 3FF5 400A" /* .:...$?@.?>?@ */ + $"3F3E 3E3F 403F 403B 1300 02FB 0060 FD00" /* ?>>?@?@;....`. */ + $"0419 3E40 3C08 F400 1601 2040 3C40 370C" /* ..>@<.... @<@7. */ + $"0000 143E 403E 1300 0009 3C40 3F3D 1D01" /* ...>@>...<@?=.. */ + $"EC00 0002 FC00 0402 1A40 403F F340 153D" /* .......@@?@.= */ + $"3B35 1D11 0904 1D3E 350D 253D 1600 0439" /* ;5....>5.%=...9 */ + $"403E 3F35 2FFD 2D13 2C2B 2C2D 2E2D 2E2D" /* @>?5/-.,+,-.-.- */ + $"2C2C 2D2D 2B2E 3A40 3E40 2902 FA00 69FD" /* ,,--+.:@>@)..i */ + $"0004 1A3E 403C 08F5 0019 0100 0B39 403D" /* ...>@<......9@= */ + $"3F1E 0000 163D 403E 1400 0005 3940 3D40" /* ?....=@>....9@=@ */ + $"3103 0001 EF00 3002 0607 0600 0001 0008" /* 1....0......... */ + $"3640 403C 3430 3132 322F 2D2E 2D2C 2C29" /* 6@@<40122/-.-,,) */ + $"1E10 0705 0000 0218 343F 270D 393E 0F00" /* ........4?'.9>.. */ + $"0B3C 403E 2A08 0001 F300 0A01 0001 143C" /* .<@>*........< */ + $"3E40 3906 0001 FC00 56FD 0004 1C3F 403C" /* >@9....V...?@< */ + $"08F3 0017 0123 3F3D 4037 0900 1B3D 403E" /* ....#?=@7..=@> */ + $"1500 0001 2540 3F40 3A0E 0002 F000 0E03" /* ....%@?@:...... */ + $"1F2E 342D 0A00 0001 071F 3336 1B02 F200" /* ..4-.....36... */ + $"1003 0C19 3140 3814 103E 3A09 0020 3C3F" /* ....1@8..>:. <? */ + $"3D16 ED00 0704 3940 3F3C 1100 02FC 005A" /* =....9@?<....Z */ + $"FD00 041A 3E40 3C08 F200 0B08 2D40 3D3F" /* ...>@<....-@=? */ + $"2301 183F 403E 17FE 0008 0F39 403C 4027" /* #..?@>....9@<@' */ + $"0400 02F3 000F 0300 0B3A 4040 3E10 0010" /* ........:@@>... */ + $"2637 2C14 0801 F500 1401 040A 1528 3639" /* &7,........(69 */ + $"3F3E 210A 273F 2903 0535 3F40 390A ED00" /* ?>!'?)..5?@9. */ + $"0601 2D40 3E3F 2702 FB00 64FD 0004 193E" /* ..-@>?'..d...> */ + $"403C 08F1 000A 1139 3F3E 380C 113F 403E" /* @<...9?>8..?@> */ + $"19FE 0009 0225 403D 3F3C 1700 0403 F500" /* ...%@=?<..... */ + $"1401 0201 1C40 3F40 3B0D 0936 3E40 4039" /* .....@?@;.6>@@9 */ + $"2F2C 2A27 292B FD2A 1829 282B 3138 3B3B" /* /,*')+*.)(+18;; */ + $"3D40 403E 3B26 0816 3C39 1700 0D3A 403E" /* =@@>;&..<9...:@> */ + $"2904 EC00 0718 3E40 4039 0900 01FD 0058" /* )....>@@9...X */ + $"FD00 0418 3E40 3C08 F000 091D 3D3E 3D23" /* ...>@<...=>=# */ + $"153C 403D 1AFD 0009 0D36 403C 4037 1500" /* .<@=...6@<@7.. */ + $"0302 F700 0D01 0300 1038 403E 4027 0209" /* ........8@>@'. */ + $"3E3F 3DFD 4001 3F3F F340 0F3C 3831 1903" /* >?=@.??@.<81.. */ + $"0E34 4029 0903 243B 403E 17EB 0007 093B" /* .4@).$;@>...; */ + $"403E 3E1A 0001 FD00 5EFD 0004 173E 403D" /* @>>....^...>@= */ + $"09F0 000A 0930 3F3D 3A2B 3D40 3E1B 01FD" /* .0?=:+=@>.. */ + $"000A 183B 403C 4035 1100 0103 01FA 000C" /* ..;@<@5....... */ + $"0204 000A 2D40 3C40 390E 0008 37FD 4001" /* ...-@<@9...7@. */ + $"3C3D F73E 153D 3D3C 3B39 2D1A 0F07 000F" /* <=>.==<;9-..... */ + $"2D40 3518 0007 383F 403B 0BEB 0006 0329" /* -@5...8?@;....) */ + $"403E 4031 06FC 0062 FD00 0418 3E40 3C06" /* @>@1..b...>@<. */ + $"EF00 0916 3C3E 3D3C 3F40 3F1B 01FD 0008" /* ..<>=<?@?.... */ + $"0223 403D 3C40 361A 04F9 0009 0100 000C" /* .#@=<@6....... */ + $"2A40 3D3E 3E20 FE00 081F 383F 3B29 150F" /* *@=>> ...8?;).. */ + $"0D0D FD0F 190D 0B0C 0A09 0805 0303 0100" /* ............. */ + $"0001 172E 3C3A 220A 000C 3A40 3F29 02EA" /* ....<:"..:@?). */ + $"0005 103C 4040 3C0D FC00 52FD 0004 173E" /* ...<@@<..R...> */ + $"403C 06EF 0008 062D 3F3C 3E3F 403F 1AFB" /* @<....-?<>?@?. */ + $"0009 092F 403C 3C40 3B24 0E02 FA00 1003" /* ./@<<@;$..... */ + $"112F 403D 3C40 2F09 0001 0009 161E 1401" /* ./@=<@/....... */ + $"EF00 0E04 0D1C 353D 3E2E 1002 0120 3C40" /* .....5=>.... <@ */ + $"3E18 E900 0505 3240 3F3D 1BFC 005D FD00" /* >....2@?=..]. */ + $"0417 3E40 3D08 EE00 0714 393F 3C3F 403E" /* ..>@=....9?<?@> */ + $"1AFA 000A 1135 403E 3C3F 403A 2612 0AFE" /* ...5@><?@:&. */ + $"0915 0A11 283B 403C 3E40 3716 0001 1E37" /* ..(;@<>@7....7 */ + $"3928 1103 0001 0100 F601 1203 070A 172B" /* 9(...........+ */ + $"373B 403D 3015 0500 0234 4040 3C0E E800" /* 7;@=0....4@@<.. */ + $"071A 3E3F 4031 0500 01FF 005A FD00 0418" /* ..>?@1....Z... */ + $"3D40 3C08 EE00 0802 253F 3C3D 403C 1A01" /* =@<....%?<=@<.. */ + $"FA00 0710 2F3E 403F 3E40 3FFB 3D0B 3C3F" /* .../>@?>@?=.<? */ + $"403E 403E 2F15 0200 1236 FE40 053B 3A3C" /* @>@>/....6@.;:< */ + $"3B3A 3BF6 3C12 3D3D 3C3E 4040 3F38 260F" /* ;:;<.==<>@@?8&. */ + $"0304 0012 3A3F 3F2E 06E8 0007 0B3B 403F" /* ....:??.....;@? */ + $"3B0A 0003 FF00 47FD 0004 193F 403D 09ED" /* ;...G...?@= */ + $"0007 0E37 403E 403F 1D02 F900 0309 2138" /* ...7@>@?....!8 */ + $"3EF6 400B 3F3E 381D 0500 0002 1C3F 3E3E" /* >@.?>8......?>> */ + $"EB40 093C 3929 1204 0002 0002 30FE 4000" /* @<9)......0@. */ + $"19E7 0009 0229 4040 3E1E 0100 0200 52FD" /* ...)@@>.....R */ + $"0004 173A 3E39 0FED 0007 011F 383B 3B39" /* ...:>9.....8;;9 */ + $"1A02 F700 0F08 162F 3B3B 3C3D 3E3E 3D3B" /* ....../;;<=>>=; */ + $"3A3B 331B 09FC 0001 113B FE40 033B 3B3C" /* :;3....;@.;;< */ + $"3CF7 3DFD 3C05 3B38 2411 0A03 FC00 050A" /* <=<.;8$.... */ + $"363B 3D39 0FE6 0008 1439 3D3B 2D0B 0001" /* 6;=9....9=;-... */ + $"003F FD00 0301 0B0A 0BEA 0004 0506 0508" /* .?........... */ + $"01F4 000B 0203 0710 171B 1B15 0C06 0302" /* ............... */ + $"FA00 0704 293B 3A2C 1005 04F3 0302 0201" /* ...);:,....... */ + $"02F7 0003 0607 0B0A E400 030C 0A07 05FD" /* ........... */ + $"000D BC00 0303 0706 01E1 0000 01DB 0012" /* ............. */ + $"FC00 0201 0301 A100 0102 02E2 0001 0202" /* ............. */ + $"FC00 0BFB 0000 01C2 0001 0203 B900 00FF" /* ........... */ +}; + +data 'PICT' (2048) { + $"0066 FFFF FFFF 0003 00DB 0011 02FF 0C00" /* .f........ */ + $"FFFF FFFF FFFF 0000 FFFF 0000 00DB 0000" /* ....... */ + $"0003 0000 0000 0000 0001 000A FFFF FFFF" /* ........... */ + $"0003 00DB 0007 0000 0000 0008 000A 0022" /* ............." */ + $"0024 0017 0000 00A1 00B6 0004 0001 0001" /* .$............ */ + $"0007 0001 0001 0008 0008 0020 0000 00D8" /* ........... ... */ + $"0000 0000 00FF" /* ..... */ +}; + +data 'PICT' (256) { + $"09E4 0081 0099 008D 00E6 0011 02FF 0C00" /* ......... */ + $"FFFF FFFF 0099 0000 0081 0000 00E6 0000" /* ......... */ + $"008D 0000 0000 0000 001F 7FFF 7FFF 7FFF" /* ............ */ + $"0001 000A 0081 0099 008D 00E6 0099 804E" /* ........N */ + $"0081 0099 008D 00E6 0000 0000 0000 0000" /* ............ */ + $"0048 0000 0048 0000 0000 0008 0001 0008" /* .H...H.......... */ + $"0000 0000 00EB 80C4 0000 0000 0000 5C53" /* ...........\S */ + $"0000 00FF 0000 FFFF FFFF FFFF 0001 FFFF" /* ....... */ + $"FFFF CCCC 0002 FFFF FFFF 9999 0003 FFFF" /* .... */ + $"FFFF 6666 0004 FFFF FFFF 3333 0005 FFFF" /* ff..33.. */ + $"FFFF 0000 0006 FFFF CCCC FFFF 0007 FFFF" /* ...... */ + $"CCCC CCCC 0008 FFFF CCCC 9999 0009 FFFF" /* ..̙. */ + $"CCCC 6666 000A FFFF CCCC 3333 000B FFFF" /* ff.33.. */ + $"CCCC 0000 000C FFFF 9999 FFFF 000D FFFF" /* ...... */ + $"9999 CCCC 000E FFFF 9999 9999 000F FFFF" /* .... */ + $"9999 6666 0010 FFFF 9999 3333 0011 FFFF" /* ff..33.. */ + $"9999 0000 0012 FFFF 6666 FFFF 0013 FFFF" /* ....ff.. */ + $"6666 CCCC 0014 FFFF 6666 9999 0015 FFFF" /* ff..ff.. */ + $"6666 6666 0016 FFFF 6666 3333 0017 FFFF" /* ffff..ff33.. */ + $"6666 0000 0018 FFFF 3333 FFFF 0019 FFFF" /* ff....33.. */ + $"3333 CCCC 001A FFFF 3333 9999 001B FFFF" /* 33..33.. */ + $"3333 6666 001C FFFF 3333 3333 001D FFFF" /* 33ff..3333.. */ + $"3333 0000 001E FFFF 0000 FFFF 001F FFFF" /* 33........ */ + $"0000 CCCC 0020 FFFF 0000 9999 0021 FFFF" /* ... ...! */ + $"0000 6666 0022 FFFF 0000 3333 0023 FFFF" /* ..ff."..33.# */ + $"0000 0000 0024 CCCC FFFF FFFF 0025 CCCC" /* .....$.% */ + $"FFFF CCCC 0026 CCCC FFFF 9999 0027 CCCC" /* .&.' */ + $"FFFF 6666 0028 CCCC FFFF 3333 0029 CCCC" /* ff.(33.) */ + $"FFFF 0000 002A CCCC CCCC FFFF 002B CCCC" /* ...*.+ */ + $"CCCC CCCC 002C CCCC CCCC 9999 002D CCCC" /* .,̙.- */ + $"CCCC 6666 002E CCCC CCCC 3333 002F CCCC" /* ff..33./ */ + $"CCCC 0000 0030 CCCC 9999 FFFF 0031 CCCC" /* ...0̙.1 */ + $"9999 CCCC 0032 CCCC 9999 9999 0033 CCCC" /* .2̙.3 */ + $"9999 6666 0034 CCCC 9999 3333 0035 CCCC" /* ff.4̙33.5 */ + $"9999 0000 0036 CCCC 6666 FFFF 0037 CCCC" /* ...6ff.7 */ + $"6666 CCCC 0038 CCCC 6666 9999 0039 CCCC" /* ff.8ff.9 */ + $"6666 6666 003A CCCC 6666 3333 003B CCCC" /* ffff.:ff33.; */ + $"6666 0000 003C CCCC 3333 FFFF 003D CCCC" /* ff...<33.= */ + $"3333 CCCC 003E CCCC 3333 9999 003F CCCC" /* 33.>33.? */ + $"3333 6666 0040 CCCC 3333 3333 0041 CCCC" /* 33ff.@3333.A */ + $"3333 0000 0042 CCCC 0000 FFFF 0043 CCCC" /* 33...B...C */ + $"0000 CCCC 0044 CCCC 0000 9999 0045 CCCC" /* ...D...E */ + $"0000 6666 0046 CCCC 0000 3333 0047 CCCC" /* ..ff.F..33.G */ + $"0000 0000 0048 9999 FFFF FFFF 0049 9999" /* .....H.I */ + $"FFFF CCCC 004A 9999 FFFF 9999 004B 9999" /* .J.K */ + $"FFFF 6666 004C 9999 FFFF 3333 004D 9999" /* ff.L33.M */ + $"FFFF 0000 004E 9999 CCCC FFFF 004F 9999" /* ...N.O */ + $"CCCC CCCC 0050 9999 CCCC 9999 0051 9999" /* .P̙.Q */ + $"CCCC 6666 0052 9999 CCCC 3333 0053 9999" /* ff.R33.S */ + $"CCCC 0000 0054 9999 9999 FFFF 0055 9999" /* ...T.U */ + $"9999 CCCC 0056 9999 9999 9999 0057 9999" /* .V.W */ + $"9999 6666 0058 9999 9999 3333 0059 9999" /* ff.X33.Y */ + $"9999 0000 005A 9999 6666 FFFF 005B 9999" /* ...Zff.[ */ + $"6666 CCCC 005C 9999 6666 9999 005D 9999" /* ff.\ff.] */ + $"6666 6666 005E 9999 6666 3333 005F 9999" /* ffff.^ff33._ */ + $"6666 0000 0060 9999 3333 FFFF 0061 9999" /* ff...`33.a */ + $"3333 CCCC 0062 9999 3333 9999 0063 9999" /* 33.b33.c */ + $"3333 6666 0064 9999 3333 3333 0065 9999" /* 33ff.d3333.e */ + $"3333 0000 0066 9999 0000 FFFF 0067 9999" /* 33...f...g */ + $"0000 CCCC 0068 9999 0000 9999 0069 9999" /* ...h...i */ + $"0000 6666 006A 9999 0000 3333 006B 9999" /* ..ff.j..33.k */ + $"0000 0000 006C 6666 FFFF FFFF 006D 6666" /* .....lff.mff */ + $"FFFF CCCC 006E 6666 FFFF 9999 006F 6666" /* .nff.off */ + $"FFFF 6666 0070 6666 FFFF 3333 0071 6666" /* ff.pff33.qff */ + $"FFFF 0000 0072 6666 CCCC FFFF 0073 6666" /* ...rff.sff */ + $"CCCC CCCC 0074 6666 CCCC 9999 0075 6666" /* .tff̙.uff */ + $"CCCC 6666 0076 6666 CCCC 3333 0077 6666" /* ff.vff33.wff */ + $"CCCC 0000 0078 6666 9999 FFFF 0079 6666" /* ...xff.yff */ + $"9999 CCCC 007A 6666 9999 9999 007B 6666" /* .zff.{ff */ + $"9999 6666 007C 6666 9999 3333 007D 6666" /* ff.|ff33.}ff */ + $"9999 0000 007E 6666 6666 FFFF 007F 6666" /* ...~ffff..ff */ + $"6666 CCCC 0080 6666 6666 9999 0081 6666" /* ff.ffff.ff */ + $"6666 6666 0082 6666 6666 3333 0083 6666" /* ffff.ffff33.ff */ + $"6666 0000 0084 6666 3333 FFFF 0085 6666" /* ff...ff33.ff */ + $"3333 CCCC 0086 6666 3333 9999 0087 6666" /* 33.ff33.ff */ + $"3333 6666 0088 6666 3333 3333 0089 6666" /* 33ff.ff3333.ff */ + $"3333 0000 008A 6666 0000 FFFF 008B 6666" /* 33...ff...ff */ + $"0000 CCCC 008C 6666 0000 9999 008D 6666" /* ...ff...ff */ + $"0000 6666 008E 6666 0000 3333 008F 6666" /* ..ff.ff..33.ff */ + $"0000 0000 0090 3333 FFFF FFFF 0091 3333" /* .....33.33 */ + $"FFFF CCCC 0092 3333 FFFF 9999 0093 3333" /* .33.33 */ + $"FFFF 6666 0094 3333 FFFF 3333 0095 3333" /* ff.3333.33 */ + $"FFFF 0000 0096 3333 CCCC FFFF 0097 3333" /* ...33.33 */ + $"CCCC CCCC 0098 3333 CCCC 9999 0099 3333" /* .33̙.33 */ + $"CCCC 6666 009A 3333 CCCC 3333 009B 3333" /* ff.3333.33 */ + $"CCCC 0000 009C 3333 9999 FFFF 009D 3333" /* ...33.33 */ + $"9999 CCCC 009E 3333 9999 9999 009F 3333" /* .33.33 */ + $"9999 6666 00A0 3333 9999 3333 00A1 3333" /* ff.3333.33 */ + $"9999 0000 00A2 3333 6666 FFFF 00A3 3333" /* ...33ff.33 */ + $"6666 CCCC 00A4 3333 6666 9999 00A5 3333" /* ff.33ff.33 */ + $"6666 6666 00A6 3333 6666 3333 00A7 3333" /* ffff.33ff33.33 */ + $"6666 0000 00A8 3333 3333 FFFF 00A9 3333" /* ff...3333.33 */ + $"3333 CCCC 00AA 3333 3333 9999 00AB 3333" /* 33.3333.33 */ + $"3333 6666 00AC 3333 3333 3333 00AD 3333" /* 33ff.333333.33 */ + $"3333 0000 00AE 3333 0000 FFFF 00AF 3333" /* 33...33...33 */ + $"0000 CCCC 00B0 3333 0000 9999 00B1 3333" /* ...33...33 */ + $"0000 6666 00B2 3333 0000 3333 00B3 3333" /* ..ff.33..33.33 */ + $"0000 0000 00B4 0000 FFFF FFFF 00B5 0000" /* .......... */ + $"FFFF CCCC 00B6 0000 FFFF 9999 00B7 0000" /* ...... */ + $"FFFF 6666 00B8 0000 FFFF 3333 00B9 0000" /* ff...33... */ + $"FFFF 0000 00BA 0000 CCCC FFFF 00BB 0000" /* ........ */ + $"CCCC CCCC 00BC 0000 CCCC 9999 00BD 0000" /* ...̙... */ + $"CCCC 6666 00BE 0000 CCCC 3333 00BF 0000" /* ff...33... */ + $"CCCC 0000 00C0 0000 9999 FFFF 00C1 0000" /* ........ */ + $"9999 CCCC 00C2 0000 9999 9999 00C3 0000" /* ...... */ + $"9999 6666 00C4 0000 9999 3333 00C5 0000" /* ff...33... */ + $"9999 0000 00C6 0000 6666 FFFF 00C7 0000" /* .....ff... */ + $"6666 CCCC 00C8 0000 6666 9999 00C9 0000" /* ff...ff... */ + $"6666 6666 00CA 0000 6666 0000 00CB 0000" /* ffff...ff..... */ + $"6666 3333 00CC 0000 3333 FFFF 00CD 0000" /* ff33...33... */ + $"3333 CCCC 00CE 0000 3333 9999 00CF 0000" /* 33...33... */ + $"3333 6666 00D0 0000 3333 3333 00D1 0000" /* 33ff...3333... */ + $"3333 0000 00D2 0000 0000 FFFF 00D3 0000" /* 33.......... */ + $"0000 CCCC 00D4 0000 0000 9999 00D5 0000" /* .......... */ + $"0000 6666 00D6 0000 0000 3333 00D7 EEEE" /* ..ff.....33. */ + $"0000 0000 00D8 DDDD 0000 0000 00D9 BBBB" /* ..........ٻ */ + $"0000 0000 00DA AAAA 0000 0000 00DB 8888" /* .....ڪ.....ۈ */ + $"0000 0000 00DC 7777 0000 0000 00DD 5555" /* .....ww.....UU */ + $"0000 0000 00DE 4444 0000 0000 00DF 2222" /* .....DD....."" */ + $"0000 0000 00E0 1111 0000 0000 00E1 0000" /* .............. */ + $"EEEE 0000 00E2 0000 DDDD 0000 00E3 0000" /* .......... */ + $"BBBB 0000 00E4 0000 AAAA 0000 00E5 0000" /* .......... */ + $"8888 0000 00E6 0000 7777 0000 00E7 0000" /* .....ww..... */ + $"5555 0000 00E8 0000 4444 0000 00E9 0000" /* UU.....DD..... */ + $"2222 0000 00EA 0000 1111 0000 00EB 0000" /* ""............ */ + $"0000 EEEE 00EC 0000 0000 DDDD 00ED 0000" /* .......... */ + $"0000 BBBB 00EE 0000 0000 AAAA 00EF 0000" /* .......... */ + $"0000 8888 00F0 0000 0000 7777 00F1 0000" /* .......ww... */ + $"0000 5555 00F2 0000 0000 4444 00F3 0000" /* ..UU.....DD... */ + $"0000 2222 00F4 0000 0000 1111 00F5 EEEE" /* ..""........ */ + $"EEEE EEEE 00F6 DDDD DDDD DDDD 00F7 BBBB" /* .. */ + $"BBBB BBBB 00F8 AAAA AAAA AAAA 00F9 8888" /* .. */ + $"8888 8888 00FA 7777 7777 7777 00FB 5555" /* .wwwwww.UU */ + $"5555 5555 00FC 4444 4444 4444 00FD 2222" /* UUUU.DDDDDD."" */ + $"2222 2222 00FE 1111 1111 1111 00FF 0000" /* """".......... */ + $"0000 0000 0081 0099 008D 00E6 0081 0099" /* .......... */ + $"008D 00E6 0000 000A 0081 0099 008D 00E6" /* ......... */ + $"02B3 0002 B300 02B3 000A FE00 FCFF F200" /* ........ */ + $"FEFF CD00 10FE 0005 FFFF 0000 FFFF F400" /* ....... */ + $"01FF FFCB 003B FE00 0CFF FF00 00FF FF00" /* ..;..... */ + $"FFFF 00FF 0000 FEFF 0100 00FD FF01 0000" /* ......... */ + $"FEFF 0700 00FF FF00 FF00 00FE FF01 0000" /* ......... */ + $"FDFF FE00 FEFF 0100 00FE FFFE 00FE FFF3" /* ..... */ + $"003B FE00 FCFF 0100 00FD FF11 00FF FF00" /* .;....... */ + $"FFFF 0000 FFFF 0000 FFFF 00FF FF00 FDFF" /* ...... */ + $"0E00 FFFF 00FF FF00 FFFF 00FF FF00 FFFF" /* ...... */ + $"FE00 07FF FF00 FFFF 00FF FFF1 0033 FE00" /* .....3. */ + $"01FF FFFC 0001 FFFF FE00 FCFF 0500 00FF" /* ....... */ + $"FF00 00FC FF02 00FF FFFE 00FC FF08 00FF" /* ....... */ + $"FF00 FFFF 00FF FFFE 00FC FF00 00FD FFF3" /* ..... */ + $"0039 FE00 01FF FFFC 0001 FFFF FE00 01FF" /* .9...... */ + $"FFFC 0005 FFFF 0000 FFFF FD00 01FF FFFE" /* ...... */ + $"0001 FFFF FD00 07FF FF00 FFFF 00FF FFFE" /* ...... */ + $"0001 FFFF FB00 01FF FFF3 0040 FE00 01FF" /* .....@.. */ + $"FFFC 0001 FFFF FD00 FDFF 0300 00FF FFFE" /* ...... */ + $"00FD FF02 00FF FFFD 00FD FF07 00FF FF00" /* ....... */ + $"FFFF 0000 FEFF 0100 00FD FF00 00FE FF09" /* ....... */ + $"0000 FFFF 00FF FF00 FFFF FC00 02B3 0002" /* ........ */ + $"B300 00FF" /* .. */ +}; + +data 'PICT' (1000, "Keypad", purgeable) { + $"11DB 0021 000C 00C4 00F9 1101 0100 0A00" /* ..!......... */ + $"0000 0001 E002 8098 0020 0021 0008 00C4" /* ...... .!... */ + $"0100 0021 000C 00C4 00F9 0021 000C 00C4" /* ...!.....!... */ + $"00F9 0000 02E1 0002 E100 02E1 0021 0000" /* .........!.. */ + $"FEFF 00C0 FEFF 00C0 FEFF 13C0 003F FFFF" /* ....? */ + $"F03F FFFF F03F FFFF F03F FFFF F000 0021" /* ???..! */ + $"0001 FE00 0021 FE00 0021 FE00 1320 2040" /* ....!..!.. @ */ + $"0000 0840 0000 0840 0000 0840 0000 0800" /* ...@...@...@.... */ + $"0021 0001 FE00 0031 FE00 0031 FE00 1330" /* .!....1..1..0 */ + $"0040 0000 0C40 0000 0C40 0000 0C40 0000" /* .@...@...@...@.. */ + $"0C00 0021 1F01 3BB3 0031 3B1B B3B1 33A9" /* ...!..;.1;.3 */ + $"2BB0 204C E400 0C4C EC00 0C4C EC00 0C4C" /* + L..L..L..L */ + $"E800 0C00 0021 1F01 212A 8031 12A2 2931" /* ....!..!*1.)1 */ + $"2A3A AA30 004A 8C00 0C4A 8200 0C4A 8200" /* *:0.J..J..J. */ + $"0C4A 8A00 0C00 0021 1F01 312A 8031 1293" /* .J....!..1*1. */ + $"3131 332A AB30 204C C400 0C4C C400 0C4C" /* 113*0 L..L..L */ + $"C400 0C4C CE00 0C00 0021 1F01 212A 8031" /* ..L....!..!*1 */ + $"128A 2931 2A2A AA30 0048 8400 0C48 8800" /* .)1**0.H..H. */ + $"0C48 8200 0C48 8200 0C00 0021 1F01 23AB" /* .H..H....!..# */ + $"0031 3AB3 A931 2BA9 13B0 2048 8400 0C48" /* .1:1+. H..H */ + $"8E00 0C48 8C00 0C48 8200 0C00 0021 0001" /* ..H..H....!.. */ + $"FE00 0031 FE00 0031 FE00 1330 0040 0000" /* ..1..1..0.@.. */ + $"0C40 0000 0C40 0000 0C40 0000 0C00 0021" /* .@...@...@.....! */ + $"0001 FE00 0031 FE00 0031 FE00 1330 2040" /* ....1..1..0 @ */ + $"0000 0C40 0000 0C40 0000 0C40 0000 0C00" /* ...@...@...@.... */ + $"0021 0001 FE00 0431 2BB3 8031 FE00 1330" /* .!....1+1..0 */ + $"0040 0000 0C40 0000 0C40 0000 0C40 0000" /* .@...@...@...@.. */ + $"0C00 0021 0001 FE00 0431 2A2A 0031 FE00" /* ...!....1**.1. */ + $"1330 2040 0000 0C40 0000 0C40 0000 0C40" /* .0 @...@...@...@ */ + $"0000 0C00 0021 0001 FE00 0431 3B33 0031" /* .....!....1;3.1 */ + $"FE00 1330 0040 0000 0C40 0000 0C40 0000" /* ..0.@...@...@.. */ + $"0C40 0000 0C00 0021 0001 FE00 0431 2A2A" /* .@.....!....1** */ + $"0031 FE00 1330 2040 0000 0C40 0000 0C40" /* .1..0 @...@...@ */ + $"0000 0C40 0000 0C00 0021 0001 FE00 0431" /* ...@.....!....1 */ + $"2BAB 8031 FE00 1330 0040 0000 0C40 0000" /* +1..0.@...@.. */ + $"0C40 0000 0C40 0000 0C00 0021 0001 FE00" /* .@...@.....!... */ + $"0031 FE00 0031 FE00 1330 2040 0000 0C40" /* .1..1..0 @...@ */ + $"0000 0C40 0000 0C40 0000 0C00 0021 0001" /* ...@...@.....!.. */ + $"FE00 0031 FE00 0031 FE00 1330 0040 0000" /* ..1..1..0.@.. */ + $"0C40 0000 0C40 0000 0C40 0000 0C00 0021" /* .@...@...@.....! */ + $"0001 FE00 0031 FE00 0031 FE00 1330 2040" /* ....1..1..0 @ */ + $"0000 0C40 0000 0C40 0000 0C40 0000 0C00" /* ...@...@...@.... */ + $"0021 0001 FE00 0031 FE00 0031 FE00 1330" /* .!....1..1..0 */ + $"0040 0000 0C40 0000 0C40 0000 0C40 0000" /* .@...@...@...@.. */ + $"0C00 0021 0001 FE00 0031 FE00 0031 FE00" /* ...!....1..1. */ + $"1330 2040 0000 0C40 0000 0C40 0000 0C40" /* .0 @...@...@...@ */ + $"0000 0C00 0021 0001 FE00 0031 FE00 0031" /* .....!....1..1 */ + $"FE00 1330 0040 0000 0C40 0000 0C40 0000" /* ..0.@...@...@.. */ + $"0C40 0000 0C00 0021 0001 FE00 0031 FE00" /* .@.....!....1. */ + $"0031 FE00 1330 2040 0000 0C40 0000 0C40" /* .1..0 @...@...@ */ + $"0000 0C40 0000 0C00 0021 0001 FE00 0031" /* ...@.....!....1 */ + $"FE00 0031 FE00 1330 0040 0000 0C40 0000" /* ..1..0.@...@.. */ + $"0C40 0000 0C40 0000 0C00 0021 0001 FE00" /* .@...@.....!... */ + $"0031 FE00 0031 FE00 1330 2040 0000 0C40" /* .1..1..0 @...@ */ + $"0000 0C40 0000 0C40 0000 0C00 0021 0001" /* ...@...@.....!.. */ + $"FE00 0031 FE00 0031 FE00 1330 0040 0000" /* ..1..1..0.@.. */ + $"0C40 0000 0C40 0000 0C40 0000 0C00 0021" /* .@...@...@.....! */ + $"0001 FE00 0031 FE00 0031 FE00 1330 2040" /* ....1..1..0 @ */ + $"0000 0C40 0000 0C40 0000 0C40 0000 0C00" /* ...@...@...@.... */ + $"0021 0001 FE00 0031 FE00 0031 FE00 1330" /* .!....1..1..0 */ + $"0040 0000 0C40 0000 0C40 0000 0C40 0000" /* .@...@...@...@.. */ + $"0C00 0021 0000 FEFF 00F0 FEFF 00F0 FEFF" /* ...!.... */ + $"13F0 203F FFFF FC3F FFFF FC3F FFFF FC3F" /* . ???? */ + $"FFFF FC00 0021 1F00 7FFF FFE0 7FFF FFE0" /* ..!.... */ + $"7FFF FFE0 001F FFFF F81F FFFF F81F FFFF" /* ..... */ + $"F81F FFFF F800 0006 F400 0020 EF00 02E1" /* ...... .. */ + $"0006 F400 0020 EF00 2100 00FE FF00 C0FE" /* .... .!... */ + $"FF00 C0FE FF13 C000 3FFF FFF0 3FFF FFF0" /* ...?? */ + $"3FFF FFF0 3FFF FFF0 0000 2100 01FE 0000" /* ??..!.... */ + $"21FE 0000 21FE 0013 2020 4000 0008 4000" /* !..!.. @...@. */ + $"0008 4000 0008 4000 0008 0000 2100 01FE" /* ..@...@.....!.. */ + $"0000 31FE 0000 31FE 0013 3000 4000 000C" /* ..1..1..0.@... */ + $"4000 000C 4000 000C 4000 000C 0000 211F" /* @...@...@.....!. */ + $"011B A39B B133 3A80 3133 AB80 3020 4000" /* ..3:130 @. */ + $"000C 4000 000C 4000 000C 4000 000C 0000" /* ..@...@...@..... */ + $"211F 0122 2221 312A A280 312A 2900 3000" /* !..""!1*1*).0. */ + $"47E0 000C 43C0 000C 43C0 000C 4000 000C" /* G..C..C..@... */ + $"0000 211F 0113 2321 3133 3280 312B 1100" /* ..!...#!1321+.. */ + $"3020 4060 000C 4660 000C 4660 000C 47C0" /* 0 @`..F`..F`..G */ + $"000C 0000 211F 010A 2221 3122 A280 312A" /* ....!.."!1"1* */ + $"2900 3000 4060 000C 4660 000C 4660 000C" /* ).0.@`..F`..F`.. */ + $"4000 000C 0000 211F 0133 BB99 3122 B900" /* @.....!..31". */ + $"312B A900 3020 4060 000C 4660 000C 4660" /* 1+.0 @`..F`..F` */ + $"000C 4000 000C 0000 2100 01FE 0000 31FE" /* ..@.....!....1 */ + $"0000 31FE 0013 3000 40C0 000C 43C0 000C" /* ..1..0.@..C.. */ + $"4660 000C 4000 000C 0000 2100 01FE 0000" /* F`..@.....!.... */ + $"31FE 0000 31FE 0013 3020 4180 000C 4660" /* 1..1..0 A..F` */ + $"000C 43E0 000C 4000 000C 0000 2100 01FE" /* ..C..@.....!.. */ + $"001B 3119 B3BB 3119 B3BB 3000 4180 000C" /* ..1.1.0.A.. */ + $"4660 000C 4060 000C 4000 000C 0000 2100" /* F`..@`..@.....!. */ + $"01FE 001B 3122 2A22 B122 2A22 B020 4180" /* ...1"*""*" A */ + $"000C 4660 000C 40C0 000C 4000 000C 0000" /* ..F`..@..@..... */ + $"2100 01FE 001B 3112 3332 B112 3332 B000" /* !....1.32.32. */ + $"4180 000C 43C0 000C 4380 000C 4000 000C" /* A..C..C..@... */ + $"0000 2100 01FE 001B 310A 2A22 B10A 2A22" /* ..!....1*"*" */ + $"B020 4000 000C 4000 000C 4000 000C 4000" /* @...@...@...@. */ + $"000C 0000 2100 01FE 001B 3131 ABBA B131" /* ....!....111 */ + $"ABBA B000 4000 000C 4000 000C 4000 000C" /* .@...@...@... */ + $"4000 000C 0000 2100 01FE 0000 31FE 0000" /* @.....!....1.. */ + $"31FE 0013 3020 4000 000C 4000 000C 4000" /* 1..0 @...@...@. */ + $"000C 4000 000C 0000 2100 01FE 0000 31FE" /* ..@.....!....1 */ + $"0000 31FE 0013 3000 4000 000C 4000 000C" /* ..1..0.@...@... */ + $"4000 000C 4000 000C 0000 2100 01FE 0000" /* @...@.....!.... */ + $"31FE 0000 31FE 0013 3020 4000 000C 4000" /* 1..1..0 @...@. */ + $"000C 4000 000C 4000 000C 0000 2100 01FE" /* ..@...@.....!.. */ + $"0000 31FE 0000 31FE 0013 3000 4000 000C" /* ..1..1..0.@... */ + $"4000 000C 4000 000C 4000 000C 0000 2100" /* @...@...@.....!. */ + $"01FE 0000 31FE 0000 31FE 0013 3020 4000" /* ...1..1..0 @. */ + $"000C 4000 000C 4000 000C 4000 000C 0000" /* ..@...@...@..... */ + $"2100 01FE 0000 31FE 0000 31FE 0013 3000" /* !....1..1..0. */ + $"4000 000C 4000 000C 4000 000C 4000 000C" /* @...@...@...@... */ + $"0000 2100 01FE 0000 31FE 0000 31FE 0013" /* ..!....1..1.. */ + $"3020 4000 000C 4000 000C 4000 000C 4000" /* 0 @...@...@...@. */ + $"000C 0000 2100 01FE 0000 31FE 0000 31FE" /* ....!....1..1 */ + $"0013 3000 4000 000C 4000 000C 4000 000C" /* ..0.@...@...@... */ + $"4000 000C 0000 2100 01FE 0000 31FE 0000" /* @.....!....1.. */ + $"31FE 0013 3020 4000 000C 4000 000C 4000" /* 1..0 @...@...@. */ + $"000C 4000 000C 0000 2100 01FE 0000 31FE" /* ..@.....!....1 */ + $"0000 31FE 0013 3000 4000 000C 4000 000C" /* ..1..0.@...@... */ + $"4000 000C 4000 000C 0000 2100 01FE 0000" /* @...@.....!.... */ + $"31FE 0000 31FE 0013 3020 4000 000C 4000" /* 1..1..0 @...@. */ + $"000C 4000 000C 4000 000C 0000 2100 01FE" /* ..@...@.....!.. */ + $"0000 31FE 0000 31FE 0013 3000 4000 000C" /* ..1..1..0.@... */ + $"4000 000C 4000 000C 4000 000C 0000 2100" /* @...@...@.....!. */ + $"00FE FF00 F0FE FF00 F0FE FF13 F020 3FFF" /* .... ? */ + $"FFFC 3FFF FFFC 3FFF FFF8 3FFF FFFC 0000" /* ???.. */ + $"211F 007F FFFF E07F FFFF E07F FFFF E000" /* !...... */ + $"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8" /* .... */ + $"0000 06F4 0000 20EF 0002 E100 06F4 0000" /* ..... ...... */ + $"20EF 001B FC00 FEFF 00C0 FC00 113F FFFF" /* ......? */ + $"F03F FFFF F03F FFFF F03F FFFF F000 001E" /* ???... */ + $"FD00 0001 FE00 0020 FD00 1220 4000 0008" /* ..... .. @... */ + $"4000 0008 4000 0008 4000 0008 0000 1DFD" /* @...@...@...... */ + $"0000 01FE 0000 30FC 0011 4000 000C 4000" /* .....0..@...@. */ + $"000C 4000 000C 4000 000C 0000 1EFD 0000" /* ..@...@........ */ + $"01FE 0000 30FD 0012 2040 0000 0C40 0000" /* ...0.. @...@.. */ + $"0C40 0000 0C40 0000 0C00 001D FD00 0001" /* .@...@......... */ + $"FE00 0030 FC00 1140 6000 0C47 E000 0C41" /* ..0..@`..G..A */ + $"C000 0C40 0000 0C00 001E FD00 0001 FE00" /* ..@.......... */ + $"0030 FD00 1220 40E0 000C 4600 000C 4300" /* .0.. @..F...C. */ + $"000C 4300 000C 0000 1DFD 0000 01FE 0000" /* ..C........... */ + $"30FC 0011 4160 000C 4600 000C 4600 000C" /* 0..A`..F...F... */ + $"4300 000C 0000 1EFD 0004 0100 0C00 30FD" /* C............0 */ + $"0012 2042 6000 0C47 C000 0C47 C000 0C41" /* .. B`..G..G..A */ + $"0000 0C00 001D FD00 0401 001E 0030 FC00" /* ............0. */ + $"1144 6000 0C40 6000 0C46 6000 0C42 0000" /* .D`..@`..F`..B.. */ + $"0C00 001E FD00 0401 003F 0030 FD00 1220" /* ........?.0.. */ + $"47F0 000C 4060 000C 4660 000C 4000 000C" /* G..@`..F`..@... */ + $"0000 1DFD 0004 0100 7F80 30FC 0011 4060" /* ........0..@` */ + $"000C 4060 000C 4660 000C 4000 000C 0000" /* ..@`..F`..@..... */ + $"1EFD 0004 0100 FFC0 30FD 0012 2040 6000" /* .....0.. @`. */ + $"0C44 6000 0C46 6000 0C40 0000 0C00 001D" /* .D`..F`..@...... */ + $"FD00 0401 01FF E030 FC00 1140 6000 0C43" /* ....0..@`..C */ + $"C000 0C43 C000 0C40 0000 0C00 001E FD00" /* ..C..@....... */ + $"0401 01FF E030 FD00 1220 4000 000C 4000" /* ...0.. @...@. */ + $"000C 4000 000C 4000 000C 0000 1DFD 0004" /* ..@...@........ */ + $"0100 3F00 30FC 0011 4000 000C 4000 000C" /* ..?.0..@...@... */ + $"4000 000C 4000 000C 0000 1EFD 0004 0100" /* @...@.......... */ + $"3F00 30FD 0012 2040 0000 0C40 0000 0C40" /* ?.0.. @...@...@ */ + $"0000 0C40 0000 0C00 001D FD00 0401 003F" /* ...@..........? */ + $"0030 FC00 1140 0000 0C40 0000 0C40 0000" /* .0..@...@...@.. */ + $"0C40 0000 0C00 001E FD00 0401 003F 0030" /* .@..........?.0 */ + $"FD00 1220 4000 000C 4000 000C 4000 000C" /* .. @...@...@... */ + $"4000 000C 0000 1DFD 0004 0100 3F00 30FC" /* @..........?.0 */ + $"0011 4000 000C 4000 000C 4000 000C 4000" /* ..@...@...@...@. */ + $"000C 0000 1EFD 0000 01FE 0000 30FD 0012" /* ..........0.. */ + $"2040 0000 0C40 0000 0C40 0000 0C40 0000" /* @...@...@...@.. */ + $"0C00 001D FD00 0001 FE00 0030 FC00 1140" /* .........0..@ */ + $"0000 0C40 0000 0C40 0000 0C40 0000 0C00" /* ...@...@...@.... */ + $"001E FD00 0001 FE00 0030 FD00 1220 4000" /* .......0.. @. */ + $"000C 4000 000C 4000 000C 4000 000C 0000" /* ..@...@...@..... */ + $"1DFD 0000 01FE 0000 30FC 0011 4000 000C" /* ......0..@... */ + $"4000 000C 4000 000C 4000 000C 0000 1EFD" /* @...@...@...... */ + $"0000 01FE 0000 30FD 0012 2040 0000 0C40" /* .....0.. @...@ */ + $"0000 0C40 0000 0C40 0000 0C00 001D FD00" /* ...@...@....... */ + $"0001 FE00 0030 FC00 1140 0000 0C40 0000" /* ....0..@...@.. */ + $"0C40 0000 0C40 0000 0C00 001E FD00 0001" /* .@...@......... */ + $"FE00 0030 FD00 1220 4000 000C 4000 000C" /* ..0.. @...@... */ + $"4000 000C 4000 000C 0000 1DFD 0000 01FE" /* @...@......... */ + $"0000 30FC 0011 4000 000C 4000 000C 4000" /* ..0..@...@...@. */ + $"000C 4000 000C 0000 1CFC 00FE FF00 F0FD" /* ..@........ */ + $"0012 203F FFFF FC3F FFFF FC3F FFFF FC3F" /* .. ???? */ + $"FFFF FC00 001C FC00 037F FFFF E0FC 0011" /* ........ */ + $"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8" /* .... */ + $"0000 06F4 0000 20EF 0002 E100 06F4 0000" /* ..... ...... */ + $"20EF 0021 0000 FEFF 00C0 FEFF 00C0 FEFF" /* .!.... */ + $"13C0 003F FFFF F03F FFFF F03F FFFF F03F" /* ..???? */ + $"FFFF F000 0021 0001 FE00 0021 FE00 0021" /* ..!....!..! */ + $"FE00 1320 2040 0000 0840 0000 0840 0000" /* .. @...@...@.. */ + $"0840 0000 0800 0021 0001 FE00 0031 FE00" /* .@.....!....1. */ + $"0031 FE00 1330 0040 0000 0C40 0000 0C40" /* .1..0.@...@...@ */ + $"0000 0C40 0000 0C00 0021 0001 FE00 0031" /* ...@.....!....1 */ + $"FE00 0031 FE00 1330 2040 0000 0C40 0000" /* ..1..0 @...@.. */ + $"0C40 0000 0C4E CEEC 0C00 0021 0001 FE00" /* .@...N...!... */ + $"0031 FE00 0031 FE00 1330 0041 8000 0C43" /* .1..1..0.A..C */ + $"C000 0C47 E000 0C48 A48A 0C00 0021 0001" /* ..G..H...!.. */ + $"FE00 0031 FE00 0031 FE00 1330 2043 8000" /* ..1..1..0 C. */ + $"0C44 6000 0C40 C000 0C4C A4CC 0C00 0021" /* .D`..@..L...! */ + $"0001 FE00 0031 FE00 0031 FE00 1330 0041" /* ....1..1..0.A */ + $"8000 0C40 6000 0C41 8000 0C48 A48A 0C00" /* ..@`..A..H.. */ + $"0021 0001 FE00 0031 FE00 0031 FE00 1330" /* .!....1..1..0 */ + $"2041 8000 0C40 6000 0C43 C000 0C4E A4EA" /* A..@`..C..N */ + $"0C00 0021 1F01 0030 0031 003F 0031 000C" /* ...!...0.1.?.1.. */ + $"0030 0041 8000 0C40 C000 0C40 6000 0C40" /* .0.A..@..@`..@ */ + $"0000 0C00 0021 1F01 0070 0031 003F 0031" /* .....!...p.1.?.1 */ + $"000E 0030 2041 8000 0C41 8000 0C40 6000" /* ...0 A..A..@`. */ + $"0C40 0000 0C00 0021 1F01 00F0 0031 003F" /* .@.....!....1.? */ + $"0031 000F 0030 0041 8000 0C43 0000 0C40" /* .1...0.A..C...@ */ + $"6000 0C40 0000 0C00 0021 1F01 01FF 8031" /* `..@.....!...1 */ + $"003F 0031 01FF 8030 2041 8000 0C46 0000" /* .?.1.0 A..F.. */ + $"0C44 6000 0C40 0000 0C00 0021 1F01 03FF" /* .D`..@.....!... */ + $"8031 003F 0031 01FF C030 0041 8000 0C47" /* 1.?.1.0.A..G */ + $"E000 0C43 C000 0C40 0000 0C00 0021 1F01" /* ..C..@.....!.. */ + $"07FF 8031 01FF E031 01FF E030 2040 0000" /* .1.1.0 @.. */ + $"0C40 0000 0C40 0000 0C40 0000 0C00 0021" /* .@...@...@.....! */ + $"1F01 07FF 8031 01FF E031 01FF E030 0040" /* ...1.1.0.@ */ + $"0000 0C40 0000 0C40 0000 0C40 0000 0C00" /* ...@...@...@.... */ + $"0021 1F01 03FF 8031 00FF C031 01FF C030" /* .!...1.1.0 */ + $"2040 0000 0C40 0000 0C40 0000 0C40 0000" /* @...@...@...@.. */ + $"0C00 0021 1F01 01FF 8031 007F 8031 01FF" /* ...!...1..1. */ + $"8030 0040 0000 0C40 0000 0C40 0000 0C40" /* 0.@...@...@...@ */ + $"0000 0C00 0021 1F01 00F0 0031 003F 0031" /* .....!....1.?.1 */ + $"000F 0030 2040 0000 0C40 0000 0C40 0000" /* ...0 @...@...@.. */ + $"0C40 0000 0C00 0021 1F01 0070 0031 001E" /* .@.....!...p.1.. */ + $"0031 000E 0030 0040 0000 0C40 0000 0C40" /* .1...0.@...@...@ */ + $"0000 0C40 0000 0C00 0021 1F01 0030 0031" /* ...@.....!...0.1 */ + $"000C 0031 000C 0030 2040 0000 0C40 0000" /* ...1...0 @...@.. */ + $"0C40 0000 0C40 0000 0C00 0021 0001 FE00" /* .@...@.....!... */ + $"0031 FE00 0031 FE00 1330 0040 0000 0C40" /* .1..1..0.@...@ */ + $"0000 0C40 0000 0C40 0000 0C00 0021 0001" /* ...@...@.....!.. */ + $"FE00 0031 FE00 0031 FE00 1330 2040 0000" /* ..1..1..0 @.. */ + $"0C40 0000 0C40 0000 0C40 0000 0C00 0021" /* .@...@...@.....! */ + $"0001 FE00 0031 FE00 0031 FE00 1330 0040" /* ....1..1..0.@ */ + $"0000 0C40 0000 0C40 0000 0C40 0000 0C00" /* ...@...@...@.... */ + $"0021 0001 FE00 0031 FE00 0031 FE00 1330" /* .!....1..1..0 */ + $"2040 0000 0C40 0000 0C40 0000 0C40 0000" /* @...@...@...@.. */ + $"0C00 0021 0001 FE00 0031 FE00 0031 FE00" /* ...!....1..1. */ + $"1330 0040 0000 0C40 0000 0C40 0000 0C40" /* .0.@...@...@...@ */ + $"0000 0C00 0021 0001 FE00 0031 FE00 0031" /* .....!....1..1 */ + $"FE00 1330 2040 0000 0C40 0000 0C40 0000" /* ..0 @...@...@.. */ + $"0C40 0000 0C00 0021 0001 FE00 0031 FE00" /* .@.....!....1. */ + $"0031 FE00 1330 0040 0000 0C40 0000 0C40" /* .1..0.@...@...@ */ + $"0000 0C40 0000 0C00 0021 0000 FEFF 00F0" /* ...@.....!... */ + $"FEFF 00F0 FEFF 13F0 203F FFFF FC3F FFFF" /* .. ?? */ + $"FC3F FFFF FC40 0000 0C00 0021 1F00 7FFF" /* ?@.....!... */ + $"FFE0 7FFF FFE0 7FFF FFE0 001F FFFF F81F" /* ..... */ + $"FFFF F81F FFFF F840 0000 0C00 000D F400" /* .@....... */ + $"0020 F500 0540 0000 0C00 0009 E700 0540" /* . ..@.......@ */ + $"0000 0C00 000D F400 0020 F500 0540 0000" /* ........ ..@.. */ + $"0C00 0012 F300 003F FBFF 0AF0 3FFF FFF0" /* ......?? */ + $"4000 000C 0000 13F4 0001 2040 FB00 0A08" /* @........ @.. */ + $"4000 0008 4000 000C 0000 12F3 0000 40FB" /* @...@........@ */ + $"000A 0C40 0000 0C40 0000 0C00 0013 F400" /* ..@...@....... */ + $"0120 40FB 000A 0C40 0000 0C40 0000 0C00" /* . @..@...@.... */ + $"0013 F300 0143 C0FC 000A 0C40 0000 0C40" /* ....C..@...@ */ + $"0000 0C00 0014 F400 0220 4660 FC00 0A0C" /* ........ F`.. */ + $"4300 000C 4000 000C 0000 13F3 0001 4660" /* C...@........F` */ + $"FC00 0A0C 4300 000C 4000 000C 0000 14F4" /* ..C...@...... */ + $"0002 2046 60FC 000A 0C40 0000 0C40 0000" /* .. F`..@...@.. */ + $"0C00 0013 F300 0146 60FC 000A 0C40 0000" /* ......F`..@.. */ + $"0C40 0000 0C00 0014 F400 0220 4660 FC00" /* .@........ F`. */ + $"0A0C 4000 000C 4000 000C 0000 13F3 0001" /* .@...@........ */ + $"4660 FC00 0A0C 4000 000C 4000 000C 0000" /* F`..@...@..... */ + $"14F4 0002 2046 60FC 000A 0C40 0000 0C40" /* ... F`..@...@ */ + $"0000 0C00 0013 F300 0143 C0FC 000A 0C40" /* ........C..@ */ + $"0000 0C40 0000 0C00 0013 F400 0120 40FB" /* ...@........ @ */ + $"000A 0C40 0000 0C40 0000 0C00 0012 F300" /* ..@...@....... */ + $"0040 FB00 0A0C 4000 000C 4000 000C 0000" /* .@..@...@..... */ + $"13F4 0001 2040 FB00 0A0C 4000 000C 4000" /* ... @..@...@. */ + $"000C 0000 12F3 0000 40FB 000A 0C40 0000" /* .......@..@.. */ + $"0C40 0000 0C00 0013 F400 0120 40FB 000A" /* .@........ @. */ + $"0C40 0000 0C40 0000 0C00 0012 F300 0040" /* .@...@........@ */ + $"FB00 0A0C 4000 000C 4000 000C 0000 13F4" /* ..@...@...... */ + $"0001 2040 FB00 0A0C 4000 000C 4000 000C" /* .. @..@...@... */ + $"0000 12F3 0000 40FB 000A 0C40 0000 0C40" /* .....@..@...@ */ + $"0000 0C00 0013 F400 0120 40FB 000A 0C40" /* ........ @..@ */ + $"0000 0C40 0000 0C00 0012 F300 0040 FB00" /* ...@........@. */ + $"0A0C 4000 000C 4000 000C 0000 13F4 0001" /* .@...@........ */ + $"2040 FB00 0A0C 4000 000C 4000 000C 0000" /* @..@...@..... */ + $"12F3 0000 40FB 000A 0C40 0000 0C40 0000" /* ...@..@...@.. */ + $"0C00 0013 F400 0120 40FB 000A 0C40 0000" /* ...... @..@.. */ + $"0C40 0000 0C00 0012 F300 0040 FB00 0A0C" /* .@........@.. */ + $"4000 000C 4000 000C 0000 13F4 0001 203F" /* @...@........ ? */ + $"FBFF 0AFC 3FFF FFFC 3FFF FFFC 0000 12F3" /* ??... */ + $"0000 1FFB FF0A F81F FFFF F81F FFFF F800" /* ...... */ + $"0002 E100 02E1 0002 E100 FF" /* ....... */ +}; + +data 'PICT' (1025) { + $"838A 0000 0000 012C 0190 0011 02FF 0C00" /* .....,...... */ + $"FFFE 0000 0048 0000 0048 0000 0000 0000" /* ...H...H...... */ + $"012C 0190 0000 0000 00A1 01F2 0016 3842" /* .,.........8B */ + $"494D 0000 0000 0000 012C 0190 4772 8970" /* IM.......,.Grp */ + $"68AF 626A 0001 000A 0000 0000 012C 0190" /* hbj........,. */ + $"0098 8190 0000 0000 012C 0190 0000 0000" /* ......,..... */ + $"0000 0000 0048 0000 0048 0000 0000 0008" /* .....H...H...... */ + $"0001 0008 0000 0000 0000 0000 0000 0000" /* ................ */ + $"004A 919A 0000 00FF 0000 FFFF FFFF FFFF" /* .J..... */ + $"0001 FFFF FFFF CCCC 0002 FFFF FFFF 9999" /* .... */ + $"0003 FFFF FFFF 6666 0004 FFFF FFFF 3333" /* ..ff..33 */ + $"0005 FFFF FFFF 0000 0006 FFFF CCCC FFFF" /* ...... */ + $"0007 FFFF CCCC CCCC 0008 FFFF CCCC 9999" /* ....̙ */ + $"0009 FFFF CCCC 6666 000A FFFF CCCC 3333" /* .ff.33 */ + $"000B FFFF CCCC 0000 000C FFFF 9999 FFFF" /* ...... */ + $"000D FFFF 9999 CCCC 000E FFFF 9999 9999" /* .... */ + $"000F FFFF 9999 6666 0010 FFFF 9999 3333" /* ..ff..33 */ + $"0011 FFFF 9999 0000 0012 FFFF 6666 FFFF" /* ......ff */ + $"0013 FFFF 6666 CCCC 0014 FFFF 6666 9999" /* ..ff..ff */ + $"0015 FFFF 6666 6666 0016 FFFF 6666 3333" /* ..ffff..ff33 */ + $"0017 FFFF 6666 0000 0018 FFFF 3333 FFFF" /* ..ff....33 */ + $"0019 FFFF 3333 CCCC 001A FFFF 3333 9999" /* ..33..33 */ + $"001B FFFF 3333 6666 001C FFFF 3333 3333" /* ..33ff..3333 */ + $"001D FFFF 3333 0000 001E FFFF 0000 FFFF" /* ..33...... */ + $"001F FFFF 0000 CCCC 0020 FFFF 0000 9999" /* ..... .. */ + $"0021 FFFF 0000 6666 0022 FFFF 0000 3333" /* .!..ff."..33 */ + $"0023 FFFF 0000 0000 0024 CCCC FFFF FFFF" /* .#.....$ */ + $"0025 CCCC FFFF CCCC 0026 CCCC FFFF 9999" /* .%.& */ + $"0027 CCCC FFFF 6666 0028 CCCC FFFF 3333" /* .'ff.(33 */ + $"0029 CCCC FFFF 0000 002A CCCC CCCC FFFF" /* .)...* */ + $"002B CCCC CCCC CCCC 002C CCCC CCCC 9999" /* .+.,̙ */ + $"002D CCCC CCCC 6666 002E CCCC CCCC 3333" /* .-ff..33 */ + $"002F CCCC CCCC 0000 0030 CCCC 9999 FFFF" /* ./...0̙ */ + $"0031 CCCC 9999 CCCC 0032 CCCC 9999 9999" /* .1̙.2̙ */ + $"0033 CCCC 9999 6666 0034 CCCC 9999 3333" /* .3̙ff.4̙33 */ + $"0035 CCCC 9999 0000 0036 CCCC 6666 FFFF" /* .5̙...6ff */ + $"0037 CCCC 6666 CCCC 0038 CCCC 6666 9999" /* .7ff.8ff */ + $"0039 CCCC 6666 6666 003A CCCC 6666 3333" /* .9ffff.:ff33 */ + $"003B CCCC 6666 0000 003C CCCC 3333 FFFF" /* .;ff...<33 */ + $"003D CCCC 3333 CCCC 003E CCCC 3333 9999" /* .=33.>33 */ + $"003F CCCC 3333 6666 0040 CCCC 3333 3333" /* .?33ff.@3333 */ + $"0041 CCCC 3333 0000 0042 CCCC 0000 FFFF" /* .A33...B.. */ + $"0043 CCCC 0000 CCCC 0044 CCCC 0000 9999" /* .C...D.. */ + $"0045 CCCC 0000 6666 0046 CCCC 0000 3333" /* .E..ff.F..33 */ + $"0047 CCCC 0000 0000 0048 9999 FFFF FFFF" /* .G.....H */ + $"0049 9999 FFFF CCCC 004A 9999 FFFF 9999" /* .I.J */ + $"004B 9999 FFFF 6666 004C 9999 FFFF 3333" /* .Kff.L33 */ + $"004D 9999 FFFF 0000 004E 9999 CCCC FFFF" /* .M...N */ + $"004F 9999 CCCC CCCC 0050 9999 CCCC 9999" /* .O.P̙ */ + $"0051 9999 CCCC 6666 0052 9999 CCCC 3333" /* .Qff.R33 */ + $"0053 9999 CCCC 0000 0054 9999 9999 FFFF" /* .S...T */ + $"0055 9999 9999 CCCC 0056 9999 9999 9999" /* .U.V */ + $"0057 9999 9999 6666 0058 9999 9999 3333" /* .Wff.X33 */ + $"0059 9999 9999 0000 005A 9999 6666 FFFF" /* .Y...Zff */ + $"005B 9999 6666 CCCC 005C 9999 6666 9999" /* .[ff.\ff */ + $"005D 9999 6666 6666 005E 9999 6666 3333" /* .]ffff.^ff33 */ + $"005F 9999 6666 0000 0060 9999 3333 FFFF" /* ._ff...`33 */ + $"0061 9999 3333 CCCC 0062 9999 3333 9999" /* .a33.b33 */ + $"0063 9999 3333 6666 0064 9999 3333 3333" /* .c33ff.d3333 */ + $"0065 9999 3333 0000 0066 9999 0000 FFFF" /* .e33...f.. */ + $"0067 9999 0000 CCCC 0068 9999 0000 9999" /* .g...h.. */ + $"0069 9999 0000 6666 006A 9999 0000 3333" /* .i..ff.j..33 */ + $"006B 9999 0000 0000 006C 6666 FFFF FFFF" /* .k.....lff */ + $"006D 6666 FFFF CCCC 006E 6666 FFFF 9999" /* .mff.nff */ + $"006F 6666 FFFF 6666 0070 6666 FFFF 3333" /* .offff.pff33 */ + $"0071 6666 FFFF 0000 0072 6666 CCCC FFFF" /* .qff...rff */ + $"0073 6666 CCCC CCCC 0074 6666 CCCC 9999" /* .sff.tff̙ */ + $"0075 6666 CCCC 6666 0076 6666 CCCC 3333" /* .uffff.vff33 */ + $"0077 6666 CCCC 0000 0078 6666 9999 FFFF" /* .wff...xff */ + $"0079 6666 9999 CCCC 007A 6666 9999 9999" /* .yff.zff */ + $"007B 6666 9999 6666 007C 6666 9999 3333" /* .{ffff.|ff33 */ + $"007D 6666 9999 0000 007E 6666 6666 FFFF" /* .}ff...~ffff */ + $"007F 6666 6666 CCCC 0080 6666 6666 9999" /* ..ffff.ffff */ + $"0081 6666 6666 6666 0082 6666 6666 3333" /* .ffffff.ffff33 */ + $"0083 6666 6666 0000 0084 6666 3333 FFFF" /* .ffff...ff33 */ + $"0085 6666 3333 CCCC 0086 6666 3333 9999" /* .ff33.ff33 */ + $"0087 6666 3333 6666 0088 6666 3333 3333" /* .ff33ff.ff3333 */ + $"0089 6666 3333 0000 008A 6666 0000 FFFF" /* .ff33...ff.. */ + $"008B 6666 0000 CCCC 008C 6666 0000 9999" /* .ff...ff.. */ + $"008D 6666 0000 6666 008E 6666 0000 3333" /* .ff..ff.ff..33 */ + $"008F 6666 0000 0000 0090 3333 FFFF FFFF" /* .ff.....33 */ + $"0091 3333 FFFF CCCC 0092 3333 FFFF 9999" /* .33.33 */ + $"0093 3333 FFFF 6666 0094 3333 FFFF 3333" /* .33ff.3333 */ + $"0095 3333 FFFF 0000 0096 3333 CCCC FFFF" /* .33...33 */ + $"0097 3333 CCCC CCCC 0098 3333 CCCC 9999" /* .33.33̙ */ + $"0099 3333 CCCC 6666 009A 3333 CCCC 3333" /* .33ff.3333 */ + $"009B 3333 CCCC 0000 009C 3333 9999 FFFF" /* .33...33 */ + $"009D 3333 9999 CCCC 009E 3333 9999 9999" /* .33.33 */ + $"009F 3333 9999 6666 00A0 3333 9999 3333" /* .33ff.3333 */ + $"00A1 3333 9999 0000 00A2 3333 6666 FFFF" /* .33...33ff */ + $"00A3 3333 6666 CCCC 00A4 3333 6666 9999" /* .33ff.33ff */ + $"00A5 3333 6666 6666 00A6 3333 6666 3333" /* .33ffff.33ff33 */ + $"00A7 3333 6666 0000 00A8 3333 3333 FFFF" /* .33ff...3333 */ + $"00A9 3333 3333 CCCC 00AA 3333 3333 9999" /* .3333.3333 */ + $"00AB 3333 3333 6666 00AC 3333 3333 3333" /* .3333ff.333333 */ + $"00AD 3333 3333 0000 00AE 3333 0000 FFFF" /* .3333...33.. */ + $"00AF 3333 0000 CCCC 00B0 3333 0000 9999" /* .33...33.. */ + $"00B1 3333 0000 6666 00B2 3333 0000 3333" /* .33..ff.33..33 */ + $"00B3 3333 0000 0000 00B4 0000 FFFF FFFF" /* .33....... */ + $"00B5 0000 FFFF CCCC 00B6 0000 FFFF 9999" /* ...... */ + $"00B7 0000 FFFF 6666 00B8 0000 FFFF 3333" /* ...ff...33 */ + $"00B9 0000 FFFF 0000 00BA 0000 CCCC FFFF" /* ........ */ + $"00BB 0000 CCCC CCCC 00BC 0000 CCCC 9999" /* ......̙ */ + $"00BD 0000 CCCC 6666 00BE 0000 CCCC 3333" /* ...ff...33 */ + $"00BF 0000 CCCC 0000 00C0 0000 9999 FFFF" /* ........ */ + $"00C1 0000 9999 CCCC 00C2 0000 9999 9999" /* ...... */ + $"00C3 0000 9999 6666 00C4 0000 9999 3333" /* ...ff...33 */ + $"00C5 0000 9999 0000 00C6 0000 6666 FFFF" /* ........ff */ + $"00C7 0000 6666 CCCC 00C8 0000 6666 9999" /* ...ff...ff */ + $"00C9 0000 6666 6666 00CA 0000 6666 3333" /* ...ffff...ff33 */ + $"00CB 0000 6666 0000 00CC 0000 3333 FFFF" /* ...ff.....33 */ + $"00CD 0000 3333 CCCC 00CE 0000 3333 9999" /* ...33...33 */ + $"00CF 0000 3333 6666 00D0 0000 3333 3333" /* ...33ff...3333 */ + $"00D1 0000 3333 0000 00D2 0000 0000 FFFF" /* ...33....... */ + $"00D3 0000 0000 CCCC 00D4 0000 0000 9999" /* .......... */ + $"00D5 0000 0000 6666 00D6 0000 0000 3333" /* .....ff.....33 */ + $"00D7 EEEE 0000 0000 00D8 DDDD 0000 0000" /* .......... */ + $"00D9 BBBB 0000 0000 00DA AAAA 0000 0000" /* .ٻ.....ڪ.... */ + $"00DB 8888 0000 0000 00DC 7777 0000 0000" /* .ۈ.....ww.... */ + $"00DD 5555 0000 0000 00DE 4444 0000 0000" /* .UU.....DD.... */ + $"00DF 2222 0000 0000 00E0 1111 0000 0000" /* .""........... */ + $"00E1 0000 EEEE 0000 00E2 0000 DDDD 0000" /* .......... */ + $"00E3 0000 BBBB 0000 00E4 0000 AAAA 0000" /* .......... */ + $"00E5 0000 8888 0000 00E6 0000 7777 0000" /* ........ww.. */ + $"00E7 0000 5555 0000 00E8 0000 4444 0000" /* ...UU.....DD.. */ + $"00E9 0000 2222 0000 00EA 0000 1111 0000" /* ...""......... */ + $"00EB 0000 0000 EEEE 00EC 0000 0000 DDDD" /* .......... */ + $"00ED 0000 0000 BBBB 00EE 0000 0000 AAAA" /* .......... */ + $"00EF 0000 0000 8888 00F0 0000 0000 7777" /* ..........ww */ + $"00F1 0000 0000 5555 00F2 0000 0000 4444" /* .....UU.....DD */ + $"00F3 0000 0000 2222 00F4 0000 0000 1111" /* .....""....... */ + $"00F5 EEEE EEEE EEEE 00F6 DDDD DDDD DDDD" /* .. */ + $"00F7 BBBB BBBB BBBB 00F8 AAAA AAAA AAAA" /* .. */ + $"00F9 8888 8888 8888 00FA 7777 7777 7777" /* ..wwwwww */ + $"00FB 5555 5555 5555 00FC 4444 4444 4444" /* .UUUUUU.DDDDDD */ + $"00FD 2222 2222 2222 00FE 1111 1111 1111" /* .""""""....... */ + $"00FF 0000 0000 0000 0000 0000 012C 0190" /* ............,. */ + $"0000 0000 012C 0190 0000 000C 00F5 82F6" /* .....,...... */ + $"81F6 81F6 F2F6 00FA 000D FFF5 83F6 81F6" /* ... */ + $"81F6 F3F6 01FA FD00 12FE F584 F681 F6FA" /* ... */ + $"F600 0089 F6F4 F602 FAFD FD00 0CFE F584" /* ..... */ + $"0081 0081 00F4 00FE FD00 0CFE F584 0081" /* ....... */ + $"0081 00F4 00FE FD00 0CFE F584 0081 0081" /* ....... */ + $"00F4 00FE FD00 0CFE F584 0081 0081 00F4" /* ....... */ + $"00FE FD00 0CFE F584 0081 0081 00F4 00FE" /* ....... */ + $"FD00 0CFE F584 0081 0081 00F4 00FE FD00" /* ....... */ + $"0CFE F584 0081 0081 00F4 00FE FD00 0CFE" /* ....... */ + $"F584 0081 0081 00F4 00FE FD00 0CFE F584" /* ...... */ + $"0081 0081 00F4 00FE FD00 0CFE F584 0081" /* ....... */ + $"0081 00F4 00FE FD00 10FE F584 00D8 00FF" /* ....... */ + $"F6AC 0081 00F4 00FE FD00 12FE F584 00D9" /* ...... */ + $"0002 56FF 81AC 0081 00F4 00FE FD00 1DFE" /* ..V..... */ + $"F587 0002 F700 00EE 0001 F6F7 F000 04F5" /* ........ */ + $"FBFF FFFB AC00 8100 F400 FEFD 001F FEF5" /* ..... */ + $"8800 03F8 FD00 00EE 00FF 81F2 0002 F5FA" /* ....... */ + $"FEFE FF00 F9AC 0081 00F4 00FE FD00 1EFE" /* ...... */ + $"F588 0003 F9FF F500 EE00 01FF FCF3 0000" /* ....... */ + $"F7FB FF00 F9AC 0081 00F4 00FE FD00 2FFE" /* ...../ */ + $"F5F7 0003 F52B 2B56 FDF9 0256 2B2B 9D00" /* ..++V.V++. */ + $"03FB FFFD F8F2 2BFF 0003 F6FC FF81 F300" /* .+... */ + $"00FA FBFF 00F9 AC00 8100 F400 FEFD 0027" /* ......' */ + $"FEF5 FA00 01F8 FCF4 FF02 ACFA F5A1 0000" /* ..... */ + $"ACFE FFED FF00 F9F2 0000 F9FC FF00 F9AC" /* .... */ + $"0081 00F4 00FE FD00 23FE F5FB 0000 81EF" /* ....#.. */ + $"FF01 81F5 A300 FDFF EDFF 00F9 F100 00F9" /* ..... */ + $"FDFF 00F9 AC00 8100 F400 FEFD 0041 FEF5" /* .....A */ + $"FB00 03FC FFFC FEFB FF00 FAFE 2B01 FAFD" /* ...+. */ + $"FDFF 01FE F6A5 0000 F6FD FF01 FBF6 FE00" /* ..... */ + $"00FE FDFF 0056 FE00 01F6 F9FD FF00 F9F1" /* ..V... */ + $"0000 2BFD FF00 F9AC 0081 00F4 00FE FD00" /* ..+..... */ + $"3BFE F5F8 0000 F5FC FF00 FAFB 0000 81FD" /* ;..... */ + $"FF01 FEF6 A600 00F7 FEFF 0081 FC00 00FC" /* ...... */ + $"FDFF 002B FC00 002B FEFF 00F9 F100 002B" /* .+..+...+ */ + $"FDFF 00F9 AC00 8100 F400 FEFD 0039 FEF5" /* .....9 */ + $"F700 00AC FDFF 002B FA00 00FB FDFF 00FD" /* ...+... */ + $"A600 04F9 FFFF FC00 FC00 00FC FDFF 002B" /* ......+ */ + $"FB00 0381 FFFF F9F1 0000 2BFD FF00 F9AC" /* ....+. */ + $"0081 00F4 00FE FD00 39FE F5F7 0000 FCFD" /* ....9.. */ + $"FF00 2BFA 0000 F5FC FF00 F9A7 0004 FCFF" /* .+..... */ + $"FFF5 00FC 0000 FCFD FF00 2BFB 0003 F6FF" /* ....+.. */ + $"FFF9 F100 002B FDFF 00F9 AC00 8100 F400" /* ..+.... */ + $"FEFD 0038 FEF5 F700 00FC FDFF 002B F900" /* .8...+. */ + $"0081 FDFF 00FD A700 04FD FF81 0000 FC00" /* ....... */ + $"00FC FDFF 002B FA00 FFFF 00F9 F100 002B" /* ..+....+ */ + $"FDFF 00F9 AC00 8100 F400 FEFD 0048 FEF5" /* .....H */ + $"F700 00FC FDFF 002B F900 00F7 FCFF 00F6" /* ...+... */ + $"E100 01AC F5F5 0001 ACF5 D800 FFFF 022B" /* ......+ */ + $"0000 FC00 00FC FDFF 002B FB00 032B FCFF" /* .....+..+ */ + $"56F1 0000 2BFD FF00 F9C7 0001 F5AC E800" /* V..+.... */ + $"8100 F400 FEFD 0047 FEF5 F700 00FC FDFF" /* ...G.. */ + $"002B F800 FCFF 0056 E200 02F8 FF2B F600" /* .+..V..+. */ + $"02F8 FF2B D900 022B FFFD FE00 FC00 00FC" /* .+..+... */ + $"FDFF 002B FA00 0281 FF2B F100 002B FDFF" /* .+..+..+ */ + $"00F9 C700 0181 FFE8 0081 00F4 00FE FD00" /* ....... */ + $"4AFE F5F7 0000 FCFD FF00 2BF8 0000 FEFD" /* J...+.. */ + $"FF00 F9E2 0002 FDFF 2BF6 0002 FDFF 2BD9" /* ...+..+ */ + $"0002 F8FF F8FE 00FC 0000 FCFD FF00 2BFA" /* ......+ */ + $"0002 F9FF F6F1 0000 2BFD FF00 F9C8 0002" /* ....+... */ + $"F5FF FFE8 0081 00F4 00FE FD00 45FE F5F7" /* ....E */ + $"0000 FCFD FF00 2BF8 0000 FCFD FF00 FCE3" /* ...+... */ + $"0003 F8FF FF2B F700 03F8 FFFF 2BD9 0001" /* ..+..+.. */ + $"F8AC FD00 FC00 00FC FDFF 002B E700 002B" /* ....+..+ */ + $"FDFF 00F9 C800 0281 FFFF E800 8100 F400" /* ...... */ + $"FEFD 0044 FEF5 F700 00FC FDFF 002B F800" /* .D...+. */ + $"00FC FDFF 00FC E300 03FD FFFF 2BF7 0003" /* ....+.. */ + $"FDFF FF2B D300 FC00 00FC FDFF 002B F700" /* +....+. */ + $"00F6 F200 002B FDFF 00F9 C900 00F6 FEFF" /* ...+... */ + $"E800 8100 F400 FEFD 0042 FEF5 F700 00FC" /* ....B.. */ + $"FDFF 002B F800 00FC FDFF 00FC E400 00F9" /* .+..... */ + $"FEFF 002B F800 00F9 FEFF 002B D300 FC00" /* .+...+.. */ + $"00FC FDFF 002B E700 002B FDFF 00F9 C900" /* ..+..+.. */ + $"00FC FEFF E800 8100 F400 FEFD 007E FEF5" /* .....~ */ + $"F700 00FC FDFF 002B F800 00FC FDFF 00FB" /* ...+... */ + $"F500 052B F9FC FC81 F8F7 0000 F6FD FF00" /* ..+... */ + $"2BF9 0000 F6FD FF00 2BF3 0005 2BF9 FCFC" /* +...+..+ */ + $"81F8 F300 01F8 81FE 0003 F581 FCF9 FE00" /* ..... */ + $"FC00 00FC FDFF 002B F400 0556 81FC FCF9" /* ...+..V */ + $"F6FA 0000 2BFD FF00 F9F7 0000 FCFC 0004" /* ..+..... */ + $"F881 FC81 F8EF 0005 F8FA FCFC FAF7 F700" /* ... */ + $"0056 FDFF E800 8100 F400 FEFD 0095 FEF5" /* .V.... */ + $"F700 00FC FDFF 002B F800 00FD FDFF 00F9" /* ...+... */ + $"F700 01F6 FCFB FF01 FEF7 FA00 01F6 FEFD" /* ..... */ + $"FF00 F9FD 2B04 F600 00F6 FEFD FF00 F9FD" /* .+.... */ + $"2B00 F6FA 0001 F6FC FBFF 01FE F7F6 0006" /* +...... */ + $"F6FE FC00 00F6 FEFE FF02 FC00 00FC 0000" /* ....... */ + $"FCFD FF00 2BF6 0001 F9FE FBFF 00FB FB00" /* .+.... */ + $"002B FDFF 00F9 F800 06F9 FF2B 0000 F5AC" /* .+...+.. */ + $"FCFF 01AC F6F3 0001 F7FD FBFF 01AC F6FA" /* .... */ + $"0000 F8FC FF00 F7FD 2B00 F5EE 0081 00F4" /* ...+... */ + $"00FE FD00 98FE F5F7 0000 FCFD FF00 2BF8" /* .....+ */ + $"00FC FF00 F8F8 000B F8FE FFFF F900 00F8" /* ...... */ + $"FEFF FFFA FB00 00AC F7FF 03FC 0000 ACF7" /* ..... */ + $"FF00 FCFB 000B F8FE FFFF F900 00F8 FEFF" /* ..... */ + $"FFFA F700 05AC FFFC 0000 FDFC FF01 F800" /* ...... */ + $"FC00 00FC FDFF 002B F700 0BFC FFFF AC2B" /* ...+..+ */ + $"00F5 FBFF FFFD F6FD 0000 2BFD FF00 F9F9" /* ...+. */ + $"0006 F7FF FF2B 00F5 FEFA FF00 FEF4 000B" /* ..+.... */ + $"FAFF FFFE F800 00F9 FFFF FEF8 FC00 01F6" /* .... */ + $"FEF7 FF00 F9EE 0081 00F4 00FE FD00 99FE" /* ..... */ + $"F5F7 0000 FCFD FF00 2BF9 0000 F7FC FFF8" /* ...+.. */ + $"0000 2BFE FF00 F8FD 0004 F6FE FFFF F8FD" /* ..+... */ + $"0000 ACF6 FF02 FC00 ACF6 FF00 FCFC 0000" /* ....... */ + $"2BFE FF00 F8FD 0004 F6FE FFFF F8F9 0005" /* +..... */ + $"81FF FFFC 00FA FBFF 01FB 00FC 0000 FCFD" /* ..... */ + $"FF00 2BF8 0003 FCFF FFAC FC00 0381 FFFF" /* .+.... */ + $"ACFD 0000 2BFD FF00 F9FA 0006 2BFE FFFF" /* ..+...+ */ + $"2B00 ACF8 FF00 FBF6 0004 F9FF FFFE F6FD" /* +.... */ + $"0004 F8FF FFFE F6FE 0001 F5FE F6FF 00F9" /* ..... */ + $"EE00 8100 F400 FEFD 0097 FEF5 F700 00FC" /* ...... */ + $"FDFF 002B F900 00FB FDFF 00FB F800 03FE" /* .+..... */ + $"FFFF 81FB 0004 56FF FFFE F5FE 0000 FEF6" /* ..V.. */ + $"FF02 FC00 FEF6 FF00 FCFC 0003 FEFF FF81" /* ..... */ + $"FB00 0456 FFFF FEF5 FB00 0081 FEFF 01FC" /* ..V... */ + $"F6FA FF01 FE00 FC00 00FC FDFF 002B F900" /* .....+. */ + $"00F9 FEFF 00F5 FB00 03FD FFFF FAFE 0000" /* ...... */ + $"2BFD FF00 F9FB 0000 F8FD FF01 2BF9 F6FF" /* +....+ */ + $"00F6 F800 002B FEFF 00F8 FB00 03FB FFFF" /* ...+... */ + $"ACFE 0000 F6F5 FF00 F9EE 0081 00F4 00FE" /* ...... */ + $"FD00 A6FE F5F7 0000 FCFD FF00 2BFA 0000" /* ....+.. */ + $"F6FC FF00 2BF9 0000 81FE FFF9 00FE FF00" /* .+.... */ + $"81FE 0002 F52B 81FD FF00 F9FD 2B04 F500" /* ..+.+.. */ + $"F52B 81FD FF00 F9FD 2B00 F5FD 0000 81FE" /* +.+... */ + $"FFF9 00FE FF00 81FC 0000 FCFD FF01 FDAC" /* ..... */ + $"F9FF 0000 FC00 00FC FDFF 002B FA00 00F5" /* .....+.. */ + $"FEFF 00FA FA00 00FA FEFF 03F5 0000 2BFD" /* ......+ */ + $"FF00 F9FC 0000 FAFC FF07 F8FF FFF9 0000" /* ...... */ + $"F6AC FCFF 0081 F800 03FD FFFF ACFA 0000" /* ..... */ + $"F7FE FF00 F8FE 0002 F62B ACFD FF00 F7FD" /* ...+. */ + $"2BED 0081 00F4 00FE FD00 98FE F5F7 0000" /* +...... */ + $"FCFD FF00 2BFA 0000 ACFD FF00 FAF9 0000" /* .+..... */ + $"F5FE FF00 81F9 0000 ACFE FFFC 0000 2BFD" /* .....+ */ + $"FF00 2BF9 0000 2BFD FF00 2BF9 0000 F5FE" /* .+..+.+.. */ + $"FF00 81F9 0000 ACFE FFFD 0000 ACFB FF03" /* ...... */ + $"FEF6 F6FE FCFF 0000 FC00 00FC FDFF 002B" /* .....+ */ + $"FA00 0081 FEFF 00F5 FA00 00F7 FEFF 03FA" /* ...... */ + $"0000 2BFD FF00 F9FD 0000 F8F9 FF00 2BFC" /* ..+....+ */ + $"0000 ACFD FF00 FDF9 0000 F8FE FF00 F8F9" /* ...... */ + $"00FE FF00 ACFC 0000 F9FD FFE8 0081 00F4" /* ...... */ + $"00FE FD00 9CFE F5F7 0000 FCFD FF00 2BFC" /* .....+ */ + $"0001 F6AC FDFF 0081 F800 0081 FEFF 00F7" /* ...... */ + $"F900 00FC FEFF 00F8 FD00 002B FDFF 002B" /* .....+.+ */ + $"F900 002B FDFF 002B F900 0081 FEFF 00F7" /* ..+.+... */ + $"F900 00FC FEFF 00F8 FE00 00FE FBFF 0381" /* ...... */ + $"0000 F8FD FF01 AC00 FC00 00FC FDFF 002B" /* .......+ */ + $"FB00 00F5 FEFF 00AC F900 002B FEFF 03FD" /* .....+. */ + $"0000 2BFD FF00 F9FD 0000 56FA FF00 81FB" /* ..+...V. */ + $"0000 2BFC FF00 F5FA 0000 FDFE FFF8 00FD" /* ..+.... */ + $"FF00 F5FD 0000 F9FD FFE8 0081 00F4 00FE" /* ...... */ + $"FD00 ABFE F5F7 0000 FCFD FF00 81FE 2B01" /* ....+. */ + $"56FB FCFF 00F9 F700 00FE FEFF F800 00FC" /* V..... */ + $"FEFF 00FB FD00 002B FDFF 002B F900 002B" /* ...+.+..+ */ + $"FDFF 002B F900 00FE FEFF F800 00FC FEFF" /* .+.... */ + $"00FB FD00 00FA FCFF 00F7 FE00 0081 FEFF" /* ...... */ + $"01F8 00FC 0000 FCFD FF00 2BFB 0000 F9FE" /* .....+.. */ + $"FF00 FAF9 0000 2BFD FF02 F600 2BFD FF00" /* ...+..+. */ + $"F9FC 0001 2BFD FCFF 00F6 FA00 00AC FDFF" /* ..+... */ + $"00F7 FB00 002B FEFF 00AC F800 FDFF 0056" /* ...+...V */ + $"FD00 00F9 FDFF E800 EB00 00F9 FBFF 00F9" /* ...... */ + $"FA00 00F9 FBFF 00F9 AE00 F400 FEFD 00A3" /* ...... */ + $"FEF5 F700 00FC F3FF 01FC F6F8 0000 F8FE" /* ..... */ + $"FF00 FDF8 00FD FF00 FEFD 0000 2BFD FF00" /* .....+. */ + $"2BF9 0000 2BFD FF00 2BFA 0000 F8FE FF00" /* +..+.+... */ + $"FDF8 00FD FF00 FEFC 0000 FDFD FF00 2BFD" /* .....+ */ + $"0004 F9FC F900 00FC 0000 FCFD FF00 2BFB" /* .......+ */ + $"0000 FDFE FF00 F8F9 0000 F9FD FF02 5600" /* ......V. */ + $"2BFD FF00 F9FB 0000 F9FD FF00 FDF9 0000" /* +...... */ + $"F9FD FF00 F9FB 0000 81FE FF00 81F9 0000" /* ...... */ + $"2BFD FF00 FBFD 0000 F9FD FFE8 00EB 0000" /* +...... */ + $"FFFB 2B00 FFFA 0000 FFFB 2B00 FFAE 00F4" /* +...+.. */ + $"00FE FD00 9EFE F5F7 0000 FCF1 FF00 81F9" /* ..... */ + $"0000 81FE FF00 FCF9 0000 56FC FFFD 0000" /* .....V.. */ + $"2BFD FF00 2BF9 0000 2BFD FF00 2BFA 0000" /* +.+..+.+.. */ + $"81FE FF00 FCF9 0000 56FC FFFC 0000 FCFD" /* ...V.. */ + $"FFF7 00FC 0000 FCFD FF00 2BFC 0000 F5FD" /* ....+.. */ + $"FF00 2BF9 0000 FDFD FF02 F900 2BFD FF00" /* .+....+. */ + $"F9FB 0000 2BFD FF00 FCF9 0000 F7FD FF00" /* ..+.... */ + $"F9FB 0000 FDFE FF00 F9F9 0000 FBFD FF00" /* ...... */ + $"FCFD 0000 F9FD FFE8 00EB 0001 FF2B FDFC" /* .....+ */ + $"012B FFFA 0001 FF2B FDFC 012B FFAE 00F4" /* .+..+.+. */ + $"00FE FD00 B1FE F5F7 0000 FCFD FF00 F9FD" /* ..... */ + $"2B02 F7FA FEFC FF00 ACFA 0000 FDFE FF00" /* +..... */ + $"ACFB 0001 2B81 FBFF 002B FE00 002B FDFF" /* ..+.+..+ */ + $"002B F900 002B FDFF 002B FA00 00FD FEFF" /* .+..+.+.. */ + $"00AC FB00 012B 81FB FF00 2BFD 0000 FCFD" /* ...+.+.. */ + $"FFF7 00FC 0000 FCFD FF00 2BFC 0000 F8FD" /* ....+.. */ + $"FF00 F7FC 0002 F5F8 FDFC FF02 FC00 2BFD" /* .....+ */ + $"FF00 F9FB 0000 2BFD FF00 F9F9 0000 2BFD" /* ...+...+ */ + $"FF00 FCFC 0000 F5FD FF00 FAFB 0001 F7FC" /* ...... */ + $"FBFF FD00 00F9 FDFF E800 EB00 07FF 2BFC" /* .....+ */ + $"2A2A F52B FFFA 0007 FF2B FC2A 2AF5 2BFF" /* **+..+**+ */ + $"AE00 F400 FEFD 0084 FEF5 F700 00FC FDFF" /* ..... */ + $"002B FA00 0081 FCFF 00FC FB00 EEFF 002B" /* .+.....+ */ + $"FE00 002B FDFF 002B F900 002B FDFF 002B" /* ..+.+..+.+ */ + $"FA00 EEFF 002B FD00 00FC FDFF F700 FC00" /* ..+.... */ + $"00FC FDFF 002B FC00 00FA EFFF 02FC 002B" /* ..+....+ */ + $"FDFF 00F9 FB00 002B FDFF 00F9 F800 FDFF" /* ...+.. */ + $"00FC FC00 00F7 EEFF FD00 00F9 FDFF E800" /* ...... */ + $"EB00 02FF 2BFC FEF5 012B FFFA 0002 FF2B" /* ..+.+..+ */ + $"FCFE F501 2BFF AE00 F400 FEFD 0084 FEF5" /* .+... */ + $"F700 00FC FDFF 002B F900 0081 FCFF 0056" /* ...+...V */ + $"FD00 002B EEFF 00F5 FE00 002B FDFF 002B" /* ..+...+.+ */ + $"F900 002B FDFF 002B FB00 002B EEFF 00F5" /* ..+.+..+. */ + $"FD00 00FC FDFF F700 FC00 00FC FDFF 002B" /* ......+ */ + $"FC00 00FC EFFF 0281 002B FDFF 00F9 FB00" /* ....+.. */ + $"002B FDFF 00F9 F800 FDFF 00FC FC00 00F9" /* .+..... */ + $"EFFF 00FD FD00 00F9 FDFF E800 EB00 00FF" /* ...... */ + $"FB2B 00FF FA00 00FF FB2B 00FF AE00 F400" /* +...+... */ + $"FEFD 008F FEF5 F700 00FC FDFF 002B F800" /* ....+. */ + $"00AC FDFF 00FD FD00 0056 FDFF 00FB F4F9" /* ....V. */ + $"002B FD00 002B FDFF 002B F900 002B FDFF" /* .+..+.+..+ */ + $"002B FB00 0056 FDFF 00FB F4F9 002B FC00" /* .+..V..+. */ + $"00FC FDFF F700 FC00 00FC FDFF 002B FC00" /* .....+. */ + $"00FE FEFF 00FE F4F9 0356 0000 2BFD FF00" /* ...V..+. */ + $"F9FB 0000 2BFD FF00 F9F8 00FD FF00 FCFC" /* ..+... */ + $"0000 FBFD FF00 FAF4 F900 F5FD 0000 F9FD" /* ...... */ + $"FFE8 00ED 00F5 FFFE 00F5 FFFD FAB4 00F4" /* .... */ + $"00FE FD00 8AFE F5F7 0000 FCFD FF00 2BF8" /* .....+ */ + $"0000 2BFC FF00 F8FE 0000 F9FD FF00 2BEF" /* ..+....+ */ + $"0000 2BFD FF00 2BF9 0000 2BFD FF00 2BFB" /* ..+.+..+.+ */ + $"0000 F9FD FF00 2BEE 0000 FCFD FFF7 00FC" /* ...+... */ + $"0000 FCFD FF00 2BFC 00FD FF00 FCF1 0000" /* ...+.... */ + $"2BFD FF00 F9FB 0000 2BFD FF00 F9F8 00FD" /* +...+.. */ + $"FF00 FCFC 0000 FCFD FFEE 0000 F9FD FFE8" /* ..... */ + $"00ED 0000 FFF9 2B02 D82B FFFE FA00 FFF9" /* ...+.+. */ + $"2B02 D82B FFFE 0000 FAB4 00F4 00FE FD00" /* +.+..... */ + $"86FE F5F7 0000 FCFD FF00 2BF7 0000 FDFD" /* ...+.. */ + $"FF00 FBFE 0000 F9FD FF00 2BEF 0000 2BFD" /* ....+..+ */ + $"FF00 2BF9 0000 2BFD FF00 2BFB 0000 F9FD" /* .+..+.+.. */ + $"FF00 2BEE 0000 FCFD FFF7 00FC 0000 FCFD" /* .+..... */ + $"FF00 2BFC 00FD FF00 FCF1 0000 2BFD FF00" /* .+....+. */ + $"F9FB 0000 2BFD FF00 F9F8 00FD FF00 FCFC" /* ..+... */ + $"0000 FCFD FFEE 0000 F9FD FFE8 00ED 0000" /* ....... */ + $"FFF7 2B00 FFFE 0000 FFF7 2B00 FFFE 0000" /* +...+... */ + $"FAB4 00F4 00FE FD00 8CFE F5F7 0000 FCFD" /* ..... */ + $"FF00 2BF7 0000 81FD FF00 FEFE 0000 FCFD" /* .+..... */ + $"FF00 2BEF 0000 2BFD FF00 2BF9 0000 2BFD" /* .+..+.+..+ */ + $"FF00 2BFB 0000 FCFD FF00 2BEE 0000 FCFD" /* .+...+.. */ + $"FFF7 00FC 0000 FCFD FF00 2BFD 0000 2BFD" /* ....+..+ */ + $"FF00 FCF1 0000 2BFD FF00 F9FB 0000 2BFD" /* ...+...+ */ + $"FF00 F9F8 00FD FF00 FCFC 00FC FFEE 0000" /* ...... */ + $"F9FD FFE8 00ED 00F5 FFFE 00F5 FFFE 0000" /* ..... */ + $"FACB 0000 F9FB FF00 F9FA 0000 F9FB FF00" /* ...... */ + $"F9F4 00FE FD00 83FE F5F7 0000 FCFD FF00" /* ..... */ + $"2BF7 0000 F8FC FF03 F500 00FC FDFF 002B" /* +......+ */ + $"EF00 0056 FDFF 002B F900 0056 FDFF 002B" /* ..V.+..V.+ */ + $"FB00 00FC FDFF 002B EE00 00FC FDFF F700" /* ...+... */ + $"FC00 00FC FDFF 002B FD00 002B FDFF 00FC" /* ...+..+. */ + $"F100 002B FDFF 00F9 FB00 002B FDFF 00F9" /* ..+...+. */ + $"F800 FDFF 00FC FC00 FCFF EE00 00FB FDFF" /* ..... */ + $"E800 CF00 00FA CB00 00FF FB2B 00FF FA00" /* .....+.. */ + $"00FF FB2B 00FF F400 FEFD 008B FEF5 F700" /* .+.... */ + $"00FC FDFF 002B F700 002B FCFF 032B 0000" /* ..+..+.+.. */ + $"FCFD FF00 2BEF 0000 F9FD FF00 2BF9 0000" /* .+...+.. */ + $"F9FD FF00 2BFB 0000 FCFD FF00 2BEE 0000" /* .+...+.. */ + $"FCFD FFF7 00FC 0000 FCFD FF00 2BFD 0000" /* ....+.. */ + $"2BFD FF00 FCF1 0000 2BFD FF00 F9FB 0000" /* +...+... */ + $"2BFD FF00 F9F8 00FD FF00 FCFC 00FC FFEE" /* +.... */ + $"0000 FCFD FFE8 00E4 00F6 FFF7 0000 FACB" /* ...... */ + $"0001 FF2B FDFC 012B FFFA 0001 FF2B FDFC" /* ..+.+..+ */ + $"012B FFF4 00FE FD00 95FE F5F7 0000 FCFD" /* .+.... */ + $"FF00 2BF6 00FC FF03 5600 00FC FDFF 002B" /* .+..V...+ */ + $"EF00 00F9 FDFF 002B F900 00F9 FDFF 002B" /* ...+...+ */ + $"FB00 00FC FDFF 002B EE00 00FC FDFF F700" /* ...+... */ + $"FC00 00FC FDFF 002B FD00 002B FDFF 00FC" /* ...+..+. */ + $"F100 002B FDFF 00F9 FB00 002B FDFF 00F9" /* ..+...+. */ + $"F800 FDFF 00FC FC00 FCFF EE00 00FC FDFF" /* ..... */ + $"E800 E400 0AFF F9FC F9FC F9FC F9FC F9FF" /* .. */ + $"F700 00FA CB00 07FF 2BFC 2A2A F52B FFFA" /* ....+**+ */ + $"0007 FF2B FC2A 2AF5 2BFF F400 FEFD 0097" /* ..+**+.. */ + $"FEF5 F700 00FC FDFF 002B F600 FCFF 03F9" /* ...+.. */ + $"0000 FCFD FF00 56EF 0000 F9FD FF00 2BF9" /* ...V...+ */ + $"0000 F9FD FF00 2BFB 0000 FCFD FF00 56EE" /* ...+...V */ + $"0000 FCFD FFF7 00FC 0000 FCFD FF00 2BFD" /* ......+ */ + $"0000 2BFD FF00 FEF1 0000 2BFD FF00 F9FB" /* ..+...+. */ + $"0000 2BFD FF00 F9F8 00FD FF00 FCFC 00FC" /* ..+.... */ + $"FF00 F6EF 0000 FCFD FFE8 00E4 000A FFF9" /* ..... */ + $"FCF9 FCF9 FCF9 FCF9 FFF7 0000 FACB 0002" /* .... */ + $"FF2B FCFE F501 2BFF FA00 02FF 2BFC FEF5" /* +.+..+ */ + $"012B FFF4 00FE FD00 8FFE F5F7 0000 FCFD" /* .+.... */ + $"FF00 2BF6 00FC FF03 F900 00FA FDFF 00F9" /* .+..... */ + $"EF00 00F9 FDFF 002B F900 00F9 FDFF 002B" /* ...+...+ */ + $"FB00 00FA FDFF 00F9 EE00 00FC FDFF F700" /* ...... */ + $"FC00 00FC FDFF 002B FC00 FCFF F100 002B" /* ...+...+ */ + $"FDFF 00F9 FB00 002B FDFF 00F9 F800 FDFF" /* ...+.. */ + $"00FC FC00 00AC FDFF 002B EF00 00FC FDFF" /* ....+.. */ + $"E800 E400 0AFF F9FC F9FC F9FC F9FC F9FF" /* .. */ + $"F700 00FA CB00 00FF FB2B 00FF FA00 00FF" /* ....+... */ + $"FB2B 00FF F400 FEFD 008D FEF5 F700 00FC" /* +..... */ + $"FDFF 002B F600 FCFF 03F9 0000 F9FD FF00" /* .+..... */ + $"FBEF 0000 F9FD FF00 2BF9 0000 F9FD FF00" /* ...+... */ + $"2BFB 0000 F9FD FF00 FBEE 0000 FCFD FFF7" /* +..... */ + $"00FC 0000 FCFD FF00 2BFC 00FC FF00 F6F2" /* ....+.. */ + $"0000 2BFD FF00 F9FB 0000 2BFD FF00 F9F8" /* ..+...+. */ + $"00FD FF00 FCFC 0000 FCFD FF00 56EF 0000" /* .....V.. */ + $"FCFD FFE8 00E4 000A FFF9 FCF9 FCF9 FCF9" /* .. */ + $"FCF9 FFF7 0000 FACD 00F5 FFFE 00F7 FFFF" /* .... */ + $"FFFD FAFA 00FE FD00 9AFE F5F7 0000 FCFD" /* .... */ + $"FF00 2BF6 00FC FF03 F900 00F9 FDFF 00FD" /* .+..... */ + $"EF00 00F9 FDFF 002B F900 00F9 FDFF 002B" /* ...+...+ */ + $"FB00 00F9 FDFF 00FD EE00 00FC FDFF F700" /* ...... */ + $"FC00 00FC FDFF 002B FC00 FCFF 00F8 F200" /* ...+... */ + $"002B FDFF 00F9 FB00 002B FDFF 00F9 F800" /* .+...+.. */ + $"FDFF 00FC FC00 00FC FDFF 0081 EF00 00FC" /* ...... */ + $"FDFF E800 E400 0AFF F9FC F9FC F9FC F9FC" /* .. */ + $"F9FF F700 EBFA E200 00FF F92B 02D8 2BFF" /* ...+.+ */ + $"FEFA 00FF F92B 00D8 012B FFFE 0000 FAFA" /* .+..+.. */ + $"00FE FD00 9AFE F5F7 0000 FCFD FF00 2BF7" /* .....+ */ + $"0000 F5FC FF03 F700 002B FCFF EF00 00F9" /* .....+.. */ + $"FDFF 002B F900 00F9 FDFF 002B FB00 002B" /* .+...+..+ */ + $"FCFF EE00 00FC FDFF F700 FC00 00FC FDFF" /* ..... */ + $"002B FC00 00FC FDFF 00FA F200 002B FDFF" /* .+.....+ */ + $"00F9 FB00 002B FDFF 00F9 F800 FDFF 00FC" /* ...+... */ + $"FC00 00F9 FDFF 00AC EF00 00FC FDFF E800" /* ...... */ + $"E400 0AFF F9FC F9FC F9FC F9FC F9FF F700" /* .. */ + $"00FA ED00 00FA E200 00FF F72B 00FF FE00" /* .....+.. */ + $"00FF F82B 012B FFFE 0000 FAFA 00FE FD00" /* .+.+.... */ + $"8BFE F5F7 0000 FCFD FF00 2BF7 0000 2BFC" /* ...+..+ */ + $"FF03 2B00 00F5 FCFF 00F8 F000 00F9 FDFF" /* .+..... */ + $"002B F900 00F9 FDFF 002B FB00 00F5 FCFF" /* .+...+.. */ + $"00F8 EF00 00FC FDFF F700 FC00 00FC FDFF" /* ...... */ + $"002B FC00 0081 FDFF 00FD F200 002B FDFF" /* .+.....+ */ + $"00F9 FB00 002B FDFF 00F9 F800 FDFF 00FC" /* ...+... */ + $"FC00 00F8 FCFF 00F5 F000 00FC FDFF E800" /* ...... */ + $"E700 F0FF FAFA EC00 00FA E200 F5FF FE00" /* ..... */ + $"F7FF FFFF FE00 00FA FA00 FEFD 0088 FEF5" /* .... */ + $"F700 00FC FDFF 002B F700 0056 FCFF FD00" /* ...+..V. */ + $"00FE FDFF 00FB F000 00F9 FDFF 002B F900" /* .....+. */ + $"00F9 FDFF 002B FA00 00FE FDFF 00FB EF00" /* ..+.... */ + $"00FC FDFF F700 FC00 00FC FDFF 002B FC00" /* .....+. */ + $"0056 FCFF 00F6 F300 002B FDFF 00F9 FB00" /* .V...+.. */ + $"002B FDFF 00F9 F800 FDFF 00FC FC00 00F6" /* .+..... */ + $"FCFF 0056 F000 00FC FDFF E800 E700 00FF" /* .V..... */ + $"F2F9 00FF FA00 00FA ED00 00FA C900 FC00" /* ....... */ + $"00FA FA00 FEFD 008E FEF5 F700 00FC FDFF" /* ..... */ + $"002B F700 00FB FDFF 00AC FD00 00FB FCFF" /* .+..... */ + $"00F5 F100 00F9 FDFF 002B F900 00F9 FDFF" /* ....+.. */ + $"002B FA00 00FB FCFF 00F5 F000 00FC FDFF" /* .+..... */ + $"F700 FC00 00FC FDFF 002B FC00 00F6 FCFF" /* ....+.. */ + $"0081 F300 002B FDFF 00F9 FB00 002B FDFF" /* ...+...+ */ + $"00F9 F800 FDFF 00FC FB00 00FE FDFF 00FD" /* ...... */ + $"F000 00FC FDFF E800 E700 00FF F2F9 00FF" /* ...... */ + $"FA00 00FA ED00 00FA D900 F6FF FC00 FC00" /* ....... */ + $"00FA FA00 FEFD 00A4 FEF5 F700 00FC FDFF" /* ..... */ + $"002B F700 00FE FDFF 00FA FD00 0056 FCFF" /* .+.....V */ + $"0081 F600 00AC FD00 00F9 FDFF 002B F900" /* ......+. */ + $"00F9 FDFF 002B FA00 0056 FCFF 0081 F600" /* ..+..V.. */ + $"00AC FC00 00FC FDFF F700 FC00 00FC FDFF" /* ...... */ + $"002B FB00 00FE FCFF 00F5 F700 03F7 F900" /* .+...... */ + $"2BFD FF00 F9FB 0000 2BFD FF00 F9F8 00FD" /* +...+.. */ + $"FF00 FCFB 0000 FBFC FF00 F8F7 0001 F5FB" /* ...... */ + $"FD00 00FC FDFF E800 E700 F0FF FA00 00FA" /* ...... */ + $"ED00 00FA D900 0AFF F9FC F9FC F9FC F9FC" /* ... */ + $"F9FF FC00 FC00 00FA FA00 FEFD 00A5 FEF5" /* ..... */ + $"F700 00FC FDFF 002B F800 00F8 FCFF 00F6" /* ...+... */ + $"FD00 00F5 FBFF 00F6 F800 01FA FEFD 0000" /* ....... */ + $"F9FD FF00 56F9 0000 F9FD FF00 56FA 0000" /* .V...V.. */ + $"F5FB FF00 F6F8 0001 FAFE FC00 00FC FDFF" /* ..... */ + $"F700 FC00 00FC FDFF 002B FB00 0081 FCFF" /* ....+.. */ + $"00FB F800 04F5 FE56 002B FDFF 00F9 FB00" /* ...V.+.. */ + $"002B FDFF 00F9 F800 FDFF 00FC FB00 00F8" /* .+..... */ + $"FCFF 00FD F700 01AC FBFD 0000 FCFD FF00" /* ...... */ + $"F6E9 00CF 0000 FAED 0000 FAD9 000A FFF9" /* ...... */ + $"FCF9 FCF9 FCF9 FCF9 FFFC 00FC 0000 FAFA" /* ... */ + $"00FE FD00 CAFE F5F7 0000 FCFD FF00 F9F8" /* ..... */ + $"0000 FDFD FF00 FDFB 0000 FCFC FF00 FEF9" /* ...... */ + $"0002 F8FF 81FD 0000 2BFD FF00 FAFD 0000" /* ....+... */ + $"2BFE 0000 2BFD FF00 FAFD 0000 2BFE 0000" /* +..+...+.. */ + $"FCFC FF00 FEF9 0002 F8FF 81FC 0000 FCFD" /* ..... */ + $"FFF7 00FC 0000 FCFD FF00 2BFB 0000 2BFB" /* ....+..+ */ + $"FF00 F9F9 0004 ACFF F500 2BFD FF00 F9FB" /* ....+. */ + $"0000 2BFD FF00 F9F8 00FD FF00 FCFA 0000" /* ..+..... */ + $"FEFC FF00 FCF9 0002 81FF F8FD 0000 F9FD" /* ..... */ + $"FF00 F7FD 0000 2BEE 00ED 0000 F9FC FF00" /* ...+.... */ + $"F9FD 0000 F9FC FF00 F9FD 0000 F9FC FF02" /* ...... */ + $"F900 FAED 0000 FAD9 000A FFF9 FCF9 FCF9" /* .... */ + $"FCF9 FCF9 FFFC 00FC 0000 FAFA 00FE FD00" /* ..... */ + $"D7FE F5F7 0000 FDFD FF00 ACF9 0000 81FC" /* ..... */ + $"FF00 F7FB 0000 F7FB FF01 FE2B FC00 03FA" /* ....+.. */ + $"FFFF F6FD 0000 2BFD FF00 FDFE 0005 F8FF" /* ..+... */ + $"2B00 002B FDFF 00FD FE00 05F8 FF2B 0000" /* +..+...+.. */ + $"F7FB FF01 FE2B FC00 03FA FFFF F6FC 0000" /* .+.... */ + $"FCFD FF00 F5F8 00FC 0000 FDFD FF00 F8FA" /* ..... */ + $"0000 ACFB FF00 81FC 0006 2BFD FFFB 0000" /* .....+.. */ + $"2BFD FF00 81FB 0000 2BFD FF00 F9F8 00FD" /* +...+.. */ + $"FF00 ACFA 0000 FAFB FF01 ACF5 FD00 03F5" /* ...... */ + $"FCFF FDFC 0000 F9FD FF00 81FE 0001 81FF" /* ..... */ + $"EE00 ED00 00FF FC2B 00FF FD00 00FF FC2B" /* ...+...+ */ + $"00FF FD00 00FF FC2B 02FF 00FA ED00 00FA" /* ...+.... */ + $"D900 0AFF F9FC F9FC F9FC F9FC F9FF FC00" /* .. */ + $"FC00 00FA FA00 FEFD 00D9 FEF5 F800 002B" /* ......+ */ + $"FBFF 0056 FB00 00FA FCFF 00FB F900 00AC" /* .V..... */ + $"FAFF 07AC F9F9 81FE FFFF FAFB 00FC FF05" /* ... */ + $"812B FAFF FFF5 FE00 FCFF 0581 2BFA FFFF" /* +..+ */ + $"F5FE 0000 ACFA FF07 ACF9 F981 FEFF FFFA" /* ... */ + $"FC00 00F5 FCFF 0081 F800 FD00 002B FCFF" /* ......+ */ + $"00FC FA00 00F7 FAFF 0BFE 81F9 F9AC FFFF" /* .... */ + $"FEF5 0000 F9FD FF00 FDFB 0000 FAFD FF00" /* ...... */ + $"ACF9 0000 2BFC FF00 F5FB 0001 F5FE FAFF" /* ..+... */ + $"03FB F9F9 FBFE FF00 F7FC 0000 2BFC FF04" /* ....+. */ + $"562B FCFF FDEE 00ED 0006 FF2B FCFC F52B" /* V+...++ */ + $"FFFD 0006 FF2B FCFC F52B FFFD 0008 FF2B" /* ..++..+ */ + $"FCFC F52B FF00 FAED 0000 FAD9 000A FFF9" /* +.... */ + $"FCF9 FCF9 FCF9 FCF9 FFFC 00FC 0000 FAFA" /* ... */ + $"00FE FD00 BCFE F5FA 0002 56FA FEFA FF05" /* ....V. */ + $"FBF7 2B2B 56FD FCFF 00AC F800 00F6 F4FF" /* ++V... */ + $"00AC FA00 00AC F9FF 0081 FD00 00AC F9FF" /* ...... */ + $"0081 FD00 00F6 F4FF 00AC FC00 01F8 FDFB" /* ...... */ + $"FF01 FCF8 FA00 0300 F5F9 81FA FF02 FDF9" /* ..... */ + $"F7FC 0000 FBF4 FF03 F700 2B81 FBFF 05AC" /* ....+. */ + $"F7F5 00F5 FAFB FF01 FCF8 FC00 0156 FEFC" /* ....V */ + $"FF02 FD56 F5FC 0000 56F4 FF00 FAFA 00F8" /* .V..V.. */ + $"FF00 F8EE 00ED 0006 FF2B FC2A F52B FFFD" /* ....+*+ */ + $"0006 FF2B FC2A F52B FFFD 0008 FF2B FC2A" /* ..+*+..+* */ + $"F52B FFFA FAED 0000 FAD9 000A FFF9 FCF9" /* +... */ + $"FCF9 FCF9 FCF9 FFFC 00FC 0000 FAFA 00FE" /* .... */ + $"FD00 95FE F5FB 0000 2BED FF00 ACF6 0000" /* ...+... */ + $"F8F6 FF00 ACF9 0000 FAFA FF00 FDFC 0000" /* ...... */ + $"FAFA FF00 FDFB 0000 F8F6 FF00 ACFC 0000" /* ...... */ + $"FDF7 FF00 FEFB 0001 00FB F5FF 00F6 FC00" /* ...... */ + $"00AC F6FF 02F8 00F8 F7FF 02FE 00FC F8FF" /* ..... */ + $"00F9 FE00 00F9 F8FF 00FC FB00 0081 F6FF" /* ...... */ + $"0081 F900 00AC FAFF 00FB ED00 ED00 06FF" /* ....... */ + $"2BFC 2AF5 2BFF FDFA 06FF 2BFC 2AF5 2BFF" /* +*+.+*+ */ + $"FDFA 06FF 2BFC 2AF5 2BFF EB00 DBFA F0FF" /* .+*+. */ + $"FFFA FCFA F900 FEFD 00CD FEF5 FB00 09F5" /* ... */ + $"FEFD FCFA F9F9 FAFC FEF8 FF01 FEF9 F400" /* .. */ + $"00F8 F8FF 00FC F800 01F5 FEFC FF01 FEF6" /* ..... */ + $"FC00 01F5 FEFC FF01 FEF6 FA00 00F8 F8FF" /* ..... */ + $"00FC FB00 03AC FFFF FDFE FC00 ACFE FF00" /* ..... */ + $"FEFB 0005 0056 FFFD FCFA FDF9 03FB FCFF" /* ...V. */ + $"FDFA 0000 ACF9 FF04 FEF8 0000 F8FE FF03" /* ...... */ + $"FDFC FCAC FEFF 04FE 00FC FFFF FDFC 03FE" /* ... */ + $"FFFF 56FE 0003 F9FF FFAC FEFC 03AC FFFF" /* V... */ + $"FCFA 0000 81F8 FF00 FAF8 0000 F7FB FF00" /* ...... */ + $"ACEC 00ED 0001 FF2B FEF5 012B FFFD 0001" /* ...+.+.. */ + $"FF2B FEF5 012B FFFD 0001 FF2B FEF5 012B" /* +.+..+.+ */ + $"FFEB 0000 FADC 0000 FFF2 F902 FF00 00FC" /* ....... */ + $"0000 FAFA 00FE FD00 A8FE F5F0 0007 2B56" /* ......+V */ + $"F9FB FCFC FAF8 F100 012B FCFC FF01 FDF8" /* ..+. */ + $"F600 00F8 FDFF 00FC F900 00F8 FDFF 00FC" /* ...... */ + $"F700 012B FCFC FF01 FDF8 F900 00F5 FA00" /* ..+.... */ + $"02F5 2BF5 FB00 EB00 01F9 FEFC FF01 81F5" /* .+.... */ + $"FD00 012B F6FA 0004 2BF5 00F5 F6FA 0000" /* ..+..+... */ + $"2BFC 0000 2BFA 0000 2BF8 0001 F8FD FCFF" /* +..+..+.. */ + $"01FC 2BF6 0000 81FD FF00 FAEB 00ED 0006" /* .+...... */ + $"FFE3 2BFC FC2B FFFD 0006 FFE3 2BFC FC2B" /* ++..++ */ + $"FFFD 0006 FFE3 2BFC FC2B FFEB 0000 FADC" /* ..++.. */ + $"0000 FFF2 F902 FF00 00FC 0000 FAFA 00FE" /* ........ */ + $"FD00 63FE F5D6 0004 F656 F956 F6F3 0003" /* .c..VV.. */ + $"F5F9 56F5 F700 03F5 F956 F5F4 0004 F656" /* V..V..V */ + $"F956 F6E6 00E9 0003 F7F9 F9F7 CB00 042B" /* V.....+ */ + $"F9F9 F8F5 F300 022B F9F8 E900 ED00 00FF" /* ..+... */ + $"FC2B 00FF FD00 00FF FC2B 00FF FD00 00FF" /* +...+... */ + $"FC2B 00FF EB00 00FA DC00 F0FF FF00 FC00" /* +...... */ + $"00FA FA00 FEFD 0020 FEF5 8400 8100 EC00" /* ... ... */ + $"FCFF FB00 FCFF FB00 FCFF EA00 00FA C900" /* ..... */ + $"FC00 00FA FA00 FEFD 002A FEF5 8400 8100" /* ....*.. */ + $"BA00 00FA E200 00F9 FCFF 00F9 FD00 00F9" /* ....... */ + $"FCFF 00F9 FD00 02F9 FFFF FEFF 02F9 00FA" /* ..... */ + $"FA00 FEFD 0033 FEF5 A700 00F5 DF00 D600" /* ..3.... */ + $"01F6 2BAE 00BA 0000 FAE2 0000 FFFC 2B00" /* .+.....+. */ + $"FFFD 0000 FFFC 2B00 FFFD 0002 FF2B 2BFE" /* ..+...++ */ + $"2B02 FF00 FAFA 00FE FD00 6EFE F5FB 0001" /* +....n.. */ + $"F62B FC00 05F7 2BF5 56FD F9ED 0002 F781" /* +..+V.. */ + $"FFE3 0001 F62B FC00 01F7 2BFA 0002 F8FC" /* ..+..+.. */ + $"FCDF 00FF 0007 F6FA FE2B 0000 2BF7 E100" /* ...+..+. */ + $"03FC FBFF FBCE 0001 2AF5 F800 002A EE00" /* ...*..*. */ + $"C200 F1FF E900 06FF 2BFC FCF5 2BFF FD00" /* ...++. */ + $"06FF 2BFC FCF5 2BFF FD00 02FF 2BFC 05FC" /* .++..+. */ + $"F52B FF00 FAFA 00FE FD00 8CFE F5FB 000C" /* +..... */ + $"F9FF FCFF FFAC FDFF 2B56 FFFF F9EE 0003" /* +V.. */ + $"F5AC FFFF E300 08F9 FFFC FFFF ACFD FF2B" /* ..+ */ + $"FB00 032B FEFF FCDF 00FF 0008 FBFF FF2B" /* ..+...+ */ + $"00F5 FFFF F5E3 0004 81FF 00FB 81ED 0003" /* ...... */ + $"F9AC FCAC FD00 03FC FFFF 56F0 0005 547E" /* ..V..T~ */ + $"547E 7E2A FC00 0454 7E54 A854 F000 C200" /* T~~*..T~TT.. */ + $"F1FF E900 06FF 2BFC 2AF5 2BFF FD00 06FF" /* ..+*+.. */ + $"2BFC 2AF5 2BFF FD00 02FF 2BFC 052A F52B" /* +*+..+.*+ */ + $"FFFA FAFA 00FE FD00 9CFE F5FB 000C FB56" /* ....V */ + $"00FF FF2B 00FF 2B00 FCFF F9ED 0002 2BFF" /* .+.+...+ */ + $"FFEB 0000 FAFA 0008 FB56 00FF FF2B 00FF" /* ....V.+. */ + $"2BFA 0002 F9FF FCEC 0000 FAF5 00FE 00FF" /* +...... */ + $"FF05 2B00 F5FF FFF5 EC00 00F9 F900 FFFF" /* .+.... */ + $"0100 F6EB 0009 FAFF FFF5 0000 F5FF FFF9" /* ..... */ + $"F000 0754 A8F5 0000 7EA8 2AFE 0005 547E" /* ..T..~*..T~ */ + $"0000 2A54 F000 C600 FDFF FD48 F900 FD48" /* ..*T..H.H */ + $"FDFF ED00 06FF 2BFC 2AF5 2BFF FDFA 06FF" /* ..+*+. */ + $"2BFC 2AF5 2BFF FDFA 02FF 2BFC 032A F52B" /* +*+.+.*+ */ + $"FFF8 00FE FD00 9BFE F5FB 000C FC00 00FF" /* ...... */ + $"FF2B 0081 F500 FCFF F9ED 0002 2BFF FFEC" /* +....+ */ + $"0001 F8FF FA00 08FC 0000 FFFF 2B00 81F5" /* ......+. */ + $"FA00 02F9 FFFC ED00 01F8 FFF5 00FE 00FF" /* ...... */ + $"FF04 2B00 002B F7EC 0001 81FC FA00 02F5" /* .+..+.... */ + $"FFFF E900 09F9 FFFF 5600 0056 FFFF F9F1" /* .V..V */ + $"0002 2AA8 54FD 00FF A8FE 00FF 7EFE 0000" /* ..*T..~.. */ + $"54F0 00C6 00FD FFFD 48F9 00FD 48FD FFED" /* T..H.H */ + $"0001 FF2B FEF5 012B FFFD 0001 FF2B FEF5" /* ..+.+..+ */ + $"012B FFFD 0002 FF2B F5FF F501 2BFF F800" /* .+..+.+. */ + $"FEFD 0105 FEF5 F800 FFFF 002B FD00 05FC" /* ....+.. */ + $"FFF9 56FC 56FC 0003 2B81 FC56 F900 062B" /* VV..+V..+ */ + $"FFFF F8FB FBF6 FD00 10F8 FBFB F700 002B" /* ....+ */ + $"FBFC 5600 00FA FFFF F92B F900 FFFF 002B" /* V..+..+ */ + $"FD00 08F8 FBFB F700 00F9 FFFC FE00 0456" /* ......V */ + $"F9F8 FCFA FC00 0AF5 FAFC FA00 00FA FFFF" /* ... */ + $"F92B FA00 0256 FCFB 05F8 0000 FFFF 2BFE" /* +..V...+ */ + $"0001 F7F6 FE00 032B 81FC 56FE 0005 2BFB" /* ....+V..+ */ + $"2BFB 81F6 FE00 04FC FFFD F9F5 FC00 0BFB" /* +.... */ + $"FFFF F92B 0000 2B81 FCFA F5FE 0004 F5AC" /* +..+.. */ + $"F7FB F8FA 000F F9FB FFFB 0000 FCFF FFF9" /* .... */ + $"0000 56FC 81F5 FE00 09F6 81FC FAF5 0000" /* ..V... */ + $"7EA8 54FD 0007 7EA8 5400 00A8 A854 ED00" /* ~T..~T..T. */ + $"CA00 FDFF FFE4 FD48 FF49 FFA6 FF48 FB00" /* .HIH. */ + $"FD48 FFE4 FDFF F100 06FF E32B FCFC 2BFF" /* H..++ */ + $"FD00 06FF E32B FCFC 2BFF FD00 02FF E32B" /* ..++..+ */ + $"FFFC 012B FFF8 00FE FD01 0AFE F5F8 00FF" /* .+... */ + $"FF00 2BFD 0006 FCFF FDF9 FEFF 56FE 0005" /* .+..V.. */ + $"F8FF F700 FD81 FA00 1B2B FFFF 5656 FFFE" /* ...+VV */ + $"F600 0081 FEF5 F6FF F82B FFF6 F5FE 2B00" /* ..++. */ + $"81FF FFF9 2BF9 00FF FF00 2BFE 0012 81FE" /* +..+.. */ + $"F5F6 FFF8 00F9 FFFC 002B ACFF ACFA ACFF" /* ..+ */ + $"FBFE 000B F6FE FA00 FBAC 0081 FFFF F92B" /* ....+ */ + $"FB00 03AC FEF6 F922 FF2B 00FF FF2B 00F5" /* .."+.+. */ + $"81FF 2B00 00F8 FFF7 00FD 81F5 FBFF ACFB" /* +... */ + $"FBFF FE00 00F5 FCFF FDF9 F5FC 0013 81FF" /* .... */ + $"FFF9 2B00 F8FF 5600 ACFE F600 81FF FFAC" /* +.V.. */ + $"FFFE FA00 1CF9 F8FF FF00 F5FB FFFF F900" /* .... */ + $"FDFD F5FF FE00 00F8 FF81 00FE FC00 00A8" /* ..... */ + $"A82A FD00 0954 A87E 0000 7EA8 A87E 2AEF" /* *.T~..~~* */ + $"00CA 00FD FFFF E4FD 48FF 49FF A6FF 48FB" /* ..HIH */ + $"00FD 48FF E4FD FFF1 0000 FFFC 2B00 FFFD" /* .H..+. */ + $"0000 FFFC 2B00 FFFD 0002 FF2B 2BFE 2B00" /* ..+...+++. */ + $"FFF8 00FE FD00 FCFE F5F8 00FF FF00 2BFD" /* ....+ */ + $"0006 FCFF FA00 FAFF FBFE 0006 FEFD 0000" /* ....... */ + $"ACFF F5FB 0019 2BFF FF00 0081 FF81 002B" /* ..+...+ */ + $"FF81 00F5 FFFD FBFF F700 2BF5 002B FFFF" /* ..+.+ */ + $"F700 FFFF 162B 0000 2BFF 8100 F5FF FD00" /* ..+..+.. */ + $"F9FF FC00 0081 FFFC 00F7 FFFF FE00 09FC" /* .... */ + $"FFF5 0081 FFF8 2BFF FFFA 0004 F9FF FA00" /* .+... */ + $"0020 FE2B 00FF FF2B 0081 FFFF 2B00 00FE" /* . +.+.+.. */ + $"FD00 00AC FFF5 56FF FF00 00FF FF2B 0000" /* ..V..+.. */ + $"F9FF FCFA 0002 2BFF FFFE 00FF FEFF 0009" /* ..+.. */ + $"F8FF FC00 F5FF FF56 FEAC FA00 1C81 00FF" /* .V... */ + $"FFF7 F8F8 FDFF F9FA FFF7 00FF FF2B 00FE" /* .+. */ + $"FF00 00F9 FC00 2AA8 A82A FD00 0554 A8A8" /* ...**..T */ + $"0000 2AFD A800 2AF0 00CC 00FF FFF9 E4FB" /* ..*.*.. */ + $"71FF 48FF 6CFF 48FB 00FF A2FF E4FF 71FF" /* qHlH.q */ + $"FFF2 00FC FFFB 00FC FFFB 00FF FFFE FFF7" /* ... */ + $"00FE FD00 EAFE F5F8 00FF FF00 2BFD 000B" /* ....+.. */ + $"FCFF F900 F9FF FC00 00F7 FFFE FDFC 00F5" /* .... */ + $"FB00 0B2B FFFF 0000 F7FF FE00 FAFF FDFE" /* ..+... */ + $"FCFF FBFF FF06 FC2B 0000 2BFF FFF7 00FF" /* .+..+. */ + $"FF05 2B00 00FA FFFD FEFC 0DFB 00F9 FFFC" /* .+.... */ + $"0000 F9FF FC00 2BFF FFFE 00FF FFFD FC03" /* ...+.. */ + $"F72B FFFF FA00 04AC FF2B 0000 0EF6 0000" /* +..+..... */ + $"FFFF 2B00 00FF FF2B 00F7 FFFE FDFC 0DF5" /* +..+.. */ + $"2BFF FF00 00FF FF2B 0000 F9FF FCFA 0007" /* +..+.... */ + $"2BFF FF00 00F7 FFFC FE00 FFFF FF00 FFFF" /* +.... */ + $"012B F5F9 0013 FC00 FCFF FAFB 00FC FFF9" /* .+.... */ + $"F62B 0000 FFFF 2BF7 FFFC FE00 05F5 002A" /* +..+...* */ + $"A8A8 2AFD 0002 54A8 A8FE 0000 2AFD A8F0" /* *..T..* */ + $"00CC 00FF FFF9 E4FB 71FF 48FF 6CFF 48FB" /* ..qHlH */ + $"00FF A2FF E4FF 71FF FFDA 00F4 00FE FD00" /* .q... */ + $"E3FE F5F8 00FF FF00 2BFD 000B FCFF F900" /* ..+... */ + $"F9FF FC00 00F9 FFFC F600 0B2B FFFF 0000" /* ....+.. */ + $"2BFF FF00 FCFF F9FD 0000 F7FD FF04 2B00" /* +....+. */ + $"2BFF FFF7 00FF FF05 2B00 00FC FFF9 FC00" /* +..+... */ + $"10F9 FFFC 0000 F9FF FC00 2BFF FF00 002B" /* ....+..+ */ + $"FFFF FC00 022B FFFF FA00 FFFF 022B 0000" /* ..+..+.. */ + $"FE00 FFFF 092B 0000 FFFF 2B00 F9FF FCFC" /* .+..+. */ + $"000C 2BFF FF00 00FF FF2B 0000 F9FF FCFA" /* ..+..+.. */ + $"0007 2BFF FF00 00F9 FFFC FE00 FFFF 042B" /* ..+....+ */ + $"00FF FF2B F800 13FC 0056 FFFD FC00 FCFF" /* .+...V. */ + $"F900 0056 FBFF FF2B F9FF FCFB 00FF A800" /* ..V+.. */ + $"2AFD 0002 54A8 7EFC 0003 7EA8 A82A F100" /* *..T~..~*. */ + $"CE00 FFFF FF9B FF7D FFE4 F74C FD71 FF6C" /* .}Lql */ + $"FF00 FF48 FF00 FDA2 FFCC FFE4 FFFF DC00" /* .H.. */ + $"F400 FEFD 00E5 FEF5 F800 FFFF 002B FD00" /* ....+. */ + $"0BFC FFF9 00F9 FFFC 0000 56FF FCF6 000B" /* ....V.. */ + $"2BFF FF00 002B FFFD 00FB FFF9 FC00 08F6" /* +..+... */ + $"FCFF FF81 002B FFFF F700 FFFF 052B 0000" /* .+..+.. */ + $"FBFF F9FC 0010 F9FF FC00 00F9 FFFC 002B" /* .....+ */ + $"FFFF 0000 F6FF FFFC 0002 2BFF FFFA 0004" /* ....+.. */ + $"FEFF F700 00FE 00FF FF09 2B00 00FF FF2B" /* ...+..+ */ + $"0056 FFFC FC00 0C2B FFFF 0000 FFFF 2B00" /* .V..+..+. */ + $"00F9 FFFC FA00 072B FFFF 0000 56FF FCFE" /* ...+..V */ + $"00FF FF04 F600 FFFF 2BF8 0013 FC00 F6FF" /* ...+... */ + $"FF56 00FC FFF9 00AC FB00 FFFF 2B56 FFAC" /* V...+V */ + $"FB00 027E A854 FD00 057E A854 0000 2AFE" /* ..~T..~T..* */ + $"0002 7EA8 2AF1 00CE 00FF FFFF 9BFF 7DFF" /* ..~*..} */ + $"E4F7 4CFD 71FF 6CFF 00FF 48FF 00FD A2FF" /* Lql.H. */ + $"CCFF E4FF FFDC 00F4 00FE FD00 E5FE F5F8" /* ... */ + $"00FF FF00 2BFD 000C FCFF F900 F9FF FC00" /* ..+.... */ + $"00F6 FFFF F5F7 000B 2BFF FF00 0056 FF81" /* ...+..V */ + $"0056 FFFD FD00 09F9 0000 F8FF FB00 2BFF" /* .V....+ */ + $"FFF7 00FF FF05 2B00 0056 FFFD FC00 0BF9" /* ..+..V.. */ + $"FFFC 0000 F9FF FC00 2BFF FFFE 0002 FEFF" /* ...+.. */ + $"F8FD 0002 2BFF FFFA 0004 FBFF FB00 00FE" /* ..+.... */ + $"00FF FF0A 2B00 00FF FF2B 00F6 FFFF F5FD" /* .+..+. */ + $"000C 2BFF FF00 00FF FF2B 0000 F9FF FCFA" /* ..+..+.. */ + $"0007 2BFF FF00 00F6 FFFE FE00 06FF FE00" /* ..+..... */ + $"00FF FF2B F800 14FC 0000 FDFF F500 FCFF" /* .+..... */ + $"F9F9 FF2B 00FF FF2B F6FF FFF6 FC00 022A" /* +.+..* */ + $"A87E FD00 017E A8FE 0000 54FE 0001 54A8" /* ~..~..T..T */ + $"F000 D000 FFFF FFA7 FF7D F14C FD71 FD9C" /* ..}Lq */ + $"FF78 FD9C FFA2 FFC6 FFA7 FFFF DE00 F400" /* x.. */ + $"FEFD 00F8 FEF5 F800 FFFF 002B FD00 06FC" /* ...+.. */ + $"FFF9 00F9 FFFC FE00 06AC FFAC F500 81F5" /* .... */ + $"FB00 1B2B FFFF 0000 FCFF F500 F5FE FF81" /* ..+... */ + $"00F5 FBFC 2B00 00FF F800 F6FF FFF8 F8F9" /* .+... */ + $"00FF FF16 2B00 00F5 FEFF 8100 F5FB 00F9" /* ..+.... */ + $"FFFC 0000 F9FF FC00 2BFF FFFE 000B FAFF" /* ...+.. */ + $"FE2B 0056 F8F6 FFFF F8F8 FC00 042B FFFF" /* +.V..+ */ + $"5600 222B F700 FFFF 2B00 00FF FF2B 0000" /* V."+.+..+.. */ + $"ACFF ACF5 0081 F52B FFFF 0000 FFFF 2B00" /* .+..+. */ + $"0056 FFFD F82B FC00 022B FFFF FE00 0BFC" /* .V+..+.. */ + $"FFF7 00F8 FFF9 0000 FFFF 2BF8 0017 FD00" /* ...+... */ + $"00FA AC00 00FD FF81 FCFF FAF9 FFFF F9F5" /* ... */ + $"FCFF ACF5 00F9 FE00 0754 A854 0000 54A8" /* ...TT..T */ + $"2AFE 0000 A8FE 0001 7E54 F000 D000 FFFF" /* *....~T.. */ + $"FFA7 FF7D F14C FD71 FD9C FF78 FD9C FFA2" /* }Lqx */ + $"FFC6 FFA7 FFFF DE00 F400 FEFD 0100 FEF5" /* .... */ + $"F900 0FAC FCFC ACF6 0000 FAAC FCAC 56AC" /* ....V */ + $"FCAC FAFE 0004 ACFF FFFE F7FA 0006 2BFB" /* ....+ */ + $"FCFB FBFE F7FE 000A F6FE FFFF ACF6 FAFE" /* . */ + $"F9FC FAFE 0003 FDFF FDF6 FA00 1AAC FCFC" /* .... */ + $"ACF6 0000 F6FE FFFF ACF6 F8AC FCAC 81F8" /* .. */ + $"ACFC ACF9 ACFC FCAC FE00 0081 FEFF 06F9" /* ... */ + $"0000 FDFF FDF6 FB00 03F8 FEFF FF17 8100" /* ...... */ + $"ACFC FCFD F6AC FCFC ACF6 0000 ACFF FFFE" /* .. */ + $"F7F6 ACFC FC81 FEFC 06AC F600 F5FF FFFC" /* .. */ + $"FC00 13F6 ACFC FCFD F600 00FC FEF9 FEFA" /* .... */ + $"0000 ACFC FCAC F6FA 0006 ACFC ACF5 F6F7" /* .... */ + $"00FE FCFF AC0C FFFE F8FA FFAC 0000 FCFF" /* .... */ + $"FFFD F7FD 0005 54A8 5454 7E2A FD00 FF7E" /* ..TTT~*.~ */ + $"0254 7E54 EF00 D200 FFFF FFA7 FF7D FF4B" /* .T~T..}K */ + $"F34C FFAC FD71 FFE4 FF9C FD6C FF78 FF9C" /* Lqlx */ + $"FFA2 FFA4 FFA7 FFFF E000 F400 FEFD 007F" /* .... */ + $"FEF5 E500 01F6 2BF8 0004 F600 00F5 2BFA" /* ..+....+ */ + $"0001 2BF6 FE00 01F5 2BFB 0000 2BEF 0001" /* ..+..+..+.. */ + $"2BF6 ED00 01F5 2BFC 0000 2BF7 0001 2BF5" /* +..+..+..+ */ + $"F200 01F6 2BF3 0001 F5F6 F200 01F6 2BE5" /* ..+....+ */ + $"0000 F6FE 0000 2BFD 0001 F62B F900 012A" /* ....+..+..* */ + $"F5F9 0000 2AED 00D2 00FF FFFF A7FF 7DFF" /* ..*..} */ + $"4BF3 4CFF ACFD 71FF E4FF 9CFD 6CFF 78FF" /* KLqlx */ + $"9CFF A2FF A4FF A7FF FFE0 00F4 00FE FD00" /* ... */ + $"30FE F584 0081 00D2 00FF FFFF A7FF 77FB" /* 0...w */ + $"4CFD 04FD 4CFF ACFF 9CFF 4CFF E4FF 9CF9" /* L.LL */ + $"6CFF 9CFF A2FF E4FF A7FF FFE0 00F4 00FE" /* l.. */ + $"FD00 30FE F584 0081 00D2 00FF FFFF A7FF" /* .0... */ + $"77FB 4CFD 04FD 4CFF ACFF 9CFF 4CFF E4FF" /* wL.LL */ + $"9CF9 6CFF 9CFF A2FF E4FF A7FF FFE0 00F4" /* l. */ + $"00FE FD00 34FE F584 0081 00D4 00FF FFFF" /* ..4... */ + $"7DFF A7FD 7DFB 4CFD 04FF 9CFD 4CFF E4FF" /* }}L.L */ + $"9CFF 00FD 48FD 6CFF 78FF A2FF CCFF C8FF" /* .Hlx */ + $"7DFF FFE2 00F4 00FE FD00 34FE F584 0081" /* }...4. */ + $"00D4 00FF FFFF 7DFF A7FD 7DFB 4CFD 04FF" /* ..}}L. */ + $"9CFD 4CFF E4FF 9CFF 00FD 48FD 6CFF 78FF" /* L.Hlx */ + $"A2FF CCFF C8FF 7DFF FFE2 00F4 00FE FD00" /* }... */ + $"4FFE F5EA 0000 F5E6 0002 F5F8 F9E1 0001" /* O...... */ + $"F781 FE00 03F8 81FC 2BE3 00BC 0003 F881" /* ..+... */ + $"FC2B CA00 D400 FFFF FF4D FFA7 FFF6 FF7D" /* +..M} */ + $"FB4C FB04 FF4C FFE4 FF9C FB00 FF48 FB6C" /* L.L.Hl */ + $"FF96 FFA2 FFE4 FF4D FFFF E200 F400 FEFD" /* M.. */ + $"0082 FEF5 FA00 0BFB FCFB F7FC FCF9 FCF8" /* ... */ + $"81FC F7FE 0002 FDFF F5E7 0002 FBFF FCF2" /* .... */ + $"0006 F7FC FC81 81FC 56F8 0011 56FF FF00" /* ..V..V. */ + $"00F8 FF00 FD2B 00F7 81FC FAFA 812B EB00" /* ..+.+. */ + $"EF00 0381 FAFC F9E0 0003 81FA FCF9 F800" /* ..... */ + $"04F8 FF00 FD2B CA00 D400 FFFF FF4D FFA7" /* ..+..M */ + $"FFF6 FF7D FB4C FB04 FF4C FFE4 FF9C FB00" /* }L.L. */ + $"FF48 FB6C FF96 FFA2 FFE4 FF4D FFFF E200" /* HlM. */ + $"F400 FEFD 008F FEF5 FA00 0A2B FFFD 0081" /* ...+. */ + $"FFF5 FD00 F881 FD00 01FB FDFE 0000 ACFE" /* ..... */ + $"0000 ACEE 0002 2BFF FCF1 0006 FCFF 2B00" /* ....+..+. */ + $"FCFF F9F8 00FF FFFF 0001 FCFF FC00 06AC" /* ..... */ + $"FF2B 00FB FF2B EC00 F000 04FB FA00 00FC" /* +.+..... */ + $"E100 04FB FA00 00FC F800 01FC FFFE 0000" /* ........ */ + $"ACCB 00D6 00FF FFFF CEFF CDFF C6FD A7FF" /* .. */ + $"7DFD 4CFF 70FD E4FF 4DFF 9CFD 48FF 00FD" /* }LpMH. */ + $"48FB 6CFF 96FF A2FF C6FF 4DFF A7FF FFE4" /* HlM */ + $"00F4 00FE FD01 04FE F5F9 001D ACFF F6F6" /* ...... */ + $"FFFD F800 FAF5 00FA F556 00F7 00F5 ACFF" /* ..V.. */ + $"2BF6 ACFF 2B00 00F7 F9F8 FD00 03F9 F6F9" /* ++.... */ + $"F8FC 0007 2BFF FCF7 F92B 0000 FE2B 03F5" /* ..++..+. */ + $"F62B 2BFD 0006 FCFF 2B00 F9FF FBFE 0002" /* ++..+... */ + $"F7F9 F8FE 00FF FF05 002B FFFF 2BF5 FE00" /* ...++. */ + $"06FC FF2B 00F9 FFF9 FE00 11FA F556 F5F8" /* .+...V */ + $"F92B 0000 F62B 2B00 2B2B F600 0004 00F9" /* +..++.++.... */ + $"F6F9 F8F5 0004 FFAC 0000 2BFE 0002 F8F9" /* ....+.. */ + $"2BFE 000B F556 F9F6 0000 F556 F9F6 0000" /* +..V..V.. */ + $"FE2B 03F5 F62B 2BFD 0009 FFAC 0000 2B00" /* +.++...+. */ + $"00F7 F9F8 FE00 082B FFFF 2B2B ACFF 2BF5" /* ...++++ */ + $"FB2B 08F6 F52B 2B00 00F8 F92B FE00 07FA" /* +.++..+.. */ + $"F556 0000 F7F9 F8E7 00D6 00FF FFFF CEFF" /* V.... */ + $"CDFF C6FD A7FF 7DFD 4CFF 70FD E4FF 4DFF" /* }LpM */ + $"9CFD 48FF 00FD 48FB 6CFF 96FF A2FF C6FF" /* H.Hl */ + $"4DFF A7FF FFE4 00F4 00FE FD01 05FE F5F9" /* M.... */ + $"0026 56FF FA00 FDFF 0000 FCF9 FEFF FEFF" /* .&V... */ + $"FDFF 00F8 FFFF F9F9 FFFF F9F6 ACFB 00FB" /* .. */ + $"FC00 F9FE FEF8 81FF F9FD 000E 2BFF FD2B" /* ...++ */ + $"81FF FA00 F9FF ACF5 F5FD F8FD 0017 FCFF" /* ... */ + $"2B00 ACFE 2B00 00AC FB00 FBFE F600 FFFF" /* +.+.... */ + $"00F6 FFFF 2BF5 FE00 1BFC FF2B F5AC FDF5" /* .+..+ */ + $"00F9 FEFF FEFF FFF9 F9FF F700 2BFF FF00" /* ..+. */ + $"F9FF FC00 F9FF FE03 F881 FFF9 F600 20FD" /* ... */ + $"FFFE F900 00F6 FEF9 F9FF F700 F5FE F5F6" /* ... */ + $"FB00 F5FE F5F6 FB00 00F9 FFAC F5F5 FDF8" /* ... */ + $"FD00 30FD FFFE F900 00AC FB00 FBFE F600" /* .0.... */ + $"F6FF FF2B 56FF FFF9 2BFA FFFB F7FF FFF7" /* +V+ */ + $"F5FD 56F6 FEF9 F9FF F7F9 FEFF FEFF 56AC" /* VV */ + $"FB00 FBFC E800 D600 FFFF FFCE FDCD FDCC" /* ... */ + $"FFA7 FF71 FF4D FDC6 FF78 FFE4 FF6C F748" /* qMxlH */ + $"FD6C FB96 FFC6 FF7D FFA7 FFFF E400 F400" /* l}.. */ + $"FEFD 0101 FEF5 F800 25FF FD00 FAFF F7F7" /* ...%. */ + $"5600 FFFF F681 FFFF 0000 FFFF 0000 FFFF" /* V..... */ + $"0056 FFF9 2BFB FFF6 00FF FF00 2BFF FCFD" /* .V+..+ */ + $"000D 2BFF FC00 00FE FF00 00FE FFF5 00FA" /* ..+..... */ + $"FC00 15FC FF81 FDFE F600 0056 FFF7 00F6" /* ....V. */ + $"FFFB 00FF FF00 00FF FFFC 0005 FCFF FB81" /* ..... */ + $"FFF9 FE00 FFFF 10F6 FB81 00F9 FFF9 0000" /* ..... */ + $"FFFF 002B FFFC 0000 FFFF 0300 2BFF FCF6" /* .+....+ */ + $"0017 F6FE FFFF 8100 5681 00F9 FFF9 00F9" /* ...V.. */ + $"FFFB F6F5 00F9 FFFB F6F5 FE00 04FE FFF5" /* ... */ + $"00FA FC00 13F6 FEFF FF81 56FF F700 F6FF" /* ...V. */ + $"FB00 00FF FF00 00FF FFFE 001A FEFD 0081" /* ....... */ + $"FFF8 00FB 0056 8100 F9FF F900 FFFF F681" /* ..V.. */ + $"FAFF F92B FBFF F6E9 00D6 00FF FFFF CEFD" /* +.. */ + $"CDFD CCFF A7FF 71FF 4DFD C6FF 78FF E4FF" /* qMx */ + $"6CF7 48FD 6CFB 96FF C6FF 7DFF A7FF FFE4" /* lHl} */ + $"00F4 00FE FD01 02FE F5F8 001A FBFF F7FB" /* ...... */ + $"FF81 8100 00FF FF00 00FF FF00 00FF FF00" /* ....... */ + $"00FF FF00 FCFF 56FE 2BFF 00FF FF03 002B" /* ..V+...+ */ + $"FFFC FD00 0D2B FFFC 0000 FCFF 2B00 F9FF" /* ..+..+. */ + $"F9F8 2BFC 0015 FCFF 2B81 FFFB 0000 FCFF" /* +..+.. */ + $"2B00 00FF FF00 FFFF 0000 FFFF FC00 0AFC" /* +...... */ + $"FF2B 00F9 FFF9 0000 FFFF FE00 0DF9 ACFF" /* +..... */ + $"F900 00FF FF00 2BFF FC00 00FF FF03 002B" /* ...+....+ */ + $"FFFC FD00 03F8 FFFF 81FD 000C F581 FFFF" /* .... */ + $"F500 00F9 ACFF F900 F6FE FF02 8100 F6FE" /* ..... */ + $"FF00 81FE 0004 F9FF F9F8 2BFB 0012 F581" /* ...+.. */ + $"FFFF FDFF 2B00 00FF FF00 00FF FF00 00FF" /* +...... */ + $"FFFE 0007 81FF F681 FFFB F7F8 FE00 0BF9" /* .... */ + $"ACFF F900 FFFF 0000 FCFF 56FE 2BE8 00D6" /* ...V+. */ + $"00FF FFFD CEFD CDFD CCFF E4FF 71FF C6FB" /* .q */ + $"78FD 6CFB 48FB 6CFD 96FF A2FF C6FF E4FF" /* xlHl */ + $"4DFF FFE4 00F4 00FE FD00 FEFE F5F8 001A" /* M..... */ + $"F7FF ACFA ACFE FB00 00FF FF00 00FF FF00" /* ..... */ + $"00FF FF00 00FF FF00 FBFF F7FC 00FF FF03" /* ...... */ + $"002B FFFC FD00 0C2B FFFC 0000 FCFF F500" /* .+..+... */ + $"F5FF FDFA FB00 15FC FF2B F5FF FFF5 00FB" /* ..+. */ + $"FF2B 0000 FFFE 00FF FF00 00FF FFFC 001B" /* +....... */ + $"FCFF 2B00 2BFF FC00 00FF FF00 F6FE 2BF9" /* +.+...+ */ + $"FFF9 0000 FFFF 002B FFFC 0000 FFFF 0300" /* ...+.... */ + $"2BFF FCFD 0003 F9FC FCF7 FE00 1EF7 0000" /* +...... */ + $"F9FF 2BF6 FE2B F9FF F900 00F5 81FF FFF6" /* ++.. */ + $"00F5 81FF FFF6 0000 F5FF FDFA FB00 13F7" /* ..... */ + $"0000 F9FF FEFF 2B00 00FF FE00 00FF FF00" /* ..+..... */ + $"00FF FFFE 0016 F6FF FB56 FCFF 8100 00F6" /* ...V.. */ + $"FE2B F9FF F900 FFFF 0000 FBFF F7E5 00D6" /* +.... */ + $"00FF FFFD CEFD CDFD CCFF E4FF 71FF C6FB" /* .q */ + $"78FD 6CFB 48FB 6CFD 96FF A2FF C6FF E4FF" /* xlHl */ + $"4DFF FFE4 00F4 00FE FD00 F8FE F5F7 0024" /* M....$ */ + $"FEFF F556 FFF8 0000 FFFF 0000 FFFF 0000" /* V...... */ + $"FFFF 0000 FFFF 00F8 FFFC 0000 F600 00FF" /* ....... */ + $"FF00 2BFF FCFD 0006 2BFF FC00 00FE FCFE" /* .+..+.. */ + $"0002 81FF F8FB 0015 FCFF 2B00 81FF 8100" /* ....+.. */ + $"F8FF FA00 F5FF 8100 FFFF 0000 FFFF FC00" /* ..... */ + $"1BFC FF2B 00F7 FF81 0000 FFFF 00FB FF00" /* .+..... */ + $"81FF F900 00FE FF00 2BFF FC00 00FF FF03" /* ...+... */ + $"002B FFFC F600 1881 0000 2BFE 00FB FF00" /* .+....+.. */ + $"81FF F900 F9F5 00F7 FFF5 F9F5 00F7 FFF5" /* ... */ + $"FE00 0281 FFF8 FB00 1381 0000 2BFE F8FF" /* ......+ */ + $"FA00 F5FF 8100 00FF FF00 00FF FFFD 0018" /* ....... */ + $"ACFF 00F8 FF81 0000 FBFF 0081 FFF9 00FF" /* ..... */ + $"FF00 00F8 FFFC 0000 F6E8 00D6 00FF FFFD" /* ...... */ + $"CEFD CDFD CCFF A7FF E4FF 71FF 4DFD 78FD" /* qMx */ + $"71F7 6CFB 96FD A2FF C6FF 71FF FFE4 00F4" /* qlq. */ + $"00FE FD00 FCFE F5F7 0025 FA81 00F5 FE00" /* ...%.. */ + $"00F9 FFFF F9F9 FFFF FA00 FCFF ACF6 FCFF" /* .. */ + $"ACF6 FAFF FDFC FA00 F9FF FFF8 FBFF FEF7" /* . */ + $"FE00 052B FDFD 2B81 FCFD 0001 2BFE FB00" /* ..++..+. */ + $"17F7 FEFF FBF5 F6FF FF56 00FA FEF7 81FC" /* .V. */ + $"00F9 FFFF FAF9 FFFF FAFE 001C 2BFD FFF9" /* ...+ */ + $"F7AC FDF6 00F9 FFFF F9F9 FFFD 56FF FEF6" /* .V */ + $"00FA FFFB FAFD FD2B F9FF FF04 F8FB FFFE" /* .+. */ + $"F7F7 0017 FEF8 F7FC F600 F9FF FD56 FFFE" /* ...V */ + $"F656 AC2B 81F8 0056 AC2B 81F8 FD00 012B" /* V+.V+..+ */ + $"FEFA 0030 FEF8 F7FC F600 FAFE F781 FC00" /* .0.. */ + $"00F9 FFFF FA00 FCFF ACF6 0000 56FB 0000" /* ....V.. */ + $"FEF6 0000 F9FF FD56 FFFE FBFF FFF9 0000" /* ..V.. */ + $"FAFF FDFC FAE8 00D6 00FF FFFD CEFD CDFD" /* .. */ + $"CCFF A7FF E4FF 71FF 4DFD 78FD 71F7 6CFB" /* qMxql */ + $"96FD A2FF C6FF 71FF FFFD FAE8 00F4 00FE" /* q.. */ + $"FD00 A1FE F5F3 0000 F5F5 0000 2BFE 0000" /* .....+.. */ + $"2BFE 0001 F52B F000 012B F6FB 0000 81EF" /* +..+..+.. */ + $"0001 2BF5 F400 05F5 0000 2B2B F6F9 0003" /* ..+....++.. */ + $"2B00 00F6 FD00 FFF6 0100 F5FE 00EF 00FF" /* +....... */ + $"2BFD 0003 2B00 00F6 FE00 01F5 2BFD 0001" /* +..+....+.. */ + $"F52B FA00 0081 F900 FF2B FC00 012B F5F8" /* +...+..+ */ + $"0000 2BFC 0003 F500 00F6 FD00 032B 0000" /* ..+......+.. */ + $"F6F9 0001 F52B E600 D600 FFFF FDCE FDCD" /* ..+.. */ + $"FDCC FFC6 FFA6 FFE4 FF71 FFC6 F978 FD6C" /* qxl */ + $"F996 FBA2 FFCC FFE4 FFFF FE00 00FA E800" /* ... */ + $"F400 FEFD 003E FEF5 C500 0281 FDF6 C300" /* ..>... */ + $"D500 0281 FDF6 B000 D600 FFFF FDCE FDCD" /* .... */ + $"FDCC FFC6 FFA6 FFE4 FF71 FFC6 F978 FD6C" /* qxl */ + $"F996 FBA2 FFCC FFE4 FFFF FE00 00FA E800" /* ... */ + $"F400 FEFD 0038 FEF5 C500 FFAC C200 D500" /* ..8... */ + $"FFAC AF00 D600 FFFF FDCE FDCD FBCC FDC6" /* .. */ + $"FFA6 FF71 FFC6 FB9C FDA2 FB96 FBA2 FFC6" /* q */ + $"FDCC FFFF FE00 00FA E800 F400 FEFD 0030" /* .....0 */ + $"FEF5 8400 8100 D600 FFFF FDCE FDCD FBCC" /* ... */ + $"FDC6 FFA6 FF71 FFC6 FB9C FDA2 FB96 FBA2" /* q */ + $"FFC6 FDCC FFFF FE00 00FA E800 F400 FEFD" /* .... */ + $"0034 FEF5 8400 8100 D600 FFFF FDCE FBCD" /* .4... */ + $"FBCC FDC6 FFA6 FF71 FF4C FD04 FF71 FF7D" /* qL.q} */ + $"FFA2 FFC6 FBA2 FFC6 FBCC FFFF FE00 00FA" /* .. */ + $"E800 F400 FEFD 0047 FEF5 D600 00F5 F900" /* ...G... */ + $"01F7 81C1 0006 F781 0000 F881 FC00 2B82" /* ......+ */ + $"00D6 00FF FFFD CEFB CDFB CCFD C6FF A6FF" /* .. */ + $"71FF 4CFD 04FF 71FF 7DFF A2FF C6FB A2FF" /* qL.q} */ + $"C6FB CCFF FFFE 0000 FAE8 00F4 00FE FD00" /* ..... */ + $"85FE F5F8 0005 F7FC 81FA FCF7 E600 02FD" /* .... */ + $"FFF5 FB00 0256 FFFF F300 02F5 F9FD FD00" /* ..V... */ + $"04F7 FAFB FCF6 FE00 08F7 FAFB FCF6 0000" /* ..... */ + $"2BFF FDFC 00FB FD00 06F7 FCFC 8181 FC56" /* +...V */ + $"F800 0756 FFFF 00F8 FF00 FD09 2B00 00F7" /* ..V..+.. */ + $"81FC FAFA 812B 8B00 D600 FFFF FBCE FDCD" /* +.. */ + $"F9CC FDC6 FFA6 FF71 FF04 FD4C FF04 FF71" /* q.L.q */ + $"FF7D FFCC FDC6 FBCC FFEE FFFF FE00 00FA" /* }.. */ + $"E800 F400 FEFD 0086 FEF5 F900 06FA FFF8" /* ..... */ + $"0000 2BF9 E600 01FB FDF9 00FF FFFA 0000" /* ..+..... */ + $"ACFC 0003 FAF9 FFFF FE00 10F5 FE00 00FC" /* ...... */ + $"FEF5 00F5 FE00 00FC FEF5 002B FCFF 00FA" /* ....+. */ + $"FC00 06FC FF2B 00FC FFF9 F800 FFFF 0400" /* ..+.... */ + $"FCFF 0000 FD00 06AC FF2B 00FB FF2B 8C00" /* ....+.+. */ + $"D600 FFFF FBCE FDCD F9CC FDC6 FFA6 FF71" /* .q */ + $"FF04 FD4C FF04 FF71 FF7D FFCC FDC6 FBCC" /* .L.q} */ + $"FFEE FFFF FE00 00FA E800 F400 FEFD 00BB" /* ..... */ + $"FEF5 FA00 022B FFAC FD00 05F5 0000 F7F9" /* ..+.... */ + $"F8FD 0005 FA00 56F8 0000 FE2B 0FF5 F62B" /* ...V..+.+ */ + $"2B00 00FA F556 00F7 0000 F8F9 F7FE 00FF" /* +..V.... */ + $"FF08 F5F9 F800 00F5 ACFF 2BFB 00FF FFFE" /* ...+. */ + $"0010 56FF 0000 F8FF F900 56FF 0000 F8FF" /* ..V...V.. */ + $"F900 00FD 2B01 ACF5 FC00 0BFC FF2B 00F9" /* ..+...+. */ + $"FFFB 0000 F7F9 F8FD 00FF FF04 2BFF FF2B" /* ....++ */ + $"F5FD 0006 FCFF 2B00 F9FF F9FE 000F FAF5" /* ..+... */ + $"56F5 F8F9 2B00 00F6 2B2B 002B 2BF6 FE00" /* V+..++.++. */ + $"03F9 F6F9 F8A6 00D4 00FF FFFD CEFB CDF7" /* ... */ + $"CCFF E4FF 71F7 4CFF 71FF 7DFF A6F9 CCFF" /* qLq} */ + $"FFFC 0000 FAE8 00F4 00FE FD00 BBFE F5FA" /* ..... */ + $"0002 FAFF FAFB 002F ACFB 00FB FEF6 F9FD" /* .../. */ + $"FFF9 FCFF FA00 F9FF ACF5 F5FD F8F9 FEFF" /* . */ + $"FEFF FDFF 00FD FB00 ACFF 8100 FFFF 5681" /* ...V */ + $"FFF9 00F8 FFFF F9F6 FC00 FFFF FE00 0E56" /* ....V */ + $"FFF6 002B FFFC 0056 FFF6 002B FFFC FC00" /* .+.V.+. */ + $"01F5 81FB 0016 FCFF 2B00 ACFE 2B00 ACFB" /* ...+.+. */ + $"00FB FEF6 0000 FFFF F6FF FF2B F5FD 0021" /* ...+.! */ + $"FCFF 2BF5 ACFD F500 F9FE FFFE FFFF F9F9" /* +. */ + $"FFF7 002B FFFF 00F9 FFFC 00F9 FEFE F881" /* .+.. */ + $"FFF9 A700 D400 FFFF FDCE FBCD F7CC FFE4" /* .. */ + $"FF71 F74C FF71 FF7D FFA6 F9CC FFFF FC00" /* qLq}. */ + $"00FA E800 F400 FEFD 00BA FEF5 FA00 02FC" /* ...... */ + $"FFF9 FC00 2E56 FFF7 00F6 FFFB 00FF FF00" /* ..V... */ + $"00FE FF00 00FE FFF5 00FA 0000 FFFF F681" /* ...... */ + $"FFFF 56FF 2B00 F9FF F600 FFFF 002B FFFC" /* V+...+ */ + $"0000 FFFF FA00 FFFF FE00 0EF5 FEFB 002B" /* ......+ */ + $"FFFB 00F5 FEFB 002B FFFB FC00 0156 2BFB" /* ..+..V+ */ + $"0016 FCFF 81FD FEF6 0056 FFF7 00F6 FFFB" /* ...V. */ + $"0000 FFFF 00FF FF00 00FD 0005 FCFF FB81" /* ....... */ + $"FFF9 FE00 FFFF 16F6 FB81 00F9 FFF9 0000" /* ..... */ + $"FFFF 002B FFFC 0000 FFFF 002B FFFC A700" /* .+...+. */ + $"D400 FFFF FBCE FBCD F9CC FF7D FD71 FD4C" /* .}qL */ + $"F771 FFA6 FDCC FFEE FFFF FC00 00FA E800" /* q... */ + $"F400 FEFD 00B8 FEF5 FA00 02FB FFF9 FC00" /* ..... */ + $"2EFC FF2B 0000 FFFF 00FF FF00 00FC FF2B" /* .+.....+ */ + $"00F9 FFF9 F82B 0000 FFFF 0000 FFFF F8FF" /* .+.... */ + $"F800 81FF F500 FFFF 002B FFFC 0000 FFFF" /* ...+.. */ + $"FA00 FFFF FD00 0D2B FB81 F9FF F800 002B" /* ...+..+ */ + $"FB81 F9FF F8FC 0000 FBFA 0016 FCFF 2B81" /* ....+ */ + $"FFFB 00FC FF2B 0000 FFFF 0000 FFFF 00FF" /* .+..... */ + $"FF00 00FD 000A FCFF 2B00 F9FF F900 00FF" /* ...+... */ + $"FFFE 0013 F9AC FFF9 0000 FFFF 002B FFFC" /* .....+ */ + $"0000 FFFF 002B FFFC A700 D400 FFFF FBCE" /* ...+.. */ + $"FBCD F9CC FF7D FD71 FD4C F771 FFA6 FDCC" /* }qLq */ + $"FFEE FFFF FC00 00FA E800 F400 FEFD 00B3" /* ..... */ + $"FEF5 FA00 02F8 FFFC FD00 142B FBFF 2B00" /* ....++. */ + $"00FF FE00 FFFF 0000 FCFF F600 F5FF FDFA" /* ..... */ + $"FE00 FFFF FF00 FFFF 1100 FAFE FAAC F700" /* ..... */ + $"00FF FF00 2BFF FC00 00FF FFFA 00FF FFFA" /* ..+... */ + $"0001 FCFE FB00 01FC FEFC 0001 2B56 FA00" /* ......+V. */ + $"16FC FF2B F5FF FFF5 FBFF 2B00 00FF FE00" /* .++... */ + $"00FF FF00 FFFF 0000 FD00 21FC FF2B 002B" /* .....!+.+ */ + $"FFFC 0000 FFFF 00F6 FE2B F9FF F900 00FF" /* ...+.. */ + $"FF00 2BFF FC00 00FF FF00 2BFF FCA7 00D2" /* .+...+. */ + $"00FF FFFB CEFB CDFB CCFF A6FF 7DF7 71FB" /* .}q */ + $"7DFF A6FF CCFF CDFF FFFA 0000 FAE8 00F4" /* }... */ + $"00FE FD00 B4FE F5F9 0014 ACFF F600 00F5" /* ...... */ + $"FCF8 FFFA 00F5 FF81 00FF FF00 00FD FDFE" /* .... */ + $"0002 81FF F8FE 00FF FFFF 00FF FF04 2BFE" /* .....+ */ + $"FC2B 2BFE 00FF FF07 002B FFFC 0000 FFFF" /* ++...+.. */ + $"FA00 FFFF FB00 022B FFF7 FC00 022B FFF7" /* ...+..+ */ + $"FC00 0081 F900 16FC FF2B 0081 FF81 F8FF" /* ....+. */ + $"FA00 F5FF 8100 00FF FF00 FFFF 0000 FD00" /* ....... */ + $"21FC FF2B 00F7 FF81 0000 FFFF 00FB FF00" /* !+..... */ + $"81FF F900 00FE FF00 2BFF FC00 00FF FF00" /* ...+... */ + $"2BFF FCA7 00D2 00FF FFFB CEFB CDFB CCFF" /* +.. */ + $"A6FF 7DF7 71FB 7DFF A6FF CCFF CDFF FFFA" /* }q} */ + $"0000 FAE8 00F4 00FE FD00 B6FE F5F8 0013" /* ....... */ + $"81FE F8F7 AC56 00FA FEF7 81FC 0000 FFFF" /* V... */ + $"F7FA FEF6 FE00 012B FEFE 0008 F9FF FFF9" /* ..+.. */ + $"F9FF FFFA FBFD FF0D F7F9 FFFF F7FB FFFE" /* . */ + $"F700 FCFF ACF6 FE00 052B FCFF FFFB F6FD" /* ...+ */ + $"0001 FDF8 FB00 01FD F8FB 0000 81FA 0017" /* ........ */ + $"F7FE FFFB F5F6 FFFF 56FA FEF7 81FC 0000" /* V.. */ + $"F9FF FF81 FFFF FA00 FE00 232B FDFF F9F7" /* ..#+ */ + $"ACFD F600 F9FF FFF9 F9FF FD56 FFFE F600" /* .V. */ + $"FAFF FBFA FDFD 2BF9 FFFF F8FB FFFE F7A8" /* + */ + $"00D2 00FF FFF9 CEFB CDFD CCFF CDFF A6F3" /* .. */ + $"7DFF A7FB CDFF FFFA 0000 FAE8 00F4 00FE" /* }.... */ + $"FD00 75FE F5F6 00FF 2BFC 0001 2BF5 FE00" /* .u.+..+. */ + $"FFFF 01F5 2BFB 0000 81F7 0006 F681 F8F9" /* .+.... */ + $"FAFE FCF7 0000 2BF4 0002 F8AC F7FC 0002" /* ..+.... */ + $"F8AC F7FB 0001 F5F6 EF00 012B F5F6 00FE" /* ....+. */ + $"0005 F500 002B 2BF6 F900 032B 0000 F6FD" /* ....++..+.. */ + $"00FF F601 00F5 9E00 D200 FFFF F9CE FBCD" /* ..... */ + $"FDCC FFCD FFA6 F37D FFA7 FBCD FFFF FA00" /* }. */ + $"00FA E800 F400 FEFD 0046 FEF5 EA00 FFFF" /* ....F. */ + $"FB00 0281 FDF6 F700 01FB FAFE 0001 ACF8" /* ...... */ + $"EA00 01F5 F8FB 0001 F5F8 D800 8100 D000" /* ....... */ + $"FFFF F9CE F7CD FFCF FFA6 FD7D FBE4 FFA7" /* } */ + $"FFF3 FDCD FFFF F800 00FA E800 F400 FEFD" /* .... */ + $"003C FEF5 EB00 03FA FFFF FAFC 00FF ACF6" /* .<... */ + $"0005 F6FB 81F9 F9F7 B600 8100 D000 FFFF" /* ..... */ + $"F9CE F7CD FFCF FFA6 FD7D FBE4 FFA7 FFF3" /* } */ + $"FDCD FFFF F800 00FA E800 F400 FEFD 0026" /* .....& */ + $"FEF5 8400 8100 CE00 FFFF F7CE F9CD FFA6" /* ... */ + $"FF7D FDE4 FFA7 FFF3 FBCE FFFF F600 00FA" /* }.. */ + $"E800 F400 FEFD 0026 FEF5 8400 8100 CE00" /* ...&... */ + $"FFFF F7CE F9CD FFA6 FF7D FDE4 FFA7 FFF3" /* } */ + $"FBCE FFFF F600 00FA E800 F400 FEFD 0024" /* .....$ */ + $"FEF5 8400 8100 CC00 FFFF F5CE FDCD FFA6" /* ... */ + $"FFE4 FDA7 FFF3 FBCE FFFF F400 00FA E800" /* ... */ + $"F400 FEFD 0024 FEF5 8400 8100 CC00 FFFF" /* ..$... */ + $"F5CE FDCD FFA6 FFE4 FDA7 FFF3 FBCE FFFF" /* */ + $"F400 00FA E800 F400 FEFD 001C FEF5 8400" /* ....... */ + $"8100 CA00 FDFF F5CE FBA7 FBCE FDFF F200" /* ... */ + $"00FA E800 F400 FEFD 001C FEF5 8400 8100" /* ....... */ + $"CA00 FDFF F5CE FBA7 FBCE FDFF F200 00FA" /* ... */ + $"E800 F400 FEFD 0020 FEF5 8400 8100 C600" /* ... ... */ + $"FDFF F9CE FFF3 FFA7 FFF3 FFCE FDFF EE00" /* . */ + $"00FA E800 F400 FEFD 0020 FEF5 8400 8100" /* .... .. */ + $"C600 FDFF F9CE FFF3 FFA7 FFF3 FFCE FDFF" /* . */ + $"EE00 00FA E800 F400 FEFD 0014 FEF5 8400" /* ....... */ + $"8100 C100 F2FF EA00 00FA E800 F400 FEFD" /* ...... */ + $"0030 FEF5 F700 FDFF EC00 FFFF FA00 FEFF" /* .0... */ + $"FB00 FFFF FF00 FFFF F100 FFFF F200 FFFF" /* .... */ + $"E200 8100 C100 F2FF EA00 00FA E800 F400" /* ....... */ + $"FEFD 0030 FEF5 F800 FFFF FF00 FFFF E300" /* .0... */ + $"FFFF FB00 FFFF FF00 FFFF F100 FFFF F200" /* .... */ + $"FFFF E200 8100 B900 00FA E400 00FA E800" /* ....... */ + $"F400 FEFD 0064 FEF5 F800 FFFF FC00 FDFF" /* ..d.. */ + $"FE00 FEFF FE00 FEFF FF00 FEFF FF00 FEFF" /* .... */ + $"FE00 FFFF FC00 FDFF 0000 FDFF FE00 FEFF" /* ..... */ + $"FF00 FDFF FF00 FFFF 0400 FFFF 0000 FDFF" /* ...... */ + $"FC00 FDFF FF00 FEFF FD00 FFFF EE00 8100" /* ..... */ + $"B900 00FA E700 00F9 FBFF 00F9 FA00 00F9" /* ....... */ + $"FBFF 00F9 FB00 F400 FEFD 007E FEF5 F700" /* ....~. */ + $"FDFF FF00 FFFF 1200 FFFF 00FF FF00 FFFF" /* ..... */ + $"00FF FF00 FFFF 0000 FFFF FD00 FFFF FF00" /* ...... */ + $"FFFF FB00 FFFF FF00 FFFF 0200 FFFF FD00" /* ..... */ + $"FFFF 0600 FFFF 00FF FF00 FDFF FF00 FFFF" /* ..... */ + $"F800 FFFF FF00 FFFF 0200 FFFF E900 8100" /* ...... */ + $"EE00 00F9 FBFF 00F9 FA00 00F9 FBFF 00F9" /* ...... */ + $"E300 00FA E700 00FF FB2B 00FF FA00 00FF" /* ....+... */ + $"FB2B 00FF FB00 F400 FEFD 007C FEF5 F400" /* +....|. */ + $"FFFF 0600 FFFF 00FF FF00 FCFF 0200 FFFF" /* ...... */ + $"FC00 FFFF FF00 FDFF FF00 FFFF FB00 FFFF" /* .... */ + $"FF00 FFFF 0400 FFFF 0000 FDFF 0600 FFFF" /* ....... */ + $"00FF FF00 FEFF FD00 FEFF FA00 FFFF FF00" /* ..... */ + $"FFFF 0200 FFFF E900 8100 EE00 00FF FB2B" /* ......+ */ + $"00FF FA00 00FF FB2B 00FF E300 00FA E700" /* ...+.... */ + $"01FF 2BFD FC01 2BFF FA00 01FF 2BFD FC01" /* .+.+..+. */ + $"2BFF FB00 F400 FEFD 008D FEF5 F800 FFFF" /* +.... */ + $"FF00 FFFF 0800 FFFF 00FF FF00 FFFF FD00" /* ...... */ + $"FFFF 1000 FFFF 0000 FFFF 00FF FF00 FFFF" /* ...... */ + $"0000 FFFF FB00 FFFF FF00 FFFF 0F00 FFFF" /* ...... */ + $"00FF FF00 FFFF 00FF FF00 FFFF 00FD FFFC" /* ..... */ + $"00FF FFFB 00FF FFFF 00FF FF02 00FF FFE9" /* ..... */ + $"0081 00EE 0001 FF2B FDFC 012B FFFA 0001" /* ....+.+.. */ + $"FF2B FDFC 012B FFE3 0000 FAE7 0007 FF2B" /* +.+....+ */ + $"FC2A 2AF5 2BFF FA00 07FF 2BFC 2A2A F52B" /* **+..+**+ */ + $"FFFB 00F4 00FE FD00 83FE F5F7 00FD FFFF" /* .... */ + $"00FD FFFE 00FE FFFE 00FE FFFE 00FF FFFF" /* .... */ + $"00FD FFFF 00FF FFFA 00FF FF07 00FF FF00" /* ...... */ + $"FFFF 0000 FDFF 0C00 FFFF 00FF FF00 FFFF" /* ...... */ + $"00FF FF00 FDFF F900 FFFF FF00 FEFF FD00" /* ..... */ + $"FFFF EE00 8100 EE00 07FF 2BFC 2A2A F52B" /* ....+**+ */ + $"FFFA 0007 FF2B FC2A 2AF5 2BFF E300 00FA" /* ..+**+.. */ + $"E700 02FF 2BFC FEF5 012B FFFA 0002 FF2B" /* ..+.+..+ */ + $"FCFE F501 2BFF FB00 F400 FEFD 003A FEF5" /* .+...: */ + $"F100 FFFF 9600 8100 EE00 02FF 2BFC FEF5" /* .....+ */ + $"012B FFFA 0002 FF2B FCFE F501 2BFF E300" /* .+..+.+. */ + $"00FA E700 00FF FB2B 00FF FA00 00FF FB2B" /* ...+...+ */ + $"00FF FB00 F400 FEFD 002C FEF5 F100 FFFF" /* ....,. */ + $"9600 8100 EE00 00FF FB2B 00FF FA00 00FF" /* ....+... */ + $"FB2B 00FF E300 00FA E900 F5FF FE00 F5FF" /* +..... */ + $"FDFA F400 FEFD 0030 FEF5 8400 8100 F000" /* ..0... */ + $"F5FF FE00 F5FF FDFA E900 00FA E900 00FF" /* ..... */ + $"F92B 02D8 2BFF FEFA 00FF F92B 02D8 2BFF" /* +.+.+.+ */ + $"FE00 00FA F400 FEFD 003A FEF5 8400 8100" /* ....:.. */ + $"F000 00FF F92B 02D8 2BFF FEFA 00FF F92B" /* ..+.+.+ */ + $"02D8 2BFF FE00 00FA E900 00FA E900 00FF" /* .+...... */ + $"F72B 00FF FE00 00FF F72B 00FF FE00 00FA" /* +...+... */ + $"F400 FEFD 002E FEF5 8400 8100 F000 00FF" /* ....... */ + $"F72B 00FF FE00 00FF F72B 00FF FE00 00FA" /* +...+... */ + $"E900 00FA E900 F5FF FE00 F5FF FE00 00FA" /* ...... */ + $"F400 FEFD 004A FEF5 F700 FEFF FF00 FFFF" /* ..J.. */ + $"F200 FDFF F900 00FF FB00 00FF DB00 00FF" /* ....... */ + $"EC00 FDFF FE00 00FF FC00 EE00 00FF FE00" /* ....... */ + $"00FF DA00 FEFF C300 F000 F5FF FE00 F5FF" /* ..... */ + $"FE00 00FA E900 00FA CB00 00FA F400 FEFD" /* ....... */ + $"004B FEF5 F800 00FF FE00 03FF 0000 FFF2" /* .K...... */ + $"0000 FFFE 0000 FFF3 0000 FFDB 0000 FFEC" /* ........ */ + $"0000 FFFE 0000 FFF9 00EE 0003 FF00 00FF" /* ......... */ + $"D900 03FF 0000 FFC4 00D2 0000 FAE9 0000" /* ......... */ + $"FAE0 00F6 FFF7 0000 FAF4 00FE FD00 CDFE" /* ..... */ + $"F5F8 0000 FFFE 000A FF00 00FF 0000 FFFF" /* ....... */ + $"0000 FFFE 0000 FFFD 0000 FFFE 0009 FF00" /* ........ */ + $"FF00 FFFF 00FF FF00 FEFF FF00 04FF 0000" /* ....... */ + $"FF00 FEFF 0200 FFFF FE00 FFFF FF00 FEFF" /* ..... */ + $"FF00 FEFF F400 04FF 0000 FFFF FE00 FFFF" /* ...... */ + $"FF00 FEFF FA00 00FF FE00 08FF 00FF FF00" /* ....... */ + $"00FF FF00 0D00 FF00 FFFF 00FF 00FF FF00" /* ........ */ + $"00FF FFFC 0002 FF00 FFFE 000A FF00 00FF" /* ....... */ + $"00FF 0000 FF00 00FE FFFE 00FF FFFF 0005" /* ........ */ + $"FF00 FFFF 0000 FEFF F900 00FF FE00 06FF" /* ....... */ + $"0000 FFFF 0000 FEFF CE00 E700 F6FF F700" /* ....... */ + $"00FA E900 00FA E000 0AFF F9FC F9FC F9FC" /* .... */ + $"F9FC F9FF F700 00FA F400 FEFD 00D4 FEF5" /* .... */ + $"F800 00FF FE00 03FF 0000 FFFD 0005 FF00" /* ......... */ + $"00FF 00FF FC00 FDFF FF00 FFFF FD00 12FF" /* ...... */ + $"00FF 0000 FF00 FF00 FF00 00FF 0000 FF00" /* .......... */ + $"00FF FD00 0AFF 00FF 0000 FF00 FF00 00FF" /* ........ */ + $"F500 05FF 00FF 0000 FFFD 0006 FF00 FF00" /* ......... */ + $"00FF 00FD FF00 00FD FFFE 0005 FF00 FF00" /* ........ */ + $"00FF 0200 FFFF FE00 FFFF FE00 03FF 0000" /* ........ */ + $"FFFD 00FF FFFD 0016 FF00 00FF 00FF 0000" /* ........ */ + $"FF00 00FF 0000 FF00 FF00 00FF 00FF FFFE" /* ........ */ + $"0000 FFF6 0000 FFFE 0000 FFFD 0005 FF00" /* ......... */ + $"FF00 00FF CF00 E700 0AFF F9FC F9FC F9FC" /* .... */ + $"F9FC F9FF F700 00FA E900 00FA E000 0AFF" /* ..... */ + $"F9FC F9FC F9FC F9FC F9FF F700 00FA F400" /* ... */ + $"FEFD 00D3 FEF5 F800 00FF FE00 05FF 0000" /* ....... */ + $"FF00 00FE FFFF 0002 FF00 FFFC 0000 FFFE" /* ....... */ + $"0002 FF00 FFFC 0008 FF00 FF00 00FF 00FF" /* ......... */ + $"FFFE 0008 FF00 00FF 0000 FF00 00FE FF09" /* ........ */ + $"00FF 0000 FF00 FF00 00FF F900 00FF FE00" /* ......... */ + $"01FF 00FD FFFF 00FE FF04 00FF 0000 FFFB" /* ....... */ + $"0000 FFFB 0001 FF00 FDFF 0100 FFFD 0000" /* ......... */ + $"FFFD 00FD FFFD 0002 FF00 FFFE 000F FF00" /* ....... */ + $"00FF 00FF 0000 FF00 00FF 0000 FF00 FDFF" /* ......... */ + $"0100 FFFC 00FF FFF8 0000 FFFE 0002 FF00" /* ........ */ + $"00FE FF04 00FF 0000 FFCF 00E7 000A FFF9" /* ....... */ + $"FCF9 FCF9 FCF9 FCF9 FFF7 0000 FAE9 0000" /* .... */ + $"FAE0 000A FFF9 FCF9 FCF9 FCF9 FCF9 FFF7" /* . */ + $"0000 FAF4 00FE FD00 D4FE F5F8 0000 FFFE" /* ...... */ + $"0008 FF00 00FF 00FF 0000 FFFE 0000 FFFB" /* ......... */ + $"0000 FFFE 0002 FF00 FFFC 0021 FF00 FF00" /* ......!.. */ + $"00FF 00FF 00FF 0000 FF00 00FF 0000 FF00" /* .......... */ + $"FF00 00FF 00FF 0000 FF00 FF00 00FF F900" /* ......... */ + $"00FF FE00 02FF 00FF FD00 08FF 0000 FF00" /* ......... */ + $"FF00 00FF FB00 00FF FB00 02FF 00FF FE00" /* ........ */ + $"0100 FFFD 0000 FFFD 0000 FFFA 0016 FF00" /* ......... */ + $"00FF 0000 FF00 00FF 00FF 0000 FF00 00FF" /* .......... */ + $"0000 FF00 FFFD 0000 FFFA 0000 FFF9 000E" /* ......... */ + $"FF00 00FF 0000 FF00 00FF 00FF 0000 FFCF" /* ......... */ + $"00E7 000A FFF9 FCF9 FCF9 FCF9 FCF9 FFF7" /* .. */ + $"0000 FAE9 0000 FAE0 000A FFF9 FCF9 FCF9" /* ..... */ + $"FCF9 FCF9 FFF7 0000 FAF4 00FE FD00 CDFE" /* .... */ + $"F5F7 00FE FFFE 0002 FF00 00FE FFFE 0000" /* ....... */ + $"FFFB 00FD FFFF 0000 FFFC 0014 FF00 FF00" /* ....... */ + $"00FF 00FF 0000 FF00 FF00 00FF 0000 FF00" /* .......... */ + $"00FE FF09 00FF 0000 FF00 FF00 00FF FE00" /* ........ */ + $"00FF FC00 FEFF FE00 FFFF FE00 FEFF 0400" /* ...... */ + $"FF00 00FF FB00 00FF FB00 05FF 0000 FFFF" /* ........ */ + $"0001 00FF FD00 00FF FC00 FFFF FC00 00FF" /* ........ */ + $"FE00 02FF 0000 FEFF FF00 FEFF FF00 FEFF" /* ...... */ + $"FE00 FFFF FF00 00FF FD00 FEFF FD00 00FF" /* ...... */ + $"FD00 FEFF FD00 FEFF 0400 FF00 00FF CF00" /* ....... */ + $"E700 0AFF F9FC F9FC F9FC F9FC F9FF F700" /* .. */ + $"00FA E900 00FA E000 0AFF F9FC F9FC F9FC" /* .... */ + $"F9FC F9FF F700 00FA F400 FEFD 003D FEF5" /* ....= */ + $"B000 00FF D600 E000 03FF 0000 FFEC 0000" /* ......... */ + $"FFBC 00E7 000A FFF9 FCF9 FCF9 FCF9 FCF9" /* .. */ + $"FFF7 00E7 FAE0 000A FFF9 FCF9 FCF9 FCF9" /* .. */ + $"FCF9 FFF7 0000 FAF4 00FE FD00 34FE F5B1" /* ....4 */ + $"0000 FFD5 00E2 00FF FFFE 0000 FFED 0000" /* ........ */ + $"FFBB 00E7 000A FFF9 FCF9 FCF9 FCF9 FCF9" /* .. */ + $"FFF7 0000 FACA 00F0 FFFA FA00 00F4 00FE" /* ...... */ + $"FD00 1CFE F584 0081 00EA 00F0 FFFA FAC9" /* ..... */ + $"0000 FFF2 F900 FFFA 0000 FAF4 00FE FD00" /* ....... */ + $"22FE F584 0081 00EA 0000 FFF2 F900 FFFA" /* "..... */ + $"0000 FACA 0000 FFF2 F900 FFFA 0000 FAF4" /* ....... */ + $"00FE FD00 1EFE F584 0081 00EA 0000 FFF2" /* ....... */ + $"F900 FFFA 0000 FACA 00F0 FFFA 0000 FAF4" /* ...... */ + $"00FE FD00 5CFE F5F8 0000 FFFE 0000 FFF7" /* ..\.... */ + $"0000 FFF4 00FD FFEF 0000 FFFB 00FE FFFA" /* ...... */ + $"0000 FFE3 00FE FFF5 00FF FFFD 00FD FFFA" /* ..... */ + $"00FF FF02 00FF FFF9 00FD FFFA 0000 FFF8" /* ...... */ + $"00FD FFF8 00FE FFF4 0000 FFFE 0000 FFD4" /* ...... */ + $"00EA 00F0 FFFA 0000 FAB2 0000 FAF4 00FE" /* ....... */ + $"FD00 81FE F5F8 0000 FFFE 0000 FFF7 0000" /* ....... */ + $"FFF4 0000 FFFE 0000 FFF0 0000 FFFC 0000" /* ........ */ + $"FFFE 0000 FFFB 0000 FFE4 0000 FFFE 0000" /* ........ */ + $"FFF5 0000 FFFD 0000 FFFE 0000 FFFA 0003" /* ........ */ + $"FF00 00FF F900 00FF ED00 00FF FE00 00FF" /* ........ */ + $"FA00 00FF FE00 00FF F500 00FF FE00 00FF" /* ........ */ + $"D400 D200 00FA D000 00F9 FCFF 00F9 FD00" /* ....... */ + $"00F9 FCFF 00F9 FD00 00F9 FCFF 02F9 00FA" /* ...... */ + $"F400 FEFD 00D9 FEF5 F800 00FF FE00 05FF" /* ...... */ + $"00FF 0000 FFFE 00FE FFFF 00FF FFF8 0000" /* ....... */ + $"FFFE 000B FF00 FF00 FFFF 0000 FFFF 0000" /* ........ */ + $"FEFF FF00 FEFF FD00 00FF FB00 FFFF FF00" /* ..... */ + $"FEFF FF00 00FF FC00 06FF 0000 FFFF 0000" /* ........ */ + $"FEFF F800 00FF FB00 FFFF FF00 06FF 00FF" /* ...... */ + $"FF00 00FF FD00 00FF FE00 04FF 0000 FFFF" /* ........ */ + $"FE00 03FF 0000 FFF9 0000 FFFD 000A FF00" /* ........ */ + $"FFFF 00FF FF00 00FF FFFC 0000 FFFE 0000" /* ....... */ + $"FFFA 0000 FFFB 00FF FFFE 00FF FFFF 00FE" /* ..... */ + $"FF00 00FE FFD5 00F0 0000 F9FC FF00 F9FD" /* ...... */ + $"0000 F9FC FF00 F9FD 0000 F9FC FF02 F900" /* ....... */ + $"FAD0 0000 FFFC 2B00 FFFD 0000 FFFC 2B00" /* ..+...+. */ + $"FFFD 0000 FFFC 2B02 FF00 FAF4 00FE FD00" /* ..+.... */ + $"DAFE F5F8 00FC FF0F 00FF 0000 FF00 00FF" /* ....... */ + $"0000 FF00 FF00 00FF F900 FDFF FF00 FFFF" /* ....... */ + $"FE00 0BFF 0000 FF00 FF00 00FF 0000 FFFB" /* ......... */ + $"00FE FFFF 000F FF00 00FF 00FF 0000 FF00" /* ......... */ + $"00FF 00FF 00FF FC00 05FF 00FF 0000 FFF9" /* ........ */ + $"0000 FFF9 0003 FF00 FFFF FD00 00FF FD00" /* ........ */ + $"FDFF FF00 09FF 0000 FF00 00FF 0000 FFF9" /* ....... */ + $"00FE FFFF 00FF FFFD 0005 FF00 FF00 00FF" /* ....... */ + $"FD00 FDFF F800 FEFF FF00 0BFF 0000 FF00" /* ....... */ + $"FF00 00FF 0000 FFFE 0000 FFD4 00F0 0000" /* ......... */ + $"FFFC 2B00 FFFD 0000 FFFC 2B00 FFFD 0000" /* +...+... */ + $"FFFC 2B02 FF00 FAD0 0006 FF2B FCFC F52B" /* +....++ */ + $"FFFD 0006 FF2B FCFC F52B FFFD 0008 FF2B" /* ..++..+ */ + $"FCFC F52B FF00 FAF4 00FE FD00 DAFE F5F8" /* +... */ + $"0000 FFFE 000C FF00 FF00 00FF 0000 FF00" /* .......... */ + $"00FF 00FD FFF9 0000 FFFE 0002 FF00 FFFD" /* ....... */ + $"00FD FF07 00FF 0000 FF00 00FF F800 02FF" /* ......... */ + $"00FF FD00 0AFF 0000 FF00 00FF 00FF 00FF" /* ........ */ + $"FE00 FEFF 0400 FF00 00FF F900 00FF FB00" /* ........ */ + $"FEFF 0100 FFFC 0000 FFFD 0000 FFFE 0001" /* ........ */ + $"FF00 FDFF FF00 03FF 0000 FFF9 0000 FFFD" /* ....... */ + $"0000 FFFC 0002 FF00 FFFA 0000 FFF2 0002" /* ......... */ + $"FF00 FFFD 0006 FF00 00FF 0000 FFFE 0000" /* ......... */ + $"FFD4 00F0 0006 FF2B FCFC F52B FFFD 0006" /* ...++.. */ + $"FF2B FCFC F52B FFFD 0008 FF2B FCFC F52B" /* ++..++ */ + $"FF00 FAD0 0006 FF2B FC2A F52B FFFD 0006" /* ...+*+.. */ + $"FF2B FC2A F52B FFFD 0008 FF2B FC2A F52B" /* +*+..+*+ */ + $"FFFA FAF4 00FE FD00 EBFE F5F8 0000 FFFE" /* .... */ + $"000D FF00 FF00 00FF 0000 FF00 00FF 00FF" /* .......... */ + $"F600 00FF FE00 02FF 00FF FD00 00FF FD00" /* ........ */ + $"06FF 0000 FF00 00FF FC00 00FF FE00 0AFF" /* ........ */ + $"00FF 0000 FF00 FF00 00FF FE00 02FF 00FF" /* ......... */ + $"FE00 08FF 0000 FF00 FF00 00FF F900 00FF" /* ......... */ + $"FE00 07FF 00FF 0000 FF00 FFFC 0000 FFFD" /* ........ */ + $"0000 FFFE 0002 FF00 FFFC 0003 FF00 00FF" /* ......... */ + $"F900 00FF FD00 00FF FC00 05FF 00FF 0000" /* ......... */ + $"FFFD 0000 FFF6 0000 FFFE 000D FF00 FF00" /* ........ */ + $"00FF 00FF 0000 FF00 00FF FE00 00FF D400" /* ......... */ + $"F000 06FF 2BFC 2AF5 2BFF FD00 06FF 2BFC" /* ..+*+..+ */ + $"2AF5 2BFF FD00 08FF 2BFC 2AF5 2BFF FAFA" /* *+..+*+ */ + $"D000 06FF 2BFC 2AF5 2BFF FDFA 06FF 2BFC" /* ..+*+.+ */ + $"2AF5 2BFF FDFA 08FF 2BFC 2AF5 2BFF 0000" /* *+.+*+.. */ + $"F400 FEFD 00E9 FEF5 F800 00FF FE00 02FF" /* ...... */ + $"0000 FEFF FE00 FEFF FF00 FFFF FD00 00FF" /* ...... */ + $"FD00 FDFF FF00 00FF FC00 FFFF FF00 03FF" /* ...... */ + $"0000 FFFE 0000 FFFC 00FE FFFE 00FF FFFF" /* ...... */ + $"0003 FF00 00FF FE00 02FF 00FF FD00 FEFF" /* ........ */ + $"0400 FF00 00FF FE00 00FF FC00 FEFF FE00" /* ........ */ + $"FEFF 0100 FFFC 0000 FFFD 00FD FFFE 00FF" /* ...... */ + $"FFFE 0003 FF00 00FF FE00 00FF FD00 FDFF" /* ....... */ + $"0100 FFFC 0004 FF00 00FF FFFC 0000 FFFB" /* ........ */ + $"0000 FFFC 00FE FFFE 00FF FFFE 00FF FFFD" /* ..... */ + $"0000 FFFE 0000 FFFE 0000 FFD9 00F0 0006" /* ......... */ + $"FF2B FC2A F52B FFFD FA06 FF2B FC2A F52B" /* +*+.+*+ */ + $"FFFD FA06 FF2B FC2A F52B FFCE 0001 FF2B" /* .+*+..+ */ + $"FEF5 012B FFFD 0001 FF2B FEF5 012B FFFD" /* .+..+.+ */ + $"0001 FF2B FEF5 032B FF00 00F4 00FE FD00" /* ..+.+.... */ + $"5CFE F5EF 0000 FFF3 0000 FFBD 0000 FFEB" /* \...... */ + $"00EA 0000 FFC2 0000 FFD9 00F0 0001 FF2B" /* ........+ */ + $"FEF5 012B FFFD 0001 FF2B FEF5 012B FFFD" /* .+..+.+ */ + $"0001 FF2B FEF5 012B FFCE 0006 FFE3 2BFC" /* ..+.+..+ */ + $"FC2B FFFD 0006 FFE3 2BFC FC2B FFFD 0008" /* +..++.. */ + $"FFE3 2BFC FC2B FF00 00F4 00FE FD00 56FE" /* ++....V */ + $"F5F1 00FF FFF3 0000 FFBD 0000 FFEA 00EB" /* ...... */ + $"0000 FFC2 0000 FFD8 00F0 0006 FFE3 2BFC" /* .......+ */ + $"FC2B FFFD 0006 FFE3 2BFC FC2B FFFD 0006" /* +..++.. */ + $"FFE3 2BFC FC2B FFCE 0000 FFFC 2B00 FFFD" /* ++..+. */ + $"0000 FFFC 2B00 FFFD 0000 FFFC 2B02 FF00" /* ..+...+.. */ + $"00F4 00FE FD00 30FE F584 0081 00F0 0000" /* ...0.... */ + $"FFFC 2B00 FFFD 0000 FFFC 2B00 FFFD 0000" /* +...+... */ + $"FFFC 2B00 FFCD 00FC FFFB 00FC FFFB 00FC" /* +.... */ + $"FFFE 00F4 00FE FD00 18FE F584 0081 00EF" /* ...... */ + $"00FC FFFB 00FC FFFB 00FC FFAE 00F4 00FE" /* ..... */ + $"FD00 0CFE F584 0081 0081 00F4 00FE FD00" /* ....... */ + $"39FE F5F4 0003 FF00 00FF F500 00FF FC00" /* 9....... */ + $"00FF FA00 00FF FE00 03FF 0000 FFE1 0000" /* ......... */ + $"FFF6 0000 FFE9 00FD FF00 00FA 0003 FF00" /* ........ */ + $"FFFF 8C00 8100 F400 FEFD 0035 FEF5 F400" /* ....5. */ + $"00FF F200 FFFF FE00 FFFF FA00 00FF FE00" /* ...... */ + $"03FF 0000 FFE1 0000 FFF6 0000 FFE9 0000" /* ......... */ + $"FFFE 0000 FFF7 0000 FF8C 0081 00F4 00FE" /* ....... */ + $"FD00 7EFE F5F4 0004 FF00 FFFF 00FE FF02" /* .~..... */ + $"00FF FFFC 000C FF00 FF00 FF00 FF00 00FF" /* ........ */ + $"FF00 00FE FF00 00FE FF00 00FE FFFE 00FF" /* ....... */ + $"FFFF 0000 FFFC 0002 FF00 00FE FFF7 0004" /* ........ */ + $"FF00 FF00 00FE FFFE 00FE FF08 00FF 00FF" /* ....... */ + $"FF00 00FF FFFE 00FF FFFE 00FE FFFD 0000" /* ...... */ + $"FFFE 0000 FF10 00FF 00FF FF00 FFFF 0000" /* ........ */ + $"FF00 00FF FF00 00FE FF95 0081 00F4 00FE" /* ....... */ + $"FD00 7FFE F5F4 000B FF00 00FF 00FF 0000" /* ......... */ + $"FF00 00FF FD00 06FF 0000 FF00 00FF FD00" /* ......... */ + $"03FF 0000 FFFE 0015 FF00 00FF 0000 FF00" /* .......... */ + $"FF00 00FF 0000 FF00 FF00 FF00 00FF F400" /* ......... */ + $"10FF 00FF 0000 FF00 00FF 00FF 0000 FF00" /* .......... */ + $"FFFF FE00 03FF 0000 FFFD 0002 FF00 FFFA" /* ....... */ + $"00FD FF00 0002 00FF FFFD 000D FF00 00FF" /* ......... */ + $"00FF 0000 FF00 FF00 00FF 9600 8100 F400" /* ......... */ + $"FEFD 007D FEF5 F800 00FF FE00 0BFF 0000" /* .}...... */ + $"FF00 FF00 00FF 0000 FFFD 0000 FFFC 0002" /* ......... */ + $"FF00 00FE FFFF 0000 FFFE 0007 FF00 00FF" /* ........ */ + $"0000 FF00 FDFF FF00 04FF 00FF 00FF FE00" /* ........ */ + $"FFFF F700 FCFF 0B00 FF00 00FF 00FF 0000" /* ........ */ + $"FF00 FFFD 00FD FFFF 00FE FFFF 00FF FFFC" /* .... */ + $"0000 FFFD 0001 00FF FC00 0DFF 0000 FF00" /* .......... */ + $"FF00 00FF 00FF 0000 FF96 0081 00F4 00FE" /* ........ */ + $"FD00 80FE F5F8 0000 FFFE 000B FF00 00FF" /* ....... */ + $"00FF 0000 FF00 00FF FD00 00FF FC00 08FF" /* ......... */ + $"00FF 0000 FF00 00FF FE00 08FF 0000 FF00" /* .......... */ + $"00FF 00FF FB00 02FF 00FF FB00 00FF F800" /* ........ */ + $"00FF FE00 0CFF 00FF 0000 FF00 FF00 00FF" /* ......... */ + $"00FF FD00 00FF FD00 03FF 0000 FFFD 0000" /* ......... */ + $"FFFD 0000 FFFD 0001 00FF FC00 0DFF 0000" /* ......... */ + $"FF00 FF00 00FF 00FF 0000 FF96 0081 00F4" /* ........ */ + $"00FE FD00 7DFE F5F7 00FE FFFE 0008 FF00" /* ..}.... */ + $"FF00 00FF 0000 FFFD 0000 FFFC 0002 FF00" /* ......... */ + $"00FE FFFE 0000 FFFE 0009 FF00 FF00 00FF" /* ....... */ + $"0000 FFFF FD00 02FF 00FF FE00 FEFF FD00" /* ....... */ + $"00FF FC00 00FF FE00 07FF 00FF 0000 FF00" /* ......... */ + $"00FE FF01 00FF FC00 FFFF FE00 FEFF 0000" /* ....... */ + $"FEFF FC00 00FF FD00 0100 FFFC 0009 FF00" /* ....... */ + $"00FF 0000 FFFF 0000 FEFF 9500 8100 F400" /* ........ */ + $"FEFD 0014 FEF5 B600 00FF D000 F000 00FF" /* ....... */ + $"9300 8100 F400 FEFD 0014 FEF5 B700 00FF" /* ....... */ + $"CF00 F000 00FF 9300 8100 F400 FEFD 000C" /* ........ */ + $"FEF5 8400 8100 8100 F400 FEFD 000C FEF5" /* ...... */ + $"8400 8100 8100 F400 FEFD 000C FEF5 8400" /* ....... */ + $"8100 8100 F400 FEFD 000C FEF5 8400 8100" /* ....... */ + $"8100 F400 FEFD 000C FEF5 8400 8100 8100" /* ....... */ + $"F400 FEFD 000C FEF5 8400 8100 8100 F400" /* ....... */ + $"FEFD 000C FEF5 8400 8100 8100 F400 FEFD" /* ...... */ + $"000C FEF5 8400 8100 8100 F400 FEFD 000C" /* ........ */ + $"FEF5 8400 8100 8100 F400 FEFD 000C FEF5" /* ...... */ + $"8400 8100 8100 F400 FEFD 000C FEF5 8400" /* ....... */ + $"8100 8100 F400 FEFD 0088 FEF5 F800 FDFF" /* ..... */ + $"F900 00FF FE00 00FF F500 FCFF FB00 FFFF" /* ...... */ + $"F500 00FF FB00 00FF F800 00FF EB00 00FF" /* ........ */ + $"F000 FFFF FF00 02FF 0000 FEFF FE00 FEFF" /* ...... */ + $"FC00 00FF FB00 FCFF FB00 FFFF F500 00FF" /* ...... */ + $"FB00 FEFF FC00 FCFF 0100 FFFD 00FC FFF6" /* ..... */ + $"0000 FFF0 00FF FFF0 00FF 0000 FFF7 0000" /* ........ */ + $"FFFB 0003 FF00 00FF F500 FFFF FF00 00FF" /* ....... */ + $"FA00 00FF FE00 00FF F100 FFFF C800 F400" /* ....... */ + $"FEFD 008B FEF5 F800 00FF FE00 00FF FA00" /* ...... */ + $"00FF FE00 00FF F300 00FF F800 00FF F500" /* ........ */ + $"00FF F100 00FF EB00 00FF F000 FFFF FF00" /* ....... */ + $"02FF 00FF FE00 02FF 00FF FE00 00FF FD00" /* ........ */ + $"00FF F900 00FF F800 00FF F500 00FF FC00" /* ........ */ + $"00FF FE00 00FF F900 02FF 00FF FD00 00FF" /* ........ */ + $"F200 00FF EF00 00FF F000 FF00 00FF F700" /* ........ */ + $"00FF FB00 03FF 0000 FFF5 00FF FFFF 0000" /* ........ */ + $"FFFA 0000 FFEC 0000 FFC8 00F4 00FE FD00" /* ....... */ + $"FEFE F5F8 0000 FFFE 0006 FF00 00FF FF00" /* ....... */ + $"00FE FF00 00FE FFFF 00FF FFFF 0003 FF00" /* ....... */ + $"FFFF FE00 00FF FD00 FFFF FE00 01FF 00FE" /* ...... */ + $"FFFE 00FF FFFF 00FE FFFD 00FF FFFF 00FE" /* .... */ + $"FFFD 00FE FFFE 00FF FFFE 00FE FFFF 00FF" /* .... */ + $"FFFE 00FE FFFC 00FF FFFF 00FE FFFC 0003" /* ..... */ + $"FF00 FF00 02FF 00FF FC00 00FF FA00 02FF" /* ........ */ + $"00FF FA00 00FF FD00 FFFF FE00 01FF 00FE" /* ....... */ + $"FFFE 00FF FFFF 00FE FFF9 0000 FFFA 0002" /* ...... */ + $"FF00 00FE FFFF 00FD FFF7 00FE FFFF 00FF" /* ..... */ + $"FFFF 0000 FFFE 0004 FF00 00FF FFFE 0006" /* ........ */ + $"FF00 00FF FF00 00FE FFFE 00FF FFFE 00FE" /* ...... */ + $"FFFC 00FF FFFF 00FE FFFD 00FE FF00 00FE" /* ..... */ + $"FFFE 00FF FFFC 000A FF00 FF00 FF00 00FF" /* ...... */ + $"FF00 00FE FF08 00FF FF00 00FF FF00 00FE" /* ........ */ + $"FFFE 00FF FFFE 0000 FFC8 00F4 00FE FD01" /* ...... */ + $"14FE F5F8 00FD FFFF 0006 FF00 00FF 0000" /* ........ */ + $"FFFE 0009 FF00 00FF 0000 FF00 FFFF FC00" /* ....... */ + $"00FF FE00 13FF 0000 FF00 00FF 00FF 0000" /* .......... */ + $"FF00 FF00 00FF 0000 FFFB 0002 FF00 FFFA" /* ........ */ + $"0003 FF00 00FF FD00 02FF 00FF FD00 08FF" /* ......... */ + $"0000 FF00 FF00 00FF FD00 08FF 0000 FF00" /* .......... */ + $"FF00 00FF FD00 03FF 00FF 0002 FF00 FFFB" /* ........ */ + $"00FE FFFD 0002 FF00 FFFA 0000 FFFE 0013" /* ........ */ + $"FF00 00FF 0000 FF00 FF00 00FF 00FF 0000" /* .......... */ + $"FF00 00FF F900 00FF F900 06FF 0000 FF00" /* ......... */ + $"00FF FC00 00FF F900 27FF 0000 FF00 FF00" /* ....'.... */ + $"00FF 0000 FF00 FF00 00FF 0000 FF00 00FF" /* .......... */ + $"00FF 0000 FF00 FF00 00FF 00FF 0000 FF00" /* .......... */ + $"FFFF 0000 FFFA 0003 FF00 00FF FB00 0BFF" /* ........ */ + $"0000 FF00 00FF 00FF 0000 FFFD 0004 FF00" /* .......... */ + $"FF00 FFFD 0003 FF00 00FF FE00 0AFF 00FF" /* ....... */ + $"0000 FF00 FF00 00FF FD00 03FF 0000 FFC8" /* ......... */ + $"00F4 00FE FD01 0CFE F5F8 0000 FFFE 0001" /* ........ */ + $"FF00 FDFF FF00 00FF FE00 02FF 0000 FDFF" /* ....... */ + $"0100 FFFB 0000 FFFE 00FD FFFF 0006 FF00" /* ........ */ + $"FF00 00FF 00FD FFFF 0000 FFFB 0004 FF00" /* ........ */ + $"00FF FFFC 0005 FF00 00FF 0000 FEFF FF00" /* ........ */ + $"FFFF FF00 FDFF 0400 FF00 00FF FD00 08FF" /* ....... */ + $"0000 FF00 FF00 00FF FD00 03FF 0000 FF02" /* .......... */ + $"FF00 FFF8 0002 FF00 00FC FFFB 0000 FFFE" /* ....... */ + $"00FD FFFF 0006 FF00 FF00 00FF 00FD FFFF" /* ....... */ + $"0000 FFFA 0000 FFF9 0000 FFFE 0003 FF00" /* ......... */ + $"00FF FC00 00FF F900 04FF 0000 FF00 FDFF" /* ........ */ + $"FF00 04FF 00FF 0000 FDFF FF00 0BFF 00FF" /* ........ */ + $"0000 FF00 FF00 00FF 00FD FF01 00FF FF00" /* ......... */ + $"00FF FC00 FEFF FF00 00FF FB00 07FF 0000" /* ........ */ + $"FF00 00FF 00FD FFFD 0006 FF00 00FF FF00" /* ........ */ + $"00FE FFFF 0000 FFFE 000C FF00 FF00 00FF" /* ........ */ + $"00FF 0000 FF00 00FE FFFF 0000 FFC8 00F4" /* ........ */ + $"00FE FD01 12FE F5F8 0000 FFFE 0002 FF00" /* ........ */ + $"FFFC 0000 FFFE 0003 FF00 00FF FD00 00FF" /* ........ */ + $"FB00 00FF FE00 00FF FC00 07FF 00FF 0000" /* ......... */ + $"FF00 FFFC 0000 FFFB 0000 FFFD 0000 FFFD" /* ....... */ + $"0008 FF00 00FF 00FF 0000 FFFD 0002 FF00" /* .......... */ + $"FFFD 0003 FF00 00FF FD00 08FF 0000 FF00" /* ......... */ + $"FF00 00FF FD00 03FF 0000 FF02 FF00 FFFE" /* ........ */ + $"0002 FF00 FFFE 0003 FF00 00FF FE00 00FF" /* ......... */ + $"FB00 00FF FE00 00FF FC00 07FF 00FF 0000" /* ......... */ + $"FF00 FFFC 0000 FFFB 0000 FFF8 0000 FFFE" /* ....... */ + $"0005 FF00 00FF 00FF FE00 00FF F900 05FF" /* ......... */ + $"0000 FF00 FFFB 0000 FFFE 0000 FFFC 000C" /* ......... */ + $"FF00 FF00 00FF 00FF 0000 FF00 FFFD 0000" /* ......... */ + $"FFFF 0000 FFFD 0006 FF00 00FF 0000 FFFB" /* ........ */ + $"0008 FF00 00FF 0000 FF00 FFFA 000C FF00" /* .......... */ + $"00FF FF00 FF00 00FF 0000 FFFE 0012 FF00" /* ......... */ + $"FF00 00FF 00FF 0000 FF00 FF00 00FF 0000" /* .......... */ + $"FFC8 00F4 00FE FD01 05FE F5F8 00FD FFFE" /* ..... */ + $"00FF FFFD 0000 FFFE 0007 FF00 00FF FF00" /* ........ */ + $"00FF FB00 00FF FD00 FFFF FE00 09FF 00FF" /* ...... */ + $"0000 FF00 00FF FFFD 0000 FFFC 0001 FF00" /* ......... */ + $"FEFF FC00 FEFF FE00 FEFF 0000 FEFF FE00" /* ..... */ + $"FFFF FE00 FEFF FC00 FFFF FF00 03FF 0000" /* ...... */ + $"FFFD 0000 FFFE 0002 FF00 00FE FFFE 00FE" /* ....... */ + $"FFFE 0000 FFFE 0000 FFFB 0000 FFFD 00FF" /* ....... */ + $"FFFE 0009 FF00 FF00 00FF 0000 FFFF FD00" /* ....... */ + $"00FF FD00 FCFF FF00 00FF FE00 00FF FE00" /* ....... */ + $"FEFF FE00 FEFF FD00 00FF FC00 FEFF FF00" /* ..... */ + $"FFFF FD00 00FF FD00 FFFF FE00 06FF 0000" /* ....... */ + $"FFFF 0000 FEFF FE00 FFFF FE00 FEFF FC00" /* ..... */ + $"FEFF FE00 00FF FB00 09FF 00FF 0000 FF00" /* ....... */ + $"00FF FFFC 0000 FFFE 0002 FF00 00FE FFFE" /* ....... */ + $"000F FF00 00FF 0000 FFFF 0000 FF00 00FF" /* .......... */ + $"0000 FEFF FF00 00FF C800 F400 FEFD 0014" /* ........ */ + $"FEF5 8400 AE00 00FF E000 00FF F700 8100" /* ....... */ + $"F400 FEFD 0014 FEF5 8400 AF00 00FF DF00" /* ....... */ + $"00FF F700 8100 F400 FEFD 000C FEF5 8400" /* ....... */ + $"8100 8100 F400 FEFD 000C FEF5 8400 8100" /* ....... */ + $"8100 F400 FEFD 0014 FEF5 8400 BD00 00FF" /* ....... */ + $"E700 00FF E100 8100 F400 FEFD 0086 FEF5" /* ...... */ + $"F700 FEFF F400 00FF F000 FFFF F300 FEFF" /* ..... */ + $"CE00 00FF FE00 00FF FB00 F600 00FF F400" /* ........ */ + $"FFFF FF00 00FF F500 00FF FE00 00FF ED00" /* ....... */ + $"09FF 0000 FFFF 0000 FF00 00FE FFFE 00FE" /* ....... */ + $"FFFC 0000 FFFD 0000 FFF6 0000 FFFB 0003" /* ........ */ + $"FF00 00FF F800 FE00 00FF FE00 00FF FA00" /* ........ */ + $"00FF EA00 03FF 0000 FFEF 00FF FFFD 0009" /* ....... */ + $"FF00 FFFF 00FF FF00 00FF F500 00FF DB00" /* ....... */ + $"F400 FEFD 0079 FEF5 F800 00FF FE00 00FF" /* ..y.... */ + $"F500 00FF F100 00FF F200 00FF FE00 00FF" /* ........ */ + $"CF00 00FF F700 F600 00FF F300 00FF F200" /* ........ */ + $"00FF EA00 00FF FE00 FFFF FF00 02FF 00FF" /* ....... */ + $"FE00 02FF 00FF FE00 00FF FD00 00FF FC00" /* ........ */ + $"00FF F700 00FF FB00 03FF 0000 FFF8 00FE" /* ........ */ + $"0000 FFFE 0000 FFDF 0000 FFF0 0000 FFFB" /* ........ */ + $"0006 FF00 00FF 0000 FFCB 00F4 00FE FD01" /* ......... */ + $"2EFE F5F8 0000 FFFB 00FF FFFF 00FE FFFF" /* ..... */ + $"00FE FFFF 00FF FFFF 0003 FF00 FFFF FD00" /* ...... */ + $"FEFF FF00 FFFF FF00 03FF 00FF FFFD 0000" /* ...... */ + $"FFFC 0004 FF00 00FF 00FE FFFE 00FF FFFF" /* ...... */ + $"0007 FF00 FFFF 0000 FFFF FE00 FFFF FF00" /* ....... */ + $"FEFF 0400 FFFF 0000 FEFF FF00 04FF 0000" /* ........ */ + $"FF00 FEFF 0300 FFFF 00FE FFFF 0000 00FE" /* ....... */ + $"FFFB 0004 FF00 FF00 00FE FFFF 00FE FFFE" /* ...... */ + $"0007 FF00 FFFF 0000 FFFF FE00 FFFF FF00" /* ....... */ + $"FEFF 0800 FFFF 0000 FFFF 0000 FEFF FE00" /* ....... */ + $"FEFF FD00 00FF FE00 06FF 00FF 00FF 00FF" /* ....... */ + $"FC00 00FF FA00 02FF 00FF FD00 00FF FC00" /* ........ */ + $"FFFF FF00 FEFF FD00 FEFF 0000 FEFF FE00" /* ..... */ + $"FFFF FF00 FE00 00FF FE00 01FF 00FE FFFF" /* ...... */ + $"00FF FF01 00FF FE00 0CFF 0000 FFFF 0000" /* ......... */ + $"FF00 FFFF 0000 FEFF 0300 FFFF 00FE FF04" /* ....... */ + $"00FF 0000 FFFB 00FF FFFF 00FE FFFC 000A" /* ...... */ + $"FF00 00FF 0000 FF00 FFFF 00FE FFFE 00FF" /* ....... */ + $"FFFF 00FF FFFF 00FE FFE0 00F4 00FE FD01" /* ..... */ + $"34FE F5F8 0000 FFFC 0014 FF00 00FF 00FF" /* 4....... */ + $"0000 FF00 00FF 0000 FF00 00FF 00FF FFFA" /* ......... */ + $"0009 FF00 00FF 0000 FF00 FFFF FA00 FEFF" /* ....... */ + $"FF00 10FF 0000 FF00 FF00 00FF 00FF 0000" /* .......... */ + $"FF00 FFFF FE00 1DFF 0000 FF00 FF00 00FF" /* ........ */ + $"00FF 0000 FF00 00FF 00FF 0000 FF00 FF00" /* .......... */ + $"00FF 0000 FFFE 0006 FF00 FF00 00FF 0003" /* .......... */ + $"FF00 00FF FB00 18FF 00FF 0000 FF00 00FF" /* ......... */ + $"00FF 0000 FF00 00FF 0000 FF00 FF00 00FF" /* .......... */ + $"FD00 03FF 0000 FFFE 000C FF00 FF00 00FF" /* ......... */ + $"00FF 0000 FF00 FFFA 0000 FFFE 0006 FF00" /* ......... */ + $"FF00 FF00 FFFB 00FE FFFD 0002 FF00 FFFD" /* ...... */ + $"0000 FFFA 0003 FF00 00FF FB00 0CFF 0000" /* .......... */ + $"FF00 00FF 00FF 0000 FF00 FE00 00FF FE00" /* ......... */ + $"16FF 00FF 0000 FF00 00FF 0000 FF00 FF00" /* .......... */ + $"00FF 0000 FF00 FFFF FE00 00FF FC00 09FF" /* ....... */ + $"0000 FF00 00FF 0000 FFFC 0006 FF00 00FF" /* .......... */ + $"0000 FFFB 0018 FF00 00FF 0000 FF00 00FF" /* .......... */ + $"00FF 0000 FF00 FF00 00FF 0000 FF00 FFDD" /* ......... */ + $"00F4 00FE FD01 26FE F5F8 0000 FFFC 00FD" /* ...&... */ + $"FF09 00FF 0000 FF00 00FF 0000 FDFF 0100" /* ......... */ + $"FFF9 0008 FF00 00FF 0000 FF00 FFF6 000B" /* ......... */ + $"FF00 FF00 00FF 00FF 0000 FF00 FDFF 0100" /* ......... */ + $"FFFD 0000 FFFD 0018 FF00 00FF 00FF 0000" /* ......... */ + $"FF00 00FF 00FF 0000 FF00 FF00 00FF 0000" /* .......... */ + $"FFFE 0006 FF00 FF00 00FF 0003 FF00 00FF" /* ......... */ + $"FC00 FCFF 1100 FF00 00FF 00FF 0000 FF00" /* ......... */ + $"00FF 0000 FF00 FFFC 00FE FFFF 0000 FFFE" /* ....... */ + $"000E FF00 FF00 00FF 00FF 0000 FF00 00FF" /* .......... */ + $"FFFC 0000 FFFE 0006 FF00 00FF FF00 FFF8" /* ....... */ + $"0002 FF00 00FC FFFE 0000 FFFC 00FE FFFF" /* ....... */ + $"0000 FFFB 0007 FF00 00FF 0000 FF00 FDFF" /* ......... */ + $"0000 FE00 00FF FE00 0FFF 00FF 0000 FF00" /* .......... */ + $"00FF 0000 FF00 FF00 00FD FF01 00FF FC00" /* ......... */ + $"FFFF FE00 09FF 0000 FF00 00FF 0000 FFFC" /* ....... */ + $"0006 FF00 00FF 0000 FFFB 001A FF00 00FF" /* .......... */ + $"0000 FF00 00FF 00FF 0000 FF00 FF00 00FF" /* .......... */ + $"0000 FF00 00FF FFDF 00F4 00FE FD01 3DFE" /* .......= */ + $"F5F8 0000 FFFE 0002 FF00 FFFD 0009 FF00" /* ....... */ + $"00FF 0000 FF00 00FF FD00 00FF F900 08FF" /* ......... */ + $"0000 FF00 00FF 00FF FA00 00FF FE00 0CFF" /* ......... */ + $"00FF 0000 FF00 FF00 00FF 00FF FD00 00FF" /* ......... */ + $"FD00 1DFF 0000 FF00 FF00 00FF 00FF 0000" /* .......... */ + $"FF00 00FF 00FF 0000 FF00 FF00 00FF 0000" /* .......... */ + $"FFFE 0006 FF00 FF00 00FF 0003 FF00 00FF" /* ......... */ + $"FC00 00FF FE00 1DFF 00FF 0000 FF00 FF00" /* ......... */ + $"00FF 0000 FF00 00FF 00FF 0000 FF00 FF00" /* .......... */ + $"00FF 0000 FFFE 000A FF00 FF00 00FF 00FF" /* ........ */ + $"0000 FFFD 0000 FFFD 0000 FFFE 0006 FF00" /* ......... */ + $"00FF FF00 FFFE 0002 FF00 FFFE 0003 FF00" /* ........ */ + $"00FF FE00 00FF FE00 00FF FD00 06FF 0000" /* ......... */ + $"FF00 00FF FB00 08FF 0000 FF00 00FF 00FF" /* ......... */ + $"FD00 FE00 00FF FE00 08FF 00FF 0000 FF00" /* ......... */ + $"00FF FE00 00FF FE00 00FF FD00 00FF FA00" /* ........ */ + $"0CFF 0000 FF00 00FF 0000 FF00 00FF FC00" /* .......... */ + $"06FF 0000 FF00 00FF FB00 16FF 0000 FF00" /* .......... */ + $"00FF 0000 FF00 FF00 00FF 00FF 0000 FF00" /* .......... */ + $"00FF FD00 00FF E000 F400 FEFD 0122 FEF5" /* ......" */ + $"F700 FEFF FE00 FFFF FF00 03FF 0000 FFFE" /* ...... */ + $"0007 FF00 00FF FF00 00FF F900 00FF FE00" /* ......... */ + $"FFFF FF00 00FF F900 FEFF FE00 FEFF 0000" /* ...... */ + $"FEFF FE00 FFFF FF00 00FF FC00 FFFF FE00" /* ..... */ + $"FFFF FF00 07FF 0000 FF00 00FF 00FE FFFE" /* ....... */ + $"00FE FFFE 0009 FF00 00FF 00FF 0000 FF00" /* ........ */ + $"0000 FEFF FC00 00FF FE00 01FF 00FE FFFF" /* ....... */ + $"00FE FFFE 0007 FF00 00FF 0000 FFFF FE00" /* ........ */ + $"FEFF FE00 0EFF 0000 FF00 00FF FF00 00FF" /* ........ */ + $"0000 FF00 FEFF FB00 03FF 0000 FFFE 0002" /* ......... */ + $"FF00 00FE FFFE 00FE FFFE 0000 FFFE 0003" /* ....... */ + $"FF00 00FF FB00 FEFF FE00 00FF FB00 0BFF" /* ....... */ + $"00FF 0000 FF00 00FF FF00 00FD 00FE FFFF" /* ........ */ + $"0006 FF00 00FF 0000 FFFE 0000 FFFD 00FF" /* ......... */ + $"FFFF 0000 FFFD 00FE FFFE 0000 FFFE 0002" /* ....... */ + $"FF00 00FE FFFB 00FF FFFE 0000 FFFB 0012" /* ....... */ + $"FF00 00FF 0000 FF00 00FF 00FF 0000 FF00" /* .......... */ + $"00FF FFFE 0001 FF00 FEFF DF00 F400 FEFD" /* ...... */ + $"002C FEF5 BB00 00FF E100 00FF EC00 FE00" /* .,...... */ + $"00FF F600 00FF FD00 00FF D200 00FF E700" /* ........ */ + $"00FF E100 D100 00FF B200 F400 FEFD 0024" /* .......$ */ + $"FEF5 BB00 00FF E100 00FF EC00 0200 FFFF" /* ....... */ + $"F500 00FF FD00 00FF 9600 D300 FFFF B100" /* ....... */ + $"F400 FEFD 000C FEF5 8400 8100 8100 F400" /* ....... */ + $"FEFD 000C FEF5 8400 8100 8100 F400 FEFD" /* ...... */ + $"0014 FEF5 9400 00FF F200 FA00 00FF 8900" /* ........ */ + $"8100 F400 FEFD 0042 FEF5 F200 00FF FC00" /* ...B... */ + $"00FF FE00 00FF FB00 00FF E800 FEFF FF00" /* ....... */ + $"00FF E500 00FF F200 03FF 0000 FFFE 0005" /* ......... */ + $"FF00 00FF 00FF FE00 00FF FF00 FEFF FE00" /* ....... */ + $"00FF 8A00 8100 F400 FEFD 0044 FEF5 F200" /* .....D. */ + $"00FF FC00 00FF FE00 00FF FB00 00FF E900" /* ........ */ + $"00FF FE00 02FF 00FF D600 00FF FE00 00FF" /* ........ */ + $"FE00 05FF 0000 FF00 FFFE 0000 FF01 00FF" /* ......... */ + $"FE00 00FF FE00 00FF 8B00 8100 F400 FEFD" /* ....... */ + $"0072 FEF5 F700 FFFF FF00 FEFF FD00 00FF" /* .r.... */ + $"FE00 06FF 00FF 00FF FF00 FEFF FE00 FFFF" /* ...... */ + $"FF00 FEFF FE00 FFFF FA00 00FF FC00 FEFF" /* ..... */ + $"FE00 FFFF FF00 FEFF 0400 FFFF 0000 FEFF" /* ...... */ + $"FE00 FFFF FF00 FFFF FF00 FEFF 0000 FEFF" /* ..... */ + $"FC00 00FF FE00 00FF FE00 05FF 0000 FF00" /* ......... */ + $"FFFE 0000 FF01 00FF FA00 00FF 8B00 8100" /* ........ */ + $"F400 FEFD 007B FEF5 F500 03FF 0000 FFFC" /* ..{.... */ + $"0000 FFFE 0003 FF00 FFFF FE00 03FF 0000" /* ......... */ + $"FFFD 0005 FF00 FF00 00FF FD00 01FF 00FD" /* ........ */ + $"FF01 00FF FC00 03FF 0000 FFFD 000D FF00" /* ......... */ + $"FF00 00FF 0000 FF00 FF00 00FF FD00 0DFF" /* ......... */ + $"0000 FF00 FF00 00FF 00FF 0000 FFFD 0000" /* .......... */ + $"FFFE 0000 FFFE 0005 FF00 00FF 00FF FE00" /* ........ */ + $"00FF 0100 FFFA 0000 FF8B 0081 00F4 00FE" /* ........ */ + $"FD00 7CFE F5F7 00FE FFFF 0000 FFFC 0000" /* .|..... */ + $"FFFE 0002 FF00 FFFD 0005 FF00 00FF 0000" /* ......... */ + $"FEFF 0600 FF00 00FF 0000 FEFF FB00 00FF" /* ........ */ + $"FC00 05FF 0000 FF00 00FE FF0E 00FF 0000" /* .......... */ + $"FF00 00FF 00FF 0000 FF00 00FE FFFF 000A" /* ........ */ + $"FF00 FF00 00FF 00FF 0000 FFFD 0000 FFFE" /* ........ */ + $"0000 FFFE 0005 FF00 00FF 00FF FE00 00FF" /* ......... */ + $"0100 FFFA 0000 FF8B 0081 00F4 00FE FD00" /* ........ */ + $"85FE F5F8 0006 FF00 00FF 0000 FFFC 0000" /* ........ */ + $"FFFE 0002 FF00 FFFD 0012 FF00 00FF 00FF" /* ........ */ + $"0000 FF00 FF00 00FF 00FF 0000 FFFB 0000" /* .......... */ + $"FFFE 0029 FF00 FF00 00FF 00FF 0000 FF00" /* .)....... */ + $"FF00 00FF 0000 FF00 FF00 00FF 00FF 0000" /* .......... */ + $"FF00 00FF 00FF 0000 FF00 FF00 00FF FD00" /* ......... */ + $"00FF FE00 00FF FE00 05FF 0000 FF00 FFFE" /* ........ */ + $"0000 FF01 00FF FE00 00FF FE00 00FF 8B00" /* ......... */ + $"8100 F400 FEFD 0077 FEF5 F700 FEFF FE00" /* ...w.. */ + $"00FF FC00 FEFF FF00 00FF FD00 FEFF FE00" /* ...... */ + $"FEFF 0600 FF00 00FF 0000 FEFF FA00 FEFF" /* ....... */ + $"FF00 05FF 0000 FF00 00FE FF08 00FF 0000" /* .......... */ + $"FF00 00FF 00FE FFFE 00FE FFFF 0002 FF00" /* ....... */ + $"00FE FF04 00FF 0000 FFFC 0000 FFFE 00FE" /* ........ */ + $"FFFE 0002 FF00 00FE FF00 00FF 00FE FFFE" /* ....... */ + $"0000 FFFE 0000 FF8E 0081 00F4 00FE FD00" /* ........ */ + $"1CFE F5B0 0000 FFF2 0000 FFF6 0000 FFF2" /* ....... */ + $"00FA 0000 FF89 0081 00F4 00FE FD00 14FE" /* ........ */ + $"F5B0 0000 FFF4 00FF FFE5 0081 0081 00F4" /* ...... */ + $"00FE FD00 0CFE F584 0081 0081 00F4 00FE" /* ....... */ + $"FD00 0CFE F584 0081 0081 00F4 00FE FD00" /* ....... */ + $"0CFE F584 0081 0081 00F4 00FE FD00 0CFE" /* ....... */ + $"F584 0081 0081 00F4 00FE FD00 0CFE F584" /* ...... */ + $"0081 0081 00F4 00FE FD00 0CFE F584 0081" /* ....... */ + $"0081 00F4 00FE FD00 0CFE F584 0081 0081" /* ....... */ + $"00F4 00FE FD00 0CFE F584 0081 0081 00F4" /* ....... */ + $"00FE FD00 0CFE F584 0081 0081 00F4 00FE" /* ....... */ + $"FD00 0CFE F584 0081 0081 00F4 00FE FD00" /* ....... */ + $"0CFE F584 0081 0081 00F4 00FE FD00 0CFE" /* ....... */ + $"F584 0081 0081 00F4 00FE FD00 0CFE F584" /* ...... */ + $"0081 0081 00F4 00FE FD00 0CFE F584 0081" /* ....... */ + $"0081 00F4 00FE FD00 24FE F5A7 0000 FFFC" /* ....$.. */ + $"0000 FFE5 00CF 0000 FFD8 0000 FFEA 0000" /* ......... */ + $"FFF6 00ED 0000 FF96 00F4 00FE FD00 65FE" /* ......e */ + $"F5F8 00FF FFFD 00FF FFFA 00FF FFF8 00FD" /* .... */ + $"FFFE 00FF FFFF 00FF FFF1 0000 FFFC 0000" /* ...... */ + $"FFFE 0000 FFF2 0000 FFFC 0000 FFE5 00F6" /* ....... */ + $"0000 FFE2 0000 FFFB 0006 FF00 00FF FF00" /* ......... */ + $"FFFB 0000 FFE5 0000 FFEA 0003 FF00 00FF" /* ........ */ + $"FA00 00FF 00FF F500 00FF FB00 00FF 9600" /* ........ */ + $"F400 FEFD 0064 FEF5 F800 FFFF FD00 FFFF" /* ..d.. */ + $"FA00 FFFF F900 FFFF FF00 FFFF FB00 FFFF" /* .... */ + $"F100 00FF FC00 00FF FE00 00FF F300 00FF" /* ........ */ + $"FC00 00FF E400 F600 00FF E200 00FF FC00" /* ........ */ + $"06FF 0000 FF00 FFFF FA00 00FF E600 00FF" /* ........ */ + $"EA00 00FF FE00 00FF F900 00FF F500 00FF" /* ........ */ + $"FC00 00FF 9500 F400 FEFD 00D2 FEF5 F700" /* ...... */ + $"FBFF FE00 FEFF FF00 FDFF FB00 FFFF FC00" /* .... */ + $"FEFF 0000 FDFF FF00 FEFF FD00 FFFF FD00" /* ..... */ + $"FEFF FF00 FEFF 0000 FEFF 0000 FEFF FD00" /* ...... */ + $"00FF FD00 00FF FC00 03FF 0000 FFFC 0002" /* ......... */ + $"FF00 FFFC 0002 FF00 FFFC 0000 FFFD 0002" /* ........ */ + $"00FF FFFE 00FE FF00 00FE FFFF 00FF FFFF" /* ..... */ + $"00FE FFFE 00FF FFFC 00FE FFFE 00FF FFFF" /* .... */ + $"00FE FFFD 0000 FFF9 0004 FF00 FFFF 00FE" /* ....... */ + $"FFFF 000E FF00 FFFF 0000 FFFF 0000 FF00" /* ........ */ + $"00FF 00FE FFFC 0002 FF00 00FE FF02 00FF" /* ........ */ + $"FFFE 00FF FFFE 00FF FFFC 0002 FF00 00FE" /* ...... */ + $"FFFF 00FF FFFE 0001 FF00 FEFF FE00 FFFF" /* ..... */ + $"FF00 FEFF FD00 00FF 9500 F400 FEFD 00E8" /* ...... */ + $"FEF5 F700 FBFF FF00 FFFF 0800 FFFF 00FF" /* ..... */ + $"FF00 FFFF FB00 FDFF FE00 FFFF FF00 FFFF" /* .... */ + $"FF00 FFFF 0200 FFFF F800 06FF 0000 FF00" /* ........ */ + $"00FF FE00 06FF 0000 FF00 00FF FA00 00FF" /* ......... */ + $"FC00 00FF FD00 04FF 00FF 00FF FE00 04FF" /* ........ */ + $"00FF 00FF FE00 04FF 00FF 00FF FC00 05FF" /* ........ */ + $"0000 FF00 FFFC 0010 FF00 00FF 0000 FF00" /* .......... */ + $"FF00 00FF 00FF 0000 FFFD 000B FF00 00FF" /* ......... */ + $"00FF 0000 FF00 00FF FD00 00FF F800 FFFF" /* ........ */ + $"FE00 06FF 0000 FF00 FFFF FB00 0AFF 00FF" /* ....... */ + $"0000 FF00 FF00 00FF FE00 00FF FE00 06FF" /* ......... */ + $"0000 FF00 00FF FD00 05FF 00FF 0000 FFFE" /* ......... */ + $"0000 FFFD 0008 FF00 00FF 0000 FF00 000D" /* ........... */ + $"FF00 FF00 00FF 00FF 0000 FF00 00FF FD00" /* ......... */ + $"00FF 9400 F400 FEFD 00D8 FEF5 F600 FDFF" /* ..... */ + $"FE00 FCFF 0500 FFFF 00FF FFF8 00FF FFFF" /* ..... */ + $"00FF FFFF 00FF FFFF 00FC FFF8 0006 FF00" /* ...... */ + $"00FF 0000 FFFE 0006 FF00 00FF 0000 FFFA" /* ......... */ + $"0000 FFFC 0000 FFFD 0004 FF00 FF00 FFFE" /* ........ */ + $"0004 FF00 FF00 FFFE 0004 FF00 FF00 FFFC" /* ........ */ + $"0000 FFFC 00FF FFFE 000C FF00 00FF 0000" /* ......... */ + $"FF00 FF00 00FF 00FD FFFD 0004 FF00 00FF" /* ........ */ + $"00FD FFFF 0000 FFFD 0000 FFF8 0000 FFFD" /* ....... */ + $"0005 FF00 00FF 00FF FC00 FEFF 0900 FF00" /* ........ */ + $"00FF 00FF 0000 FFFE 0000 FFFE 0008 FF00" /* ......... */ + $"00FF 0000 FF00 00FE FF01 00FF FB00 00FF" /* ......... */ + $"FD00 02FF 0000 FDFF FF00 06FF 00FF 0000" /* ......... */ + $"FF00 FDFF FF00 00FF FD00 00FF 9400 F400" /* ....... */ + $"FEFD 00D8 FEF5 F600 FDFF FE00 FFFF FD00" /* .... */ + $"FFFF 0200 FFFF FC00 FFFF FF00 FFFF FF00" /* ..... */ + $"FFFF FF00 FFFF FF00 FFFF F500 06FF 0000" /* ...... */ + $"FF00 00FF FE00 06FF 0000 FF00 00FF FB00" /* ......... */ + $"00FF FC00 00FF FB00 02FF 00FF FC00 02FF" /* ........ */ + $"00FF FC00 02FF 00FF FB00 03FF 0000 FFFD" /* ........ */ + $"0010 FF00 00FF 0000 FF00 00FF 00FF 0000" /* ........... */ + $"FF00 FFFA 0005 FF00 00FF 00FF FC00 00FF" /* ........ */ + $"FE00 00FF F700 00FF FD00 05FF 0000 FF00" /* ......... */ + $"FFFD 0010 FF00 00FF 00FF 0000 FF00 FF00" /* ......... */ + $"00FF 0000 FFFD 0013 FF00 00FF 0000 FF00" /* .......... */ + $"FF00 00FF 00FF 0000 FF00 00FF FC00 03FF" /* ......... */ + $"0000 FFFC 0007 FF00 FF00 00FF 00FF FC00" /* ......... */ + $"00FF FE00 00FF 9300 F400 FEFD 00D9 FEF5" /* ...... */ + $"F600 FDFF FD00 FEFF FF00 FDFF FA00 FDFF" /* .... */ + $"FE00 FFFF FE00 FFFF FF00 FEFF FD00 FFFF" /* .... */ + $"FD00 03FF 0000 FFFE 0000 FFFE 0001 FF00" /* ......... */ + $"FEFF FD00 03FF 0000 FFFC 0000 FFFB 0002" /* ........ */ + $"FF00 FFFC 0002 FF00 FFFC 0002 FF00 FFFD" /* ....... */ + $"0001 FF00 0400 FFFF 0000 FEFF FD00 0EFF" /* ......... */ + $"0000 FFFF 0000 FF00 00FF 0000 FFFF FE00" /* ......... */ + $"09FF 00FF 0000 FF00 00FF FFFD 0003 FF00" /* ........ */ + $"00FF F700 00FF FD00 FEFF FF00 00FF FC00" /* ....... */ + $"FEFF FF00 FEFF 0700 FF00 00FF 0000 FFFD" /* ....... */ + $"0008 FF00 00FF 0000 FF00 00FE FFFF 00FF" /* ......... */ + $"FFFE 0000 FFFB 0004 FF00 00FF FFFE 0009" /* ....... */ + $"FF00 FF00 00FF 0000 FFFF FD00 03FF 0000" /* ......... */ + $"FF93 00F4 00FE FD00 10FE F5B4 0000 FFD2" /* ...... */ + $"0081 0081 00F4 00FE FD00 10FE F5B4 0000" /* ........ */ + $"FFD2 0081 0081 00F4 00FE FD00 0CFE F584" /* ...... */ + $"0081 0081 00F4 00FE FD00 0CFE F584 0081" /* ....... */ + $"0081 00F4 00FE FD00 0CFE F584 0081 0081" /* ....... */ + $"00F4 00FE FD00 0CFE F584 0081 0081 00F4" /* ....... */ + $"00FE FD00 0CFE F584 0081 0081 00F4 00FE" /* ....... */ + $"FD00 0CFE F584 0081 0081 00F4 00FE FD00" /* ....... */ + $"0CFE F584 0081 0081 00F4 00FE FD00 0CFE" /* ....... */ + $"F584 0081 0081 00F4 00FE FD00 0CFE F584" /* ...... */ + $"0081 0081 00F4 00FE FD00 0CFE F584 0081" /* ....... */ + $"0081 00F4 00FE FD00 0CFE F584 0081 0081" /* ....... */ + $"00F4 00FE FD00 0CFE F584 0081 0081 00F4" /* ....... */ + $"00FE FD00 0CFE F584 0081 0081 00F4 00FE" /* ....... */ + $"FD00 0CFE F584 0081 0081 00F4 00FE FD00" /* ....... */ + $"0CFE F584 0081 0081 00F4 00FE FD00 6FFE" /* ......o */ + $"F5F8 0000 FFFE 0000 FFEE 00FD FFFE 00FE" /* ...... */ + $"FFFC 0000 FFFB 00FE FFF8 0000 FFF6 00FE" /* ...... */ + $"FFEA 0003 FF00 00FF F100 00FF F000 00FF" /* ........ */ + $"FC00 01FF 00FE FFFB 0000 FFEF 0000 FFFD" /* ....... */ + $"0000 FFFC 0001 FF00 FEFF FE00 FCFF D100" /* ....... */ + $"01FF 0001 00FF F000 00FF F700 FFFF F000" /* ........ */ + $"06FF 0000 FF00 00FF B900 F400 FEFD 0078" /* ........x */ + $"FEF5 F800 00FF FE00 00FF EE00 00FF FE00" /* ....... */ + $"02FF 00FF FE00 00FF FD00 00FF FB00 03FF" /* ........ */ + $"0000 FFF9 0000 FFF7 0000 FFFE 0000 FFE8" /* ........ */ + $"0000 FFF1 0000 FFF0 00FF FFFE 00FF FF04" /* ....... */ + $"00FF 0000 FFFD 00FF FFEF 0000 FFFD 00FF" /* ....... */ + $"FFFE 00FF FF07 00FF 0000 FF00 00FF CD00" /* ........ */ + $"01FF 00EE 0000 FFF6 0000 FFED 0003 FF00" /* ......... */ + $"00FF B900 F400 FEFD 0108 FEF5 F800 00FF" /* ....... */ + $"FE00 02FF 0000 FEFF FF00 FFFF FE00 FEFF" /* ...... */ + $"FD00 00FF FE00 02FF 00FF FA00 02FF 00FF" /* ........ */ + $"FC00 00FF FE00 06FF 0000 FFFF 0000 FEFF" /* ........ */ + $"FF00 FFFF FC00 00FF FB00 FFFF FE00 FFFF" /* ..... */ + $"FF00 0CFF 0000 FF00 FF00 FFFF 00FF FF00" /* ........ */ + $"FEFF 0400 FF00 00FF F700 01FF 00FE FFFE" /* ....... */ + $"00FF FFF9 0008 FF00 FF00 FF00 FF00 FFFE" /* ....... */ + $"0005 FF00 00FF 00FF FB00 FFFF FF00 FEFF" /* ....... */ + $"FE00 FEFF FD00 08FF 00FF 00FF 00FF 00FF" /* ....... */ + $"FE00 01FF 00FD FFFC 00FE FF02 00FF FFFE" /* ...... */ + $"00FF FFFE 00FE FFFF 00FE FFFF 00FF FFFE" /* .... */ + $"00FE FFFF 00FF FFFB 00FE FF00 00FF FFFF" /* ..... */ + $"00FE FFFF 00FF FFFE 00FE FF00 00FE FFFC" /* ..... */ + $"00FF FFFE 0002 FF00 00FE FFFF 00FF FFFF" /* ...... */ + $"0007 FF00 FFFF 00FF FF00 FEFF 0000 FEFF" /* ....... */ + $"FF00 FEFF 0200 FFFF FE00 FEFF C900 F400" /* ...... */ + $"FEFD 010F FEF5 F800 00FF FE00 02FF 00FF" /* ....... */ + $"FD00 05FF 0000 FF00 FFFA 00FD FFFE 00FE" /* ....... */ + $"FFFD 0002 FF00 FFFC 0000 FFFE 0000 FFFD" /* ....... */ + $"0003 FF00 00FF FC00 00FF FC00 FEFF FF00" /* ........ */ + $"10FF 0000 FF00 FF00 00FF 00FF 0000 FF00" /* .......... */ + $"FFFF FD00 09FF 0000 FF00 00FF 0000 FFF7" /* ....... */ + $"000A FF00 FF00 00FF 00FF 0000 FFFA 0008" /* ......... */ + $"FF00 00FF 0000 FF00 FFFE 0005 FF00 FF00" /* ......... */ + $"00FF F900 0AFF 00FF 0000 FF00 FF00 00FF" /* ........ */ + $"FD00 08FF 0000 FF00 00FF 00FF FE00 00FF" /* ......... */ + $"FC00 00FF FD00 0DFF 0000 FF00 00FF 00FF" /* ......... */ + $"0000 FF00 FFFD 0000 FFFA 000A FF00 FF00" /* ........ */ + $"00FF 00FF 0000 FFFD 0004 FF00 00FF 000D" /* .......... */ + $"00FF 00FF 0000 FF00 FF00 00FF 00FF FC00" /* ......... */ + $"00FF F900 10FF 0000 FF00 FF00 00FF 00FF" /* ......... */ + $"0000 FF00 FFFF FD00 13FF 0000 FF00 00FF" /* ......... */ + $"0000 FF00 FF00 00FF 0000 FF00 FFC6 00F4" /* ......... */ + $"00FE FD01 05FE F5F8 0000 FFFE 0006 FF00" /* ........ */ + $"00FF FF00 00FD FFFF 00FF FFFC 0002 FF00" /* ....... */ + $"FFFA 0002 FF00 00FC FFFD 0000 FFFE 0002" /* ........ */ + $"FF00 00FE FFFF 0000 FFFE 00FE FFF9 0001" /* ....... */ + $"FF00 FDFF 0100 FFFD 0005 FF00 00FF 00FF" /* ........ */ + $"FC00 09FF 0000 FF00 00FF 0000 FFF7 0007" /* ......... */ + $"FF00 FF00 00FF 00FF F700 00FF FC00 02FF" /* ........ */ + $"00FF FE00 01FF 00FC FFFC 00FE FF09 00FF" /* ...... */ + $"0000 FF00 FF00 00FF FD00 00FF FC00 02FF" /* ......... */ + $"00FF FE00 00FF FC00 00FF FD00 07FF 0000" /* ......... */ + $"FF00 00FF 00FD FFFF 00FF FFFE 00FF FFFE" /* ..... */ + $"00FE FF05 00FF 0000 FF00 FDFF FD00 04FF" /* ........ */ + $"0000 FF00 0700 FF00 FF00 00FF 00FD FFFF" /* ......... */ + $"00FF FFFE 0000 FFFB 00FE FFFF 000C FF00" /* ....... */ + $"FF00 00FF 00FF 0000 FF00 FFFC 0015 FF00" /* ......... */ + $"00FF 0000 FF00 00FF 00FF 0000 FF00 00FF" /* .......... */ + $"0000 FFFF C800 F400 FEFD 0116 FEF5 F800" /* ....... */ + $"00FF FE00 00FF FD00 02FF 00FF FA00 00FF" /* ........ */ + $"FD00 06FF 0000 FF00 00FF FE00 03FF 0000" /* .......... */ + $"FFFE 0000 FFFD 0012 FF00 00FF 0000 FF00" /* ......... */ + $"00FF 0000 FF00 00FF 0000 FFFD 0000 FFFE" /* ......... */ + $"0002 FF00 FFFD 000A FF00 00FF 00FF 0000" /* ......... */ + $"FF00 FFFC 0009 FF00 00FF 0000 FF00 00FF" /* ........ */ + $"F700 0AFF 00FF 0000 FF00 FF00 00FF FA00" /* ........ */ + $"00FF FC00 05FF 00FF 0000 FFFC 0000 FFFC" /* ........ */ + $"000D FF00 00FF 00FF 0000 FF00 FF00 00FF" /* .......... */ + $"FD00 00FF FC00 08FF 00FF 0000 FF00 00FF" /* ......... */ + $"FE00 00FF FD00 08FF 0000 FF00 00FF 00FF" /* ......... */ + $"FA00 00FF FD00 0CFF 00FF 0000 FF00 FF00" /* ......... */ + $"00FF 00FF FA00 04FF 0000 FF00 0800 FF00" /* .......... */ + $"FF00 00FF 00FF FA00 03FF 0000 FFFC 0012" /* ......... */ + $"FF00 00FF 0000 FF00 FF00 00FF 00FF 0000" /* .......... */ + $"FF00 FFFC 0011 FF00 00FF 0000 FF00 00FF" /* ......... */ + $"00FF 0000 FF00 00FF FD00 00FF C900 F400" /* ......... */ + $"FEFD 0107 FEF5 F700 FEFF FF00 FEFF FE00" /* ..... */ + $"FFFF FF00 FEFF FC00 00FF FE00 02FF 0000" /* ....... */ + $"FEFF FE00 00FF FE00 00FF FD00 FEFF FD00" /* ...... */ + $"FEFF FE00 02FF 0000 FEFF FC00 FEFF FE00" /* ...... */ + $"FFFF FE00 FFFF FE00 FEFF 0100 FFFC 0000" /* ...... */ + $"FFFE 0002 FF00 00FE FFFD 0000 FFFC 0009" /* ....... */ + $"FF00 FF00 00FF 0000 FFFF FE00 00FF FD00" /* ........ */ + $"00FF FC00 01FF 00FE FFFB 0000 FFFB 00FE" /* ....... */ + $"FF06 00FF 0000 FF00 00FE FFFD 0000 FFFC" /* ........ */ + $"0001 FF00 FEFF FD00 FEFF FC00 0CFF 0000" /* ........ */ + $"FF00 00FF 0000 FFFF 0000 FEFF FF00 FEFF" /* ....... */ + $"FE00 FEFF FF00 FEFF FF00 FFFF FB00 FEFF" /* .... */ + $"0000 0300 FF00 00FE FFFF 00FF FFFF 00FE" /* ........ */ + $"FFFD 0000 FFFC 00FE FFFF 0002 FF00 00FE" /* ....... */ + $"FFFF 00FF FFFF 0000 FFFC 0000 FFFE 000E" /* ....... */ + $"FF00 FF00 00FF 00FF 0000 FF00 00FF 00FE" /* ......... */ + $"FFFE 0000 FFCC 00F4 00FE FD00 20FE F58F" /* ..... */ + $"0000 FFFD 0000 FFFC 0090 0000 FFF3 00FB" /* ........ */ + $"0000 FFE4 0000 FFA6 00F4 00FE FD00 20FE" /* ....... */ + $"F591 00FF FFFD 0000 FFFB 0092 00FF FFF2" /* ..... */ + $"00FD 00FF FFE5 00FF FFA5 00F4 00FE FD00" /* ...... */ + $"0CFE F584 0081 0081 00F4 00FE FD00 0CFE" /* ....... */ + $"F584 0081 0081 00F4 00FE FD00 21FE F5A7" /* .....! */ + $"0002 FF00 FFEC 0000 FFF7 00E4 0002 FF00" /* ......... */ + $"FFA1 0083 0001 F5FF 00F6 F500 FEFD 0063" /* ......c */ + $"FEF5 F800 FCFF FB00 00FF EA00 00FF F500" /* ...... */ + $"FFFF FB00 FFFF EB00 02FF 00FF FA00 03FF" /* ...... */ + $"0000 FFF6 0000 FFF7 00FE FFFF 00FE FFFE" /* ...... */ + $"00FD FF00 00FD FFF8 0002 FF00 FFFD 0000" /* ........ */ + $"FFF0 0000 FFE5 00FE FFF8 00FE FFFE 0000" /* ...... */ + $"FFF4 0000 FFF5 0084 0002 F5FE AB00 F5F5" /* ...... */ + $"00FE FD00 6AFE F5F6 0000 FFF9 0000 FFEA" /* ..j.... */ + $"0000 FFF4 0000 FFFC 0000 FFE9 0002 FF00" /* ......... */ + $"FFFA 0000 FFF4 0000 FFF7 0000 FFFE 0008" /* ........ */ + $"FF00 FF00 00FF 0000 FFFD 0000 FFF6 0002" /* ......... */ + $"FF00 FFFC 0000 FFF0 0000 FFE6 0000 FFFE" /* ....... */ + $"0000 FFFA 0000 FFFE 0003 FF00 00FF F400" /* ......... */ + $"00FF F500 8500 03F5 A9FD 00F4 00FE FD00" /* ....... */ + $"C9FE F5F6 0000 FFFD 00FF FFFF 00FE FFFB" /* .... */ + $"00FF FFFE 00FF FFFF 00FE FFFF 00FE FF08" /* ..... */ + $"00FF 00FF FF00 00FF FFFE 0000 FFFD 00FE" /* ....... */ + $"FF0A 00FF 00FF FF00 00FF FF00 00FE FF02" /* ....... */ + $"00FF FFF1 0004 FF00 FFFF 00FE FF02 00FF" /* ....... */ + $"FFFA 00FE FFFD 0000 FFFC 0000 FFFE 0002" /* ....... */ + $"FF00 FFFD 0000 FFFC 00FE FFF6 00FE FFFF" /* ..... */ + $"0003 FF00 00FF F800 06FF 0000 FFFF 0000" /* .......... */ + $"FEFF 0200 FFFF FE00 FFFF FE00 FEFF FD00" /* ..... */ + $"00FF F600 00FF FC00 FEFF FF00 FFFF FF00" /* ...... */ + $"04FF 0000 FF00 FEFF F600 9100 0FA3 7FA3" /* ........ */ + $"7FA3 7FA3 7FA3 7FA3 7FA3 FF81 F807 78F8" /* ......x */ + $"78F8 78F8 78F8 FC00 FEFD 00D5 FEF5 F600" /* xxx... */ + $"00FF FB00 05FF 00FF 0000 FFFD 0014 FF00" /* ......... */ + $"00FF 00FF 0000 FF00 FF00 00FF 0000 FF00" /* .......... */ + $"00FF FFFE 0006 FF00 00FF 0000 FFFC 0004" /* ......... */ + $"FF00 00FF FFFE 000B FF00 00FF 00FF 0000" /* ......... */ + $"FF00 00FF F200 0BFF 0000 FF00 FF00 00FF" /* ......... */ + $"0000 FFFC 0000 FFFA 0000 FFFC 0000 FFFE" /* ........ */ + $"0001 FF00 FEFF FF00 FEFF FF00 00FF F300" /* ....... */ + $"08FF 0000 FF00 FF00 00FF F800 00FF FD00" /* ......... */ + $"0FFF 00FF 0000 FF00 00FF 00FF 0000 FF00" /* .......... */ + $"FFFA 0004 FF00 00FF FFF9 00FE FFFE 000E" /* ....... */ + $"FF00 00FF 0000 FF00 FF00 00FF 0000 FFF5" /* ......... */ + $"0091 000F 7FA3 7FA3 7FA3 7FA3 7FA3 7FA3" /* ......... */ + $"A9AC F878 07F8 78F8 78F8 78F8 78FC 00FE" /* x.xxxx. */ + $"FD00 DAFE F5F6 0000 FFFD 00FE FF04 00FF" /* ...... */ + $"0000 FFFD 0000 FFFD 000E FF00 00FF 00FF" /* ......... */ + $"0000 FF00 00FF 0000 FFFD 0006 FF00 00FF" /* .......... */ + $"0000 FFFC 0003 FF00 00FF FD00 0BFF 0000" /* .......... */ + $"FF00 FF00 00FF 0000 FFF6 0000 FFFE 000B" /* ......... */ + $"FF00 00FF 00FF 0000 FF00 00FF FB00 FFFF" /* ........ */ + $"FC00 00FF FC00 00FF FE00 02FF 00FF FD00" /* ........ */ + $"00FF FC00 FFFF F500 08FF 0000 FF00 FF00" /* ........ */ + $"00FF FC00 00FF FE00 02FF 0000 FEFF 0800" /* ......... */ + $"FF00 00FF 0000 FF00 FDFF FF00 FFFF FC00" /* ....... */ + $"00FF FE00 00FF F600 11FF 0000 FF00 00FF" /* ......... */ + $"0000 FF00 FF00 00FF 0000 FFF5 0091 000F" /* .......... */ + $"A37F A37F A37F AAAA A37F A37F FD81 78F8" /* .....x */ + $"07D0 CF78 F878 F878 F8FC 00FE FD00 E2FE" /* .xxx.. */ + $"F5F6 0000 FFFE 0008 FF00 00FF 00FF 0000" /* ......... */ + $"FFFD 0013 FF00 00FF 00FF 0000 FF00 FF00" /* ......... */ + $"00FF 0000 FF00 00FF FD00 06FF 0000 FF00" /* .......... */ + $"00FF FC00 03FF 0000 FFFD 000B FF00 00FF" /* ......... */ + $"00FF 0000 FF00 00FF F600 00FF FE00 0BFF" /* ......... */ + $"0000 FF00 FF00 00FF 0000 FFF9 0000 FFFD" /* ......... */ + $"0000 FFFE 0008 FF00 FF00 00FF 0000 FFFD" /* ......... */ + $"0000 FFFA 0000 FFF6 0008 FF00 00FF 00FF" /* ......... */ + $"0000 FFFC 0000 FFFE 000F FF00 FF00 00FF" /* ......... */ + $"00FF 0000 FF00 00FF 00FF FA00 00FF FD00" /* ......... */ + $"00FF FE00 00FF FA00 00FF FE00 11FF 0000" /* ......... */ + $"FF00 00FF 0000 FF00 FF00 00FF 0000 FFF5" /* ......... */ + $"0091 000F 7FA3 7FA3 7FA3 AAEF 7FA3 7FA9" /* ........ */ + $"AC78 F878 07FF CFF8 78F8 78F8 78FC 00FE" /* xx.xxx. */ + $"FD00 C9FE F5F6 0000 FFFD 00FE FF00 00FE" /* ...... */ + $"FFFB 00FF FFFE 00FF FFFF 0003 FF00 00FF" /* ...... */ + $"FE00 02FF 00FF FC00 FFFF FE00 00FF FC00" /* ....... */ + $"03FF 0000 FFFC 00FF FFFF 0006 FF00 00FF" /* ........ */ + $"0000 FFF5 00FE FFFE 0008 FF00 FF00 00FF" /* ........ */ + $"0000 FFFC 00FE FFFB 00FE FFFF 00FE FFFE" /* ..... */ + $"00FD FF01 00FF FD00 FEFF F500 FEFF FE00" /* ...... */ + $"FEFF FB00 FEFF FE00 FEFF 0D00 FF00 00FF" /* ...... */ + $"0000 FF00 00FF FF00 00FE FFFB 00FE FFFE" /* ....... */ + $"0000 FFFC 00FE FFFD 0004 FF00 00FF FFFE" /* ....... */ + $"00FE FFFE 0003 FF00 00FF F900 9100 0FA3" /* ........ */ + $"7FA3 7FA3 7FAA EFA3 7FA3 FE81 F878 F807" /* ....x. */ + $"FFCF 78F8 78F8 78F8 FC00 FEFD 002A FEF5" /* xxx..* */ + $"8400 D500 00FF AE00 9100 0F7F A37F A37F" /* ......... */ + $"A3CD EF7F A3FB FFF8 78F8 7907 FFCF F878" /* .xy.x */ + $"F878 F878 FC00 FEFD 002A FEF5 8400 D700" /* xx..*.. */ + $"FFFF AD00 9100 0FA3 7FA3 7FA3 7FA3 7FA3" /* ....... */ + $"7FA9 AC78 F878 F807 78F8 78F8 78F8 78F8" /* .xx.xxxx */ + $"FC00 FEFD 0026 FEF5 8400 8100 9100 0F7F" /* ..&..... */ + $"A37F A37F A37F A37F A3FF 80F8 78F8 7807" /* ....xx. */ + $"F878 F878 F878 F878 FC00 FEFD 0026 FEF5" /* xxxx..& */ + $"8400 8100 9100 0FA3 7FA3 7FA3 7FA3 7FA3" /* ........ */ + $"FBFF 8078 F878 F807 78F8 78F8 78F8 78F8" /* xx.xxxx */ + $"FC00 FEFD 0026 FEF5 8400 8100 9100 0F7F" /* ..&..... */ + $"A37F A37F A37F A37F A9FF 80F8 79F8 7807" /* ....yx. */ + $"F878 F878 F878 F878 FC00 FEFD 0026 FEF5" /* xxxx..& */ + $"8400 8100 9100 0AA3 7FA3 7FA3 7FA3 7FA3" /* ...£.... */ + $"A9E0 FEFF 0180 5507 78F8 78F8 78F8 78F8" /* .U.xxxx */ + $"FC00 FEFD 0026 FEF5 8400 8100 9100 0F7F" /* ..&..... */ + $"A37F A37F A37F A37F A37F A37F FF80 7907" /* ......y. */ + $"F878 F878 F878 F878 FC00 FEFD 0062 FEF5" /* xxxx..b */ + $"F700 FEFF F900 00FF F400 00FF AE00 00FF" /* ....... */ + $"FC00 F900 FDFF E400 00FF FA00 00FF FC00" /* ....... */ + $"00FF F400 00FF F600 00FF F700 00FF FC00" /* ........ */ + $"00FF F200 00FF FD00 FFFF FA00 F900 00FF" /* ....... */ + $"9A00 0FA3 7FA3 7FEF AAA3 7FA3 7FA3 7FA3" /* ....画... */ + $"FF80 F807 79F8 79A4 CFF8 78F8 FC00 FEFD" /* .yyx. */ + $"0063 FEF5 F800 00FF F600 00FF F400 00FF" /* .c...... */ + $"AE00 00FF FC00 F900 00FF FE00 00FF E500" /* ........ */ + $"00FF FA00 00FF FC00 00FF F400 00FF F600" /* ........ */ + $"00FF F700 00FF FC00 00FF F200 00FF FE00" /* ........ */ + $"00FF F800 F900 00FF 9A00 067F A37F A3AA" /* ........ */ + $"EFD4 FBAA 02FF A481 07A4 81FF FFA4 78F8" /* ..x */ + $"78FC 00FE FD00 F6FE F5F8 0000 FFFC 00FE" /* x..... */ + $"FFFE 0004 FF00 00FF FFFD 00FE FFFF 0003" /* ....... */ + $"FF00 FFFF FD00 FEFF FE00 FEFF 0800 FF00" /* ...... */ + $"FFFF 0000 FFFF FD00 FFFF FE00 03FF 00FF" /* ...... */ + $"FFFD 000A FF00 FFFF 0000 FFFF 0000 FFFE" /* ...... */ + $"0004 FF00 00FF FFFD 0006 FF00 FFFF 00FF" /* ........ */ + $"FFFE 00FE FFFC 00FE FFFE 0000 FFFE 0000" /* ...... */ + $"FFFE 0000 FFFE 0007 FF00 FF00 FFFF 00FF" /* ....... */ + $"FE00 03FF 00FF FFFD 0003 FF00 FFFF FB00" /* ....... */ + $"00FF FA00 FFFF FE00 FFFF FF00 00FF FE00" /* ...... */ + $"02FF 0000 FEFF 0800 FF00 FFFF 0000 FFFF" /* ........ */ + $"FD00 00FF FE00 FFFF FC00 FFFF FE00 FFFF" /* ..... */ + $"FE00 FEFF FE00 04FF 00FF FF00 FAFF FF00" /* ...... */ + $"FEFF FE00 05FF 00FF FF00 00FE FF9A 0008" /* ....... */ + $"A37F A37F A37F A9B0 EFFE D403 EFFF D6FF" /* .... */ + $"07FF AC81 7955 F878 F8FC 00FE FD01 07FE" /* .yUx... */ + $"F5F7 00FF FFFE 0006 FF00 00FF 0000 FFFD" /* ....... */ + $"0003 FF00 00FF FC00 FFFF 0100 FFFE 0000" /* ......... */ + $"FFFC 0000 FFFD 00FF FF12 00FF 00FF 0000" /* ........ */ + $"FF00 00FF 0000 FF00 00FF FF00 FFFD 00FF" /* ........ */ + $"FF0B 00FF 00FF 0000 FF00 00FF 00FF FC00" /* ......... */ + $"00FF FE00 FFFF 0400 FFFF 00FF FE00 03FF" /* ....... */ + $"0000 FFFD 0005 FF00 00FF 0000 0300 FF00" /* ........... */ + $"FFFD 00FD FFFF 00FF FF06 00FF 0000 FF00" /* ....... */ + $"FFFD 0000 FFFE 00FF FF01 00FF FB00 00FF" /* ....... */ + $"FA00 FFFF FE00 FFFF FE00 05FF 00FF 0000" /* ....... */ + $"FFFD 00FF FF01 00FF FD00 00FF FE00 06FF" /* ....... */ + $"0000 FF00 00FF FD00 FFFF FE00 FFFF FF00" /* ....... */ + $"00FF FE00 09FF 0000 FFFF 00FF 0000 FFFE" /* ....... */ + $"0003 FF00 00FF FE00 02FF 0000 FFFF 0600" /* .......... */ + $"FF00 FF00 00FF 9A00 0F7F A37F A37F A37F" /* ......... */ + $"A380 A380 A3AA FF80 7807 F878 F878 F878" /* x.xxx */ + $"F878 FC00 FEFD 00FF FEF5 F500 0BFF 0000" /* x...... */ + $"FF00 00FF 0000 FF00 00FE FFFE 00FF FFFE" /* ....... */ + $"0003 FF00 00FF FD00 FFFF FE00 00FF FD00" /* ........ */ + $"00FF FD00 FDFF FF00 FDFF FF00 03FF 0000" /* ....... */ + $"FFFD 0000 FFFD 00FD FFFF 0002 FF00 FFFE" /* ...... */ + $"00FE FFFE 0006 FF00 00FF 0000 FFFE 0003" /* ......... */ + $"FF00 00FF FD00 05FF 0000 FF00 0003 00FF" /* .......... */ + $"00FF FD00 00FF FE00 02FF 00FF FC00 04FF" /* ........ */ + $"00FF 0000 FEFF FE00 03FF 0000 FFFB 0000" /* ......... */ + $"FFFA 0006 FF00 FF00 FF00 FFFE 0005 FF00" /* ........ */ + $"FF00 00FF FD00 05FF 0000 FF00 00FE FFFE" /* ........ */ + $"0002 FF00 00FD FFFD 0009 FF00 FF00 FF00" /* ........ */ + $"FF00 00FF FE00 09FF 0000 FF00 00FF 0000" /* ......... */ + $"FFFE 0003 FF00 00FF FE00 02FF 0000 00FF" /* ......... */ + $"FD00 03FF 0000 FF9A 000F A37F A37F A37F" /* ......... */ + $"A37F A37F A37F A3FE 8055 0778 F878 F878" /* ...U.xxx */ + $"F878 F8FC 00FE FD01 03FE F5F5 000E FF00" /* x...... */ + $"00FF 0000 FF00 00FF 00FF 0000 FFFC 0006" /* .......... */ + $"FF00 00FF 0000 FFFB 0003 FF00 00FF FD00" /* ......... */ + $"00FF FD00 00FF FC00 00FF FC00 03FF 0000" /* ......... */ + $"FFFD 0000 FFFD 0000 FFFB 0000 FFFE 0003" /* ........ */ + $"FF00 00FF FE00 06FF 0000 FF00 00FF FE00" /* ......... */ + $"03FF 0000 FFFD 0005 FF00 00FF 0000 0300" /* ........... */ + $"FF00 FFFD 0000 FFFE 0002 FF00 FFFC 0007" /* ........ */ + $"FF00 FF00 FF00 00FF FE00 03FF 0000 FFFB" /* ........ */ + $"0003 FF00 00FF FD00 06FF 00FF 00FF 00FF" /* ......... */ + $"FE00 05FF 00FF 0000 FFFD 0008 FF00 00FF" /* ......... */ + $"00FF 0000 FFFE 0003 FF00 00FF FA00 09FF" /* ........ */ + $"00FF 00FF 00FF 0000 FFFE 0009 FF00 00FF" /* ........ */ + $"0000 FF00 00FF FE00 03FF 0000 FFFE 0002" /* .......... */ + $"FF00 0000 FFFD 0003 FF00 00FF 9A00 0F7F" /* .......... */ + $"A37F A37F A37F A37F A37F A37F A9FD 7907" /* ......y. */ + $"F879 F878 F878 F878 FC00 FEFD 00D4 FEF5" /* yxxx.. */ + $"F800 FEFF FE00 FEFF FE00 02FF 0000 FEFF" /* ...... */ + $"FF00 FEFF FE00 03FF 0000 FFFE 00FE FFFD" /* ...... */ + $"00FE FF01 00FF FC00 FEFF FE00 FEFF FF00" /* ...... */ + $"03FF 0000 FFFD 0000 FFFC 00FE FFFE 0000" /* ........ */ + $"FFFD 00FE FFFE 0006 FF00 00FF 0000 FFFE" /* ....... */ + $"00FE FFFC 00FE FFFE 00FF 0000 FFFC 00FD" /* ...... */ + $"FFFF 0000 FFFB 0000 FFFE 00FE FFFE 0003" /* ....... */ + $"FF00 00FF FE00 FEFF FE00 00FF FD00 06FF" /* ....... */ + $"0000 FF00 00FF FD00 00FF FD00 FEFF 0600" /* ......... */ + $"FF00 00FF 0000 FEFF FE00 00FF FE00 FEFF" /* ....... */ + $"FD00 06FF 0000 FF00 00FF FE00 FEFF FE00" /* ........ */ + $"03FF 0000 FFFE 00FF FF01 00FF FE00 FEFF" /* ....... */ + $"FE00 00FF FC00 FEFF 8D00 02F9 F400 F400" /* ....... */ + $"FEFD 0024 FEF5 F200 00FF A200 00FF F400" /* .$..... */ + $"FF00 00FF EF00 00FF DB00 00FF BE00 8400" /* ........ */ + $"02F5 FFF8 F400 FEFD 0024 FEF5 F200 00FF" /* ...$.. */ + $"A200 00FF F400 0100 FFEF 0000 FFDB 0000" /* ......... */ + $"FFBD 0083 0001 81FE 00F6 F500 FEFD 0010" /* ....... */ + $"FEF5 8400 8100 8200 0056 00F6 F500 FEFD" /* ....V.. */ + $"000C FEF5 8400 8100 8100 F400 FEFD 000C" /* ........ */ + $"FEF5 8400 8100 8100 F400 FEFD 000C FEF5" /* ...... */ + $"8400 8100 8100 F400 FEFD 000C FEF5 8400" /* ....... */ + $"8100 8100 F400 FEFD 0010 FFF5 0056 84AC" /* ......V */ + $"81AC 81AC F4AC 02FE FDFD 000E 01F5 5683" /* ....V */ + $"AC81 AC81 ACF3 AC01 FEFD 000C 0056 82AC" /* ....V */ + $"81AC 81AC F2AC 00FE 00FF" /* .. */ +}; + +data 'PRCT' (1000, "Keypad") { + $"0004 0004 001E 001E 0004 0024 001E 003E" /* ...........$...> */ + $"0004 0044 001E 005E 0024 0004 003E 001E" /* ...D...^.$...>.. */ + $"0024 0024 003E 003E 0024 0044 003E 005E" /* .$.$.>.>.$.D.>.^ */ + $"0044 0024 005E 003E 0064 0004 007E 001E" /* .D.$.^.>.d...~.. */ + $"0064 0024 007E 003E 0064 0044 007E 005E" /* .d.$.~.>.d.D.~.^ */ + $"0004 006E 001E 0088 0004 008E 001E 00A8" /* ...n......... */ + $"0004 00AE 001E 00C8 0004 00CE 001E 00E8" /* ............ */ + $"0024 006E 003E 0088 0024 008E 003E 00A8" /* .$.n.>..$..>. */ + $"0024 00AE 003E 00C8 0024 00CE 003E 00E8" /* .$..>..$..>. */ + $"0044 006E 005E 0088 0044 008E 005E 00A8" /* .D.n.^..D..^. */ + $"0044 00AE 005E 00C8 0044 00CE 005E 00E8" /* .D..^..D..^. */ + $"0064 006E 007E 0088 0064 008E 007E 00A8" /* .d.n.~..d..~. */ + $"0064 00AE 007E 00C8 0064 00CE 009E 00E8" /* .d..~..d... */ + $"0084 006E 009E 00A8 0084 00AE 009E 00C8" /* ..n...... */ +}; + +data 'PRCT' (1002, "Function") { + $"0004 0004 001E 001E 0004 0024 001E 003E" /* ...........$...> */ + $"0004 0044 001E 005E 0004 0064 001E 007E" /* ...D...^...d...~ */ + $"0004 0084 001E 009E 0024 0004 003E 001E" /* .......$...>.. */ + $"0024 0024 003E 003E 0024 0044 003E 005E" /* .$.$.>.>.$.D.>.^ */ + $"0024 0064 003E 007E 0044 0004 005E 001E" /* .$.d.>.~.D...^.. */ + $"0044 0024 005E 005E 0064 0004 007E 001E" /* .D.$.^.^.d...~.. */ + $"0064 0024 007E 003E 0064 0044 007E 005E" /* .d.$.~.>.d.D.~.^ */ + $"0064 0064 007E 007E" /* .d.d.~.~ */ +}; + +data 'STR ' (1991, "Preferences File Name", purgeable) { + $"1342 6574 7465 7254 656C 6E65 7420 5072" /* .BetterTelnet Pr */ + $"6566 7332" /* efs2 */ +}; + +data 'STR#' (2001, "Operation Failed Messages", preload) { + $"0005 1E74 6865 2066 696C 6520 636F 756C" /* ...the file coul */ + $"6420 6E6F 7420 6265 2063 7265 6174 6564" /* d not be created */ + $"2E1D 7468 6520 6669 6C65 2063 6F75 6C64" /* ..the file could */ + $"206E 6F74 2062 6520 6F70 656E 6564 2E20" /* not be opened. */ + $"7468 6572 6520 6973 206E 6F74 2065 6E6F" /* there is not eno */ + $"7567 6820 6672 6565 206D 656D 6F72 792E" /* ugh free memory. */ + $"2474 6865 2073 6574 2063 6F6E 7461 696E" /* $the set contain */ + $"7320 616E 2069 6E76 616C 6964 206B 6579" /* s an invalid key */ + $"776F 7264 2E20 796F 7520 6361 6E6E 6F74" /* word. you cannot */ + $"206F 7065 6E20 6120 6E75 6C6C 2068 6F73" /* open a null hos */ + $"746E 616D 652E" /* tname. */ +}; + +data 'STR#' (2004, "DNR Error Messages", purgeable) { + $"0009 176F 6620 6120 6765 6E65 7261 6C20" /* ..of a general */ + $"444E 5220 6572 726F 722E 2074 6865 204D" /* DNR error. the M */ + $"6163 5443 5020 444E 5220 6973 206F 7574" /* acTCP DNR is out */ + $"206F 6620 6D65 6D6F 7279 2E29 7468 6520" /* of memory.)the */ + $"646F 6D61 696E 206E 616D 6520 7365 7276" /* domain name serv */ + $"6572 2072 6574 7572 6E65 6420 616E 2065" /* er returned an e */ + $"7272 6F72 2E30 7468 6572 6520 7761 7320" /* rror.0there was */ + $"6E6F 2061 6E73 7765 7220 6672 6F6D 2061" /* no answer from a */ + $"6E79 2064 6F6D 6169 6E20 6E61 6D65 2073" /* ny domain name s */ + $"6572 7665 722E 1B74 6865 2064 6F6D 6169" /* erver..the domai */ + $"6E20 6E61 6D65 2069 7320 696E 7661 6C69" /* n name is invali */ + $"642E 2074 6865 7265 2069 7320 6E6F 2064" /* d. there is no d */ + $"6566 6175 6C74 206E 616D 6520 7365 7276" /* efault name serv */ + $"6572 2E15 6F66 2061 6E20 696E 7465 726E" /* er..of an intern */ + $"616C 2065 7272 6F72 2E15 6F66 2061 6E20" /* al error..of an */ + $"696E 7465 726E 616C 2065 7272 6F72 2E22" /* internal error." */ + $"7468 6520 646F 6D61 696E 206E 616D 6520" /* the domain name */ + $"6769 7665 6E20 7761 7320 696E 7661 6C69" /* given was invali */ + $"642E" /* d. */ +}; + +data 'STR#' (23227, "Server info", purgeable) { + $"0024 2A32 3230 204D 6163 696E 746F 7368" /* .$*220 Macintosh */ + $"2052 6573 6964 656E 7420 4654 5020 7365" /* Resident FTP se */ + $"7276 6572 2C20 7265 6164 790D 0A26 3435" /* rver, ready.&45 */ + $"3120 4572 726F 7220 696E 2070 726F 6365" /* 1 Error in proce */ + $"7373 696E 6720 6C69 7374 2063 6F6D 6D61" /* ssing list comma */ + $"6E64 0D0A 0D32 3231 2047 6F6F 6462 7965" /* nd..221 Goodbye */ + $"0D0A 2F32 3030 2054 6869 7320 7370 6163" /* ./200 This spac */ + $"6520 696E 7465 6E74 696F 6E61 6C6C 7920" /* e intentionally */ + $"6C65 6674 2062 6C61 6E6B 203C 2020 203E" /* left blank < > */ + $"0D0A 1831 3530 204F 7065 6E69 6E67 2063" /* ..150 Opening c */ + $"6F6E 6E65 6374 696F 6E0D 0A17 3232 3620" /* onnection..226 */ + $"5472 616E 7366 6572 2063 6F6D 706C 6574" /* Transfer complet */ + $"650D 0A28 3230 3020 5479 7065 2073 6574" /* e.(200 Type set */ + $"2074 6F20 412C 2041 5343 4949 2074 7261" /* to A, ASCII tra */ + $"6E73 6665 7220 6D6F 6465 0D0A 2932 3030" /* nsfer mode.)200 */ + $"2054 7970 6520 7365 7420 746F 2049 2C20" /* Type set to I, */ + $"6269 6E61 7279 2074 7261 6E73 6665 7220" /* binary transfer */ + $"6D6F 6465 0D0A 1C35 3030 2043 6F6D 6D61" /* mode..500 Comma */ + $"6E64 206E 6F74 2075 6E64 6572 7374 6F6F" /* nd not understoo */ + $"640D 0A0A 3230 3020 4F6B 6179 0D0A 1432" /* d.200 Okay..2 */ + $"3330 2055 7365 7220 6C6F 6767 6564 2069" /* 30 User logged i */ + $"6E0D 0A14 3535 3020 4669 6C65 206E 6F74" /* n..550 File not */ + $"2066 6F75 6E64 0D0A 2B35 3031 2044 6972" /* found.+501 Dir */ + $"6563 746F 7279 206E 6F74 2070 7265 7365" /* ectory not prese */ + $"6E74 206F 7220 7379 6E74 6178 2065 7272" /* nt or syntax err */ + $"6F72 0D0A 1032 3530 2043 6864 6972 206F" /* or..250 Chdir o */ + $"6B61 790D 0A05 3235 3720 221C 2220 6973" /* kay..257 "." is */ + $"2074 6865 2063 7572 7265 6E74 2064 6972" /* the current dir */ + $"6563 746F 7279 0D0A 1435 3031 2046 696C" /* ectory..501 Fil */ + $"6520 6E6F 7420 666F 756E 640D 0A2D 3530" /* e not found.-50 */ + $"3420 5061 7261 6D65 7465 7220 6E6F 7420" /* 4 Parameter not */ + $"6163 6365 7074 6564 2C20 6E6F 7420 696D" /* accepted, not im */ + $"706C 656D 656E 7465 640D 0A1C 3230 3020" /* plemented..200 */ + $"5374 7275 2046 2C20 6669 6C65 2073 7472" /* Stru F, file str */ + $"7563 7475 7265 0D0A 1932 3030 204D 6F64" /* ucture..200 Mod */ + $"6520 532C 2073 7472 6561 6D20 6D6F 6465" /* e S, stream mode */ + $"0D0A 3732 3032 2041 6C6C 6F63 6174 6520" /* .7202 Allocate */ + $"616E 6420 4163 636F 756E 7420 6E6F 7420" /* and Account not */ + $"7265 7175 6972 6564 2066 6F72 2074 6869" /* required for thi */ + $"7320 7365 7276 6572 0D0A 3535 3031 2043" /* s server.5501 C */ + $"616E 6E6F 7420 6F70 656E 2066 696C 6520" /* annot open file */ + $"746F 2077 7269 7465 2C20 6368 6563 6B20" /* to write, check */ + $"666F 7220 7661 6C69 6420 6E61 6D65 0D0A" /* for valid name. */ + $"2B35 3330 2055 5345 5220 616E 6420 5041" /* +530 USER and PA */ + $"5353 2072 6571 7569 7265 6420 746F 2061" /* SS required to a */ + $"6374 6976 6174 6520 6D65 0D0A 1733 3331" /* ctivate me..331 */ + $"2050 6173 7377 6F72 6420 7265 7175 6972" /* Password requir */ + $"6564 0D0A 1235 3330 204C 6F67 696E 2066" /* ed..530 Login f */ + $"6169 6C65 640D 0A1C 3230 3020 4D61 6342" /* ailed..200 MacB */ + $"696E 6172 7920 4D6F 6465 2065 6E61 626C" /* inary Mode enabl */ + $"6564 0D0A 1D32 3030 204D 6163 4269 6E61" /* ed..200 MacBina */ + $"7279 204D 6F64 6520 6469 7361 626C 6564" /* ry Mode disabled */ + $"0D0A 2A35 3532 2044 6973 6B20 7772 6974" /* .*552 Disk writ */ + $"6520 6572 726F 722C 2070 726F 6261 626C" /* e error, probabl */ + $"7920 6469 736B 2066 756C 6C0D 0A31 3231" /* y disk full.121 */ + $"342D 4E43 5341 2054 656C 6E65 7420 4654" /* 4-NCSA Telnet FT */ + $"5020 7365 7276 6572 2C20 7375 7070 6F72" /* P server, suppor */ + $"7465 6420 636F 6D6D 616E 6473 3A0D 0A45" /* ted commands:.E */ + $"2020 2020 5553 4552 2020 504F 5254 2020" /* USER PORT */ + $"5245 5452 2020 414C 4C4F 2020 5041 5353" /* RETR ALLO PASS */ + $"2020 5354 4F52 2020 4357 4420 2058 4357" /* STOR CWD XCW */ + $"4420 2058 5057 4420 204C 4953 5420 204E" /* D XPWD LIST N */ + $"4C53 540D 0A3A 2020 2020 4845 4C50 2020" /* LST.: HELP */ + $"5155 4954 2020 4D4F 4445 2020 5459 5045" /* QUIT MODE TYPE */ + $"2020 5354 5255 2020 4143 4354 2020 4E4F" /* STRU ACCT NO */ + $"4F50 2020 4150 5045 2020 4D41 4342 0D0A" /* OP APPE MACB. */ + $"3420 2020 204D 4143 4220 6973 204D 6163" /* 4 MACB is Mac */ + $"4269 6E61 7279 2061 6E64 206D 7573 7420" /* Binary and must */ + $"6265 2064 6F6E 6520 7769 7468 2054 5950" /* be done with TYP */ + $"4520 490D 0A36 3231 3420 4469 7265 6374" /* E I.6214 Direct */ + $"2063 6F6D 6D65 6E74 7320 616E 6420 6275" /* comments and bu */ + $"6773 2074 6F20 7262 7261 756E 4067 656F" /* gs to rbraun@geo */ + $"6369 7469 6573 2E63 6F6D 0D0A 3D32 3030" /* cities.com.=200 */ + $"2054 7970 6520 7365 7420 746F 2049 2C20" /* Type set to I, */ + $"6269 6E61 7279 2074 7261 6E73 6665 7220" /* binary transfer */ + $"6D6F 6465 205B 4D41 4342 494E 4152 5920" /* mode [MACBINARY */ + $"454E 4142 4C45 445D 0D0A 3E32 3030 2054" /* ENABLED].>200 T */ + $"7970 6520 7365 7420 746F 2049 2C20 6269" /* ype set to I, bi */ + $"6E61 7279 2074 7261 6E73 6665 7220 6D6F" /* nary transfer mo */ + $"6465 205B 6D61 6362 696E 6172 7920 6469" /* de [macbinary di */ + $"7361 626C 6564 5D0D 0A32 3530 3520 4150" /* sabled].2505 AP */ + $"5045 4E44 206F 6E6C 7920 7375 7070 6F72" /* PEND only suppor */ + $"7465 6420 696E 2041 5343 4949 2074 7261" /* ted in ASCII tra */ + $"6E73 6665 7220 6D6F 6465 0D0A" /* nsfer mode. */ +}; + +data 'STR#' (23228, "ftp cmds", purgeable) { + $"0033 013F 0121 0461 6363 7405 6173 6369" /* .3.?.!.acct.asci */ + $"6904 6265 6C6C 0462 6765 7406 6269 6E61" /* i.bell.bget.bina */ + $"7279 0462 7075 7403 6279 6502 6364 0563" /* ry.bput.bye.cd.c */ + $"6C6F 7365 0664 656C 6574 6505 6465 6275" /* lose.delete.debu */ + $"6703 6469 7203 6765 7404 676C 6F62 0468" /* g.dir.get.glob.h */ + $"6173 6804 6865 6C70 0B69 6E74 6572 6163" /* ash.help.interac */ + $"7469 7665 036C 6364 046C 6469 7203 6C6C" /* tive.lcd.ldir.ll */ + $"7302 6C73 046D 6163 6207 6D64 656C 6574" /* s.ls.macb.mdelet */ + $"6504 6D64 6972 046D 6765 7405 6D6B 6469" /* e.mdir.mget.mkdi */ + $"7203 6D6C 7304 6D6F 6465 046D 7075 740E" /* r.mls.mode.mput. */ + $"6E6F 6E69 6E74 6572 6163 7469 7665 046F" /* noninteractive.o */ + $"7065 6E06 7072 6F6D 7074 0370 7574 0370" /* pen.prompt.put.p */ + $"7764 0471 7569 7405 7175 6F74 6504 7265" /* wd.quit.quote.re */ + $"6376 0A72 656D 6F74 6568 656C 7006 7265" /* cvremotehelp.re */ + $"6E61 6D65 0272 6D05 726D 6469 7204 7365" /* name.rm.rmdir.se */ + $"6E64 0873 656E 6470 6F72 7409 736C 6173" /* nd.sendportslas */ + $"6866 6C69 7006 7374 6174 7573 0673 7472" /* hflip.status.str */ + $"7563 7404 7479 7065 0475 7365 7207 7665" /* uct.type.user.ve */ + $"7262 6F73 65" /* rbose */ +}; + +data 'STR#' (23229, "Help", purgeable) { + $"0033 1F3F 0909 7072 696E 7420 6C6F 6361" /* .3.?print loca */ + $"6C20 6865 6C70 2069 6E66 6F72 6D61 7469" /* l help informati */ + $"6F6E 1621 0909 6573 6361 7065 2074 6F20" /* on.!escape to */ + $"7468 6520 7368 656C 6C1A 6163 6374 2020" /* the shell.acct */ + $"2020 2020 2073 7065 6369 6679 2061 6363" /* specify acc */ + $"6F75 6E74 2261 7363 6969 2020 2020 2009" /* ount"ascii */ + $"7365 7420 6173 6369 6920 7472 616E 7366" /* set ascii transf */ + $"6572 2074 7970 652F 6265 6C6C 2020 2020" /* er type/bell */ + $"2020 0962 6565 7020 7768 656E 2063 6F6D" /* beep when com */ + $"6D61 6E64 2063 6F6D 706C 6574 6564 202D" /* mand completed - */ + $"2074 6F67 676C 651F 6267 6574 0909 6765" /* toggle.bgetge */ + $"7420 6120 6669 6C65 2069 6E20 6269 6E61" /* t a file in bina */ + $"7279 206D 6F64 6523 6269 6E61 7279 2020" /* ry mode#binary */ + $"2020 0973 6574 2062 696E 6172 7920 7472" /* set binary tr */ + $"616E 7366 6572 2074 7970 651F 6270 7574" /* ansfer type.bput */ + $"0909 7075 7420 6120 6669 6C65 2069 6E20" /* put a file in */ + $"6269 6E61 7279 206D 6F64 6529 6279 6520" /* binary mode)bye */ + $"2020 2020 2020 0974 6572 6D69 6E61 7465" /* terminate */ + $"2066 7470 2073 6573 7369 6F6E 2061 6E64" /* ftp session and */ + $"2065 7869 742A 6364 2020 2020 2020 2020" /* exit*cd */ + $"0963 6861 6E67 6520 7265 6D6F 7465 2077" /* change remote w */ + $"6F72 6B69 6E67 2064 6972 6563 746F 7279" /* orking directory */ + $"2063 6C6F 7365 2020 2020 2009 7465 726D" /* close term */ + $"696E 6174 6520 6674 7020 7365 7373 696F" /* inate ftp sessio */ + $"6E3B 6465 6C65 7465 2020 2020 0964 656C" /* n;delete del */ + $"6574 6520 7265 6D6F 7465 2066 696C 6520" /* ete remote file */ + $"2D20 696E 7175 6972 6573 2069 6620 7072" /* - inquires if pr */ + $"6F6D 7074 696E 6720 6973 206F 6E24 6465" /* ompting is on$de */ + $"6275 6720 2020 2020 0974 6F67 676C 652F" /* bug toggle/ */ + $"7365 7420 6465 6275 6767 696E 6720 6D6F" /* set debugging mo */ + $"6465 2C64 6972 2020 2020 2020 2009 6C69" /* de,dir li */ + $"7374 2063 6F6E 7465 6E74 7320 6F66 2072" /* st contents of r */ + $"656D 6F74 6520 6469 7265 6374 6F72 7917" /* emote directory. */ + $"6765 7420 2020 2020 2020 0972 6563 6569" /* get recei */ + $"7665 2066 696C 653D 676C 6F62 2020 2020" /* ve file=glob */ + $"2020 0974 6F67 676C 6520 6D65 7461 6368" /* toggle metach */ + $"6172 6163 7465 7220 6578 7061 6E73 696F" /* aracter expansio */ + $"6E20 6F66 206C 6F63 616C 2066 696C 6520" /* n of local file */ + $"6E61 6D65 733A 6861 7368 2020 2020 2020" /* names:hash */ + $"0974 6F67 676C 6520 7072 696E 7469 6E67" /* toggle printing */ + $"2060 2327 2066 6F72 2065 6163 6820 6275" /* `#' for each bu */ + $"6666 6572 2074 7261 6E73 6665 7272 6564" /* ffer transferred */ + $"2768 656C 7020 2020 2020 2009 7072 696E" /* 'help prin */ + $"7420 6C6F 6361 6C20 6865 6C70 2069 6E66" /* t local help inf */ + $"6F72 6D61 7469 6F6E 3669 6E74 6572 6163" /* ormation6interac */ + $"7469 7665 2020 2020 7475 726E 206F 6E20" /* tive turn on */ + $"7072 6F6D 7074 696E 6720 666F 7220 6D75" /* prompting for mu */ + $"6C74 6970 6C65 2063 6F6D 6D61 6E64 7329" /* ltiple commands) */ + $"6C63 6420 2020 2020 2020 0963 6861 6E67" /* lcd chang */ + $"6520 6C6F 6361 6C20 776F 726B 696E 6720" /* e local working */ + $"6469 7265 6374 6F72 7926 6C64 6972 0909" /* directory&ldir */ + $"6C69 7374 2063 6F6E 7465 6E74 7320 6F66" /* list contents of */ + $"206C 6F63 616C 2064 6972 6563 746F 7279" /* local directory */ + $"256C 6C73 0909 6C69 7374 2063 6F6E 7465" /* %llslist conte */ + $"6E74 7320 6F66 206C 6F63 616C 2064 6972" /* nts of local dir */ + $"6563 746F 7279 2D6C 7320 2020 2020 2020" /* ectory-ls */ + $"2009 6E6C 6973 7420 636F 6E74 656E 7473" /* nlist contents */ + $"206F 6620 7265 6D6F 7465 2064 6972 6563" /* of remote direc */ + $"746F 7279 236D 6163 6209 0965 6E61 626C" /* tory#macbenabl */ + $"652F 6469 7361 626C 6520 6D61 6362 696E" /* e/disable macbin */ + $"6172 7920 6D6F 6465 206D 6465 6C65 7465" /* ary mode mdelete */ + $"2020 2009 6465 6C65 7465 206D 756C 7469" /* delete multi */ + $"706C 6520 6669 6C65 7337 6D64 6972 2020" /* ple files7mdir */ + $"2020 2020 096C 6973 7420 636F 6E74 656E" /* list conten */ + $"7473 206F 6620 6D75 6C74 6970 6C65 2072" /* ts of multiple r */ + $"656D 6F74 6520 6469 7265 6374 6F72 6965" /* emote directorie */ + $"731D 6D67 6574 2020 2020 2020 0967 6574" /* s.mget get */ + $"206D 756C 7469 706C 6520 6669 6C65 732F" /* multiple files/ */ + $"6D6B 6469 7220 2020 2020 096D 616B 6520" /* mkdir make */ + $"6469 7265 6374 6F72 7920 6F6E 2074 6865" /* directory on the */ + $"2072 656D 6F74 6520 6D61 6368 696E 6538" /* remote machine8 */ + $"6D6C 7320 2020 2020 2020 096E 6C69 7374" /* mls nlist */ + $"2063 6F6E 7465 6E74 7320 6F66 206D 756C" /* contents of mul */ + $"7469 706C 6520 7265 6D6F 7465 2064 6972" /* tiple remote dir */ + $"6563 746F 7269 6573 216D 6F64 6520 2020" /* ectories!mode */ + $"2020 2009 7365 7420 6669 6C65 2074 7261" /* set file tra */ + $"6E73 6665 7220 6D6F 6465 1E6D 7075 7420" /* nsfer mode.mput */ + $"2020 2020 2009 7365 6E64 206D 756C 7469" /* send multi */ + $"706C 6520 6669 6C65 7336 6E6F 6E69 6E74" /* ple files6nonint */ + $"6572 6163 7469 7665 2074 7572 6E20 6F66" /* eractive turn of */ + $"6620 7072 6F6D 7074 696E 6720 6F6E 206D" /* f prompting on m */ + $"756C 7469 706C 6520 636F 6D6D 616E 6473" /* ultiple commands */ + $"216F 7065 6E20 2020 2020 2009 636F 6E6E" /* !open conn */ + $"6563 7420 746F 2072 656D 6F74 6520 7466" /* ect to remote tf */ + $"7470 3C70 726F 6D70 7420 2020 2009 746F" /* tp<prompt to */ + $"6767 6C65 2069 6E74 6572 6163 7469 7665" /* ggle interactive */ + $"2070 726F 6D70 7469 6E67 206F 6E20 6D75" /* prompting on mu */ + $"6C74 6970 6C65 2063 6F6D 6D61 6E64 7318" /* ltiple commands. */ + $"7075 7420 2020 2020 2020 0973 656E 6420" /* put send */ + $"6F6E 6520 6669 6C65 3470 7764 2020 2020" /* one file4pwd */ + $"2020 2009 7072 696E 7420 776F 726B 696E" /* print workin */ + $"6720 6469 7265 6374 6F72 7920 6F6E 2072" /* g directory on r */ + $"656D 6F74 6520 6D61 6368 696E 6529 7175" /* emote machine)qu */ + $"6974 2020 2020 2020 0974 6572 6D69 6E61" /* it termina */ + $"7465 2066 7470 2073 6573 7369 6F6E 2061" /* te ftp session a */ + $"6E64 2065 7869 7425 7175 6F74 6520 2020" /* nd exit%quote */ + $"2020 0973 656E 6420 6172 6269 7472 6172" /* send arbitrar */ + $"7920 6674 7020 636F 6D6D 616E 6417 7265" /* y ftp command.re */ + $"6376 2020 2020 2020 0972 6563 6569 7665" /* cv receive */ + $"2066 696C 6526 7265 6D6F 7465 6865 6C70" /* file&remotehelp */ + $"0967 6574 2068 656C 7020 6672 6F6D 2072" /* get help from r */ + $"656D 6F74 6520 7365 7276 6572 1672 656E" /* emote server.ren */ + $"616D 6520 2020 2009 7265 6E61 6D65 2066" /* ame rename f */ + $"696C 650F 726D 0909 7265 6D6F 7665 2066" /* ile.rmremove f */ + $"696C 6531 726D 6469 7220 2020 2020 0972" /* ile1rmdir r */ + $"656D 6F76 6520 6469 7265 6374 6F72 7920" /* emove directory */ + $"6F6E 2074 6865 2072 656D 6F74 6520 6D61" /* on the remote ma */ + $"6368 696E 6518 7365 6E64 2020 2020 2020" /* chine.send */ + $"0973 656E 6420 6F6E 6520 6669 6C65 3A73" /* send one file:s */ + $"656E 6470 6F72 7420 2009 746F 6767 6C65" /* endport toggle */ + $"2075 7365 206F 6620 504F 5254 2063 6D64" /* use of PORT cmd */ + $"2066 6F72 2065 6163 6820 6461 7461 2063" /* for each data c */ + $"6F6E 6E65 6374 696F 6E35 736C 6173 6866" /* onnection5slashf */ + $"6C69 7009 746F 6767 6C65 2063 6861 6E67" /* liptoggle chang */ + $"696E 6720 2F20 746F 205C 206F 6E20 6F75" /* ing / to \ on ou */ + $"7467 6F69 6E67 2063 6F6D 6D61 6E64 731E" /* tgoing commands. */ + $"7374 6174 7573 2020 2020 0973 686F 7720" /* status show */ + $"6375 7272 656E 7420 7374 6174 7573 2673" /* current status&s */ + $"7472 7563 7420 2020 2009 7365 7420 6669" /* truct set fi */ + $"6C65 2074 7261 6E73 6665 7220 7374 7275" /* le transfer stru */ + $"6374 7572 6521 7479 7065 2020 2020 2020" /* cture!type */ + $"0973 6574 2066 696C 6520 7472 616E 7366" /* set file transf */ + $"6572 2074 7970 6524 7573 6572 2020 2020" /* er type$user */ + $"2020 0973 656E 6420 6E65 7720 7573 6572" /* send new user */ + $"2069 6E66 6F72 6D61 7469 6F6E 1E76 6572" /* information.ver */ + $"626F 7365 2020 2009 746F 6767 6C65 2076" /* bose toggle v */ + $"6572 626F 7365 206D 6F64 65" /* erbose mode */ +}; + +data 'STR#' (23240, "Affirmatives", purgeable) { + $"000D 0379 6573 0179 026F 6E06 6163 7469" /* ...yes.y.on.acti */ + $"7665 0474 7275 6505 616C 6976 6503 7975" /* ve.true.alive.yu */ + $"7003 7965 7006 7965 7373 6972 0B61 6666" /* p.yep.yessir.aff */ + $"6972 6D61 7469 7665 026A 6104 776F 7264" /* irmative.ja.word */ + $"00" /* . */ +}; + +data 'STR#' (23250, "NetErrors", purgeable) { + $"0011 1220 2020 3020 4572 726F 7220 756E" /* ... 0 Error un */ + $"6B6E 6F77 6E1D 2031 3038 2045 7272 6F72" /* known. 108 Error */ + $"2063 6C6F 7369 6E67 206E 6574 206F 6E20" /* closing net on */ + $"6674 7029 2035 3034 204C 6F63 616C 2068" /* ftp) 504 Local h */ + $"6F73 7420 6F72 2067 6174 6577 6179 206E" /* ost or gateway n */ + $"6F74 2072 6573 706F 6E64 696E 672A 2035" /* ot responding* 5 */ + $"3038 2046 6174 616C 2045 7272 6F72 3A20" /* 08 Fatal Error: */ + $"6361 6E74 2061 6C6C 6F63 6174 6520 5443" /* cant allocate TC */ + $"5020 6275 6666 6572 2820 3530 3920 5443" /* P buffer( 509 TC */ + $"5020 4572 726F 723A 2066 6169 6C65 6420" /* P Error: failed */ + $"746F 2067 6574 2054 4350 2073 7461 7475" /* to get TCP statu */ + $"733C 2035 3130 2054 4350 2045 7272 6F72" /* s< 510 TCP Error */ + $"3A20 6461 7461 2066 6169 6C65 6420 746F" /* : data failed to */ + $"2062 6520 6164 6465 6420 746F 2051 2028" /* be added to Q ( */ + $"5443 5020 4E65 7420 5772 6974 6529 3120" /* TCP Net Write)1 */ + $"3531 3120 5443 5020 4572 726F 723A 2066" /* 511 TCP Error: f */ + $"6169 6C65 6420 746F 2067 6574 2049 5020" /* ailed to get IP */ + $"6164 6472 6573 7320 284D 6163 5443 5029" /* address (MacTCP) */ + $"2C20 3531 3220 5443 5020 4572 726F 723A" /* , 512 TCP Error: */ + $"2043 6F75 6C64 6E27 7420 6D61 6B65 206E" /* Couldn't make n */ + $"6577 2054 4350 2073 7472 6561 6D3F 2035" /* ew TCP stream? 5 */ + $"3133 2054 4350 2045 7272 6F72 3A20 636F" /* 13 TCP Error: co */ + $"756C 646E 2774 206C 6973 7465 6E20 666F" /* uldn't listen fo */ + $"7220 6E65 7720 5443 5020 636F 6E6E 6563" /* r new TCP connec */ + $"7469 6F6E 2028 4D61 6354 4350 2927 2035" /* tion (MacTCP)' 5 */ + $"3134 2054 4350 2045 7272 6F72 3A20 5443" /* 14 TCP Error: TC */ + $"5020 7374 6174 7573 2066 6169 6C65 6420" /* P status failed */ + $"2866 7470 2940 2035 3135 2054 4350 2045" /* (ftp)@ 515 TCP E */ + $"7272 6F72 3A20 6F70 656E 2063 616C 6C20" /* rror: open call */ + $"6661 696C 6564 2E20 4361 6E27 7420 6F70" /* failed. Can't op */ + $"656E 2054 4350 2073 6F63 6B65 7420 284D" /* en TCP socket (M */ + $"6163 5443 5029 4220 3531 3620 5443 5020" /* acTCP)B 516 TCP */ + $"4572 726F 723A 2069 6E76 616C 6964 2073" /* Error: invalid s */ + $"7472 6561 6D20 706F 696E 7465 722E 2020" /* tream pointer. */ + $"5443 5020 636C 6F73 6520 6661 696C 6564" /* TCP close failed */ + $"2028 4D61 6354 4350 2929 2035 3137 2054" /* (MacTCP)) 517 T */ + $"4350 2045 7272 6F72 3A20 5443 5020 636C" /* CP Error: TCP cl */ + $"6F73 6520 6661 696C 6564 2028 4D61 6354" /* ose failed (MacT */ + $"4350 292B 2035 3138 2054 4350 2045 7272" /* CP)+ 518 TCP Err */ + $"6F72 3A20 5443 5020 7265 6C65 6173 6520" /* or: TCP release */ + $"6661 696C 6564 2028 4D61 6354 4350 2929" /* failed (MacTCP)) */ + $"2035 3139 2054 4350 2045 7272 6F72 3A20" /* 519 TCP Error: */ + $"5443 5020 6162 6F72 7420 6661 696C 6564" /* TCP abort failed */ + $"2028 4D61 6354 4350 291E 2035 3234 2054" /* (MacTCP). 524 T */ + $"4350 2045 7272 6F72 3A20 5443 5020 5263" /* CP Error: TCP Rc */ + $"7620 6661 696C 6564 2420 3830 3720 486F" /* v failed$ 807 Ho */ + $"7374 206F 7220 6761 7465 7761 7920 6E6F" /* st or gateway no */ + $"7420 7265 7370 6F6E 6469 6E67 3A" /* t responding: */ +}; + +data 'STR#' (23251, "Memory Errors", purgeable) { + $"0007 1220 2020 3020 4572 726F 7220 756E" /* ... 0 Error un */ + $"6B6E 6F77 6E2B 2031 3032 204E 6F20 7370" /* known+ 102 No sp */ + $"6163 6520 666F 7220 6D61 6372 6F20 7374" /* ace for macro st */ + $"6F72 6167 6520 4661 7461 6C20 6572 726F" /* orage Fatal erro */ + $"7229 2031 3033 2049 6E73 7566 6669 6369" /* r) 103 Insuffici */ + $"656E 7420 6D65 6D6F 7279 2066 6F72 2054" /* ent memory for T */ + $"454B 2067 7261 7068 6963 731F 2031 3034" /* EK graphics. 104 */ + $"2049 6E73 7566 6669 6369 656E 7420 6D65" /* Insufficient me */ + $"6D6F 7279 2066 6F72 2056 531D 2031 3037" /* mory for VS. 107 */ + $"204E 6F20 7370 6163 6520 666F 7220 7365" /* No space for se */ + $"7420 746F 206C 6F61 643A 2031 3038 2052" /* t to load: 108 R */ + $"6173 7465 7220 7769 6E64 6F77 2063 7265" /* aster window cre */ + $"6174 6520 6572 726F 722E 204E 6F74 2065" /* ate error. Not e */ + $"6E6F 7567 6820 6D65 6D6F 7279 2074 6F20" /* nough memory to */ + $"6F70 656E 2620 3131 3420 4654 5020 7365" /* open& 114 FTP se */ + $"7276 6572 206F 7574 206F 6620 6D65 6D6F" /* rver out of memo */ + $"7279 2070 726F 626C 656D 2E" /* ry problem. */ +}; + +data 'STR#' (23253, "Resource Errors", purgeable) { + $"0007 1220 2020 3020 4572 726F 7220 756E" /* ... 0 Error un */ + $"6B6E 6F77 6E40 2031 3036 2043 6F75 6C64" /* known@ 106 Could */ + $"6E74 2067 6574 2074 7261 6E73 6C61 7469" /* nt get translati */ + $"6F6E 2072 6573 6F75 7263 6520 666F 7220" /* on resource for */ + $"6E61 7469 6F6E 616C 2063 6861 7261 6374" /* national charact */ + $"6572 2073 6574 2620 3130 3720 5472 616E" /* er set& 107 Tran */ + $"736C 6174 696F 6E20 7265 736F 7572 6365" /* slation resource */ + $"2069 7320 636F 7272 7570 7465 641C 2032" /* is corrupted. 2 */ + $"3030 2045 7272 6F72 2064 656C 6574 696E" /* 00 Error deletin */ + $"6720 6F6C 6420 6669 6C65 1520 3230 3120" /* g old file. 201 */ + $"4572 726F 7220 696E 2053 6677 7269 7465" /* Error in Sfwrite */ + $"1420 3230 3220 4469 736B 2046 756C 6C20" /* . 202 Disk Full */ + $"4572 726F 722C 2033 3032 2043 6F75 6C64" /* Error, 302 Could */ + $"6E74 206F 7065 6E20 7769 6E64 6F77 2066" /* nt open window f */ + $"6F72 2072 6173 7465 7220 6772 6170 6869" /* or raster graphi */ + $"6373" /* cs */ +}; + +data 'STR#' (7002, "FTP Server Prefs Strings", purgeable) { + $"000B 022D 3100 0003 4F66 6617 4F6E 2C20" /* ...-1...Off.On, */ + $"4E6F 2070 6173 7377 6F72 6473 206E 6565" /* No passwords nee */ + $"6465 6420 4F6E 2C20 5573 6572 6E61 6D65" /* ded On, Username */ + $"2026 2050 6173 7377 6F72 6420 7265 7175" /* & Password requ */ + $"6972 6564 1753 686F 7720 4654 5020 6C6F" /* ired.Show FTP lo */ + $"6720 6174 2073 7461 7274 7570 234C 6F6F" /* g at startup#Loo */ + $"6B75 7020 444E 5320 6E61 6D65 206F 6620" /* kup DNS name of */ + $"636F 6E6E 6563 7469 6E67 2068 6F73 7473" /* connecting hosts */ + $"1055 7365 204D 6163 6269 6E61 7279 2049" /* .Use Macbinary I */ + $"4923 5265 7365 7420 4D61 6362 696E 6172" /* I#Reset Macbinar */ + $"7920 6166 7465 7220 6561 6368 2074 7261" /* y after each tra */ + $"6E73 6665 7213 5573 6520 4953 4F20 5472" /* nsfer.Use ISO Tr */ + $"616E 736C 6174 696F 6E" /* anslation */ +}; + +data 'STR#' (7005, "FTP User Config Strings", purgeable) { + $"0004 022D 3100 001B 5573 6572 2063 616E" /* ...-1...User can */ + $"2063 6861 6E67 6520 6469 7265 6374 6F72" /* change director */ + $"6965 73" /* ies */ +}; + +data 'STR#' (7004, "Session Config Strings", purgeable) { + $"0036 022D 3100 0007 496E 6869 6269 7404" /* .6.-1...Inhibit. */ + $"3430 3134 0434 3130 3505 5175 6963 6B05" /* 4014.4105.Quick. */ + $"426C 6F63 6B06 4465 6C65 7465 0942 6163" /* Block.DeleteBac */ + $"6B73 7061 6365 0946 6F72 6365 7361 7665" /* kspaceForcesave */ + $"1442 6572 6B65 6C65 7920 342E 3320 4352" /* .Berkeley 4.3 CR */ + $"206D 6F64 650E 416C 6C6F 7720 6C69 6E65" /* mode.Allow line */ + $"6D6F 6465 1654 454B 2070 6167 6520 636C" /* mode.TEK page cl */ + $"6561 7273 2073 6372 6565 6E0B 4861 6C66" /* ears screen.Half */ + $"2064 7570 6C65 7817 4B65 7262 6572 6F73" /* duplex.Kerberos */ + $"2061 7574 6865 6E74 6963 6174 696F 6E13" /* authentication. */ + $"4B65 7262 6572 6F73 2065 6E63 7279 7074" /* Kerberos encrypt */ + $"696F 6E0A 4C6F 6361 6C20 4563 686F 0000" /* ionLocal Echo.. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 162E 2E2E 6576 656E 206F" /* ..........even o */ + $"6E20 6E6F 6E2D 706F 7274 2D32 330C 4967" /* n non-port-23.Ig */ + $"6E6F 7265 2062 6565 7073 1149 676E 6F72" /* nore beeps.Ignor */ + $"6520 466F 726D 2046 6565 6473 0000 2241" /* e Form Feeds.."A */ + $"7574 6F6D 6174 6963 204F 5450 2028 4F6E" /* utomatic OTP (On */ + $"652D 5469 6D65 2050 6173 7377 6F72 6473" /* e-Time Passwords */ + $"291D 2E2E 2E6D 6F72 6520 7468 616E 206F" /* )....more than o */ + $"6E63 6520 7065 7220 7365 7373 696F 6E24" /* nce per session$ */ + $"2E2E 2E75 7365 2068 6578 6164 6563 696D" /* ...use hexadecim */ + $"616C 2074 6F20 7365 6E64 2074 6F20 7365" /* al to send to se */ + $"7276 6572 1E2E 2E2E 646F 6E27 7420 7072" /* rver....don't pr */ + $"6F6D 7074 2069 6620 756E 6E65 6365 7373" /* ompt if unnecess */ + $"6172 7900 0024 5265 6D65 6D62 6572 204F" /* ary..$Remember O */ + $"5450 2070 6173 7377 6F72 6420 7769 7468" /* TP password with */ + $"696E 2073 6573 7369 6F6E" /* in session */ +}; + +data 'STR#' (2000, "Misc. messages", purgeable) { + $"000D 5454 6865 2070 7265 6665 7265 6E63" /* ..TThe preferenc */ + $"6573 2066 696C 6520 6170 7065 6172 7320" /* es file appears */ + $"746F 2062 6520 636F 7272 7570 7465 642E" /* to be corrupted. */ + $"2020 4920 6361 6E20 6174 7465 6D70 7420" /* I can attempt */ + $"746F 2063 6F72 7265 6374 2074 6865 2070" /* to correct the p */ + $"726F 626C 656D 2E6F 4120 7669 7461 6C20" /* roblem.oA vital */ + $"7265 736F 7572 6365 2061 7070 6561 7273" /* resource appears */ + $"2074 6F20 6265 206D 6973 7369 6E67 206F" /* to be missing o */ + $"7220 6973 2063 6F72 7275 7074 6564 2E20" /* r is corrupted. */ + $"2050 6C65 6173 6520 7265 706C 6163 6520" /* Please replace */ + $"7468 6520 5465 6C6E 6574 2061 7070 6C69" /* the Telnet appli */ + $"6361 7469 6F6E 2077 6974 6820 6120 6E65" /* cation with a ne */ + $"7720 636F 7079 2E56 556E 6162 6C65 2074" /* w copy.VUnable t */ + $"6F20 7265 7061 6972 2074 6865 2070 7265" /* o repair the pre */ + $"6665 7265 6E63 6573 2066 696C 652E 2020" /* ferences file. */ + $"596F 7520 6D75 7374 2071 7569 7420 616E" /* You must quit an */ + $"6420 6465 6C65 7465 2074 6865 2070 7265" /* d delete the pre */ + $"6665 7265 6E63 6573 2066 696C 652E 9A54" /* ferences file.T */ + $"6865 2070 7265 6665 7265 6E63 6573 206F" /* he preferences o */ + $"6E20 6469 736B 2061 7265 2061 206E 6577" /* n disk are a new */ + $"6572 2076 6572 7369 6F6E 2074 6861 6E20" /* er version than */ + $"4920 6361 6E20 6861 6E64 6C65 2E20 2053" /* I can handle. S */ + $"686F 756C 6420 4920 7374 696C 6C20 7361" /* hould I still sa */ + $"7665 2074 6865 2063 7572 7265 6E74 2070" /* ve the current p */ + $"7265 6665 7265 6E63 6573 2C20 6F76 6572" /* references, over */ + $"7772 6974 696E 6720 7468 6F73 6520 4920" /* writing those I */ + $"646F 6E27 7420 6B6E 6F77 2068 6F77 2074" /* don't know how t */ + $"6F20 6861 6E64 6C65 3F3D 416E 2065 7272" /* o handle?=An err */ + $"6F72 206F 6363 7572 7265 6420 7768 696C" /* or occurred whil */ + $"6520 6174 7465 6D70 7469 6E67 2074 6F20" /* e attempting to */ + $"6F70 656E 2074 6865 204D 6163 5443 5020" /* open the MacTCP */ + $"6472 6976 6572 2E6D 5468 6572 6520 6172" /* driver.mThere ar */ + $"6520 636F 6E6E 6563 7469 6F6E 7320 7374" /* e connections st */ + $"696C 6C20 6163 7469 7665 206F 7220 6F70" /* ill active or op */ + $"656E 696E 672E 2020 5175 6974 7469 6E67" /* ening. Quitting */ + $"206E 6F77 2077 696C 6C20 6162 6F72 7420" /* now will abort */ + $"7468 656D 2E20 2044 6F20 796F 7520 7265" /* them. Do you re */ + $"616C 6C79 2077 6973 6820 746F 2064 6F20" /* ally wish to do */ + $"7468 6973 3F24 556E 6162 6C65 2074 6F20" /* this?$Unable to */ + $"6372 6561 7465 2061 2050 7265 6665 7265" /* create a Prefere */ + $"6E63 6573 2046 696C 652E 1454 656C 6E65" /* nces File..Telne */ + $"7420 7265 7175 6972 6573 2048 4653 2E22" /* t requires HFS." */ + $"5072 6F62 6C65 6D20 7769 7468 2074 6865" /* Problem with the */ + $"2053 7973 456E 7669 726F 6E73 2063 6F64" /* SysEnvirons cod */ + $"652E 2C54 656C 6E65 7420 7265 7175 6972" /* e.,Telnet requir */ + $"6573 2061 7420 6C65 6173 7420 5379 7374" /* es at least Syst */ + $"656D 2076 6572 7369 6F6E 2036 2E30 2E23" /* em version 6.0.# */ + $"5465 6C6E 6574 2072 6571 7569 7265 7320" /* Telnet requires */ + $"6174 206C 6561 7374 2031 3238 6B20 524F" /* at least 128k RO */ + $"4D53 2E2B 4661 7461 6C20 6572 726F 7220" /* MS.+Fatal error */ + $"696E 7374 616C 6C69 6E67 2041 7070 6C65" /* installing Apple */ + $"4576 656E 7420 6861 6E64 6C65 7273 2E52" /* Event handlers.R */ + $"5468 6572 6520 6172 6520 636F 6E6E 6563" /* There are connec */ + $"7469 6F6E 7320 7374 696C 6C20 6163 7469" /* tions still acti */ + $"7665 2E20 2044 6F20 796F 7520 7265 616C" /* ve. Do you real */ + $"6C79 2077 616E 7420 746F 2063 6C6F 7365" /* ly want to close */ + $"2061 6C6C 2074 6865 2077 696E 646F 7773" /* all the windows */ + $"3F0D" /* ?. */ +}; + +data 'STR#' (7003, "Terminal Config Strings", purgeable) { + $"001A 0232 3214 414E 5349 2063 6F6C 6F72" /* ...22.ANSI color */ + $"2073 6571 7565 6E63 6573 0F58 7465 726D" /* sequences.Xterm */ + $"2073 6571 7565 6E63 6573 1055 7365 2056" /* sequences.Use V */ + $"5420 7772 6170 206D 6F64 6508 4E4F 5420" /* T wrap mode.NOT */ + $"5553 4544 1045 4D41 4353 2061 7272 6F77" /* USED.EMACS arrow */ + $"206B 6579 730E 4D61 7020 5067 5570 2C20" /* keys.Map PgUp, */ + $"6574 632E 1545 6967 6874 2062 6974 2063" /* etc..Eight bit c */ + $"6F6E 6E65 6374 696F 6E73 1253 6176 6520" /* onnections.Save */ + $"636C 6561 7265 6420 6C69 6E65 730C 5265" /* cleared lines.Re */ + $"6D61 7020 4B65 7970 6164 0556 5431 3030" /* map Keypad.VT100 */ + $"0556 5432 3230 0B43 6F6E 7472 6F6C 2D43" /* .VT220.Control-C */ + $"6D64 064F 7074 696F 6E03 4F66 6600 0F52" /* md.Option.Off..R */ + $"656D 6170 2044 656C 2074 6F20 5E44 1041" /* emap Del to ^D.A */ + $"6C6C 6F77 2062 6F6C 6466 6163 696E 6712" /* llow boldfacing. */ + $"5573 6520 636F 6C6F 7220 666F 7220 626F" /* Use color for bo */ + $"6C64 0000 1455 7365 2069 6E76 6572 7365" /* ld...Use inverse */ + $"2066 6F72 2062 6F6C 6400 0004 426F 6C64" /* for bold...Bold */ + $"2344 6F6E 2774 2073 6176 6520 6174 7472" /* #Don't save attr */ + $"6962 7574 6573 2069 6E20 7363 726F 6C6C" /* ibutes in scroll */ + $"6261 636B" /* back */ +}; + +data 'STR#' (4000, "Good Fonts", purgeable) { + $"0000" /* .. */ +}; + +data 'STR#' (5000, "Bad Fonts", purgeable) { + $"0000" /* .. */ +}; + +data 'STR#' (7001, "Main Prefs Strings", purgeable) { + $"0026 022D 3100 0015 5769 6E64 6F77 7320" /* .&.-1...Windows */ + $"646F 6E27 7420 676F 2061 7761 7911 5374" /* don't go away.St */ + $"6167 6765 7265 6420 5769 6E64 6F77 730C" /* aggered Windows. */ + $"436F 6D6D 616E 6420 4B65 7973 1952 656D" /* Command Keys.Rem */ + $"6170 2062 6163 6B71 756F 7465 2074 6F20" /* ap backquote to */ + $"4553 4361 7065 1853 686F 7720 4B65 7970" /* ESCape.Show Keyp */ + $"6164 2061 6E64 2046 756E 6374 696F 6E0C" /* ad and Function. */ + $"426C 696E 6B20 4375 7273 6F72 0542 6C6F" /* Blink Cursor.Blo */ + $"636B 0955 6E64 6572 6C69 6E65 0C56 6572" /* ckUnderline.Ver */ + $"7469 6361 6C20 4261 7223 496E 2062 6163" /* tical Bar#In bac */ + $"6B67 726F 756E 642C 206E 6F74 6966 7920" /* kground, notify */ + $"7573 6572 206F 6620 6265 6570 7320 4578" /* user of beeps Ex */ + $"7069 7265 206B 6572 6265 726F 7320 7469" /* pire kerberos ti */ + $"636B 6574 7320 6F6E 2063 6C6F 7365 0000" /* ckets on close.. */ + $"0000 0000 0000 0000 0000 0000 0000 23D2" /* ..............# */ + $"4F70 656E 2043 6F6E 6E65 6374 696F 6ED3" /* Open Connection */ + $"2064 6961 6C6F 6720 6F6E 2073 7461 7274" /* dialog on start */ + $"7570 1544 6F6E 2774 2077 6172 6E20 6D65" /* up.Don't warn me */ + $"206F 6E20 7175 6974 1341 7574 6F20 6F70" /* on quit.Auto op */ + $"656E 203C 4465 6661 756C 743E 1741 6C6C" /* en <Default>.All */ + $"6F77 2074 7970 696E 6720 6F66 2061 6C69" /* ow typing of ali */ + $"6173 6573 154D 6F6E 6F73 7061 6365 6420" /* ases.Monospaced */ + $"666F 6E74 7320 6F6E 6C79 001B 416C 7761" /* fonts only..Alwa */ + $"7973 2063 6C69 7020 7472 6169 6C69 6E67" /* ys clip trailing */ + $"2073 7061 6365 731E 476C 6F62 616C 6C79" /* spaces.Globally */ + $"2072 656D 656D 6265 7220 4F54 5020 7061" /* remember OTP pa */ + $"7373 776F 7264" /* ssword */ +}; + +data 'STR#' (2002, "Misc Strings", purgeable) { + $"001A 0C43 6170 7475 7265 2046 696C 650B" /* ...Capture File. */ + $"4E65 7720 5365 7373 696F 6E0C 4E65 7720" /* New Session.New */ + $"5465 726D 696E 616C 0D55 7365 2075 7365" /* Terminal.Use use */ + $"726E 616D 653D 0B2C 2070 6173 7377 6F72" /* rname=., passwor */ + $"643D 0943 6C6F 7365 2041 6C6C 0543 6C6F" /* d=Close All.Clo */ + $"7365 1750 6C65 6173 6520 5365 6C65 6374" /* se.Please Select */ + $"204E 6577 2043 6F6C 6F72 044E 6F6E 6508" /* New Color.None. */ + $"5365 7373 696F 6E3A 024F 6B06 4361 6E63" /* Session:.Ok.Canc */ + $"656C 0746 5450 204C 6F67 0F53 6176 6520" /* el.FTP Log.Save */ + $"4D61 6372 6F73 2054 6F3A 0D54 656C 6E65" /* Macros To:.Telne */ + $"7420 4D61 6372 6F73 1261 7761 6974 696E" /* t Macros.awaitin */ + $"6720 6469 736D 6973 7361 6C0C 6265 696E" /* g dismissal.bein */ + $"6720 6F70 656E 6564 0F62 6569 6E67 206C" /* g opened.being l */ + $"6F6F 6B65 6420 7570 0D53 6573 7369 6F6E" /* ooked up.Session */ + $"204E 616D 653A 0C53 6574 2074 6F20 6C6F" /* Name:.Set to lo */ + $"6164 3A0C 5361 7665 2053 6574 2074 6F3A" /* ad:.Save Set to: */ + $"0A54 656C 6E65 7420 5365 7416 5361 7665" /* Telnet Set.Save */ + $"2063 6170 7475 7265 6420 7465 7874 2061" /* captured text a */ + $"733A 1050 7265 7669 6F75 7320 5365 7373" /* s:.Previous Sess */ + $"696F 6E0C 4E65 7874 2053 6573 7369 6F6E" /* ion.Next Session */ + $"2552 6562 7569 6C64 696E 6720 466F 6E74" /* %Rebuilding Font */ + $"204D 656E 7520 2D20 506C 6561 7365 2057" /* Menu - Please W */ + $"6169 742E 2E2E" /* ait... */ +}; + +data 'STR#' (23239, "Save Set Strings", purgeable) { + $"0048 046E 616D 6504 686F 7374 0473 697A" /* .H.name.host.siz */ + $"650A 7363 726F 6C6C 6261 636B 0962 6163" /* escrollbackbac */ + $"6B73 7061 6365 0664 656C 6574 6504 6B65" /* kspace.delete.ke */ + $"7930 046B 6579 3104 6B65 7932 046B 6579" /* y0.key1.key2.key */ + $"3304 6B65 7934 046B 6579 3504 6B65 7936" /* 3.key4.key5.key6 */ + $"046B 6579 3704 6B65 7938 046B 6579 390B" /* .key7.key8.key9. */ + $"636F 6D6D 616E 646B 6579 7305 6572 6173" /* commandkeys.eras */ + $"6505 7769 6474 6808 7465 6B63 6C65 6172" /* e.width.tekclear */ + $"0776 7477 6964 7468 0472 6762 3004 7267" /* .vtwidth.rgb0.rg */ + $"6231 0472 6762 3204 7267 6233 0466 6F6E" /* b1.rgb2.rgb3.fon */ + $"7405 6673 697A 6506 6E6C 696E 6573 076B" /* t.fsize.nlines.k */ + $"6579 7374 6F70 056B 6579 676F 056B 6579" /* eystop.keygo.key */ + $"6970 0563 726D 6170 086C 696E 656D 6F64" /* ip.crmap.linemod */ + $"6508 6569 6768 7462 6974 0366 7470 0673" /* e.eightbit.ftp.s */ + $"6572 6961 6C04 706F 7274 0B74 7261 6E73" /* erial.port.trans */ + $"6C61 7469 6F6E 0574 656B 656D 0A61 6E73" /* lation.tekemans */ + $"7765 7262 6163 6B0C 6175 7468 656E 7469" /* werback.authenti */ + $"6361 7465 0765 6E63 7279 7074 0670 6167" /* cate.encrypt.pag */ + $"6575 7006 6B65 7970 6164 0961 6E73 6963" /* eup.keypadansic */ + $"6F6C 6F72 0861 7272 6F77 6D61 7009 656D" /* olor.arrowmapem */ + $"6163 736D 6574 610B 7061 7374 656D 6574" /* acsmeta.pastemet */ + $"686F 6409 7061 7374 6573 697A 6509 7361" /* hodpastesizesa */ + $"7665 636C 6561 720B 7674 656D 756C 6174" /* veclear.vtemulat */ + $"696F 6E09 666F 7263 6573 6176 6506 7674" /* ionforcesave.vt */ + $"7772 6170 0578 7465 726D 096C 6F63 616C" /* wrap.xtermlocal */ + $"6563 686F 0768 616C 6664 7570 0A72 656D" /* echo.halfduprem */ + $"6170 6374 726C 6408 6E65 6761 7469 7665" /* apctrld.negative */ + $"0961 6C6C 6F77 626F 6C64 0963 6F6C 6F72" /* allowboldcolor */ + $"626F 6C64 0B69 676E 6F72 6562 6565 7073" /* bold.ignorebeeps */ + $"0869 676E 6F72 6566 6608 626F 6C64 666F" /* .ignoreff.boldfo */ + $"6E74 0B69 6E76 6572 7365 626F 6C64 076F" /* nt.inversebold.o */ + $"7470 6175 746F 086F 7470 6D75 6C74 6906" /* tpauto.otpmulti. */ + $"6F74 7068 6578 0B6F 7470 6E6F 7072 6F6D" /* otphex.otpnoprom */ + $"7074 0B6F 7470 7061 7373 776F 7264 0872" /* pt.otppassword.r */ + $"6561 6C62 6F6C 640B 6F74 7073 6176 6570" /* ealbold.otpsavep */ + $"6173 730D 6F6C 6473 6372 6F6C 6C62 6163" /* ass.oldscrollbac */ + $"6B" /* k */ +}; + +data 'taBL' (265, "DEC Multinational") { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"8081 8283 8485 8687 8889 8A8B 8C8D 8E8F" /* */ + $"9091 9293 9495 9697 9899 9A9B 9C9D 9E9F" /* */ + $"A0C1 A2A3 A4B4 A6A4 DBA9 BBC7 ACAD AEAF" /* ۩Ǭ */ + $"A1B1 B2B3 B4B5 A6E1 B8F5 BCC8 BCBD BEC0" /* ȼ */ + $"CBE7 E5CC 8081 AE82 E983 E6E8 EDEA EBEC" /* ̀ */ + $"D084 F1EE EFCD 85CE AFF4 F2F3 86D9 DEA7" /* Єͅίާ */ + $"8887 898B 8A8C BE8D 8F8E 9091 9392 9495" /* */ + $"F096 9897 999B 9ACF BF9D 9C9E 9FD8 FEFF" /* 𖘗Ͽ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C5 C7C9 D1D6 DCE1 E0E2 E4E3 E5E7 E9E8" /* */ + $"EAEB EDEC EEEF F1F3 F2F4 F6F5 FAF9 FBFC" /* */ + $"20B0 A2A3 A720 B6DF 20A9 2020 2020 C6D8" /* */ + $"20B1 2020 A5B5 2020 2020 20AA BA20 E6F8" /* */ + $"BFA1 2020 2020 20AB BB20 20C0 C3D5 D7F7" /* */ + $"2020 2020 2020 2020 FDDD 20A8 2020 2020" /* */ + $"20B7 2020 20C2 CAC1 CBC8 CDCE CFCC D3D4" /* */ + $"20D2 DADB D9B9 2020 2020 2020 2020 2020" /* ٹ */ +}; + +data 'taBL' (267, "PC 850") { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"829F 8E89 8A88 8C8D 9091 8F95 9493 8081" /* */ + $"83BE AE99 9A98 9E9D D885 86BF A3AF D7C4" /* ؅ */ + $"8792 979C 9684 BBBC C0A8 C2B8 B9C1 C7C8" /* ¸ */ + $"FDFE FFC6 F7E7 E5CB A9BD A5B0 B7A2 B4E3" /* ˩ */ + $"E4FA F9F6 CEFB 8BCC B3AD C5C3 BAAA C9DB" /* ̳ú */ + $"DDDC E6E8 E9F5 EAEB ECF0 E2D9 D4CF EDD1" /* */ + $"EEA7 EFF1 9BCD B5DF DEF2 F3F4 E0A0 F8AB" /* ͵ */ + $"D0B1 B6B2 A6A4 D6FC A1AC E1D5 D2D3 DACA" /* б */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"8E8F 8090 A599 9AA0 8583 84C6 8687 828A" /* Ɔ */ + $"8889 A18D 8C8B A4A2 9593 94E4 A397 9681" /* 䣗 */ + $"EDF8 BD9C F5BA F4E1 A9B8 CDEF FEC9 929D" /* ᩸ɒ */ + $"BBF1 F3C8 BEE6 F2BC ABAC CCA6 A7B9 919B" /* Ⱦ򼫬̦ */ + $"A8AA ACCB 9FCA B3AE AFCE FFB7 C7E5 C4DD" /* ˟ʳ */ + $"F0DF FCFD DCFB F69E 98DB FECF D1D0 E8E7" /* */ + $"ECFA DABF C0B6 D2B5 B3D4 D6D7 D8DE E0E2" /* ڿҵ */ + $"D9E3 E9EA EBD5 C3B4 EEC2 C1C5 F7B0 B1B2" /* ô */ +}; + +data 'taBL' (268, "US ASCII") { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"4141 4345 4E4F 5561 6161 6161 6163 6565" /* AACENOUaaaaaacee */ + $"6565 6969 6969 6E6F 6F6F 6F6F 7575 7575" /* eeiiiinooooouuuu */ + $"2B6F 634C 536F 5053 5243 2260 2223 414F" /* +ocLSoPSRC"`"#AO */ + $"3823 3C3E 5975 6453 5070 5361 6F4F 616F" /* 8#<>YudSPpSaoOao */ + $"3F69 2D56 663D 643C 3E2E 2041 414F 4F6F" /* ?i-Vf=d<>. AAOOo */ + $"2D2D 2222 6060 2F6F 793D 2020 2020 2020" /* --""``/oy= */ + $"2020 2020 2020 2020 2020 2020 2020 2020" /* */ + $"2020 2020 2020 2020 2020 2020 2020 2020" /* */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"4141 4345 4E4F 5561 6161 6161 6163 6565" /* AACENOUaaaaaacee */ + $"6565 6969 6969 6E6F 6F6F 6F6F 7575 7575" /* eeiiiinooooouuuu */ + $"2B6F 634C 536F 5053 5243 5427 2223 414F" /* +ocLSoPSRCT'"#AO */ + $"3823 3C3E 5975 6453 5070 5361 6F4F 616F" /* 8#<>YudSPpSaoOao */ + $"3F21 2D56 663D 643C 3E2E 2041 414F 4F6F" /* ?!-Vf=d<>. AAOOo */ + $"2D2D 2222 2727 2F6F 7959 2F6F 3C3E 6666" /* --""''/oyY/o<>ff */ + $"2B2E 2722 2541 4541 4545 4949 4949 4F4F" /* +.'"%AEAEEIIIIOO */ + $"204F 5555 5569 5E7E 2D5E 2E6F 2C22 2C5E" /* OUUUi^~-^.o,",^ */ +}; + +data 'taBL' (263, "ISO 8859-1") { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"8081 8283 8485 8687 8889 8A8B 8C8D 8E8F" /* */ + $"9091 9293 9495 9697 9899 9A9B 9C9D 209F" /* */ + $"CAC1 A2A3 DBB4 CFA4 ACA9 BBC7 C2D0 A8F8" /* ۴ϤШ */ + $"A1B1 D3D2 ABB5 A6E1 FCD5 BCC8 B9B8 B2C0" /* ҫռȹ */ + $"CBE7 E5CC 8081 AE82 E983 E6E8 EDEA EBEC" /* ̀ */ + $"DC84 F1EE EFCD 85D7 AFF4 F2F3 86A0 DEA7" /* ܄ͅׯާ */ + $"8887 898B 8A8C BE8D 8F8E 9091 9392 9495" /* */ + $"DD96 9897 999B 9AD6 BF9D 9C9E 9FE0 DFD8" /* ݖֿ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C5 C7C9 D1D6 DCE1 E0E2 E4E3 E5E7 E9E8" /* */ + $"EAEB EDEC EEEF F1F3 F2F4 F6F5 FAF9 FBFC" /* */ + $"DDB0 A2A3 A720 B6DF AEA9 20B4 A820 C6D8" /* ݰ ߮ */ + $"20B1 BE20 A5B5 2020 BDBC 20AA BA20 E6F8" /* */ + $"BFA1 AC20 2020 20AB BB20 A0C0 C3D5 20A6" /* */ + $"AD20 B3B2 20B9 F7D7 FF20 20A4 D0F0 DEFE" /* */ + $"FDB7 2020 20C2 CAC1 CBC8 CDCE CFCC D3D4" /* */ + $"20D2 DADB D920 2020 AF20 2020 B820 2020" /* */ +}; + +data 'taBL' (261, "NextStep") { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"CACB E7E5 CC80 8182 E983 E6E8 EDEA EBEC" /* ̀ */ + $"2084 F1EE EFCD 85F4 F2F3 8620 20B5 20D6" /* ͅ */ + $"A9C1 A2A3 DAB4 C4A4 DB20 D2C7 DCDD DEDF" /* ڴĤ */ + $"A8D0 A0E0 E120 A6A5 E2E3 D3C8 C9E4 C2C0" /* Р */ + $"20D4 ABF6 F7F8 F9FA AC20 FBFC 20FD FEFF" /* ԫ */ + $"D1B1 2020 2088 8789 8B8A 8C8D 8F8E 9091" /* ѱ */ + $"93AE 92BB 9495 2096 20AF CEBC 9897 999B" /* μ */ + $"9ABE 9D9C 9EF5 9F20 20BF CFA7 20D8 2020" /* ϧ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"8586 8789 9196 9AD6 D5D7 D9D8 DADB DDDC" /* */ + $"DEDF E2E0 E4E5 E7ED ECEE F0EF F3F2 F4F6" /* */ + $"B220 A2A3 A7B7 B6FB B0A0 20C2 C820 E1E9" /* */ + $"20D1 2020 A59D 2020 2020 20E3 EB20 F1F9" /* */ + $"BFA1 BE20 A620 20AB BBBC 8081 8495 EAFA" /* */ + $"B1D0 AABA C120 9F20 FD20 A4A8 ACAD AEAF" /* Ъ */ + $"B3B4 B8B9 BD83 8A82 8B88 8D8E 8F8C 9394" /* */ + $"2092 9899 97F5 C3C4 C5C6 C7CA CBCD CECF" /* */ +}; + +data 'taBL' (274, "ISO-8859-2 (Latin-2)", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA E266 E3C9 A0A0 C35F E1DC E5E8 EB8F" /* fɠ_ */ + $"C6D4 D5D2 D3A5 D0D1 5FAA E4DD E6E9 EC90" /* ӥ_ */ + $"CA84 FFFC 24BB E5A4 ACE1 E5E8 8F2D EBFB" /* ʄ$夬- */ + $"A188 2CB8 27BC E6FF 2CE4 E6E9 90AC ECFD" /* ,',鐬 */ + $"D9E7 81E7 80BD 8C8C 8983 A296 9DEA B191" /* 瀽걑 */ + $"91C1 C5EE EFCC 85D7 DBF1 F2F4 86F8 E8A7" /* ̅ */ + $"DA87 8287 8ABE 8D8D 8B8E AB98 9E92 B493" /* ڇ */ + $"93C4 CB97 99CE 9AD6 DEF3 9CF5 9FF9 E9AC" /* ˗Κ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C2 E2C9 A1D6 DCE1 B1C8 E4E8 C6E6 E9AC" /* ɡ */ + $"BCCF EDEF CCEC CBF3 EBF4 F6F5 FACC ECFC" /* */ + $"2BB0 CA4C A72A A7DF 5263 99EA A85F 67CD" /* +L*Rc_g */ + $"EDCE 3C3E EE4B F05F B3A5 B5A5 B5C5 E5D2" /* <>K_ */ + $"F2D1 2D5F F1D2 5F22 225F A0F2 D5D5 F5D4" /* -__""_ */ + $"2D2D 2222 2727 F7D7 F4C0 E0D8 2727 F8D8" /* --""'''' */ + $"F8A9 2722 B9A6 B6C1 ABBB CDAE BEDB D3D4" /* '"ͮ */ + $"FBD9 DAF9 DBFB D9F9 DDFD 6BAF A3BF 47B7" /* kG */ +}; + +data 'taBL' (275, "Windows-1250 (Latin-2)", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA E266 E3C9 A0A0 C35F E1DC E5E8 EB8F" /* fɠ_ */ + $"C6D4 D5D2 D3A5 D0D1 5FAA E4DD E6E9 EC90" /* ӥ_ */ + $"CAFF FFFC 2484 7CA4 ACA9 E5C7 C22D A8FB" /* $|- */ + $"A15F 2CB8 2775 A62E 2C88 E6C8 BBAC BCFD" /* _,'u.,Ȼ */ + $"D9E7 81E7 80BD 8C8C 8983 A296 9DEA B191" /* 瀽걑 */ + $"91C1 C5EE EFCC 85D7 DBF1 F2F4 86F8 E8A7" /* ̅ */ + $"DA87 8287 8ABE 8D8D 8B8E AB98 9E92 B493" /* ڇ */ + $"93C4 CB97 99CE 9AD6 DEF3 9CF5 9FF9 E9AC" /* ˗Κ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C2 E2C9 A5D6 DCE1 B9C8 E4E8 C6E6 E98F" /* ɥ */ + $"9FCF EDEF CCEC CBF3 EBF4 F6F5 FACC ECFC" /* */ + $"86B0 CA4C A795 B6DF AEA9 99EA A85F 67CD" /* L߮_g */ + $"EDCE 3C3E EE4B F05F B3BC BEBC BEC5 E5D2" /* <>K_ */ + $"F2D1 AC5F F1D2 5FAB BB85 A0F2 D5D5 F5D4" /* Ѭ__ */ + $"9697 9394 9192 F7D7 F4C0 E0D8 8B9B F8D8" /* ؋ */ + $"F88A 8284 9A8C 9CC1 8D9D CD8E 9EDB D3D4" /* ͎ */ + $"FBD9 DAF9 DBFB D9F9 DDFD 6BAF A3BF 47A1" /* kG */ +}; + +data 'taBL' (276, "ISO-8859-13 (Baltic)", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA E266 E3C9 A0A0 C35F C9DC D4AC FF2C" /* fɠ_Ԭ, */ + $"C6D4 D5D2 D3A5 D0D1 5FAA 5FDD 5F7E 5F5F" /* ӥ___~__ */ + $"CAD3 63A3 24E3 7CA4 85A9 DFC7 C22D A880" /* c$|- */ + $"A15F 3233 D275 A62E 9A31 E0C8 2F2F 2F8A" /* _23u.1/// */ + $"84AF 818C 80E7 A294 8983 8F96 FEB5 B1B9" /* 碔 */ + $"E1C1 BFEE CFCD 85D7 F6FC E5ED 86FB EBA7" /* ͅ */ + $"88B0 828D 8A87 AB95 8B8E 9098 AEFA B4BA" /* */ + $"E4C4 C097 D89B 9AD6 F7B8 E6F0 9FFD ECD5" /* ؛ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C2 E2C9 C0D6 DC61 E0C8 E4E8 C3E3 E9CA" /* a */ + $"EA44 6964 C7E7 CBF3 EBF4 F6F5 75C7 E7FC" /* Didu */ + $"2BB0 C6A3 A72A B6DF AEA9 99E6 225F ECC1" /* +ƣ*߮"_ */ + $"E1CE 3C3E EECD 645F F9CF EFCF EF4C 6CD2" /* <>d_Ll */ + $"F2D1 AC5F F1D2 5FAB BB5F A0F2 D5D5 F5D4" /* Ѭ___ */ + $"2D2D B4A1 FFFF F7D7 F452 72AA ABBB BAAA" /* --Rr */ + $"BAD0 2CA5 F0DA FA41 5474 49DE FEDB D3D4" /* ,ATtI */ + $"FBD8 55F8 DBFB D8F8 5979 EDDD D9FD CC5E" /* UYy^ */ +}; + +data 'taBL' (277, "Windows-1257 (Baltic)", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA E266 E3C9 A0A0 C35F C9DC D4AC FF2C" /* fɠ_Ԭ, */ + $"C6D4 D5D2 D3A5 D0D1 5FAA 5FDD 5F7E 5F5F" /* ӥ___~__ */ + $"CA5F 63A3 245F 7CA4 85A9 DFC7 C22D A880" /* _c$_|- */ + $"A15F 3233 2775 A62E 9A31 E0C8 2F2F 2F8A" /* _23'u.1/// */ + $"84AF 818C 80E7 A294 8983 8F96 FEB5 B1B9" /* 碔 */ + $"E1C1 BFEE CFCD 85D7 F6FC E5ED 86FB EBA7" /* ͅ */ + $"88B0 828D 8A87 AB95 8B8E 9098 AEFA B4BA" /* */ + $"E4C4 C097 D89B 9AD6 F7B8 E6F0 9FFD ECA1" /* ؛ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C2 E2C9 C0D6 DC61 E0C8 E4E8 C3E3 E9CA" /* a */ + $"EA44 6964 C7E7 CBF3 EBF4 F6F5 75C7 E7FC" /* Didu */ + $"86B0 C6A3 A795 B6DF AEA9 99E6 8D5F ECC1" /* ƣ߮_ */ + $"E1CE 3C3E EECD 645F F9CF EFCF EF4C 6CD2" /* <>d_Ll */ + $"F2D1 AC5F F1D2 5FAB BB85 A0F2 D5D5 F5D4" /* Ѭ__ */ + $"9697 9394 9192 F7D7 F452 72AA 8B9B BAAA" /* Rr */ + $"BAD0 8284 F0DA FA41 5474 49DE FEDB D3D4" /* ЂATtI */ + $"FBD8 55F8 DBFB D8F8 5979 EDDD D9FD CC8E" /* UYy̎ */ +}; + +data 'taBL' (271, "ISO-IR-111 (KOI-8)", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA 2CC4 D7C9 A0A0 C35F C9C7 D45F 5FB6" /* ,ɠ___ */ + $"C6D4 D5D2 D3A5 D0D1 5FAA 5FC8 5F5F 5FC4" /* ӥ_____ */ + $"CAAC AFDE B9CF B4BB C0BD BFCC CE2D D9DB" /* ʬ޹ϴ- */ + $"DCAB AEDD B8C1 A7BA B7BC BECB CDFF D8DA" /* ܫݸ */ + $"FEE0 E1F6 E4E5 F4E3 F5E8 E9EA EBEC EDEE" /* */ + $"EFDF F0F1 F2F3 E6E2 FCFB E7F8 FDF9 F7FA" /* */ + $"9E80 8196 8485 9483 9588 898A 8B8C 8D8E" /* */ + $"8F9F 9091 9293 8682 9C9B 8798 9D99 979A" /* */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"E1E2 F7E7 E4E5 F6FA E9EA EBEC EDEE EFF0" /* */ + $"F2F3 F4F5 E6E8 E3FE FBFD FFF9 F8FC E0F1" /* */ + $"2B5E B24C 5F2A 5FB6 5263 99B1 A12D B2A2" /* +^L_*_Rc- */ + $"5F5F 3C3E A675 A2B8 B4A4 B7A7 B9A9 BAAA" /* __<>u */ + $"A8B5 2D5F 667E 5F22 225F A0BB ABBC ACA5" /* -_f~_""_ */ + $"2D2D 2222 2727 2F22 BEAE BFAF B0B3 A3D1" /* --""''/" */ + $"C1C2 D7C7 C4C5 D6DA C9CA CBCC CDCE CFD0" /* */ + $"D2D3 D4D5 C6C8 C3DE DBDD DFD9 D8DC C0BD" /* */ +}; + +data 'taBL' (272, "ISO-8859-5", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA 2CC4 D7C9 A0A0 C35F C9C7 D45F 5FB6" /* ,ɠ___ */ + $"C6D4 D5D2 D3A5 D0D1 5FAA 5FC8 5F5F 5FC4" /* ӥ_____ */ + $"CADD ABAE B8C1 A7BA B7BC BECB CD2D D8DA" /* ݫ- */ + $"8081 8283 8485 8687 8889 8A8B 8C8D 8E8F" /* */ + $"9091 9293 9495 9697 9899 9A9B 9C9D 9E9F" /* */ + $"E0E1 E2E3 E4E5 E6E7 E8E9 EAEB ECED EEEF" /* */ + $"F0F1 F2F3 F4F5 F6F7 F8F9 FAFB FCFD FEDF" /* */ + $"DCDE ACAF B9CF B4BB C0BD BFCC CEA4 D9DB" /* ެϴΤ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"B0B1 B2B3 B4B5 B6B7 B8B9 BABB BCBD BEBF" /* */ + $"C0C1 C2C3 C4C5 C6C7 C8C9 CACB CCCD CECF" /* */ + $"2B5E A34C FD2A FDA6 5263 99A2 F22D A3F3" /* +^L*Rc- */ + $"5F5F 3C3E F675 F3A8 A4F4 A7F7 A9F9 AAFA" /* __<>u */ + $"F8A5 2D5F 667E 5F22 225F A0AB FBAC FCF5" /* -_f~_""_ */ + $"2D2D 2222 2727 2F22 AEFE AFFF F0A1 F1EF" /* --""''/" */ + $"D0D1 D2D3 D4D5 D6D7 D8D9 DADB DCDD DEDF" /* */ + $"E0E1 E2E3 E4E5 E6E7 E8E9 EAEB ECED EE24" /* $ */ +}; + +data 'taBL' (273, "Windows-1251", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"ABAE 2CAF D7C9 A0A0 C35F BCC7 BECD CBDA" /* ,ɠ_Ǿ */ + $"ACD4 D5D2 D3A5 D0D1 5FAA BDC8 BFCE CCDB" /* ӥ_ȿ */ + $"CAD8 D9B7 FFA2 7CA4 DDA9 B8C7 C22D A8BA" /* ٷ|ݩ- */ + $"A1B1 A7B4 B6B5 A62E DEDC B9C8 C0C1 CFBB" /* .ܹϻ */ + $"8081 8283 8485 8687 8889 8A8B 8C8D 8E8F" /* */ + $"9091 9293 9495 9697 9899 9A9B 9C9D 9E9F" /* */ + $"E0E1 E2E3 E4E5 E6E7 E8E9 EAEB ECED EEEF" /* */ + $"F0F1 F2F3 F4F5 F6F7 F8F9 FAFB FCFD FEDF" /* */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C0C1 C2C3 C4C5 C6C7 C8C9 CACB CCCD CECF" /* */ + $"D0D1 D2D3 D4D5 D6D7 D8D9 DADB DCDD DEDF" /* */ + $"86B0 A54C A795 B6B2 AEA9 9980 905F 8183" /* L_ */ + $"5FB1 3C3E B3B5 B4A3 AABA AFBF 8A9A 8C9C" /* _<> */ + $"BCBD AC5F 667E 5FAB BB85 A08E 9E8D 9DBE" /* _f~_ */ + $"9697 9394 9192 2F84 A1A2 8F9F B9A8 B8FF" /* / */ + $"E0E1 E2E3 E4E5 E6E7 E8E9 EAEB ECED EEEF" /* */ + $"F0F1 F2F3 F4F5 F6F7 F8F9 FAFB FCFD FEA4" /* */ +}; + +data 'taBL' (269, "ISO-8859-7", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"9693 2C66 2CC9 A0A0 5F98 C9C7 D45F 5F5F" /* ,f,ɠ____ */ + $"A2D4 D5D2 D396 D0D1 5F93 5FC8 5FFF 5F66" /* Ӗ____f */ + $"CAD4 D592 24B4 9BAC 8CA9 5FC7 C22D A8D1" /* Ւ$_- */ + $"AEB1 8284 8B87 CDAF CED7 D8C8 D997 DADF" /* ͯٗ */ + $"FDB0 B5A1 A2B6 B7B8 A3B9 BAA4 BBC1 A5C3" /* */ + $"A6C4 AAAA C6CB BCCC BEBF ABBD C0DB DCDD" /* Ī˼̾ */ + $"FEE1 E2E7 E4E5 FAE8 F5E9 EBEC EDEE EAEF" /* */ + $"F0F2 F7F3 F4F9 E6F8 E3F6 FBFC DEE0 F1FF" /* */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"4131 B245 B34F 55B5 6161 61B4 A863 6565" /* A1EOUaaacee */ + $"6565 A399 6969 2ABD 896F 6FA6 AD75 7575" /* eeii*oouuu */ + $"2BC3 C4C8 CBCE D073 AEA9 D3DA A75F B0B7" /* +sڧ_ */ + $"C1B1 3C3E 59C2 C5C6 C7C9 CACC D6DB D8D9" /* <>Y */ + $"DCCD ACCF D17E D4AB BB5F A0D5 D7B6 B86F" /* ͬ~ԫ_׶o */ + $"2DAF 2222 A1A2 2FB9 BABC BEDD DEDF FCBF" /* -""/ */ + $"FDE1 E2F8 E4E5 F6E3 E7E9 EEEA EBEC EDEF" /* */ + $"F0FE F1F3 F4E8 F9F2 F7F5 E6FA FBC0 E0FF" /* */ +}; + +data 'taBL' (270, "Windows-1253", purgeable) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"9693 2C66 2CC9 A0A0 5F98 C9C7 D45F 5F5F" /* ,f,ɠ____ */ + $"A2D4 D5D2 D396 D0D1 5F93 5FC8 5FFF 5F66" /* Ӗ____f */ + $"CA87 CD92 24B4 9BAC 8CA9 5FC7 C22D A8D1" /* ʇ͒$_- */ + $"AEB1 8284 8BED ACAF CED7 D8C8 D997 DADF" /* ٗ */ + $"FDB0 B5A1 A2B6 B7B8 A3B9 BAA4 BBC1 A5C3" /* */ + $"A6C4 AAAA C6CB BCCC BEBF ABBD C0DB DCDD" /* Ī˼̾ */ + $"FEE1 E2E7 E4E5 FAE8 F5E9 EBEC EDEE EAEF" /* */ + $"F0F2 F7F3 F4F9 E6F8 E3F6 FBFC DEE0 F1FF" /* */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"4131 B245 B34F 55A1 6161 61B4 A863 6565" /* A1EOUaaacee */ + $"6565 A399 6969 95BD 896F 6FA6 AD75 7575" /* eeiioouuu */ + $"86C3 C4C8 CBCE D073 AEA9 D3DA A75F B0B7" /* sڧ_ */ + $"C1B1 3C3E A5C2 C5C6 C7C9 CACC D6DB D8D9" /* <> */ + $"DCCD ACCF D17E D4AB BB85 A0D5 D7A2 B86F" /* ͬ~ԫעo */ + $"9697 9394 9192 2FB9 BABC BEDD DEDF FCBF" /* / */ + $"FDE1 E2F8 E4E5 F6E3 E7E9 EEEA EBEC EDEF" /* */ + $"F0FE F1F3 F4E8 F9F2 F7F5 E6FA FBC0 E0FF" /* */ +}; + +data 'TMPL' (128, "PRCT", purgeable) { + $"052A 2A2A 2A2A 4C53 5442 0641 2052 6563" /* .*****LSTB.A Rec */ + $"7452 4543 5405 2A2A 2A2A 2A4C 5354 45" /* tRECT.*****LSTE */ +}; + +data 'TMPL' (129, "PrEf") { + $"0776 6572 7369 6F6E 4457 5244 0B63 7572" /* .versionDWRD.cur */ + $"736F 7220 7479 7065 4457 5244 1563 6F70" /* sor typeDWRD.cop */ + $"7920 7461 626C 6520 7468 7265 7368 686F" /* y table threshho */ + $"6C64 4457 5244 0974 696D 6573 6C69 6365" /* ldDWRDtimeslice */ + $"444C 4E47 1463 6170 7475 7265 2066 696C" /* DLNG.capture fil */ + $"6520 6372 6561 746F 7254 4E41 4D15 7769" /* e creatorTNAM.wi */ + $"6E64 6F77 7320 646F 6E27 7420 676F 2061" /* ndows don't go a */ + $"7761 7944 4259 540F 7374 6167 6765 7220" /* wayDBYT.stagger */ + $"7769 6E64 6F77 7344 4259 540C 636F 6D6D" /* windowsDBYT.comm */ + $"616E 6420 6B65 7973 4442 5954 1172 656D" /* and keysDBYT.rem */ + $"6170 207E 2074 6F20 6573 6361 7065 4442" /* ap ~ to escapeDB */ + $"5954 0C62 6C69 6E6B 2063 7572 736F 7244" /* YT.blink cursorD */ + $"4259 540E 4B65 792F 4675 6E63 206D 656E" /* BYT.Key/Func men */ + $"7573 4442 5954 0C6F 7065 6E20 7469 6D65" /* usDBYT.open time */ + $"6F75 7444 5752 440C 7365 6E64 2074 696D" /* outDWRD.send tim */ + $"656F 7574 4457 5244 1673 7461 6767 6572" /* eoutDWRD.stagger */ + $"2077 696E 646F 7773 206F 6666 7365 7444" /* windows offsetD */ + $"5752 4414 6E6F 7469 6679 2075 7365 7220" /* WRD.notify user */ + $"6F66 2062 6565 7073 4457 5244 2164 6573" /* of beepsDWRD!des */ + $"7472 6F79 204B 6572 6265 726F 7320 7469" /* troy Kerberos ti */ + $"636B 6574 7320 6F6E 2063 6C6F 7365 4457" /* ckets on closeDW */ + $"5244 2061 7574 6F2D 6F70 656E 204F 7065" /* RD auto-open Ope */ + $"6E20 436F 6E6E 6563 7469 6F6E 2064 6961" /* n Connection dia */ + $"6C6F 6744 5752 4412 646F 6E27 7420 7761" /* logDWRD.don't wa */ + $"726E 206F 6E20 7175 6974 4457 5244 1361" /* rn on quitDWRD.a */ + $"7574 6F2D 6F70 656E 203C 4465 6661 756C" /* uto-open <Defaul */ + $"743E 4457 5244 1761 6C6C 6F77 2074 7970" /* t>DWRD.allow typ */ + $"696E 6720 6F66 2061 6C69 6173 6573 4457" /* ing of aliasesDW */ + $"5244 156D 6F6E 6F73 7061 6365 6420 666F" /* RD.monospaced fo */ + $"6E74 7320 6F6E 6C79 4457 5244 1B61 6C77" /* nts onlyDWRD.alw */ + $"6179 7320 636C 6970 2074 7261 696C 696E" /* ays clip trailin */ + $"6720 7370 6163 6573 4457 5244 1D64 6566" /* g spacesDWRD.def */ + $"6175 6C74 2041 4E53 4920 626F 6C64 2063" /* ault ANSI bold c */ + $"6F6C 6F72 2069 6E64 6578 4457 5244 0770" /* olor indexDWRD.p */ + $"6164 6469 6E67 4845 5844" /* addingHEXD */ +}; + +data 'TMPL' (130, "TeRm") { + $"0776 6572 7369 6F6E 4457 5244 1066 6F72" /* .versionDWRD.for */ + $"6567 726F 756E 6420 636F 6C6F 7248 3030" /* eground colorH00 */ + $"3610 6261 636B 6772 6F75 6E64 2063 6F6C" /* 6.background col */ + $"6F72 4830 3036 0B62 6C69 6E6B 2063 6F6C" /* orH006.blink col */ + $"6F72 4830 3036 1662 6C69 6E6B 2062 6163" /* orH006.blink bac */ + $"6B67 726F 756E 6420 636F 6C6F 7248 3030" /* kground colorH00 */ + $"3608 7265 7365 7276 6564 4830 3043 2065" /* 6.reservedH00C e */ + $"6D75 6C61 7469 6F6E 2028 3020 3D20 5654" /* mulation (0 = VT */ + $"3130 302C 2031 203D 2056 5432 3230 2944" /* 100, 1 = VT220)D */ + $"5752 4410 5654 2077 6964 7468 2028 6368" /* WRD.VT width (ch */ + $"6172 7329 4457 5244 1156 5420 6865 6967" /* ars)DWRD.VT heig */ + $"6874 2028 6368 6172 7329 4457 5244 0966" /* ht (chars)DWRDf */ + $"6F6E 7420 7369 7A65 4457 5244 1A6E 756D" /* ont sizeDWRD.num */ + $"6265 7220 6F66 2073 6372 6F6C 6C62 6163" /* ber of scrollbac */ + $"6B20 6C69 6E65 7344 5752 4414 414E 5349" /* k linesDWRD.ANSI */ + $"2063 6F6C 6F72 2073 6571 7565 6E63 6573" /* color sequences */ + $"4442 5954 0F58 7465 726D 2073 6571 7565" /* DBYT.Xterm seque */ + $"6E63 6573 4442 5954 0C56 5420 7772 6170" /* ncesDBYT.VT wrap */ + $"206D 6F64 6544 4259 5434 454D 4143 5320" /* modeDBYT4EMACS */ + $"6D65 7461 206B 6579 2028 3020 3D20 6E6F" /* meta key (0 = no */ + $"6E65 2C20 3120 3D20 636D 642D 636E 7472" /* ne, 1 = cmd-cntr */ + $"6C2C 2032 203D 206F 7074 696F 6E29 4442" /* l, 2 = option)DB */ + $"5954 0C45 4D41 4353 2061 7272 6F77 7344" /* YT.EMACS arrowsD */ + $"4259 540E 4D61 7020 5067 5570 2C20 6574" /* BYT.Map PgUp, et */ + $"632E 4442 5954 1138 2D62 6974 2063 6F6E" /* c.DBYT.8-bit con */ + $"6E65 6374 696F 6E73 4442 5954 1273 6176" /* nectionsDBYT.sav */ + $"6520 636C 6561 7265 6420 6C69 6E65 7344" /* e cleared linesD */ + $"4259 5409 666F 6E74 206E 616D 6550 3033" /* BYTfont nameP03 */ + $"4612 616E 7377 6572 6261 636B 206D 6573" /* F.answerback mes */ + $"7361 6765 5030 3230 0C72 656D 6170 206B" /* sageP020.remap k */ + $"6579 7061 6444 4259 540F 7265 6D61 7020" /* eypadDBYT.remap */ + $"4465 6C20 746F 205E 4444 5752 4410 616C" /* Del to ^DDWRD.al */ + $"6C6F 7720 626F 6C64 6661 6369 6E67 4457" /* low boldfacingDW */ + $"5244 1275 7365 2063 6F6C 6F72 2066 6F72" /* RD.use color for */ + $"2062 6F6C 6444 5752 4407 7061 6464 696E" /* boldDWRD.paddin */ + $"6748 4558 44" /* gHEXD */ +}; + +data 'TMPL' (131, "SeSn") { + $"0776 6572 7369 6F6E 4457 5244 0470 6F72" /* .versionDWRD.por */ + $"7444 5752 442D 5445 4B20 656D 756C 6174" /* tDWRD-TEK emulat */ + $"696F 6E20 282D 3120 3D20 6E6F 6E65 2C20" /* ion (-1 = none, */ + $"3020 3D20 3430 3134 2C20 3120 3D20 3431" /* 0 = 4014, 1 = 41 */ + $"3035 2944 5752 4423 7061 7374 6520 6D65" /* 05)DWRD#paste me */ + $"7468 6F64 2028 3020 3D20 7175 6963 6B2C" /* thod (0 = quick, */ + $"2031 203D 2062 6C6F 636B 2944 5752 4410" /* 1 = block)DWRD. */ + $"7061 7374 6520 626C 6F63 6B20 7369 7A65" /* paste block size */ + $"4457 5244 0872 6573 6572 7665 6444 4C4E" /* DWRD.reservedDLN */ + $"4709 666F 7263 6573 6176 6544 4259 5412" /* GforcesaveDBYT. */ + $"4253 4420 342E 3320 4352 206D 6170 7069" /* BSD 4.3 CR mappi */ + $"6E67 4442 5954 0E61 6C6C 6F77 206C 696E" /* ngDBYT.allow lin */ + $"656D 6F64 6544 4259 5408 7265 7365 7276" /* emodeDBYT.reserv */ + $"6564 4442 5954 1654 454B 2070 6167 6520" /* edDBYT.TEK page */ + $"636C 6561 7273 2073 6372 6565 6E44 4259" /* clears screenDBY */ + $"540B 6861 6C66 2064 7570 6C65 7844 4259" /* T.half duplexDBY */ + $"5429 6465 6C65 7465 2073 656E 6473 3A20" /* T)delete sends: */ + $"2830 203D 2062 6163 6B73 7061 6365 2C20" /* (0 = backspace, */ + $"3120 3D20 6465 6C65 7465 2944 4259 540D" /* 1 = delete)DBYT. */ + $"696E 7465 7272 7570 7420 6B65 7948 4259" /* interrupt keyHBY */ + $"540B 7375 7370 656E 6420 6B65 7948 4259" /* T.suspend keyHBY */ + $"540A 7265 7375 6D65 206B 6579 4842 5954" /* Tresume keyHBYT */ + $"106E 616D 6520 6F66 2074 6572 6D69 6E61" /* .name of termina */ + $"6C50 3032 300B 7472 616E 736C 6174 696F" /* lP020.translatio */ + $"6E50 3032 3009 686F 7374 206E 616D 6550" /* nP020host nameP */ + $"3033 460C 6175 7468 656E 7469 6361 7465" /* 03F.authenticate */ + $"4442 5954 0765 6E63 7279 7074 4442 5954" /* DBYT.encryptDBYT */ + $"0A6C 6F63 616C 2065 6368 6F44 4259 5408" /* local echoDBYT. */ + $"7265 7365 7276 6564 4442 5954 126E 6574" /* reservedDBYT.net */ + $"776F 726B 2062 6C6F 636B 2073 697A 6544" /* work block sizeD */ + $"5752 4417 706F 7274 206E 756D 6265 7220" /* WRD.port number */ + $"6973 206E 6567 6174 6976 6544 5752 442F" /* is negativeDWRD/ */ + $"7573 6520 4253 4420 342E 3320 4352 206D" /* use BSD 4.3 CR m */ + $"6F64 6520 616C 7761 7973 2C20 6576 656E" /* ode always, even */ + $"206F 6E20 6E6F 6E2D 706F 7274 2D32 3344" /* on non-port-23D */ + $"5752 440C 6967 6E6F 7265 2062 6565 7073" /* WRD.ignore beeps */ + $"4457 5244 1069 676E 6F72 6520 666F 726D" /* DWRD.ignore form */ + $"2066 6565 6444 5752 440D 6175 746F 6D61" /* feedDWRD.automa */ + $"7469 6320 4F54 5044 5752 4412 4F54 5020" /* tic OTPDWRD.OTP */ + $"6D75 6C74 6970 6C65 2074 696D 6573 4457" /* multiple timesDW */ + $"5244 104F 5450 2064 6F6E 2774 2070 726F" /* RD.OTP don't pro */ + $"6D70 7444 5752 4415 4F54 5020 6865 7861" /* mptDWRD.OTP hexa */ + $"6465 6369 6D61 6C20 7265 706C 7944 5752" /* decimal replyDWR */ + $"440C 4F54 5020 7061 7373 776F 7264 5030" /* D.OTP passwordP0 */ + $"3346 0770 6164 6469 6E67 4845 5844" /* 3F.paddingHEXD */ +}; + +data 'TMPL' (132, "TeR2") { + $"0776 6572 7369 6F6E 4457 5244 1066 6F72" /* .versionDWRD.for */ + $"6567 726F 756E 6420 636F 6C6F 7248 3030" /* eground colorH00 */ + $"3610 6261 636B 6772 6F75 6E64 2063 6F6C" /* 6.background col */ + $"6F72 4830 3036 0B62 6C69 6E6B 2063 6F6C" /* orH006.blink col */ + $"6F72 4830 3036 1662 6C69 6E6B 2062 6163" /* orH006.blink bac */ + $"6B67 726F 756E 6420 636F 6C6F 7248 3030" /* kground colorH00 */ + $"3608 7265 7365 7276 6564 4830 3043 2065" /* 6.reservedH00C e */ + $"6D75 6C61 7469 6F6E 2028 3020 3D20 5654" /* mulation (0 = VT */ + $"3130 302C 2031 203D 2056 5432 3230 2944" /* 100, 1 = VT220)D */ + $"5752 4410 5654 2077 6964 7468 2028 6368" /* WRD.VT width (ch */ + $"6172 7329 4457 5244 1156 5420 6865 6967" /* ars)DWRD.VT heig */ + $"6874 2028 6368 6172 7329 4457 5244 0966" /* ht (chars)DWRDf */ + $"6F6E 7420 7369 7A65 4457 5244 1A6E 756D" /* ont sizeDWRD.num */ + $"6265 7220 6F66 2073 6372 6F6C 6C62 6163" /* ber of scrollbac */ + $"6B20 6C69 6E65 7344 5752 4414 414E 5349" /* k linesDWRD.ANSI */ + $"2063 6F6C 6F72 2073 6571 7565 6E63 6573" /* color sequences */ + $"4442 5954 0F58 7465 726D 2073 6571 7565" /* DBYT.Xterm seque */ + $"6E63 6573 4442 5954 0C56 5420 7772 6170" /* ncesDBYT.VT wrap */ + $"206D 6F64 6544 4259 5434 454D 4143 5320" /* modeDBYT4EMACS */ + $"6D65 7461 206B 6579 2028 3020 3D20 6E6F" /* meta key (0 = no */ + $"6E65 2C20 3120 3D20 636D 642D 636E 7472" /* ne, 1 = cmd-cntr */ + $"6C2C 2032 203D 206F 7074 696F 6E29 4442" /* l, 2 = option)DB */ + $"5954 0C45 4D41 4353 2061 7272 6F77 7344" /* YT.EMACS arrowsD */ + $"4259 540E 4D61 7020 5067 5570 2C20 6574" /* BYT.Map PgUp, et */ + $"632E 4442 5954 1138 2D62 6974 2063 6F6E" /* c.DBYT.8-bit con */ + $"6E65 6374 696F 6E73 4442 5954 1273 6176" /* nectionsDBYT.sav */ + $"6520 636C 6561 7265 6420 6C69 6E65 7344" /* e cleared linesD */ + $"4259 5409 666F 6E74 206E 616D 6550 3033" /* BYTfont nameP03 */ + $"4612 616E 7377 6572 6261 636B 206D 6573" /* F.answerback mes */ + $"7361 6765 5030 3230 0C72 656D 6170 206B" /* sageP020.remap k */ + $"6579 7061 6444 4259 540F 7265 6D61 7020" /* eypadDBYT.remap */ + $"4465 6C20 746F 205E 4444 5752 4410 616C" /* Del to ^DDWRD.al */ + $"6C6F 7720 626F 6C64 6661 6369 6E67 4457" /* low boldfacingDW */ + $"5244 1275 7365 2063 6F6C 6F72 2066 6F72" /* RD.use color for */ + $"2062 6F6C 6444 5752 4412 626F 6C64 6661" /* boldDWRD.boldfa */ + $"6365 2066 6F6E 7420 6E61 6D65 5030 3346" /* ce font nameP03F */ + $"1A62 6F6C 6420 666F 6E74 2073 697A 6520" /* .bold font size */ + $"284E 4F54 2055 5345 4421 2944 5752 4414" /* (NOT USED!)DWRD. */ + $"7573 6520 696E 7665 7273 6520 666F 7220" /* use inverse for */ + $"626F 6C64 4457 5244 1D75 7365 2062 6F6C" /* boldDWRD.use bol */ + $"6420 7665 7273 696F 6E20 6F66 2062 6F6C" /* d version of bol */ + $"6420 666F 6E74 4457 5244 2064 6F6E 2774" /* d fontDWRD don't */ + $"2073 6176 6520 6174 7472 6962 7320 696E" /* save attribs in */ + $"2073 6372 6F6C 6C62 6163 6B44 5752 4407" /* scrollbackDWRD. */ + $"7061 6464 696E 6748 4558 44" /* paddingHEXD */ +}; + +data 'TMPL' (133, "FTPs") { + $"0776 6572 7369 6F6E 4457 5244 406D 6F64" /* .versionDWRD@mod */ + $"6520 2830 203D 206F 6666 2C20 3120 3D20" /* e (0 = off, 1 = */ + $"6F6E 2C20 6E6F 2070 6173 7377 6F72 6473" /* on, no passwords */ + $"2C20 3220 3D20 6F6E 2C20 7061 7373 776F" /* , 2 = on, passwo */ + $"7264 7320 7265 7175 6972 6564 2944 5752" /* rds required)DWR */ + $"4418 6372 6561 746F 7220 666F 7220 6269" /* D.creator for bi */ + $"6E61 7279 2066 696C 6573 544E 414D 1574" /* nary filesTNAM.t */ + $"7970 6520 666F 7220 6269 6E61 7279 2066" /* ype for binary f */ + $"696C 6573 544E 414D 1663 7265 6174 6F72" /* ilesTNAM.creator */ + $"2066 6F72 2074 6578 7420 6669 6C65 7354" /* for text filesT */ + $"4E41 4D0C 7368 6F77 2046 5450 206C 6F67" /* NAM.show FTP log */ + $"4442 5954 0675 6E75 7365 6444 4259 5410" /* DBYT.unusedDBYT. */ + $"7573 6520 4D61 6342 696E 6172 7920 4949" /* use MacBinary II */ + $"4442 5954 0675 6E75 7365 6444 4259 5406" /* DBYT.unusedDBYT. */ + $"756E 7573 6564 4442 5954 2372 6573 6574" /* unusedDBYT#reset */ + $"204D 6163 4269 6E61 7279 2061 6674 6572" /* MacBinary after */ + $"2065 6163 6820 7472 616E 7366 6572 4442" /* each transferDB */ + $"5954 1375 7365 2049 534F 2074 7261 6E73" /* YT.use ISO trans */ + $"6C61 7469 6F6E 4442 5954 0770 6164 6469" /* lationDBYT.paddi */ + $"6E67 4845 5844" /* ngHEXD */ +}; + +data 'TMPL' (134, "taBL") { + $"1328 6F74 6865 7229 2074 6F20 4D61 6352" /* .(other) to MacR */ + $"6F6D 616E 4831 3030 134D 6163 526F 6D61" /* omanH100.MacRoma */ + $"6E20 746F 2028 6F74 6865 7229 4831 3030" /* n to (other)H100 */ +}; + +data 'TRSL' (256, "No Translation", preload) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"8081 8283 8485 8687 8889 8A8B 8C8D 8E8F" /* */ + $"9091 9293 9495 9697 9899 9A9B 9C9D 9E9F" /* */ + $"A0A1 A2A3 A4A5 A6A7 A8A9 AAAB ACAD AEAF" /* */ + $"B0B1 B2B3 B4B5 B6B7 B8B9 BABB BCBD BEBF" /* */ + $"C0C1 C2C3 C4C5 C6C7 C8C9 CACB CCCD CECF" /* */ + $"D0D1 D2D3 D4D5 D6D7 D8D9 DADB DCDD DEDF" /* */ + $"E0E1 E2E3 E4E5 E6E7 E8E9 EAEB ECED EEEF" /* */ + $"F0F1 F2F3 F4F5 F6F7 F8F9 FAFB FCFD FEFF" /* */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"8081 8283 8485 8687 8889 8A8B 8C8D 8E8F" /* */ + $"9091 9293 9495 9697 9899 9A9B 9C9D 9E9F" /* */ + $"A0A1 A2A3 A4A5 A6A7 A8A9 AAAB ACAD AEAF" /* */ + $"B0B1 B2B3 B4B5 B6B7 B8B9 BABB BCBD BEBF" /* */ + $"C0C1 C2C3 C4C5 C6C7 C8C9 CACB CCCD CECF" /* */ + $"D0D1 D2D3 D4D5 D6D7 D8D9 DADB DCDD DEDF" /* */ + $"E0E1 E2E3 E4E5 E6E7 E8E9 EAEB ECED EEEF" /* */ + $"F0F1 F2F3 F4F5 F6F7 F8F9 FAFB FCFD FEFF" /* */ +}; + +data 'TRSL' (257, "FTP ISO->MAC & MAC->ISO", preload) { + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"A5AA ADB0 B3B7 BABD C3C5 C9D1 D4D9 DAB6" /* ڶ */ + $"C6CE E2E3 E4F0 F6F7 F9FA FBFD FEFF F5C4" /* */ + $"CAC1 A2A3 DBB4 CFA4 ACA9 BBC7 C2D0 A8F8" /* ۴ϤШ */ + $"A1B1 D3D2 ABB5 A6E1 FCD5 BCC8 B9B8 B2C0" /* ҫռȹ */ + $"CBE7 E5CC 8081 AE82 E983 E6E8 EDEA EBEC" /* ̀ */ + $"DC84 F1EE EFCD 85D7 AFF4 F2F3 86A0 DEA7" /* ܄ͅׯާ */ + $"8887 898B 8A8C BE8D 8F8E 9091 9392 9495" /* */ + $"DD96 9897 999B 9AD6 BF9D 9C9E 9FE0 DFD8" /* ݖֿ */ + $"0001 0203 0405 0607 0809 0A0B 0C0D 0E0F" /* .............. */ + $"1011 1213 1415 1617 1819 1A1B 1C1D 1E1F" /* ................ */ + $"2021 2223 2425 2627 2829 2A2B 2C2D 2E2F" /* !"#$%&'()*+,-./ */ + $"3031 3233 3435 3637 3839 3A3B 3C3D 3E3F" /* 0123456789:;<=>? */ + $"4041 4243 4445 4647 4849 4A4B 4C4D 4E4F" /* @ABCDEFGHIJKLMNO */ + $"5051 5253 5455 5657 5859 5A5B 5C5D 5E5F" /* PQRSTUVWXYZ[\]^_ */ + $"6061 6263 6465 6667 6869 6A6B 6C6D 6E6F" /* `abcdefghijklmno */ + $"7071 7273 7475 7677 7879 7A7B 7C7D 7E7F" /* pqrstuvwxyz{|}~. */ + $"C4C5 C7C9 D1D6 DCE1 E0E2 E4E3 E5E7 E9E8" /* */ + $"EAEB EDEC EEEF F1F3 F2F4 F6F5 FAF9 FBFC" /* */ + $"DDB0 A2A3 A780 B6DF AEA9 81B4 A882 C6D8" /* ݰ߮ */ + $"83B1 BE84 A5B5 8F85 BDBC 86AA BA87 E6F8" /* */ + $"BFA1 AC88 9F89 90AB BB8A A0C0 C3D5 91A6" /* Ց */ + $"AD8B B3B2 8CB9 F7D7 FF8D 8EA4 D0F0 DEFE" /* */ + $"FDB7 9293 94C2 CAC1 CBC8 CDCE CFCC D3D4" /* */ + $"95D2 DADB D99E 9697 AF98 999A B89B 9C9D" /* ٞ */ +}; + +data 'WIND' (256, "Graphics Window", purgeable) { + $"0028 0028 0154 01B8 0000 0100 0100 0000" /* .(.(.T......... */ + $"0000 0847 7261 7068 6963 73" /* ...Graphics */ +}; + +data 'WIND' (257, "FTP Log", purgeable) { + $"00EC 000C 014C 00FC 0000 0000 0000 0000" /* ....L......... */ + $"0000 0746 5450 204C 6F67" /* ...FTP Log */ +}; + +data 'PrEf' (1990, "Application Prefs Master Copy") { + $"0002 0000 0004 0000 0003 7474 7874 0101" /* ..........ttxt.. */ + $"0100 0001 000F 000F 000A 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000" /* ............ */ +}; + +data 'SeSn' (1991, "<Default>") { + $"0001 0017 FFFF 0001 0078 0000 0000 0000" /* .......x...... */ + $"0000 0000 01FF FFFF 093C 4465 6661 756C" /* .....<Defaul */ + $"743E 0000 0000 0000 0000 0000 0000 0000" /* t>.............. */ + $"0000 0000 0000 0000 0004 4E6F 6E65 0000" /* ..........None.. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 146E 6F77 6865" /* ...........nowhe */ + $"7265 2E6C 6F6F 7062 6163 6B2E 6564 7500" /* re.loopback.edu. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0400" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000" /* .. */ +}; + +data 'TeRm' (1991, "<Default>") { + $"0001 0000 0000 0000 FFFF FFFF FFFF FFFF" /* ........ */ + $"2129 1EB5 FFFF FFFF FFFF 1DEF 1CF8 FFFF" /* !)... */ + $"0000 0000 0000 0001 0050 0018 0009 00C8" /* .........P.... */ + $"0101 0100 0001 0101 064D 6F6E 6163 6F00" /* .........Monaco. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0A56 5432 3230 0000" /* ........VT220.. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0001 0001" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 FFFF FFFF FFFF 0000 0000" /* .......... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000" /* .. */ +}; + +data 'BNDL' (18371) { + $"726C 6654 0000 0001 4652 4546 0004 0000" /* rlfT....FREF.... */ + $"8000 0002 0082 0003 0083 0004 0084 0005" /* ............ */ + $"0085 4943 4E23 0004 0000 0080 0002 0082" /* .ICN#........ */ + $"0003 0083 0004 0084 0005 0085" /* ......... */ +}; + +data 'cctb' (1000) { + $"0000 0000 0000 0003 0000 0000 0000 0000" /* ................ */ + $"0001 FFFF FFFF FFFF 0002 0000 0000 0000" /* .......... */ + $"0003 FFFF FFFF FFFF" /* .. */ +}; + +data 'FTPs' (1990, "FTP Server Prefs Master Copy") { + $"0000 0000 3F3F 3F3F 4249 4E41 7474 7874" /* ....????BINAttxt */ + $"0001 0100 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ +}; + +data 'rlfT' (0, "Owner resource") { + $"00" /* . */ +}; + +data 'TeR2' (1991, "<Default>") { + $"0001 0000 0000 0000 FFFF FFFF FFFF FFFF" /* ........ */ + $"2129 1EB5 FFFF FFFF FFFF 1DEF 1CF8 FFFF" /* !)... */ + $"0000 0000 0000 0001 0050 0018 0009 00C8" /* .........P.... */ + $"0101 0100 0001 0101 064D 6F6E 6163 6F00" /* .........Monaco. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0A56 5432 3230 0000" /* ........VT220.. */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0001 0001" /* ................ */ + $"0C4E 4353 4120 5654 2042 6F6C 6400 0000" /* .NCSA VT Bold... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0009 0000 0000 0000 0000 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000" /* ............ */ +}; + +data 'CDEF' (1109, "Tab Panel mw68", purgeable) { + $"600A 0000 4344 4546 0455 0000 4EFA 0016" /* `..CDEF.U..N.. */ + $"41FA FFEE D1FC 0000 151C 2008 A055 C18C" /* A.... .U */ + $"4E75 4E75 4E56 FFF6 48E7 1F30 382E 0012" /* NuNuNVH.08... */ + $"246E 000E 262E 0008 7E00 4EBA FFD4 2640" /* $n..&...~.N&@ */ + $"204A A069 1D40 FFF6 204A A029 2052 4AA8" /* Ji.@ J) RJ */ + $"001C 6714 2052 2068 001C A069 1D40 FFF7" /* ..g. R h..i.@ */ + $"2052 2068 001C A029 486E FFF8 A874 206E" /* R h..)Hnt n */ + $"FFF8 3A28 0044 3C28 004A 3004 0240 0001" /* :(.D<(.J0..@.. */ + $"671A 554F 3EB8 0BA6 301F 3F00 A887 554F" /* g.UO>.0.?.UO */ + $"3EB8 0BA8 301F 3F00 A88A 6014 3004 0240" /* >.0.?.`.0..@ */ + $"0008 660C 3F3C 0003 A887 3F3C 0009 A88A" /* ..f.?<..?<.ƨ */ + $"302E 000C 0C40 000B 6200 00E6 D040 303B" /* 0....@..b..@0; */ + $"0006 4EFB 0002 006C 008C 00BA 0018 004A" /* ..N...l.....J */ + $"00DA 00DA 00DA 00DA 00DA 00D0 00D0 3F06" /* .......?. */ + $"3F05 3F04 2F0A 4EBA 0102 2052 4AA8 001C" /* ?.?./N.. RJ.. */ + $"4FEF 000A 6700 00AA 2052 2068 001C A069" /* O.g.. R h..i */ + $"1D40 FFF7 2052 2068 001C A029 6000 0092" /* .@ R h..)`.. */ + $"2052 4AA8 001C 6700 0088 2052 2068 001C" /* RJ..g.. R h.. */ + $"A02A 2052 2068 001C A023 2052 42A8 001C" /* * R h..# RB.. */ + $"606E 2052 4A28 0010 6766 2052 2068 0004" /* `n RJ(..gf R h.. */ + $"4A28 006E 675A 3F04 2F0A 4EBA 0350 5C4F" /* J(.ngZ?./N.P\O */ + $"604E 2003 7210 E2A0 3D40 FFFC 3D43 FFFE" /* `N .r.=@=C */ + $"554F 2F2E FFFC 2052 4868 0008 A8AD 101F" /* UO/. RHh.... */ + $"672E 2F03 2F0A 4EBA 01E2 2E00 504F 6020" /* g././N...PO` */ + $"2003 0280 7FFF FFFF 2040 4850 2052 4868" /* ... @HP RHh */ + $"0008 A8DF 600A 2F03 2052 4868 0008 A8DF" /* ..`/. RHh.. */ + $"3004 0240 0008 6608 3F05 A887 3F06 A88A" /* 0..@..f.?.?. */ + $"2052 4AA8 001C 670C 2052 2068 001C 102E" /* RJ..g. R h.... */ + $"FFF7 A06A 204A 102E FFF6 A06A 200B C18C" /* j J..j . */ + $"2F47 003A 4CDF 0CF8 4E5E 205F 4FEF 000C" /* /G.:L.N^ _O.. */ + $"4ED0 846D 6169 6E00 0000 4E56 FFF8 48E7" /* NЄmain...NVH */ + $"1F30 266E 0008 701C A122 2448 200A 6700" /* .0&n..p."$H g. */ + $"0148 7601 600E 3003 5340 2052 D0C0 3183" /* .Hv.`.0.S@ R1 */ + $"0010 5243 0C43 0005 6DEC 082E 0001 000D" /* ..RC.C..m...... */ + $"6708 2053 3828 0016 6014 2053 3828 0026" /* g. S8(..`. S8(.& */ + $"0C44 0002 6D06 0C44 0008 6F02 7804 7605" /* .D..m..D..o.x.v. */ + $"C7C4 2053 4A68 0016 6E08 2053 3144 0016" /* SJh..n. S1D.. */ + $"600E 2053 B668 0016 6C06 2053 3143 0016" /* `. Sh..l. S1C.. */ + $"2053 B668 0012 6C08 2053 317C 0001 0012" /* Sh..l. S1|.... */ + $"2053 3268 0016 2A09 2605 87C4 2005 81C4" /* S2h..*&. . */ + $"4840 4A40 6702 5243 2053 2D68 0008 FFF8" /* H@J@g.RC S-h.. */ + $"2D68 000C FFFC 3E2E FFFE 9E6E FFFA 3C2E" /* -h..>.n<. */ + $"FFFC 9C6E FFF8 2053 2A28 0024 7210 E2A5" /* n S*(.$r. */ + $"4A45 6D0C 3047 2008 81FC 0002 BA40 6F02" /* JEm.0G ...@o. */ + $"7A00 3007 9045 3203 5341 C3FC 000A 9041" /* z.0.E2.SA.A */ + $"2052 3140 0006 2053 2252 3368 0014 0004" /* R1@.. S"R3h.... */ + $"2052 BC68 0004 6F0A 3006 D040 2052 3140" /* Rh..o0.@ R1@ */ + $"0004 3046 2008 81C3 2052 3140 0008 082E" /* ..0F . R1@.... */ + $"0001 000D 6714 2052 317C 0001 000C 2053" /* ....g. R1|.... S */ + $"2252 3368 0016 000E 600C 2052 3143 000C" /* "R3h....`. R1C.. */ + $"2052 3144 000E 2053 317C 0001 0014 2052" /* R1D.. S1|.... R */ + $"4268 000A 2052 30AE 000E 2052 316E 0010" /* Bh. R0.. R1n.. */ + $"0002 2053 214A 001C 4CDF 0CF8 4E5E 4E75" /* .. S!J..L.N^Nu */ + $"8664 6F49 6E69 7400 0000 4E56 FFE4 48E7" /* doInit...NVH */ + $"1F30 266E 0008 262E 000C 2053 2468 001C" /* .0&n..&... S$h.. */ + $"200A 6606 7000 6000 0112 2003 7210 E2A0" /* f.p.`... .r. */ + $"3D40 FFEC 3D43 FFEE 2052 3E28 0008 2052" /* =@=C R>(.. R */ + $"3D68 000C FFE8 2053 3D68 0016 FFE4 2053" /* =h.. S=h.. S */ + $"2D68 0008 FFF0 2D68 000C FFF4 2D68 0008" /* -h..-h..-h.. */ + $"FFF8 2D68 000C FFFC 7801 6000 00C4 3004" /* -h..x.`..0. */ + $"5340 2052 D0C0 3630 0010 3F03 2F0B 4EBA" /* S@ R60..?./.N */ + $"0B7E 3D40 FFEA 3F03 2F0B 4EBA 0B22 3D40" /* .~=@?./.N."=@ */ + $"FFE6 302E FFFA D06E FFEA 3D40 FFFE 302E" /* 0.n=@0. */ + $"FFFC 9047 3D40 FFF8 2D6E FFF8 FFF0 2D6E" /* G=@-n-n */ + $"FFFC FFF4 7A01 4FEF 000C 605C 2052 3C03" /* z.O..`\ R<. */ + $"5346 CDE8 000E DC45 BC6E FFE4 6E50 554F" /* SF..EnnPUO */ + $"2F2E FFEC 486E FFF0 A8AD 101F 6728 554F" /* /.Hn..g(UO */ + $"A973 101F 66F8 486E FFEC A972 554F 2F2E" /* s..fHnrUO/. */ + $"FFEC 486E FFF0 A8AD 101F 6706 3046 2008" /* Hn..g.0F . */ + $"6038 7000 6034 486E FFF0 302E FFEA 5340" /* `8p.`4Hn0.S@ */ + $"3F00 4267 A8A8 5245 BA6E FFE6 6F9E 486E" /* ?.BgREnoHn */ + $"FFF8 3F3C 000A 3007 4440 3F00 A8A8 5244" /* ?<.0.D@?.RD */ + $"B86E FFE8 6F00 FF38 7000 4CDF 0CF8 4E5E" /* no.8p.L.N^ */ + $"4E75 8664 6F54 6573 7400 0000 4E56 FFF0" /* NudoTest...NV */ + $"48E7 1F30 266E 0008 2053 2468 001C 200A" /* H.0&n.. S$h.. */ + $"6700 0146 2053 0C28 00FF 0011 6700 013A" /* g..F S.(...g..: */ + $"2053 4A28 0011 6712 2053 7000 1028 0011" /* SJ(..g. Sp..(.. */ + $"2053 3140 0012 6000 0120 700E A122 2608" /* S1@..`.. p."&. */ + $"4A83 6700 0114 41FA 0122 2D48 FFF2 2043" /* Jg...A."-H C */ + $"2050 208B 2043 2050 316E 000C 0004 2053" /* P C P1n.... S */ + $"2D68 0008 FFF8 2D68 000C FFFC 2052 302E" /* -h..-h.. R0. */ + $"FFF8 D068 0004 3D40 FFFC 2043 2050 216E" /* h..=@ C P!n */ + $"FFF8 0006 216E FFFC 000A 594F A8D8 205F" /* ..!n.YO _ */ + $"2C08 2F06 A87A 594F A8D8 205F 2808 2F04" /* ,./.zYO _(./. */ + $"486E FFF8 A8DF 2F06 2F04 2F04 A8E4 2052" /* Hn/././. R */ + $"2253 3E29 0012 5347 48C7 8FE8 000E 5247" /* "S>)..SGHǏ..RG */ + $"2052 BE68 0010 6746 2052 317C 0001 001A" /* Rh..gF R1|.... */ + $"2052 3147 0010 2052 3D68 000C FFF0 7A00" /* R1G.. R=h..z. */ + $"3D7C 0001 FFF6 6018 5245 BA47 6602 5245" /* =|..`.REGf.RE */ + $"2052 302E FFF6 D0C0 3185 0010 526E FFF6" /* R0.1..Rn */ + $"302E FFF0 5340 B06E FFF6 6CDC 6006 2052" /* 0.S@nl`. R */ + $"4268 001A 4EBA 0C1E 0C40 0700 6D0E 2F04" /* Bh..N...@..m./. */ + $"2F2E FFF2 2F03 42A7 ABCA 6012 42A7 2F03" /* /./.B`.B/. */ + $"2F2E FFF2 2F04 4EBA 0B06 4FEF 0010 2F06" /* /./.N..O../. */ + $"A879 2F04 A8D9 2F06 A8D9 2043 A023 2053" /* y/./. C# S */ + $"2252 3368 0012 000A 4CDF 0CF8 4E5E 4E75" /* "R3h...L.N^Nu */ + $"8664 6F44 7261 7700 0000 4E56 FF84 48E7" /* doDraw...NVH */ + $"1F30 362E 0012 7A00 422E FFD1 422E FFAF" /* .06...z.B.B. */ + $"266E 0008 200B 670E 2053 2450 2053 3D68" /* &n.. .g. S$P S=h */ + $"0004 FFA8 6004 6000 0716 2052 2668 001C" /* ..`.`... R&h.. */ + $"200B 6700 070A 486E FFAA A874 0C43 0001" /* .g..Hnt.C.. */ + $"6F0E 206E FFAA 0828 0007 0006 6602 7601" /* o. n.(....f.v. */ + $"2053 3D68 000A FFA6 2052 3D68 0012 FFD8" /* S=h. R=h.. */ + $"2052 3D68 0016 FFB2 2053 3D68 0008 FFB4" /* R=h.. S=h.. */ + $"2053 3D68 000C FFC8 2053 326E FFB2 2009" /* S=h.. S2n */ + $"81E8 000E B06E FFC8 6706 1D7C 0001 FFAF" /* ..ng..|.. */ + $"486E FFB8 A88B 302E FFBA D06E FFBE 3D40" /* Hn0.n=@ */ + $"FFB0 302E FFB8 D06E FFB0 3D40 FFA4 486E" /* 0.n=@Hn */ + $"FF92 A898 2F3C 0001 0001 A89B 486C 0000" /* /<....Hl.. */ + $"A89D 2052 2D68 0008 FFF8 2D68 000C FFFC" /* R-h..-h.. */ + $"2D68 0008 FFF0 2D68 000C FFF4 2053 302E" /* -h..-h.. S0. */ + $"FFF0 D068 0004 3D40 FFF4 2D6E FFF0 FF84" /* h..=@-n */ + $"2D6E FFF4 FF88 302E FFC8 5340 C1FC 000A" /* -n0.S@. */ + $"322E FFF6 9240 3D41 FFF6 0C43 0002 6F00" /* 2.@=A.C..o. */ + $"0084 486E FFD2 486E FF8C 4EBA 091C 1F3C" /* .HnHnN..< */ + $"0001 4267 2F0A 4EBA 0888 486E FFE2 4EBA" /* ..Bg/N.HnN */ + $"094E 4A00 4FEF 0014 6712 486E FFE2 AA14" /* NJ.O..g.Hn. */ + $"486E FFDC 4EBA 0938 584F 6024 3D7C 8888" /* HnN8XO`$=| */ + $"FFE6 3D7C 8888 FFE4 3D7C 8888 FFE2 3D7C" /* =|=|=| */ + $"CCCC FFE0 3D7C CCCC FFDE 3D7C CCCC FFDC" /* =|=| */ + $"7A01 1D7C 0001 FFD1 0C6E FFFF FFD2 6614" /* z..|...nf. */ + $"0C6E FFFF FFD4 660C 0C6E FFFF FFD6 6604" /* .nf..nf. */ + $"422E FFD1 7601 6000 0586 3003 5340 2053" /* B.v.`..0.S@ S */ + $"D0C0 3D70 0010 FFCA 3F2E FFCA 2F0A 4EBA" /* =p..?./N */ + $"078E 3D40 FFB6 302E FFFA D06E FFB6 3D40" /* .=@0.n=@ */ + $"FFFE 302E FFFC 906E FFB4 3D40 FFF8 3D6E" /* 0.n=@=n */ + $"FFFC FFDA 2053 302E FFF2 D068 0006 3D40" /* S0.h..=@ */ + $"FFCC 3E2E FFF6 9E40 2053 4A68 001A 5C4F" /* >.@ SJh..\O */ + $"6722 4A2E FFAF 671C 2D6E FFF8 FFC0 2D6E" /* g"J.g.-n-n */ + $"FFFC FFC4 5940 3D40 FFC6 586E FFC2 486E" /* Y@=@XnHn */ + $"FFC0 A8A3 3F2E FFCA 2F0A 4EBA 06D2 3D40" /* ?./N.=@ */ + $"FFCE 7801 5C4F 6000 0306 3C2E FFCA 5346" /* x.\O`...<.SF */ + $"2053 CDE8 000E DC44 BC6E FFB2 6E00 02F8" /* S..Dnn.. */ + $"B86E FFCE 6606 3D6E FFCC FFFE 4A05 6710" /* nf.=nJ.g. */ + $"1F3C 0001 3F3C 0002 2F0A 4EBA 0754 504F" /* .<..?<../N.TPO */ + $"3F2E FFB0 3F2E FFA4 3F2E FFA6 3F06 2053" /* ?.?.?.?. S */ + $"1F28 001B 1F2E FFD1 486E FFF8 3F2E FFA8" /* .(....Hn?. */ + $"2F0A 4EBA 04D6 4A05 4FEF 0016 6700 01C4" /* /N.J.O..g.. */ + $"4878 001E A862 302E FFFA 5240 3F00 302E" /* Hx..b0.R@?.0. */ + $"FFFC 5340 3F00 A893 BC6E FFD8 6608 2F3C" /* S@?.nf./< */ + $"0001 0000 A894 302E FFFA 5240 3F00 302E" /* ....0.R@?.0. */ + $"FFF8 5640 3F00 A891 302E FFFA 5640 3F00" /* V@?.0.V@?. */ + $"302E FFF8 5240 3F00 A891 302E FFFE 5B40" /* 0.R@?.0.[@ */ + $"3F00 302E FFF8 5240 3F00 A891 BC6E FFD8" /* ?.0.R@?.n */ + $"662C 2F3C 0001 0001 A894 302E FFFA 5440" /* f,/<....0.T@ */ + $"3F00 302E FFF8 5440 3F00 A891 302E FFFA" /* ?.0.T@?.0. */ + $"5440 3F00 302E FFFC 5240 3F00 A891 0C43" /* T@?.0.R@?..C */ + $"0001 6600 0098 BC6E FFD8 6700 0090 4878" /* ..f..ng..Hx */ + $"001E A862 3F2E FFFA 302E FFFC 5240 3F00" /* ..b?.0.R@?. */ + $"A893 0C44 0001 6608 4878 0003 A894 6008" /* .D..f.Hx..`. */ + $"2F3C 0000 FFFF A894 B86E FFCE 661C 302E" /* /<..nf.0. */ + $"FFFE 5740 3F00 302E FFFC 5240 3F00 A891" /* W@?.0.R@?. */ + $"2F3C 0000 FFFF A894 600E 3F2E FFFE 302E" /* /<..`.?.0. */ + $"FFFC 5240 3F00 A891 2F3C 0001 0000 A894" /* R@?./<.... */ + $"0C44 0001 6614 302E FFFA 5640 3F00 302E" /* .D..f.0.V@?.0. */ + $"FFFC 5440 3F00 A891 6012 302E FFFA 5540" /* T@?.`.0.U@ */ + $"3F00 302E FFFC 5440 3F00 A891 486E FFE2" /* ?.0.T@?.Hn */ + $"AA14 302E FFFE 5940 3F00 302E FFF8 5240" /* .0.Y@?.0.R@ */ + $"3F00 A893 302E FFFE 5540 3F00 302E FFF8" /* ?.0.U@?.0. */ + $"5640 3F00 A891 BC6E FFD8 6640 302E FFFE" /* V@?.nf@0. */ + $"5540 3F00 3F2E FFFC A891 4A2E FFD1 670A" /* U@?.?.J.g */ + $"2F3C 0001 FFFF A894 6008 2F3C 0000 FFFF" /* /<..`./<.. */ + $"A894 486E FFDC AA14 302E FFFE 5740 3F00" /* Hnܪ.0.W@?. */ + $"302E FFF8 5640 3F00 A891 6012 302E FFFE" /* 0.V@?.`.0. */ + $"5540 3F00 302E FFFC 5340 3F00 A891 B86E" /* U@?.0.S@?.n */ + $"FFCE 660E 0C43 0001 6708 2F3C 0002 0000" /* f..C..g./<.... */ + $"A892 4A05 670E 1F3C 0001 4267 2F0A 4EBA" /* J.g..<..Bg/N */ + $"0550 504F 3F2E FFFA 3F2E FFFC A893 3F2E" /* .PPO?.?.?. */ + $"FFFA 302E FFF8 5640 3F00 A891 302E FFFA" /* 0.V@?.0. */ + $"5640 3F00 3F2E FFF8 A891 302E FFFE 5940" /* V@?.?.0.Y@ */ + $"3F00 3F2E FFF8 A891 302E FFFE 5340 3F00" /* ?.?.0.S@?. */ + $"302E FFF8 5640 3F00 A891 302E FFFE 5340" /* 0.V@?.0.S@ */ + $"3F00 3F2E FFFC A891 302E FFFE 5540 3F00" /* ?.?.0.U@?. */ + $"3F2E FFFC A893 BC6E FFD8 6712 0C43 0001" /* ?.ng..C.. */ + $"660C 3F2E FFFA 3F2E FFFC A891 603E 0C43" /* f.?.?.`>.C */ + $"0001 6638 2D6E FFF8 FFE8 2D6E FFFC FFEC" /* ..f8-n-n */ + $"526E FFEA 536E FFEE 302E FFEC 526E FFEC" /* RnSn0.Rn */ + $"3D40 FFE8 4A05 670E 486E FFD2 AA14 546E" /* =@J.g.HnҪ.Tn */ + $"FFEA 556E FFEE 486E FFE8 A8A3 486E FFF8" /* UnHn訣Hn */ + $"302E FFB6 5340 3F00 4267 A8A8 5244 B86E" /* 0.S@?.BgRDn */ + $"FFCE 6F00 FCF6 4A05 670E 1F3C 0001 4267" /* o.J.g..<..Bg */ + $"2F0A 4EBA 046C 504F 0C43 0001 661A 382E" /* /N.lPO.C..f.8. */ + $"FFF2 3F04 3F2E FFDA A893 3F04 302E FFF4" /* ?.?.ڨ?.0. */ + $"5340 3F00 A891 6006 78F6 D86E FFF6 3F04" /* S@?.`.xn?. */ + $"302E FFF4 5340 3F00 A893 302E FFF6 5340" /* 0.S@?.0.S@ */ + $"3F00 302E FFF4 5340 3F00 A891 302E FFF6" /* ?.0.S@?.0. */ + $"5340 3F00 3F2E FFDA A891 4A47 670A 3007" /* S@?.?.ڨJGg0. */ + $"4440 3F00 4267 A892 4A05 6700 014A 4878" /* D@?.BgJ.g..JHx */ + $"001E A862 2F3C 0002 0002 A89B 0C43 0001" /* ..b/<.....C.. */ + $"6620 3004 5240 3F00 302E FFDA 5240 3F00" /* f 0.R@?.0.R@?. */ + $"A893 3004 5240 3F00 302E FFF4 5740 3F00" /* 0.R@?.0.W@?. */ + $"A891 2F3C 0001 0001 A89B 4A47 6736 302E" /* /<....JGg60. */ + $"FFF6 5740 3F00 302E FFDA 5240 3F00 A893" /* W@?.0.R@?. */ + $"3007 4440 5240 3F00 4267 A892 0C43 0001" /* 0.D@R@?.Bg.C.. */ + $"6612 2F3C 0001 FFFF A894 3007 5340 3F00" /* f./<..0.S@?. */ + $"4267 A892 486E FFDC AA14 2F3C 0001 0001" /* BgHnܪ./<.... */ + $"A89B 302E FFF6 5740 3F00 302E FFF4 5740" /* 0.W@?.0.W@ */ + $"3F00 A893 0C43 0001 661A 3004 5640 3F00" /* ?..C..f.0.V@?. */ + $"302E FFF4 5740 3F00 A891 2F3C 0001 FFFF" /* 0.W@?./<.. */ + $"A894 600C 3F04 302E FFF4 5540 3F00 A893" /* `.?.0.U@?. */ + $"486E FFE2 AA14 302E FFF6 5540 3F00 302E" /* Hn.0.U@?.0. */ + $"FFF4 5540 3F00 A891 0C43 0001 6704 4A47" /* U@?..C..g.JG */ + $"672C 302E FFF6 5540 3F00 302E FFDA 5240" /* g,0.U@?.0.R@ */ + $"3F00 A891 4A2E FFD1 670A 2F3C 0001 FFFF" /* ?.J.g/<.. */ + $"A894 6024 2F3C 0000 FFFF A894 601A 302E" /* `$/<..`.0. */ + $"FFF6 5540 3F00 302E FFF8 5640 3F00 A891" /* U@?.0.V@?. */ + $"2F3C 0000 FFFF A894 486E FFDC AA14 0C43" /* /<..Hnܪ..C */ + $"0001 6612 302E FFF6 5740 3F00 302E FFF4" /* ..f.0.W@?.0. */ + $"5740 3F00 A891 486E FFF0 4878 000A A8A8" /* W@?.HnHx.¨ */ + $"046E 000A FFF4 486E FFF8 4267 302E FFB4" /* .n.HnBg0. */ + $"4440 3F00 A8A8 3D6E FFF2 FFFA 5243 B66E" /* D@?.=nRCn */ + $"FFC8 6F00 FA76 4A05 670E 486E FFD2 486E" /* o.vJ.g.HnHn */ + $"FF8C 4EBA 0326 504F 486E FF92 A899 4CDF" /* N.&POHnL */ + $"0CF8 4E5E 205F 4FEF 000C 4ED0 8B44 5241" /* .N^ _O..NЋDRA */ + $"5743 4F4E 5452 4F4C 0000 4E56 FEF0 48E7" /* WCONTROL..NVH */ + $"1C30 282E 0008 246E 000E 1A2E 0012 362E" /* .0(...$n......6. */ + $"0016 3D7C 0001 FEF0 B66E 0018 6710 2044" /* ..=|..n..g. D */ + $"2050 B668 0012 6706 4A2E 0014 6730 2D52" /* Ph..g.J...g0-R */ + $"FEF8 2D6A 0004 FEFC 486E FEF8 2F3C 0002" /* -j..Hn/<.. */ + $"0002 A8A9 2044 2050 B668 0012 6606 5A6E" /* .. D Ph..f.Zn */ + $"FEFC 6004 546E FEFC 486E FEF8 A8A3 3F03" /* `.TnHn?. */ + $"486E FF00 2044 2050 4868 0028 4EBA 00D4" /* Hn. D PHh.(N. */ + $"4A2E FF00 4FEF 000A 6700 00B4 594F A8D8" /* J..O.g..YO */ + $"205F 2648 2F0B A87A 4A05 6706 486E FEF2" /* _&H/.zJ.g.Hn */ + $"AA19 2044 2050 B668 0012 6616 082E 0000" /* . D Ph..f..... */ + $"000D 6708 3F3C 0004 A888 6006 3F3C 0001" /* ..g.?<..`.?<.. */ + $"A888 362A 0004 382A 0004 9852 3004 906E" /* 6*..8*..R0.n */ + $"001A 48C0 81FC 0002 9640 966E 001C 554F" /* ..H..@n..UO */ + $"486E FF00 A88C 301F 322A 0006 926A 0002" /* Hn.0.2*..j.. */ + $"9240 48C1 83FC 0002 D26A 0002 3801 2F0A" /* @H..j..8./ */ + $"A87B 4A05 6720 4878 001E A862 3004 5240" /* {J.g Hx..b0.R@ */ + $"3F00 3003 5240 3F00 A893 486E FF00 A884" /* ?.0.R@?.Hn. */ + $"486E FEF2 AA14 3F04 3F03 A893 486E FF00" /* Hn.?.?.Hn. */ + $"A884 4267 A888 2F0B A879 2F0B A8D9 4CDF" /* Bg/.y/.L */ + $"0C38 4E5E 4E75 8964 7261 7754 6974 6C65" /* .8N^NudrawTitle */ + $"0000 2F05 226F 0008 206F 000C 7201 7400" /* ../."o.. o..r.t. */ + $"7A01 4210 0C31 000D 1000 6604 5245 6010" /* z.B..1....f.RE`. */ + $"BA6F 0010 660A 5242 1082 11B1 1000 2000" /* o..fRB.... . */ + $"5241 7000 1011 B240 6FDA 2A1F 4E75 8C67" /* RAp...@o*.Nug */ + $"6574 4E65 7874 5469 746C 6500 0000 2F0B" /* etNextTitle.../. */ + $"266F 0008 342F 000C 2053 2268 001C 2009" /* &o..4/.. S"h.. */ + $"6606 7000 265F 4E75 2051 B468 000C 6614" /* f.p.&_Nu Qh..f. */ + $"3002 5340 2051 C1E8 000E 2053 3228 0016" /* 0.S@ Q.. S2(.. */ + $"9240 6006 2051 3228 000E 3001 265F 4E75" /* @`. Q2(..0.&_Nu */ + $"8A67 6574 4D61 7843 6F6C 7300 0000 48E7" /* getMaxCols...H */ + $"0610 266F 0010 322F 0014 2053 2268 001C" /* ..&o..2/.. S"h.. */ + $"2009 6604 7000 6044 2051 B268 000C 6614" /* f.p.`D Qh..f. */ + $"3001 5340 2051 C1E8 000E 2053 3428 0016" /* 0.S@ Q.. S4(.. */ + $"9440 6006 2051 3428 000E 2051 3A28 0006" /* @`. Q4(.. Q:(.. */ + $"3045 2208 83C2 3001 5340 C1C2 3C05 9C40" /* 0E".0.S@<.@ */ + $"3046 2008 81C2 D041 3200 3001 4CDF 0860" /* 0F .A2.0.L.` */ + $"4E75 8B67 6574 5461 6257 6964 7468 0000" /* NugetTabWidth.. */ + $"4E56 FFFC 48E7 1020 554F 2F2E 0008 486E" /* NVH. UO/...Hn */ + $"FFFC AA44 101F 4AAE FFFC 6754 206E FFFC" /* D..JgT n */ + $"2050 2468 0008 7600 603E 3043 2008 E788" /* P$h..v.`>0C . */ + $"2052 3030 0808 B06E 000C 662A 4A2E 000E" /* R00..n..f*J... */ + $"6712 3043 2008 E788 2052 D1C0 4868 000A" /* g.0C . RHh. */ + $"AA14 601C 3043 2008 E788 2052 D1C0 4868" /* .`.0C . RHh */ + $"000A AA15 600A 5243 2052 B668 0006 6FBA" /* .ª.`RC Rh..o */ + $"4CDF 0408 4E5E 4E75 8C73 6574 5061 7274" /* L..N^NusetPart */ + $"436F 6C6F 7200 0000 4E56 0000 2F2E 0008" /* Color...NV../... */ + $"AA19 2F2E 000C AA1A 4E5E 4E75 8A73 6176" /* ./....N^Nusav */ + $"6543 6F6C 6F72 7300 0000 4E56 0000 2F2E" /* eColors...NV../. */ + $"0008 AA14 2F2E 000C AA15 4E5E 4E75 8D72" /* .../....N^Nur */ + $"6573 746F 7265 436F 6C6F 7273 0000 4E56" /* estoreColors..NV */ + $"FFF6 2F2E 0008 AA19 4EBA 013A 0C40 0700" /* /....N.:.@.. */ + $"6D2C 486E FFFA AA1A 594F AA32 205F 2D48" /* m,Hn.YO2 _-H */ + $"FFF6 554F 2F2E FFF6 486E FFFA 2F2E 0008" /* UO/.Hn/... */ + $"303C 0C19 AAA2 101F 6704 7001 6002 7000" /* 0<....g.p.`.p. */ + $"4E5E 4E75 8767 6574 4772 6179 0000 4E56" /* N^NugetGray..NV */ + $"FFF0 48E7 1C30 2A2E 000C 262E 0010 95CA" /* H.0*...&... */ + $"2803 594F A8D8 205F 2648 2F0B A87A 3F3C" /* (.YO _&H/.z?< */ + $"AA29 4EBA 011C 4A00 544F 6700 0094 2044" /* )N..J.TOg.. D */ + $"2050 2D68 0006 FFF8 2D68 000A FFFC 486E" /* P-h..-h.Hn */ + $"FFF8 A870 486E FFFC A870 594F AA29 205F" /* pHnpYO) _ */ + $"2448 6066 554F 486E FFF8 2052 4868 0022" /* $H`fUOHn RHh." */ + $"486E FFF0 A8AA 101F 6746 554F 2F0A 3F3C" /* Hn..gFUO/?< */ + $"000D AA2C 101F 6738 554F 2F0A 3F3C 000F" /* ..,..g8UO/?<.. */ + $"AA2C 101F 672A 486E FFF0 A871 486E FFF4" /* ,..g*HnqHn */ + $"A871 486E FFF0 A87B 2052 2068 0016 2050" /* qHn{ R h.. P */ + $"3828 0020 3F04 4267 2F0A 2F03 2045 4E90" /* 8(. ?.Bg//. EN */ + $"594F 2F0A AA2B 205F 2448 200A 6696 6012" /* YO/ª+ _$H f`. */ + $"2F2E 0008 A879 4878 0001 2F0A 2F03 2045" /* /...yHx..//. E */ + $"4E90 2F0B A879 2F0B A8D9 4CDF 0C38 4E5E" /* N/.y/.L.8N^ */ + $"4E75 8E73 7973 3644 6576 6963 654C 6F6F" /* Nusys6DeviceLoo */ + $"7000 0000 4E56 FFFA 2F03 363C 0600 3F3C" /* p...NV/.6<..?< */ + $"A1AD 4EBA 003C 4A00 544F 6720 554F 2F3C" /* N.<J.TOg UO/< */ + $"7379 7376 486E FFFC 4EBA 0100 301F 3D40" /* sysvHnN..0.=@ */ + $"FFFA 4A6E FFFA 6604 362E FFFE 3003 261F" /* Jnf.6.0.&. */ + $"4E5E 4E75 8967 6574 4F53 5665 7273 0000" /* N^NugetOSVers.. */ + $"4E56 FFFC 48E7 1800 362E 0008 3F03 4EBA" /* NVH..6...?.N */ + $"005E 1800 0C04 0001 544F 6610 0243 07FF" /* .^......TOf..C. */ + $"4EBA 006A B640 6D04 363C A89F 594F 3F3C" /* N.j@m.6<YO?< */ + $"A89F 1F3C 0001 4EBA 02B0 205F 2D48 FFFC" /* .<..N. _-H */ + $"594F 3F03 1F04 4EBA 02A0 205F B1EE FFFC" /* YO?...N. _ */ + $"56C0 4400 4880 4CDF 0018 4E5E 4E75 8D74" /* VD.HL..N^Nut */ + $"7261 7041 7661 696C 6162 6C65 0000 026F" /* rapAvailable...o */ + $"0800 0004 6704 7001 4E75 7000 4E75 8B67" /* ....g.p.Nup.Nug */ + $"6574 5472 6170 5479 7065 0000 4E56 FFFC" /* etTrapType..NV */ + $"594F 3F3C AA6E 1F3C 0001 4EBA 024C 205F" /* YO?<n.<..N.L _ */ + $"2D48 FFFC 594F 3F3C A86E 1F3C 0001 4EBA" /* -HYO?<n.<..N */ + $"0238 205F B1EE FFFC 6606 303C 0200 6004" /* .8 _f.0<..`. */ + $"303C 0400 4E5E 4E75 8F6E 756D 546F 6F6C" /* 0<..N^NunumTool */ + $"426F 7854 7261 7073 0000 4E56 0000 203C" /* BoxTraps..NV.. < */ + $"0000 A89F A746 2F08 203C 0000 A0AD A346" /* ..F/. <..F */ + $"B1DF 670E 202E 000C A1AD 226E 0008 2288" /* g. ..."n.." */ + $"6026 41FA 0036 303C EA51 222E 000C B298" /* `&A.60<Q"... */ + $"6706 4A98 6712 60F6 43FA 0020 D3D0 4ED1" /* g.Jg.`C. N */ + $"226E 0008 2280 4240 3D40 0010 4E5E 205F" /* "n.."B@=@..N^ _ */ + $"508F 4ED0 303C EA52 60EE 7665 7273 0000" /* PN0<R`vers.. */ + $"0060 6D61 6368 0000 0064 7379 7376 0000" /* .`mach...dsysv.. */ + $"0088 7072 6F63 0000 0092 6670 7520 0000" /* .proc...fpu .. */ + $"009E 7164 2020 0000 00E8 6B62 6420 0000" /* .qd ...kbd .. */ + $"011A 6174 6C6B 0000 0142 6D6D 7520 0000" /* ..atlk...Bmmu .. */ + $"0164 7261 6D20 0000 0188 6C72 616D 0000" /* .dram ...lram.. */ + $"0188 0000 0000 0000 0000 7001 6082 2278" /* .........p.`"x */ + $"02AE 7004 0C69 0075 0008 6712 0C69 0276" /* .p..i.u..g..i.v */ + $"0008 6604 5240 6006 1038 0CB3 5C80 6000" /* ..f.R@`..8.\`. */ + $"FF60 7000 3038 015A 6000 FF56 7000 1038" /* `p.08.Z`.Vp..8 */ + $"012F 5240 6000 FF4A 0C38 0004 012F 6738" /* ./R@`.J.8.../g8 */ + $"0838 0004 0B22 6734 204F F280 0000 F327" /* .8..."g4 O..' */ + $"3017 2E48 0C40 1F18 6716 0C40 3F18 6710" /* 0..H.@..g..@?.g. */ + $"0C40 3F38 670E 0C40 1F38 6708 7000 600E" /* .@?8g..@.8g.p.`. */ + $"7001 600A 7002 6006 7003 6002 7000 6000" /* p.`p.`.p.`.p.`. */ + $"FF00 0C78 3FFF 028E 6E1C 303C A89F A746" /* ..x?.n.0<F */ + $"2408 203C 0000 AB03 A746 203C 0000 0100" /* $. <...F <.... */ + $"B488 6606 600A 7000 6006 203C 0000 0200" /* f.`p.`. <.... */ + $"6000 FECE 1038 021E 41FA 0016 2248 1218" /* `..8..A.."H.. */ + $"6700 FED2 B200 66F6 91C9 2008 6000 FEB2" /* g.Ҳ.f .`. */ + $"0313 0B02 0106 0704 0508 0900 7000 4A38" /* ...........p.J8 */ + $"0291 6B16 1238 01FB 0201 000F 0C01 0001" /* .k..8......... */ + $"6608 2078 02DC 1028 0007 6000 FE84 0C38" /* f. x..(..`..8 */ + $"0002 012F 6D16 7000 1038 0CB1 0C00 0001" /* .../m.p..8..... */ + $"670C 0C00 0003 6D04 5340 6002 7000 6000" /* g.....m.S@`.p.`. */ + $"FE60 303C A89F A746 2408 203C 0000 A88F" /* `0<F$. <.. */ + $"A746 2038 0108 B488 670A 598F 3F3C 0016" /* F 8..gY?<.. */ + $"A88F 201F 6000 FE3A 225F 121F 301F 4A01" /* .`.:"_..0.J. */ + $"6704 A746 6002 A346 2E88 4ED1 FFFF FFFF" /* g.F`.F.N */ + $"FFFF FFFF 0000 0067 8110 0000" /* ...g... */ +}; + +data 'pltt' (9999, "16 ANSI Colors") { + $"0010 0000 0000 C003 0000 0000 029D 7488" /* ............t */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"EDED 1818 1E1E 0000 0000 0000 0000 0000" /* .............. */ + $"1818 7575 3434 0000 0000 0000 0000 0000" /* ..uu44.......... */ + $"8CE2 610B 36E1 0000 0000 0000 0000 0000" /* a.6.......... */ + $"1818 2222 CDCD 0000 0000 0000 0000 0000" /* .."".......... */ + $"6C6C 1818 B0B0 0000 0000 0000 0000 0000" /* ll............ */ + $"0000 A472 D1EA 0000 0000 0000 0000 0000" /* ..r.......... */ + $"A8F5 A8F5 A8F5 0000 0000 0000 0000 0000" /* .......... */ + $"547A 547A 547A 0002 0000 0000 0000 0000" /* TzTzTz.......... */ + $"FFFF 9292 1818 0002 0000 0000 0000 0000" /* ............ */ + $"0000 FFFF 3333 0002 0000 0000 0000 0000" /* ..33.......... */ + $"FFFF FFFF 3333 0002 0000 0000 0000 0000" /* 33.......... */ + $"5B5B 8787 F2F2 0000 0000 0000 0000 0000" /* [[.......... */ + $"FFFF 0000 9999 0002 0000 0000 0000 0000" /* ............ */ + $"9998 E668 FFFF 0002 0000 0000 0000 0000" /* h.......... */ + $"FFFF FFFF FFFF 0002 0000 0000 0000 0000" /* .......... */ +}; + diff --git a/source/wdef/wdefpatch.c b/source/wdef/wdefpatch.c new file mode 100755 index 0000000..32802a8 --- /dev/null +++ b/source/wdef/wdefpatch.c @@ -0,0 +1 @@ +/******************************************* WDEF Patcher Steve Falkenburg MacDTS 1991 Apple Computer This snippet shows how you can add a simple extra part to a WDEF without writing an entire WDEF. It also shows how to access the new part via FindWindow(). Roberto Avanzi (independent programmer), June 18, 1992 Added support for tracking the extra part, in a way similar to the one used by the system. given back to Apple as an enhanced snippet (mmmh, sounds quite absurd) 6/1/92 SJF fixed a5 problem in WDEF patch (StripAddress is glue, and a5 wasn't set up) 6/1/92 SJF fixed varCode bug that made zoom boxes not work (masked out high 8 bits) *******************************************/ #ifdef MPW #pragma segment WDEFPatch #endif #include "wind.h" #include "wdefpatch.proto.h" #include "tnae.h" static void drawicon(short id, Rect *dest); /* 931112, ragge, NADA, KTH */ static void drawSize(Rect *wSize, WindowPtr window); /* add 2 to this when checking with FindWindow() ! */ #define kOurHit 32 /* * this struct allows us to insert a WDEF patch safely. It contains a jump instruction * and stores the old handle to the WDEF */ typedef struct { #ifdef __powerpc__ RoutineDescriptor rd; #else short jmpInst; ProcPtr patchAddr; #endif Handle oldAddr; Boolean partState; /* roberto avanzi jun 18 1992 */ long ourA5; struct WindRec *tw; } WDEFPatch, *WDEFPatchPtr, **WDEFPatchHndl; /* * RePatchWindowWDEF * this adjusts the tw pointer for a patched window * We have to do this since the tw for a window can change when other * windows are killed. */ void RePatchWindowWDEF (WindowPtr window, struct WindRec *tw) { WDEFPatchHndl wdPatch; wdPatch = (WDEFPatchHndl) ((WindowPeek)window)->windowDefProc; (**wdPatch).tw = tw; } /* * GetPatchStuffHandle * This returns the handle to our patch block so we can release it * when killing windows. The tw is verified to insure that this * window is really patched. */ Handle GetPatchStuffHandle (WindowPtr window, struct WindRec *tw) { WDEFPatchHndl wdPatch; wdPatch = (WDEFPatchHndl) ((WindowPeek)window)->windowDefProc; if ((**wdPatch).tw == tw) return ((Handle)wdPatch); else return ((Handle)0); } #ifdef __powerpc__ enum { uppMyWDEFPatch = kPascalStackBased | RESULT_SIZE(SIZE_CODE(sizeof(long))) | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short))) | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr))) | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short))) | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long))) }; #endif pascal long MyWDEFPatch (short varCode, WindowPtr window, short message, long param) { WDEFPatchHndl wdPatch; pascal long (*wdefProc)(short varCode,WindowPtr window,short message,long param); Handle oldWDEF; long result; Rect ourRect,ourElementRect; GrafPtr savePort; GrafPtr aPort; RgnHandle aRgn; Rect aRect; struct WindRec *tw; long appA5, saveA5; wdPatch = (WDEFPatchHndl) ((WindowPeek)window)->windowDefProc; appA5 = (**wdPatch).ourA5; saveA5 = SetA5(appA5); ourRect = (**((WindowPeek)window)->strucRgn).rgnBBox; /* our 16x16 rectangle */ SetRect(&ourElementRect,ourRect.right-55,ourRect.top+1,ourRect.right-39,ourRect.top+17); tw = (**wdPatch).tw; oldWDEF = (**wdPatch).oldAddr; HLock(oldWDEF); wdefProc = (void *)*oldWDEF; wdefProc = (void *)StripAddress(wdefProc); /* * now, folks, WHY do I check it, u'll ask me ? Heh, it's a funny quirk in * the sys WDEF (at least, sys 7's, dunno whattabout older ones) . * Suppose You click once in the grow icon and DO NOT resize the window. * (remember, just click and do not move the mouse in the meantime). * Then you click on the added part. That part is tracked in the right way, * * BUT * * ALSO the zoom box gets hilited. Dunno why should happen, but It's a lot * of FUN. Sadly, cannot find its place in any useful app. Therefore we * do this check. * APPLE says: if you write your own WDEF and receive unknown messages, do not * do anything. pass along and do NOTHING. * APPLE does: we get something new ? therefore we process it anyway, just to * keep developers writing workarounds and keep their minds afresh. * What else can we say ? Thanks !!!!! (Roberto Avanzi june 19, 1992) */ if ( (message == wDraw) ? (((short)param) != kOurHit ) : true ) { #ifdef __powerpc__ result = CallUniversalProc((UniversalProcPtr)wdefProc, uppMyWDEFPatch, varCode, window, message, param); #else result = (wdefProc)(varCode,window,message,param); #endif } if (((WindowPeek)window)->visible) if (((WindowPeek)window)->hilited) { switch (message) { case wDraw: GetPort(&savePort); GetWMgrPort(&aPort); SetPort(aPort); aRgn = NewRgn(); GetClip(aRgn); SetRect(&aRect,-32000,-32000,32000,32000); ClipRect(&aRect); switch ( (short) param ) { // Roberto Avanzi 18-06-1992: support for // tracking of the new part case 0: (**wdPatch).partState = false; case kOurHit: PenNormal(); // draw our part if (tw->aedata != NULL) { tnParams *ae = (tnParams *)tw->aedata; if (ae->encrypting || ae->decrypting) { /* * erase 18 x 11. This gives us a 1 pixel margin * on the left and right, and matches the mask that * we're using in our crsr resources. */ InsetRect(&ourElementRect, -1, 0); ourElementRect.top += 3; ourElementRect.bottom -= 2; EraseRect(&ourElementRect); ourElementRect.top -= 3; ourElementRect.bottom += 2; InsetRect(&ourElementRect, 1, 0); } if (ae->encrypting && ae->decrypting) drawicon(lockcrsr, &ourElementRect); else if (ae->encrypting) drawicon(rightcrsr, &ourElementRect); else if (ae->decrypting) drawicon(leftcrsr, &ourElementRect); } break; default: break; } SetClip(aRgn); DisposeRgn(aRgn); SetPort(savePort); break; // removed this test so that one can move the window // also when clicking on the icon area. // 931112, ragge, NADA, KTH #ifdef NOTDEF case wHit: hitPt = (Point *)¶m; // hit test our part if (PtInRect(*hitPt,&ourElementRect)) { //result = kOurHit; } break; #endif case wGrow: /* 931112, ragge, NADA, KTH */ drawSize((Rect *) param, window); break; default: break; } // switch } // if hilited (otherwise we dont see the new box, addition by Roberto Avanzi) HUnlock(oldWDEF); SetA5(saveA5); return result; } #ifdef __powerpc__ RoutineDescriptor MyWDEFPatchUniversal = BUILD_ROUTINE_DESCRIPTOR(uppMyWDEFPatch, MyWDEFPatch); #endif /* * this installs the WDEF patch into a window */ void PatchWindowWDEF (WindowPtr window, struct WindRec *tw) { WDEFPatchHndl wdefHndl; WDEFPatchPtr wdefPatch; Handle oldAddr; unsigned long wdefEntry; wdefHndl = (WDEFPatchHndl)myNewHandle(sizeof(WDEFPatch)); oldAddr = ((WindowPeek)window)->windowDefProc; if (GetMMUMode()) // 32-bit wdefEntry = (unsigned long)wdefHndl; else wdefEntry = (unsigned long)StripAddress(wdefHndl) | ((unsigned long)oldAddr&0xff000000); HLock((Handle)wdefHndl); wdefPatch = *wdefHndl; wdefPatch->oldAddr = oldAddr; #ifdef __powerpc__ BlockMove(&MyWDEFPatchUniversal, &wdefPatch->rd, sizeof(wdefPatch->rd)); #else wdefPatch->jmpInst = 0x4ef9; /*JMP*/ wdefPatch->patchAddr = (ProcPtr)MyWDEFPatch; #endif wdefPatch->ourA5 = (long)LMGetCurrentA5(); /* Use universal access (RW) */ wdefPatch->tw = tw; HUnlock((Handle)wdefHndl); ((WindowPeek)window)->windowDefProc = (Handle)wdefEntry; } /* * drawicon */ void drawicon (short id, Rect *dest) { long qdv; Handle ih = 0; Rect source_rect; BitMap mask_bitmap; GrafPtr local_port; PixMap *pm; Ptr colormap; CCrsr *ccrsr; BitMap src_bitmap; GetPort(&local_port); ih = GetResource ('crsr', id); /* color cursor */ if (!ih) return; DetachResource(ih); /* ... need to save handle somewhere ... */ HLock(ih); /* ... to avoid reloading the resource all the time */ /* * Set source Rect and intialize source BitMaps. * A few PixMap fields must be munged; */ SetRect (&source_rect, 0, 0, 16, 16); ccrsr = (CCrsr *)(*ih); mask_bitmap.bounds = source_rect; mask_bitmap.rowBytes = 2; mask_bitmap.baseAddr = (Ptr)&ccrsr->crsrMask; /* (Ptr)(((Byte *)(*ih)) + 52); */ /* * if gestalt fails or no color quickdraw, just use the b/w bitmap. */ if (Gestalt(gestaltQuickdrawVersion, &qdv) || ((qdv & gestalt32BitQD) == 0)) { src_bitmap.bounds = source_rect; src_bitmap.rowBytes = 2; src_bitmap.baseAddr = (Ptr)&ccrsr->crsr1Data; CopyBits(&src_bitmap, &(local_port->portBits), &source_rect, dest, srcCopy, nil); } else { pm = (PixMap *) ((unsigned char *)ccrsr + (long)ccrsr->crsrMap); pm->baseAddr = (Ptr) ((unsigned char *)ccrsr + (long)ccrsr->crsrData); colormap = (Ptr) ((unsigned char *)ccrsr + (long)pm->pmTable); pm->pmTable = (CTabHandle) &colormap; /* handle to colormap */ /* * Draw the crsr using its mask. * Do we need the mask ??? ... */ CopyMask((BitMap *)pm, &mask_bitmap, &(local_port->portBits), &source_rect, &source_rect, dest); } // HUnlock(ih); // ReleaseResource((Handle)ih); DisposHandle((Handle)ih); } /* 931112, ragge, NADA, KTH */ #define HOFFSET 2 #define VOFFSET 2 static Rect gGrowTextBox; static Rect gGrowTextBoxInset; Boolean gDoGrowSize = false; static struct growSavedStruct { Point charSize; Point charInset; Boolean eraseIt; PenState savedPen; short txFont; Style txFace; short txMode; short txSize; } gGrowSaved; /* 931112, ragge, NADA, KTH */ void setupForGrow(WindowPtr window, short hCharInset, short vCharInset, short hCharSize, short vCharSize) { GrafPtr savedPort; FontInfo fInfo; GetPort(&savedPort); SetPort(window); gGrowSaved.charSize.h = hCharSize; gGrowSaved.charSize.v = vCharSize; gGrowSaved.charInset.h = hCharInset; gGrowSaved.charInset.v = vCharInset; if(gGrowSaved.charSize.h == 0) // don't want zero-div gGrowSaved.charSize.h = 1; if(gGrowSaved.charSize.v == 0) gGrowSaved.charSize.v = 1; gGrowSaved.eraseIt = false; GetPenState(&gGrowSaved.savedPen); gGrowSaved.txFont = window->txFont; gGrowSaved.txFace = window->txFace; gGrowSaved.txMode = window->txMode; gGrowSaved.txSize = window->txSize; PenNormal(); TextFont(1); TextSize(9); TextFace(0); TextMode(srcCopy); GetFontInfo(&fInfo); gGrowTextBox.top = VOFFSET; gGrowTextBox.left = HOFFSET; gGrowTextBox.bottom = VOFFSET + fInfo.ascent + fInfo.descent + fInfo.leading + 3; // Yes, 3! gGrowTextBox.right = HOFFSET + StringWidth("\p000 * 000") + 6; gGrowTextBoxInset = gGrowTextBox; InsetRect(&gGrowTextBoxInset, 1, 1); gDoGrowSize = true; SetPort(savedPort); } /* 931112, ragge, NADA, KTH */ void cleanupForGrow(WindowPtr window) { GrafPtr savedPort; GetPort(&savedPort); SetPort(window); gDoGrowSize = false; InvalRect(&gGrowTextBox); SetPenState(&gGrowSaved.savedPen); window->txFont = gGrowSaved.txFont; window->txFace = gGrowSaved.txFace; window->txMode = gGrowSaved.txMode; window->txSize = gGrowSaved.txSize; SetPort(savedPort); } /* 931112, ragge, NADA, KTH */ void drawSize(Rect *wSize, WindowPtr window) { unsigned char string[50], yValLen; GrafPtr savedPort; if(!gDoGrowSize) return; GetPort(&savedPort); SetPort(window); if(!gGrowSaved.eraseIt) { NumToString((wSize->right - wSize->left - 15 - gGrowSaved.charInset.h) / gGrowSaved.charSize.h, string); string[++string[0]] = ' '; string[++string[0]] = '*'; NumToString((wSize->bottom - wSize->top - 15 - gGrowSaved.charInset.v) / gGrowSaved.charSize.v, string + string[0] + 1); yValLen = string[string[0] + 1]; string[++string[0]] = ' '; string[0] += yValLen; TextBox(string + 1, string[0], &gGrowTextBoxInset, 1); FrameRect(&gGrowTextBox); } else { Rect rGlob = gGrowTextBox; LocalToGlobal((Point *) &(rGlob.top)); LocalToGlobal((Point *) &(rGlob.bottom)); } gGrowSaved.eraseIt = !gGrowSaved.eraseIt; SetPort(savedPort); } //empty function so we can load this high at initTime void loadWDEF(void) { } \ No newline at end of file diff --git a/source/wdef/wdefpatch.proto.h b/source/wdef/wdefpatch.proto.h new file mode 100755 index 0000000..0b761bf --- /dev/null +++ b/source/wdef/wdefpatch.proto.h @@ -0,0 +1 @@ +/* * :Krb:wdefpatch.c */ extern void PatchWindowWDEF(WindowPtr window, struct WindRec *tw); extern void RePatchWindowWDEF(WindowPtr window, struct WindRec *tw); extern Handle GetPatchStuffHandle(WindowPtr window, struct WindRec *tw); extern pascal long MyWDEFPatch(short varCode, WindowPtr window, short message, long param); /* 931112, ragge, NADA, KTH */ extern void setupForGrow(WindowPtr window, short hCharInset, short vCharInset, short hCharSize, short vCharSize); extern void cleanupForGrow(WindowPtr window); void loadWDEF(void); \ No newline at end of file diff --git "a/telnet.68k.\302\265.bin" "b/telnet.68k.\302\265.bin" new file mode 100644 index 0000000..96fff18 Binary files /dev/null and "b/telnet.68k.\302\265.bin" differ diff --git "a/telnet.ppc.\302\265.bin" "b/telnet.ppc.\302\265.bin" new file mode 100644 index 0000000..b83998b Binary files /dev/null and "b/telnet.ppc.\302\265.bin" differ