[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo xref.c,1.3,1.4
From: |
karl |
Subject: |
texinfo/makeinfo xref.c,1.3,1.4 |
Date: |
Fri, 6 Feb 2004 02:27:04 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv1587
Modified Files:
xref.c
Log Message:
(add_xref_punctuation): if we insert anything,
make it a period.
(cm_xref): include command name in error message.
Index: xref.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xref.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** xref.c 2 Feb 2004 14:15:37 -0000 1.3
--- xref.c 6 Feb 2004 01:27:01 -0000 1.4
***************
*** 30,39 ****
int ref_flag = 0;
static void
add_xref_punctuation ()
{
! if (px_ref_flag)
! add_char ('.');
! else if (ref_flag)
{
/* Check if there's already punctuation. */
--- 30,42 ----
int ref_flag = 0;
+
+ /* Called in the multiple-argument case to make sure we generate a valid
+ Info reference. In the single-argument case, the :: we output
+ suffices for the Info readers to find the end of the reference. */
+
static void
add_xref_punctuation ()
{
! if (px_ref_flag || ref_flag) /* user inserts punct after @xref */
{
/* Check if there's already punctuation. */
***************
*** 44,49 ****
insert a period instead of crying. */
add_char ('.');
else if (next_char != ',' && next_char != '.')
! add_char (',');
}
}
--- 47,56 ----
insert a period instead of crying. */
add_char ('.');
+
else if (next_char != ',' && next_char != '.')
! /* period and comma terminate xrefs, and nothing else. Instead
! of generating an Info references that can't be followed,
! though, just insert a period. Not pretty, but functional. */
! add_char ('.');
}
}
***************
*** 93,96 ****
--- 100,105 ----
return string;
}
+
+
/* NOTE: If you wonder why the HTML output is produced with such a
peculiar mix of calls to add_word and execute_string, here's the
***************
*** 356,365 ****
}
else
! { /* Check to make sure that the next non-whitespace character is
! valid to follow an xref (so info readers can find the node
! names). `input_text_offset' is pointing at the "}" which ended
! the xref or ref command. This is not used for @pxref or @ref,
! since we insert the necessary periods above if needed. And for
! @ref, we also allow ), which doesn't make sense for @xref. */
int temp = next_nonwhitespace_character ();
--- 365,373 ----
}
else
! { /* Check that the next non-whitespace character is valid to follow
! an xref (so Info readers can find the node names).
! `input_text_offset' is pointing at the "}" which ended the xref
! command. This is not used for @pxref or @ref, since we insert
! the necessary punctuation above, if needed. */
int temp = next_nonwhitespace_character ();
***************
*** 367,371 ****
warning (_("End of file reached while looking for `.' or `,'"));
else if (temp != '.' && temp != ',')
! warning (_("`.' or `,' must follow ref, not %c"), temp);
}
}
--- 375,379 ----
warning (_("End of file reached while looking for `.' or `,'"));
else if (temp != '.' && temp != ',')
! warning (_("`.' or `,' must follow @%s, not `%c'"), command, temp);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo xref.c,1.3,1.4,
karl <=
- Prev by Date:
texinfo/intl ChangeLog,1.3,1.4 Makefile.in,1.3,1.4 VERSION,1.3,1.4 config.charset,1.3,1.4 gmo.h,1.1,1.2 loadmsgcat.c,1.2,1.3 locale.alias,1.1,1.2 localename.c,1.3,1.4
- Next by Date:
texinfo/doc texinfo.txi,1.21,1.22
- Previous by thread:
texinfo/intl ChangeLog,1.3,1.4 Makefile.in,1.3,1.4 VERSION,1.3,1.4 config.charset,1.3,1.4 gmo.h,1.1,1.2 loadmsgcat.c,1.2,1.3 locale.alias,1.1,1.2 localename.c,1.3,1.4
- Next by thread:
texinfo/doc texinfo.txi,1.21,1.22
- Index(es):