Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site greipa.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!greipa!jordan From: jordan@greipa.UUCP (Jordan K. Hubbard) Newsgroups: net.sources.bugs Subject: Floop patch Message-ID: <277@greipa.UUCP> Date: Fri, 12-Jul-85 13:44:22 EDT Article-I.D.: greipa.277 Posted: Fri Jul 12 13:44:22 1985 Date-Received: Sun, 14-Jul-85 08:36:04 EDT Reply-To: jordan@greipa.UUCP (Jordan K. Hubbard) Organization: Genstar Rental Electronics, Palo Alto, Ca. Lines: 36 Floop is indeed a clever program. Here is a patch to make it 'floop' any command line.. No flames about style, it was a 5 minute kludge.. (This patches floop.c) 21c21 < register int i, j, line, n, c; --- > register int i, j, line, n, c, lp; 24c24 < char *p = 0, *cl, *ce, **buf2; --- > char *p = 0, *cl, *ce, **buf2, cmdline[1024]; 41c41,47 < fp = in_fd == 0 ? popen ("who", "r") : stdin; --- > strcpy(cmdline, "sh -c \""); > for (lp = 1; lp < argc; lp++) { > strcat(cmdline, argv[lp]); > strcat(cmdline, " "); > } > cmdline[strlen(cmdline) - 1] = '"'; > fp = in_fd == 0 ? popen (cmdline, "r") : stdin; 43c49 < fprintf (stderr, "popen(\"who\") failed\n"); --- > fprintf (stderr, "popen(\"%s\") failed\n", cmdline); -- Jordan K. Hubbard @ Genstar Rental Electronics. Palo Alto, CA. {pesnta, decwrl, dual, pyramid}!greipa!jordan "ack pfffft. gag. retch. barf.. ack" - Bill again.