xref: /OpenGrok/opengrok-indexer/src/test/resources/sources/c/main.c (revision 2bcacabbe843448903326d34ff21a265b5f37596)
1 #include "header.h"
2 
main(int argc,char ** argv)3 int main(int argc, char **argv) {
4 
5    double ii;
6    ii = 123.4 + 0x432 + 4ul;
7    char c = 'x';
8    c = '''';
9    /*
10    Multi line comment, with embedded strange characters: < > &,
11    email address: testuser@example.com and even an URL:
12    http://www.example.com/index.html and a file name and a path:
13    <example.cpp> and </usr/local/example.h>.
14    Ending with an email address: username@example.com
15    Strange charavters: < > % \\ ' "
16    */
17    printf("Program %s executed with the 'following' \"arguments\":\n", argv[0]);
18    for (int i = 1; i < argc; ++i) {
19       printf("[%s] ", argv[i]);
20    }
21    printf("\\ and \n");
22 
23    // Single line comment in gcc C-code
24 
25    /* Short comment */
26    return EXIT_SUCCESS;
27 }
28