![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
Canonical vs non-cononical terminal I/O?
The setbuf function in stdio is defined to be able to turn off/on buffering. Subsequent fprintf calls are affected. In most implementations, you must call setbuf before any I/O to the terminal occurs. Windows and unix have terminal I/O libraries that change terminal characteristics as well. |
|
|
|
|
|
#12 |
|
Hobbyist Programmer
Join Date: Oct 2006
Posts: 204
Rep Power: 2
![]() |
edit: sorry, I had read all of the posts in here except a couple newer ones and I didn't realize the guy above me already mentioned setbuf.
my advice is to go to linux and type in man stdout.. it gives a lot of useful information, including (some) of what has been said here. If you want to, you can change the buffering mode (for lack of a better term) using setbuf. I haven't played with it, so I'm not sure how advisable it is to do so. Maybe one of these guys wouldn't mind giving some advice on how to use it properly. ![]() |
|
|
|
|
|
#13 | |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
Quote:
write( STDOUT_FILENO, message, strlen(message) ); I suppose this is too late to help with your assignment, but not to late to learn something. search for: "c write function" (without quotes) in google if you would like to know more. |
|
|
|
|
|
|
#14 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
for windows you can get output handle by GetStdHandle(STD_OUTPUT_HANDLE); (kernel32.lib) You can use native windows file write functions to write to it.
__________________
Spread your wings and fly! Chicken! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Slackware installation guide for Linux beginners | coldDeath | Coder's Corner Lounge | 104 | Jul 29th, 2007 4:40 AM |
| Clear screen with Java | Eric the Red | Java | 9 | Feb 22nd, 2006 10:28 PM |
| Senior Capstone-Spying Screen Saver | Hounder | Project Ideas | 23 | Dec 16th, 2005 7:00 PM |
| Print Screen? | Sane | C++ | 5 | Jul 27th, 2005 1:44 AM |
| Conversions | Sane | Python | 12 | Apr 28th, 2005 6:25 AM |