/[m4]/m4/m4/path.c
ViewVC logotype

Diff of /m4/m4/path.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by gary, Sun May 1 11:10:05 2005 UTC revision 1.14 by gary, Wed May 4 18:56:36 2005 UTC
# Line 1  Line 1 
1  /* GNU m4 -- A simple macro processor  /* GNU m4 -- A simple macro processor
2     Copyright (C) 1989, 90, 91, 92, 93, 98 Free Software Foundation, Inc.  
3       Copyright (C) 1989, 1990, 1991, 1992, 1993, 1998, 2004
4       Free Software Foundation, Inc.
5    
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 121  m4_path_search (m4 *context, const char Line 123  m4_path_search (m4 *context, const char
123    FILE *fp;    FILE *fp;
124    m4__search_path *incl;    m4__search_path *incl;
125    char *name;                   /* buffer for constructed name */    char *name;                   /* buffer for constructed name */
126      int e;
127    
128    /* Look in current working directory first.  */    /* Look in current working directory first.  */
129    fp = fopen (dir, "r");    fp = fopen (dir, "r");
# Line 134  m4_path_search (m4 *context, const char Line 137  m4_path_search (m4 *context, const char
137    /* If file not found, and filename absolute, fail.  */    /* If file not found, and filename absolute, fail.  */
138    if (*dir == '/' || m4_get_no_gnu_extensions_opt (context))    if (*dir == '/' || m4_get_no_gnu_extensions_opt (context))
139      return NULL;      return NULL;
140      e= errno;
141    
142    name = (char *) xmalloc (m4__get_search_path (context)->max_length + 1 + strlen (dir) + 1);    name = (char *) xmalloc (m4__get_search_path (context)->max_length + 1 + strlen (dir) + 1);
143    
# Line 162  m4_path_search (m4 *context, const char Line 166  m4_path_search (m4 *context, const char
166    
167    free (name);    free (name);
168    
169      errno = e;
170    return fp;    return fp;
171  }  }
172    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26