Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: __LINE__ in proc

Re: __LINE__ in proc

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 09 Oct 1998 19:32:50 GMT
Message-ID: <363164d3.105225536@192.86.155.100>


A copy of this was sent to prochak_at_my-dejanews.com (if that email address didn't require changing) On Fri, 09 Oct 1998 19:18:26 GMT, you wrote:

>In article <6vir15$5uh$1_at_nnrp1.dejanews.com>,
> pradeepj_at_delhi.tcs.co.in wrote:
>> Hi !
>> But the line directives included in generated .c file will not help me.
>> Actually I am writing some statement like.
>>
>> printf("Error at line %d in file %s\n", __LINE__ , __FILE__) ;
>>
>> in my .pc file.
>> Now I want the output should gine line position of this
>> statement in proc file not the generated 'c' file.
>> Same is the case with filename, it should give
>> proc file instead of 'c' file.
>>
>> thanks,
>> Pradeep
>>
>
>You will have to preprocess the __LINE__ entries before running
>Pro*C. Here is a quick little perl script that can do this. It is
>invoked as:
>
> preline <your_file_name.x >your_file_name.pc
>
>where your_file_name.x has the __LINE__ tokens.
>This should be easy to put into a make script.

You could just use the "lines=yes" option in proc as well....  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Oct 09 1998 - 14:32:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US