From 5034bb029d48e096aa497a54001b2e61af5f34ec Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Mon, 20 Oct 2003 08:55:22 +0000 Subject: [PATCH] changing isck: the name matches exactly the MBK_CK env variable. --- alliance/src/mbk/man3/isck.3 | 16 ++++++++-------- alliance/src/mbk/man3/isvdd.3 | 4 ++-- alliance/src/mbk/man3/isvss.3 | 4 ++-- alliance/src/mbk/src/mbk_util.c | 16 +++++++++++++++- alliance/src/mbk/src/mut.h | 4 ++-- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/alliance/src/mbk/man3/isck.3 b/alliance/src/mbk/man3/isck.3 index bd56e7e6..78ec21d9 100644 --- a/alliance/src/mbk/man3/isck.3 +++ b/alliance/src/mbk/man3/isck.3 @@ -1,4 +1,4 @@ -.\" $Id: isck.3,v 1.1 2003/04/03 14:55:19 xtof Exp $ +.\" $Id: isck.3,v 1.2 2003/10/20 08:55:19 xtof Exp $ .\" @(#)isck.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot .if t \{\ .so man1/alc_contents.mac @@ -12,7 +12,7 @@ isck .XE4 \} .TH ISCK 3 "October 1, 1997" "ASIM/LIP6" "MBK UTILITY FUNCTIONS" .SH NAME -isck \-tells if a name contains the pattern defined by the user +isck \-tells if a name is the pattern defined by the user .so man1/alc_origin.1 .SH SYNOPSYS .nf @@ -21,21 +21,21 @@ isck \-tells if a name contains the pattern defined by the user .if t \{\ .ft CR \} #include "mut.h" -void isck(s) +int isck(s) char \(**s; .ft R .fi .SH PARAMETER .TP 20 \fIs\fP -Pointer to the string to be check as power high +Pointer to the string to be check as clock .SH DESCRIPTION -\fBisck\fP searches an occurence of the string defined by the \fBMBK_CK\fP(1) -environment variable in the string \fIs\fP. +\fBisck\fP compares the string defined by the \fBMBK_CK\fP(1) +environment variable with the string \fIs\fP. If this string is not set by the user, its default value is "ck". .SH RETURN VALUE -\fBisck\fP return \fBNULL\fP the pattern is not present -If the pattern is found, a value different from \fBNULL\fP is returned. +\fBisck\fP returns \fB0\fP the pattern is not present +If the pattern is found, \fB1\fP is returned. .SH EXAMPLE .ta 3n 6n 9n 12n 15n 18n 21n .nf diff --git a/alliance/src/mbk/man3/isvdd.3 b/alliance/src/mbk/man3/isvdd.3 index ba8745a7..7128b4ba 100644 --- a/alliance/src/mbk/man3/isvdd.3 +++ b/alliance/src/mbk/man3/isvdd.3 @@ -1,4 +1,4 @@ -.\" $Id: isvdd.3,v 1.1 2002/03/08 13:51:02 fred Exp $ +.\" $Id: isvdd.3,v 1.2 2003/10/20 08:55:19 xtof Exp $ .\" @(#)isvdd.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot .if t \{\ .so man1/alc_contents.mac @@ -21,7 +21,7 @@ isvdd \-tells if a name contains the pattern defined by the user .if t \{\ .ft CR \} #include "mut.h" -void isvdd(s) +char* isvdd(s) char \(**s; .ft R .fi diff --git a/alliance/src/mbk/man3/isvss.3 b/alliance/src/mbk/man3/isvss.3 index d66c588a..e00197f1 100644 --- a/alliance/src/mbk/man3/isvss.3 +++ b/alliance/src/mbk/man3/isvss.3 @@ -1,4 +1,4 @@ -.\" $Id: isvss.3,v 1.1 2002/03/08 13:51:02 fred Exp $ +.\" $Id: isvss.3,v 1.2 2003/10/20 08:55:19 xtof Exp $ .\" @(#)isvss.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot .if t \{\ .so man1/alc_contents.mac @@ -21,7 +21,7 @@ isvss \-tells if a name contains the pattern defined by the user .if t \{\ .ft CR \} #include "mut.h" -void isvss(s) +char* isvss(s) char \(**s; .ft R .fi diff --git a/alliance/src/mbk/src/mbk_util.c b/alliance/src/mbk/src/mbk_util.c index c575c3a2..c24a8943 100644 --- a/alliance/src/mbk/src/mbk_util.c +++ b/alliance/src/mbk/src/mbk_util.c @@ -28,7 +28,7 @@ * Modified by Czo 1997,98 */ -#ident "$Id: mbk_util.c,v 1.3 2003/04/03 14:46:30 xtof Exp $" +#ident "$Id: mbk_util.c,v 1.4 2003/10/20 08:55:22 xtof Exp $" #include #include @@ -740,6 +740,20 @@ void upstr(const char *s, char *t) *t = *s; } +/******************************************************************************* +* function isck() * +*******************************************************************************/ +int isck(char *name) +{ + if (!name || !CK) + return 0; + else + if (strcmp(name, CK)) + return 1; + else + return 0; +} + /******************************************************************************* * function instr() : about strstr, but some systems don't have it * *******************************************************************************/ diff --git a/alliance/src/mbk/src/mut.h b/alliance/src/mbk/src/mut.h index 9454b3db..e32f7c46 100644 --- a/alliance/src/mbk/src/mut.h +++ b/alliance/src/mbk/src/mut.h @@ -26,7 +26,7 @@ * Date : 31/08/93 * Author : Frederic Petrot * Modified by Czo 1997,98 - * $Id: mut.h,v 1.7 2003/04/03 14:46:30 xtof Exp $ + * $Id: mut.h,v 1.8 2003/10/20 08:55:22 xtof Exp $ */ #ifndef _MUT_H_ @@ -94,7 +94,6 @@ extern "C" { #define isvdd(name) instr(name, VDD, SEPAR) #define isvss(name) instr(name, VSS, SEPAR) -#define isck(name) instr(name, CK, SEPAR) #define funcin() if (MBK_DEBUG_ON) \ HEAD_MBKDEBUG = addptype(HEAD_MBKDEBUG, \ __LINE__, \ @@ -219,6 +218,7 @@ extern void mbkexit __P(( int ExitValue )); /* new exit handler system */ extern char * nameindex __P((char *name, long index)); extern num_list * addnum __P((num_list *ptnum, long data)); extern void freenum __P((num_list *pt)); + extern int isck __P((char *name)); #if (defined(__STDC__) || defined(__GNUC__)) && defined(DEBUGCHAIN) #define addchain( a, b ) (chain_list*)fnaddchain(a,b,__LINE__,__FILE__)