⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ckuins.txt

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 TXT
📖 第 1 页 / 共 5 页
字号:
(a) remove the -O option from the make entry, which will turn off theoptimizer for ALL modules; or (b) compile the offending module(s) by hand,including all the switches from make entry except for -O, and then give theappropriate "make" command again; or (c) increase the value of the -Olimitoption, if your compiler supports this option; or (d) change the makefileentry to first compile each offending module explicitly without optimization,then compile the others normally (with optimization), for example:#Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd)ft21:	@echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'	$(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \	-SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"	$(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \	-SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"	$(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \	-SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"	$(MAKE) wermit "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \	-DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short" \	"LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"As an extreme example, some compilers (e.g. gcc on the DG AViiON) have beenknown to dump core when trying to compile ckwart.c with optimization.  So justdo this one "by hand":  cc -o wart ckwart.cor:  touch ckcpro.cand then give the "make" command again.Speaking of wart, it is unavoidable that some picky compilers might generate"statement unreachable" messages when compiling ckcpro.c.  Unreachablestatements can be generated by the wart program, which generates ckcpro.cautomatically from ckcpro.w, which translates lex-like state/inputconstructions into a big switch/case construction.Some function in Kermit wreaks havoc when it is called.  Change allinvocations of the function into a macro that evaluates to the appropriatereturn code that would have been returned by the function had it been calledand failed, for example: -Dzkself()=0.  Obviously not a good idea if thefunction is really needed.If you have just installed SunOS 4.1.2 or 4.1.3, you might find that C-Kermit(and any other C program) fails to link because of unresolved references fromwithin libc.  This is because of a mistake in Sun's /usr/lib/shlib.etc filesfor building the new libc.  Change the libc Makefile so that the "ld" lineshave "-ldl" at the end.  Change the README file to say "mv xccs.multibyte.xccs.multibyte.o" and follow that instruction.5. INSTALLING THE KERMIT FILESThere is an "install" entry in the makefile, but it is only a sample.  Sinceevery site has its own layout and requirements, it is better to install theKermit files by hand.After you have built and tested the C-Kermit program successfully, you candiscard the object (ck*.o) files, which are no longer needed.  Use "makeclean" to do this.  If you don't need the source files (ck[cuw]*.[cwh]), youcan remove them too.You should install the C-Kermit program in a directory that is in the users'PATH, but that is not likely to be overwritten when you install a new versionof the operating system.  A good candidate would be the /usr/local/bin/directory.  Example:  mv wermit /usr/local/bin/kermit  chmod 775 /usr/local/bin/kermit  <--  But see Section 10.You should also install the man page, which is called ckuker.nr, in theman page directory for local commands, such as /usr/man/manl/, renamedappropriately, e.g. to kermit.l.Several text files should be placed in a publicly readable directory, and theman page should be altered, if necessary (in the FILES section), to point tothat directory.  Suggested directory names are:  /usr/local/doc/kermit/  /usr/local/lib/kermit/  /usr/share/lib/kermit/(or any of these without the "/kermit").  Upon startup, C-Kermit checks thefollowing environment variables whose purpose is to specify the directorywhere the C-Kermit text files are, in the following order:  K_INFO_DIRECTORY  K_INFO_DIR  KERMITINFOIf any of these is defined, C-Kermit checks for the existence of theckermit2.txt file (the C-Kermit 7.0 updates documentation).  If not found,it checks the directories listed above (both with and without the "/kermit")plus several others to see if they contain the ckermit2.txt file.  If found,various C-Kermit messages can refer the user to this directory.  READ.ME    Explanation of the following files.  You can create this file by    clipping out the following file list.  COPYING.TXT    Copyright notice, permissions, and disclaimer.  ckermit.ini    The standard initialization file.  Users should copy this to    their home directories and rename it to .kermrc.  (In C-Kermit 5A(190)    and later, you can designate a single copy as the system-wide    initialization file; details above).  ckermod.ini    A sample customization file.  Users should copy this file to    their home directories, make any desired modifications (user- or    site-specific customizations), and rename it to .mykermrc.  ckermit.kdd    A sample dialing directory file.  ckermit.knd    A sample network directory.  ckermit.ksd    A sample services directory.  ckedemo.ksc    Macro definitions from "Using C-Kermit".  ckevt.ksc    Command file to demonstrate special screen effects from "Using C-Kermit".  ckepage.ksc    A sample script for sending alphanumeric pages.  ckurzsz.ini    Macros for using rz and sz as external protocols.  ckermit2.txt    A file listing the updates, changes, and corrections made to C-Kermit    since publication of "Using C-Kermit".  ckcbwr.txt    The general C-Kermit "beware" file.  ckubwr.txt    The UNIX-specific C-Kermit beware file.We recommend that the C-Kermit initialization file, named ckermit.ini in thedistribution, be executed by all users, since it defines and sets up certainimportant features, such as the dialing directory, services directory,commonly-used macros, etc.  On multiuser systems, it can be put in a commonplace and shared by all users, but this requires building C-Kermit from sourcein a special way, which embeds the full path of common initialization file inthe program binary, described above.Alternatively, each user can copy the ckermit.ini file into her logindirectory and rename it to .kermrc.The user's private "customization file" goes in the login directory and iscalled .mykermrc.6. INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTESIf you received a DOS-format diskette containing a binary executable C-Kermitprogram plus supporting text files, be sure to chmod +x the executable beforeattempting to run it.In version 5A(190) and later, all the text files on the C-Kermit DOS-formatdiskettes are in UNIX format: LF at the end of each line rather than CRLF.This means that no conversions are necessary when copying to your UNIX filesystem, and that all the files on the diskette, text and binary, can be copiedtogether.  The following comments apply to the DOS-format diskettes furnishedwith version 5A(189) and earlier or to other DOS-format diskettes you mighthave obtained from other sources.If you have received C-Kermit on MS-DOS format diskettes (such as thosedistributed by Columbia University), you should make sure that yourDOS-to-UNIX conversion utility (such as "dosread") both: (1) changes lineterminators in all files from carriage-return linefeed (CRLF) to just linefeed(LF) (such as "dosread -a") and remove any Ctrl-Z's, and (2) that allfilenames are converted from uppercase to lowercase.  If these conversionswere not done, you can use the following shell script on your UNIX system todo them:---(cut here)---#!/bin/sh## Shell script to convert C-Kermit DOS-format files into UNIX format.# Lowercases the filenames, strips out carriage returns and Ctrl-Z's.#x=$1 # the name of the source directoryy=$2 # the name of the target directory if [ $# -lt 2 ]; then  echo "usage: $0 source-directory target-directory"  exit 1fiif cd $1 ; then  echo "Converting files from $1 to $2"else  echo "$0: cannot cd to $1"  exit 1fifor i in *; do  j=`echo $i | tr 'A-Z' 'a-z'`  echo $x/$i =\> $y/$j  tr -d '\015\032' < $i > $y/$jdone---(cut here)---Cut out this shell script, save it as "convert.sh" (or any other name youprefer), then "chmod +x convert.sh".  Then, create a new, empty directoryto put the converted files in, and then "convert.sh /xxx /yyy" where /xxxis the name of the directory where the PC-format files are, and /yyy is thename of the new, empty directory.  The converted files will appear in thenew directory.7. CHECKING THE RESULTSFirst some quick checks for problems that can be easily corrected byrecompiling with different options:DIRECTORY listing is garbage  Permissions, size, and date are random garbage (but the filenames are  correct) in a C-Kermit DIRECTORY listing.  On some platforms, the lstat()  function is present but simply doesn't work; try adding -DNOLSTAT to CFLAGS  and rebuild.  If that doesn't fix it, also add -DNOLINKBITS.  If it's  still not fixed, remove -DNOLSTAT and -DNOLINKBITS and add -DNOSYMLINK.curses  When you make a connection with C-Kermit and transfer files using the  fullscreen (curses) file-transfer display, and then get the C-Kermit>  prompt back afterwards, do characters echo when you type them?  If not,  the curses library has altered the buffering of /dev/tty.  Try rebuilding  with KFLAGS=-DCK_NEWTERM.  If it already has -DCK_NEWTERM in CFLAGS, try  removing it.  If nothing works (and you can't fix the code), then either  don't use the fullscreen display, or rebuild with -DNOCURSES.Ctrl-L or any SCREEN command crashes C-Kermit:  Rebuild with -DNOTERMCAPNo prompt after CONNECT:  After escaping back from CONNECT mode, does your C-Kermit> prompt  disappear?  (Yet, typing "?" still produces a command list, etc)  In that case, add -DCKCONINTB4CB to CFLAGS and rebuild.Here is a more thorough checklist can use to tell whether your version ofC-Kermit was built correctly for your UNIX system, with hints on how to fixor work around problems:  a. Start C-Kermit (usually by typing "./wermit" in the directory where you     ran the makefile).  Do you see the C-Kermit> prompt?  If not, C-Kermit     incorrectly deduced that it was running in the background.  The test is     in conbgt() in ckutio.c.  If you can fix it for your system, please send     in the fix (Hint: read about "PID_T" below).  Otherwise, you can force     C-Kermit to foreground mode by starting it with the -z command line     option, as in "kermit -z", or giving the interactive command SET     BACKGROUND OFF.  b. When you type characters at the C-Kermit prompt, do they echo     immediately?  If not, something is wrong with concb() and probably the     other terminal mode settings routines in ckutio.c.  Be sure you have used     the most appropriate make entry.  c. At the C-Kermit> prompt, type "send *?".  C-Kermit should list all the     files in the current directory.  If not, it was built for the wrong type     of UNIX file system.  Details below.  In the meantime, try SET     WILDCARD-EXPANSION SHELL as a workaround.  d. CD to a directory that contains a variety of files, symlinks, and     subdirectories and give a DIRECTORY command at the C-Kermit> prompt. Do     the permissions, size, and date appear correct?  If not see Section 4.0.  3. Assuming your platform supports long file names, create a file with a     long name in your current directory, e.g.:     % touch thisisafilewithaveryveryveryveryveryveryveryverylooooooooongname     (you might need to make it longer than this, perhaps as long as 257     or even 1025 characters).     Check with ls to see if your version of UNIX truncated the name.  Now     start C-Kermit and type "send thisis<ESC>".  Does Kermit complete the     name, showing the same name as ls did?  If not, wrong filesystem.  Read     on.  f. Make sure that Kermit has the maximum path length right.  Just type

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -