Back to index

tetex-bin  3.0
Classes | Defines | Typedefs | Functions | Variables
cmds.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  COMMAND
struct  acronym_desc

Defines

#define START   0
#define END   1
#define NO_BRACE_ARGS   0
#define BRACE_ARGS   1
#define MAYBE_BRACE_ARGS   2

Typedefs

typedef void COMMAND_FUNCTION ()
typedef struct acronym_desc ACRONYM_DESC

Functions

void insert_self (int arg)
void insert_space (int arg)
void cm_ignore_line (void)
void cm_ignore_arg (int arg, int start_pos, int end_pos)
void cm_comment (void)
void cm_no_op (void)
void cm_setfilename (void)
void cm_settitle (void)
void cm_documentdescription (void)
void cm_node (void)
void cm_menu (void)
void cm_detailmenu (void)
void cm_dircategory (void)
void cm_direntry (void)
void cm_bye (void)
void cm_include (void)
void cm_verbatiminclude (void)
void cm_anchor (int arg)
void cm_xref (int arg)
void cm_pxref (int arg)
void cm_ref (int arg)
void cm_inforef (int arg)
void cm_uref (int arg)
void cm_LaTeX (int arg)
void cm_TeX (int arg)
void cm_bullet (int arg)
void cm_colon (void)
void cm_comma (int arg)
void cm_copyright (int arg)
void cm_dots (int arg)
void cm_enddots (int arg)
void cm_equiv (int arg)
void cm_error (int arg)
void cm_expansion (int arg)
void cm_image (int arg)
void cm_insert_copying (void)
void cm_minus (int arg)
void cm_point (int arg)
void cm_print (int arg)
void cm_punct (int arg)
void cm_registeredsymbol (int arg)
void cm_result (int arg)
void cm_acronym (int arg)
void cm_abbr (int arg)
void cm_b (int arg)
void cm_cite (int arg, int position)
void cm_code (int arg)
void cm_dfn (int arg, int position)
void cm_dmn (int arg)
void cm_email (int arg)
void cm_emph (int arg)
void cm_i (int arg)
void cm_kbd (int arg)
void cm_key (int arg)
void cm_math (int arg)
void cm_not_fixed_width (int arg, int start, int end)
void cm_r (int arg)
void cm_sansserif (int arg)
void cm_sc (int arg, int start_pos, int end_pos)
void cm_slanted (int arg)
void cm_strong (int arg, int start_pos, int end_pos)
void cm_tt (int arg)
void cm_indicate_url (int arg, int start, int end)
void cm_var (int arg, int start_pos, int end_pos)
void cm_verb (int arg)
void cm_cartouche (void)
void cm_group (void)
void cm_display (void)
void cm_smalldisplay (void)
void cm_example (void)
void cm_smallexample (void)
void cm_smalllisp (void)
void cm_lisp (void)
void cm_format (void)
void cm_smallformat (void)
void cm_quotation (void)
void cm_copying (void)
void cm_flushleft (void)
void cm_flushright (void)
void cm_verbatim (void)
void cm_end (void)
void cm_table (void)
void cm_ftable (void)
void cm_vtable (void)
void cm_itemize (void)
void cm_enumerate (void)
void cm_multitable (void)
void cm_headitem (void)
void cm_item (void)
void cm_itemx (void)
void cm_tab (void)
void cm_center (void)
void cm_exdent (void)
void cm_indent (void)
void cm_noindent (void)
void cm_noindent_cmd (void)
void cm_asterisk (void)
void cm_sp (void)
void cm_page (void)
void cm_tie (int arg)
void cm_w (int arg)
void cm_titlepage (void)
void cm_author (void)
void cm_titlepage_cmds (void)
void cm_titlefont (int arg)
void cm_today (int arg)
void cm_float (void)
void cm_caption (int arg)
void cm_shortcaption (void)
void cm_listoffloats (void)
void cm_kindex (void)
void cm_cindex (void)
void cm_findex (void)
void cm_pindex (void)
void cm_vindex (void)
void cm_tindex (void)
void cm_defindex (void)
void cm_defcodeindex (void)
void cm_synindex (void)
void cm_printindex (void)
void cm_set (void)
void cm_clear (void)
void cm_ifset (void)
void cm_ifclear (void)
void cm_ifeq (void)
void cm_value (int arg, int start_pos, int end_pos)

Variables

COMMAND command_table []

Class Documentation

struct COMMAND

Definition at line 42 of file cmds.h.

Class Members
int argument_in_braces
char * name
COMMAND_FUNCTION * proc
struct acronym_desc

Definition at line 51 of file cmds.h.

Collaboration diagram for acronym_desc:
Class Members
char * acronym
char * description
struct acronym_desc * next

Define Documentation

#define BRACE_ARGS   1

Definition at line 39 of file cmds.h.

#define END   1

Definition at line 35 of file cmds.h.

#define MAYBE_BRACE_ARGS   2

Definition at line 40 of file cmds.h.

#define NO_BRACE_ARGS   0

Definition at line 38 of file cmds.h.

#define START   0

Definition at line 34 of file cmds.h.


Typedef Documentation

typedef struct acronym_desc ACRONYM_DESC

Definition at line 27 of file cmds.h.


Function Documentation

void cm_abbr ( int  arg)
void cm_acronym ( int  arg)
void cm_anchor ( int  arg)
void cm_b ( int  arg)
void cm_bullet ( int  arg)
void cm_bye ( void  )

Definition at line 1748 of file cmds.c.

{
  discard_braces (); /* should not have any unclosed braces left */
  input_text_offset = input_text_length;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cm_caption ( int  arg)
void cm_cite ( int  arg,
int  position 
)
void cm_code ( int  arg)
void cm_comma ( int  arg)
void cm_copyright ( int  arg)
void cm_dfn ( int  arg,
int  position 
)
void cm_dmn ( int  arg)
void cm_dots ( int  arg)
void cm_email ( int  arg)
void cm_emph ( int  arg)
void cm_end ( void  )

Definition at line 2054 of file insertion.c.

{
  char *temp;
  int type;

  get_rest_of_line (0, &temp);

  if (!insertion_level)
    {
      line_error (_("Unmatched `%c%s'"), COMMAND_PREFIX, command);
      return;
    }

  if (temp[0] == 0)
    line_error (_("`%c%s' needs something after it"), COMMAND_PREFIX, command);

  type = find_type_from_name (temp);

  if (type == bad_type)
    {
      line_error (_("Bad argument `%s' to `@%s', using `%s'"),
           temp, command, insertion_type_pname (current_insertion_type ()));
    }
  if (xml && type == menu) /* fixme */
    {
      xml_end_menu ();
    }
  end_insertion (type);
  free (temp);
}

Here is the call graph for this function:

void cm_enddots ( int  arg)
void cm_equiv ( int  arg)
void cm_error ( int  arg)
void cm_expansion ( int  arg)
void cm_i ( int  arg)
void cm_ifeq ( void  )
void cm_ignore_arg ( int  arg,
int  start_pos,
int  end_pos 
)
void cm_image ( int  arg)
void cm_indicate_url ( int  arg,
int  start,
int  end 
)
void cm_inforef ( int  arg)

Here is the caller graph for this function:

void cm_item ( void  )

Here is the caller graph for this function:

void cm_kbd ( int  arg)
void cm_key ( int  arg)
void cm_LaTeX ( int  arg)
void cm_lisp ( void  )

Definition at line 170 of file float.c.

{
  char *float_type;
  get_rest_of_line (1, &float_type);

  /* get_rest_of_line increments the line number by one,
     so to make warnings/errors point to the correct line,
     we decrement the line_number again.  */
  if (!handling_delayed_writes)
    line_number--;

  if (handling_delayed_writes && !float_type_exists (float_type))
    warning (_("Requested float type `%s' not previously used"), float_type);

  if (xml)
    {
      xml_insert_element_with_attribute (LISTOFFLOATS, START,
          "type=\"%s\"", text_expansion (float_type));
      xml_insert_element (LISTOFFLOATS, END);
    }
  else if (!handling_delayed_writes)
    {
      int command_len = sizeof ("@ ") + strlen (command) + strlen (float_type);
      char *list_command = xmalloc (command_len + 1);

      /* These are for the text following @listoffloats command.
         Handling them with delayed writes is too late.  */
      close_paragraph ();
      cm_noindent ();

      sprintf (list_command, "@%s %s", command, float_type);
      register_delayed_write (list_command);
      free (list_command);
    }
  else if (float_type_exists (float_type))
    {
      FLOAT_ELT *temp = (FLOAT_ELT *) reverse_list
        ((GENERIC_LIST *) float_stack);
      FLOAT_ELT *new_start = temp;

      if (html)
        insert_string ("<ul class=\"listoffloats\">\n");
      else
        {
          if (!no_headers)
            insert_string ("* Menu:\n\n");
        }

      while (temp)
        {
          if (strlen (temp->id) > 0 && STREQ (float_type, temp->type))
            {
              if (html)
                {
                  /* A bit of space for HTML reabality.  */
                  insert_string ("  ");
                  add_html_block_elt ("<li>");

                  /* Simply relying on @ref command doesn't work here, because
                     commas in the caption may confuse the argument parsing.  */
                  add_word ("<a href=\"");
                  add_anchor_name (temp->id, 1);
                  add_word ("\">");

                  if (strlen (float_type) > 0)
                    execute_string ("%s", float_type);

                  if (strlen (temp->id) > 0)
                    {
                      if (strlen (float_type) > 0)
                        add_char (' ');

                      add_word (temp->number);
                    }

                  if (strlen (temp->title) > 0)
                    {
                      if (strlen (float_type) > 0
                          || strlen (temp->id) > 0)
                        insert_string (": ");

                      execute_string ("%s", temp->title);
                    }

                  add_word ("</a>");

                  add_html_block_elt ("</li>\n");
                }
              else
                {
                  char *entry;
                  char *raw_entry;
                  char *title = expansion (temp->title, 0);

                  int len;
                  int aux_chars_len; /* these are asterisk, colon, etc.  */
                  int column_width; /* width of the first column in menus.  */
                  int number_len; /* length of Figure X.Y: etc.   */
                  int i = 0;

                  /* Chosen widths are to match what @printindex produces.  */
                  if (no_headers)
                    {
                      column_width = 43;
                      /* We have only one auxiliary character, NULL.  */
                      aux_chars_len = sizeof ("");
                    }
                  else
                    {
                      column_width = 37;
                      /* We'll be adding an asterisk, followed by a space
                         and then a colon after the title, to construct a
                         proper menu item.  */
                      aux_chars_len = sizeof ("* :");
                    }

                  /* Allocate enough space for possible expansion later.  */
                  raw_entry = (char *) xmalloc (strlen (float_type)
                      + strlen (temp->number) + strlen (title)
                      + sizeof (":  "));

                  sprintf (raw_entry, "%s %s", float_type, temp->number);

                  if (strlen (title) > 0)
                    strcat (raw_entry, ": ");

                  number_len = strlen (raw_entry);

                  len = strlen (title) + strlen (raw_entry);

                  /* If we have a @shortcaption, try it if @caption is
                     too long to fit on a line.  */
                  if (len + aux_chars_len > column_width
                      && strlen (temp->shorttitle) > 0)
                    title = expansion (temp->shorttitle, 0);

                  strcat (raw_entry, title);
                  len = strlen (raw_entry);

                  if (len + aux_chars_len > column_width)
                    { /* Shorten long titles by looking for a space before
                         column_width - strlen (" ...").  */
                      /* -1 is for NULL, which is already in aux_chars_len.  */
                      aux_chars_len += sizeof ("...") - 1;
                      len = column_width - aux_chars_len;
                      while (raw_entry[len] != ' ' && len >= 0)
                        len--;

                      /* Advance to the whitespace.  */
                      len++;

                      /* If we are at the end of, say, Figure X.Y:, but
                         we have a title, then this means title does not
                         contain any whitespaces.  Or it may be that we
                         went as far as the beginning.  Just print as much
                         as possible of the title.  */
                      if (len == 0
                          || (len == number_len && strlen (title) > 0))
                        len = column_width - sizeof ("...");

                      /* Break here.  */
                      raw_entry[len] = 0;

                      entry = xmalloc (len + aux_chars_len);

                      if (!no_headers)
                        strcpy (entry, "* ");
                      else
                        entry[0] = 0;

                      strcat (entry, raw_entry);
                      strcat (entry, "...");

                      if (!no_headers)
                        strcat (entry, ":");
                    }
                  else
                    {
                      entry = xmalloc (len + aux_chars_len);

                      if (!no_headers)
                        strcpy (entry, "* ");
                      else
                        entry[0] = 0;

                      strcat (entry, raw_entry);

                      if (!no_headers)
                        strcat (entry, ":");
                    }

                  insert_string (entry);

                  i = strlen (entry);
                  /* We insert space chars until ``column_width + four spaces''
                     is reached, to make the layout the same with what we produce
                     for @printindex.  This is of course not obligatory, though
                     easier on the eye.  -1 is for NULL.  */
                  while (i < column_width + sizeof ("    ") - 1)
                    {
                      insert (' ');
                      i++;
                    }

                  if (no_headers)
                    {
                      if (strlen (temp->section) > 0)
                        { /* We got your number.  */
                          insert_string ((char *) _("See "));
                          insert_string (temp->section);
                        }
                      else
                        { /* Sigh, @float in an @unnumbered. :-\  */
                          insert_string ("\n          ");
                          insert_string ((char *) _("See "));
                          insert_string ("``");
                          insert_string (expansion (temp->section_name, 0));
                          insert_string ("''");
                        }
                    }
                  else
                    insert_string (temp->id);

                  insert_string (".\n");

                  free (entry);
                  free (title);
                }
            }
          temp = temp->next;
        }

      if (html)
        {
          inhibit_paragraph_indentation = 1;
          insert_string ("</ul>\n\n");
        }
      else
        insert ('\n');

      /* Retain the original order of float stack.  */
      temp = new_start;
      float_stack = (FLOAT_ELT *) reverse_list ((GENERIC_LIST *) temp);
    }

  free (float_type);
  /* Re-increment the line number, because get_rest_of_line
     left us looking at the next line after the command.  */
  line_number++;
}

Here is the call graph for this function:

void cm_math ( int  arg)
void cm_menu ( void  )
void cm_minus ( int  arg)

Definition at line 1253 of file cmds.c.

{
}

Here is the caller graph for this function:

void cm_node ( void  )

Definition at line 1319 of file cmds.c.

{
  cm_noindent ();
  xml_no_indent = 1;
  skip_whitespace_and_newlines();

  if (xml)
    xml_start_para ();
  else if (html && !paragraph_is_open)
    add_html_block_elt ("<p class=\"noindent\">");
  else
    {
      paragraph_is_open = 0;
      start_paragraph ();
    }
}

Here is the call graph for this function:

void cm_not_fixed_width ( int  arg,
int  start,
int  end 
)
void cm_page ( void  )
void cm_point ( int  arg)
void cm_print ( int  arg)

Definition at line 703 of file index.c.

{
  char *index_name;
  get_rest_of_line (0, &index_name);

  /* get_rest_of_line increments the line number by one,
     so to make warnings/errors point to the correct line,
     we decrement the line_number again.  */
  if (!handling_delayed_writes)
    line_number--;

  if (xml && !docbook)
    {
      xml_insert_element (PRINTINDEX, START);
      insert_string (index_name);
      xml_insert_element (PRINTINDEX, END);
    }
  else if (!handling_delayed_writes)
    {
      int command_len = sizeof ("@ ") + strlen (command) + strlen (index_name);
      char *index_command = xmalloc (command_len + 1);

      close_paragraph ();
      if (docbook)
        xml_begin_index ();

      sprintf (index_command, "@%s %s", command, index_name);
      register_delayed_write (index_command);
      free (index_command);
    }
  else
    {
      int item;
      INDEX_ELT *index;
      INDEX_ELT *last_index = 0;
      INDEX_ELT **array;
      unsigned line_length;
      char *line;
      int saved_inhibit_paragraph_indentation = inhibit_paragraph_indentation;
      int saved_filling_enabled = filling_enabled;
      int saved_line_number = line_number;
      char *saved_input_filename = input_filename;
      unsigned output_line_number_len;

      index = index_list (index_name);
      if (index == (INDEX_ELT *)-1)
        {
          line_error (_("Unknown index `%s' in @printindex"), index_name);
          free (index_name);
          return;
        }

      /* Do this before sorting, so execute_string is in the good environment */
      if (xml && docbook)
        xml_begin_index ();

      /* Do this before sorting, so execute_string in index_element_compare
         will give the same results as when we actually print.  */
      printing_index = 1;
      filling_enabled = 0;
      inhibit_paragraph_indentation = 1;
      xml_sort_index = 1;
      array = sort_index (index);
      xml_sort_index = 0;
      close_paragraph ();
      if (html)
        add_html_block_elt_args ("<ul class=\"index-%s\" compact>",
                                 index_name);
      else if (!no_headers && !docbook)
        { /* Info.  Add magic cookie for info readers (to treat this
             menu differently), and the usual start-of-menu.  */
          add_char ('\0');
          add_word ("\010[index");
          add_char ('\0');
          add_word ("\010]\n");
          add_word ("* Menu:\n\n");
        }

      me_inhibit_expansion++;

      /* This will probably be enough.  */
      line_length = 100;
      line = xmalloc (line_length);

      {
        char *max_output_line_number = (char *) xmalloc (25 * sizeof (char));

        if (no_headers)
          sprintf (max_output_line_number, "%d", output_line_number);
        else
          {
            INDEX_ELT *tmp_entry = index;
            unsigned tmp = 0;
            for (tmp_entry = index; tmp_entry; tmp_entry = tmp_entry->next)
              tmp = tmp_entry->output_line > tmp ? tmp_entry->output_line : tmp;
            sprintf (max_output_line_number, "%d", tmp);
          }

        output_line_number_len = strlen (max_output_line_number);
        free (max_output_line_number);
      }

      for (item = 0; (index = array[item]); item++)
        {
          /* A pathological document might have an index entry outside of any
             node.  Don't crash; try using the section name instead.  */
          char *index_node = index->node;

          line_number = index->defining_line;
          input_filename = index->defining_file;

          if ((!index_node || !*index_node) && html)
            index_node = toc_find_section_of_node (index_node);

          if (!index_node || !*index_node)
            {
              line_error (_("Entry for index `%s' outside of any node"),
                          index_name);
              if (html || !no_headers)
                index_node = (char *) _("(outside of any node)");
            }

          if (html)
            {
              /* For HTML, we need to expand and HTML-escape the
                 original entry text, at the same time.  Consider
                 @cindex J@"urgen.  We want J&uuml;urgen.  We can't
                 expand and then escape since we'll end up with
                 J&amp;uuml;rgen.  We can't escape and then expand
                 because then `expansion' will see J@&quot;urgen, and
                 @&quot;urgen is not a command.  */
              char *html_entry =
                maybe_escaped_expansion (index->entry_text, index->code, 1);

              add_html_block_elt_args ("\n<li><a href=\"%s#index-",
                  (splitting && index->output_file) ? index->output_file : "");
              add_escaped_anchor_name (index->entry_text, 0);
              add_word_args ("-%d\">%s</a>: ", index->entry_number,
                  html_entry);
              free (html_entry);

              add_word ("<a href=\"");
              if (index->node && *index->node)
                {
                  /* Ensure any non-macros in the node name are expanded.  */
                  char *expanded_index;

                  in_fixed_width_font++;
                  expanded_index = expansion (index_node, 0);
                  in_fixed_width_font--;
                  add_anchor_name (expanded_index, 1);
                expanded_index = escape_string (expanded_index);
                  add_word_args ("\">%s</a>", expanded_index);
                  free (expanded_index);
                }
              else if (STREQ (index_node, _("(outside of any node)")))
                {
                  add_anchor_name (index_node, 1);
                  add_word_args ("\">%s</a>", index_node);
                }
              else
                /* If we use the section instead of the (missing) node, then
                   index_node already includes all we need except the #.  */
                add_word_args ("#%s</a>", index_node);

              add_html_block_elt ("</li>");
            }
          else if (xml && docbook)
            {
              /* In the DocBook case, the expanded index entry is not
                 good for us, since it was expanded for non-DocBook mode
                 inside sort_index.  So we send the original entry text
                 to be used with execute_string.  */
              xml_insert_indexentry (index->entry_text, index_node);
            }
          else
            {
              unsigned new_length = strlen (index->entry);

              if (new_length < 50) /* minimum length used below */
                new_length = 50;
              new_length += strlen (index_node) + 7; /* * : .\n\0 */

              if (new_length > line_length)
                {
                  line_length = new_length;
                  line = xrealloc (line, line_length);
                }
              /* Print the entry, nicely formatted.  We've already
                 expanded any commands in index->entry, including any
                 implicit @code.  Thus, can't call execute_string, since
                 @@ has turned into @. */
              if (!no_headers)
                {
                  sprintf (line, "* %-37s  ", index->entry);
                  line[2 + strlen (index->entry)] = ':';
                  insert_string (line);
                  /* Make sure any non-macros in the node name are expanded.  */
                  in_fixed_width_font++;
                  execute_string ("%s. ", index_node);
                  insert_index_output_line_no (index->output_line,
                      output_line_number_len);
                  in_fixed_width_font--;
                }
              else
                {
                  /* With --no-headers, the @node lines are gone, so
                     there's little sense in referring to them in the
                     index.  Instead, output the number or name of the
                     section that corresponds to that node.  */
                  sprintf (line, "%-*s ", number_sections ? 46 : 1, index->entry);
                  line[strlen (index->entry)] = ':';
                  insert_string (line);

                  if (strlen (index->section) > 0)
                    { /* We got your number.  */
                      insert_string ((char *) _("See "));
                      insert_string (index->section);
                    }
                  else
                    { /* Sigh, index in an @unnumbered. :-\  */
                      insert_string ("\n          ");
                      insert_string ((char *) _("See "));
                      insert_string ("``");
                      insert_string (expansion (index->section_name, 0));
                      insert_string ("''");
                    }

                  insert_string (". ");
                  insert_index_output_line_no (index->output_line,
                      output_line_number_len);
                }
            }

          /* Prevent `output_paragraph' from growing to the size of the
             whole index.  */
          flush_output ();
          last_index = index;
        }

      free (line);

      me_inhibit_expansion--;
      printing_index = 0;

      close_single_paragraph ();
      filling_enabled = saved_filling_enabled;
      inhibit_paragraph_indentation = saved_inhibit_paragraph_indentation;
      input_filename = saved_input_filename;
      line_number = saved_line_number;

      if (html)
        add_html_block_elt ("</ul>");
      else if (xml && docbook)
        xml_end_index ();
    }

  free (index_name);
  /* Re-increment the line number, because get_rest_of_line
     left us looking at the next line after the command.  */
  line_number++;
}

Here is the call graph for this function:

void cm_punct ( int  arg)
void cm_pxref ( int  arg)
void cm_r ( int  arg)
void cm_ref ( int  arg)
void cm_result ( int  arg)

Definition at line 1563 of file cmds.c.

{
  if (arg == END)
    add_word (html ? "=&gt;" : "=>");
}

Here is the call graph for this function:

void cm_sansserif ( int  arg)
void cm_sc ( int  arg,
int  start_pos,
int  end_pos 
)
void cm_set ( void  )
void cm_slanted ( int  arg)
void cm_sp ( void  )
void cm_strong ( int  arg,
int  start_pos,
int  end_pos 
)
void cm_tab ( void  )

Definition at line 581 of file multi.c.

{
  if (!multitable_active)
    error (_("ignoring @tab outside of multitable"));

  current_column_no++;
  
  if (html)
    {
      if (seen_column_fractions)
        add_word_args ("</%s><%s valign=\"top\" width=\"%d%%\">",
            headitem_row ? "th" : "td",
            headitem_row ? "th" : "td",
            envs[current_column_no].fill_column);
      else
        add_word_args ("</%s><%s valign=\"top\">",
            headitem_row ? "th" : "td",
            headitem_row ? "th" : "td");
    }
  /*  else if (docbook)*/ /* 05-08 */
  else if (xml)
    xml_end_multitable_column ();
  else
    nselect_next_environment ();

  init_column ();
}

Here is the call graph for this function:

void cm_TeX ( int  arg)
void cm_tie ( int  arg)
void cm_titlefont ( int  arg)
void cm_today ( int  arg)

Definition at line 582 of file cmds.c.

{
  static char *months[12] =
    { N_("January"), N_("February"), N_("March"), N_("April"), N_("May"),
      N_("June"), N_("July"), N_("August"), N_("September"), N_("October"),
      N_("November"), N_("December") };
  if (arg == START)
    {
      time_t timer = time (0);
      struct tm *ts = localtime (&timer);
      add_word_args ("%d %s %d", ts->tm_mday, _(months[ts->tm_mon]),
                     ts->tm_year + 1900);
    }
}

Here is the call graph for this function:

void cm_tt ( int  arg)
void cm_uref ( int  arg)

Definition at line 486 of file xref.c.

{
  if (arg == START)
    {
      extern int printing_index;
      char *url  = get_xref_token (1); /* expands all macros in uref */
      char *desc = get_xref_token (0);
      char *replacement = get_xref_token (0);

      if (docbook)
        {
          xml_insert_element_with_attribute (UREF, START, "url=\"%s\"",
              text_expansion (url));
          if (*replacement)
            execute_string ("%s", replacement);
          else if (*desc)
            execute_string ("%s", desc);
          else
            execute_string ("%s", url);
          xml_insert_element (UREF, END);
        }
      else if (xml)
        {
          xml_insert_element (UREF, START);
          xml_insert_element (UREFURL, START);
          execute_string ("%s", url);
          xml_insert_element (UREFURL, END);
          if (*desc)
            {
              xml_insert_element (UREFDESC, START);
              execute_string ("%s", desc);
              xml_insert_element (UREFDESC, END);
            }
          if (*replacement)
            {
              xml_insert_element (UREFREPLACEMENT, START);
              execute_string ("%s", replacement);
              xml_insert_element (UREFREPLACEMENT, END);
            }
          xml_insert_element (UREF, END);
        }
      else if (html)
        { /* never need to show the url */
          add_html_elt ("<a href=");
          /* don't collapse `--' etc. in the url */
          in_fixed_width_font++;
          execute_string ("\"%s\"", url);
          in_fixed_width_font--;
          add_word (">");
          execute_string ("%s", *replacement ? replacement
                                : (*desc ? desc : url));
          add_word ("</a>");
        }
      else if (*replacement) /* do not show the url */
        execute_string ("%s", replacement);
      else if (*desc)        /* show both text and url */
        {
          execute_string ("%s ", desc);
          in_fixed_width_font++;
          execute_string ("(%s)", url);
          in_fixed_width_font--;
        }
      else /* no text at all, so have the url to show */
        {
          in_fixed_width_font++;
          execute_string ("%s%s%s",
                          printing_index ? "" : "`",
                          url,
                          printing_index ? "" : "'");
          in_fixed_width_font--;
        }
      if (url)
        free (url);
      if (desc)
        free (desc);
      if (replacement)
        free (replacement);
    }
}

Here is the call graph for this function:

void cm_value ( int  arg,
int  start_pos,
int  end_pos 
)

Definition at line 3610 of file makeinfo.c.

{
  static int value_level = 0, saved_meta_pos = -1;

  /* xml_add_char() skips any content inside menus when output format is
     Docbook, so @value{} is no use there.  Also start_pos and end_pos does not
     get updated, causing name to be empty string.  So just return.  */
   if (docbook && in_menu)
     return;

  /* All the text after @value{ upto the matching } will eventually
     disappear from output_paragraph, when this function is called
     with ARG == END.  If the text produced until then sets
     meta_char_pos, we will need to restore it to the value it had
     before @value was seen.  So we need to save the previous value
     of meta_char_pos here.  */
  if (arg == START)
    {
      /* If we are already inside some outer @value, don't overwrite
         the value saved in saved_meta_pos.  */
      if (!value_level)
        saved_meta_pos = meta_char_pos;
      value_level++;
      /* While the argument of @value is processed, we need to inhibit
         textual transformations like "--" into "-", since @set didn't
         do that when it grabbed the name of the variable.  */
      in_fixed_width_font++;
    }
  else
    {
      char *name = (char *) &output_paragraph[start_pos];
      char *value;
      output_paragraph[end_pos] = 0;
      name = xstrdup (name);
      value = set_p (name);
      output_column -= end_pos - start_pos;
      output_paragraph_offset = start_pos;

      /* Restore the previous value of meta_char_pos if the stuff
         inside this @value{} moved it.  */
      if (saved_meta_pos == -1) /* can't happen inside @value{} */
        abort ();
      if (value_level == 1
          && meta_char_pos >= start_pos && meta_char_pos < end_pos)
        {
          meta_char_pos = saved_meta_pos;
          saved_meta_pos = -1;
        }
      value_level--;
      /* No need to decrement in_fixed_width_font, since before
         we are called with arg == END, the reader loop already
         popped the brace stack, which restored in_fixed_width_font,
         among other things.  */

      if (value)
       {
         /* We need to get past the closing brace since the value may
            expand to a context-sensitive macro (e.g. @xref) and produce
            spurious warnings */
         input_text_offset++; 
         execute_string ("%s", value);
         input_text_offset--;
       }
      else
       {
          warning (_("undefined flag: %s"), name);
          add_word_args (_("{No value for `%s'}"), name);
       }

      free (name);
    }
}

Here is the call graph for this function:

void cm_var ( int  arg,
int  start_pos,
int  end_pos 
)
void cm_verb ( int  arg)

Definition at line 1015 of file cmds.c.

{
  int character;
  int delimiter = 0; /* avoid warning */
  int seen_end = 0;

  in_fixed_width_font++;
  /* are these necessary ? */
  last_char_was_newline = 0;

  if (html)
    add_word ("<tt>");

  if (input_text_offset < input_text_length)
    {
      character = curchar ();
      if (character == '{')
       input_text_offset++;
      else
       line_error (_("`{' expected, but saw `%c'"), character);
    }
    
  if (input_text_offset < input_text_length)
    {
      delimiter = curchar ();
      input_text_offset++;
    }

  while (input_text_offset < input_text_length)
    {
      character = curchar ();

      if (character == '\n')
        {
          line_number++;
          if (html)
            add_word ("<br>\n");
        }

      else if (html && character == '<')
        add_word ("&lt;");

      else if (html && character == '&')
        add_word ("&amp;");

      else if (character == delimiter && input_text[input_text_offset+1] == '}')
       { /* Assume no newlines in END_VERBATIM. */
         seen_end = 1;
         input_text_offset++;
         break;
       }

      else
        add_char (character);

      input_text_offset++;
    }

  if (!seen_end)
    warning (_("end of file inside verb block"));
  
  if (input_text_offset < input_text_length)
    {
      character = curchar ();
      if (character == '}')
       input_text_offset++;
      else
       line_error (_("`}' expected, but saw `%c'"), character);
    }

  if (html)
    add_word ("</tt>");

  in_fixed_width_font--;
}

Here is the call graph for this function:

Definition at line 1731 of file cmds.c.

{
  handle_include (1); 
}

Here is the call graph for this function:

void cm_w ( int  arg)

Definition at line 1268 of file cmds.c.

{
  if (arg == START)
    non_splitting_words++;
  else
    {
      if (docbook || html || xml)
        /* This is so @w{$}Log$ doesn't end up as <dollar>Log<dollar>
           in the output.  */
        insert_string ("<!-- /@w -->");
        
      non_splitting_words--;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cm_xref ( int  arg)

Here is the caller graph for this function:

void insert_self ( int  arg)
void insert_space ( int  arg)

Variable Documentation

Definition at line 53 of file cmds.c.