Changeset 17 in projects
- Timestamp:
- Sep 15, 2008, 4:19:26 AM (16 years ago)
- Files:
-
- 4 added
- 2 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
driver/puncher-backend.h
r8 r17 23 23 int puncher_backend_write_byte(PuncherBackend* c, unsigned char byte); 24 24 int puncher_backend_destroy(PuncherBackend* c); 25 #define PUNCHER_BACKEND_DPRINTF(bla...) { if(c->debug_flag) fprintf(stderr,bla); } 26 27 #ifdef __WIN32__ 28 // G++ *braucht* dringend vollstaendige Header 29 void puncher_backend_stop(PuncherBackend *c); 30 #endif -
driver/puncher-dummy.c
r9 r17 7 7 **/ 8 8 9 #include "backend.h" 10 9 11 #include <stdio.h> 10 12 #include <stdlib.h> 11 #include <unistd.h> /* usleep! Unix! Not cross platform! */ 12 #include "backend.h" 13 #ifdef __WIN32__ 14 #define usleep(x) Sleep((x) / 1000) 15 #else 16 #include <unistd.h> 17 #endif 13 18 14 19 PuncherBackend* puncher_backend_new(int debug_flag) { 15 20 PuncherBackend *c = malloc(sizeof(PuncherBackend)); 16 printf("[dummy backend] initialisation...\n");21 fprintf(stderr, "[dummy backend] initialisation...\n"); 17 22 return c; 18 23 } 19 24 20 25 int puncher_backend_write_byte(PuncherBackend* c, unsigned char byte) { 21 printf("[dummy backend] punching 0x%x\n", byte);26 fprintf(stderr, "[dummy backend] punching 0x%x\n", byte); 22 27 usleep (20*1000); // 20ms 23 28 return 0; … … 25 30 26 31 int puncher_backend_destroy(PuncherBackend* c) { 27 printf("[dummy backend] finishing backend...\n");32 fprintf(stderr, "[dummy backend] finishing backend...\n"); 28 33 return 0; 29 34 } -
puncher/Makefile
r10 r17 35 35 $(MAKE) -C $(VISUALISATION_DIR) gtkpapertape.o 36 36 37 # backends:38 backend.dummy.o: backend.dummy.c backend.h39 gcc $(CFLAGS) -c backend.dummy.c40 41 backend.linux.o: backend.linux.c backend.h42 gcc $(CFLAGS) -c backend.linux.c43 44 37 45 38 # clean -
puncher/Makefile.win
r11 r17 9 9 g++ -o backend.win/cli.exe $^ -Lbackend.win/ -lWinIo 10 10 11 setoff-strobe: setoff-strobe.win.o backend.win.o12 g++ -o backend.win/setoff-strobe.exe $^ -Lbackend.win/ -lWinIo13 14 setoff-strobe.win.o: setoff-strobe.win.c backend.h15 g++ -c setoff-strobe.win.c16 17 frontend.cli-simple.o: frontend.cli-simple.c backend.h18 g++ -c frontend.cli-simple.c19 20 backend.win.o: backend.win.c backend.h backend.win/WinIo.h21 g++ -c backend.win.c
Note: See TracChangeset
for help on using the changeset viewer.