bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo-4.74.94 uses int instead of enum insertion_type in makeinfo


From: ezra peisach
Subject: texinfo-4.74.94 uses int instead of enum insertion_type in makeinfo
Date: Wed, 30 Mar 2005 16:40:24 -0500 (EST)


When compiling on an SGI with the native compiler - one gets complaints of
using an int when an enum is desired...  

The following fixes a number of those warnings - all dealing with enum
insertion_type.

defun.h: get_base_type() now takes an enum insertion_type
defun.c: get_base_type() use enum instead of int internally.
         defun_internal() takes enum insertion_type instead of int and use
                          enum internally
         cm_defun() ditto
insertion.c: do_enumeration(), end_insertion(), cm_end() ditto

node.c: in call to glean_node_from_menu - cast 0 to enum reftype. As
first argument is 0 - second is ignored.
             

Ezra

*** makeinfo/defun.c    2005/03/30 21:03:49     1.1
--- makeinfo/defun.c    2005/03/30 21:07:01
***************
*** 299,307 ****
  /* This is needed also in insertion.c.  */
  
  enum insertion_type
! get_base_type (int type)
  {
!   int base_type;
    switch (type)
      {
      case defivar:     base_type = defcv; break;
--- 299,307 ----
  /* This is needed also in insertion.c.  */
  
  enum insertion_type
! get_base_type (enum insertion_type type)
  {
!   enum insertion_type base_type;
    switch (type)
      {
      case defivar:     base_type = defcv; break;
***************
*** 329,337 ****
     TYPE says which insertion this is.
     X_P, if nonzero, says not to start a new insertion. */
  static void
! defun_internal (int type, int x_p)
  {
!   int base_type;
    char **defun_args, **scan_args;
    const char *category;
    char *defined_name;
--- 329,337 ----
     TYPE says which insertion this is.
     X_P, if nonzero, says not to start a new insertion. */
  static void
! defun_internal (enum insertion_type type, int x_p)
  {
!   enum insertion_type base_type;
    char **defun_args, **scan_args;
    const char *category;
    char *defined_name;
***************
*** 688,694 ****
  void
  cm_defun (void)
  {
!   int type;
    char *base_command = xstrdup (command);  /* command with any `x' removed */
    int x_p = (command[strlen (command) - 1] == 'x');
  
--- 688,694 ----
  void
  cm_defun (void)
  {
!   enum insertion_type type;
    char *base_command = xstrdup (command);  /* command with any `x' removed */
    int x_p = (command[strlen (command) - 1] == 'x');
  
*** makeinfo/insertion.c        2005/03/30 21:07:36     1.1
--- makeinfo/insertion.c        2005/03/30 21:12:25
***************
*** 955,963 ****
     of the stack.  Otherwise, if TYPE doesn't match the top of the
     insertion stack, give error. */
  static void
! end_insertion (int type)
  {
!   int temp_type;
  
    if (!insertion_level)
      return;
--- 955,963 ----
     of the stack.  Otherwise, if TYPE doesn't match the top of the
     insertion stack, give error. */
  static void
! end_insertion (enum insertion_type type)
  {
!   enum insertion_type temp_type;
  
    if (!insertion_level)
      return;
***************
*** 1576,1582 ****
  /* Start an enumeration insertion of type TYPE.  If the user supplied
     no argument on the line, then use DEFAULT_STRING as the initial string. */
  static void
! do_enumeration (int type, char *default_string)
  {
    get_until_in_line (0, ".", &enumeration_arg);
    canon_white (enumeration_arg);
--- 1576,1582 ----
  /* Start an enumeration insertion of type TYPE.  If the user supplied
     no argument on the line, then use DEFAULT_STRING as the initial string. */
  static void
! do_enumeration (enum insertion_type type, char *default_string)
  {
    get_until_in_line (0, ".", &enumeration_arg);
    canon_white (enumeration_arg);
***************
*** 2054,2060 ****
  cm_end (void)
  {
    char *temp;
!   int type;
  
    get_rest_of_line (0, &temp);
  
--- 2054,2060 ----
  cm_end (void)
  {
    char *temp;
!   enum insertion_type type;
  
    get_rest_of_line (0, &temp);
  
*** makeinfo/node.c     2005/03/30 21:15:43     1.1
--- makeinfo/node.c     2005/03/30 21:17:55
***************
*** 760,766 ****
                          search_forward ("\n* ", input_text_offset);
  
                        if (input_text_offset != -1)
!                         nodename_from_menu = glean_node_from_menu (0, 0);
  
                        if (nodename_from_menu)
                          {
--- 760,767 ----
                          search_forward ("\n* ", input_text_offset);
  
                        if (input_text_offset != -1)
!                         nodename_from_menu = glean_node_from_menu (0, 
!                                                    (enum reftype) 0);
  
                        if (nodename_from_menu)
                          {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]