Merge uncommitted changes from old SVN copy
This commit is contained in:
11
pycdc.cpp
11
pycdc.cpp
@@ -1,5 +1,12 @@
|
||||
#include <cstring>
|
||||
#include "ASTree.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# define PATHSEP '\\'
|
||||
#else
|
||||
# define PATHSEP '/'
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
@@ -13,8 +20,10 @@ int main(int argc, char* argv[])
|
||||
fprintf(stderr, "Could not load file %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
const char* dispname = strrchr(argv[1], PATHSEP);
|
||||
dispname = (dispname == NULL) ? argv[1] : dispname + 1;
|
||||
printf("# Source Generated with Decompyle++\n");
|
||||
printf("# File: %s (Python %d.%d%s)\n", argv[1], mod.majorVer(), mod.minorVer(),
|
||||
printf("# File: %s (Python %d.%d%s)\n", dispname, mod.majorVer(), mod.minorVer(),
|
||||
(mod.majorVer() < 3 && mod.isUnicode()) ? " Unicode" : "");
|
||||
decompyle(mod.code(), &mod);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user