~ubuntu-branches/ubuntu/karmic/grass/karmic

« back to all changes in this revision

Viewing changes to general/g.mapsets/scan_int.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-07-13 13:34:03 UTC
  • mfrom: (3.1.15 karmic)
  • Revision ID: james.westby@ubuntu.com-20090713133403-0x81m7hb1q06zu13
Tags: 6.4.0~rc5-2
* Added a grass menu item (Hamish).
* Added a grass.menu.in template with related icon.
* Added a simple x-grass wrapper to allow running grass without a pre-running
  controlling terminal. At least it works within ordinary WMs launchers.
  (closes: #503371)
* Added newlocation.dpatch patch to manage correctly new locations.
  (closes: #533738)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "local_proto.h"
2
 
#include <stdio.h>
3
 
int scan_int(char *buf, int *n)
4
 
{
5
 
    char dummy[2];
6
 
 
7
 
    *dummy = 0;
8
 
    if (sscanf(buf, "%d%1s", n, dummy) != 1)
9
 
        return 0;
10
 
 
11
 
    return (*dummy == 0 ? 1 : 0);
12
 
}