void *GGPlugin::main(lua_State *L, int type) { void *result; if (type == 0) { s_active = this; result = main2(L, type); s_active = NULL; } else if (type == 1) { result = main2(L, type); openUrl = NULL; enterFrame = NULL; suspend = NULL; resume = NULL; background = NULL; foreground = NULL; } else { result = main2(L, type); } return result; }
main() { main1(); main2(); main3(); main4(); }
int __cdecl main(LONG_PTR argc, PWSTR *argv) { getargsW(&argc, &argv); main2(argc, argv); ReleaseArgv(argv); Ps::ExitProcess(0); }
int main(int numargs, const char *args[]) { char sz[800] = { 0 }; int code = main2(numargs, args, sz); printf(sz); return code; }
void main() { if (v) main1(v); main2(v); main3(v, v); if (v) main4(v); main5(); }
int __cdecl main(Long_Ptr argc, WChar **argv) { argv = CmdLineToArgvW(Nt_CurrentPeb()->ProcessParameters->CommandLine.Buffer, &argc); main2(argc, argv); ReleaseArgv(argv); return Nt_ExitProcess(0); }
int main(int argc, char **argv) { int fd; t_coords *list; t_add *add; t_window *wind; t_all *all; if (argc == 2) { if (!(all = malloc(sizeof(t_all)))) return (0); if (!(add = malloc(sizeof(t_add)))) return (0); if ((fd = open(argv[1], O_RDONLY)) < 0) exit_errors(2); is_valid(fd, add); close(fd); fd = open(argv[1], O_RDONLY); list = create_list(fd, add); find_next_link(list); wind = new_window(); main2(all, add, wind, list); } else exit_errors(3); return (0); }
void imageCb(const sensor_msgs::ImageConstPtr& msg) { cv_bridge::CvImagePtr cv_ptr; try { cv_ptr = cv_bridge::toCvCopy(msg, enc::MONO8); } catch (cv_bridge::Exception& e) { ROS_ERROR("cv_bridge exception: %s", e.what()); return; } //bool f = imwrite("/home/sid/ros_workspace/project1/src/sample1.bmp",cv_ptr->image); // call main2 main2(cv_ptr->image); // if (cv_ptr->image.rows > 60 && cv_ptr->image.cols > 60) // cv::circle(cv_ptr->image, cv::Point(50, 50), 10, CV_RGB(255,0,0)); /* get the image data int height = cv_ptr->image.rows; int width = cv_ptr->image.cols; int step = cv_ptr->image.step; uchar* data = (uchar *)cv_ptr->image.data; for(int i=0;i<height;i++) for(int j=0;j<width;j++) data[i*step+j]=255-data[i*step+j]; */ cv::imshow(WINDOW, image2); cv::waitKey(3); image_pub_.publish(cv_ptr->toImageMsg()); }
int main (int argv, char **argc) { int i; for( i=0;i<1;i++ ) { main2 (argv, argc); } }
int main () { int ret; Rect windRect; long start,end,amount; /* Initialize all the needed managers. */ InitGraf(&qd.thePort); InitFonts(); InitWindows(); InitMenus(); TEInit(); InitDialogs(nil); InitCursor(); //ProfilerInit(collectDetailed, bestTimeBase, 1000, 50); //ProfilerSetStatus(true); windRect = qd.screenBits.bounds; InsetRect(&windRect, 50, 50); pWindow = NewCWindow(nil, &windRect, "\pMpeg", true, documentProc, (WindowPtr) -1, false, 0); start = TickCount(); main2(); end = TickCount(); amount = end - start; fprintf(stderr, "Time taken %d memoryAllocator %d \n", amount,counter); // ProfilerDump("\pProfile.out"); do { } while (!Button()); }
void main(void *arg) { //main1(arg); //main1_3(arg); main2(arg); }
int main() { main2(); /* Make sure that the offset is right */ if(& g3->y != & ((struct { int x; PFOO y;} *)g3)->y) E(1); SUCCESS; }
VOID WINAPI run_service(DWORD argc, LPTSTR* argv) { int err = 1; extern int main2(int argc, char **argv); status.dwServiceType = SERVICE_WIN32; status.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; status.dwWin32ExitCode = 0; status.dwServiceSpecificExitCode = 0; status.dwCheckPoint = 0; statushandle = RegisterServiceCtrlHandlerEx(identname, controlhandler, NULL); if (!statushandle) { logger(LOG_ERR, "System call `%s' failed: %s", "RegisterServiceCtrlHandlerEx", winerror(GetLastError())); err = 1; } else { status.dwWaitHint = 30000; status.dwCurrentState = SERVICE_START_PENDING; SetServiceStatus(statushandle, &status); status.dwWaitHint = 0; status.dwCurrentState = SERVICE_RUNNING; SetServiceStatus(statushandle, &status); err = main2(argc, argv); status.dwWaitHint = 0; status.dwCurrentState = SERVICE_STOPPED; //status.dwWin32ExitCode = err; SetServiceStatus(statushandle, &status); } return; }
int main (void) { check_vect (); main1 (N); main2 (N); return 0; }
void __cdecl main(Int argc, WChar **argv) { getargsW(&argc, &argv); // argv = CmdLineToArgvW(GetCommandLineW(), &argc); main2(argc, argv); // ExitProcess(0); exit(0); }
int main(int argc, char ** argv) { main1(); main2(); main3(); main4(); main5(); }
static void main3(int c, char **v) { usg(c, v); Chain = flag("-c", &c, &v); Dev = flag("-d", &c, &v); Grid = flag("-g", &c, &v); Tex = flag("-t", &c, &v); main2(c, v); }
void __cdecl main(int argc, char **argv) { getargs(&argc, &argv); if (argc >= 2) { main2(argc, argv); } exit(0); }
int MY_CDECL main(int numArgs, const char *args[]) { char rs[2000] = { 0 }; int res = main2(numArgs, args, rs); if (strlen(rs) > 0) { puts(rs); } return res; }
int main() { main1(); main2(); main3(); main4(); main5(); main6(); }
int main (void) { int i; float a[N] __attribute__ ((__aligned__(16))); check_vect (); main1 (a); main2 (a); return 0; }
int _tmain(int argc, _TCHAR* argv[]) { #if 0 // use fake arguments. PTSTR argv__[] = { "[name of exe]", "F:\\svn.screenie\\root\\distro\\1\\screenie.exe", "/xml", "F:\\svn.screenie\\root\\distro\\1\\ver_out.xml" }; //"%outdir%\screenie.exe" /xml "%outdir%\ver_out.xml" /string RegisteredTo="%registrant%" // DumpResourcesToDisk(argv__[1], "F:\\svn.screenie\\root\\source\\veredit\\test\\test2.bin"); return main2(sizeof(argv__) / sizeof(PCTSTR), argv__); #else return main2(argc, argv); #endif }
int main(int argc, const char **argv) { int ret; if ((ret = HX_init()) <= 0) { fprintf(stderr, "HX_init: %s\n", strerror(-ret)); abort(); } ret = main2(argc, argv); HX_exit(); return ret; }
int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); StatusCode code = main2(app.arguments()); if (code == InvalidAction) { printf("Invalid arguments. Look at the sources for the list of possible arguments.\n"); } return code; }
int main(int argc, const char **argv) { int ret; if ((ret = HX_init()) < 0) { fprintf(stderr, "HX_init: %s\n", strerror(errno)); return EXIT_FAILURE; } ret = main2(argc, argv); HX_exit(); return ret; }
int main(int argc, char *argv[]) { int sock; /* Socket descriptor */ struct sockaddr_in echoServAddr; /* Echo server address */ unsigned short echoServPort; /* Echo server port */ char *servIP; /* Server IP address (dotted quad) */ char *echoString; /* String to send to echo server */ char echoBuffer[RCVBUFSIZE]; /* Buffer for echo string */ unsigned int echoStringLen; /* Length of string to echo */ int bytesRcvd, totalBytesRcvd; /* Bytes read in single recv() and total bytes read */ if ((argc < 3) || (argc > 4)) /* Test for correct number of arguments */ { fprintf(stderr, "Usage: %s <Server IP> <Echo Word> [<Echo Port>]\n", argv[0]); exit(1); } servIP = argv[1]; /* First arg: server IP address (dotted quad) */ echoString = argv[2]; /* Second arg: string to echo */ if (argc == 4) echoServPort = atoi(argv[3]); /* Use given port, if any */ else echoServPort = 7; /* 7 is the well-known port for the echo service */ /* Create a reliable, stream socket using TCP */ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed"); /* Construct the server address structure */ memset(&echoServAddr, 0, sizeof(echoServAddr)); /* Zero out structure */ echoServAddr.sin_family = AF_INET; /* Internet address family */ echoServAddr.sin_addr.s_addr = inet_addr(servIP); /* Server IP address */ echoServAddr.sin_port = htons(echoServPort); /* Server port */ /* Establish the connection to the echo server */ if (connect(sock, (struct sockaddr *) &echoServAddr, sizeof(echoServAddr)) < 0) DieWithError("connect() failed"); while (1) { main2(sock); printf("sleep\n"); sleep(1); } close(sock); exit(0); }
int main() { main1(); main2(); main3(); main4(); /* a = 0; */ /* b = 1; */ /* c = 2; */ return 0; }
ZENI_REST_DLL int zenilib_main(int argc, char **argv) { #ifdef _WINDOWS _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #ifdef X64 if(_chdir("..\\..")) { #else if(_chdir("..")) { #endif std::cerr << "Setting working directory failed with error code ':" << GetLastError() << "'\n"; return -1; } #ifdef X64 if(!SetDllDirectory("bin\\x64")) { #else if(!SetDllDirectory("bin")) { #endif std::cerr << "Setting DLL directory failed with error code ':" << GetLastError() << "'\n"; return -2; } #else { char application_path[FILENAME_MAX]; #ifndef _MACOSX int length = readlink("/proc/self/exe", application_path, FILENAME_MAX); up_one_dir(application_path, length); #else uint32_t size = sizeof(application_path); if(_NSGetExecutablePath(application_path, &size)) { std::cerr << "Loading working directory failed.\n"; return -1; } int length = int(strlen(application_path)); for(int i = 0; i != 2; ++i) up_one_dir(application_path, length); memcpy(application_path + length, "/zenilib", 9); #endif if(chdir(application_path)) { std::cerr << "chdir: " << application_path << '\n'; std::cerr << "Setting working directory failed with error code: '" << errno << "'\n"; std::cerr << strerror(errno) << '\n'; return -1; } } #endif return main2(argc, argv); }
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { static CHAR appName[] = "bd9wdemo"; HWND hwnd; WNDCLASS wc; if (!hPrevInstance) { wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC) WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = appName; wc.lpszClassName = appName; RegisterClass(&wc); } else { if ((GetVersion() & 0x80000000)==0) return 0; // only play once if win32s in win31 } hwnd = CreateWindow(appName,"Bullet 2 Demo Starter for Windows", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, NULL,NULL,hInstance,NULL); if (!hwnd) return (FALSE); gHwnd = hwnd; ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); // do the hustle main2(); if (gDie==FALSE) DoWinThing(1); // wait for death return gMsg.wParam; lpCmdLine; }
int main(int argc, char *argv[]) { ram_reply_t e = RAM_REPLY_INSANE; size_t unused = 0; e = main2(argc, argv); if (RAM_REPLY_OK != e) RAM_FAIL_TRAP(ramtest_fprintf(&unused,stderr, "fail (%d).", e)); if (RAM_REPLY_INPUTFAIL == e) { usage(e, argc, argv); ram_fail_panic("unreachable code."); return RAM_REPLY_INSANE; } else return e; }