texinfo/texinfo-4.8-0xA0.patch

72 lines
2.8 KiB
Diff

--- texinfo-4.8/makeinfo/makeinfo.c.0xA0 2004-12-19 18:15:42.000000000 +0100
+++ texinfo-4.8/makeinfo/makeinfo.c 2006-12-04 22:37:54.000000000 +0100
@@ -2427,6 +2427,10 @@
len = fill_column - output_column;
break;
+ case NON_BREAKING_SPACE:
+ len = 1;
+ break;
+
default:
/* ASCII control characters appear as two characters in the output
(e.g., ^A). But characters with the high bit set are just one
@@ -2584,7 +2588,7 @@
character = ';';
}
else
- character = META (' '); /* unmeta-d in flush_output */
+ character = NON_BREAKING_SPACE; /* restored in flush_output */
}
insertion_paragraph_closed = 0;
@@ -2922,17 +2926,11 @@
node_line_number++;
}
- /* If we turned on the 8th bit for a space inside @w, turn it
- back off for output. This might be problematic, since the
- 0x80 character may be used in 8-bit character sets. Sigh.
- In any case, don't do this for HTML, since the nbsp character
- is valid input and must be passed along to the browser. */
- if (!html && (output_paragraph[i] & meta_character_bit))
- {
- int temp = UNMETA (output_paragraph[i]);
- if (temp == ' ')
- output_paragraph[i] &= 0x7f;
- }
+ /* If we turned on the 8th bit for a space inside @w, turn it back off
+ for output. Don't do this for HTML, since the nbsp character is valid
+ input and must be passed along to the browser. */
+ if (!html && output_paragraph[i] == NON_BREAKING_SPACE)
+ output_paragraph[i] = ' ';
}
fwrite (output_paragraph, 1, output_paragraph_offset, output_stream);
--- texinfo-4.8/makeinfo/makeinfo.h.0xA0 2004-11-30 03:03:23.000000000 +0100
+++ texinfo-4.8/makeinfo/makeinfo.h 2006-12-04 22:35:06.000000000 +0100
@@ -242,13 +242,6 @@
#define coerce_to_upper(c) ((islower(c) ? toupper(c) : (c)))
#define coerce_to_lower(c) ((isupper(c) ? tolower(c) : (c)))
-#define control_character_bit 0x40 /* %01000000, must be off. */
-#define meta_character_bit 0x080/* %10000000, must be on. */
-#define CTL(c) ((c) & (~control_character_bit))
-#define UNCTL(c) coerce_to_upper(((c)|control_character_bit))
-#define META(c) ((c) | (meta_character_bit))
-#define UNMETA(c) ((c) & (~meta_character_bit))
-
#define whitespace(c) ((c) == '\t' || (c) == ' ')
#define sentence_ender(c) ((c) == '.' || (c) == '?' || (c) == '!')
#define cr_or_whitespace(c) (whitespace(c) || (c) == '\r' || (c) == '\n')
@@ -282,6 +275,9 @@
#define COMMAND_PREFIX '@'
+/* A byte value to represent a non-breaking space until flush_output (). */
+#define NON_BREAKING_SPACE 036
+
#define END_VERBATIM "end verbatim"
/* Stuff for splitting large files. The numbers for Emacs