aboutsummaryrefslogtreecommitdiff
ModeNameSize
-rw-r--r--.cvsignore346logplain
-rw-r--r--BUGS3712logplain
-rw-r--r--CANCEL-FCT-WAIVE5399logplain
-rw-r--r--CANCEL-FILE-WAIVE577logplain
-rw-r--r--CONFORMANCE7667logplain
-rw-r--r--COPYING18009logplain
-rw-r--r--COPYING.LIB26536logplain
-rw-r--r--ChangeLog200620logplain
-rw-r--r--ChangeLog.194571logplain
-rw-r--r--ChangeLog.10477627logplain
-rw-r--r--ChangeLog.11484902logplain
-rw-r--r--ChangeLog.12358574logplain
-rw-r--r--ChangeLog.13527717logplain
-rw-r--r--ChangeLog.14641682logplain
-rw-r--r--ChangeLog.2143801logplain
-rw-r--r--ChangeLog.362249logplain
-rw-r--r--ChangeLog.489479logplain
-rw-r--r--ChangeLog.5419002logplain
-rw-r--r--ChangeLog.6391352logplain
-rw-r--r--ChangeLog.7530774logplain
-rw-r--r--ChangeLog.8434943logplain
-rw-r--r--ChangeLog.9235340logplain
-rw-r--r--FAQ82683logplain
-rw-r--r--FAQ.in73366logplain
-rw-r--r--INSTALL24315logplain
-rw-r--r--INTERFACE36958logplain
-rw-r--r--LICENSES10728logplain
-rw-r--r--MakeTAGS5598logplain
-rw-r--r--Makeconfig32446logplain
-rw-r--r--Makefile11595logplain
-rw-r--r--Makefile.in598logplain
-rw-r--r--Makerules49742logplain
-rw-r--r--NAMESPACE1727logplain
-rw-r--r--NEWS55644logplain
-rw-r--r--NOTES10938logplain
-rw-r--r--PROJECTS4155logplain
-rw-r--r--README3510logplain
-rw-r--r--README-alpha12032logplain
-rw-r--r--README.libm31516logplain
-rw-r--r--README.template3512logplain
-rw-r--r--Rules5571logplain
-rw-r--r--Versions.def1286logplain
-rw-r--r--abi-tags1110logplain
d---------abilist892logplain
-rw-r--r--aclocal.m43893logplain
d---------aout36logplain
d---------argp627logplain
d---------assert382logplain
d---------bare74logplain
d---------bits2570logplain
d---------catgets614logplain
d---------conf41logplain
-rw-r--r--config-name.in380logplain
-rw-r--r--config.h.in7892logplain
-rw-r--r--config.make.in3173logplain
-rwxr-xr-xconfigure269048logplain
-rw-r--r--configure.in64931logplain
d---------conform109logplain
-rw-r--r--cppflags-iterator.mk259logplain
d---------crypt705logplain
d---------csu574logplain
d---------ctype374logplain
d---------debug963logplain
d---------dirent422logplain
d---------dlfcn1806logplain
d---------elf9076logplain
-rw-r--r--extra-lib.mk3635logplain
-rw-r--r--extra-modules.mk382logplain
d---------gmon293logplain
d---------gnulib111logplain
d---------grp706logplain
d---------hesiod260logplain
d---------hurd2855logplain
d---------iconv1301logplain
d---------iconvdata10941logplain
d---------include3929logplain
d---------inet2959logplain
d---------intl1733logplain
d---------io1237logplain
d---------libidn741logplain
d---------libio7112logplain
d---------linuxthreads4105logplain
d---------linuxthreads_db2118logplain
d---------locale2804logplain
d---------localedata2354logplain
d---------login864logplain
d---------mach1405logplain
d---------malloc1038logplain
d---------manual2284logplain
d---------math1703logplain
d---------misc1947logplain
d---------nis2194logplain
d---------nptl16530logplain
d---------nptl_db2201logplain
d---------nscd1394logplain
d---------nss1417logplain
-rw-r--r--o-iterator.mk358logplain
d---------po985logplain
d---------posix5566logplain
d---------pwd569logplain
d---------resolv1947logplain
d---------resource176logplain
d---------rt1252logplain
d---------scripts945logplain
d---------setjmp265logplain
d---------shadow499logplain
-rw-r--r--shlib-versions5157logplain
d---------signal802logplain
d---------socket140logplain
d---------soft-fp2367logplain
d---------stdio-common4390logplain
d---------stdlib3857logplain
d---------streams139logplain
d---------string2991logplain
d---------sunrpc3020logplain
d---------sysdeps711logplain
d---------sysvipc174logplain
d---------termios294logplain
-rw-r--r--test-skeleton.c9615logplain
d---------time1518logplain
d---------timezone1175logplain
-rw-r--r--tls.make.c241logplain
-rw-r--r--version.h116logplain
d---------wcsmbs2569logplain
d---------wctype655logplain
arrays */ if (sizestr == NULL) plus = ""; else plus = "+ "; if (ptr->length != 1) s_print (ptemp, " %s %s * %d", plus, dl->decl.array_max, ptr->length); else s_print (ptemp, " %s%s ", plus, dl->decl.array_max); /*now concatenate to sizestr !!!! */ if (sizestr == NULL) sizestr = strdup (ptemp); else { sizestr = realloc (sizestr, strlen (sizestr) + strlen (ptemp) + 1); if (sizestr == NULL) { f_print (stderr, "Fatal error : no memory \n"); crash (); }; sizestr = strcat (sizestr, ptemp); /*build up length of array */ } } } else { if (i > 0) { if (sizestr == NULL && size < inlineflag) { /* don't expand into inline code if size < inlineflag */ while (cur != dl) { print_stat (indent + 1, &cur->decl); cur = cur->next; } } else { /* were already looking at a xdr_inlineable structure */ tabify (fout, indent + 1); if (sizestr == NULL) f_print (fout, "buf = XDR_INLINE (xdrs, %d * BYTES_PER_XDR_UNIT);", size); else if (size == 0) f_print (fout, "buf = XDR_INLINE (xdrs, %s * BYTES_PER_XDR_UNIT);", sizestr); else f_print (fout, "buf = XDR_INLINE(xdrs, (%d + (%s)) * BYTES_PER_XDR_UNIT);", size, sizestr); f_print (fout, "\n"); tabify (fout, indent + 1); fprintf (fout, "if (buf == NULL) {\n"); psav = cur; while (cur != dl) { print_stat (indent + 2, &cur->decl); cur = cur->next; } f_print (fout, "\n\t\t} else {\n"); cur = psav; while (cur != dl) { emit_inline (indent + 1, &cur->decl, flag); cur = cur->next; } tabify (fout, indent + 1); f_print (fout, "}\n"); } } size = 0; i = 0; sizestr = NULL; print_stat (indent + 1, &dl->decl); } } if (i > 0) { if (sizestr == NULL && size < inlineflag) { /* don't expand into inline code if size < inlineflag */ while (cur != dl) { print_stat (indent + 1, &cur->decl); cur = cur->next; } } else { /* were already looking at a xdr_inlineable structure */ if (sizestr == NULL) f_print (fout, "\t\tbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", size); else if (size == 0) f_print (fout, "\t\tbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", sizestr); else f_print (fout, "\t\tbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", size, sizestr); f_print (fout, "\n\t\tif (buf == NULL) {\n"); psav = cur; while (cur != NULL) { print_stat (indent + 2, &cur->decl); cur = cur->next; } f_print (fout, "\t\t} else {\n"); cur = psav; while (cur != dl) { emit_inline (indent + 2, &cur->decl, flag); cur = cur->next; } f_print (fout, "\t\t}\n"); } } } /* this may be const. i haven't traced this one through yet. */ static void emit_struct (definition * def) { decl_list *dl; int j, size, flag; bas_type *ptr; int can_inline; if (inlineflag == 0) { /* No xdr_inlining at all */ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) print_stat (1, &dl->decl); return; } for (dl = def->def.st.decls; dl != NULL; dl = dl->next) if (dl->decl.rel == REL_VECTOR) { f_print (fout, "\tint i;\n"); break; } size = 0; can_inline = 0; /* * Make a first pass and see if inling is possible. */ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) if ((dl->decl.prefix == NULL) && ((ptr = find_type (dl->decl.type)) != NULL) && ((dl->decl.rel == REL_ALIAS) || (dl->decl.rel == REL_VECTOR))) { if (dl->decl.rel == REL_ALIAS) size += ptr->length; else { can_inline = 1; break; /* can be inlined */ } } else { if (size >= inlineflag) { can_inline = 1; break; /* can be inlined */ } size = 0; } if (size > inlineflag) can_inline = 1; if (can_inline == 0) { /* can not inline, drop back to old mode */ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) print_stat (1, &dl->decl); return; }; flag = PUT; for (j = 0; j < 2; j++) { inline_struct (def, flag); if (flag == PUT) flag = GET; } f_print (fout, "\t return TRUE;\n\t}\n\n"); /* now take care of XDR_FREE case */ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) print_stat (1, &dl->decl); } static void emit_typedef (const definition * def) { const char *prefix = def->def.ty.old_prefix; const char *type = def->def.ty.old_type; const char *amax = def->def.ty.array_max; relation rel = def->def.ty.rel; print_ifstat (1, prefix, type, rel, amax, "objp", def->def_name); } static void print_stat (int indent, const declaration * dec) { const char *prefix = dec->prefix; const char *type = dec->type; const char *amax = dec->array_max; relation rel = dec->rel; char name[256]; if (isvectordef (type, rel)) { s_print (name, "objp->%s", dec->name); } else { s_print (name, "&objp->%s", dec->name); } print_ifstat (indent, prefix, type, rel, amax, name, dec->name); } static void emit_inline (int indent, declaration * decl, int flag) { switch (decl->rel) { case REL_ALIAS: emit_single_in_line (indent, decl, flag, REL_ALIAS); break; case REL_VECTOR: tabify (fout, indent); f_print (fout, "{\n"); tabify (fout, indent + 1); f_print (fout, "register %s *genp;\n\n", decl->type); tabify (fout, indent + 1); f_print (fout, "for (i = 0, genp = objp->%s;\n", decl->name); tabify (fout, indent + 2); f_print (fout, "i < %s; ++i) {\n", decl->array_max); emit_single_in_line (indent + 2, decl, flag, REL_VECTOR); tabify (fout, indent + 1); f_print (fout, "}\n"); tabify (fout, indent); f_print (fout, "}\n"); break; default: /* ?... do nothing I guess */ } } static void emit_single_in_line (int indent, declaration *decl, int flag, relation rel) { char *upp_case; int freed = 0; tabify (fout, indent); if (flag == PUT) f_print (fout, "IXDR_PUT_"); else { if (rel == REL_ALIAS) f_print (fout, "objp->%s = IXDR_GET_", decl->name); else f_print (fout, "*genp++ = IXDR_GET_"); } upp_case = upcase (decl->type); /* hack - XX */ if (!strcmp (upp_case, "INT")) { free (upp_case); freed = 1; /* Casting is safe since the `freed' flag is set. */ upp_case = (char *) "LONG"; } if (!strcmp (upp_case, "U_INT")) { free (upp_case); freed = 1; /* Casting is safe since the `freed' flag is set. */ upp_case = (char *) "U_LONG"; } if (flag == PUT) { if (rel == REL_ALIAS) f_print (fout, "%s(buf, objp->%s);\n", upp_case, decl->name); else f_print (fout, "%s(buf, *genp++);\n", upp_case); } else { f_print (fout, "%s(buf);\n", upp_case); } if (!freed) free (upp_case); } static char * upcase (const char *str) { char *ptr, *hptr; ptr = malloc (strlen (str)); if (ptr == NULL) { f_print (stderr, "malloc failed\n"); exit (1); } hptr = ptr; while (*str != '\0') *ptr++ = toupper (*str++); *ptr = '\0'; return hptr; }