Skip to content

Commit

Permalink
Improved yes/no prompts and added warning in docs 📖
Browse files Browse the repository at this point in the history
  • Loading branch information
adiultra committed May 25, 2016
1 parent 32887f8 commit 93d1afe
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Binary file modified data.tdx
Binary file not shown.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The Stupid Simple Plain ToDo List App

TodX is a simple and to the point ToDo list app which enhances productivity and doesn't come in between you.

.. Warning:: This documentation is **Not Complete**. the Quickstart, although, is usable.

Contents
--------
Expand Down
9 changes: 4 additions & 5 deletions fabric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ void List::enter(){
cout << "Enter title for your list\n +> ";
cin.getline(title, sizeof(title));

char choice;
cout << "Do you want some tags?(y/n)" << endl << " ?> ";
cin >> choice;
cin.ignore();
char choice[10];
cout << "Do you want some tags? (yes/no)" << endl << " ?> ";
cin.getline(choice, sizeof(choice));

if (choice == 'y') {
if (!(strcmp(choice, "yes")*strcmp(choice, "y"))) {
char tagTemp[220];

cout << "Enter the tag one at a time \n 'd' when done \n +> ";
Expand Down
12 changes: 7 additions & 5 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ int parse(char command[80]){
cout << "Enter \'yes\' to continue" << endl << " ?> ";
cin.getline(confirm, 10);

if (!strcmp(confirm, "yes")) {
if (!(strcmp(confirm, "yes")*strcmp(confirm, "y"))) {
ofstream file("data.tdx", ios::trunc|ios::binary|ios::out);

file.write("", 0);
file.write("", sizeof(arrayL));
file.close();

empty();
Expand All @@ -181,12 +181,14 @@ int parse(char command[80]){
cout << "Enter \'yes\' to continue" << endl << " ?> ";
cin.getline(confirm, 10);

if (!strcmp(confirm, "yes")) {
if (!(strcmp(confirm, "yes")*strcmp(confirm, "y"))) {
arrayL[_currentLindex] = currentL;
finish();
success = -1;
}
else {
success = 1;
}

success = -1;
}

return success;
Expand Down

0 comments on commit 93d1afe

Please sign in to comment.