Last change
on this file since 9 was
9,
checked in by sven, 16 years ago
|
- Recreated Makefiles in visualisator/ and puncher/
- All /visualisator/ sources now compile with -Wall compiler flag
- The basic /puncher/ sources compile with -Wall, too.
- Added Readme for schriften/
Current development is now focussed at /puncher/frontend.gtk.c.
-- Sven @ workstation
|
File size:
727 bytes
|
Line | |
---|
1 | /** |
---|
2 | * This is a dummy backend for debugging and testing purpose. |
---|
3 | * It will print out all it's punched values to STDERR. |
---|
4 | * |
---|
5 | * |
---|
6 | * |
---|
7 | **/ |
---|
8 | |
---|
9 | #include <stdio.h> |
---|
10 | #include <stdlib.h> |
---|
11 | #include <unistd.h> /* usleep! Unix! Not cross platform! */ |
---|
12 | #include "backend.h" |
---|
13 | |
---|
14 | PuncherBackend* puncher_backend_new(int debug_flag) { |
---|
15 | PuncherBackend *c = malloc(sizeof(PuncherBackend)); |
---|
16 | printf("[dummy backend] initialisation...\n"); |
---|
17 | return c; |
---|
18 | } |
---|
19 | |
---|
20 | int puncher_backend_write_byte(PuncherBackend* c, unsigned char byte) { |
---|
21 | printf("[dummy backend] punching 0x%x\n", byte); |
---|
22 | usleep (20*1000); // 20ms |
---|
23 | return 0; |
---|
24 | } |
---|
25 | |
---|
26 | int puncher_backend_destroy(PuncherBackend* c) { |
---|
27 | printf("[dummy backend] finishing backend...\n"); |
---|
28 | return 0; |
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.