Back to index

tetex-bin  3.0
defun.h File Reference
#include "insertion.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


enum insertion_type get_base_type (int type)
void cm_defun (void)

Function Documentation

Definition at line 689 of file defun.c.

  int type;
  char *base_command = xstrdup (command);  /* command with any `x' removed */
  int x_p = (command[strlen (command) - 1] == 'x');

  if (x_p)
    base_command[strlen (base_command) - 1] = 0;

  type = find_type_from_name (base_command);

  /* If we are adding to an already existing insertion, then make sure
     that we are already in an insertion of type TYPE. */
  if (x_p)
      INSERTION_ELT *i = insertion_stack;
      /* Skip over ifclear and ifset conditionals.  */
      while (i && (i->insertion == ifset || i->insertion == ifclear))
        i = i->next;
      if (!i || i->insertion != type)
          line_error (_("Must be in `@%s' environment to use `@%s'"),
                      base_command, command);
          discard_until ("\n");

  defun_internal (type, x_p);
  free (base_command);

Here is the call graph for this function:

Definition at line 302 of file defun.c.

  int base_type;
  switch (type)
    case defivar:    base_type = defcv; break;
    case defmac:     base_type = deffn; break;
    case defmethod:  base_type = defop; break;
    case defopt:     base_type = defvr; break;
    case defspec:    base_type = deffn; break;
    case deftypecv:  base_type = deftypecv; break;
    case deftypefun: base_type = deftypefn; break;
    case deftypeivar:       base_type = deftypeivar; break;
    case deftypemethod:     base_type = deftypemethod; break;
    case deftypeop:  base_type = deftypeop; break;
    case deftypevar: base_type = deftypevr; break;
    case defun:             base_type = deffn; break;
    case defvar:     base_type = defvr; break;
      base_type = type;

  return base_type;

Here is the caller graph for this function: