Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 7 commits
  • 22 files changed
  • 0 comments
  • 1 contributor
Dec 12, 2011
Werner Almesberger src/renderer/: convert old-style function declarations
foo() is old-style and may make the compiler do stupid things.
Better to do it ANSI-style, i.e., foo(void)
2ad458e
Werner Almesberger renderer/compiler.c: include stdbool.h
This can be needed for out-of-tree compilation of compiler.c
7be1c97
Werner Almesberger src/Makefile: add quiet compilation and make it the default
To return to the previous level of verbosity, use  make V=1
f00b23f
Werner Almesberger move compiler.[ch] from renderer/ to compiler/ 6e7a7da
Werner Almesberger compiler.c: some of the usual whitespace cleanup
Wrap long lines, add blank line between return and goto label, and
remove trailing tabs.
307fdbd
Werner Almesberger compiler.c: fix off-by-one allocation typo f4869ce
Werner Almesberger compiler.c: free user-defined variables after compiling the patch
This patch also corrects a heap-corruption bug in unique_free.
Freeing the variables accelerates compilation of the regular patch
set by about 35-40 ms.
63674ae
32  src/Makefile
@@ -3,9 +3,29 @@ RTEMS_MAKEFILE_PATH ?= \
3 3
     /opt/rtems-$(RTEMS_VERSION)/lm32-rtems$(RTEMS_VERSION)/milkymist/
4 4
 WITH_PDF ?= 0
5 5
 
6  
-CC = lm32-rtems$(RTEMS_VERSION)-gcc
7  
-LD = lm32-rtems$(RTEMS_VERSION)-gcc
8  
-OBJCOPY = lm32-rtems$(RTEMS_VERSION)-objcopy
  6
+CROSS_COMPILER=lm32-rtems$(RTEMS_VERSION)-
  7
+CC_normal := $(CROSS_COMPILER)gcc
  8
+LD_normal := $(CROSS_COMPILER)gcc
  9
+OBJCOPY_normal := $(CROSS_COMPILER)objcopy
  10
+CC_quiet = @echo " CC " $@ && $(CROSS_COMPILER)gcc
  11
+LD_quiet = @echo " LD " $@ && $(CROSS_COMPILER)gcc
  12
+OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(CROSS_COMPILER)objcopy
  13
+
  14
+ifeq ($(V),1)
  15
+    CC = $(CC_normal)
  16
+    AR = $(AR_normal)
  17
+    AS = $(AS_normal)
  18
+    LD = $(LD_normal)
  19
+    OBJCOPY = $(OBJCOPY_normal)
  20
+    RANLIB  = $(RANLIB_normal)
  21
+else
  22
+    CC = $(CC_quiet)
  23
+    AR = $(AR_quiet)
  24
+    AS = $(AS_quiet)
  25
+    LD = $(LD_quiet)
  26
+    OBJCOPY = $(OBJCOPY_quiet)
  27
+    RANLIB  = $(RANLIB_quiet)
  28
+endif
9 29
 
10 30
 CFLAGS = -O9 -Wall -mbarrel-shift-enabled -mmultiply-enabled \
11 31
 	 -mdivide-enabled -msign-extend-enabled -fsingle-precision-constant \
@@ -33,10 +53,10 @@ ifeq ($(WITH_PDF),1)
33 53
 endif
34 54
 OBJS += $(addprefix translations/,french.o german.o)
35 55
 OBJS += $(addprefix renderer/,framedescriptor.o analyzer.o sampler.o \
36  
-	compiler.o eval.o line.o wave.o font.o osd.o raster.o renderer.o \
  56
+	eval.o line.o wave.o font.o osd.o raster.o renderer.o \
37 57
 	videoinreconf.o)
38  
-OBJS += $(addprefix compiler/,fpvm.o parser_helper.o scanner.o parser.o \
39  
-	unique.o)
  58
+OBJS += $(addprefix compiler/,compiler.o fpvm.o parser_helper.o scanner.o \
  59
+	parser.o unique.o)
40 60
 
41 61
 POBJS=$(addprefix $(OBJDIR)/,$(OBJS))
42 62
 
120  src/renderer/compiler.c → src/compiler/compiler.c
@@ -16,6 +16,7 @@
16 16
  */
17 17
 
18 18
 #include <assert.h>
  19
+#include <stdbool.h>
19 20
 #include <stdio.h>
20 21
 #include <stdlib.h>
21 22
 #include <stdarg.h>
@@ -26,6 +27,7 @@
26 27
 #include <fpvm/pfpu.h>
27 28
 
28 29
 #include "../pixbuf/pixbuf.h"
  30
+#include "unique.h"
29 31
 #include "compiler.h"
30 32
 
31 33
 struct compiler_sc {
@@ -148,7 +150,7 @@ static const char pfv_names[COMP_PFV_COUNT][FPVM_MAXSYMLEN] = {
148 150
 	"osc2",
149 151
 	"osc3",
150 152
 	"osc4",
151  
-	
  153
+
152 154
 	"midi1",
153 155
 	"midi2",
154 156
 	"midi3",
@@ -159,7 +161,7 @@ static const char pfv_names[COMP_PFV_COUNT][FPVM_MAXSYMLEN] = {
159 161
 	"midi8",
160 162
 
161 163
 	"video_a",
162  
-	
  164
+
163 165
 	"image1_a",
164 166
 	"image1_x",
165 167
 	"image1_y",
@@ -173,7 +175,7 @@ static const char pfv_names[COMP_PFV_COUNT][FPVM_MAXSYMLEN] = {
173 175
 static int pfv_from_name(const char *name)
174 176
 {
175 177
 	int i;
176  
-	
  178
+
177 179
 	for(i=0;i<COMP_PFV_COUNT;i++) {
178 180
 		if(strcmp(pfv_names[i], name) == 0)
179 181
 			return i;
@@ -192,10 +194,14 @@ static int pfv_from_name(const char *name)
192 194
 
193 195
 static void pfv_update_patch_requires(struct compiler_sc *sc, int pfv)
194 196
 {
195  
-	if(pfv >= pfv_dmx1 && pfv <= pfv_idmx8)		sc->p->require |= REQUIRE_DMX;
196  
-	if(pfv >= pfv_osc1 && pfv <= pfv_osc4)		sc->p->require |= REQUIRE_OSC;
197  
-	if(pfv >= pfv_midi1 && pfv <= pfv_midi8)	sc->p->require |= REQUIRE_MIDI;
198  
-	if(pfv == pfv_video_a)				sc->p->require |= REQUIRE_VIDEO;
  197
+	if(pfv >= pfv_dmx1 && pfv <= pfv_idmx8)
  198
+		sc->p->require |= REQUIRE_DMX;
  199
+	if(pfv >= pfv_osc1 && pfv <= pfv_osc4)
  200
+		sc->p->require |= REQUIRE_OSC;
  201
+	if(pfv >= pfv_midi1 && pfv <= pfv_midi8)
  202
+		sc->p->require |= REQUIRE_MIDI;
  203
+	if(pfv == pfv_video_a)
  204
+		sc->p->require |= REQUIRE_VIDEO;
199 205
 }
200 206
 
201 207
 static void load_defaults(struct compiler_sc *sc)
@@ -226,9 +232,9 @@ static void load_defaults(struct compiler_sc *sc)
226 232
 	sc->p->pfv_initial[pfv_mv_l] = 1.0;
227 233
 
228 234
 	sc->p->pfv_initial[pfv_warp_scale] = 1.0;
229  
-	
  235
+
230 236
 	sc->p->pfv_initial[pfv_video_echo_zoom] = 1.0;
231  
-	
  237
+
232 238
 	sc->p->pfv_initial[pfv_image1_x] = 0.5;
233 239
 	sc->p->pfv_initial[pfv_image1_y] = 0.5;
234 240
 	sc->p->pfv_initial[pfv_image1_zoom] = 1.0;
@@ -262,7 +268,7 @@ static void pfv_bind_callback(void *_sc, const char *sym, int reg)
262 268
 {
263 269
 	struct compiler_sc *sc = _sc;
264 270
 	int pfv;
265  
-	
  271
+
266 272
 	pfv = pfv_from_name(sym);
267 273
 	if(pfv >= 0) {
268 274
 		pfv_update_patch_requires(sc, pfv);
@@ -295,14 +301,16 @@ static bool finalize_pfv(struct compiler_sc *sc)
295 301
 
296 302
 	return true;
297 303
 fail_fpvm:
298  
-	comp_report(sc, "failed to finalize per-frame variables: %s", fpvm_get_last_error(&sc->pfv_fragment));
  304
+	comp_report(sc, "failed to finalize per-frame variables: %s",
  305
+	    fpvm_get_last_error(&sc->pfv_fragment));
299 306
 	return false;
300 307
 }
301 308
 
302 309
 static bool schedule_pfv(struct compiler_sc *sc)
303 310
 {
304 311
 	sc->p->perframe_prog_length = fpvm_default_schedule(&sc->pfv_fragment,
305  
-		(unsigned int *)sc->p->perframe_prog, (unsigned int *)sc->p->perframe_regs);
  312
+		(unsigned int *)sc->p->perframe_prog,
  313
+		(unsigned int *)sc->p->perframe_regs);
306 314
 	if(sc->p->perframe_prog_length < 0) {
307 315
 		comp_report(sc, "per-frame VLIW scheduling failed");
308 316
 		return false;
@@ -319,7 +327,8 @@ static bool schedule_pfv(struct compiler_sc *sc)
319 327
 static bool add_per_frame(struct compiler_sc *sc, char *dest, char *val)
320 328
 {
321 329
 	if(!fpvm_assign(&sc->pfv_fragment, dest, val)) {
322  
-		comp_report(sc, "failed to add per-frame equation l. %d: %s", sc->linenr, fpvm_get_last_error(&sc->pfv_fragment));
  330
+		comp_report(sc, "failed to add per-frame equation l. %d: %s",
  331
+		    sc->linenr, fpvm_get_last_error(&sc->pfv_fragment));
323 332
 		return false;
324 333
 	}
325 334
 	return true;
@@ -374,12 +383,12 @@ static const char pvv_names[COMP_PVV_COUNT][FPVM_MAXSYMLEN] = {
374 383
 	"idmx6",
375 384
 	"idmx7",
376 385
 	"idmx8",
377  
-	
  386
+
378 387
 	"osc1",
379 388
 	"osc2",
380 389
 	"osc3",
381 390
 	"osc4",
382  
-	
  391
+
383 392
 	"midi1",
384 393
 	"midi2",
385 394
 	"midi3",
@@ -393,7 +402,7 @@ static const char pvv_names[COMP_PVV_COUNT][FPVM_MAXSYMLEN] = {
393 402
 static int pvv_from_name(const char *name)
394 403
 {
395 404
 	int i;
396  
-	
  405
+
397 406
 	for(i=0;i<COMP_PVV_COUNT;i++) {
398 407
 		if(strcmp(pvv_names[i], name) == 0)
399 408
 			return i;
@@ -403,16 +412,19 @@ static int pvv_from_name(const char *name)
403 412
 
404 413
 static void pvv_update_patch_requires(struct compiler_sc *sc, int pvv)
405 414
 {
406  
-	if(pvv >= pvv_idmx1 && pvv <= pvv_idmx8)	sc->p->require |= REQUIRE_DMX;
407  
-	if(pvv >= pvv_osc1 && pvv <= pvv_osc4)		sc->p->require |= REQUIRE_OSC;
408  
-	if(pvv >= pvv_midi1 && pvv <= pvv_midi8)	sc->p->require |= REQUIRE_MIDI;
  415
+	if(pvv >= pvv_idmx1 && pvv <= pvv_idmx8)
  416
+		sc->p->require |= REQUIRE_DMX;
  417
+	if(pvv >= pvv_osc1 && pvv <= pvv_osc4)
  418
+		sc->p->require |= REQUIRE_OSC;
  419
+	if(pvv >= pvv_midi1 && pvv <= pvv_midi8)
  420
+		sc->p->require |= REQUIRE_MIDI;
409 421
 }
410 422
 
411 423
 static void pvv_bind_callback(void *_sc, const char *sym, int reg)
412 424
 {
413 425
 	struct compiler_sc *sc = _sc;
414 426
 	int pvv;
415  
-	
  427
+
416 428
 	pvv = pvv_from_name(sym);
417 429
 	if(pvv >= 0) {
418 430
 		pvv_update_patch_requires(sc, pvv);
@@ -428,28 +440,31 @@ static bool init_pvv(struct compiler_sc *sc)
428 440
 	for(i=0;i<COMP_PVV_COUNT;i++)
429 441
 		sc->p->pvv_allocation[i] = -1;
430 442
 	fpvm_set_bind_callback(&sc->pvv_fragment, pvv_bind_callback, sc);
431  
-	
  443
+
432 444
 	fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_SOURCE);
433  
-	#define A(dest, val) if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
  445
+	#define A(dest, val) \
  446
+	    if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
434 447
 	A("x", "i2f(_Xi)*_hmeshsize");
435 448
 	A("y", "i2f(_Yi)*_vmeshsize");
436 449
 	A("rad", "sqrt(sqr(x-0.5)+sqr(y-0.5))");
437 450
 	/* TODO: generate ang */
438 451
 	#undef A
439 452
 	fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_ALL);
440  
-	
  453
+
441 454
 	return true;
442 455
 
443 456
 fail_assign:
444  
-	comp_report(sc, "failed to add equation to per-vertex header: %s", fpvm_get_last_error(&sc->pvv_fragment));
  457
+	comp_report(sc, "failed to add equation to per-vertex header: %s",
  458
+	    fpvm_get_last_error(&sc->pvv_fragment));
445 459
 	return false;
446 460
 }
447 461
 
448 462
 static int finalize_pvv(struct compiler_sc *sc)
449 463
 {
450 464
 	fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_SOURCE);
451  
-	
452  
-	#define A(dest, val) if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
  465
+
  466
+	#define A(dest, val) \
  467
+	    if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
453 468
 
454 469
 	/* Zoom */
455 470
 	A("_invzoom", "1/zoom");
@@ -501,18 +516,23 @@ static int finalize_pvv(struct compiler_sc *sc)
501 516
 	#endif
502 517
 
503 518
 	return true;
  519
+
504 520
 fail_assign:
505  
-	comp_report(sc, "failed to add equation to per-vertex footer: %s", fpvm_get_last_error(&sc->pvv_fragment));
  521
+	comp_report(sc, "failed to add equation to per-vertex footer: %s",
  522
+	    fpvm_get_last_error(&sc->pvv_fragment));
506 523
 	return false;
  524
+
507 525
 fail_finalize:
508  
-	comp_report(sc, "failed to finalize per-vertex variables: %s", fpvm_get_last_error(&sc->pvv_fragment));
  526
+	comp_report(sc, "failed to finalize per-vertex variables: %s",
  527
+	    fpvm_get_last_error(&sc->pvv_fragment));
509 528
 	return false;
510 529
 }
511 530
 
512 531
 static bool schedule_pvv(struct compiler_sc *sc)
513 532
 {
514 533
 	sc->p->pervertex_prog_length = fpvm_default_schedule(&sc->pvv_fragment,
515  
-		(unsigned int *)sc->p->pervertex_prog, (unsigned int *)sc->p->pervertex_regs);
  534
+		(unsigned int *)sc->p->pervertex_prog,
  535
+		(unsigned int *)sc->p->pervertex_regs);
516 536
 	if(sc->p->pervertex_prog_length < 0) {
517 537
 		comp_report(sc, "per-vertex VLIW scheduling failed");
518 538
 		return false;
@@ -528,7 +548,8 @@ static bool schedule_pvv(struct compiler_sc *sc)
528 548
 static bool add_per_vertex(struct compiler_sc *sc, char *dest, char *val)
529 549
 {
530 550
 	if(!fpvm_assign(&sc->pvv_fragment, dest, val)) {
531  
-		comp_report(sc, "failed to add per-vertex equation l. %d: %s\n", sc->linenr, fpvm_get_last_error(&sc->pvv_fragment));
  551
+		comp_report(sc, "failed to add per-vertex equation l. %d: %s\n",
  552
+		    sc->linenr, fpvm_get_last_error(&sc->pvv_fragment));
532 553
 		return false;
533 554
 	}
534 555
 	return true;
@@ -538,13 +559,15 @@ static bool add_per_vertex(struct compiler_sc *sc, char *dest, char *val)
538 559
 /* PARSING                                                      */
539 560
 /****************************************************************/
540 561
 
541  
-static bool process_equation(struct compiler_sc *sc, char *equation, bool per_vertex)
  562
+static bool process_equation(struct compiler_sc *sc, char *equation,
  563
+    bool per_vertex)
542 564
 {
543 565
 	char *c, *c2;
544 566
 
545 567
 	c = strchr(equation, '=');
546 568
 	if(!c) {
547  
-		comp_report(sc, "error l.%d: malformed equation (%s)", sc->linenr, equation);
  569
+		comp_report(sc, "error l.%d: malformed equation (%s)",
  570
+		    sc->linenr, equation);
548 571
 		return false;
549 572
 	}
550 573
 	*c = 0;
@@ -574,7 +597,8 @@ static bool process_equation(struct compiler_sc *sc, char *equation, bool per_ve
574 597
 		return add_per_frame(sc, equation, c);
575 598
 }
576 599
 
577  
-static bool process_equations(struct compiler_sc *sc, char *equations, bool per_vertex)
  600
+static bool process_equations(struct compiler_sc *sc, char *equations,
  601
+    bool per_vertex)
578 602
 {
579 603
 	char *c;
580 604
 
@@ -595,21 +619,23 @@ static bool process_top_assign(struct compiler_sc *sc, char *left, char *right)
595 619
 
596 620
 	while(*right == ' ') right++;
597 621
 	if(*right == 0) return true;
598  
-	
  622
+
599 623
 	if(strncmp(left, "imagefile", 9) == 0) {
600 624
 		int image_n;
601 625
 		char *totalname;
602  
-		
  626
+
603 627
 		image_n = atoi(left+9);
604 628
 		if((image_n < 1) || (image_n > IMAGE_COUNT)) {
605  
-			comp_report(sc, "warning l.%d: ignoring image with out of bounds number %d", sc->linenr, image_n);
  629
+			comp_report(sc, "warning l.%d: ignoring image with out of bounds number %d",
  630
+			     sc->linenr, image_n);
606 631
 			return true;
607 632
 		}
608 633
 		image_n--;
609 634
 		if(right[0] == '/')
610 635
 			totalname = strdup(right);
611 636
 		else {
612  
-			totalname = malloc(strlen(sc->basedir) + strlen(right) + 0);
  637
+			totalname =
  638
+			    malloc(strlen(sc->basedir) + strlen(right) + 1);
613 639
 			if(totalname == NULL) return true;
614 640
 			strcpy(totalname, sc->basedir);
615 641
 			strcat(totalname, right);
@@ -632,11 +658,13 @@ static bool process_top_assign(struct compiler_sc *sc, char *left, char *right)
632 658
 		/* per-frame equation */
633 659
 		return process_equations(sc, right, false);
634 660
 
635  
-	if((strncmp(left, "per_vertex", 10) == 0) || (strncmp(left, "per_pixel", 9) == 0))
  661
+	if((strncmp(left, "per_vertex", 10) == 0) ||
  662
+	    (strncmp(left, "per_pixel", 9) == 0))
636 663
 		/* per-vertex equation */
637 664
 		return process_equations(sc, right, true);
638 665
 
639  
-	comp_report(sc, "warning l.%d: ignoring unknown parameter %s", sc->linenr, left);
  666
+	comp_report(sc, "warning l.%d: ignoring unknown parameter %s",
  667
+	    sc->linenr, left);
640 668
 
641 669
 	return true;
642 670
 }
@@ -692,7 +720,8 @@ static bool parse_patch(struct compiler_sc *sc, char *patch_code)
692 720
 	return true;
693 721
 }
694 722
 
695  
-struct patch *patch_compile(const char *basedir, const char *patch_code, report_message rmc)
  723
+struct patch *patch_compile(const char *basedir, const char *patch_code,
  724
+    report_message rmc)
696 725
 {
697 726
 	struct compiler_sc *sc;
698 727
 	struct patch *p;
@@ -734,6 +763,7 @@ struct patch *patch_compile(const char *basedir, const char *patch_code, report_
734 763
 		goto fail;
735 764
 	}
736 765
 	free(patch_code_copy);
  766
+	unique_free();
737 767
 
738 768
 	if(!finalize_pfv(sc)) goto fail;
739 769
 	if(!schedule_pfv(sc)) goto fail;
@@ -742,18 +772,20 @@ struct patch *patch_compile(const char *basedir, const char *patch_code, report_
742 772
 
743 773
 	free(sc);
744 774
 	return p;
  775
+
745 776
 fail:
746 777
 	free(sc->p);
747 778
 	free(sc);
748 779
 	return NULL;
749 780
 }
750 781
 
751  
-struct patch *patch_compile_filename(const char *filename, const char *patch_code, report_message rmc)
  782
+struct patch *patch_compile_filename(const char *filename,
  783
+    const char *patch_code, report_message rmc)
752 784
 {
753 785
 	char *basedir;
754 786
 	char *c;
755 787
 	struct patch *p;
756  
-	
  788
+
757 789
 	basedir = strdup(filename);
758 790
 	if(basedir == NULL) return NULL;
759 791
 	c = strrchr(basedir, '/');
@@ -771,7 +803,7 @@ struct patch *patch_copy(struct patch *p)
771 803
 {
772 804
 	struct patch *new_patch;
773 805
 	int i;
774  
-	
  806
+
775 807
 	new_patch = malloc(sizeof(struct patch));
776 808
 	assert(new_patch != NULL);
777 809
 	memcpy(new_patch, p, sizeof(struct patch));
@@ -785,7 +817,7 @@ struct patch *patch_copy(struct patch *p)
785 817
 void patch_free(struct patch *p)
786 818
 {
787 819
 	int i;
788  
-	
  820
+
789 821
 	for(i=0;i<IMAGE_COUNT;i++)
790 822
 		pixbuf_dec_ref(p->images[i]);
791 823
 	free(p);
2  src/renderer/compiler.h → src/compiler/compiler.h
@@ -21,7 +21,7 @@
21 21
 #include <rtems.h>
22 22
 #include <bsp/milkymist_pfpu.h>
23 23
 
24  
-#include "framedescriptor.h"
  24
+#include "../renderer/framedescriptor.h"
25 25
 #include "../pixbuf/pixbuf.h"
26 26
 
27 27
 enum {
1  src/compiler/unique.c
@@ -133,5 +133,6 @@ void unique_free(void)
133 133
 	for(i = 0; i != num_vars; i++)
134 134
 		free((void *) vars[i]);
135 135
 	free(vars);
  136
+	vars = NULL;
136 137
 	num_vars = allocated = 0;
137 138
 }
2  src/gui/guirender.c
@@ -25,7 +25,7 @@
25 25
 #include <mtkeycodes.h>
26 26
 #include <bsp/milkymist_video.h>
27 27
 
28  
-#include "../renderer/compiler.h"
  28
+#include "../compiler/compiler.h"
29 29
 #include "../renderer/renderer.h"
30 30
 #include "resmgr.h"
31 31
 #include "../fb.h"
2  src/gui/guirender.h
@@ -18,7 +18,7 @@
18 18
 #ifndef __GUIRENDER_H
19 19
 #define __GUIRENDER_H
20 20
 
21  
-#include "../renderer/compiler.h"
  21
+#include "../compiler/compiler.h"
22 22
 
23 23
 typedef void (*guirender_stop_callback)();
24 24
 
2  src/gui/patcheditor.c
@@ -27,7 +27,7 @@
27 27
 #include "filedialog.h"
28 28
 #include "patcheditor.h"
29 29
 #include "../renderer/framedescriptor.h"
30  
-#include "../renderer/compiler.h"
  30
+#include "../compiler/compiler.h"
31 31
 #include "../input.h"
32 32
 #include "guirender.h"
33 33
 
2  src/gui/performance.c
@@ -33,7 +33,7 @@
33 33
 #include "../fb.h"
34 34
 #include "messagebox.h"
35 35
 #include "../config.h"
36  
-#include "../renderer/compiler.h"
  36
+#include "../compiler/compiler.h"
37 37
 #include "../renderer/renderer.h"
38 38
 #include "guirender.h"
39 39
 #include "performance.h"
4  src/renderer/eval.c
@@ -28,7 +28,7 @@
28 28
 #include <bsp/milkymist_tmu.h>
29 29
 
30 30
 #include "../pixbuf/pixbuf.h"
31  
-#include "compiler.h"
  31
+#include "../compiler/compiler.h"
32 32
 #include "framedescriptor.h"
33 33
 #include "renderer.h"
34 34
 
@@ -367,7 +367,7 @@ void eval_input(struct frame_descriptor *frd)
367 367
 	rtems_message_queue_send(eval_q, &frd, sizeof(void *));
368 368
 }
369 369
 
370  
-void eval_stop()
  370
+void eval_stop(void)
371 371
 {
372 372
 	void *dummy;
373 373
 
2  src/renderer/eval.h
@@ -22,6 +22,6 @@
22 22
 
23 23
 void eval_start(frd_callback callback);
24 24
 void eval_input(struct frame_descriptor *frd);
25  
-void eval_stop();
  25
+void eval_stop(void);
26 26
 
27 27
 #endif /* __EVAL_H */
2  src/renderer/framedescriptor.c
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "framedescriptor.h"
23 23
 
24  
-struct frame_descriptor *new_frame_descriptor()
  24
+struct frame_descriptor *new_frame_descriptor(void)
25 25
 {
26 26
 	struct frame_descriptor *frd;
27 27
 
2  src/renderer/framedescriptor.h
@@ -84,7 +84,7 @@ struct frame_descriptor {
84 84
 
85 85
 typedef void (*frd_callback)(struct frame_descriptor *);
86 86
 
87  
-struct frame_descriptor *new_frame_descriptor();
  87
+struct frame_descriptor *new_frame_descriptor(void);
88 88
 void free_frame_descriptor(struct frame_descriptor *frd);
89 89
 
90 90
 #endif /* __FRAMEDESCRIPTOR_H */
6  src/renderer/osd.c
@@ -35,7 +35,7 @@ static struct font_context osd_font;
35 35
 static int osd_alpha;
36 36
 static int osd_timer;
37 37
 
38  
-static void round_corners()
  38
+static void round_corners(void)
39 39
 {
40 40
 	int i;
41 41
 	int d;
@@ -52,7 +52,7 @@ static void round_corners()
52 52
 	}
53 53
 }
54 54
 
55  
-void osd_init()
  55
+void osd_init(void)
56 56
 {
57 57
 	osd_vertices[0][0].x = 0;
58 58
 	osd_vertices[0][0].y = 0;
@@ -74,7 +74,7 @@ void osd_init()
74 74
 #define OSD_DURATION 90
75 75
 #define OSD_MAX_ALPHA 40
76 76
 
77  
-static void clear_user_area()
  77
+static void clear_user_area(void)
78 78
 {
79 79
 	int x, y;
80 80
 	
2  src/renderer/osd.h
@@ -18,7 +18,7 @@
18 18
 #ifndef __OSD_H
19 19
 #define __OSD_H
20 20
 
21  
-void osd_init();
  21
+void osd_init(void);
22 22
 void osd_event(const char *string);
23 23
 void osd_per_frame(int tmu_fd, unsigned short *dest, int hres, int vres);
24 24
 
2  src/renderer/raster.c
@@ -744,7 +744,7 @@ void raster_input(struct frame_descriptor *frd)
744 744
 	rtems_message_queue_send(raster_q, &frd, sizeof(void *));
745 745
 }
746 746
 
747  
-void raster_stop()
  747
+void raster_stop(void)
748 748
 {
749 749
 	void *dummy;
750 750
 
2  src/renderer/raster.h
@@ -22,6 +22,6 @@
22 22
 
23 23
 void raster_start(int framebuffer_fd, frd_callback callback);
24 24
 void raster_input(struct frame_descriptor *frd);
25  
-void raster_stop();
  25
+void raster_stop(void);
26 26
 
27 27
 #endif /* __RASTER_H */
8  src/renderer/renderer.c
@@ -21,7 +21,7 @@
21 21
 #include <stdlib.h>
22 22
 
23 23
 #include "sampler.h"
24  
-#include "compiler.h"
  24
+#include "../compiler/compiler.h"
25 25
 #include "eval.h"
26 26
 #include "raster.h"
27 27
 #include "osd.h"
@@ -40,12 +40,12 @@ static struct patch *mashup_head;
40 40
 static struct patch *current_patch;
41 41
 static rtems_id patch_lock;
42 42
 
43  
-void renderer_lock_patch()
  43
+void renderer_lock_patch(void)
44 44
 {
45 45
 	rtems_semaphore_obtain(patch_lock, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
46 46
 }
47 47
 
48  
-void renderer_unlock_patch()
  48
+void renderer_unlock_patch(void)
49 49
 {
50 50
 	rtems_semaphore_release(patch_lock);
51 51
 }
@@ -175,7 +175,7 @@ void renderer_start(int framebuffer_fd, struct patch *p)
175 175
 	rsswall_start();
176 176
 }
177 177
 
178  
-void renderer_stop()
  178
+void renderer_stop(void)
179 179
 {
180 180
 	struct patch *p;
181 181
 	
8  src/renderer/renderer.h
@@ -18,7 +18,7 @@
18 18
 #ifndef __RENDERER_H
19 19
 #define __RENDERER_H
20 20
 
21  
-#include "compiler.h"
  21
+#include "../compiler/compiler.h"
22 22
 
23 23
 extern int renderer_texsize;
24 24
 extern int renderer_hmeshlast;
@@ -34,8 +34,8 @@ extern int renderer_squareh;
34 34
  * 4. call renderer_unlock_patch()
35 35
  */
36 36
 
37  
-void renderer_lock_patch();
38  
-void renderer_unlock_patch();
  37
+void renderer_lock_patch(void);
  38
+void renderer_unlock_patch(void);
39 39
 
40 40
 void renderer_pulse_patch(struct patch *p);
41 41
 void renderer_add_patch(struct patch *p);
@@ -43,6 +43,6 @@ void renderer_del_patch(struct patch *p);
43 43
 struct patch *renderer_get_patch(int spin);
44 44
 
45 45
 void renderer_start(int framebuffer_fd, struct patch *p);
46  
-void renderer_stop();
  46
+void renderer_stop(void);
47 47
 
48 48
 #endif /* __RENDERER_H */
2  src/renderer/sampler.c
@@ -323,7 +323,7 @@ void sampler_return(struct frame_descriptor *frd)
323 323
 	rtems_message_queue_send(returned_q, &frd, sizeof(void *));
324 324
 }
325 325
 
326  
-void sampler_stop()
  326
+void sampler_stop(void)
327 327
 {
328 328
 	input_delete_callback(event_callback);
329 329
 	rtems_event_send(sampler_task_id, RTEMS_EVENT_0);
2  src/renderer/sampler.h
@@ -22,6 +22,6 @@
22 22
 
23 23
 void sampler_start(frd_callback callback);
24 24
 void sampler_return(struct frame_descriptor *frd);
25  
-void sampler_stop();
  25
+void sampler_stop(void);
26 26
 
27 27
 #endif /* __SAMPLER_H */
2  src/renderer/videoinreconf.c
@@ -28,7 +28,7 @@ struct reconf_request {
28 28
 
29 29
 static rtems_id request_q;
30 30
 
31  
-void init_videoinreconf()
  31
+void init_videoinreconf(void)
32 32
 {
33 33
 	rtems_status_code sc;
34 34
 	
2  src/renderer/videoinreconf.h
@@ -18,7 +18,7 @@
18 18
 #ifndef __VIDEOINRECONF_H
19 19
 #define __VIDEOINRECONF_H
20 20
 
21  
-void init_videoinreconf();
  21
+void init_videoinreconf(void);
22 22
 void videoinreconf_request(int cmd, int value);
23 23
 void videoinreconf_do(int fd);
24 24
 

No commit comments for this range

Something went wrong with that request. Please try again.