annotate barpainet.c @ 964:583f564da55b libavformat

add 'in32' fourcc support patch by (Baptiste COUDURIER <baptiste.coudurier 0 smartjog o com>)
author michael
date Sat, 18 Feb 2006 09:05:07 +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 }