Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Pre-ANSI C functions and .NET browse information symbols

Reply
Thread Tools

Pre-ANSI C functions and .NET browse information symbols

 
 
RK
Guest
Posts: n/a
 
      01-31-2005
I need to compile a library of C code with pre-ANSI C functions using MS
..NET 2003. The functions are declared something like this:

int myFunction(p)
double p;
{
int x;
code here...
return x;
}

The compilation proceeds without a glitch but when I tell .NET to build
browse information for the functions, it seems not to include the pre-ANSI
functions in browse information.

I could manually make the functions ANSI compliant by changing the code but
there are 75+ functions. This seems to work for a few functions that I have
altered. Is there a switch that tells .NET that the functions are pre-ANSI
style so that it can build the browse information correctly or some other
way to get the functions into the browse information?

Thanks,
RK


 
Reply With Quote
 
 
 
 
Randy Howard
Guest
Posts: n/a
 
      01-31-2005
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> I need to compile a library of C code with pre-ANSI C functions using MS
> .NET 2003. The functions are declared something like this:
>
> int myFunction(p)
> double p;
> {
> int x;
> code here...
> return x;
> }
>
> The compilation proceeds without a glitch but when I tell .NET to build
> browse information for the functions, it seems not to include the pre-ANSI
> functions in browse information.
>
> I could manually make the functions ANSI compliant by changing the code but
> there are 75+ functions. This seems to work for a few functions that I have
> altered.


There are a lot of benefits to moving them forward in time to the 1980s. Just
do it and be done with it. You might also find that some subtle problems get
uncovered (and fixed) in this process.

--
Randy Howard (2reply remove FOOBAR)
 
Reply With Quote
 
 
 
 
Jonathan Burd
Guest
Posts: n/a
 
      01-31-2005
RK wrote:
> I need to compile a library of C code with pre-ANSI C functions using MS
> .NET 2003. The functions are declared something like this:
>
> int myFunction(p)
> double p;
> {
> int x;
> code here...
> return x;
> }
>
> The compilation proceeds without a glitch but when I tell .NET to build
> browse information for the functions, it seems not to include the pre-ANSI
> functions in browse information.
>
> I could manually make the functions ANSI compliant by changing the code but
> there are 75+ functions. This seems to work for a few functions that I have
> altered. Is there a switch that tells .NET that the functions are pre-ANSI
> style so that it can build the browse information correctly or some other
> way to get the functions into the browse information?
>
> Thanks,
> RK
>
>


You can use this feature of GCC to generate the ANSI prototypes
for your functions and then simply copy-n-paste them replacing stuff.

gcc -c *.c -aux-info prog.h

Or, better:

http://sourceforge.net/projects/cproto/

Regards,
Jonathan.

--
"We must do something. This is something. Therefore, we must do this."
- Keith Thompson
 
Reply With Quote
 
Servé La
Guest
Posts: n/a
 
      01-31-2005

"RK" <(E-Mail Removed)> schreef in bericht
news(E-Mail Removed)...
> I could manually make the functions ANSI compliant by changing the code

but
> there are 75+ functions. This seems to work for a few functions that I

have
> altered. Is there a switch that tells .NET that the functions are pre-ANSI
> style so that it can build the browse information correctly or some other
> way to get the functions into the browse information?


75 is not a lot. Pay me for half a day and I'll do it


 
Reply With Quote
 
Jonathan Burd
Guest
Posts: n/a
 
      01-31-2005
Jonathan Burd wrote:
> RK wrote:
>
>> I need to compile a library of C code with pre-ANSI C functions using
>> MS .NET 2003. The functions are declared something like this:
>>
>> int myFunction(p)
>> double p;
>> {
>> int x;
>> code here...
>> return x;
>> }
>>
>> The compilation proceeds without a glitch but when I tell .NET to
>> build browse information for the functions, it seems not to include
>> the pre-ANSI functions in browse information.
>>
>> I could manually make the functions ANSI compliant by changing the
>> code but there are 75+ functions. This seems to work for a few
>> functions that I have altered. Is there a switch that tells .NET that
>> the functions are pre-ANSI style so that it can build the browse
>> information correctly or some other way to get the functions into the
>> browse information?
>>
>> Thanks,
>> RK
>>
>>

>
> You can use this feature of GCC to generate the ANSI prototypes
> for your functions and then simply copy-n-paste them replacing stuff.
>
> gcc -c *.c -aux-info prog.h
>
> Or, better:
>
> http://sourceforge.net/projects/cproto/
>
> Regards,
> Jonathan.
>


<ot>
[Your email address isn't available, so:]
Supplementary information:
To build cproto using OpenWatcom and UnxUtils:
1. Edit the watcom.mak makefile.
2. Replace "lex" with "flex" and "yacc" with "bison".
3. At the command prompt:
wmake /u /f watcom.mak
4. cproto --help

UnxUtils: unxutils.sourceforge.net
OpenWatcom: www.openwatcom.org
</ot>

Regards,
Jonathan.

--
"We must do something. This is something. Therefore, we must do this."
- Keith Thompson
 
Reply With Quote
 
RK
Guest
Posts: n/a
 
      02-01-2005
Thanks to those who replied. I will change the functions to make them ANSI
compliant. One more thing that I forgot to mention in my original post -
Visual Studio 6.0 does recognize pre-ANSI functions and correctly builds
browse information for them...

Regards,
RK


"RK" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
>I need to compile a library of C code with pre-ANSI C functions using MS
>.NET 2003. The functions are declared something like this:
>
> int myFunction(p)
> double p;
> {
> int x;
> code here...
> return x;
> }
>
> The compilation proceeds without a glitch but when I tell .NET to build
> browse information for the functions, it seems not to include the pre-ANSI
> functions in browse information.
>
> I could manually make the functions ANSI compliant by changing the code
> but there are 75+ functions. This seems to work for a few functions that I
> have altered. Is there a switch that tells .NET that the functions are
> pre-ANSI style so that it can build the browse information correctly or
> some other way to get the functions into the browse information?
>
> Thanks,
> RK
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning value to Browse button without using browse button in HTML balakrishnan.dinesh@gmail.com Javascript 0 10-12-2007 06:45 AM
Format of browse information jacob navia C Programming 2 07-25-2006 10:15 PM
Internet Explorer 6 Can't Browse, Other Programs Browse Fine... Ike Computer Support 1 08-02-2005 09:20 PM
Regarding Browse information(ALT-F12) feature same as VS 6.0 =?Utf-8?B?U2FuamVldiBCaGF0aWE=?= ASP .Net 2 04-08-2005 01:17 AM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM



Advertisments