int main(int argc, char* argv[]) { const char* binary = 0; FILE* fp; size_t size; if (argc > 1) { binary = MainProc(argv[1]); } if (argc == 3) { fp = fopen(argv[2], "wb"); } else if (argc == 2) { fp = fopen("a.str", "wb"); } else { printf("do not match argument.\n"); exit(-1); } size = GetBinaryLength(binary); printf("%d\n", size); fwrite(binary, 1, size, fp); fclose(fp); return 0; }
EXPORT void DefaultLayerProperties(void) { InitializeLayers( LayerPrefLoad, 0 ); UpdateLayerDlg(); if( layoutLayerChanged ) { MainProc( mainW, wResize_e, NULL ); layoutLayerChanged = FALSE; } }
int main(int argc, char **argv) { // Process args ProcessArgs(argc, argv); if (strlen(Commands)) read_from_stdin = 0; // if user does not specify a --login, --logout or --attach action, he wants a --login --logout combination if (!login && !logout && !attach) login = logout = 1; if (attach && !logout) { } else if (login && logout) { } else { // no commands allowed when only logging in or out Commands[0] = 0; read_from_stdin = 0; } if (login) { int exit = 0; if (!strlen(Exchanges)) { printf("EXCHANGES NOT SPECIFIED!\n"); exit = 1; } if (!strlen(Username)) { printf("USERNAME NOT SPECIFIED!\n"); exit = 1; } if (!strlen(Password)) { printf("PASSWORD NOT SPECIFIED!\n"); exit = 1; } if (exit) Done(0); } timeout_denominator = common_denominator(login_timeout, command_timeout); if (*HostPortStr && *HostPortStr != '0') HostPort = atoi(HostPortStr); // Attach to ewrecv if (connection != (void *)1) { AttachConnection(); } else { connection = NULL; } Init(); MainProc(); Done(0); return 0; }
static void LayerOk( void * junk ) { LayerSelect( layerCurrent ); if (newLayerCount != layerCount) { layoutLayerChanged = TRUE; if ( newLayerCount > NUM_BUTTONS ) newLayerCount = NUM_BUTTONS; layerCount = newLayerCount; } if (layoutLayerChanged) MainProc( mainW, wResize_e, NULL ); wHide( layerW ); }
extern int main(int argc, char **argv) { FILE_LIST *fl; char *command; SetDefault(); fl = GetOption(option, argc, argv, NULL); InitMessage("wfccontrol", NULL); if ((fl != NULL) && (fl->name != NULL)) { command = fl->name; } else { command = "stop"; } InitSystem(); MainProc(command); CleanUp(); return (0); }
static void DoLayerOp( void * data ) { switch((long)data ) { case ENUMLAYER_CLEAR: InitializeLayers( LayerSystemDefaults, -1 ); break; case ENUMLAYER_SAVE: LayerPrefSave(); break; case ENUMLAYER_RELOAD: LayerPrefLoad(); break; } UpdateLayerDlg(); if( layoutLayerChanged ) { MainProc( mainW, wResize_e, NULL ); layoutLayerChanged = FALSE; changed = TRUE; SetWindowTitle(); } }
void *BaseServer::_MainProc(void *param) { return MainProc(param); }