|
|||
|
<no.top.post@gmail.com> wrote in message
news:i70uqh$j9b$1@news.eternal-september.org... > Below is my attempted translation of a C-source to Pascal/Oberon. > My added lines start with "!". > Please add your contributions. Pseudo-code is OK too. > I'll clean-up and integrate all contributions. > Copyright (C) 2007, 2008, 2009, 2010 Josua Dietze > http://www.gnu.org/licenses/gpl.txt */ > > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > #include <assert.h> > #include <signal.h> > #include <ctype.h> > #include <getopt.h> > #include <syslog.h> > > #include <usb.h> > #include "usb_modeswitch.h" > ! various IMPORTs Do you intend also to translate the code of these usb modules? Or do you expect these C modules to link statically with the Pascal code? If that is possible, you might need to define an interface to the C module, in the Pascal code. Sort out these possibilities first before worrying about translating the rest of the code. If linking Pascal to C is feasible, then you may need not need to translate at all... Just modify this module so that it can be linked in the same way to a small Pascal program that just calls an entry point in the C. > #define SEARCH_DEFAULT 0 > #define SEARCH_TARGET 1 > ! various CONSTs <------ Yes, these are all the easy bits. The code here can be translated mechanically. It's all the code that isn't here that is the problem. -- Bartc |
|
|
||||
|
||||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|