Initial release.
This commit is contained in:
parent
672f140c05
commit
f6fd7880a0
|
@ -0,0 +1,22 @@
|
|||
include GNUmakerules
|
||||
include GNUmakevars
|
||||
|
||||
acctfix:
|
||||
|
||||
install: $(ROOT)/usr/local/bin/count $(ROOT)/usr/local/man/man8/count.8
|
||||
|
||||
install_all:
|
||||
$(MAKE) install ROOT=/nfs/wsrdb
|
||||
$(MAKE) install ROOT=/nfs/wsrcom
|
||||
$(MAKE) install ROOT=/nfs/wifosv
|
||||
$(MAKE) install ROOT=/nfs/ihssv
|
||||
$(MAKE) install ROOT=/nfs/wsrtest
|
||||
|
||||
$(ROOT)/usr/local/bin/%: %
|
||||
$(INSTALL) $< $@
|
||||
|
||||
$(ROOT)/usr/local/man/man8/%.8: %.man
|
||||
$(INSTALL) $< $@
|
||||
|
||||
clean:
|
||||
rm count
|
|
@ -0,0 +1,30 @@
|
|||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
unsigned long start = 0;
|
||||
unsigned long stop = ULONG_MAX;
|
||||
unsigned long i;
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
stop = strtoul(argv[1], NULL, 0);
|
||||
break;
|
||||
case 3:
|
||||
start = strtoul(argv[1], NULL, 0);
|
||||
stop = strtoul(argv[2], NULL, 0);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Usage: %s [[start] stop]\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (i = start; i < stop; i++) {
|
||||
printf("%d\n", i);
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue