[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Internet-enabled Contiki Desktop OS



On Tue, 11 Mar 2003 14:10:42 +0000, Martijn van Buul wrote:
>>AD> Contiki already runs on other architectures than the 65xx family:
>>AD> x86, 68000, 6809 (I think).
>> 
>> Add PowerPC to that list, mrsid had the thing running under MacOS X
>> yesterday. Probably shouldn't be a problem to run it under Solaris/
>> SPARC either. Lisa, what about MIPS? :)
> 
> Such a shame that it's written in ANSI-C, and not K&R C, otherwise I would've
> been running it on a PDP11..

Now *that* would be quite nice; it would make Contiki every a few
years older :-) When was the PDP-11 released? 1975?

How much work would it be to convert the existing ANSI C code to K&R?
The most evident part is the function prototypes, but these could be
handled the same way the BSD code does, by using a __P() macro. How
are function arguments handled? In K&R, these are put after the
function preamble (or whatever the "int func(int arg)" is called) and
not inside it. Perhaps several __P1(), __P2(), etc., could be
defined, and these could automatically choose the correct "preamble"
type. 

/adam
-- 
Adam Dunkels - http://dunkels.com/adam/