Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

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

0 notes on commit b4c8d27

Please sign in to comment.
Something went wrong with that request. Please try again.