"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/rxgen/rpc_parse.c" between
openafs-1.8.4-src.tar.bz2 and openafs-1.8.5-src.tar.bz2

About: OpenAFS is a distributed filesystem. It offers a client-server architecture for file sharing, providing location independence, scalability and transparent migration capabilities for data. Maintenance release.

rpc_parse.c  (openafs-1.8.4-src.tar.bz2):rpc_parse.c  (openafs-1.8.5-src.tar.bz2)
skipping to change at line 1278 skipping to change at line 1278
f_print(fout, "\t\t%d, %sNO_OF_STAT_FUNCS, 1);\n", f_print(fout, "\t\t%d, %sNO_OF_STAT_FUNCS, 1);\n",
no_of_stat_funcs, PackagePrefix[PackageIndex]); no_of_stat_funcs, PackagePrefix[PackageIndex]);
f_print(fout, "\t}\n\n"); f_print(fout, "\t}\n\n");
} }
f_print(fout, "\treturn z_result;\n}\n\n"); f_print(fout, "\treturn z_result;\n}\n\n");
} }
static void static void
ss_Proc_CodeGeneration(definition * defp) ss_Proc_CodeGeneration(definition * defp)
{ {
defp->can_fail = 0; extern char zflag;
if (zflag)
defp->can_fail = 0;
else
defp->can_fail = 1;
ss_ProcName_setup(defp); ss_ProcName_setup(defp);
if (!cflag) { if (!cflag) {
ss_ProcParams_setup(defp); ss_ProcParams_setup(defp);
ss_ProcSpecial_setup(defp); ss_ProcSpecial_setup(defp);
ss_ProcUnmarshallInParams_setup(defp); ss_ProcUnmarshallInParams_setup(defp);
ss_ProcCallRealProc_setup(defp); ss_ProcCallRealProc_setup(defp);
ss_ProcMarshallOutParams_setup(defp); ss_ProcMarshallOutParams_setup(defp);
ss_ProcTail_setup(defp); ss_ProcTail_setup(defp);
} }
} }
skipping to change at line 1404 skipping to change at line 1409
for (plist = defp->pc.plists; plist; plist = plist->next) { for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM if (plist->component_kind == DEF_PARAM
&& (plist->pl.param_kind == DEF_INPARAM && (plist->pl.param_kind == DEF_INPARAM
|| plist->pl.param_kind == DEF_INOUTPARAM)) { || plist->pl.param_kind == DEF_INOUTPARAM)) {
spec_list *spec = defp1->def.sd.specs; spec_list *spec = defp1->def.sd.specs;
char string[40]; char string[40];
strcpy(string, structname(spec->sdef.string_value)); strcpy(string, structname(spec->sdef.string_value));
if (streq(string, structname(plist->pl.param_type))) { if (streq(string, structname(plist->pl.param_type))) {
plist->pl.string_name = spec->sdef.string_name; plist->pl.string_name = spec->sdef.string_name;
plist->pl.param_flag |= FREETHIS_PARAM; plist->pl.param_flag |= FREETHIS_PARAM;
fprintf(fout, "\n\t%s.%s = 0;", plist->pl.param_name,
spec->sdef.string_name);
} }
} }
} }
} }
for (listp = typedef_defined; listp != NULL; listp = listp->next) { for (listp = typedef_defined; listp != NULL; listp = listp->next) {
defp1 = (definition *) listp->val; defp1 = (definition *) listp->val;
for (plist = defp->pc.plists; plist; plist = plist->next) { for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM) { if (plist->component_kind == DEF_PARAM) {
if (streq(defp1->def_name, structname(plist->pl.param_type))) { if (streq(defp1->def_name, structname(plist->pl.param_type))) {
plist->pl.param_flag |= FREETHIS_PARAM; plist->pl.param_flag |= FREETHIS_PARAM;
switch (defp1->pc.rel) { switch (defp1->pc.rel) {
case REL_ARRAY: case REL_ARRAY:
plist->pl.string_name = alloc(40); plist->pl.string_name = alloc(40);
if (brief_flag) { if (brief_flag) {
f_print(fout, "\n\t%s.val = 0;",
plist->pl.param_name);
f_print(fout, "\n\t%s.len = 0;",
plist->pl.param_name);
s_print(plist->pl.string_name, "val"); s_print(plist->pl.string_name, "val");
} else { } else {
f_print(fout, "\n\t%s.%s_val = 0;",
plist->pl.param_name, defp1->def_name);
f_print(fout, "\n\t%s.%s_len = 0;",
plist->pl.param_name, defp1->def_name);
s_print(plist->pl.string_name, "%s_val", s_print(plist->pl.string_name, "%s_val",
defp1->def_name); defp1->def_name);
} }
break; break;
case REL_POINTER: case REL_POINTER:
f_print(fout, "\n\t%s = 0;", plist->pl.param_name);
plist->pl.string_name = NULL; plist->pl.string_name = NULL;
break; break;
default: default:
break; break;
} }
} }
} }
} }
} }
for (listp = complex_defined; listp != NULL; listp = listp->next) { for (listp = complex_defined; listp != NULL; listp = listp->next) {
defp1 = (definition *) listp->val; defp1 = (definition *) listp->val;
for (plist = defp->pc.plists; plist; plist = plist->next) { for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM) { if (plist->component_kind == DEF_PARAM) {
if (streq(defp1->def_name, structname(plist->pl.param_type))) { if (streq(defp1->def_name, structname(plist->pl.param_type))) {
plist->pl.param_flag |= FREETHIS_PARAM; plist->pl.param_flag |= FREETHIS_PARAM;
fprintf(fout, "\n\tmemset(&%s, 0, sizeof(%s));",
plist->pl.param_name, defp1->def_name);
} }
} }
} }
} }
for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM) {
fprintf(fout, "\n\tmemset(&%s, 0, sizeof(%s));",
plist->pl.param_name,
plist->pl.param_name);
}
}
f_print(fout, "\n"); f_print(fout, "\n");
} }
static void static void
ss_ProcUnmarshallInParams_setup(definition * defp) ss_ProcUnmarshallInParams_setup(definition * defp)
{ {
int noofparams, noofoutparams, i; int noofparams, noofoutparams, i;
proc1_list *plist; proc1_list *plist;
noofparams = defp->pc.paramtypes[IN] + defp->pc.paramtypes[INOUT]; noofparams = defp->pc.paramtypes[IN] + defp->pc.paramtypes[INOUT];
skipping to change at line 1518 skipping to change at line 1518
f_print(fout, ", &%s", plist->pl.param_name); f_print(fout, ", &%s", plist->pl.param_name);
} else { } else {
f_print(fout, ", %s", plist->pl.param_name); f_print(fout, ", %s", plist->pl.param_name);
} }
} }
} }
} }
f_print(fout, ");\n"); f_print(fout, ");\n");
if (zflag) { if (zflag) {
f_print(fout, "\tif (z_result)\n\t\treturn z_result;\n"); f_print(fout, "\tif (z_result)\n\t\treturn z_result;\n");
} else {
f_print(fout, "\tif (z_result)\n\t\tgoto fail;\n");
} }
} }
static void static void
ss_ProcMarshallOutParams_setup(definition * defp) ss_ProcMarshallOutParams_setup(definition * defp)
{ {
proc1_list *plist; proc1_list *plist;
int noofparams, i; int noofparams, i;
noofparams = defp->pc.paramtypes[INOUT] + defp->pc.paramtypes[OUT]; noofparams = defp->pc.paramtypes[INOUT] + defp->pc.paramtypes[OUT];
 End of changes. 8 change blocks. 
14 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)