rup.c (c3aac50f284c6cca5b4f2eb46aaa13812cb8b630) | rup.c (62f882d620bdfa783c01626012d69f468ba34e28) |
---|---|
1/*- 2 * Copyright (c) 1993, John Brezak 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 194 unchanged lines hidden (view full) --- 203 fprintf(stderr, "usage: rup [hosts ...]\n"); 204 exit(1); 205} 206 207int 208main(int argc, char *argv[]) 209{ 210 int ch; | 1/*- 2 * Copyright (c) 1993, John Brezak 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 194 unchanged lines hidden (view full) --- 203 fprintf(stderr, "usage: rup [hosts ...]\n"); 204 exit(1); 205} 206 207int 208main(int argc, char *argv[]) 209{ 210 int ch; |
211 extern int optind; | |
212 213 while ((ch = getopt(argc, argv, "?")) != -1) 214 switch (ch) { 215 default: 216 usage(); 217 /*NOTREACHED*/ 218 } 219 220 setlinebuf(stdout); 221 if (argc == optind) 222 allhosts(); 223 else { 224 for (; optind < argc; optind++) 225 (void) onehost(argv[optind]); 226 } 227 exit(0); 228} | 211 212 while ((ch = getopt(argc, argv, "?")) != -1) 213 switch (ch) { 214 default: 215 usage(); 216 /*NOTREACHED*/ 217 } 218 219 setlinebuf(stdout); 220 if (argc == optind) 221 allhosts(); 222 else { 223 for (; optind < argc; optind++) 224 (void) onehost(argv[optind]); 225 } 226 exit(0); 227} |