[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo cmds.c,1.16,1.17 float.c,1.7,1.8 insertion.c,1.11,1.12
From: |
dirt |
Subject: |
texinfo/makeinfo cmds.c,1.16,1.17 float.c,1.7,1.8 insertion.c,1.11,1.12 xml.c,1.11,1.12 float.h,1.4,1.5 xml.h,1.5,1.6 |
Date: |
Wed, 7 Jan 2004 00:33:27 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv18320/makeinfo
Modified Files:
cmds.c float.c insertion.c xml.c float.h xml.h
Log Message:
2004-01-07 Alper Ersoy <address@hidden>
* makeinfo/cmds.c: new command @shortcaption.
* makeinfo/xml.c:
* makeinfo/xml.h: new element SHORTCAPTION.
* makeinfo/insertion.c (cm_caption): insert CAPTION or SHORTCAPTION
according to command.
(begin_insertion): read @shortcaption too. Fixed XML floatpos
contents.
* makeinfo/float.h: added shorttitle and position to the float_elt
struct.
* makeinfo/float.c (add_new_float): accept a shorttitle argument.
(current_float_shorttitle, current_float_position): new functions.
(cm_listoffloats): if title is too long to fit into a line, try
shorttitle.
Index: cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** cmds.c 6 Jan 2004 18:42:10 -0000 1.16
--- cmds.c 6 Jan 2004 23:33:24 -0000 1.17
***************
*** 72,76 ****
cm_titlepage_cmds (),
cm_tie (), cm_colon (), cm_punct (), cm_tt (),
! cm_float (), cm_caption (), cm_listoffloats (),
cm_verbatim (), cm_verbatiminclude ();
--- 72,76 ----
cm_titlepage_cmds (),
cm_tie (), cm_colon (), cm_punct (), cm_tt (),
! cm_float (), cm_caption (), cm_shortcaption (), cm_listoffloats (),
cm_verbatim (), cm_verbatiminclude ();
***************
*** 327,330 ****
--- 327,331 ----
{ "setshortcontentsaftertitlepage", cm_no_op, NO_BRACE_ARGS },
{ "settitle", cm_settitle, NO_BRACE_ARGS },
+ { "shortcaption", cm_caption, BRACE_ARGS },
{ "shortcontents", cm_shortcontents, NO_BRACE_ARGS },
{ "shorttitlepage", cm_ignore_line, NO_BRACE_ARGS },
Index: float.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** float.c 6 Jan 2004 22:26:08 -0000 1.7
--- float.c 6 Jan 2004 23:33:24 -0000 1.8
***************
*** 32,38 ****
void
! add_new_float (id, title, type, position)
char *id;
char *title;
char *type;
char *position;
--- 32,39 ----
void
! add_new_float (id, title, shorttitle, type, position)
char *id;
char *title;
+ char *shorttitle;
char *type;
char *position;
***************
*** 43,46 ****
--- 44,49 ----
new->type = type;
new->title = title;
+ new->shorttitle = shorttitle;
+ new->position = position;
new->title_used = 0;
***************
*** 100,103 ****
--- 103,112 ----
char *
+ current_float_shorttitle ()
+ {
+ return float_stack->shorttitle;
+ }
+
+ char *
current_float_type ()
{
***************
*** 106,109 ****
--- 115,124 ----
char *
+ current_float_position ()
+ {
+ return float_stack->position;
+ }
+
+ char *
current_float_number ()
{
***************
*** 204,207 ****
--- 219,228 ----
if (len + aux_chars_len > column_width)
+ {
+ title = expansion (temp->shorttitle, 0);
+ len = strlen (temp->number) + strlen (title);
+ }
+
+ if (len + aux_chars_len > column_width)
{ /* Shorten long titles by looking for a space before
column_width - strlen (" ..."). */
Index: insertion.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/insertion.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** insertion.c 6 Jan 2004 21:08:49 -0000 1.11
--- insertion.c 6 Jan 2004 23:33:24 -0000 1.12
***************
*** 744,747 ****
--- 744,748 ----
char *text;
char *caption;
+ char *shortcaption;
int start_of_end;
int save_line_number = line_number;
***************
*** 807,816 ****
caption = "";
canon_white (xreflabel);
canon_white (floattype);
canon_white (position);
canon_white (caption);
! add_new_float (xstrdup (xreflabel), xstrdup (caption),
xstrdup (floattype), xstrdup (position));
--- 808,831 ----
caption = "";
+ /* ... and the @shortcaption. */
+ i = search_forward_until_pos ("address@hidden",
+ save_input_text_offset, start_of_end);
+ if (i > -1)
+ {
+ input_text_offset = i + sizeof ("address@hidden") - 1;
+ get_until_in_braces ("address@hidden float", &shortcaption);
+ input_text_offset = save_input_text_offset;
+ }
+ else
+ shortcaption = "";
+
canon_white (xreflabel);
canon_white (floattype);
canon_white (position);
canon_white (caption);
+ canon_white (shortcaption);
! add_new_float (xstrdup (xreflabel),
! xstrdup (caption), xstrdup (shortcaption),
xstrdup (floattype), xstrdup (position));
***************
*** 834,838 ****
xml_insert_element (FLOATPOS, START);
! execute_string ("%s", current_float_title ());
xml_insert_element (FLOATPOS, END);
}
--- 849,853 ----
xml_insert_element (FLOATPOS, START);
! execute_string ("%s", current_float_position ());
xml_insert_element (FLOATPOS, END);
}
***************
*** 1852,1856 ****
void
cm_caption (arg)
! int arg;
{
char *temp;
--- 1867,1871 ----
void
cm_caption (arg)
! int arg;
{
char *temp;
***************
*** 1872,1879 ****
if (xml)
{
! xml_insert_element (CAPTION, START);
if (!docbook)
execute_string ("%s", temp);
! xml_insert_element (CAPTION, END);
}
--- 1887,1895 ----
if (xml)
{
! int elt = STREQ (command, "shortcaption") ? SHORTCAPTION : CAPTION;
! xml_insert_element (elt, START);
if (!docbook)
execute_string ("%s", temp);
! xml_insert_element (elt, END);
}
Index: xml.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** xml.c 30 Dec 2003 14:22:30 -0000 1.11
--- xml.c 6 Jan 2004 23:33:24 -0000 1.12
***************
*** 180,183 ****
--- 180,184 ----
{ "floatpos", 0, 0, 0 },
{ "caption", 0, 0, 0 },
+ { "shortcaption", 0, 0, 0 },
{ "", 0, 0, 0 }, /* TABLE (docbook) */
***************
*** 381,384 ****
--- 382,386 ----
{ "", 0, 0, 0 }, /* FLOATPOS */
{ "", 0, 0, 0 }, /* CAPTION */
+ { "", 0, 0, 0 }, /* SHORTCAPTION */
{ "table", 0, 1, 0 },
Index: float.h
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** float.h 6 Jan 2004 22:26:08 -0000 1.4
--- float.h 6 Jan 2004 23:33:24 -0000 1.5
***************
*** 29,32 ****
--- 29,34 ----
char *type;
char *title;
+ char *shorttitle;
+ char *position;
char *number;
char *section;
***************
*** 36,41 ****
/* Information retrieval about the current float env. */
! extern char *current_float_id (), *current_float_title (),
! *current_float_type (),
*current_float_number (), *get_float_ref ();
extern int current_float_used_title ();
--- 38,44 ----
/* Information retrieval about the current float env. */
! extern char *current_float_id (),
! *current_float_title (), *current_float_shorttitle (),
! *current_float_type (), *current_float_position (),
*current_float_number (), *get_float_ref ();
extern int current_float_used_title ();
Index: xml.h
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** xml.h 30 Dec 2003 11:15:23 -0000 1.5
--- xml.h 6 Jan 2004 23:33:24 -0000 1.6
***************
*** 76,80 ****
UREF, UREFURL, UREFDESC, UREFREPLACEMENT,
EMAIL, EMAILADDRESS, EMAILNAME,
! GROUP, FLOAT, FLOATTYPE, FLOATPOS, CAPTION,
FLOATTABLE, FLOATFIGURE, FLOATEXAMPLE, FLOATCARTOUCHE,
PRINTINDEX, LISTOFFLOATS,
--- 76,80 ----
UREF, UREFURL, UREFDESC, UREFREPLACEMENT,
EMAIL, EMAILADDRESS, EMAILNAME,
! GROUP, FLOAT, FLOATTYPE, FLOATPOS, CAPTION, SHORTCAPTION,
FLOATTABLE, FLOATFIGURE, FLOATEXAMPLE, FLOATCARTOUCHE,
PRINTINDEX, LISTOFFLOATS,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo cmds.c,1.16,1.17 float.c,1.7,1.8 insertion.c,1.11,1.12 xml.c,1.11,1.12 float.h,1.4,1.5 xml.h,1.5,1.6,
dirt <=