changing isck: the name matches exactly the MBK_CK env variable.

This commit is contained in:
Christophe Alexandre 2003-10-20 08:55:22 +00:00
parent 38d437f4cf
commit 5034bb029d
5 changed files with 29 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -28,7 +28,7 @@
* Modified by Czo <Olivier.Sirol@lip6.fr> 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 <stdio.h>
#include <stdlib.h>
@ -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 *
*******************************************************************************/

View File

@ -26,7 +26,7 @@
* Date : 31/08/93
* Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
* Modified by Czo <Olivier.Sirol@lip6.fr> 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__)