This has been tested by cross-compiling a base Hurd system to make sure
these kinds of routines are no longer used.
* lexxer.l: Remove tokens.
* parser.y: Remove token types and production rules.
* routine.c: Remove rtMakeProcedure, rtMakeSimpleProcedure,
rtMakeFunction.
* routine.h: Remove enum values rkSimpleProcedure, rkProcedure,
rkFunction. Remove dead fields from struct routine.
* user.c: Simplify and remove dead code.
---
lexxer.l | 3 ---
parser.y | 19 --
routine.c | 85 +--
routine.h | 22 +++--
user.c| 32 ++--
5 files changed, 18 insertions(+), 143 deletions(-)
diff --git a/lexxer.l b/lexxer.l
index 06b04e2..bd7a718 100644
--- a/lexxer.l
+++ b/lexxer.l
@@ -108,9 +108,6 @@ static void doSharp(const char *body); /* process body of #
directives */
%%
(?i:routine) RETURN(syRoutine);
-(?i:function) RETURN(syFunction);
-(?i:procedure) RETURN(syProcedure);
-(?i:simpleprocedure) RETURN(sySimpleProcedure);
(?i:simpleroutine) RETURN(sySimpleRoutine);
(?i:subsystem) RETURN(sySubsystem);
(?i:msgoption) RETURN(syMsgOption);
diff --git a/parser.y b/parser.y
index e88fd22..b05bcc9 100644
--- a/parser.y
+++ b/parser.y
@@ -27,9 +27,6 @@
%token sySkip
%token syRoutine
%token sySimpleRoutine
-%token sySimpleProcedure
-%token syProcedure
-%token syFunction
%token sySubsystem
%token syKernelUser
@@ -111,7 +108,6 @@
%type BasicTypeSpec PrevTypeSpec ArgumentType
%type PrimIPCType IPCType
%type RoutineDecl Routine SimpleRoutine
-%type Procedure SimpleProcedure Function
%type Direction
%type Argument Arguments ArgumentList
%type IPCFlags
@@ -582,9 +578,6 @@ IntExp : IntExp syPlus IntExp
RoutineDecl: Routine { $$ = $1; }
| SimpleRoutine { $$ = $1; }
- | Procedure { $$ = $1; }
- | SimpleProcedure { $$ = $1; }
- | Function{ $$ = $1; }
;
Routine: syRoutine syIdentifier Arguments
@@ -595,18 +588,6 @@ SimpleRoutine : sySimpleRoutine
syIdentifier Arguments
{ $$ = rtMakeSimpleRoutine($2, $3); }
;
-Procedure : syProcedure syIdentifier Arguments
- { $$ = rtMakeProcedure($2, $3); }
- ;
-
-SimpleProcedure: sySimpleProcedure syIdentifier Arguments
- { $$ = rtMakeSimpleProcedure($2, $3); }
- ;
-
-Function : syFunction syIdentifier Arguments ArgumentType
- { $$ = rtMakeFunction($2, $3, $4); }
- ;
-
Arguments : syLParen syRParen
{ $$ = argNULL; }
| syLParen ArgumentList syRParen
diff --git a/routine.c b/routine.c
index ddf5770..d9154ef 100644
--- a/routine.c
+++ b/routine.c
@@ -59,7 +59,6 @@ rtAlloc(void)
fatal("rtAlloc(): %s", unix_error_string(errno));
new->rtNumber = rtNumber++;
new->rtName = strNULL;
-new->rtErrorName = strNULL;
new->rtUserName = strNULL;
new->rtServerName = strNULL;
@@ -136,54 +135,6 @@ rtMakeSimpleRoutine(identifier_t name, argument_t *args)
return rt;
}
-routine_t *
-rtMakeProcedure(identifier_t name, argument_t *args)
-{
-routine_t *rt = rtAlloc();
-
-rt->rtName = name;
-rt->rtKind = rkProcedure;
-rt->rtArgs = args;
-
-warn("Procedure %s: obsolete routine kind", name);
-
-return rt;
-}
-
-routine_t *
-rtMakeSimpleProcedure(identifier_t name, argument_t *args)
-{
-routine_t *rt = rtAlloc();
-
-rt->rtName = name;
-rt->rtKind = rkSimpleProcedure;
-rt->rtArgs = args;
-
-warn("SimpleProcedure %s: obsolete routine kind", name);
-
-return rt;
-}
-
-routine_t *
-rtMakeFunction(identifier_t name, argument_t *args, ipc_type_t *type)
-{
-routine_t *rt = rtAlloc();
-argument_t *ret = argAlloc();
-
-ret->argName = name;
-ret->argKind = akReturn;
-ret->argType = type;
-ret->argNext = args;
-
-rt->rtName = name;
-rt->rtKind = rkFunction;
-rt->rtArgs = ret;
-
-warn("Function %s: obsolete routine kind", name);
-
-return rt;
-}
-
const char *
rtRoutineKindToStr(routine_kind_t rk)
{
@@ -193,12 +144,6 @@ rtRoutineKindToStr(routine_kind_t rk)
return "Routine";
case rkSimpleRoutine:
return "SimpleRoutine";
- case rkProcedure:
- return "Procedure";
- case rkSimpleProcedure:
- return "SimpleProcedure";
- case rkFunction:
- return "Function";
default:
fatal("rtRoutineKindToStr(%d): not