Enter buffer. More...
#include <stdbool.h>
Include dependency graph for enter.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Enumerations | |
| enum | EnterCase { EC_CAPITALIZE , EC_UPCASE , EC_DOWNCASE } |
| Change the case of a word. More... | |
Functions | |
| int | editor_backspace (struct EnterState *es) |
| Delete the char in front of the cursor. | |
| int | editor_backward_char (struct EnterState *es) |
| Move the cursor one character to the left. | |
| int | editor_backward_word (struct EnterState *es) |
| Move the cursor to the beginning of the word. | |
| int | editor_bol (struct EnterState *es) |
| Jump to the beginning of the line. | |
| int | editor_case_word (struct EnterState *es, enum EnterCase ec) |
| Change the case of the word. | |
| int | editor_delete_char (struct EnterState *es) |
| Delete the char under the cursor. | |
| int | editor_eol (struct EnterState *es) |
| Jump to the end of the line. | |
| int | editor_forward_char (struct EnterState *es) |
| Move the cursor one character to the right. | |
| int | editor_forward_word (struct EnterState *es) |
| Move the cursor to the end of the word. | |
| int | editor_kill_eol (struct EnterState *es) |
| Delete chars from cursor to end of line. | |
| int | editor_kill_eow (struct EnterState *es) |
| Delete chars from the cursor to the end of the word. | |
| int | editor_kill_line (struct EnterState *es) |
| Delete chars from cursor to beginning the line. | |
| int | editor_kill_whole_line (struct EnterState *es) |
| Delete all chars on the line. | |
| int | editor_kill_word (struct EnterState *es) |
| Delete the word in front of the cursor. | |
| int | editor_transpose_chars (struct EnterState *es) |
| Transpose character under cursor with previous. | |
| bool | editor_buffer_is_empty (struct EnterState *es) |
| Is the Enter buffer empty? | |
Enter buffer.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file enter.h.
| enum EnterCase |
Change the case of a word.
| Enumerator | |
|---|---|
| EC_CAPITALIZE | Capitalize word (first character only) |
| EC_UPCASE | Upper case (all characters) |
| EC_DOWNCASE | Lower case (all characters) |
| int editor_backspace | ( | struct EnterState * | es | ) |
Delete the char in front of the cursor.
| es | State of the Enter buffer |
| FR_SUCCESS | Character deleted |
| FR_ERROR | Failed, cursor was at the start of the buffer |
Definition at line 47 of file enter.c.
Here is the caller graph for this function:| int editor_backward_char | ( | struct EnterState * | es | ) |
Move the cursor one character to the left.
| es | State of the Enter buffer |
| FR_SUCCESS | Cursor moved |
| FR_ERROR | Failed, cursor was at the start of the buffer |
Definition at line 70 of file enter.c.
Here is the caller graph for this function:| int editor_backward_word | ( | struct EnterState * | es | ) |
Move the cursor to the beginning of the word.
| es | State of the Enter buffer |
| FR_SUCCESS | Cursor moved |
| FR_ERROR | Failed, cursor was at the start of the buffer |
Definition at line 89 of file enter.c.
Here is the caller graph for this function:| int editor_bol | ( | struct EnterState * | es | ) |
| int editor_case_word | ( | struct EnterState * | es, |
| enum EnterCase | ec ) |
Change the case of the word.
| FR_SUCCESS | Case changed |
| FR_ERROR | Error |
Definition at line 124 of file enter.c.
Here is the caller graph for this function:| int editor_delete_char | ( | struct EnterState * | es | ) |
Delete the char under the cursor.
| es | State of the Enter buffer |
| FR_SUCCESS | Character deleted |
| FR_ERROR | Failed, cursor was at the end of the buffer |
Definition at line 156 of file enter.c.
Here is the caller graph for this function:| int editor_eol | ( | struct EnterState * | es | ) |
| int editor_forward_char | ( | struct EnterState * | es | ) |
Move the cursor one character to the right.
| es | State of the Enter buffer |
| FR_SUCCESS | Cursor moved |
| FR_ERROR | Failed, cursor was at the end of the buffer |
Definition at line 193 of file enter.c.
Here is the caller graph for this function:| int editor_forward_word | ( | struct EnterState * | es | ) |
Move the cursor to the end of the word.
| es | State of the Enter buffer |
| FR_SUCCESS | Cursor moved |
| FR_ERROR | Failed, cursor was at the end of the buffer |
Definition at line 213 of file enter.c.
Here is the caller graph for this function:| int editor_kill_eol | ( | struct EnterState * | es | ) |
| int editor_kill_eow | ( | struct EnterState * | es | ) |
Delete chars from the cursor to the end of the word.
| es | State of the Enter buffer |
| FR_SUCCESS | Characters deleted |
| FR_ERROR | Error |
Definition at line 251 of file enter.c.
Here is the caller graph for this function:| int editor_kill_line | ( | struct EnterState * | es | ) |
Delete chars from cursor to beginning the line.
| es | State of the Enter buffer |
| FR_SUCCESS | Characters deleted |
| FR_ERROR | Error |
Definition at line 290 of file enter.c.
Here is the caller graph for this function:| int editor_kill_whole_line | ( | struct EnterState * | es | ) |
| int editor_kill_word | ( | struct EnterState * | es | ) |
Delete the word in front of the cursor.
| es | State of the Enter buffer |
| FR_SUCCESS | Characters deleted |
| FR_ERROR | Failed, cursor was at the start of the buffer |
Definition at line 328 of file enter.c.
Here is the caller graph for this function:| int editor_transpose_chars | ( | struct EnterState * | es | ) |
Transpose character under cursor with previous.
| es | State of the Enter buffer |
| FR_SUCCESS | Characters switched |
| FR_ERROR | Failed, too few characters |
Definition at line 361 of file enter.c.
Here is the caller graph for this function:| bool editor_buffer_is_empty | ( | struct EnterState * | es | ) |