~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/lib/camera.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/**********************************************************
 
3
* I_get_group_camera (group, &Cam_Ref);
 
4
* I_put_group_camera (group, &Cam_Ref);
 
5
**********************************************************/
 
6
#include "orthophoto.h"
 
7
#include <grass/ortholib.h>
 
8
#include <grass/glocale.h>
 
9
 
 
10
/* Put the "camera" name into the group file "CAMERA" */
 
11
int I_put_group_camera(char *group, char *camera)
 
12
{
 
13
    FILE *fd;
 
14
 
 
15
    G_suppress_warnings(1);
 
16
    fd = I_fopen_group_camera_new(group);
 
17
    G_suppress_warnings(0);
 
18
    if (!fd)
 
19
        return 0;
 
20
 
 
21
    fprintf(fd, "%s\n", camera);
 
22
 
 
23
    return 0;
 
24
}
 
25
 
 
26
/* Return the camera name from the group file CAMERA */
 
27
int I_get_group_camera(char *group, char *camera)
 
28
{
 
29
    char buf[200];
 
30
    FILE *fd;
 
31
 
 
32
    G_suppress_warnings(1);
 
33
    fd = I_fopen_group_camera_old(group);
 
34
    G_suppress_warnings(0);
 
35
    if (!fd) {
 
36
        sprintf(buf,
 
37
                _("Unable to open camera file for group <%s> in mapset <%s>"),
 
38
                group, G_mapset());
 
39
        G_warning(buf);
 
40
        return 0;
 
41
    }
 
42
    G_getl2(buf, sizeof(buf), fd);
 
43
    sscanf(buf, "%s", camera);
 
44
    return 1;
 
45
}