This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[doc, libcpp] Update references to filenames in comments


When the Cpp library was moved to its own directory, at toplevel, some
filename references became ghost.  Fixed with this.


-- Gaby

2005-01-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* internal.h: Update references to Cpp lib filenames.
	* directives.c: Likewise.
	* init.c: Likewise.
	* macro.c: Likewise.
	* traditional.c: Likewise.
 
Index: directives.c
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/directives.c,v
retrieving revision 1.10
diff -p -r1.10 directives.c
*** directives.c	28 Nov 2004 22:27:48 -0000	1.10
--- directives.c	2 Jan 2005 01:31:14 -0000
*************** directive_diagnostics (cpp_reader *pfile
*** 326,332 ****
  
  /* Check if we have a known directive.  INDENTED is nonzero if the
     '#' of the directive was indented.  This function is in this file
!    to save unnecessarily exporting dtable etc. to cpplex.c.  Returns
     nonzero if the line of tokens has been handled, zero if we should
     continue processing the line.  */
  int
--- 326,332 ----
  
  /* Check if we have a known directive.  INDENTED is nonzero if the
     '#' of the directive was indented.  This function is in this file
!    to save unnecessarily exporting dtable etc. to lex.c.  Returns
     nonzero if the line of tokens has been handled, zero if we should
     continue processing the line.  */
  int
*************** _cpp_handle_directive (cpp_reader *pfile
*** 382,388 ****
  
  	 does not cause '#define foo bar' to get executed when
  	 compiled with -save-temps, we recognize directives in
! 	 -fpreprocessed mode only if the # is in column 1.  cppmacro.c
  	 puts a space in front of any '#' at the start of a macro.  */
        if (CPP_OPTION (pfile, preprocessed)
  	  && (indented || !(dir->flags & IN_I)))
--- 382,388 ----
  
  	 does not cause '#define foo bar' to get executed when
  	 compiled with -save-temps, we recognize directives in
! 	 -fpreprocessed mode only if the # is in column 1.  macro.c
  	 puts a space in front of any '#' at the start of a macro.  */
        if (CPP_OPTION (pfile, preprocessed)
  	  && (indented || !(dir->flags & IN_I)))
*************** lex_macro_node (cpp_reader *pfile)
*** 503,509 ****
    return NULL;
  }
  
! /* Process a #define directive.  Most work is done in cppmacro.c.  */
  static void
  do_define (cpp_reader *pfile)
  {
--- 503,509 ----
    return NULL;
  }
  
! /* Process a #define directive.  Most work is done in macro.c.  */
  static void
  do_define (cpp_reader *pfile)
  {
Index: init.c
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/init.c,v
retrieving revision 1.5
diff -p -r1.5 init.c
*** init.c	24 Sep 2004 21:39:06 -0000	1.5
--- init.c	2 Jan 2005 01:31:15 -0000
*************** cpp_destroy (cpp_reader *pfile)
*** 275,281 ****
  
     There are two tables of these.  builtin_array holds all the
     "builtin" macros: these are handled by builtin_macro() in
!    cppmacro.c.  Builtin is somewhat of a misnomer -- the property of
     interest is that these macros require special code to compute their
     expansions.  The value is a "builtin_type" enumerator.
  
--- 275,281 ----
  
     There are two tables of these.  builtin_array holds all the
     "builtin" macros: these are handled by builtin_macro() in
!    macro.c.  Builtin is somewhat of a misnomer -- the property of
     interest is that these macros require special code to compute their
     expansions.  The value is a "builtin_type" enumerator.
  
*************** cpp_finish (cpp_reader *pfile, FILE *dep
*** 567,573 ****
    if (CPP_OPTION (pfile, warn_unused_macros))
      cpp_forall_identifiers (pfile, _cpp_warn_if_unused_macro, NULL);
  
!   /* cpplex.c leaves the final buffer on the stack.  This it so that
       it returns an unending stream of CPP_EOFs to the client.  If we
       popped the buffer, we'd dereference a NULL buffer pointer and
       segfault.  It's nice to allow the client to do worry-free excess
--- 567,573 ----
    if (CPP_OPTION (pfile, warn_unused_macros))
      cpp_forall_identifiers (pfile, _cpp_warn_if_unused_macro, NULL);
  
!   /* lex.c leaves the final buffer on the stack.  This it so that
       it returns an unending stream of CPP_EOFs to the client.  If we
       popped the buffer, we'd dereference a NULL buffer pointer and
       segfault.  It's nice to allow the client to do worry-free excess
Index: internal.h
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/internal.h,v
retrieving revision 1.10
diff -p -r1.10 internal.h
*** internal.h	27 Nov 2004 21:59:38 -0000	1.10
--- internal.h	2 Jan 2005 01:31:15 -0000
*************** struct cpp_reader
*** 396,406 ****
    struct deps *deps;
  
    /* Obstack holding all macro hash nodes.  This never shrinks.
!      See cpphash.c */
    struct obstack hash_ob;
  
    /* Obstack holding buffer and conditional structures.  This is a
!      real stack.  See cpplib.c.  */
    struct obstack buffer_ob;
  
    /* Pragma table - dynamic, because a library user can add to the
--- 396,406 ----
    struct deps *deps;
  
    /* Obstack holding all macro hash nodes.  This never shrinks.
!      See identifiers.c */
    struct obstack hash_ob;
  
    /* Obstack holding buffer and conditional structures.  This is a
!      real stack.  See directives.c.  */
    struct obstack buffer_ob;
  
    /* Pragma table - dynamic, because a library user can add to the
*************** struct cpp_reader
*** 435,441 ****
      source_location first_line;
    } out;
  
!   /* Used for buffer overlays by cpptrad.c.  */
    const unsigned char *saved_cur, *saved_rlimit, *saved_line_base;
  
    /* A saved list of the defined macros, for dependency checking
--- 435,441 ----
      source_location first_line;
    } out;
  
!   /* Used for buffer overlays by traditional.c.  */
    const unsigned char *saved_cur, *saved_rlimit, *saved_line_base;
  
    /* A saved list of the defined macros, for dependency checking
*************** struct cpp_reader
*** 448,454 ****
     definition of a pp-number in the C standard [section 6.4.8 of C99].
  
     In the unlikely event that characters other than \r and \n enter
!    the set is_vspace, the macro handle_newline() in cpplex.c must be
     updated.  */
  #define _dollar_ok(x)	((x) == '$' && CPP_OPTION (pfile, dollars_in_ident))
  
--- 448,454 ----
     definition of a pp-number in the C standard [section 6.4.8 of C99].
  
     In the unlikely event that characters other than \r and \n enter
!    the set is_vspace, the macro handle_newline() in lex.c must be
     updated.  */
  #define _dollar_ok(x)	((x) == '$' && CPP_OPTION (pfile, dollars_in_ident))
  
*************** cpp_in_system_header (cpp_reader *pfile)
*** 481,491 ****
  #define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic)
  #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional)
  
! /* In cpperror.c  */
  extern int _cpp_begin_message (cpp_reader *, int,
  			       source_location, unsigned int);
  
! /* In cppmacro.c */
  extern void _cpp_free_definition (cpp_hashnode *);
  extern bool _cpp_create_definition (cpp_reader *, cpp_hashnode *);
  extern void _cpp_pop_context (cpp_reader *);
--- 481,491 ----
  #define CPP_PEDANTIC(PF) CPP_OPTION (PF, pedantic)
  #define CPP_WTRADITIONAL(PF) CPP_OPTION (PF, warn_traditional)
  
! /* In errors.c  */
  extern int _cpp_begin_message (cpp_reader *, int,
  			       source_location, unsigned int);
  
! /* In macro.c */
  extern void _cpp_free_definition (cpp_hashnode *);
  extern bool _cpp_create_definition (cpp_reader *, cpp_hashnode *);
  extern void _cpp_pop_context (cpp_reader *);
*************** extern bool _cpp_arguments_ok (cpp_reade
*** 497,507 ****
  extern const unsigned char *_cpp_builtin_macro_text (cpp_reader *,
  						     cpp_hashnode *);
  int _cpp_warn_if_unused_macro (cpp_reader *, cpp_hashnode *, void *);
! /* In cpphash.c */
  extern void _cpp_init_hashtable (cpp_reader *, hash_table *);
  extern void _cpp_destroy_hashtable (cpp_reader *);
  
! /* In cppfiles.c */
  typedef struct _cpp_file _cpp_file;
  extern _cpp_file *_cpp_find_file (cpp_reader *, const char *fname,
  				  cpp_dir *start_dir, bool fake);
--- 497,507 ----
  extern const unsigned char *_cpp_builtin_macro_text (cpp_reader *,
  						     cpp_hashnode *);
  int _cpp_warn_if_unused_macro (cpp_reader *, cpp_hashnode *, void *);
! /* In identifiers.c */
  extern void _cpp_init_hashtable (cpp_reader *, hash_table *);
  extern void _cpp_destroy_hashtable (cpp_reader *);
  
! /* In files.c */
  typedef struct _cpp_file _cpp_file;
  extern _cpp_file *_cpp_find_file (cpp_reader *, const char *fname,
  				  cpp_dir *start_dir, bool fake);
*************** extern void _cpp_pop_file_buffer (cpp_re
*** 519,529 ****
  extern bool _cpp_save_file_entries (cpp_reader *pfile, FILE *f);
  extern bool _cpp_read_file_entries (cpp_reader *, FILE *);
  
! /* In cppexp.c */
  extern bool _cpp_parse_expr (cpp_reader *);
  extern struct op *_cpp_expand_op_stack (cpp_reader *);
  
! /* In cpplex.c */
  extern void _cpp_process_line_notes (cpp_reader *, int);
  extern void _cpp_clean_line (cpp_reader *);
  extern bool _cpp_get_fresh_line (cpp_reader *);
--- 519,529 ----
  extern bool _cpp_save_file_entries (cpp_reader *pfile, FILE *f);
  extern bool _cpp_read_file_entries (cpp_reader *, FILE *);
  
! /* In expr.c */
  extern bool _cpp_parse_expr (cpp_reader *);
  extern struct op *_cpp_expand_op_stack (cpp_reader *);
  
! /* In lex.c */
  extern void _cpp_process_line_notes (cpp_reader *, int);
  extern void _cpp_clean_line (cpp_reader *);
  extern bool _cpp_get_fresh_line (cpp_reader *);
*************** extern cpp_token *_cpp_lex_direct (cpp_r
*** 534,543 ****
  extern int _cpp_equiv_tokens (const cpp_token *, const cpp_token *);
  extern void _cpp_init_tokenrun (tokenrun *, unsigned int);
  
! /* In cppinit.c.  */
  extern void _cpp_maybe_push_include_file (cpp_reader *);
  
! /* In cpplib.c */
  extern int _cpp_test_assertion (cpp_reader *, unsigned int *);
  extern int _cpp_handle_directive (cpp_reader *, int);
  extern void _cpp_define_builtin (cpp_reader *, const char *);
--- 534,543 ----
  extern int _cpp_equiv_tokens (const cpp_token *, const cpp_token *);
  extern void _cpp_init_tokenrun (tokenrun *, unsigned int);
  
! /* In init.c.  */
  extern void _cpp_maybe_push_include_file (cpp_reader *);
  
! /* In directives.c */
  extern int _cpp_test_assertion (cpp_reader *, unsigned int *);
  extern int _cpp_handle_directive (cpp_reader *, int);
  extern void _cpp_define_builtin (cpp_reader *, const char *);
*************** extern void _cpp_do_file_change (cpp_rea
*** 550,556 ****
  				 unsigned int, unsigned int);
  extern void _cpp_pop_buffer (cpp_reader *);
  
! /* In cpptrad.c.  */
  extern bool _cpp_scan_out_logical_line (cpp_reader *, cpp_macro *);
  extern bool _cpp_read_logical_line_trad (cpp_reader *);
  extern void _cpp_overlay_buffer (cpp_reader *pfile, const unsigned char *,
--- 550,556 ----
  				 unsigned int, unsigned int);
  extern void _cpp_pop_buffer (cpp_reader *);
  
! /* In traditional.c.  */
  extern bool _cpp_scan_out_logical_line (cpp_reader *, cpp_macro *);
  extern bool _cpp_read_logical_line_trad (cpp_reader *);
  extern void _cpp_overlay_buffer (cpp_reader *pfile, const unsigned char *,
*************** extern unsigned char *_cpp_copy_replacem
*** 563,569 ****
  						  unsigned char *);
  extern size_t _cpp_replacement_text_len (const cpp_macro *);
  
! /* In cppcharset.c.  */
  extern cppchar_t _cpp_valid_ucn (cpp_reader *, const unsigned char **,
  				 const unsigned char *, int);
  extern void _cpp_destroy_iconv (cpp_reader *);
--- 563,569 ----
  						  unsigned char *);
  extern size_t _cpp_replacement_text_len (const cpp_macro *);
  
! /* In charset.c.  */
  extern cppchar_t _cpp_valid_ucn (cpp_reader *, const unsigned char **,
  				 const unsigned char *, int);
  extern void _cpp_destroy_iconv (cpp_reader *);
Index: macro.c
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/macro.c,v
retrieving revision 1.5
diff -p -r1.5 macro.c
*** macro.c	9 Sep 2004 19:16:55 -0000	1.5
--- macro.c	2 Jan 2005 01:31:16 -0000
*************** _cpp_create_definition (cpp_reader *pfil
*** 1540,1546 ****
  
        /* Restore lexer position because of games lex_expansion_token()
  	 plays lexing the macro.  We set the type for SEEN_EOL() in
! 	 cpplib.c.
  
  	 Longer term we should lex the whole line before coming here,
  	 and just copy the expansion.  */
--- 1540,1546 ----
  
        /* Restore lexer position because of games lex_expansion_token()
  	 plays lexing the macro.  We set the type for SEEN_EOL() in
! 	 directives.c.
  
  	 Longer term we should lex the whole line before coming here,
  	 and just copy the expansion.  */
Index: traditional.c
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/traditional.c,v
retrieving revision 1.2
diff -p -r1.2 traditional.c
*** traditional.c	9 Jun 2004 20:10:13 -0000	1.2
--- traditional.c	2 Jan 2005 01:31:16 -0000
*************** enum ls {ls_none = 0,		/* Normal state. 
*** 76,82 ****
  	 ls_predicate,		/* After the predicate, maybe paren?  */
  	 ls_answer};		/* In answer to predicate.  */
  
! /* Lexing TODO: Maybe handle space in escaped newlines.  Stop cpplex.c
     from recognizing comments and directives during its lexing pass.  */
  
  static const uchar *skip_whitespace (cpp_reader *, const uchar *, int);
--- 76,82 ----
  	 ls_predicate,		/* After the predicate, maybe paren?  */
  	 ls_answer};		/* In answer to predicate.  */
  
! /* Lexing TODO: Maybe handle space in escaped newlines.  Stop lex.c
     from recognizing comments and directives during its lexing pass.  */
  
  static const uchar *skip_whitespace (cpp_reader *, const uchar *, int);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]