Created
April 13, 2021 19:30
-
-
Save sphaero/92f3bd50c20ed437786d03d459931c1f to your computer and use it in GitHub Desktop.
Guru meditation example using ansi coding
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
#include <stdio.h> | |
#include <wchar.h> | |
#include <locale.h> | |
wchar_t tl=0x250f; | |
wchar_t tr=0x2513; | |
wchar_t bl=0x2517; | |
wchar_t br=0x251b; | |
wchar_t vs=0x2503; | |
//wchar_t hs[23]={0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x0}; | |
wchar_t hs[53]=L"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"; | |
//BR='\u251b' | |
//VS='\u2503' | |
//HS='\u2501' | |
int main() | |
{ | |
setlocale(LC_ALL, ""); | |
fwide(stdout, 1); | |
#if defined(__STDC_ISO_10646__) | |
//printf("\033[31m%.*s\n", 5, "="); | |
wprintf(L"\033[5m\033[31m%lc%ls%lc\n", tl, hs, tr); | |
wprintf(L"%lc\033[0m\033[31m%s\033[5m%lc\n", vs, " Software Failure. Press enter key to continue. ", vs); | |
wprintf(L"%lc\033[0m\033[31m%s\033[5m%lc\n", vs, " Guru Meditation # ", vs); | |
wprintf(L"%lc%ls%lc\n", bl, hs, br); | |
wprintf(L"\033[39m\033[0m"); | |
#endif | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment