473,799 Members | 2,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pre-ANSI C functions and .NET browse information symbols

RK
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
Nov 14 '05 #1
5 1705
In article <pe************ ********@comcas t.com>, us**@email.com 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)
Nov 14 '05 #2
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
Nov 14 '05 #3

"RK" <us**@email.com > schreef in bericht
news:pe******** ************@co mcast.com...
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 :)
Nov 14 '05 #4
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.source forge.net
OpenWatcom: www.openwatcom.org
</ot>

Regards,
Jonathan.

--
"We must do something. This is something. Therefore, we must do this."
- Keith Thompson
Nov 14 '05 #5
RK
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" <us**@email.com > wrote in message
news:pe******** ************@co mcast.com...
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

Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
10226
by: Headless | last post by:
I've marked up song lyrics with the <pre> tag because it seems the most appropriate type of markup for the type of data. This results in inefficient use of horizontal space due to UA's default rendering of <pre> in a fixed width font. To change that I'd have to specify a proportional font family, thereby falling into the size pitfall that is associated with any sort of author specified font family: a) If I specify a sans serif font...
3
3800
Pre
by: Neal | last post by:
A few questions about pre... When presenting preformatted text using the white-space: pre; property/value, Opera renders long lines at small viewport widths as exiting the borders of the element, IE6 extends the element to contain the line. Both necessitate horizontal scrolling. 1) Is one considered incorrect, or are both fair interpretations of the recommendation?
7
18537
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px solid; color:red;
2
2790
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to do this in CSS? <STYLE TYPE="text/css"> pre{ font-size:xx-large;
5
718
by: Michael Shell | last post by:
Greetings, Consider the XHTML document attached at the end of this post. When viewed under Firefox 1.0.5 on Linux, highlighting and pasting (into a text editor) the <pre> tag listing will preserve formatting (white space and line feeds). However, this is not true when doing the same with the <code> tag listing (it will all be pasted on one line with multiple successive spaces treated as a single space) despite the fact that...
8
3804
by: Jarno Suni not | last post by:
It seems to be invalid in HTML 4.01, but valid in XHTML 1.0. Why is there the difference? Can that pose a problem when such a XHTML document is served as text/html?
7
2754
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no tags will remain making the page safe (I have to convert the linefeeds to <BR>s because the Server.EncodeHTML does not do that it seems). The problem is that users can use a special tag when editing the top to specify an area of the tip that will...
9
5551
by: Eric Lindsay | last post by:
I can't figure how to best display little snippets of shell script using <pre>. I just got around to organising to bulk validate some of my web pages, and one of the problems occurs with Bash shell pieces like this: <pre><code> #!/bin/sh ftp -i -n ftp.server.com&lt; &lt;EOF user username password epsv4 cd /
14
3633
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good readibility on browsers w/o css-support. For important notes, warnings etc I use the <pre> tag, which shows in a neat bordered box when viewed with css, and depending on its class a clarifying background-image is shown. I would like the...
0
9689
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.