updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / lparser / my.patch
blob32a180853398965efc6cce210932b5dffb4b78be
1 --- 2 2006-12-05 17:07:24.000000000 +0100
2 +++ LPARSER.C 2006-12-05 16:58:35.000000000 +0100
3 @@ -13,16 +13,17 @@
5 #include <stdio.h>
6 #include <float.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <stdarg.h>
10 #include <math.h>
11 #include <malloc.h>
12 +#include <time.h>
15 /* Basic types ------------------------------------------------------------ */
18 /* Simple types */
19 #define u8 unsigned char
20 #define u16 unsigned short int
21 @@ -1981,18 +1982,18 @@ Get_value(u32 *j)
23 if (last_recur)
24 r *= fraction;
26 return r;
30 -static
31 -L_init(void)
32 +static
33 +void L_init(void)
34 { /* Process a ls file and setup */
35 FILE *f;
36 char name[max_file], temp[rule_s];
37 boolean found;
38 s16 i, j;
40 /* Init mem */
41 object_s = (char *) malloc(max_string);
42 @@ -2146,17 +2147,17 @@ L_init(void)
43 mark[i] = FALSE;
45 Message("Rule : %s\n", rule[i]);
50 static
51 -L_mutate(void)
52 +void L_mutate(void)
53 { /* Apply mutations to the rules */
54 s16 i, j, k, rules, ii, max = 1000;
55 char T, R, S[10] = "";
56 char rulet[100] = "";
58 for (i = 0; i < num; i++) {
59 if (rule[i][0] == '+')
60 break;
61 @@ -2342,17 +2343,17 @@ L_mutate(void)
63 break;
69 static
70 -L_system(void)
71 +void L_system(void)
72 { /* Expand l-system into production
73 * string. Object_s is read with
74 * the k counter and the next
75 * generation is build up in otemp
76 * with the ot counter. */
78 u32 k, st, s, ss, max = max_string - 10L;
79 char *ot;
80 @@ -2447,17 +2448,17 @@ L_save(void)
81 fprintf(f, "@\n");
83 fclose(f);
88 static
89 -L_draw(void)
90 +void L_draw(void)
91 { /* Process a production string and
92 * generate form */
93 vector pos, end, v, fow, upp, lef;
94 u32 i, max = strlen(object_s);
95 r32 r, a, thick_l, ang_l, dis_l, dis2_l, trope_l;
96 s16 vcount, pcount, j;
97 char temp[max_file], next;
98 boolean found, poly_on = FALSE;
99 @@ -3042,17 +3043,17 @@ Help(void)
100 Message("%s \t-g add ground plane\n", "ls");
101 Message("%s \t-L [num] set amount for ~ command\n", "ls");
102 Message("%s \t-P [num] set amount for t command\n", "ls");
104 Message("%s \t-p [num] limit polygons to [num]\n", "limit");
108 -void
109 +int
110 main(int argc, char *argv[])
112 char temp[max_file];
113 boolean found;
114 s16 tim, i;
116 /* Store the pointers to the comline */
117 s_argc = argc;