C++ code for APUE book by W.R.Stevens

T

tao3256

Hi, all:

Does anyone try to do C++ recoding of the original C code of W. R.
Stevens' book "Advanced Programming in the Unix Environment",
ISBN:0201563177, 1992 ? I got the redhat linux version of C code, works
works fine in my knoppix linux2.4.6 (installed).

I am trying to pack the C code into C++, following the C++ guideline
1. using C++ namespace to get rid of static global functions,
2. using C++ namespace to get rid of #define constants,
3. using C++ class to pack functions for data members, such as file,
proc, signal, ..., etc.

Currently my system specification:
1. CPU 2GH 686 intel, 256MB memory, DVD, USB, etc.
2. WindowsXP, qemu + knoppix(iso)

Current Status:
1. knoppix linux 2.4.6 running in qemu window under windowsXP,
2. able to access floppy, NTSF windowXP C:hard drive (ReadOnly), and
ext3 qemu hard drive image(ReadWrite),
3. re-compiled original redhat C code successfully,
4. recode original ourhdr.h to a namespace-oriented ourhdr.h,
5. compiled code using g++ with namespace-oriented ourhdr.h successfully,

Work to do:
1. write useful C++ classes "Type" (e.g. fileType) to categorize and
pack functions and data,
2. re-write all C code to C++ code.

Anyone interested on this? let me know. The reason to re-invent the
wheel is to help current C++ programmers to get into unix/linux
programming. The original C code is messy (my opinion only). Mr.
Stevens passed away long ago, now is the time to move forward to C++
with his good book.

Dr. Boris Chang
 
D

Dizzy

tao3256 said:
Hi, all: Hello


Does anyone try to do C++ recoding of the original C code of W. R.
Stevens' book "Advanced Programming in the Unix Environment",
ISBN:0201563177, 1992 ? I got the redhat linux version of C code, works
works fine in my knoppix linux2.4.6 (installed).
Anyone interested on this? let me know. The reason to re-invent the
wheel is to help current C++ programmers to get into unix/linux
programming.
The original C code is messy (my opinion only). Mr.
Stevens passed away long ago, now is the time to move forward to C++
with his good book.

There is a (rather recent) second edition and still uses C. I don't think it
should use C++ when it's presenting a POSIX C API (so there isn't much
to "move forward to C++"). Maybe when we will have a POSIX C++ API there
would be a book covering that.

Boost should cover most of the C++ programmers needs that are not covered by
the current standard library and I would rather have people use boost than
some yet another API to wrap POSIX (and others) features.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top