IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New cat(1) in 60 seconds
Seen on Linux-Elitists:
\n[1]\n// cat(1) in 60 seconds\n// Copyright 2003 Jason Spence <jspence@lightconsulting.com>\n// [2]\nint main(int argc, char * argv[]) {\n  int rc, src;\n  char buf[BUFSIZ];\n  src = open(argv[1], O_RDONLY);\n  while((rc = read(src, buf, BUFSIZ)) > 0) { // [3]\n    write(STDOUT_FILENO, buf, rc);\n  }\n  return rc; // [5]\n} // [6]\n\n[2] Remembering which headers to include is left as an exercise to the\nreader.\n\n[3] 10 points to whoever points out how to do portable (OS X, Win32,\nLinux, and BSD) error checking on the read(2) call by outputting the\nstrerror(errno) value here without increasing the number of lines in\nthe program. [4]\n\n[4] Hint - the CRT has to store it somewhere...\n\n[5] Note that this returns the correct error value to the shell\nwhether an error occurs or not, but you can't use this as an answer to\n[3].  Always check your $?s or You'll Be Sorry...\n\n[6] 20 points if you can figure out how to get the utime and stime\nusing wait3 OR wait4 (on Linux and BSD) without using a wrapper\nprocess with its own main in another module AND with dynamic detection\nof which API is available on the current platform.  And you can't use\nltdl.\n


Peter
[link|http://www.debian.org|Shill For Hire]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Blog]
New My favorite implementation of cat remains...
perl -penis

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New That was hard...

...and shiny.

--\r\n
Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]\r\n
[link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]\r\n
What part of "gestalt" don't you understand?\r\n
[link|http://twiki.iwethey.org/twiki/bin/view/Main/|TWikIWETHEY] -- an experiment in collective intelligence. Stupidity. Whatever.\r\n
\r\n
   Keep software free.     Oppose the CBDTPA.     Kill S.2048 dead.\r\n[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html]\r\n
     cat(1) in 60 seconds - (pwhysall) - (2)
         My favorite implementation of cat remains... - (ben_tilly) - (1)
             That was hard... - (kmself)

Given enough shellac, even turds can be polished.
31 ms