W
webwesen
hello gurus,
sorry for a newb question:
i have some c code with
------------------------
some c code
....
unsigned remove_me (blah blah)
{
blah blah;
if blah ()
{
blah;
}
blah
}
....
some more c code
------------------------
is there a way to safely remove function 'remove_me' without writing a
C parser? I was thinking about converting all tabs to spaces with
'expand', then removing duplicate spaces with 'tr', then I would scan
my file for the line 'unsigned remove_me' then count the number of
curly brackets until their number isn't even (each left bracket
corresponds to the right one), then recall the line numbers and remove
anything in between.
this solution seems kinda awkward to me. what do you think?
thanks a lot in advance
sorry for a newb question:
i have some c code with
------------------------
some c code
....
unsigned remove_me (blah blah)
{
blah blah;
if blah ()
{
blah;
}
blah
}
....
some more c code
------------------------
is there a way to safely remove function 'remove_me' without writing a
C parser? I was thinking about converting all tabs to spaces with
'expand', then removing duplicate spaces with 'tr', then I would scan
my file for the line 'unsigned remove_me' then count the number of
curly brackets until their number isn't even (each left bracket
corresponds to the right one), then recall the line numbers and remove
anything in between.
this solution seems kinda awkward to me. what do you think?
thanks a lot in advance