GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
title.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <grass/imagery.h>
3 
4 
5 int I_get_group_title(const char *group, char *title, int n)
6 {
7  FILE *fd;
8 
9  *title = 0;
11  fd = I_fopen_group_file_old(group, "TITLE");
13  if (fd != NULL) {
14  G_getl2(title, n, fd);
15  fclose(fd);
16  }
17 
18  return (fd != NULL);
19 }
20 
21 
22 int I_put_group_title(const char *group, const char *title)
23 {
24  FILE *fd;
25 
26  fd = I_fopen_group_file_new(group, "TITLE");
27  if (fd != NULL) {
28  fprintf(fd, "%s\n", title);
29  fclose(fd);
30  }
31 
32  return (fd != NULL);
33 }
FILE * fd
Definition: g3dcolor.c:368
int G_suppress_warnings(int flag)
Suppress printing a warning message to stderr.
int I_get_group_title(const char *group, char *title, int n)
Definition: title.c:5
int G_getl2(char *buf, int n, FILE *fd)
gets a line of text from a file of any pedigree
Definition: getl.c:52
FILE * I_fopen_group_file_old(const char *group, const char *file)
Definition: fopen.c:43
FILE * I_fopen_group_file_new(const char *group, const char *file)
Definition: fopen.c:17
return NULL
Definition: dbfopen.c:1394
fclose(fd)
int n
Definition: dataquad.c:291
int I_put_group_title(const char *group, const char *title)
Definition: title.c:22