************************* MASTER CODE *************************************** The name of the first file in this disk's directory identifies the volume, issue number and revision of the disk. The format of this filename is: !CDmvvii.rrr where ! = the '!' character m = C for C Users Journal, W for Windows/DOS Developer's Journal vv = volume ii = issue rrr = revision (001 for initial release, 002 for next update, etc.) The file UPDATE.DOC contains information about any additions or corrections to material on the disk since the original magazine publication. If you have obtained this code from a floppy diskette or from CompuServe, the headings under the column "FILENAME" represent the names of .ZIP files. All files listed under the filename are archived in the .ZIP file. If you have obtained this code from UUNET, the headings under the column "FILENAME" represent the names of subdirectories. All files listed under the "filename" are included in a subdirectory of that name. Keywords: May95 C C+ Sockets Client/Server CWEB Standard fstream Literate The code listings for the May 1995 issue of C/C++ Users Journal include source code for Kevin Gilhooly's example program that uses Windows Sockets, Paul Colton's dynamic client/server-based image processing system, examples from Lee Wittenberg's article on Literate Programming with CWEB, plus a version of CWEB. Also included are listings from P.J. Plauger's Standard C/C++ column, Chuck Allison's column, Code Capsules, and Dan Saks' column, Stepping Up to C++. ************************* FILE DESCRIPTION ********************************** The following files are included in the disk: FILENAME AUTHOR-NAME TITLE PAGE (Zip archive/ subdirectory name) ------------------------------------------------------------------------------- plauger P.J. Plauger Standard C/C++: Implementing 8 fstream - listing 1, The header filebuf.c - listing 2, filebuf basic members fiopen.c - listing 3, Definition of member function filebuf::open() ifstream.c - listing 4, ifstream basic members ofstream.c - listing 5, ofstream basic members stdiobuf.c - listing 6, stdiobuf basic members istdiost.c - listing 7, istdiostream basic members ostdiost.c - listing 8, ostdiostream basic members tfstream.c - listing 9, Test program for fstream gilhooly Kevin Gilhooly WinJES -- A Windows Sockets 23 Example unixudp.c - listing 1, A UDP server that would work on UNIX systems winmain.c - listing 2, The WinJES main program mainwnd.c - listing 3, The WinJES window procedure winjes.h - not listed, Header file for WinJES about.c - not listed, Contains callbacks for About dialog box hostproc.c - not listed, Contains HostProc callback function resource.h - not listed, App studio generated include file, used by winjes.rc winjes.rc - not listed, App studio generated resource script winjes.def - not listed, Winjes module definition file colton Paul Colton Dynamic Client/Server-Based 33 Image Processing ips.x - listing 1, IPS protocol ips.c - listing 2, The server process source code demo_cli.c - listing 3, The client program ips_head.h - listing 4, Internal image format fileio.c - listing 5, Small file I/O library for loading and saving images xwd.c - listing 6, X-Window Dump image format loader auto-dete.c - listing 7, A loader that auto-detects the image file format xwdsave.c - listing 8, Example XWD format saver flipy.c - listing 9, Example image operator wittenb Lee Wittenberg Literate Programming in C and 55 C++ using CWEB hello.ps - listing 1, PostScript file of "woven" web for a simple "hello world" program hello.w - listing 2, The text file (or "web") for a "hello world program" hello.c - listing 3, Compiler-readable result of "tangling" listing 2 exercise.ps - listing 4, A "woven" web for a more elaborate example of Literate Programming string.ps - listing 5, A "woven" web that shows Literate Programming applied to C++ wittenb2 Lee Wittenberg Literate Programming in C and C++ using CWEB cweb.zip - not listed in magazine, CWEB distribution for UNIX, DOS, VMS, and Amiga. feather Clive D. W. Understanding the C Standard 69 Feather sort.c - listing 2, Avoiding equal sort elements allison Chuck Allison Code Capsules: Data Abstraction 75 date.h - listing 1, A Date type in C date.c - listing 2, Implementation for Date type tdate.c - listing 3, Tests the Date type date2.h - listing 4, A safer Date type date2.c - listing 5, Implementation for listing 4 tdate2.c - listing 6, Tests the new Date type date3.h - listing 7, The Date type in C++ date3.cpp - listing 8, Implementation for the Date class tdate3.cpp - listing 9, Illustrates the Date class date4.h - listing 10, Hides the Data's data in an incomplete type date4.cpp - listing 11, Implementation for Listing 10 date5.h - listing 12, Adds operators to the Date class date5.cpp - listing 13, Adds a stream inserter to the Date class implementation tdate5.cpp - listing 14, Uses some Date comparison operators bool.h - listing 15, Simulates the C++ Boolean data type person.h - listing 16, Defines a Person data type person.cpp - listing 17, The Person class implementation tperson.cpp - listing 18, Illustrates the Person class person2.h - listing 19, A flawed Person class that stores text on the heap person2.cpp - listing 20, The implementation of Listing 19, which is missing an assignment operator and copy constructor person3.h - listing 21, A well-behaved version of Listing 19 person3.cpp - listing 22, Adds the assignment operator and copy constructor to the Person class set.h - listing 23, A set type for integers, using a fixed- size array data structure set.cpp - listing 24, SetOfInt implementation tset.cpp - listing 25, Tests the SetOfInt class set2.h - listing 26, A Set template class using a vector data structure tset2.h - listing 27, Illustrates a set of Persons saks Dan Saks Stepping Up to C++: Even More 89 Minor Enhancements tree.h - listing 1, A "typical" class for a binary tree with the tree node class as a private nested type tree2.h - listing 2, A "typical" class for a binary tree with the tree node class as a forward-declared private nested type letters We Have Mail 105 teuns.zip - not listed, command-line processing code contributed by Ton J. Teuns in response to letter from Jim Pazarena in Nov. 1994 CUJ. Includes some documentation state.c - listing 1, a state machine that maintains type safety ******************************************************************************* If you have questions regarding to the disk, please call or write us. ----------------------------------------------------------------------------- R&D Publications, Inc. 1601 W. 23rd St. Suite 200 Lawrence, KS 66046 (913) 841-1631 -----------------------------------------------------------------------------