473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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
Apr 19 '07 #1
1 1805
tao3256 wrote:
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.

--
Dizzy

Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: atl-jcd | last post by:
Does anyone have a HTML or PDF copy of the old Al Stevens article: "Passing the C++ Test: Securing success in an interview" from Dr. Dobbs Journal (I know I can get it from the DDJ site if I...
12
by: G. | last post by:
Hi all, During my degree, BEng (Hons) Electronics and Communications Engineering, we did C programming every year, but I never kept it up, as I had no interest and didn't see the point. But now...
2
by: Prabal | last post by:
I hate to raise this matter now. I want to know Richard W. Stevens's cause of death. I am just curious. He was just 48. His books are very inspiring. I couldn't find the answer.
15
by: Songling | last post by:
Hi, Please help to check if the following code is safe. void* dequeue(MSG_Q_ID q_ptr) { U32 msg_ptr = 0; if (msgQReceive((q_ptr), (char*) &msg_ptr, 4, 0) >=0) {
8
by: Corrupted Mind | last post by:
I have just finished the K&R's book. And, I would like to know what to forget and add to the teaching of K&R? I ask this because I know that no book is perfect, nor complete. ( even if they are the...
5
by: Terry | last post by:
Could someone please suggest me a good book to learn network programming. I have been programming in C#/VB.NET/VB 6.0 and have also used a bit of C++ (not MFC/ATL/COM) I am a total novice when...
9
by: Eric Lindsay | last post by:
I can't figure how to best display little snippets of shell script using <pre>. I just got around to organising to bulk validate some of my web pages, and one of the problems occurs with Bash...
10
by: Rob Kendrick | last post by:
Hi, I'm a C programmer of (I'd like to think) intermediate skill and experience, able to throw most things together quite happily in C. I'd like to get to the point of being able to...
9
by: titanandrews | last post by:
Hi All, Is there any way to catch the exit code from someone calling exit(status) and check the value before the program terminates? Just for an idea, the code I'm thinking of is something...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.