comparison src/file-coding.h @ 802:19dfb459d51a

[xemacs-hg @ 2002-04-03 10:47:37 by ben] fix tty problem et al internals/internals.texi: Add section on correctly merging a branch back into the trunk. console-tty.c, eval.c, event-unixoid.c, file-coding.c, file-coding.h, lisp.h, print.c, sysdep.c: Fix data corruption error in print.c from print_depth becoming negative. Borrow primitives internal_bind_int, internal_bind_lisp_object from my stderr-proc ws, soon to be integrated; use them to properly bind print_depth et al. First fix for TTY problem. The basic problem is I switched things so that the TTY I/O is filtered through a coding system, for the support of kterm and such, that speak JIS or similar encodings. (#### I ***swear*** I had this working way back in 19.12.) Anyway, this introduced buffering issues, in which instead of one char being read, it tried to read 1024 chars. I tried setting the stdin descriptor non-blocking, but it doesn't appear to work on Cygwin. (#### Andy, do you know anything about this?) So I fixed it elsewhere. If you get weirdness on the TTY, look in console-tty.c and see how it gets the coding system; maybe there's a way to change it (and if not, there should be!). Also fix warning in sysdep.c.
author ben
date Wed, 03 Apr 2002 10:47:52 +0000
parents a5954632b187
children a634e3b7acc8
comparison
equal deleted inserted replaced
801:2b676dc88c66 802:19dfb459d51a
834 det.data_size = sizeof (struct Detector##_detector); \ 834 det.data_size = sizeof (struct Detector##_detector); \
835 Dynarr_add (all_coding_detectors, det); \ 835 Dynarr_add (all_coding_detectors, det); \
836 } while (0) 836 } while (0)
837 #define DETECTOR_HAS_METHOD(Detector, Meth) \ 837 #define DETECTOR_HAS_METHOD(Detector, Meth) \
838 Dynarr_at (all_coding_detectors, detector_##Detector).Meth##_method = \ 838 Dynarr_at (all_coding_detectors, detector_##Detector).Meth##_method = \
839 Detector##_##Meth 839 Detector##_##Meth
840 840
841 841
842 /**************************************************/ 842 /**************************************************/
843 /* Decoding/Encoding */ 843 /* Decoding/Encoding */
844 /**************************************************/ 844 /**************************************************/
928 928
929 enum encode_decode direction; 929 enum encode_decode direction;
930 930
931 /* If set, don't close the stream at the other end when being closed. */ 931 /* If set, don't close the stream at the other end when being closed. */
932 unsigned int no_close_other:1; 932 unsigned int no_close_other:1;
933 /* If set, read only one byte at a time from other end to avoid any
934 possible blocking. */
935 unsigned int one_byte_at_a_time:1;
933 936
934 /* #### Temporary test */ 937 /* #### Temporary test */
935 unsigned int finalized:1; 938 unsigned int finalized:1;
936 }; 939 };
937 940
1055 Lisp_Object make_internal_coding_system (Lisp_Object existing, 1058 Lisp_Object make_internal_coding_system (Lisp_Object existing,
1056 Char_ASCII *prefix, 1059 Char_ASCII *prefix,
1057 Lisp_Object type, 1060 Lisp_Object type,
1058 Lisp_Object description, 1061 Lisp_Object description,
1059 Lisp_Object props); 1062 Lisp_Object props);
1063
1064 #define CODE_FL_NO_CLOSE_OTHER (1 << 0)
1065 #define CODE_FL_READ_ONE_BYTE_AT_A_TIME (1 << 1)
1060 Lisp_Object make_coding_input_stream (Lstream *stream, Lisp_Object codesys, 1066 Lisp_Object make_coding_input_stream (Lstream *stream, Lisp_Object codesys,
1061 enum encode_decode direction, 1067 enum encode_decode direction,
1062 int no_close_other); 1068 int flags);
1063 Lisp_Object make_coding_output_stream (Lstream *stream, Lisp_Object codesys, 1069 Lisp_Object make_coding_output_stream (Lstream *stream, Lisp_Object codesys,
1064 enum encode_decode direction, 1070 enum encode_decode direction,
1065 int no_close_other); 1071 int flags);
1066 void set_detection_results (struct detection_state *st, int detector, 1072 void set_detection_results (struct detection_state *st, int detector,
1067 int given); 1073 int given);
1068 1074
1069 #endif /* INCLUDED_file_coding_h_ */ 1075 #endif /* INCLUDED_file_coding_h_ */
1070 1076