📄 ckccfg.doc
字号:
Cyrillic, add -DNOCYRIL. To omit Hebrew, add -DNOHEBREW. If -DNOCSETS is*not* included, you'll always get LATIN1. There is presently no way toinclude Latin-2, Cyrillic, Hebrew, or Kanji without also including Latin-1.If Kanji support happens to be included in your version by default (as it isfor OS/2), but you don't want it, include add -DNOKANJI to your CFLAGS.5. APC EXECUTIONThe Kermit CONNECT module can be coded to execute Application Program Commandescape sequences from the host. These are of the form: ESC _ text ESC \where "text" is a C-Kermit command, or a list of C-Kermit commands separatedby commas, up to about 1K in length.To date, this feature has been coded into the OS/2, Windows, VMS, OS-9, andUNIX versions, for which the symbol: CK_APCis defined automatically in ckuusr.h. For OS/2, APC is enabled at runtimeby default, for UNIX it is disabled. It is controlled by the SET TERMINALAPC command. Configuring APC capability into a version that gets it bydefault (because CK_APC is defined in ckuusr.h) can be overridden by including: -DNOAPCon the CC command line.6. PROGRAM SIZEC-Kermit 5A is a large program, much larger than version 4.x and earlierbecause of all the new features, primarily the script programming language,sliding window packet protocol, and international character set translation.On some systems, the size of the program prevents it from being successfullylinked and loaded. On some others, it occupies so much memory that it isconstantly swapping or paging. In such cases, you can reduce C-Kermit's sizein various ways, outlined in this section. The following options can cut downon the program's size at compile time by removing features or changing thesize of storage areas.6.1. When Memory Is Not a ProblemBut first, also note that if "memory is no problem" on your system, you caneasily INCREASE the sizes of many things (buffers, command length, macrolength, maximum number of all sorts of things) simply by defining thefollowing symbol at compile time: BIGBUFOK6.2. Removing FeaturesFeatures can be removed by defining symbols on the CC (C compiler) commandline. "-D" is the normal CC directive to define a symbol so, for example,"-DNODEBUG" defines the symbol NODEBUG. Some C compilers might use differentsyntax, e.g. "-d NODEBUG" or "/DEFINE=NODEBUG". For C compilers that do nottake command-line arguments, you can put the corresponding #define statementsin the file CKCSYM.H, for example:#define NODEBUG(The #define statement must be on the left margin.) Here are C-Kermit'ssize-related compile-time options. The ones that take up the most space aremarked by asterisk (*). If you are desperate to save space, remove debuggingfirst, rather than some more useful feature. Remove built-in help only ifabsolutely necessary. The final resort is to remove the interactive commandparser completely, leaving only a UNIX-style command-line interface("kermit -s foo"). This cuts the program down to about 25% of its fullyconfigured size.* -DNODEBUG: Add this option to omit all debugging code. -DNOTLOG: Add this option to omit transaction logging.* -DNOHELP: Add this option to omit built-in help. -DTCPSOCKET:Remove this option to omit TCP/IP support. -DSUNX25: Remove this option to omit SunLink X.25 support. -DNOMSEND: Add this option to remove the MSEND command.* -DNOLOCAL: Add this option to remove all local-mode support.* -DNODIAL: Add this option to remove the DIAL command and modem support.* -DMINIDIAL: Add this option to support only CCITT, Hayes, and Unknown modems.* -DNOOLDMODEMS: Add this option to drop support for "old" modem types. -DNOXMIT: Add this option to remove the TRANSMIT command. -DNOSCRIPT: Add this option to remove the UUCP-style SCRIPT command. -DNOCMDL: Add this option to remove the command-line option interface.* -DNOSPL: Add this option to remove the script programming language.* -DNOICP: Add this option to remove the entire interactive command parser. -DDCMDBUF: Add this option to allocate command buffers dynamically.* -DNOCSETS: Add this option to remove international character set support. -DNOLATIN2 Add this option to remove ISO Latin-2 character-set translation. -DNOCYRIL: Add this option to remove Cyrillic character set translation. -DNOLATIN2: Add this option to remove Latin-2 character set translation. -DNOHEBREW: Add this option to remove Hebrew character set translation. -DKANJI: Omit this option to exclude Kanji character set translation. -DNOESCSEQ: Add this option to omit ANSI escape sequence recognition. -DNOSERVER: Add this option to remove server mode. -DNOSETKEY: Add this option to remove the SET KEY command. -DNOPUSH: Add this option to remove escapes to operating system. -DNOFRILLS: Add this option to remove "frills".* -DCK_CURSES: Omit this option to keep the curses library out of Kermit. -DSBSIZ=nnnn -DRBSIZ=nnnnn Change the overall size of the packet send and receive buffers.-DNOFRILLS removes various command synonyms; the following top-level commands:CLEAR, DELETE, DISABLE, ENABLE, the multiline version of GET, GETOK, MAIL,RENAME, TYPE, WHO; and the following REMOTE commands: KERMIT, LOGIN, LOGOUT,PRINT, TYPE, WHO.The CK_CURSES option, at least on UNIX, requires C-Kermit be linked witha large external library. On certain small systems, C-Kermit programs builtthis way have been observed to cause swapping and/or performance problems.6.3. Changing Buffer SizesThere are options to control Kermit's packet buffer allocations. Thefollowing symbols are defined in ckcker.h in such a way that you can overridethem by redefining them in CFLAGS: -DMAXSP=xxxx - Maximum send-packet length, default 2048. -DMAXRP=xxxx - Maximum receive-packet length, 2048 for UNIX, 1920 for VMS. -DSBSIZ=xxxx - Total allocation for send-packet buffers, default 3008. -DRBSIZ=xxxx - Total allocation for receive-packet buffers, default 3008.The program size is affected by SBSIZ and RBSIZ (send and receive packetbuffer size). These are static character arrays compiled into the program.If you wish, you can have Kermit allocate packet buffers dynamically atruntime using malloc() by including the CFLAGS switch: -DDYNAMICIn this case, the default packet and buffers sizes are changed to: -DMAXSP=9024 (for UNIX, 2048 for VMS) -DMAXRP=9024 (for UNIX, 1920 for VMS) -DSBSIZ=9050 -DRBSIZ=9050but you can change the packet buffer sizes (not the maximum packet size) atruntime using the command: SET BUFFERS <sbsiz> <rbsiz>Using dynamic allocation (-DDYNAMIC) reduces storage requirements for theexecutable program on disk, and allows more and bigger packets at runtime.But dynamic allocation might not work on all systems. Try it. If it worksfor you, there is no reason not to use it. But if the program hangs or coredumps, then omit the -DDYNAMIC option from CFLAGS.6.4. Other Size-Related ItemsTo make Kermit compile and load successfully, you might have to change yourbuild procedure to: a. Request a larger ("large" or "huge") model. This is particularly true for 16-bit PC-based UNIX versions. This is typically done with a -M and/or -F switch (see your cc manual or man page for details). b. Some systems support overlays. If the program is too big to be built as is, check your loader manual ("man ld") to see if an overlay feature is available. See the 2.10/2.11 BSD example in the UNIX makefile. c. Similarly, some systems support "code mapping", which is similar to overlays. Again, see "man ld".It is also possible to reduce the size of the executable program file inseveral other ways: a. Include the -O (optimize) compiler switch if it isn't already included in your "make" entry (and if it works!). If your compiler supports higher levels of optimization (e.g. -O2), try it. b. If your UNIX system supports shared libraries, change the make entry to take advantage of this feature. The way to do this depends on your particular system. Some (like SUNOS) do it automatically. See the NeXT entry for an example. c. Strip the program image after building ("man strip" for further info), or add -s to the LNKFLAGS (UNIX only). This strips the program of its symbol table and relocation information. d. Move character strings into a separate file. See the 2.10 BSD entry for an example.6.5. Space/Time TradeoffsThere are over 2000 debug() statements in the program. If you want to saveboth space (program size) and time (program execution time), include -DNODEBUGin the compilation. If you want to include debugging for tracking downproblems, omit -DNODEBUG from the make entry. But when you include debugging,you have two choices for how it's done. One definition defines debug() to bea function call; this is cheap in space but expensive in execution. The otherdefines debug as "if (deblog)" and then the function call, to omit thefunction call overhead when the debug log is not active. But this adds a lotof space to the program. Both methods work, take your choice; IFDEBUG ispreferred if memory is not a constraint but the computer is likely to be slow.The first method is the default, i.e. if nothing is done to the CFLAGS or inckcdeb.h (but in some cases, e.g. VMS, it is). To select the second method,include -DIFDEBUG in the compilation (and don't include -DNODEBUG).7. DIALER SUPPORT-DNODIAL removes automatic modem dialing completely, including the entireckudia.c module, plus all commands that refer to dialing in the variousckuus*.c modules.-DMINIDIAL leaves the DIAL and related commands (SET/SHOW MODEM, SET/SHOW DIAL)intact, but removes support for all types of modems except CCITT, Hayes,Unknown, and None (= Direct). The MINIDIAL option cuts the size of the dialmodule approximately in half. Use this option if you have only Hayes orCCITT modems and don't want to carry the baggage for the other types.Note that MINIDIAL is quite sufficient to control any type of modem that usesthe Hayes command and response set, even modern high-speed, error-correcting,data-compressing ones, if you use a macro such as the ones listed in theCKCKER.BWR file (such as PPDIAL) to set up the modem's initialization string,etc. In fact, it might ultimately make good sense to replace the bulk of theDIAL module with a set of macros for each brand of modem, as in MS-DOS Kermit.A compromise between full dialer support and MINIDIAL is obtained by removingsupport for "old" modems -- all the strange non-Hayes compatible 1200 and 2400bps modems that C-Kermit has been carrying around code for since 1985 or so.To remove support for these modems, add -DNOOLDMODEMS to CFLAGS at compilationtime.Finally, if you keep support for old modems, you will notice that their namesappear on the "set modem ?" menu. That's because their names are, by default,"visible". But the list is confusing to the younger generation, who have onlyheard of modems from the V.32bis-and-later era. If you want to be able touse old modems, but don't want their names cluttering up menus, add this toCFLAGS: -DM_OLD=18. NETWORK SUPPORTC-Kermit supports not only RS-232 serial connections, direct and modem, butalso TCP/IP and X.25 network connections. The OS/2 version supports DECnet(LAT) connections. If you define the following symbol: NONETthen all network support will be compiled away.8.1. TCP/IPTCP/IP support requires the Berkeley sockets library, and is generally
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -