static void parse_args(int argc, char **argv) { isc_boolean_t have_lookup = ISC_FALSE; usesearch = ISC_TRUE; for (argc--, argv++; argc > 0; argc--, argv++) { debug("main parsing %s", argv[0]); if (argv[0][0] == '-') { if (strncasecmp(argv[0], "-ver", 4) == 0) { version(); exit(0); } else if (argv[0][1] != 0) { setoption(&argv[0][1]); } else have_lookup = ISC_TRUE; } else { if (!have_lookup) { have_lookup = ISC_TRUE; in_use = ISC_TRUE; addlookup(argv[0]); } else { set_nameserver(argv[0]); check_ra = ISC_FALSE; } } } }
static void do_next_command(char *input) { char *ptr, *arg; ptr = next_token(&input, " \t\r\n"); if (ptr == NULL) return; arg = next_token(&input, " \t\r\n"); if ((strcasecmp(ptr, "set") == 0) && (arg != NULL)) setoption(arg); else if ((strcasecmp(ptr, "server") == 0) || (strcasecmp(ptr, "lserver") == 0)) { isc_app_block(); set_nameserver(arg); check_ra = ISC_FALSE; isc_app_unblock(); show_settings(ISC_TRUE, ISC_TRUE); } else if (strcasecmp(ptr, "exit") == 0) { in_use = ISC_FALSE; } else if (strcasecmp(ptr, "help") == 0 || strcasecmp(ptr, "?") == 0) { printf("The '%s' command is not yet implemented.\n", ptr); } else if (strcasecmp(ptr, "finger") == 0 || strcasecmp(ptr, "root") == 0 || strcasecmp(ptr, "ls") == 0 || strcasecmp(ptr, "view") == 0) { printf("The '%s' command is not implemented.\n", ptr); } else addlookup(ptr); }
static void get_next_command (void) { char *buf; char *ptr, *arg; char *input; fflush (stdout); buf = isc_mem_allocate (mctx, COMMSIZE); if (buf == NULL) fatal ("memory allocation failure"); fputs ("> ", stderr); fflush (stderr); isc_app_block (); ptr = fgets (buf, COMMSIZE, stdin); isc_app_unblock (); if (ptr == NULL) { in_use = ISC_FALSE; goto cleanup; } input = buf; ptr = next_token (&input, " \t\r\n"); if (ptr == NULL) goto cleanup; arg = next_token (&input, " \t\r\n"); if ((strcasecmp (ptr, "set") == 0) && (arg != NULL)) setoption (arg); else if ((strcasecmp (ptr, "server") == 0) || (strcasecmp (ptr, "lserver") == 0)) { isc_app_block (); set_nameserver (arg); check_ra = ISC_FALSE; isc_app_unblock (); show_settings (ISC_TRUE, ISC_TRUE); } else if (strcasecmp (ptr, "exit") == 0) { in_use = ISC_FALSE; goto cleanup; } else if (strcasecmp (ptr, "help") == 0 || strcasecmp (ptr, "?") == 0) { printf ("The '%s' command is not yet implemented.\n", ptr); goto cleanup; } else if (strcasecmp (ptr, "finger") == 0 || strcasecmp (ptr, "root") == 0 || strcasecmp (ptr, "ls") == 0 || strcasecmp (ptr, "view") == 0) { printf ("The '%s' command is not implemented.\n", ptr); goto cleanup; } else addlookup (ptr); cleanup: isc_mem_free (mctx, buf); }
static void parse_args(int argc, char **argv) { isc_boolean_t have_lookup = ISC_FALSE; usesearch = ISC_TRUE; for (argc--, argv++; argc > 0; argc--, argv++) { debug("main parsing %s", argv[0]); if (argv[0][0] == '-') { if (argv[0][1] != 0) setoption(&argv[0][1]); else have_lookup = ISC_TRUE; } else { if (!have_lookup) { have_lookup = ISC_TRUE; in_use = ISC_TRUE; addlookup(argv[0]); } else set_nameserver(argv[0]); } } }
void createmap(){ addlookup(GLACTIVETEXTURE,"glActiveTexture"); addlookup(GLATTACHSHADER,"glAttachShader"); addlookup(GLBINDATTRIBLOCATION,"glBindAttribLocation"); addlookup(GLBINDBUFFER,"glBindBuffer"); addlookup(GLBINDFRAMEBUFFER,"glBindFramebuffer"); addlookup(GLBINDRENDERBUFFER,"glBindRenderbuffer"); addlookup(GLBINDTEXTURE,"glBindTexture"); addlookup(GLBLENDCOLOR,"glBlendColor"); addlookup(GLBLENDEQUATION,"glBlendEquation"); addlookup(GLBLENDEQUATIONSEPARATE,"glBlendEquationSeparate"); addlookup(GLBLENDFUNC,"glBlendFunc"); addlookup(GLBLENDFUNCSEPARATE,"glBlendFuncSeparate"); addlookup(GLBUFFERDATA,"glBufferData"); addlookup(GLBUFFERSUBDATA,"glBufferSubData"); addlookup(GLCHECKFRAMEBUFFERSTATUS,"glCheckFramebufferStatus"); addlookup(GLCLEAR,"glClear"); addlookup(GLCLEARCOLOR,"glClearColor"); addlookup(GLCLEARDEPTHF,"glClearDepthf"); addlookup(GLCLEARSTENCIL,"glClearStencil"); addlookup(GLCOLORMASK,"glColorMask"); addlookup(GLCOMPILESHADER,"glCompileShader"); addlookup(GLCOMPRESSEDTEXIMAGE2D,"glCompressedTexImage2D"); addlookup(GLCOMPRESSEDTEXSUBIMAGE2D,"glCompressedTexSubImage2D"); addlookup(GLCOPYTEXIMAGE2D,"glCopyTexImage2D"); addlookup(GLCOPYTEXSUBIMAGE2D,"glCopyTexSubImage2D"); addlookup(GLCREATEPROGRAM,"glCreateProgram"); addlookup(GLCREATESHADER,"glCreateShader"); addlookup(GLCULLFACE,"glCullFace"); addlookup(GLDELETEBUFFERS,"glDeleteBuffers"); addlookup(GLDELETEFRAMEBUFFERS,"glDeleteFramebuffers"); addlookup(GLDELETEPROGRAM,"glDeleteProgram"); addlookup(GLDELETERENDERBUFFERS,"glDeleteRenderbuffers"); addlookup(GLDELETESHADER,"glDeleteShader"); addlookup(GLDELETETEXTURES,"glDeleteTextures"); addlookup(GLDEPTHFUNC,"glDepthFunc"); addlookup(GLDEPTHMASK,"glDepthMask"); addlookup(GLDEPTHRANGEF,"glDepthRangef"); addlookup(GLDETACHSHADER,"glDetachShader"); addlookup(GLDISABLE,"glDisable"); addlookup(GLDISABLEVERTEXATTRIBARRAY,"glDisableVertexAttribArray"); addlookup(GLDRAWARRAYS,"glDrawArrays"); addlookup(GLDRAWELEMENTS,"glDrawElements"); addlookup(GLENABLE,"glEnable"); addlookup(GLENABLEVERTEXATTRIBARRAY,"glEnableVertexAttribArray"); addlookup(GLFINISH,"glFinish"); addlookup(GLFLUSH,"glFlush"); addlookup(GLFRAMEBUFFERRENDERBUFFER,"glFramebufferRenderbuffer"); addlookup(GLFRAMEBUFFERTEXTURE2D,"glFramebufferTexture2D"); addlookup(GLFRONTFACE,"glFrontFace"); addlookup(GLGENBUFFERS,"glGenBuffers"); addlookup(GLGENERATEMIPMAP,"glGenerateMipmap"); addlookup(GLGENFRAMEBUFFERS,"glGenFramebuffers"); addlookup(GLGENRENDERBUFFERS,"glGenRenderbuffers"); addlookup(GLGENTEXTURES,"glGenTextures"); addlookup(GLGETACTIVEATTRIB,"glGetActiveAttrib"); addlookup(GLGETACTIVEUNIFORM,"glGetActiveUniform"); addlookup(GLGETATTACHEDSHADERS,"glGetAttachedShaders"); addlookup(GLGETATTRIBLOCATION,"glGetAttribLocation"); addlookup(GLGETBOOLEANV,"glGetBooleanv"); addlookup(GLGETBUFFERPARAMETERIV,"glGetBufferParameteriv"); addlookup(GLGETERROR,"glGetError"); addlookup(GLGETFLOATV,"glGetFloatv"); addlookup(GLGETFRAMEBUFFERATTACHMENTPARAMETERIV,"glGetFramebufferAttachmentParameteriv"); addlookup(GLGETINTEGERV,"glGetIntegerv"); addlookup(GLGETPROGRAMIV,"glGetProgramiv"); addlookup(GLGETPROGRAMINFOLOG,"glGetProgramInfoLog"); addlookup(GLGETRENDERBUFFERPARAMETERIV,"glGetRenderbufferParameteriv"); addlookup(GLGETSHADERIV,"glGetShaderiv"); addlookup(GLGETSHADERINFOLOG,"glGetShaderInfoLog"); addlookup(GLGETSHADERPRECISIONFORMAT,"glGetShaderPrecisionFormat"); addlookup(GLGETSHADERSOURCE,"glGetShaderSource"); addlookup(GLGETSTRING,"glGetString"); addlookup(GLGETTEXPARAMETERFV,"glGetTexParameterfv"); addlookup(GLGETTEXPARAMETERIV,"glGetTexParameteriv"); addlookup(GLGETUNIFORMFV,"glGetUniformfv"); addlookup(GLGETUNIFORMIV,"glGetUniformiv"); addlookup(GLGETUNIFORMLOCATION,"glGetUniformLocation"); addlookup(GLGETVERTEXATTRIBFV,"glGetVertexAttribfv"); addlookup(GLGETVERTEXATTRIBIV,"glGetVertexAttribiv"); addlookup(GLGETVERTEXATTRIBPOINTERV,"glGetVertexAttribPointerv"); addlookup(GLHINT,"glHint"); addlookup(GLISBUFFER,"glIsBuffer"); addlookup(GLISENABLED,"glIsEnabled"); addlookup(GLISFRAMEBUFFER,"glIsFramebuffer"); addlookup(GLISPROGRAM,"glIsProgram"); addlookup(GLISRENDERBUFFER,"glIsRenderbuffer"); addlookup(GLISSHADER,"glIsShader"); addlookup(GLISTEXTURE,"glIsTexture"); addlookup(GLLINEWIDTH,"glLineWidth"); addlookup(GLLINKPROGRAM,"glLinkProgram"); addlookup(GLPIXELSTOREI,"glPixelStorei"); addlookup(GLPOLYGONOFFSET,"glPolygonOffset"); addlookup(GLREADPIXELS,"glReadPixels"); addlookup(GLRELEASESHADERCOMPILER,"glReleaseShaderCompiler"); addlookup(GLRENDERBUFFERSTORAGE,"glRenderbufferStorage"); addlookup(GLSAMPLECOVERAGE,"glSampleCoverage"); addlookup(GLSCISSOR,"glScissor"); addlookup(GLSHADERBINARY,"glShaderBinary"); addlookup(GLSHADERSOURCE,"glShaderSource"); addlookup(GLSTENCILFUNC,"glStencilFunc"); addlookup(GLSTENCILFUNCSEPARATE,"glStencilFuncSeparate"); addlookup(GLSTENCILMASK,"glStencilMask"); addlookup(GLSTENCILMASKSEPARATE,"glStencilMaskSeparate"); addlookup(GLSTENCILOP,"glStencilOp"); addlookup(GLSTENCILOPSEPARATE,"glStencilOpSeparate"); addlookup(GLTEXIMAGE2D,"glTexImage2D"); addlookup(GLTEXPARAMETERF,"glTexParameterf"); addlookup(GLTEXPARAMETERFV,"glTexParameterfv"); addlookup(GLTEXPARAMETERI,"glTexParameteri"); addlookup(GLTEXPARAMETERIV,"glTexParameteriv"); addlookup(GLTEXSUBIMAGE2D,"glTexSubImage2D"); addlookup(GLUNIFORM1F,"glUniform1f"); addlookup(GLUNIFORM1FV,"glUniform1fv"); addlookup(GLUNIFORM1I,"glUniform1i"); addlookup(GLUNIFORM1IV,"glUniform1iv"); addlookup(GLUNIFORM2F,"glUniform2f"); addlookup(GLUNIFORM2FV,"glUniform2fv"); addlookup(GLUNIFORM2I,"glUniform2i"); addlookup(GLUNIFORM2IV,"glUniform2iv"); addlookup(GLUNIFORM3F,"glUniform3f"); addlookup(GLUNIFORM3FV,"glUniform3fv"); addlookup(GLUNIFORM3I,"glUniform3i"); addlookup(GLUNIFORM3IV,"glUniform3iv"); addlookup(GLUNIFORM4F,"glUniform4f"); addlookup(GLUNIFORM4FV,"glUniform4fv"); addlookup(GLUNIFORM4I,"glUniform4i"); addlookup(GLUNIFORM4IV,"glUniform4iv"); addlookup(GLUNIFORMMATRIX2FV,"glUniformMatrix2fv"); addlookup(GLUNIFORMMATRIX3FV,"glUniformMatrix3fv"); addlookup(GLUNIFORMMATRIX4FV,"glUniformMatrix4fv"); addlookup(GLUSEPROGRAM,"glUseProgram"); addlookup(GLVALIDATEPROGRAM,"glValidateProgram"); addlookup(GLVERTEXATTRIB1F,"glVertexAttrib1f"); addlookup(GLVERTEXATTRIB1FV,"glVertexAttrib1fv"); addlookup(GLVERTEXATTRIB2F,"glVertexAttrib2f"); addlookup(GLVERTEXATTRIB2FV,"glVertexAttrib2fv"); addlookup(GLVERTEXATTRIB3F,"glVertexAttrib3f"); addlookup(GLVERTEXATTRIB3FV,"glVertexAttrib3fv"); addlookup(GLVERTEXATTRIB4F,"glVertexAttrib4f"); addlookup(GLVERTEXATTRIB4FV,"glVertexAttrib4fv"); addlookup(GLVERTEXATTRIBPOINTER,"glVertexAttribPointer"); addlookup(GLVIEWPORT,"glViewport"); }