GRASS Programmer's Manual  6.4.2(2012)
title.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <grass/imagery.h>
00003 
00004 
00005 int I_get_group_title(const char *group, char *title, int n)
00006 {
00007     FILE *fd;
00008 
00009     *title = 0;
00010     G_suppress_warnings(1);
00011     fd = I_fopen_group_file_old(group, "TITLE");
00012     G_suppress_warnings(0);
00013     if (fd != NULL) {
00014         G_getl2(title, n, fd);
00015         fclose(fd);
00016     }
00017 
00018     return (fd != NULL);
00019 }
00020 
00021 
00022 int I_put_group_title(const char *group, const char *title)
00023 {
00024     FILE *fd;
00025 
00026     fd = I_fopen_group_file_new(group, "TITLE");
00027     if (fd != NULL) {
00028         fprintf(fd, "%s\n", title);
00029         fclose(fd);
00030     }
00031 
00032     return (fd != NULL);
00033 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines