Permalink
Browse files

Initial commit: add non-autogenerated contents of tractorgen-0.31.7

  • Loading branch information...
0 parents commit b4c8d2784c3556ec501ec729eddb463558619082 @kfish committed Dec 12, 2008
Showing with 196 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +14 −0 ChangeLog
  3. +4 −0 Makefile.am
  4. +13 −0 NEWS
  5. +73 −0 README
  6. +19 −0 configure.in
  7. +6 −0 src/Makefile.am
  8. +66 −0 src/tractorgen.c
@@ -0,0 +1 @@
+Conrad Parker <kbert@vergenet.net>
@@ -0,0 +1,14 @@
+ChangeLog for tractorgen.
+
+ _______
+ (_)___oo)
+
+
+ -------->
+
+ ____,/\,
+ (_)___oo)
+
+
+Ned the Log appears courtesy of Console.
+http://console-newsletter.hypermart.net/
@@ -0,0 +1,4 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src
+
@@ -0,0 +1,13 @@
+
+NEWS ABOUT TRACTORGEN
+
+Last updated: Fri Mar 3 13:07:33 EST 2000
+
+ASCII Tractors are pretty,
+ASCII Tractors are red,
+You need ASCII Tractors
+Like a blow to the head.
+
+
+Kbert.
+ -> They do look better in red.
@@ -0,0 +1,73 @@
+
+TRACTORGEN
+==========
+
+Generates ASCII tractors.
+
+This program generates ASCII tractors using the universal tractor
+coefficient (TC). The intended audience is practical ASCII tractor
+theorists and lay people interested in abstract tractor theory.
+
+Before using this program, ensure that you understand the fundamental
+theorem of ASCII tractor mechanics:
+
+ "ASCII Tractors must have at least four wheels." [1]
+
+Note that this theorem applies to side-on views. No useful models of
+two-sided ASCII tractors have been found, nor is there even any
+concrete proof of their existence.
+
+In keeping with this theorem, TRACTORGEN will politely inform the user
+if any attempt to make tractors with less than four wheels is made
+(by calling abort(2) and dumping core).
+
+USAGE
+-----
+
+Tractorgen takes one argument. This argument is indirectly related
+to the TC and is a cardinal enumerating the desired wheel
+configuration. If no argument is given, the optimal configuration
+of 7 is generated.
+
+For example, if you want a tractor with 5 wheels, type at the shell
+prompt:
+
+$ tractorgen 5
+
+Conversely, if you want a tractor with 113 wheels, type:
+
+$ tractorgen 113
+
+Remember that tractors with large numbers of wheels may overflow the
+width of your terminal, with unpredictable results. Actually, it will
+probably just look like shit.
+
+WEB PAGE
+--------
+
+For updates and news regarding TRACTORGEN (both completely unlikely),
+see http://www.vergenet.net/~konradd/software/tractorgen/
+
+LICENSE
+-------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version. See the file COPYING for details.
+
+Though I have no idea why you'd want to do any of this.
+
+AUTHOR
+------
+
+This was written by Kbert (k@vergenet.net), more as a dare than
+anything else. Original inspiration from SCOboy for asking a dumb
+question.
+
+REFERENCES
+----------
+
+[1] See, for example, "Introductory ASCII tractor design, vols 3-7",
+Blum&Merven, Slarken Press 1973.
+
@@ -0,0 +1,19 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(src/tractorgen.c)
+AM_INIT_AUTOMAKE(tractorgen, 0.31.7)
+AM_CONFIG_HEADER(config.h)
+
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+
+AC_MSG_CHECKING(that you're completely fent)
+AC_MSG_RESULT(yes)
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+])
+
@@ -0,0 +1,6 @@
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS = tractorgen
+
+tractorgen_SOURCES = tractorgen.c
+
@@ -0,0 +1,66 @@
+/*
+ * Tractorgen, an ASCII tractor generator
+ *
+ * Copyright (C) 2000 Conrad Parker
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+
+int
+tractorgen (int nr_wheels)
+{
+ int w;
+ int tractor_coefficient = (nr_wheels - 3) * 2 -1;
+
+ printf (" r");
+ for (w=0; w < tractor_coefficient; w++) putchar('-');
+ putchar('\n');
+
+ printf (" _|\n");
+
+ printf (" / |");
+ for (w=0; w < tractor_coefficient; w++) putchar('_');
+ printf ("\\_ \\\\\n");
+
+ printf (" | ");
+ for (w=0; w < tractor_coefficient; w++) putchar(' ');
+ printf ("|o|----\\\\\n");
+
+ printf (" |___");
+ for (w=0; w < tractor_coefficient; w++) putchar('_');
+ printf ("___\\_--_\\\\\n");
+
+ printf (" (O)_O");
+ for (w=0; w < (nr_wheels - 3); w++) printf("_O");
+ printf ("_(O) \\\\\n");
+}
+
+int
+main (int argc, char **argv)
+{
+ int nr_wheels=7;
+
+ if (argc >= 2)
+ nr_wheels = atoi (argv[1]);
+
+ if (nr_wheels < 4) {
+ fprintf (stderr, "tractorgen: ERROR!! Tractors must have at least four wheels!! FOOL!\n");
+ abort ();
+ }
+
+ tractorgen(nr_wheels);
+}

0 comments on commit b4c8d27

Please sign in to comment.