- fix include guard warning
- additional debug comments
This commit is contained in:
@@ -236,11 +236,11 @@ STATIC int8_t createStub(char *aOutput, char *aNoSuffix, cfunction_list_t *aFunc
|
||||
fprintf(cfile, " * - generated by stubser -"NEWLINES" */" NEWLINES NEWLINES);
|
||||
|
||||
fprintf(cheader, "/* @file %s"NEWLINES, gnu_basename(cHeaderName));
|
||||
fprintf(cheader, " * @details"NEWLINES" * This is a stub header for CUnit.\\n"NEWLINES);
|
||||
fprintf(cheader, " * @details"NEWLINES" * This is a stub header.\\n"NEWLINES);
|
||||
fprintf(cheader, " * - generated by stubser -"NEWLINES" */" NEWLINES NEWLINES);
|
||||
|
||||
fprintf(cheader, "#ifndef _INCLUDE_%s_H"NEWLINES, aNoSuffix);
|
||||
fprintf(cheader, "#define _INCLUDE_%s_H"NEWLINES NEWLINES, aNoSuffix);
|
||||
fprintf(cheader, "#ifndef _STUB_%s_H"NEWLINES, aNoSuffix);
|
||||
fprintf(cheader, "#define _STUB_%s_H"NEWLINES NEWLINES, aNoSuffix);
|
||||
|
||||
function = aFunctionList->head;
|
||||
while (function)
|
||||
@@ -249,7 +249,7 @@ STATIC int8_t createStub(char *aOutput, char *aNoSuffix, cfunction_list_t *aFunc
|
||||
function = function->next;
|
||||
}
|
||||
|
||||
fprintf(cheader, NEWLINES"#endif // _INCLUDE_%s_H"NEWLINES, aNoSuffix);
|
||||
fprintf(cheader, NEWLINES"#endif // _STUB_%s_H"NEWLINES, aNoSuffix);
|
||||
|
||||
free(cFileName);
|
||||
free(cHeaderName);
|
||||
@@ -276,10 +276,14 @@ int stubser_createStub(char *path, char* aNoSuffix, char *aOutput)
|
||||
DEBUG_LOG_APPEND(1, "\n");
|
||||
if (0 != ret)
|
||||
{
|
||||
#if isDebugLevel(1)
|
||||
printf(STUB_CONSOLE_PARSE_ERROR_S2, path, ret);
|
||||
#else
|
||||
printf(STUB_CONSOLE_PARSE_ERROR_S2, gnu_basename(path), ret);
|
||||
#endif
|
||||
if (-2 == ret)
|
||||
{
|
||||
printf(" Block removal error\n");
|
||||
printf(" Block removal error (likely nested comments).\n");
|
||||
}
|
||||
else if (-3 == ret)
|
||||
{
|
||||
@@ -288,8 +292,11 @@ int stubser_createStub(char *path, char* aNoSuffix, char *aOutput)
|
||||
ret = -1;
|
||||
goto end_stubser_createStub;
|
||||
}
|
||||
#if isDebugLevel(1)
|
||||
printf(STUB_CONSOLE_PARSE_OK_S1, path);
|
||||
#else
|
||||
printf(STUB_CONSOLE_PARSE_OK_S1, gnu_basename(path));
|
||||
|
||||
#endif
|
||||
sprintf(fileName, "%s/stub_%s", aOutput, aNoSuffix);
|
||||
ret = createStub(fileName, aNoSuffix, &functionList);
|
||||
if (0 != ret)
|
||||
|
Reference in New Issue
Block a user