diff options
| author | Juanma Barranquero | 2003-02-04 14:56:31 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2003-02-04 14:56:31 +0000 |
| commit | 177c0ea74342272645959b82cf219faa0b3dba16 (patch) | |
| tree | 44e22b210a9904eab25a66d12e708804b671df75 /src/buffer.h | |
| parent | db95369be096960245dd38678f68464627698678 (diff) | |
| download | emacs-177c0ea74342272645959b82cf219faa0b3dba16.tar.gz emacs-177c0ea74342272645959b82cf219faa0b3dba16.zip | |
Trailing whitespace deleted.
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/buffer.h b/src/buffer.h index 890cabe24ec..7dd1e967afd 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -25,52 +25,52 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 (1) |
| 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 | ||
| 36 | /* Position of point in buffer. The "+ 0" makes this | 36 | /* Position of point in buffer. The "+ 0" makes this |
| 37 | not an l-value, so you can't assign to it. Use SET_PT instead. */ | 37 | not an l-value, so you can't assign to it. Use SET_PT instead. */ |
| 38 | #define PT (current_buffer->pt + 0) | 38 | #define PT (current_buffer->pt + 0) |
| 39 | #define PT_BYTE (current_buffer->pt_byte + 0) | 39 | #define PT_BYTE (current_buffer->pt_byte + 0) |
| 40 | 40 | ||
| 41 | /* Position of gap in buffer. */ | 41 | /* Position of gap in buffer. */ |
| 42 | #define GPT (current_buffer->text->gpt) | 42 | #define GPT (current_buffer->text->gpt) |
| 43 | #define GPT_BYTE (current_buffer->text->gpt_byte) | 43 | #define GPT_BYTE (current_buffer->text->gpt_byte) |
| 44 | 44 | ||
| 45 | /* Position of end of accessible range of buffer. */ | 45 | /* Position of end of accessible range of buffer. */ |
| 46 | #define ZV (current_buffer->zv) | 46 | #define ZV (current_buffer->zv) |
| 47 | #define ZV_BYTE (current_buffer->zv_byte) | 47 | #define ZV_BYTE (current_buffer->zv_byte) |
| 48 | 48 | ||
| 49 | /* Position of end of buffer. */ | 49 | /* Position of end of buffer. */ |
| 50 | #define Z (current_buffer->text->z) | 50 | #define Z (current_buffer->text->z) |
| 51 | #define Z_BYTE (current_buffer->text->z_byte) | 51 | #define Z_BYTE (current_buffer->text->z_byte) |
| 52 | 52 | ||
| 53 | /* Macros for the addresses of places in the buffer. */ | 53 | /* Macros for the addresses of places in the buffer. */ |
| 54 | 54 | ||
| 55 | /* Address of beginning of buffer. */ | 55 | /* Address of beginning of buffer. */ |
| 56 | #define BEG_ADDR (current_buffer->text->beg) | 56 | #define BEG_ADDR (current_buffer->text->beg) |
| 57 | 57 | ||
| 58 | /* Address of beginning of accessible range of buffer. */ | 58 | /* Address of beginning of accessible range of buffer. */ |
| 59 | #define BEGV_ADDR (BYTE_POS_ADDR (current_buffer->begv_byte)) | 59 | #define BEGV_ADDR (BYTE_POS_ADDR (current_buffer->begv_byte)) |
| 60 | 60 | ||
| 61 | /* Address of point in buffer. */ | 61 | /* Address of point in buffer. */ |
| 62 | #define PT_ADDR (BYTE_POS_ADDR (current_buffer->pt_byte)) | 62 | #define PT_ADDR (BYTE_POS_ADDR (current_buffer->pt_byte)) |
| 63 | 63 | ||
| 64 | /* Address of beginning of gap in buffer. */ | 64 | /* Address of beginning of gap in buffer. */ |
| 65 | #define GPT_ADDR (current_buffer->text->beg + current_buffer->text->gpt_byte - 1) | 65 | #define GPT_ADDR (current_buffer->text->beg + current_buffer->text->gpt_byte - 1) |
| 66 | 66 | ||
| 67 | /* Address of end of gap in buffer. */ | 67 | /* Address of end of gap in buffer. */ |
| 68 | #define GAP_END_ADDR (current_buffer->text->beg + current_buffer->text->gpt_byte + current_buffer->text->gap_size - 1) | 68 | #define GAP_END_ADDR (current_buffer->text->beg + current_buffer->text->gpt_byte + current_buffer->text->gap_size - 1) |
| 69 | 69 | ||
| 70 | /* Address of end of accessible range of buffer. */ | 70 | /* Address of end of accessible range of buffer. */ |
| 71 | #define ZV_ADDR (BYTE_POS_ADDR (current_buffer->zv_byte)) | 71 | #define ZV_ADDR (BYTE_POS_ADDR (current_buffer->zv_byte)) |
| 72 | 72 | ||
| 73 | /* Address of end of buffer. */ | 73 | /* Address of end of buffer. */ |
| 74 | #define Z_ADDR (current_buffer->text->beg + current_buffer->text->gap_size + current_buffer->text->z_byte - 1) | 74 | #define Z_ADDR (current_buffer->text->beg + current_buffer->text->gap_size + current_buffer->text->z_byte - 1) |
| 75 | 75 | ||
| 76 | /* Size of gap. */ | 76 | /* Size of gap. */ |
| @@ -101,27 +101,27 @@ Boston, MA 02111-1307, USA. */ | |||
| 101 | /* Similar macros to operate on a specified buffer. | 101 | /* Similar macros to operate on a specified buffer. |
| 102 | Note that many of these evaluate the buffer argument more than once. */ | 102 | Note that many of these evaluate the buffer argument more than once. */ |
| 103 | 103 | ||
| 104 | /* Position of beginning of buffer. */ | 104 | /* Position of beginning of buffer. */ |
| 105 | #define BUF_BEG(buf) (1) | 105 | #define BUF_BEG(buf) (1) |
| 106 | #define BUF_BEG_BYTE(buf) (1) | 106 | #define BUF_BEG_BYTE(buf) (1) |
| 107 | 107 | ||
| 108 | /* Position of beginning of accessible range of buffer. */ | 108 | /* Position of beginning of accessible range of buffer. */ |
| 109 | #define BUF_BEGV(buf) ((buf)->begv) | 109 | #define BUF_BEGV(buf) ((buf)->begv) |
| 110 | #define BUF_BEGV_BYTE(buf) ((buf)->begv_byte) | 110 | #define BUF_BEGV_BYTE(buf) ((buf)->begv_byte) |
| 111 | 111 | ||
| 112 | /* Position of point in buffer. */ | 112 | /* Position of point in buffer. */ |
| 113 | #define BUF_PT(buf) ((buf)->pt) | 113 | #define BUF_PT(buf) ((buf)->pt) |
| 114 | #define BUF_PT_BYTE(buf) ((buf)->pt_byte) | 114 | #define BUF_PT_BYTE(buf) ((buf)->pt_byte) |
| 115 | 115 | ||
| 116 | /* Position of gap in buffer. */ | 116 | /* Position of gap in buffer. */ |
| 117 | #define BUF_GPT(buf) ((buf)->text->gpt) | 117 | #define BUF_GPT(buf) ((buf)->text->gpt) |
| 118 | #define BUF_GPT_BYTE(buf) ((buf)->text->gpt_byte) | 118 | #define BUF_GPT_BYTE(buf) ((buf)->text->gpt_byte) |
| 119 | 119 | ||
| 120 | /* Position of end of accessible range of buffer. */ | 120 | /* Position of end of accessible range of buffer. */ |
| 121 | #define BUF_ZV(buf) ((buf)->zv) | 121 | #define BUF_ZV(buf) ((buf)->zv) |
| 122 | #define BUF_ZV_BYTE(buf) ((buf)->zv_byte) | 122 | #define BUF_ZV_BYTE(buf) ((buf)->zv_byte) |
| 123 | 123 | ||
| 124 | /* Position of end of buffer. */ | 124 | /* Position of end of buffer. */ |
| 125 | #define BUF_Z(buf) ((buf)->text->z) | 125 | #define BUF_Z(buf) ((buf)->text->z) |
| 126 | #define BUF_Z_BYTE(buf) ((buf)->text->z_byte) | 126 | #define BUF_Z_BYTE(buf) ((buf)->text->z_byte) |
| 127 | 127 | ||
| @@ -197,7 +197,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 197 | } \ | 197 | } \ |
| 198 | } \ | 198 | } \ |
| 199 | while (0) | 199 | while (0) |
| 200 | 200 | ||
| 201 | 201 | ||
| 202 | /* Macros to set PT in the current buffer, or another buffer. */ | 202 | /* Macros to set PT in the current buffer, or another buffer. */ |
| 203 | 203 | ||
| @@ -336,14 +336,14 @@ extern int _fetch_multibyte_char_len; | |||
| 336 | or converting between byte positions and addresses, | 336 | or converting between byte positions and addresses, |
| 337 | in a specified buffer. */ | 337 | in a specified buffer. */ |
| 338 | 338 | ||
| 339 | /* Return the address of character at byte position POS in buffer BUF. | 339 | /* Return the address of character at byte position POS in buffer BUF. |
| 340 | Note that both arguments can be computed more than once. */ | 340 | Note that both arguments can be computed more than once. */ |
| 341 | 341 | ||
| 342 | #define BUF_BYTE_ADDRESS(buf, pos) \ | 342 | #define BUF_BYTE_ADDRESS(buf, pos) \ |
| 343 | ((buf)->text->beg + (pos) - 1 \ | 343 | ((buf)->text->beg + (pos) - 1 \ |
| 344 | + ((pos) >= (buf)->text->gpt_byte ? (buf)->text->gap_size : 0)) | 344 | + ((pos) >= (buf)->text->gpt_byte ? (buf)->text->gap_size : 0)) |
| 345 | 345 | ||
| 346 | /* Return the address of character at char position POS in buffer BUF. | 346 | /* Return the address of character at char position POS in buffer BUF. |
| 347 | Note that both arguments can be computed more than once. */ | 347 | Note that both arguments can be computed more than once. */ |
| 348 | 348 | ||
| 349 | #define BUF_CHAR_ADDRESS(buf, pos) \ | 349 | #define BUF_CHAR_ADDRESS(buf, pos) \ |
| @@ -396,7 +396,7 @@ struct buffer_text | |||
| 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 | int gpt; /* Char pos of gap in buffer. */ |
| 401 | int z; /* Char pos of end of buffer. */ | 401 | int z; /* Char pos of end of buffer. */ |
| 402 | int gpt_byte; /* Byte pos of gap in buffer. */ | 402 | int gpt_byte; /* Byte pos of gap in buffer. */ |
| @@ -487,7 +487,7 @@ struct buffer | |||
| 487 | this means the variable is always local in all buffers. */ | 487 | this means the variable is always local in all buffers. */ |
| 488 | #define MAX_PER_BUFFER_VARS 50 | 488 | #define MAX_PER_BUFFER_VARS 50 |
| 489 | char local_flags[MAX_PER_BUFFER_VARS]; | 489 | char local_flags[MAX_PER_BUFFER_VARS]; |
| 490 | 490 | ||
| 491 | /* Set to the modtime of the visited file when read or written. | 491 | /* Set to the modtime of the visited file when read or written. |
| 492 | -1 means visited file was nonexistent. | 492 | -1 means visited file was nonexistent. |
| 493 | 0 means visited file modtime unknown; in no case complain | 493 | 0 means visited file modtime unknown; in no case complain |
| @@ -579,7 +579,7 @@ struct buffer | |||
| 579 | So we copy it around in set_buffer_internal. | 579 | So we copy it around in set_buffer_internal. |
| 580 | This comes before `name' because it is marked in a special way. */ | 580 | This comes before `name' because it is marked in a special way. */ |
| 581 | Lisp_Object undo_list; | 581 | Lisp_Object undo_list; |
| 582 | 582 | ||
| 583 | /* Analogous to mode_line_format for the line displayed at the top | 583 | /* Analogous to mode_line_format for the line displayed at the top |
| 584 | of windows. Nil means don't display that line. */ | 584 | of windows. Nil means don't display that line. */ |
| 585 | Lisp_Object header_line_format; | 585 | Lisp_Object header_line_format; |
| @@ -712,7 +712,7 @@ struct buffer | |||
| 712 | 712 | ||
| 713 | /* Incremented each time the buffer is displayed in a window. */ | 713 | /* Incremented each time the buffer is displayed in a window. */ |
| 714 | Lisp_Object display_count; | 714 | Lisp_Object display_count; |
| 715 | 715 | ||
| 716 | /* Widths of left and right marginal areas for windows displaying | 716 | /* Widths of left and right marginal areas for windows displaying |
| 717 | this buffer. */ | 717 | this buffer. */ |
| 718 | Lisp_Object left_margin_width, right_margin_width; | 718 | Lisp_Object left_margin_width, right_margin_width; |
| @@ -729,7 +729,7 @@ struct buffer | |||
| 729 | that point ends up this number of lines from the top of the | 729 | that point ends up this number of lines from the top of the |
| 730 | window. Nil means that scrolling method isn't used. */ | 730 | window. Nil means that scrolling method isn't used. */ |
| 731 | Lisp_Object scroll_up_aggressively; | 731 | Lisp_Object scroll_up_aggressively; |
| 732 | 732 | ||
| 733 | /* If scrolling the display because point is above the top of a | 733 | /* If scrolling the display because point is above the top of a |
| 734 | window showing this buffer, try to choose a window start so | 734 | window showing this buffer, try to choose a window start so |
| 735 | that point ends up this number of lines from the bottom of the | 735 | that point ends up this number of lines from the bottom of the |