- implemented include guards
This commit is contained in:
@@ -236,6 +236,9 @@ STATIC int8_t createStub(char *aOutput, cfunction_list_t *aFunctionList)
|
||||
fprintf(cheader, " * @details"NEWLINES" * This is a stub header for CUnit.\\n"NEWLINES);
|
||||
fprintf(cheader, " * - generated by stubser -"NEWLINES" */" NEWLINES NEWLINES);
|
||||
|
||||
fprintf(cheader, "#ifndef _INCLUDE_%s_H"NEWLINES, strtok(gnu_basename(cHeaderName),"."));
|
||||
fprintf(cheader, "#define _INCLUDE_%s_H"NEWLINES NEWLINES, strtok(gnu_basename(cHeaderName),"."));
|
||||
|
||||
function = aFunctionList->head;
|
||||
while (function)
|
||||
{
|
||||
@@ -243,6 +246,8 @@ STATIC int8_t createStub(char *aOutput, cfunction_list_t *aFunctionList)
|
||||
function = function->next;
|
||||
}
|
||||
|
||||
fprintf(cheader, NEWLINES"#endif // _INCLUDE_%s_H"NEWLINES, strtok(gnu_basename(cHeaderName),"."));
|
||||
|
||||
free(cFileName);
|
||||
free(cHeaderName);
|
||||
fclose(cfile);
|
||||
|
Reference in New Issue
Block a user