~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/lib_src/common/erl_printf.c

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
3
 * 
4
 
 * Copyright Ericsson AB 2005-2009. All Rights Reserved.
 
4
 * Copyright Ericsson AB 2005-2011. All Rights Reserved.
5
5
 * 
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
108
108
        if (PUTC(buf[i], (FILE *) vfp) == EOF)
109
109
            return get_error_result();
110
110
    }
111
 
    return 0;
 
111
    return len;
112
112
}
113
113
 
114
114
static int
126
126
#endif
127
127
    if (FWRITE((void *) buf, sizeof(char), len, (FILE *) vfp) != len)
128
128
        return get_error_result();
129
 
    return 0;
 
129
    return len;
130
130
}
131
131
 
132
132
static int
133
133
write_fd(void *vfdp, char* buf, size_t len)
134
134
{
135
135
    ssize_t size;
 
136
    size_t res = len;
136
137
    ASSERT(vfdp);
137
138
 
138
139
    while (len) {
149
150
        len -= size;
150
151
    }
151
152
 
152
 
    return 0;
 
153
    return res;
153
154
}
154
155
 
155
156
static int
160
161
    ASSERT(len > 0);
161
162
    memcpy((void *) *wbufpp, (void *) bufp, len);
162
163
    *wbufpp += len;
163
 
    return 0;
 
164
    return len;
164
165
}
165
166
 
166
167
 
182
183
        memcpy((void *) wsnap->buf, (void *) buf, sz);
183
184
        wsnap->buf += sz;
184
185
        wsnap->len -= sz;
 
186
        return sz;
185
187
    }
186
188
    return 0;
187
189
}
201
203
    }
202
204
    memcpy((void *) (dsbufp->str + dsbufp->str_len), (void *) buf, len);
203
205
    dsbufp->str_len += len;
204
 
    return 0;
 
206
    return len;
205
207
}
206
208
 
207
209
int