Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Clean up indentation in c file |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
dbc5b70080e2c0d2191a28681198b8b2 |
User & Date: | kevin 2016-04-06 03:39:02 |
Context
2016-04-07
| ||
03:13 | Add more build scripts/installer for Windows check-in: 6bcea97d9b user: kevin tags: trunk | |
2016-04-06
| ||
03:39 | Clean up indentation in c file check-in: dbc5b70080 user: kevin tags: trunk | |
03:29 | Additional refinements for Windows build check-in: d9c371b7b0 user: kevin tags: trunk | |
Changes
Changes to quickwho.c.
1 2 3 4 5 6 7 8 9 | #include <C:/Users/kevin/AppData/Local/Programs/Python/Python35/include/Python.h> #include <Windows.h> #include <shlobj.h> #include <shlwapi.h> #include <tchar.h> int main(int argc, char *argv[]) { | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include <C:/Users/kevin/AppData/Local/Programs/Python/Python35/include/Python.h> #include <Windows.h> #include <shlobj.h> #include <shlwapi.h> #include <tchar.h> int main(int argc, char *argv[]) { Py_Initialize(); TCHAR exedir [MAX_PATH]; #if 0 GetModuleFileName(NULL, exedir, MAX_PATH); _tprintf("%s/n", exedir); PathRemoveFileSpec(exedir); _tprintf("%s/n", exedir); #endif /*Get the module's full path, and set to the current working directory.*/ if (!GetModuleFileName(NULL, exedir, MAX_PATH)) { TCHAR errmsg[512]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL); _tprintf( TEXT("The path is %s, and the error is %s/n"), exedir, errmsg ); } |
︙ | ︙ | |||
39 40 41 42 43 44 45 | if (!SetCurrentDirectory(exedir)) { TCHAR errmsg[512]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL); _tprintf( TEXT("The working dir is %s, and the error is %s/n"), exedir,errmsg ); } | | | | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 | if (!SetCurrentDirectory(exedir)) { TCHAR errmsg[512]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL); _tprintf( TEXT("The working dir is %s, and the error is %s/n"), exedir,errmsg ); } PySys_SetArgv(argc, argv); PyRun_SimpleString("exec(open(\"QuickWho.py\").read())"); Py_Finalize(); return 0; } |