This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fatty: copy fatty.c from t67 and make it link
- Loading branch information
Showing
7 changed files
with
68 additions
and
131 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "putty.h" | ||
|
||
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) | ||
{ | ||
char us[MAX_PATH]; | ||
|
||
while (*cmdline && isspace(*cmdline)) | ||
++cmdline; | ||
|
||
#define ARG_RUN(arg, method) \ | ||
if (!strncmp(cmdline, arg, strlen(arg))) { \ | ||
return method(inst, prev, cmdline + strlen(arg), show); \ | ||
} | ||
|
||
ARG_RUN("--as-gen", puttygen_main); | ||
ARG_RUN("--as-agent", pageant_main); | ||
ARG_RUN("--as-putty", putty_main); | ||
#undef ARG_RUN | ||
|
||
if (GetModuleFileName(NULL, us, MAX_PATH)) { | ||
char *fn = strrchr(us, '\\'); | ||
if (!fn) | ||
fn = us; | ||
else | ||
++fn; | ||
|
||
if (!strncmp(fn, "puttygen", strlen("puttygen"))) { | ||
return puttygen_main(inst, prev, cmdline, show); | ||
} | ||
if (!strncmp(fn, "pageant", strlen("pageant"))) { | ||
return pageant_main(inst, prev, cmdline, show); | ||
} | ||
} | ||
|
||
return putty_main(inst, prev, cmdline, show); | ||
} |
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
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
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
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