comparison src/dispnew.c @ 46370:40db0673e6f0

Most uses of XSTRING combined with STRING_BYTES or indirection changed to SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references left unchanged for now.
author Ken Raeburn <raeburn@raeburn.org>
date Mon, 15 Jul 2002 00:00:41 +0000
parents 1fb8f75062c6
children 227785e3e29f
comparison
equal deleted inserted replaced
46369:dd1d3b1d0053 46370:40db0673e6f0
377 sprintf (buf, "%d: window %p (`%s')%s\n", 377 sprintf (buf, "%d: window %p (`%s')%s\n",
378 history_tick++, 378 history_tick++,
379 w, 379 w,
380 ((BUFFERP (w->buffer) 380 ((BUFFERP (w->buffer)
381 && STRINGP (XBUFFER (w->buffer)->name)) 381 && STRINGP (XBUFFER (w->buffer)->name))
382 ? (char *) XSTRING (XBUFFER (w->buffer)->name)->data 382 ? (char *) SDATA (XBUFFER (w->buffer)->name)
383 : "???"), 383 : "???"),
384 paused_p ? " ***paused***" : ""); 384 paused_p ? " ***paused***" : "");
385 strcat (buf, msg); 385 strcat (buf, msg);
386 } 386 }
387 387
6056 termscript = 0; 6056 termscript = 0;
6057 6057
6058 if (! NILP (file)) 6058 if (! NILP (file))
6059 { 6059 {
6060 file = Fexpand_file_name (file, Qnil); 6060 file = Fexpand_file_name (file, Qnil);
6061 termscript = fopen (XSTRING (file)->data, "w"); 6061 termscript = fopen (SDATA (file), "w");
6062 if (termscript == 0) 6062 if (termscript == 0)
6063 report_file_error ("Opening termscript", Fcons (file, Qnil)); 6063 report_file_error ("Opening termscript", Fcons (file, Qnil));
6064 } 6064 }
6065 return Qnil; 6065 return Qnil;
6066 } 6066 }
6073 (string) 6073 (string)
6074 Lisp_Object string; 6074 Lisp_Object string;
6075 { 6075 {
6076 /* ??? Perhaps we should do something special for multibyte strings here. */ 6076 /* ??? Perhaps we should do something special for multibyte strings here. */
6077 CHECK_STRING (string); 6077 CHECK_STRING (string);
6078 fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)), stdout); 6078 fwrite (SDATA (string), 1, SBYTES (string), stdout);
6079 fflush (stdout); 6079 fflush (stdout);
6080 if (termscript) 6080 if (termscript)
6081 { 6081 {
6082 fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)), 6082 fwrite (SDATA (string), 1, SBYTES (string),
6083 termscript); 6083 termscript);
6084 fflush (termscript); 6084 fflush (termscript);
6085 } 6085 }
6086 return Qnil; 6086 return Qnil;
6087 } 6087 }
6328 and that will always cause a mismatch. */ 6328 and that will always cause a mismatch. */
6329 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) 6329 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
6330 { 6330 {
6331 buf = XCDR (XCAR (tail)); 6331 buf = XCDR (XCAR (tail));
6332 /* Ignore buffers that aren't included in buffer lists. */ 6332 /* Ignore buffers that aren't included in buffer lists. */
6333 if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ') 6333 if (SREF (XBUFFER (buf)->name, 0) == ' ')
6334 continue; 6334 continue;
6335 if (!EQ (*vecp++, buf)) 6335 if (!EQ (*vecp++, buf))
6336 goto changed; 6336 goto changed;
6337 if (!EQ (*vecp++, XBUFFER (buf)->read_only)) 6337 if (!EQ (*vecp++, XBUFFER (buf)->read_only))
6338 goto changed; 6338 goto changed;
6362 } 6362 }
6363 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) 6363 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
6364 { 6364 {
6365 buf = XCDR (XCAR (tail)); 6365 buf = XCDR (XCAR (tail));
6366 /* Ignore buffers that aren't included in buffer lists. */ 6366 /* Ignore buffers that aren't included in buffer lists. */
6367 if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ') 6367 if (SREF (XBUFFER (buf)->name, 0) == ' ')
6368 continue; 6368 continue;
6369 *vecp++ = buf; 6369 *vecp++ = buf;
6370 *vecp++ = XBUFFER (buf)->read_only; 6370 *vecp++ = XBUFFER (buf)->read_only;
6371 *vecp++ = Fbuffer_modified_p (buf); 6371 *vecp++ = Fbuffer_modified_p (buf);
6372 } 6372 }