Skip to content

Instantly share code, notes, and snippets.

@onre
Created May 4, 2020 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onre/c728cf2b22c206195bfa8afb4d93a71e to your computer and use it in GitHub Desktop.
Save onre/c728cf2b22c206195bfa8afb4d93a71e to your computer and use it in GitHub Desktop.
[sgugshell esp@OCTODAD sample]$ cat file001.c
int func000000(void) { return 1000000; }
[sgugshell esp@OCTODAD sample]$ cat main001.c
#include <stdio.h>
#include "test.h"
int main01(void)
{
int rv = 0;
int cnt = 0;
if((rv = func000000()) != 1000000) printf("000000 returned %d\n", rv);cnt++;
return cnt;
}
[sgugshell esp@OCTODAD sample]$ cat test.c
#include <stdio.h>
#include "test.h"
int main(void)
{
int cnt = 0;
cnt += main01();
printf("%d functions called\n", cnt);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment