~ubuntu-branches/ubuntu/saucy/hplip/saucy-proposed

« back to all changes in this revision

Viewing changes to scan/sane/common.c

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-26 11:20:39 UTC
  • mfrom: (1.5.6) (31.1.3 precise)
  • Revision ID: package-import@ubuntu.com-20120526112039-bevxczegxnbyr5m7
Tags: 3.12.4-1
* New upstream release
* Switch to source/format 3.0 (quilt) - drop dpatch
* Refreshed debian/patches
* dh_autoreconf debian/autogen.sh & set local-options single-debian-patch
* Update to debian/compat -> 9
* Fix "hardened build flags" patch from Moritz - thanks (Closes: #667828)
* Fix "duplex descriptor uninitialized" patch from Matej (Closes: #583273)
* Fix "please migrate to kde-runtime" patch from Pino (Closes: #666544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
24
  Contributing Authors: David Paschal, Don Welch, David Suffield, Naga Samrat Chowdary Narla
 
25
                                                Sarbeswar Meher
25
26
 
26
27
\********************************************************************************************/
27
28
 
266
267
    return 0;
267
268
}
268
269
 
 
270
char* __attribute__ ((visibility ("hidden"))) itoa(int value, char* str, int radix)
 
271
{
 
272
  static char dig[] = "0123456789""abcdefghijklmnopqrstuvwxyz";
 
273
  int n = 0, neg = 0;
 
274
  unsigned int v;
 
275
  char* p, *q;
 
276
  char c;
 
277
 
 
278
  if (radix == 10 && value < 0)
 
279
  {
 
280
    value = -value;
 
281
    neg = 1;
 
282
   }
 
283
  v = value;
 
284
  do {
 
285
    str[n++] = dig[v%radix];
 
286
    v /= radix;
 
287
  } while (v);
 
288
  if (neg)
 
289
    str[n++] = '-';
 
290
    str[n] = '\0';
 
291
 
 
292
  for (p = str, q = p + (n-1); p < q; ++p, --q)
 
293
    c = *p, *p = *q, *q = c;
 
294
  return str;
 
295
}
 
296
 
 
297
 
269
298
 
270
299