Lines Matching refs:f_print

82 	f_print(fout, "\n\nvoid\n");
84 f_print(fout, "(char *host)\n{\n");
85 f_print(fout, "\tCLIENT *clnt;\n");
89 f_print(fout, "\t");
91 f_print(fout, "enum clnt_stat retval_%d;\n\t", ++i);
93 f_print(fout, "result_%d;\n", i);
96 f_print(fout, " *result_%d;\n",++i);
100 f_print(fout, "\t");
105 f_print(fout, "char * "); /* cannot have "void" type */
106 f_print(fout, " ");
108 f_print(fout, "_arg;\n");
111 f_print(fout, "\t");
114 f_print(fout, " ");
116 f_print(fout, "_%s;\n", l->decl.name);
122 f_print(fout, "\n#ifndef\tDEBUG\n");
123 f_print(fout, "\tclnt = clnt_create(host, %s, %s, \"%s\");\n",
125 f_print(fout, "\tif (clnt == (CLIENT *) NULL) {\n");
126 f_print(fout, "\t\tclnt_pcreateerror(host);\n");
127 f_print(fout, "\t\texit(1);\n\t}\n");
128 f_print(fout, "#endif\t/* DEBUG */\n\n");
134 f_print(fout, "\tretval_%d = ",++i);
136 f_print(fout, "\tresult_%d = ",++i);
139 f_print(fout, "(");
142 f_print(fout, "(void *)");
143 f_print(fout, "&");
146 f_print(fout, "_arg, &result_%d, clnt);\n",
149 f_print(fout, "_arg, clnt);\n");
153 f_print(fout, "(&result_%d, clnt);\n", i);
155 f_print(fout, "(clnt);\n");
158 f_print(fout, "(");
161 f_print(fout, "_%s, ", l->decl.name);
164 f_print(fout, "&result_%d, ", i);
166 f_print(fout, "clnt);\n");
169 f_print(fout, "\tif (retval_%d != RPC_SUCCESS) {\n", i);
172 f_print(fout, "\tif (result_%d == (", i);
174 f_print(fout, "*) NULL) {\n");
176 f_print(fout, "\t\tclnt_perror(clnt, \"call failed\");\n");
177 f_print(fout, "\t}\n");
180 f_print(fout, "#ifndef\tDEBUG\n");
181 f_print(fout, "\tclnt_destroy(clnt);\n");
182 f_print(fout, "#endif\t /* DEBUG */\n");
183 f_print(fout, "}\n");
194 f_print(fout, "\n");
197 f_print(fout, "*\n");
199 f_print(fout, "bool_t\n");
203 f_print(fout, "{\n");
205 f_print(fout, "\tstatic ");
209 f_print(fout, "char *");
211 f_print(fout, " result;\n");
214 f_print(fout, "\tbool_t retval;\n");
215 f_print(fout,
220 f_print(fout, "\treturn (&result);\n}\n");
222 f_print(fout, "\treturn((void *) &result);\n}\n");
224 f_print(fout, "\treturn (retval);\n}\n");
228 f_print(fout, "\nint\n");
230 f_print(fout,"_freeresult(SVCXPRT *transp, xdrproc_t xdr_result, caddr_t result)\n");
231 f_print(fout, "{\n");
232 f_print(fout, "\t(void) xdr_free(xdr_result, result);\n");
233 f_print(fout,
235 f_print(fout, "\n}\n");
253 f_print(fout, "/*\n");
254 f_print(fout, " * This is sample code generated by rpcgen.\n");
255 f_print(fout, " * These are only templates and you can use them\n");
256 f_print(fout, " * as a guideline for developing your own functions.\n");
257 f_print(fout, " */\n\n");
267 f_print(fout, "\n\n");
268 f_print(fout, "int\n");
269 f_print(fout, "main(int argc, char *argv[])\n{\n");
271 f_print(fout, "\tchar *host;");
272 f_print(fout, "\n\n\tif (argc < 2) {");
273 f_print(fout, "\n\t\tprintf(\"usage: %%s server_host\\n\", argv[0]);\n");
274 f_print(fout, "\t\texit(1);\n\t}");
275 f_print(fout, "\n\thost = argv[1];\n");
283 f_print(fout, "\t");
285 f_print(fout, "(host);\n");
288 f_print(fout, "}\n");