annotate barpainet.c @ 885:da1d5db0ce5c libavformat

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents 05318cf2e886
children d70e50f1495f
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) {
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
7 const char * pch = str;
05318cf2e886 renamed libav to libavformat
bellard
parents:
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
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
10 add1 = atoi(pch);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
11 pch = strpbrk(pch,".");
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
12 if (pch == 0 || ++pch == 0) goto done;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
13 add2 = atoi(pch);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
14 pch = strpbrk(pch,".");
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
15 if (pch == 0 || ++pch == 0) goto done;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
16 add3 = atoi(pch);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
17 pch = strpbrk(pch,".");
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
18 if (pch == 0 || ++pch == 0) goto done;
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
19 add4 = atoi(pch);
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
20
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
21 done:
05318cf2e886 renamed libav to libavformat
bellard
parents:
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
da1d5db0ce5c COSMETICS: Remove all trailing whitespace.
diego
parents: 0
diff changeset
24 return 1;
0
05318cf2e886 renamed libav to libavformat
bellard
parents:
diff changeset
25 }