From 7ac5b7901a929f676620f8e0816047478f9a5b25 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 8 Jun 2001 00:49:05 +0000 Subject: 2001-06-07 Roland McGrath * header.c (WriteRoutineList): New function. * write.h: Declare it. * migcom.c (RoutineListFileName): New variable. (parseArgs): New option -list to set it. (main): If set, write the named output file with WriteRoutineList. * mig.in: Grok -list and put it in the usage message. --- header.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'header.c') diff --git a/header.c b/header.c index 2635bc0..7785767 100644 --- a/header.c +++ b/header.c @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ @@ -129,6 +129,23 @@ WriteUserHeader(FILE *file, const statement_t *stats) WriteEpilog(file, protect); } +void +WriteRoutineList(FILE *file, const statement_t *stats) +{ + const statement_t *stat; + for (stat = stats; stat != stNULL; stat = stat->stNext) + if (stat->stKind == skRoutine) + { + const routine_t *rt = stat->stRoutine; + + fprintf (file, "%s %u %s %u %u %u\n", + SubsystemName, SubsystemBase, + rt->rtName, rt->rtNumber, + SubsystemBase + rt->rtNumber, + rt->rtOneWay ? 0 : SubsystemBase + rt->rtNumber + 100); + } +} + static void WriteServerRoutine(FILE *file, const routine_t *rt) { -- cgit v1.2.3