Changeset 17 in projects


Ignore:
Timestamp:
Sep 15, 2008, 4:19:26 AM (11 years ago)
Author:
sven
Message:

Directory restructuring: Due to the new reader project, I've deciced to
make a general "driver" directory which shall contain all drivers and
their tools or auxillary libraries, seperated by operating system. Thus
we'll get

driver/puncher-backend.h
driver/reader-backend.h

for the general interfaces and implementations in driver/linux and
driver/win32, respectively. While the linux implementation features some
command line tools, the win32/NT implementation has the DLL and DEF files
for user mode programming.

I have not decided already about the reader/ and puncher/ directories, but
I think they could be kept, implementing the reader and puncher both CLI
and GTK frontends.

In the meanwhile, I'm writing the visualisator project from the scratch.
I've already rewritten the LOCHSTREIFEN sources -- now they've got a much
cleaner interface and better source with no more stupid features at the
wrong place. Furthermore it renders according to the public ECMA standard
for paper tapes (ECMA 10).

I'm about to rewrite GtkPaperTape in C++ with gtkmm using a
Controler-Model-View pattern. It is supposed to be able to open multiple
views, implement a full hexeditor (paper tape editor) and display having
many other neat futures. Furthermore the stupid repaint/scrolling bugs
should no more appear in the clean rewrite.

Great disadvantage of the rewriting: It's fairly much to do, and I nearly
speak no C++ some days ago, until I've read several books about it. Using
C++ gives me much more flexibility and a powerful real OO system, nothing
what GObject could serve with, at least not with as few code as Cpp does.

There is a time plan -- the new GTK gui and the driver implementations
shall be done in this week... So a lot of work pending :-)

-- Sven @ workstation la celeste

Files:
4 added
2 edited
8 moved

Legend:

Unmodified
Added
Removed
  • driver/puncher-backend.h

    r8 r17  
    2323int puncher_backend_write_byte(PuncherBackend* c, unsigned char byte);
    2424int 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
     29void puncher_backend_stop(PuncherBackend *c);
     30#endif
  • driver/puncher-dummy.c

    r9 r17  
    77 **/
    88
     9#include "backend.h"
     10 
    911#include <stdio.h>
    1012#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
    1318
    1419PuncherBackend* puncher_backend_new(int debug_flag) {
    1520    PuncherBackend *c = malloc(sizeof(PuncherBackend));
    16     printf("[dummy backend] initialisation...\n");
     21    fprintf(stderr, "[dummy backend] initialisation...\n");
    1722    return c;
    1823}
    1924
    2025int 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);
    2227    usleep (20*1000); // 20ms
    2328    return 0;
     
    2530
    2631int puncher_backend_destroy(PuncherBackend* c) {
    27     printf("[dummy backend] finishing backend...\n");
     32    fprintf(stderr, "[dummy backend] finishing backend...\n");
    2833    return 0;
    2934}
  • puncher/Makefile

    r10 r17  
    3535        $(MAKE) -C $(VISUALISATION_DIR) gtkpapertape.o
    3636
    37 # backends:
    38 backend.dummy.o: backend.dummy.c backend.h
    39         gcc $(CFLAGS) -c backend.dummy.c
    40 
    41 backend.linux.o: backend.linux.c backend.h
    42         gcc $(CFLAGS) -c backend.linux.c
    43 
    4437
    4538# clean
  • puncher/Makefile.win

    r11 r17  
    99        g++ -o backend.win/cli.exe $^ -Lbackend.win/ -lWinIo
    1010
    11 setoff-strobe: setoff-strobe.win.o backend.win.o
    12         g++ -o backend.win/setoff-strobe.exe $^ -Lbackend.win/ -lWinIo
    13 
    14 setoff-strobe.win.o: setoff-strobe.win.c backend.h
    15         g++ -c setoff-strobe.win.c
    16        
    17 frontend.cli-simple.o: frontend.cli-simple.c backend.h
    18         g++ -c frontend.cli-simple.c
    19 
    20 backend.win.o: backend.win.c backend.h backend.win/WinIo.h
    21         g++ -c backend.win.c
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License