lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV Re: DOS, DOS and Windows


From: Foteos Macrides
Subject: Re: LYNX-DEV Re: DOS, DOS and Windows
Date: Sat, 26 Oct 1996 09:27:26 -0500 (EST)

"Hiram Lester, Jr." <address@hidden> wrote:
>On Fri, 25 Oct 1996, Foteos Macrides wrote:
>
>> >Does that mean changing:
>> >
>> >PUBLIC int foo ARGS2 (int,foo1,int,foo2)
>> >
>> >with 
>> >
>> >extern int foo(int foo1, int foo2)
>> 
>>      That's the basic idea, though that conversion is incorrect.
>> The point is that the W3C Reference Library has changed from K&R
>> to ANSI C, and has changed from it's former platform/flavor #ifdef'ing
>> to autoconf'ing, so it seems like this is a good time to do the
>> equivalent conversion for Lynx as a whole, as well.
>
>So, for that example, what would be the CORRECT conversion?

        The K&R macros are in ./WWW/Library/Implementation/HTUtils.h
You need to do what amounts to the translations for __STDC__

[...]
#define PUBLIC                  /* Accessible outside this module     */
#define PRIVATE static          /* Accessible only within this module */

#ifdef __STDC__
#define CONST const             /* "const" only exists in STDC */
#define NOPARAMS (void)
#define PARAMS(parameter_list) parameter_list
#define NOARGS (void)
#define ARGS1(t,a) \
                (t a)
[...]


        "PUBLIC " should be replaced by "" in all .c modules, and with
"extern " in all .h modules (some of the .c modules may have prototyping
of functions within them, instead of in headers, and for those you
specify extern or not depending on whether the actual function is in
that .c module).

        "PRIVATE" should be replaced by "static" in both .c and .h
modules.

        "CONST" should be lowercased in both .c and .h modules.
        
        "PARAMS ((...))" should be stripped to just the "(...)" throughout.
        
        "ARGS# (...)" should have the "ARGS#" stripped, and in the "(...)",
the commas between the types and argument names should be removed.

        "NOPARAMS" and "NOARGS" should be replaced with "(void)".

        You also should check all modules for #ifdef'ing based
on __STD__ and modify them accordingly.  In addition, you want
a breakout of the most current W3C Reference Library available,
to see how it deals with any problems those conversions create,
and to do any new #ifdef'ing homologously.

        Once the Lynx v2.6+Composite code with those mods is
verified to compile and link on a reasonable range of flavors,
an autoconf for the libwww-FM should be created in a manner
homologous to that for the current Reference Library, and then
a compatible one for the LYFoo modules.

        At that point, we can again use the Reference Library
as a Reference, and work toward an uprade to it, with for-Lynx
expansions, but should be able to keep whatever is done along
that road broadly distributeable for generally use (i.e. not
just for developers).

        The hard part will be getting the current #ifdef'ing,
based on the platform/flavor model of the old libwwws, replaced
with #ifdef'ing based on things like POSIX compliance.  I think,
though, that if we do these things with the v2.6+Composite code.
seeking to make that code still do what it was doing before the
conversion, it's more likely to really work out (at least, that's
the way I would go about it if I weren't on vacation 8-).

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]