If you've been using DOS, and now have your Linux system up and running, and you want to do C language program development in this new environment, this book is for you. When moving over to Linux, an obstacle some of us soon encounter is the absence of a familiar text editor. Your perferred editor probably is the one with which you are thoroughly familiar. With that thought in mind, what we do here is, we write our own.
"synopsis" may belong to another edition of this title.
Jack Dennon graduated from Oregon State in mechanical engineering a long time ago. At Boeing he gravitated into Fortran programming; eventually ended up maintaining the operating system on their CDC6600 big iron machines. Bought a PDP8 and started his own business in 1974. When the 8080 became available, started using CP/M to develop industrial controls. Wrote a book on CP/M. DOS came along, like CP/M it was a closed system. Then there was Linux.
When the author first became aware of Linux and the world of open source software, an early impression supported the notion that here at last is a system wherein users will indeed take total control of such things as the mundane text editor. No longer would they be constrained to simply read the manual and learn the rules; to practice only with what the original author offered. Although there are books available that tell how to customize emacs, the author's efforts in that direction when largely unrewarded. Even Linus complains about emacs, so obviously there is somewhere a gap in the theory. What appears to happen in practice is that large programs like emacs, and vi, and even joe, are modified only by the original programmers. The author's hunch is that many users would modify the text editor that they use if the source code was compact and unintimidating. Yet the author was advised by a major publisher that the reviews "...are positive regarding the readability and technical content. What reviewers have raised serious doubts about is the market need for a book like this. The consensus seems to be that there isn't a need for a book that would teach someone [how to write] a text editor." So there you have it.
Linux, as it happens, is just one of the revolutions occurring on the planet. A revolution is well underway in publishing. As Don Lancaster[BYTE, May 1990] pointed out some years ago, and as W. Richard Stevens[see, for example, Advanced Progamming in the UNIX Environment] has demonstrated, the author who typesets his own book can allow instantaneous feedback to help clarify the presentation, and can exercise sovereign control over the final product. Authoring becomes, once again, solo art. Gutenburg's movable type revolutionized printing. Desktop computers and the Internet are revolutionizing publishing. In today's world we can allow the market to speak for itself.
From the Introduction
Any programmer, and most certainly the beginning programmer, is effectively helped along by complete examples of interesting programs that work. If the program performs a useful function, then so much the better. The programs presented in this book are simple but not trivial. Our first example is a text file browsing program. Next we present two programs that display in hexadecimal the contents of any file, text file or binary. Finally we develop our main project, the "able" text editor. All the programs are written in C for the GNU C compiler; all but one use the "curses" library.
Audience
If you've been using DOS, and now have your Linux system up and running, and you want to do C language program development in this new environment, this book is for you. When moving over to Linux, an obstacle some of us soon encounter is the absence of a familiar text editor. There are a number of fine text editors available for Linux. The problem is, even an excellent text editor with which one is unfamiliar can be a source of frustration. Your preferred editor probably is the one with which you a thoroughly familiar. with that thought in mind, what we do here is, we write our own.
Source Files
Machine-readable sources are included on disk for all the programs in this book. You can use them as a base from which to start, or you can keystroke your own sources from the listings, changing the style, if you prefer, as you go. If you are going to make extensive modifications, then probably it is best to start by running your hands, so to speak, over the code, because it helps you remember where things are. When it comes time to modify or debug something, you need to know where things are.
"About this title" may belong to another edition of this title.