--- /dev/null
+agedu is copyright 2008 Simon Tatham. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
-include Makefile.local
-AGEDU_MODULES := agedu du malloc trie index html httpd fgetline
+AGEDU_MODULES := agedu du malloc trie index html httpd fgetline licence
AGEDU_OBJS := $(patsubst %,%.o,$(AGEDU_MODULES))
ALLMODULES := $(sort $(AGEDU_MODULES))
hackery in du.c and turning it into a more sensible run-time
abstraction layer.
- - polish the plain-text output to make it look more like du
- + configurable recursive output depth
- + show the right bits last
-
- cross-Unix portability:
+ use autoconf
* configure use of stat64
too, if it's available and O_NOATIME is too.
* what do we do elsewhere about _GNU_SOURCE?
- - man page, licence, --version.
+ - man page, --version.
Future possibilities:
printf("FIXME: version();\n");
return 0;
case OPT_LICENCE:
- printf("FIXME: licence();\n");
+ {
+ extern const char *const licence[];
+ int i;
+
+ for (i = 0; licence[i]; i++)
+ fputs(licence[i], stdout);
+
+ return 0;
+ }
return 0;
case OPT_SCAN:
if (nactions >= actionsize) {
--- /dev/null
+const char *const licence[] = {
+ "agedu is copyright 2008 Simon Tatham. All rights reserved.\n",
+ "\n",
+ "Permission is hereby granted, free of charge, to any person\n",
+ "obtaining a copy of this software and associated documentation files\n",
+ "(the \"Software\"), to deal in the Software without restriction,\n",
+ "including without limitation the rights to use, copy, modify, merge,\n",
+ "publish, distribute, sublicense, and/or sell copies of the Software,\n",
+ "and to permit persons to whom the Software is furnished to do so,\n",
+ "subject to the following conditions:\n",
+ "\n",
+ "The above copyright notice and this permission notice shall be\n",
+ "included in all copies or substantial portions of the Software.\n",
+ "\n",
+ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n",
+ "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n",
+ "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n",
+ "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n",
+ "BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n",
+ "ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n",
+ "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n",
+ "SOFTWARE.\n",
+ 0
+};