Re: [AD] Documentation update |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-09-20, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > +Note: even though Allegro datafiles provide encryption, you
> > should consider
>
> Should be "Even" here, since it starts a new sentence (I think).
There is previous art which supports and disagrees with you, so
I'll leave this to deal for with a future patch.
> What about using "dat" or 'dat' or `dat´ instead of `dat'? I
> thought we agreed in that last discussion that `' is bad.. or
> did I misunderstand,
Yes, you misunderstood. The people who made your font were bad.
But here's a fix for you.
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.366
diff -u -p -r1.366 allegro._tx
--- docs/src/allegro._tx 13 Sep 2005 21:09:10 -0000 1.366
+++ docs/src/allegro._tx 25 Sep 2005 21:55:21 -0000
@@ -1426,7 +1426,7 @@ is best to set it with set_uformat() jus
@xref uconvert, ustrzcat, ustrncat
@eref exunicod
@shortdesc Concatenates a string to another one.
- This function concatenates `src' to the end of `dest`'. You should try to
+ This function concatenates `src' to the end of `dest'. You should try to
avoid this function because it is very easy to overflow the destination
buffer, use ustrzcat instead.
@retval
Index: docs/src/makedoc/makehtml.c
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/makedoc/makehtml.c,v
retrieving revision 1.39
diff -u -p -r1.39 makehtml.c
--- docs/src/makedoc/makehtml.c 8 Sep 2005 15:20:05 -0000 1.39
+++ docs/src/makedoc/makehtml.c 25 Sep 2005 21:55:21 -0000
@@ -755,33 +755,37 @@ static void _hfprintf(char *format, ...)
*/
static void _hfputs(char *string)
{
- char *end = 0;
+ static int inside_pre_section = 1;
+ char *original_string = string, *end = 0;
+
+ /* Detect if we are going to substitute ` and ' for double commas. */
+ if (strstr(string, "<pre") || strstr(string, "<codeblock") ||
+ strstr(string, "<textblock")) {
+ inside_pre_section++;
+ }
+ assert(inside_pre_section == 1 || inside_pre_section == 0);
+
+ /* Now actually perform the replacement of characters in the string. */
while (*string) {
- /* Found simple text comma? */
- if ((end == 0) && (string[0] == '`')) {
- end = strchr(string + 1, 39);
- /* Is there a closing comma? */
- if (end) {
- char *p = string + 1;
- /* Check for a specific character range */
- while ((p < end) && ((*p >= '.') && (*p <= 'z')))
- p++;
-
- if ((p == end) && (p - string > 1)) {
- fputs("<tt>`", _file);
+
+ if (!inside_pre_section) {
+ /* Found simple text comma? */
+ if ((end == 0) && (string[0] == '`')) {
+ end = strchr(string + 1, 39);
+ /* Is there a closing comma? */
+ if (end) {
+ fputc('"', _file);
string++;
continue;
- } else {
- end = 0;
}
}
- }
- /* Is closing comma search active? */
- if ((string[0] == 39) && end == string) {
- fputs("'</tt>", _file);
- string++;
- end = 0;
- continue;
+ /* Is closing comma search active? */
+ if ((string[0] == 39) && end == string) {
+ fputc('"', _file);
+ string++;
+ end = 0;
+ continue;
+ }
}
if ((string[0] == '&') &&
((string[1] == 'l') || (string[1] == 'g')) &&
@@ -805,6 +809,12 @@ static void _hfputs(char *string)
string++;
}
}
+ /* Detect block endings of preformatted text. */
+ if (strstr(original_string, "</pre") ||
+ strstr(original_string, "<endblock")) {
+ inside_pre_section--;
+ }
+ assert(inside_pre_section == 1 || inside_pre_section == 0);
}