~ubuntu-branches/ubuntu/quantal/numdiff/quantal

« back to all changes in this revision

Viewing changes to new.c

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2012-02-18 22:46:31 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120218224631-nxdvpq36o05v6sx7
Tags: 5.6.0-1
* New upstream release:
  - provides manpages -- dropped fix-missing-manpages.patch
  - the other patches updated
* Added patches:
  - up-mkdir-manpages.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    Numdiff - compare putatively similar files, 
3
3
    ignoring small numeric differences
4
 
    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010  Ivano Primi  <ivprimi@libero.it>
 
4
    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012  Ivano Primi  <ivprimi@libero.it>
5
5
 
6
6
    This program is free software: you can redistribute it and/or modify
7
7
    it under the terms of the GNU General Public License as published by
65
65
  int digits, strscale;
66
66
  long expn;
67
67
  char zero_int;
 
68
  size_t length;
68
69
 
69
70
#ifdef BC_A2NUM_DEBUG
70
71
  fprintf (stderr, "\n\"%s\"\n", str);
74
75
  digits = 0;
75
76
  strscale = 0;
76
77
  zero_int = FALSE;
 
78
  length = strlen(pnf->currency);
77
79
  if ( (*ptr == pnf->pos_sign) || (*ptr == pnf->neg_sign) )
78
80
    move_ahead(ptr); /* Sign */
 
81
  if ( length > 0 && strncmp (ptr, pnf->currency, length) == 0 )
 
82
    ptr += length;   /* Skip the currency name, if specified */
79
83
  if (pnf->grouping > 0)
80
84
    {
81
85
      while ( (is_digit((int)*ptr)) || *ptr == pnf->thsep ) 
189
193
      (*num)->n_sign = PLUS;
190
194
      if (*ptr == pnf->pos_sign) ptr++;
191
195
    }
 
196
  if ( length > 0 && strncmp (ptr, pnf->currency, length) == 0 )
 
197
    ptr += length;   /* Skip the currency name, if specified */
192
198
  nptr = (*num)->n_value;
193
199
  if ((zero_int))
194
200
    {