Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.pascal.misc

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-18-2010, 09:55 AM
BartC
Guest
 
Posts: n/a
Default Re: need this C translated to pascal-family - please.

<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

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 12:59 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.