| PLEX86 | ||
Thou shalt have no other gods before the ANSI C standard 1389Hardly. Weren't you paying attention? It is not just 9-bit ones-complement architectures that DJB was dismissing, but *all* architectures other than one specific model. Easy != correct. It is not appreciably harder to do it correctly, and if you *do* then your code won't have portability problems. Wrong. If printf has been given valid arguments, then the only way it can fail (apart from bugs in its implementation, which is a different topic) is that output to the stdout stream has failed. That could be due to a full file system, broken pipe, etc. SIGTERM is not involved. If it is *important* to the application that the output succeed, then it should certainly check the status returned by printf and take appropriate recovery measures when an error occurs. Some applications are just chattering away on stdout and might not much care if anybody is paying attention; then a legitimate programming policy in that case might be to ignore stdout write failures. All good POSIX C programmers at least give it some thought, because a failure on close can indicate severe data corruption; thus there is a moral imperative to at least call attention to it. Here are nine consecutive lines from my double-buffering version of "tcopy": error( "close" ); } if ( close( from ) != 0 ) error( argv1 ); Thou shalt have no other gods before the ANSI C standard 1390 David Wagner You're (intentionally?) missing the point. Most DSP software performs general-purpose functions in addition to array processing. Much C software is aimed at general-purpose functions that might or might not be useful... if ( close( to ) != 0 ) * closing magtape writes EOF * error( argv2 );
|
||||
Thou shalt have no other gods before the ANSI C standard 1390 Alt Folklore Computers from Newsgroups The #1 Usenet Provider on the Internet
Thou shalt have no other gods before the ANSI C standard 1388 |
||||