comparison src/buffer.h @ 51854:f8d1f1c48e3e

(struct buffer_text, struct buffer): Use EMACS_INT for position and length information.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 09 Jul 2003 19:44:14 +0000
parents a8777e8d1b68
children 26ceb23fbe42
comparison
equal deleted inserted replaced
51853:fd71e1aaa838 51854:f8d1f1c48e3e
25 /* These macros come in pairs, one for the char position 25 /* These macros come in pairs, one for the char position
26 and one for the byte position. */ 26 and one for the byte position. */
27 27
28 /* Position of beginning of buffer. */ 28 /* Position of beginning of buffer. */
29 #define BEG (1) 29 #define BEG (1)
30 #define BEG_BYTE (1) 30 #define BEG_BYTE (BEG)
31 31
32 /* Position of beginning of accessible range of buffer. */ 32 /* Position of beginning of accessible range of buffer. */
33 #define BEGV (current_buffer->begv) 33 #define BEGV (current_buffer->begv)
34 #define BEGV_BYTE (current_buffer->begv_byte) 34 #define BEGV_BYTE (current_buffer->begv_byte)
35 35
395 this address might change when blocks are relocated which can 395 this address might change when blocks are relocated which can
396 e.g. happen when malloc is called. So, don't pass a pointer 396 e.g. happen when malloc is called. So, don't pass a pointer
397 into a buffer's text to functions that malloc. */ 397 into a buffer's text to functions that malloc. */
398 unsigned char *beg; 398 unsigned char *beg;
399 399
400 int gpt; /* Char pos of gap in buffer. */ 400 EMACS_INT gpt; /* Char pos of gap in buffer. */
401 int z; /* Char pos of end of buffer. */ 401 EMACS_INT z; /* Char pos of end of buffer. */
402 int gpt_byte; /* Byte pos of gap in buffer. */ 402 EMACS_INT gpt_byte; /* Byte pos of gap in buffer. */
403 int z_byte; /* Byte pos of end of buffer. */ 403 EMACS_INT z_byte; /* Byte pos of end of buffer. */
404 int gap_size; /* Size of buffer's gap. */ 404 EMACS_INT gap_size; /* Size of buffer's gap. */
405 int modiff; /* This counts buffer-modification events 405 int modiff; /* This counts buffer-modification events
406 for this buffer. It is incremented for 406 for this buffer. It is incremented for
407 each such event, and never otherwise 407 each such event, and never otherwise
408 changed. */ 408 changed. */
409 int save_modiff; /* Previous value of modiff, as of last 409 int save_modiff; /* Previous value of modiff, as of last
410 time buffer visited or saved a file. */ 410 time buffer visited or saved a file. */
411 411
412 int overlay_modiff; /* Counts modifications to overlays. */ 412 int overlay_modiff; /* Counts modifications to overlays. */
413 413
414 /* Minimum value of GPT - BEG since last redisplay that finished. */ 414 /* Minimum value of GPT - BEG since last redisplay that finished. */
415 int beg_unchanged; 415 EMACS_INT beg_unchanged;
416 416
417 /* Minimum value of Z - GPT since last redisplay that finished. */ 417 /* Minimum value of Z - GPT since last redisplay that finished. */
418 int end_unchanged; 418 EMACS_INT end_unchanged;
419 419
420 /* MODIFF as of last redisplay that finished; if it matches MODIFF, 420 /* MODIFF as of last redisplay that finished; if it matches MODIFF,
421 beg_unchanged and end_unchanged contain no useful information. */ 421 beg_unchanged and end_unchanged contain no useful information. */
422 int unchanged_modified; 422 int unchanged_modified;
423 423
462 In an ordinary buffer, this is the own_text field above. 462 In an ordinary buffer, this is the own_text field above.
463 In an indirect buffer, this is the own_text field of another buffer. */ 463 In an indirect buffer, this is the own_text field of another buffer. */
464 struct buffer_text *text; 464 struct buffer_text *text;
465 465
466 /* Char position of point in buffer. */ 466 /* Char position of point in buffer. */
467 int pt; 467 EMACS_INT pt;
468 /* Byte position of point in buffer. */ 468 /* Byte position of point in buffer. */
469 int pt_byte; 469 EMACS_INT pt_byte;
470 /* Char position of beginning of accessible range. */ 470 /* Char position of beginning of accessible range. */
471 int begv; 471 EMACS_INT begv;
472 /* Byte position of beginning of accessible range. */ 472 /* Byte position of beginning of accessible range. */
473 int begv_byte; 473 EMACS_INT begv_byte;
474 /* Char position of end of accessible range. */ 474 /* Char position of end of accessible range. */
475 int zv; 475 EMACS_INT zv;
476 /* Byte position of end of accessible range. */ 476 /* Byte position of end of accessible range. */
477 int zv_byte; 477 EMACS_INT zv_byte;
478 478
479 /* In an indirect buffer, this points to the base buffer. 479 /* In an indirect buffer, this points to the base buffer.
480 In an ordinary buffer, it is 0. */ 480 In an ordinary buffer, it is 0. */
481 struct buffer *base_buffer; 481 struct buffer *base_buffer;
482 482
501 /* The time at which we detected a failure to auto-save, 501 /* The time at which we detected a failure to auto-save,
502 Or -1 if we didn't have a failure. */ 502 Or -1 if we didn't have a failure. */
503 int auto_save_failure_time; 503 int auto_save_failure_time;
504 /* Position in buffer at which display started 504 /* Position in buffer at which display started
505 the last time this buffer was displayed. */ 505 the last time this buffer was displayed. */
506 int last_window_start; 506 EMACS_INT last_window_start;
507 507
508 /* Set nonzero whenever the narrowing is changed in this buffer. */ 508 /* Set nonzero whenever the narrowing is changed in this buffer. */
509 int clip_changed; 509 int clip_changed;
510 510
511 /* If the long line scan cache is enabled (i.e. the buffer-local 511 /* If the long line scan cache is enabled (i.e. the buffer-local