~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/barpainet.c

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2008-02-25 15:47:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080225154712-qvr11ekcea4c9ry8
Tags: 1.1.6-0.1ubuntu1
* Merge from debian-multimedia (LP: #120003), Ubuntu Changes:
 - For ffmpeg-related build-deps, remove cvs from package names.
 - Standards-Version 3.7.3
 - Maintainer Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#include <stdlib.h>
3
 
#include <strings.h>
4
 
#include "barpainet.h"
5
 
 
6
 
int inet_aton (const char * str, struct in_addr * add) {
7
 
        const char * pch = str;
8
 
        unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
9
 
        
10
 
        add1 = atoi(pch);
11
 
        pch = strpbrk(pch,".");
12
 
        if (pch == 0 || ++pch == 0) goto done;
13
 
        add2 = atoi(pch);
14
 
        pch = strpbrk(pch,".");
15
 
        if (pch == 0 || ++pch == 0) goto done;
16
 
        add3 = atoi(pch);
17
 
        pch = strpbrk(pch,".");
18
 
        if (pch == 0 || ++pch == 0) goto done;
19
 
        add4 = atoi(pch);
20
 
 
21
 
done:
22
 
        add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1;
23
 
        
24
 
        return 1;       
25
 
}