Lines Matching refs:fout

233 		fout = stdout;  in open_output()
241 fout = fopen(outfile, "w"); in open_output()
242 if (fout == NULL) { in open_output()
254 f_print(fout, "/*\n"); in add_warning()
255 f_print(fout, " * Please do not edit this file.\n"); in add_warning()
256 f_print(fout, " * It was generated using rpcgen.\n"); in add_warning()
257 f_print(fout, " */\n\n"); in add_warning()
476 f_print(fout, "#include \"%s\"\n", include); in c_output()
480 f_print(fout, "#include <rpc/rpc.h>\n"); in c_output()
481 tell = ftell(fout); in c_output()
485 if (extend && tell == ftell(fout)) { in c_output()
586 f_print(fout, "#ifndef _%s\n#define _%s\n\n", guard, in h_output()
589 f_print(fout, "#include <rpc/rpc.h>\n"); in h_output()
592 f_print(fout, "#include <pthread.h>\n"); in h_output()
596 f_print(fout, "\n#ifdef __cplusplus\n"); in h_output()
597 f_print(fout, "extern \"C\" {\n"); in h_output()
598 f_print(fout, "#endif\n\n"); in h_output()
603 tell = ftell(fout); in h_output()
621 f_print(fout, in h_output()
625 f_print(fout, "\n#ifdef __cplusplus\n"); in h_output()
626 f_print(fout, "extern \"C\" {\n"); in h_output()
627 f_print(fout, "#endif\n"); in h_output()
637 if (extend && tell == ftell(fout)) { in h_output()
640 f_print(fout, rpcgen_table_dcl); in h_output()
643 f_print(fout, "\n#ifdef __cplusplus\n"); in h_output()
644 f_print(fout, "}\n"); in h_output()
645 f_print(fout, "#endif\n"); in h_output()
647 f_print(fout, "\n#endif /* !_%s */\n", guard); in h_output()
668 f_print(fout, "#include \"%s\"\n", include); in s_output()
671 f_print(fout, "#include <rpc/rpc.h>\n"); in s_output()
673 f_print(fout, "#include <stdio.h>\n"); in s_output()
674 f_print(fout, "#include <stdlib.h> /* getenv, exit */\n"); in s_output()
675 f_print (fout, "#include <rpc/pmap_clnt.h> /* for pmap_unset */\n"); in s_output()
676 f_print (fout, "#include <string.h> /* strcmp */\n"); in s_output()
678 f_print(fout, "#include <rpc/rpc_com.h>\n"); in s_output()
684 f_print(fout, "#include <signal.h>\n"); in s_output()
689 f_print(fout, "#include <sys/ttycom.h> /* TIOCNOTTY */\n"); in s_output()
691 f_print(fout, "#ifdef __cplusplus\n"); in s_output()
692 f_print(fout, in s_output()
694 f_print(fout, "#endif /* __cplusplus */\n"); in s_output()
697 f_print(fout, "#include <fcntl.h> /* open */\n"); in s_output()
698 f_print(fout, "#include <unistd.h> /* fork / setsid */\n"); in s_output()
699 f_print(fout, "#include <sys/types.h>\n"); in s_output()
702 f_print(fout, "#include <string.h>\n"); in s_output()
704 f_print(fout, "#include <sys/socket.h>\n"); in s_output()
705 f_print(fout, "#include <netinet/in.h>\n"); in s_output()
709 f_print(fout, "#include <netconfig.h>\n"); in s_output()
712 f_print(fout, "#include <sys/resource.h> /* rlimit */\n"); in s_output()
714 f_print(fout, "#include <syslog.h>\n"); in s_output()
716 f_print(fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n"); in s_output()
718 f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", in s_output()
753 f_print (fout, "#include <string.h> /* for memset */\n"); in l_output()
755 f_print(fout, "#include \"%s\"\n", include); in l_output()
758 f_print(fout, "#include <rpc/rpc.h>\n"); in l_output()
812 f_print(fout, "#include \"%s\"\n", include); in svc_output()
815 f_print(fout, "#include <rpc/rpc.h>\n"); in svc_output()
817 tell = ftell(fout); in svc_output()
821 if (extend && tell == ftell(fout)) { in svc_output()
847 f_print(fout, "#include \"%s\"\n", include); in clnt_output()
850 f_print(fout, "#include <rpc/rpc.h>\n"); in clnt_output()
851 f_print(fout, "#include <stdio.h>\n"); in clnt_output()
852 f_print(fout, "#include <stdlib.h>\n"); in clnt_output()
853 tell = ftell(fout); in clnt_output()
861 if (extend && tell == ftell(fout)) { in clnt_output()
904 f_print(fout, "\n# This is a template makefile generated\ in mkfile_output()
907 f_print(fout, "\n# Parameters \n\n"); in mkfile_output()
909 f_print(fout, "CLIENT = %s\nSERVER = %s\n\n", in mkfile_output()
911 f_print(fout, "SOURCES_CLNT.c = \nSOURCES_CLNT.h = \n"); in mkfile_output()
912 f_print(fout, "SOURCES_SVC.c = \nSOURCES_SVC.h = \n"); in mkfile_output()
913 f_print(fout, "SOURCES.x = %s\n\n", cmd->infile); in mkfile_output()
914 f_print(fout, "TARGETS_SVC.c = %s %s %s \n", in mkfile_output()
916 f_print(fout, "TARGETS_CLNT.c = %s %s %s \n", in mkfile_output()
918 f_print(fout, "TARGETS = %s %s %s %s %s %s\n\n", in mkfile_output()
922 f_print(fout, "OBJECTS_CLNT = $(SOURCES_CLNT.c:%%.c=%%.o) \ in mkfile_output()
925 f_print(fout, "\nOBJECTS_SVC = $(SOURCES_SVC.c:%%.c=%%.o) \ in mkfile_output()
929 f_print(fout, "\n# Compiler flags \n"); in mkfile_output()
931 f_print(fout, "\nCFLAGS += -D_REENTRANT -D_THEAD_SAFE \nLDLIBS += -pthread\n"); in mkfile_output()
933 f_print(fout, "RPCGENFLAGS = \n"); in mkfile_output()
935 f_print(fout, "\n# Targets \n\n"); in mkfile_output()
937 f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); in mkfile_output()
938 f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); in mkfile_output()
939 f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); in mkfile_output()
941 f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname); in mkfile_output()
942 f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername); in mkfile_output()
944 f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \ in mkfile_output()
947 f_print(fout, "$(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) \ in mkfile_output()
949 f_print(fout, "$(CLIENT) : $(OBJECTS_CLNT) \n"); in mkfile_output()
950 f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \ in mkfile_output()
952 f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n"); in mkfile_output()
953 f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n"); in mkfile_output()
954 f_print(fout, "clean:\n\t rm -f core $(TARGETS) $(OBJECTS_CLNT) \ in mkfile_output()