The Character Stream Editor is a simple project that emulates a list of characters that can support operations. It allows you to perform operations on a list-like structure, which represents the stream. These operations include moving the cursor left or right, inserting characters, writing characters, undoing, redoing, and displaying the stream's content.
To run the Character Stream Editor on your system, follow these steps:
- Clone this repository to your local machine.
- Compile the program by typing "make" into your terminal.
- Create input and output files (e.g.,
StreamEditor.in
andStreamEditor.out
). - Run the compiled executable (e.g.,
./StreamEditor StreamEditor.in StreamEditor.out
).
Make sure you have a C compiler installed on your system and that you are using a Linux distribution before proceeding.
./checker.sh
Here are some examples of how to use the Character Stream Editor:
- Move the cursor right:
MOVE_RIGHT
- Move the cursor left:
MOVE_LEFT
- Move left until a specific character is found:
MOVE_LEFT_CHAR X
- Move right until a specific character is found:
MOVE_RIGHT_CHAR Y
- Write a character at the cursor position:
WRITE Z
- Insert a character to the right of the cursor:
INSERT_RIGHT W
- Insert a character to the left of the cursor:
INSERT_LEFT V
- Undo the last operation:
UNDO
- Redo the last undone operation:
REDO
- Display the current state of the magic band:
SHOW
- Display the character at the cursor position:
SHOW_CURRENT
Please note that you need to replace X
, Y
, Z
, W
, and V
with the specific characters you want to use.
Contributions to the Magic Band project are welcome! If you'd like to contribute, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure they pass any existing tests.
- Create a pull request with a clear description of your changes.
We appreciate your contributions to make this project better.
This project is licensed under the MIT License. See the LICENSE file for details.