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

📄 think_c_notes

📁 Minix比较全的源码
💻
字号:
Notes on the THINK C version of Flex 2.4.6Scott Hofmann 23-JUL-94Internet: scotth@visix.comThe only changes needed to compile Flex 2.4.6 under Symantec C++ 6.0 wasto #include <console.h> in main.c and call ccommand() just before flexinit()in main(). The notes below are mostly of historical significance only; mostof the workarounds below were to get around restrictions/problems in earlierversions of THINK C. The only section which still applies is Russell Finn's description of how to make Flex generate output of type 'KAHL'. Also, 4-byteints must be used by any project which uses Flex output.If you want to recreate the project, you'll need to add the files alloca.c and xmalloc.c in this directory. Both files are copylefted; seethe GNU General Public License for details. You will also need to recompileboth the ANSI and unix libraries to use 4 byte ints, and if you want thefiles that flex creates to have 'KAHL' as the creator you'll need to applyRussell Finn's patch.Notes on the THINK C version of Flex 2.3.7Jonas Barklund, 25-JAN-92Internet: jonas@csd.uu.seI have merged the sources for Flex version 2.3.7 with the older versionwhich was hacked for THINK C version 4. I have conditionalized the codeso that I think it should work with both THINK C version 4 and 5 (forthose of you who don't know: the THINK_C symbol is defined as 1 in version4 and as 5 in version 5). I have put in some missing prototypes, so itcompiles also with "require prototypes" on.Most of the notes below still apply, in particular that about the MakeResprogram.Notes on the THINK C version of FlexRussell S. Finn, 19-FEB-90Internet: rsfinn@athena.mit.edu, rsfinn@neutron.lcs.mit.eduCompuServe: 76377,1107GEnie: RSFINNFlex appears to be covered by a copyright notice from the University ofCalifornia, similar to the one covering Berkeley Unix; the Free SoftwareFoundation is not part of the picture here.  So here is a versioncreated with THINK C 4.0, along with the source code; as with theBison distribution, I am including *all* of the source code I receivedwith the package.The current version (modification date January 25, 1990) has only thebare-bones interface provided by the THINK C library routine "ccommand",which allows the user to type a command line and to redirect the output.Perhaps someday I may try to implement a "real" user interface; perhapsnot.The only modifications made to the source file are surrounded by "#ifdefTHINK_C"..."#endif"; in theory, then, these sources could be recompiledon another system if necessary.  These are the actual files modified:alloca.c, dfa.c, flexdef.h, main.c, misc.c, scan.c, sym.c.  Most of thesechanges were minor, and many of them would have been unnecessary if theoriginal Flex source code had been written for an ANSI-compliant C compiler.In addition, the file "macutils.c" is completely new; see the discussionof "MakeRes" below.THINK C users may find it convenient to have the output text files writtenby Flex be THINK C documents.  To do this, create a copy of the "ANSI"project called "ANSI-KAHL", and a copy of the file "fopen.c" called"fopen-KAHL.c".  In the copy, find the routine "setfiletype", and replacethe lines:	if (!(oflag & F_BINARY))		pb.ioFlFndrInfo.fdType = 'TEXT';with the lines:	if (!(oflag & F_BINARY)) {		pb.ioFlFndrInfo.fdType = 'TEXT';		pb.ioFlFndrInfo.fdCreator = 'KAHL';		}Replace "fopen.c" with the new "fopen-KAHL.c", rebuild the new project"ANSI-KAHL", and use this project in the project file "Flex.

⌨️ 快捷键说明

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