comparison src/callproc.c @ 18539:8c13c54d52c8

Call Ffind_operation_coding_system.
author Kenichi Handa <handa@m17n.org>
date Wed, 02 Jul 1997 12:54:04 +0000
parents c64480c04c07
children 982814f78d0d
comparison
equal deleted inserted replaced
18538:d4c11d4de7f4 18539:8c13c54d52c8
236 236
237 /* Decide the coding-system for giving arguments and reading process 237 /* Decide the coding-system for giving arguments and reading process
238 output. */ 238 output. */
239 { 239 {
240 Lisp_Object val, *args2; 240 Lisp_Object val, *args2;
241 /* Qt denotes that we have not yet called Ffind_coding_system. */ 241 /* Qt denotes we have not yet called Ffind_operation_coding_system. */
242 Lisp_Object coding_systems = Qt; 242 Lisp_Object coding_systems = Qt;
243 int i; 243 int i;
244 244
245 /* If arguments are supplied, we may have to encode them. */ 245 /* If arguments are supplied, we may have to encode them. */
246 if (nargs >= 5) 246 if (nargs >= 5)
248 if (NILP (val = Vcoding_system_for_write)) 248 if (NILP (val = Vcoding_system_for_write))
249 { 249 {
250 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); 250 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2);
251 args2[0] = Qcall_process; 251 args2[0] = Qcall_process;
252 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; 252 for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
253 coding_systems = Ffind_coding_system (nargs + 1, args2); 253 coding_systems = Ffind_operation_coding_system (nargs + 1, args2);
254 if (CONSP (coding_systems)) 254 if (CONSP (coding_systems))
255 val = XCONS (coding_systems)->cdr; 255 val = XCONS (coding_systems)->cdr;
256 else if (CONSP (Vdefault_process_coding_system)) 256 else if (CONSP (Vdefault_process_coding_system))
257 val = XCONS (Vdefault_process_coding_system)->cdr; 257 val = XCONS (Vdefault_process_coding_system)->cdr;
258 } 258 }
271 if (!EQ (coding_systems, Qt)) 271 if (!EQ (coding_systems, Qt))
272 { 272 {
273 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); 273 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2);
274 args2[0] = Qcall_process; 274 args2[0] = Qcall_process;
275 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; 275 for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
276 coding_systems = Ffind_coding_system (nargs + 1, args2); 276 coding_systems
277 = Ffind_operation_coding_system (nargs + 1, args2);
277 } 278 }
278 if (CONSP (coding_systems)) 279 if (CONSP (coding_systems))
279 val = XCONS (coding_systems)->car; 280 val = XCONS (coding_systems)->car;
280 else if (CONSP (Vdefault_process_coding_system)) 281 else if (CONSP (Vdefault_process_coding_system))
281 val = XCONS (Vdefault_process_coding_system)->car; 282 val = XCONS (Vdefault_process_coding_system)->car;
733 { 734 {
734 struct gcpro gcpro1; 735 struct gcpro gcpro1;
735 Lisp_Object filename_string; 736 Lisp_Object filename_string;
736 register Lisp_Object start, end; 737 register Lisp_Object start, end;
737 int count = specpdl_ptr - specpdl; 738 int count = specpdl_ptr - specpdl;
738 /* Qt denotes that we have not yet called Ffind_coding_system. */ 739 /* Qt denotes we have not yet called Ffind_operation_coding_system. */
739 Lisp_Object coding_systems = Qt; 740 Lisp_Object coding_systems = Qt;
740 Lisp_Object val, *args2; 741 Lisp_Object val, *args2;
741 int i; 742 int i;
742 #ifdef DOS_NT 743 #ifdef DOS_NT
743 char *tempfile; 744 char *tempfile;
783 if (NILP (val = Vcoding_system_for_write)) 784 if (NILP (val = Vcoding_system_for_write))
784 { 785 {
785 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); 786 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2);
786 args2[0] = Qcall_process_region; 787 args2[0] = Qcall_process_region;
787 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; 788 for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
788 coding_systems = Ffind_coding_system (nargs + 1, args2); 789 coding_systems = Ffind_operation_coding_system (nargs + 1, args2);
789 if (CONSP (coding_systems)) 790 if (CONSP (coding_systems))
790 val = XCONS (coding_systems)->cdr; 791 val = XCONS (coding_systems)->cdr;
791 else if (CONSP (Vdefault_process_coding_system)) 792 else if (CONSP (Vdefault_process_coding_system))
792 val = XCONS (Vdefault_process_coding_system)->car; 793 val = XCONS (Vdefault_process_coding_system)->car;
793 } 794 }
804 if (EQ (coding_systems, Qt)) 805 if (EQ (coding_systems, Qt))
805 { 806 {
806 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); 807 args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2);
807 args2[0] = Qcall_process_region; 808 args2[0] = Qcall_process_region;
808 for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; 809 for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
809 coding_systems = Ffind_coding_system (nargs + 1, args2); 810 coding_systems = Ffind_operation_coding_system (nargs + 1, args2);
810 } 811 }
811 val = CONSP (coding_systems) ? XCONS (coding_systems)->car : Qnil; 812 val = CONSP (coding_systems) ? XCONS (coding_systems)->car : Qnil;
812 } 813 }
813 specbind (intern ("coding-system-for-read"), val); 814 specbind (intern ("coding-system-for-read"), val);
814 815