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

« back to all changes in this revision

Viewing changes to display/d.fontlist/main.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
 *
 
4
 * MODULE:       d.fontlist
 
5
 * AUTHOR(S):    James Westervelt (CERL) (original contributor)
 
6
 *               Markus Neteler <neteler itc.it>,
 
7
 *               Bernhard Reiter <bernhard intevation.de>, 
 
8
 *               Huidae Cho <grass4u gmail.com>, 
 
9
 *               Eric G. Miller <egm2 jps.net>, 
 
10
 *               Glynn Clements <glynn gclements.plus.com>, 
 
11
 *               Jan-Oliver Wagner <jan intevation.de>
 
12
 * PURPOSE:      user selection of font for graphics monitor text
 
13
 * COPYRIGHT:    (C) 1999-2008 by the GRASS Development Team
 
14
 *
 
15
 *               This program is free software under the GNU General Public
 
16
 *               License (>=v2). Read the file COPYING that comes with GRASS
 
17
 *               for details.
 
18
 *
 
19
 * Implementation:
 
20
 *  d.fontlist gets the list via D_font_list(), which calls COM_Font_list(),
 
21
 *  which first reads the fonts from the file specified by $GRASS_FONT_CAP
 
22
 *  (falling back to $GISBASE/etc/fontcap), then adds any fonts obtained by
 
23
 *  the driver's Font_list method if provided (currently, only the cairo
 
24
 *  driver implements this method).
 
25
 * 
 
26
 *****************************************************************************/
 
27
#include <stdio.h>
 
28
#include <stdlib.h>
 
29
#include <string.h>
 
30
#include <grass/gis.h>
 
31
#include <grass/display.h>
 
32
#include <grass/glocale.h>
 
33
 
 
34
int main(int argc, char **argv)
 
35
{
 
36
    struct GModule *module;
 
37
    struct Flag *flagl, *flagL;
 
38
    char **list;
 
39
    int count;
 
40
    int i;
 
41
 
 
42
    G_gisinit(argv[0]);
 
43
 
 
44
    module = G_define_module();
 
45
    G_add_keyword(_("display"));
 
46
    G_add_keyword(_("settings"));
 
47
    module->description = _("Lists the available fonts.");
 
48
 
 
49
    flagl = G_define_flag();
 
50
    flagl->key = 'l';
 
51
    flagl->description = _("List fonts (default; provided for compatibility with d.font)");
 
52
 
 
53
    flagL = G_define_flag();
 
54
    flagL->key = 'v';
 
55
    flagL->description = _("List fonts verbosely");
 
56
 
 
57
    if (G_parser(argc, argv))
 
58
        exit(EXIT_FAILURE);
 
59
 
 
60
    D_open_driver();
 
61
    
 
62
    if (flagL->answer)
 
63
        D_font_info(&list, &count);
 
64
    else
 
65
        D_font_list(&list, &count);
 
66
 
 
67
    for (i = 0; i < count; i++)
 
68
        fprintf(stdout, "%s\n", list[i]);
 
69
    
 
70
    D_close_driver();
 
71
 
 
72
    exit(EXIT_SUCCESS);
 
73
}
 
74