annotate barpainet.c @ 1192:ad731bdb7365 libavformat

rename variables
author bcoudurier
date Fri, 28 Jul 2006 23:00:53 +0000
parents d70e50f1495f
children 8bf9be9bb107
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
1
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
2 #include <stdlib.h>
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
3 #include <strings.h>
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
4 #include "barpainet.h"
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
5
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
6 int inet_aton (const char * str, struct in_addr * add) {
887
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
7 const char * pch = str;
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
8 unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 0
diff changeset
9
887
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
10 add1 = atoi(pch);
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
11 pch = strpbrk(pch,".");
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
12 if (pch == 0 || ++pch == 0) goto done;
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
13 add2 = atoi(pch);
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
14 pch = strpbrk(pch,".");
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
15 if (pch == 0 || ++pch == 0) goto done;
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
16 add3 = atoi(pch);
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
17 pch = strpbrk(pch,".");
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
18 if (pch == 0 || ++pch == 0) goto done;
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
19 add4 = atoi(pch);
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
20
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
21 done:
887
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
22 add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1;
885
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 0
diff changeset
23
887
d70e50f1495f COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 885
diff changeset
24 return 1;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
25 }