int foo();
/* … */
int foo(int a, char *b)
{
}
int foo(void);
int foo();
int foo(void);
int foo();
#include <stdio.h>
int foo();
int main()
{
printf("%d\n", foo(1, 2, 3));
return 0;
}
int foo(int a, int b, int c)
{
return a + b + c;
}
int foo();
int foo(char *bar) {
return 1;
}
/* foo.h */
#ifndef __FOO_H__
#define __FOO_H__
/* function prototypes here */
int foo(char *bar);
#ifndef __FOO_C__
/* extern declarations for variables here */
extern int pfft;
#endif
#endif
/* foo.c */
#define __FOO_C__
#include "foo.h";
int global_pfft;
int foo(char *bar) {
return 1;
}
This maybe a noob question.
In ROM and MERC (but not Diku) the methods that are declared globally in .h files have "args" wrapped around them like:
Instead of:
They seem unnecessary (and I saw in the Ice project that they were taken out all together). Does anyone know why they're there or what purpose they serve/served? It seems to be a Merc construct, at least searching stackoverflow I can't find other examples of this being done which isn't to say they aren't there, I just couldn't find them.