2014年5月26日月曜日

K&R Style Function Definition

I first met this kind of old function prototype here(glibc/socket.c).

24 int
26             int domain;
27             int type;
28             int protocol;
29 {
31  return -1;
32 }
Notice the parameters domain,type and protocol are defined outside of the parenthesizes.

Actually it is a old style function prototype, though it is still widely seen in kernel code.
It is also known as pre-ISO function definition.

0 件のコメント:

コメントを投稿