~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/i.photo.rectify/report.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <grass/glocale.h>
2
 
#include "global.h"
3
 
 
4
 
int report(long rectify, int ok)
5
 
{
6
 
    int minutes, hours;
7
 
    long seconds;
8
 
    long ncells;
9
 
 
10
 
    G_message("%s", ok ? _("complete") : _("failed"));
11
 
 
12
 
    if (!ok)
13
 
        return 1;
14
 
 
15
 
    seconds = rectify;
16
 
    minutes = seconds / 60;
17
 
    hours = minutes / 60;
18
 
    minutes -= hours * 60;
19
 
    ncells = target_window.rows * target_window.cols;
20
 
    G_verbose_message(_("%d rows, %d cols (%ld cells) completed in"),
21
 
                        target_window.rows, target_window.cols, ncells);
22
 
    if (hours)
23
 
        G_verbose_message(_("%d:%02d:%02ld hours"), hours, minutes, seconds % 60);
24
 
    else
25
 
        G_verbose_message(_("%d:%02ld minutes"), minutes, seconds % 60);
26
 
    if (seconds)
27
 
        G_verbose_message(_("%.1f cells per minute"),
28
 
                          (60.0 * ncells) / ((double)seconds));
29
 
                      
30
 
    G_message("-----------------------------------------------");
31
 
 
32
 
    return 1;
33
 
}