diff --git a/xy2440App/src/Makefile b/xy2440App/src/Makefile index ffb6eb2..3d52f19 100644 --- a/xy2440App/src/Makefile +++ b/xy2440App/src/Makefile @@ -10,7 +10,6 @@ DBD += Xy2440.dbd # Source files (for depends target): LIBSRCS += drvXy2440.c LIBSRCS += devXy2440.c -LIBSRCS += xipIo.c # Link everything into a library: LIBRARY_IOC_vxWorks = Xy2440 ip440 diff --git a/xy2440App/src/xipIo.c b/xy2440App/src/xipIo.c deleted file mode 100644 index 5db9359..0000000 --- a/xy2440App/src/xipIo.c +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - -Project: - IndustryPack Driver Interface for EPICS - -File: - xipIo.c - -Copied xipIoParse() and strdupn() from original drvXy9660.c file -*******************************************************************************/ -#include -#include -#include -#include - -#include "xipIo.h" - - -char *strdupn( const char *ct, size_t n ) -{ - char *duplicate; - - duplicate = (char *)malloc(n+1); - if( !duplicate ) - return NULL; - - memcpy(duplicate, ct, n); - duplicate[n] = '\0'; - - return duplicate; -} - -int xipIoParse( char *str, xipIo_t *ptr, char flag ) -{ - char *name; - char *end; - - if( str == NULL || ptr == NULL ) - return 1; - - while( !isalnum(*str) ) - { - if( *str++ == '\0') - return 1; - } - - name = str; - - str = strpbrk(str, " "); - if( str == NULL || *str == '\0' ) - return 1; - - ptr->name = strdupn(name, str - name); - if( ptr->name == NULL ) - return 1; - - if( flag == 'A' ) - { - end = strchr(str,'C'); - if( end ) - { - str = end + 1; - sscanf(str,"%d", &ptr->channel); - } - else - return 1; - } - else if( flag == 'B' ) - { - end = strchr(str,'P'); - if( end ) - { - str = end + 1; - sscanf(str,"%d", &ptr->port); - end = strchr(str,'B'); - if( end ) - { - str = end + 1; - sscanf(str,"%d", &ptr->bit); - } - else - return 1; - } - else - return 1; - } - return(0); -} diff --git a/xy2440App/src/xipIo.h b/xy2440App/src/xipIo.h deleted file mode 100644 index aba2f57..0000000 --- a/xy2440App/src/xipIo.h +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - -Project: - Gemini Multi-Conjugate Adaptive Optics Project - -File: - xipIo.h - -Description: - Header file defining the parsing of addresses for - XIP modules. - -Author: - Andy Foster - -Created: - 12th November 2002 - -Copyright (c) 2002 Andy Foster - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*******************************************************************************/ - -#ifndef INCxipIoH -#define INCxipIoH - -/* Error Numbers */ - -#ifndef M_xip -#define M_xip (603 <<16) -#endif - -#define S_xip_badAddress (M_xip| 1) /*XIP address syntax error*/ - - -typedef struct -{ - char *name; - int port; - int bit; - int channel; - unsigned char intHandler; -} xipIo_t; - -/* Function Prototypes */ - -int xipIoParse( char *str, xipIo_t *ptr, char flag ); -char *strdupn( const char *ct, size_t n ); - -#endif /* INCxipIoH */