Created
August 4, 2017 06:06
-
-
Save darthryking/9d4337d53c696c1e18caca19d5d3cc39 to your computer and use it in GitHub Desktop.
wut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _________________________________________________________ split_head_tail | |
#define ____________________________________________________ WaitForSingleObject | |
#define ______ CMD_EXIT | |
#define ____________________________________________________________________________________ dirLen | |
#define _____________________________________________________________ buffer[MAX_LINE_SIZE] | |
#define __________ CMD_LS | |
#define __________________________________________________________________________________________________________ input[0] | |
#define _ const | |
#define _____________________________________________________________________________________________________________ SetCurrentDirectory | |
#define _________________________ 0 | |
#define _________________________________________________________________________ buffer[i | |
#define ___________________________________________________________ head[MAX_LINE_SIZE] | |
#define ____________________________________________________________________________________________________ input[MAX_LINE_SIZE] | |
#define _________ CMD_ECHO | |
#define _____________________________________________________________________________ cwd[MAX_PATH] | |
#define _____________________________________________________________________________________________ do | |
#define ________________________ return | |
#define _____________ void | |
#define _______ CMD_PWD | |
#define ___________________________ fileName | |
#define ______________________________________________________________________________ GetCurrentDirectory | |
#define ____________________________________________________________________________ print_working_directory | |
#define _____________________________________________ &pi | |
#define ________________________________________________________________________________________________ FindClose | |
#define ___________________________________________________________________________________________________________ continue | |
#define _________________ stderr | |
#define ____________________________________________________________________________________________________________ strcmp | |
#define __________________________________________________________________________________ dir | |
#define ________________________________________________________ hThread | |
#define ______________________________________________________________________________________________ cFileName | |
#define ____________________________________________________________ tail[MAX_LINE_SIZE] | |
#define _________________________________________________________________________________________________________ input[inputLen | |
#define __________________________________________ memset | |
#define _______________________________________________________________________________ MAX_PATH | |
#define ______________________________________________ result | |
#define _____________________________________________________________________________________________________ fgets | |
#define ____________________________________________ sizeof | |
#define __________________________________________________________________________________________________ SetConsoleCtrlHandler | |
#define ________________________________________ PROCESS_INFORMATION | |
#define __________________________ file_exists | |
#define __________________ exit | |
#define ________________________________________________________________________________ cwd | |
#define _____________________________________________________ hProcess | |
#define ______________________________________ STARTUPINFO | |
#define ___________ currentProcessID | |
#define _______________________________ && | |
#define ________________________________________________________________________________________ findData | |
#define ____ 100 | |
#define ___________________ ctrl_handler | |
#define ________________________________ & | |
#define ____________________________ attrib | |
#define ___________________________________________________________________________________________________ PHANDLER_ROUTINE | |
#define ______________________ CTRL_C_EVENT | |
#define __________________________________________________________________________ 1] | |
#define ___________________________________________________________________________________ buffer[MAX_PATH] | |
#define __________________________________________________ printf | |
#define ______________________________________________________________________________________ strncpy | |
#define _______________________________________________________________________________________ WIN32_FIND_DATA | |
#define _____________________________________ processName | |
#define _________________________________ FILE_ATTRIBUTE_DIRECTORY | |
#define ________________________________________________________________________ tail | |
#define _______________________ GenerateConsoleCtrlEvent | |
#define _______________ msg | |
#define ___________________________________ dirName | |
#define _________________________________________________ CREATE_NEW_PROCESS_GROUP | |
#define _________________________________________________________________________________________________ main | |
#define _______________________________________________________________________ head | |
#define ____________________ ctrlType | |
#define _________________________________________________________________________________________ HANDLE | |
#define ___________________________________________________________________________ else | |
#define _______________________________________________________________________________________________ FindNextFile | |
#define ______________________________________________________________________________________________________ input | |
#define _______________________________________________________________ head[0] | |
#define ____________________________________________________________________________________________ &findData | |
#define _________________________________________ pi | |
#define ___________________________________________________________________________________________ FindFirstFile | |
#define _____________________________________________________________________ while | |
#define ___________________________________________________________________ str | |
#define ______________ error | |
#define __________________________________________________________ str[MAX_LINE_SIZE] | |
#define ___ MAX_LINE_SIZE | |
#define ______________________________________________________________________ buffer[i] | |
#define ____________________________________ start_process | |
#define ________________________________________________________________________________________________________ inputLen | |
#define __________________________________ dir_exists | |
#define __ int | |
#define _____ char | |
#define ________________ fprintf | |
#define ________________________________________________ NULL | |
#define _____________________________________________________________________________________ strlen | |
#define _____________________ if | |
#define _________________________________________________________________ strncat | |
#define _____________________________ GetFileAttributes | |
#define __________________________________________________________________________________________ finderHandle | |
#define ___________________________________________ &si | |
#define ___________________________________________________ dwProcessId | |
#define _______________________________________________ CreateProcess | |
#define ____________ 1 | |
#define ______________________________________________________________ buffer[0] | |
#define ________ CMD_CD | |
#define __________________________________________________________________ buffer | |
#define ________________________________________________________________ tail[0] | |
#define ______________________________ INVALID_FILE_ATTRIBUTES | |
#define _______________________________________________________ CloseHandle | |
#define ______________________________________________________ INFINITE | |
#define _________________________________________________________________________________ list_directory | |
#define ____________________________________________________________________ i | |
#define _______________________________________________________________________________________________________ stdin | |
#define _______________________________________ si | |
#include <windows.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
_ __ ___ = ____; | |
_ _____* ______ = "exit"; | |
_ _____* _______ = "pwd"; | |
_ _____* ________ = "cd"; | |
_ _____* _________ = "echo"; | |
_ _____* __________ = "ls"; | |
__ ___________ = -____________; | |
_____________ ______________(_____* _______________) { | |
________________(_________________, "%s\n", _______________); | |
__________________(____________); | |
} | |
__ ___________________(__ ____________________) { | |
_____________________ (____________________ == ______________________) { | |
_______________________(______________________, ___________); | |
________________________ ____________; | |
} | |
________________________ _________________________; | |
} | |
__ __________________________(_____* ___________________________) { | |
__ ____________________________ = _____________________________(___________________________); | |
________________________ ( | |
____________________________ != ______________________________ | |
_______________________________ !(____________________________ ________________________________ _________________________________) | |
); | |
} | |
__ __________________________________(_____* ___________________________________) { | |
__ ____________________________ = _____________________________(___________________________________); | |
________________________ ( | |
____________________________ != ______________________________ | |
_______________________________ (____________________________ ________________________________ _________________________________) | |
); | |
} | |
_____________ ____________________________________(_____* _____________________________________) { | |
______________________________________ _______________________________________; | |
________________________________________ _________________________________________; | |
__________________________________________(___________________________________________, _________________________, ____________________________________________(_______________________________________)); | |
__________________________________________(_____________________________________________, _________________________, ____________________________________________(_________________________________________)); | |
__ ______________________________________________ = _______________________________________________( | |
________________________________________________, | |
_____________________________________, | |
________________________________________________, | |
________________________________________________, | |
_________________________, | |
_________________________________________________, | |
________________________________________________, | |
________________________________________________, | |
___________________________________________, | |
_____________________________________________ | |
); | |
_____________________ (!______________________________________________) { | |
__________________________________________________("ERROR: Could not start process '%s'.\n", _____________________________________); | |
} | |
___________ = _________________________________________.___________________________________________________; | |
____________________________________________________(_________________________________________._____________________________________________________, ______________________________________________________); | |
___________ = -____________; | |
_______________________________________________________(_________________________________________._____________________________________________________); | |
_______________________________________________________(_________________________________________.________________________________________________________); | |
} | |
_____________ _________________________________________________________(_____ __________________________________________________________, | |
_____ ___________________________________________________________, _____ ____________________________________________________________) { | |
_____ _____________________________________________________________; | |
______________________________________________________________ = '\0'; | |
_______________________________________________________________ = '\0'; | |
________________________________________________________________ = '\0'; | |
_________________________________________________________________(__________________________________________________________________, ___________________________________________________________________, ___); | |
__ ____________________________________________________________________ = _________________________; | |
_____________________________________________________________________ (______________________________________________________________________ != ' ' _______________________________ ______________________________________________________________________ != '\0') { | |
____________________________________________________________________++; | |
} | |
_____________________ (______________________________________________________________________ != '\0') { | |
______________________________________________________________________ = '\0'; | |
_________________________________________________________________(_______________________________________________________________________, __________________________________________________________________, ___); | |
_________________________________________________________________(________________________________________________________________________, ________________________________(_________________________________________________________________________ + __________________________________________________________________________), ___); | |
} | |
___________________________________________________________________________ { | |
_________________________________________________________________(_______________________________________________________________________, __________________________________________________________________, ___); | |
} | |
} | |
_____________ ____________________________________________________________________________() { | |
_____ _____________________________________________________________________________; | |
______________________________________________________________________________(_______________________________________________________________________________, ________________________________________________________________________________); | |
__________________________________________________("%s\n", ________________________________________________________________________________); | |
} | |
_____________ _________________________________________________________________________________(_____* __________________________________________________________________________________) { | |
_____ ___________________________________________________________________________________; | |
__ ____________________________________________________________________________________ = _____________________________________________________________________________________(__________________________________________________________________________________); | |
______________________________________________________________________________________(__________________________________________________________________, __________________________________________________________________________________, _______________________________________________________________________________); | |
_________________________________________________________________(__________________________________________________________________, "\\*", _______________________________________________________________________________ - (____________________________________________________________________________________ + ____________)); | |
_______________________________________________________________________________________ ________________________________________________________________________________________; | |
_________________________________________________________________________________________ __________________________________________________________________________________________ = ___________________________________________________________________________________________(__________________________________________________________________, ____________________________________________________________________________________________); | |
_____________________________________________________________________________________________ { | |
__________________________________________________("%s\n", ________________________________________________________________________________________.______________________________________________________________________________________________); | |
} _____________________________________________________________________ (_______________________________________________________________________________________________(__________________________________________________________________________________________, ____________________________________________________________________________________________)); | |
________________________________________________________________________________________________(__________________________________________________________________________________________); | |
} | |
__ _________________________________________________________________________________________________() { | |
__________________________________________________________________________________________________((___________________________________________________________________________________________________) ___________________, ____________); | |
_____ ____________________________________________________________________________________________________; | |
__________________________________________________("\nWelcome to SimpleShell!\n"); | |
_____________________________________________________________________ (____________) { | |
__________________________________________________("\nSimpleShell> "); | |
_____________________ (_____________________________________________________________________________________________________(______________________________________________________________________________________________________, ___, _______________________________________________________________________________________________________) == ________________________________________________) { | |
______________("fgets error!"); | |
} | |
__ ________________________________________________________________________________________________________ = _____________________________________________________________________________________(______________________________________________________________________________________________________); | |
_____________________ (_________________________________________________________________________________________________________ - __________________________________________________________________________ == '\n') { | |
_________________________________________________________________________________________________________ - __________________________________________________________________________ = '\0'; | |
} | |
_____________________ (__________________________________________________________________________________________________________ == '\0') { | |
___________________________________________________________________________________________________________; | |
} | |
___________________________________________________________________________ _____________________ (____________________________________________________________________________________________________________(______________________________________________________________________________________________________, ______) == _________________________) { | |
__________________________________________________("Goodbye!\n"); | |
__________________(_________________________); | |
} | |
___________________________________________________________________________ _____________________ (____________________________________________________________________________________________________________(______________________________________________________________________________________________________, _______) == _________________________) { | |
____________________________________________________________________________(); | |
} | |
___________________________________________________________________________ { | |
_____ ___________________________________________________________; | |
_____ ____________________________________________________________; | |
_________________________________________________________(______________________________________________________________________________________________________, _______________________________________________________________________, ________________________________________________________________________); | |
_____________________ (____________________________________________________________________________________________________________(_______________________________________________________________________, _________) == _________________________) { | |
__________________________________________________("%s\n", ________________________________________________________________________); | |
} | |
___________________________________________________________________________ _____________________ (____________________________________________________________________________________________________________(_______________________________________________________________________, ________) == _________________________) { | |
_____________________ (__________________________________(________________________________________________________________________)) { | |
_____________________________________________________________________________________________________________(________________________________________________________________________); | |
____________________________________________________________________________(); | |
} | |
___________________________________________________________________________ { | |
__________________________________________________("Directory '%s' does not exist!\n", ________________________________________________________________________); | |
} | |
} | |
___________________________________________________________________________ _____________________ (____________________________________________________________________________________________________________(_______________________________________________________________________, __________) == _________________________) { | |
_____* __________________________________________________________________________________; | |
_____________________ (________________________________________________________________ == '\0') { | |
__________________________________________________________________________________ = "."; | |
} | |
___________________________________________________________________________ { | |
__________________________________________________________________________________ = ________________________________________________________________________; | |
} | |
_____________________ (__________________________________(__________________________________________________________________________________)) { | |
_________________________________________________________________________________(__________________________________________________________________________________); | |
} | |
___________________________________________________________________________ { | |
__________________________________________________("Directory '%s' does not exist!\n", __________________________________________________________________________________); | |
} | |
} | |
___________________________________________________________________________ { | |
_____________________ (__________________________(_______________________________________________________________________)) { | |
____________________________________(______________________________________________________________________________________________________); | |
} | |
___________________________________________________________________________ { | |
__________________________________________________("File '%s' does not exist!\n", _______________________________________________________________________); | |
} | |
} | |
} | |
} | |
________________________ _________________________; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment