All Questions
6 questions
0
votes
1
answer
84
views
Is there a preferred method to reorganise C header files in a project?
I have been given a medium-sized but complex C project (about 200,000 lines in total) which contains around 100 .h files and nearly as many .c files.
Many of the .h files correspond to equivalent .c ...
0
votes
1
answer
127
views
how to auto refactor C for loops
I have a very large old code base I am slowly updating.
Throughout large parts of the code there are for loops preforming basic math routines that I would like to call back to a function ie to change
...
2
votes
1
answer
104
views
Replace function or define by the text itself [duplicate]
How can I replace all occurence of
check_free_set_to_null(&pointer)
by
if (pointer)
{
free(pointer)
printf(pointer have been freed)
}
else
{
printf(pointer couldnt had been freed)
...
3
votes
6
answers
440
views
How to make an old C codebase with many globals reentrant
I'm working with a large, old C codebase (an interpreter) that uses global variables a great deal, with the result that I cannot have two instances of it at once. Is there a straightforward (ideally ...
1
vote
1
answer
194
views
Is there a tool that can refactor this C code correctly?
Lets say I have the following code (the array* function are what we use for resizable arrays and they operate on pointers-to-arrays that are null initialized):
typedef struct MyStruct
{
int i;
} ...
0
votes
1
answer
295
views
Any tools to refactor c structures under a superstructure?
Are there any tools which help manage plain old c structures?
I have a number of structures that I would like to refactor under one big happy structure.
That is, I currently have:
typedef struct ...