Update of /cvsroot/emc/rcslib/src/cms
In directory sc8-pr-cvs1:/tmp/cvs-serv3769/src/cms
Modified Files:
Tag: wps_multiplat_dev_branch
cms.hh cms_cfg.hh cms_srv.cc cms_srv.hh cms_up.cc cms_up.hh
cms_user.hh cms_xup.cc cms_xup.hh cmsdiag.hh filemem.cc
filemem.hh nml.hh nml_srv.cc nml_srv.hh nmlmsg.hh nmlqr.hh
nmltest.cc physmem.cc physmem.hh recvline.c rem_msg.hh
sokintrf.c sokintrf.h stcpmem.cc stcpopts.cc ttyintf.c
ttyintf.h udp_srv.cc udp_srv.hh udpmem.cc udpmem.hh
Log Message:
.
Index: cms.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms.hh,v
retrieving revision 4.40.2.1
retrieving revision 4.40.2.2
diff -C2 -d -r4.40.2.1 -r4.40.2.2
*** cms.hh 8 Aug 2003 14:21:07 -0000 4.40.2.1
--- cms.hh 22 Aug 2003 20:06:36 -0000 4.40.2.2
***************
*** 15,20 ****
#define CMS_HH
- #include "rcs_defs.hh" /* RCS_EXPORT, EXTERN_C_STD_HEADERS */
-
/* Include Files */
#ifdef EXTERN_C_STD_HEADERS
--- 15,18 ----
***************
*** 181,185 ****
/* This structure will be placed at the beginning of every */
/* CMS buffer. */
! struct RCS_EXPORT CMS_HEADER
{
long was_read; /* Has the buffer been read since */
--- 179,183 ----
/* This structure will be placed at the beginning of every */
/* CMS buffer. */
! struct CMS_HEADER
{
long was_read; /* Has the buffer been read since */
***************
*** 189,197 ****
};
! class RCS_EXPORT CMS_DIAG_PROC_INFO;
! class RCS_EXPORT CMS_DIAG_HEADER;
! class RCS_EXPORT CMS_DIAGNOSTICS_INFO;
! struct RCS_EXPORT CMS_QUEUING_HEADER
{
long head;
--- 187,195 ----
};
! class CMS_DIAG_PROC_INFO;
! class CMS_DIAG_HEADER;
! class CMS_DIAGNOSTICS_INFO;
! struct CMS_QUEUING_HEADER
{
long head;
***************
*** 227,232 ****
/* CMS class declaration. */
! class RCS_EXPORT CMS;
! class RCS_EXPORT CMS_UPDATER;
typedef void (*transfer_from_function_ptr) (CMS *, void *from,
--- 225,230 ----
/* CMS class declaration. */
! class CMS;
! class CMS_UPDATER;
typedef void (*transfer_from_function_ptr) (CMS *, void *from,
***************
*** 256,260 ****
/* CMS class definition. */
! class RCS_EXPORT CMS
{
public:
--- 254,258 ----
/* CMS class definition. */
! class CMS
{
public:
***************
*** 748,756 ****
long total_messages_missed;
long messages_missed_on_last_read;
! char RCS_HUGE *format_low_ptr;
! char RCS_HUGE *format_high_ptr;
long format_size;
! int check_pointer (char RCS_HUGE * ptr, long bytes);
! int check_pointer_with_name (const char *, char RCS_HUGE * ptr, long bytes);
int isserver; /* Is the process a server. */
int is_phantom; /* Is this a phantom CMS channel? */
--- 746,754 ----
long total_messages_missed;
long messages_missed_on_last_read;
! char *format_low_ptr;
! char *format_high_ptr;
long format_size;
! int check_pointer (char * ptr, long bytes);
! int check_pointer_with_name (const char *, char * ptr, long bytes);
int isserver; /* Is the process a server. */
int is_phantom; /* Is this a phantom CMS channel? */
Index: cms_cfg.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_cfg.hh,v
retrieving revision 4.33
retrieving revision 4.33.2.1
diff -C2 -d -r4.33 -r4.33.2.1
*** cms_cfg.hh 6 Sep 2001 14:32:54 -0000 4.33
--- cms_cfg.hh 22 Aug 2003 20:06:36 -0000 4.33.2.1
***************
*** 14,18 ****
#include "cms_user.hh"
- #include "rcs_defs.hh" /* RCS_EXPORT */
/* Config File Definitions. */
--- 14,17 ----
***************
*** 30,38 ****
/* Function Prototypes. */
! extern int RCS_EXPORT cms_config (CMS ** c, char *b, char *p, char *f,
int set_to_server = 0, int set_to_master =
0);
! extern int RCS_EXPORT cms_copy (CMS ** dest, CMS * src,
int set_to_server = 0, int set_to_master =
0);
--- 29,37 ----
/* Function Prototypes. */
! extern int cms_config (CMS ** c, char *b, char *p, char *f,
int set_to_server = 0, int set_to_master =
0);
! extern int cms_copy (CMS ** dest, CMS * src,
int set_to_server = 0, int set_to_master =
0);
Index: cms_srv.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_srv.cc,v
retrieving revision 4.37.2.2
retrieving revision 4.37.2.3
diff -C2 -d -r4.37.2.2 -r4.37.2.3
*** cms_srv.cc 22 Aug 2003 03:34:27 -0000 4.37.2.2
--- cms_srv.cc 22 Aug 2003 20:06:36 -0000 4.37.2.3
***************
*** 70,73 ****
--- 70,90 ----
#endif
+ #include "cms_clnt_info.hh"
+
+ CMS_MSG_INFO::CMS_MSG_INFO()
+ {
+ addr = 0;
+ size = 0;
+ deleteaddr = 0;
+ }
+
+ CMS_MSG_INFO::~CMS_MSG_INFO()
+ {
+ if (addr && size && deleteaddr)
+ {
+ DEBUG_FREE (addr);
+ }
+ addr = 0;
+ }
int cms_server_count = 0;
Index: cms_srv.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_srv.hh,v
retrieving revision 4.35.2.1
retrieving revision 4.35.2.2
diff -C2 -d -r4.35.2.1 -r4.35.2.2
*** cms_srv.hh 8 Aug 2003 14:21:08 -0000 4.35.2.1
--- cms_srv.hh 22 Aug 2003 20:06:36 -0000 4.35.2.2
***************
*** 12,16 ****
#define CMS_SERVER_HH
- #include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
#include "cms_user.hh" /* class CMS, CMS_STATUS */
#include "cms_cfg.hh" /* CMS_CONFIG_LINELEN */
--- 12,15 ----
***************
*** 48,86 ****
#endif
! class RCS_EXPORT CMS_SERVER;
! class RCS_EXPORT CMS_DIAG_PROC_INFO;
class CMS_USER_INFO;
! class CMS_MSG_INFO
! {
! public:
! CMS_MSG_INFO ()
! {
! addr = 0;
! size = 0;
! deleteaddr = 0;
! };
! ~CMS_MSG_INFO ()
! {
! if (addr && size && deleteaddr)
! {
! DEBUG_FREE (addr);
! }
! addr = 0;
! };
! void *addr;
! size_t size;
! int deleteaddr;
! };
!
! class CMS_CLIENT_INFO
! {
! public:
! REMOTE_CLIENT_ID id;
! CMS_MSG_INFO last_message_info;
! };
! class RCS_EXPORT CMS_SERVER_LOCAL_PORT:public virtual CMS_USER
{
public:
--- 47,58 ----
#endif
! class CMS_SERVER;
! class CMS_DIAG_PROC_INFO;
class CMS_USER_INFO;
! class CMS_CLIENT_INFO;
! class CMS_SERVER_LOCAL_PORT:public virtual CMS_USER
{
public:
***************
*** 133,137 ****
! class RCS_EXPORT CMS_SERVER_REMOTE_PORT
{
public:
--- 105,109 ----
! class CMS_SERVER_REMOTE_PORT
{
public:
***************
*** 166,170 ****
! class RCS_EXPORT CMS_SERVER
{
public:
--- 138,142 ----
! class CMS_SERVER
{
public:
Index: cms_up.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_up.cc,v
retrieving revision 4.36.2.1
retrieving revision 4.36.2.2
diff -C2 -d -r4.36.2.1 -r4.36.2.2
*** cms_up.cc 8 Aug 2003 14:21:08 -0000 4.36.2.1
--- cms_up.cc 22 Aug 2003 20:06:36 -0000 4.36.2.2
***************
*** 270,274 ****
int
! CMS_UPDATER::check_pointer (char RCS_HUGE * _pointer, long _bytes)
{
if (pointer_check_disabled > 0)
--- 270,274 ----
int
! CMS_UPDATER::check_pointer (char * _pointer, long _bytes)
{
if (pointer_check_disabled > 0)
***************
*** 284,288 ****
int
CMS_UPDATER::check_pointer_with_name (const char *name,
! char RCS_HUGE * _pointer, long _bytes)
{
if (pointer_check_disabled > 0)
--- 284,288 ----
int
CMS_UPDATER::check_pointer_with_name (const char *name,
! char * _pointer, long _bytes)
{
if (pointer_check_disabled > 0)
Index: cms_up.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_up.hh,v
retrieving revision 4.34.2.1
retrieving revision 4.34.2.2
diff -C2 -d -r4.34.2.1 -r4.34.2.2
*** cms_up.hh 8 Aug 2003 14:21:08 -0000 4.34.2.1
--- cms_up.hh 22 Aug 2003 20:06:36 -0000 4.34.2.2
***************
*** 31,35 ****
/* Abstract CMS_UPDATER CLASS */
! class RCS_EXPORT CMS_UPDATER
{
public:
--- 31,35 ----
/* Abstract CMS_UPDATER CLASS */
! class CMS_UPDATER
{
public:
***************
*** 385,391 ****
virtual void recheck_properties(void);
! virtual int check_pointer (char RCS_HUGE * ptr, long bytes);
! virtual int check_pointer_with_name (const char *name, char RCS_HUGE * ptr,
! long bytes);
CMS_UPDATER_MODE mode;
CMS *cms_parent;
--- 385,390 ----
virtual void recheck_properties(void);
! virtual int check_pointer (char * ptr, long bytes);
! virtual int check_pointer_with_name (const char *name, char * ptr,long bytes);
CMS_UPDATER_MODE mode;
CMS *cms_parent;
***************
*** 411,415 ****
/* Friends */
! friend class RCS_EXPORT CMS;
};
--- 410,414 ----
/* Friends */
! friend class CMS;
};
Index: cms_user.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_user.hh,v
retrieving revision 4.33.2.1
retrieving revision 4.33.2.2
diff -C2 -d -r4.33.2.1 -r4.33.2.2
*** cms_user.hh 8 Aug 2003 14:21:08 -0000 4.33.2.1
--- cms_user.hh 22 Aug 2003 20:06:36 -0000 4.33.2.2
***************
*** 2,13 ****
#define CMS_USER_HH
- #include "rcs_defs.hh"
! #include <stdlib.h>
! class RCS_EXPORT CMS;
! class RCS_EXPORT CMS_USER
{
public:
--- 2,12 ----
#define CMS_USER_HH
! #include <stdlib.h> // size_t
! class CMS;
! class CMS_USER
{
public:
Index: cms_xup.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_xup.cc,v
retrieving revision 4.35.2.1
retrieving revision 4.35.2.2
diff -C2 -d -r4.35.2.1 -r4.35.2.2
*** cms_xup.cc 21 Aug 2003 20:24:14 -0000 4.35.2.1
--- cms_xup.cc 22 Aug 2003 20:06:36 -0000 4.35.2.2
***************
*** 375,379 ****
int
! CMS_XDR_UPDATER::check_pointer (char RCS_HUGE * _pointer, long _bytes)
{
if (NULL == cms_parent || NULL == current_stream)
--- 375,379 ----
int
! CMS_XDR_UPDATER::check_pointer (char * _pointer, long _bytes)
{
if (NULL == cms_parent || NULL == current_stream)
***************
*** 437,441 ****
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (char)))
{
return (CMS_UPDATE_ERROR);
--- 437,441 ----
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char *) &x, sizeof (char)))
{
return (CMS_UPDATE_ERROR);
***************
*** 452,456 ****
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (char)))
{
return (CMS_UPDATE_ERROR);
--- 452,456 ----
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char *) x, len * sizeof (char)))
{
return (CMS_UPDATE_ERROR);
***************
*** 468,472 ****
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (char)))
{
return (CMS_UPDATE_ERROR);
--- 468,472 ----
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char *) &x, sizeof (char)))
{
return (CMS_UPDATE_ERROR);
***************
*** 483,487 ****
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (unsigned char)))
{
return (CMS_UPDATE_ERROR);
--- 483,487 ----
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char *) x, len * sizeof (unsigned char)))
{
return (CMS_UPDATE_ERROR);
***************
*** 501,505 ****
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (short)))
{
return (CMS_UPDATE_ERROR);
--- 501,505 ----
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char *) &x, sizeof (short)))
{
return (CMS_UPDATE_ERROR);
***************
*** 517,521 ****
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (short)))
{
return (CMS_UPDATE_ERROR);
--- 517,521 ----
{
/* Check to see if the pointers are in the proper range. */
! if (-1 == check_pointer ((char *) x, len * sizeof (short)))
{
return (CMS_UPDATE_ERROR);
***************
*** 534,538 ****
CMS_STATUS CMS_XDR_UPDATER::update (unsigned short &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (unsigned short)))
{
return (CMS_UPDATE_ERROR);
--- 534,538 ----
CMS_STATUS CMS_XDR_UPDATER::update (unsigned short &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (unsigned short)))
{
return (CMS_UPDATE_ERROR);
***************
*** 551,555 ****
{
if (-1 ==
! check_pointer ((char RCS_HUGE *) x, len * sizeof (unsigned short)))
{
return (CMS_UPDATE_ERROR);
--- 551,555 ----
{
if (-1 ==
! check_pointer ((char *) x, len * sizeof (unsigned short)))
{
return (CMS_UPDATE_ERROR);
***************
*** 571,575 ****
CMS_STATUS CMS_XDR_UPDATER::update (int &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (int)))
{
return (CMS_UPDATE_ERROR);
--- 571,575 ----
CMS_STATUS CMS_XDR_UPDATER::update (int &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (int)))
{
return (CMS_UPDATE_ERROR);
***************
*** 586,590 ****
CMS_STATUS CMS_XDR_UPDATER::update (int *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (int)))
{
return (CMS_UPDATE_ERROR);
--- 586,590 ----
CMS_STATUS CMS_XDR_UPDATER::update (int *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (int)))
{
return (CMS_UPDATE_ERROR);
***************
*** 601,605 ****
CMS_STATUS CMS_XDR_UPDATER::update (unsigned int &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (unsigned int)))
{
return (CMS_UPDATE_ERROR);
--- 601,605 ----
CMS_STATUS CMS_XDR_UPDATER::update (unsigned int &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (unsigned int)))
{
return (CMS_UPDATE_ERROR);
***************
*** 616,620 ****
CMS_STATUS CMS_XDR_UPDATER::update (unsigned int *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (unsigned int)))
{
return (CMS_UPDATE_ERROR);
--- 616,620 ----
CMS_STATUS CMS_XDR_UPDATER::update (unsigned int *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (unsigned int)))
{
return (CMS_UPDATE_ERROR);
***************
*** 637,641 ****
CMS_STATUS CMS_XDR_UPDATER::update (long &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (long)))
{
return (CMS_UPDATE_ERROR);
--- 637,641 ----
CMS_STATUS CMS_XDR_UPDATER::update (long &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (long)))
{
return (CMS_UPDATE_ERROR);
***************
*** 652,656 ****
CMS_STATUS CMS_XDR_UPDATER::update (long *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (long)))
{
return (CMS_UPDATE_ERROR);
--- 652,656 ----
CMS_STATUS CMS_XDR_UPDATER::update (long *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (long)))
{
return (CMS_UPDATE_ERROR);
***************
*** 668,672 ****
CMS_STATUS CMS_XDR_UPDATER::update (unsigned long &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (unsigned long)))
{
return (CMS_UPDATE_ERROR);
--- 668,672 ----
CMS_STATUS CMS_XDR_UPDATER::update (unsigned long &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (unsigned long)))
{
return (CMS_UPDATE_ERROR);
***************
*** 684,688 ****
CMS_STATUS CMS_XDR_UPDATER::update (unsigned long *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (unsigned long)))
{
return (CMS_UPDATE_ERROR);
--- 684,688 ----
CMS_STATUS CMS_XDR_UPDATER::update (unsigned long *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (unsigned long)))
{
return (CMS_UPDATE_ERROR);
***************
*** 704,708 ****
CMS_STATUS CMS_XDR_UPDATER::update (float &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (float)))
{
return (CMS_UPDATE_ERROR);
--- 704,708 ----
CMS_STATUS CMS_XDR_UPDATER::update (float &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (float)))
{
return (CMS_UPDATE_ERROR);
***************
*** 719,723 ****
CMS_STATUS CMS_XDR_UPDATER::update (float *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (float)))
{
return (CMS_UPDATE_ERROR);
--- 719,723 ----
CMS_STATUS CMS_XDR_UPDATER::update (float *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (float)))
{
return (CMS_UPDATE_ERROR);
***************
*** 736,740 ****
CMS_STATUS CMS_XDR_UPDATER::update (double &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (double)))
{
return (CMS_UPDATE_ERROR);
--- 736,740 ----
CMS_STATUS CMS_XDR_UPDATER::update (double &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (double)))
{
return (CMS_UPDATE_ERROR);
***************
*** 751,755 ****
CMS_STATUS CMS_XDR_UPDATER::update (double *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (double)))
{
return (CMS_UPDATE_ERROR);
--- 751,755 ----
CMS_STATUS CMS_XDR_UPDATER::update (double *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (double)))
{
return (CMS_UPDATE_ERROR);
***************
*** 773,777 ****
CMS_STATUS CMS_XDR_UPDATER::update (long double &x)
{
! if (-1 == check_pointer ((char RCS_HUGE *) &x, sizeof (long double)))
{
return (CMS_UPDATE_ERROR);
--- 773,777 ----
CMS_STATUS CMS_XDR_UPDATER::update (long double &x)
{
! if (-1 == check_pointer ((char *) &x, sizeof (long double)))
{
return (CMS_UPDATE_ERROR);
***************
*** 805,809 ****
CMS_STATUS CMS_XDR_UPDATER::update (long double *x, unsigned int len)
{
! if (-1 == check_pointer ((char RCS_HUGE *) x, len * sizeof (long double)))
{
return (CMS_UPDATE_ERROR);
--- 805,809 ----
CMS_STATUS CMS_XDR_UPDATER::update (long double *x, unsigned int len)
{
! if (-1 == check_pointer ((char *) x, len * sizeof (long double)))
{
return (CMS_UPDATE_ERROR);
Index: cms_xup.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cms_xup.hh,v
retrieving revision 4.34.2.1
retrieving revision 4.34.2.2
diff -C2 -d -r4.34.2.1 -r4.34.2.2
*** cms_xup.hh 21 Aug 2003 20:24:14 -0000 4.34.2.1
--- cms_xup.hh 22 Aug 2003 20:06:36 -0000 4.34.2.2
***************
*** 36,40 ****
protected:
! int check_pointer (char RCS_HUGE *, long);
CMS_XDR_UPDATER (CMS *);
virtual ~ CMS_XDR_UPDATER ();
--- 36,40 ----
protected:
! int check_pointer (char *, long);
CMS_XDR_UPDATER (CMS *);
virtual ~ CMS_XDR_UPDATER ();
Index: cmsdiag.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/cmsdiag.hh,v
retrieving revision 4.32
retrieving revision 4.32.2.1
diff -C2 -d -r4.32 -r4.32.2.1
*** cmsdiag.hh 6 Sep 2001 14:32:54 -0000 4.32
--- cmsdiag.hh 22 Aug 2003 20:06:36 -0000 4.32.2.1
***************
*** 7,11 ****
#include "linklist.hh"
! class RCS_EXPORT CMS_DIAG_STATIC_PROC_INFO
{
public:
--- 7,11 ----
#include "linklist.hh"
! class CMS_DIAG_STATIC_PROC_INFO
{
public:
***************
*** 16,20 ****
};
! class RCS_EXPORT CMS_DIAG_PROC_INFO:public CMS_DIAG_STATIC_PROC_INFO
{
public:
--- 16,20 ----
};
! class CMS_DIAG_PROC_INFO:public CMS_DIAG_STATIC_PROC_INFO
{
public:
***************
*** 33,37 ****
};
! class RCS_EXPORT CMS_DIAG_HEADER
{
public:
--- 33,37 ----
};
! class CMS_DIAG_HEADER
{
public:
***************
*** 41,45 ****
! class RCS_EXPORT CMS_DIAGNOSTICS_INFO:public CMS_DIAG_HEADER
{
public:
--- 41,45 ----
! class CMS_DIAGNOSTICS_INFO:public CMS_DIAG_HEADER
{
public:
Index: filemem.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/filemem.cc,v
retrieving revision 4.34
retrieving revision 4.34.2.1
diff -C2 -d -r4.34 -r4.34.2.1
*** filemem.cc 6 May 2003 15:18:14 -0000 4.34
--- filemem.cc 22 Aug 2003 20:06:36 -0000 4.34.2.1
***************
*** 6,19 ****
**********************************************************************/
! /*
! Modification history:
!
! 18-Oct-1996 FMP added fgetpos(), fsetpos() for LynxOS, since it doesn't
! have it
! ??? Will Shackleford created, but who knows when since he doesn't use
! modification histories. Bad boy.
! */
- #include "rcs_defs.hh" // EXTERN_C_STD_HEADERS
#include "filemem.hh" // class FILEMEM
#include "cms.hh" // class CMS
--- 6,15 ----
**********************************************************************/
! #if HAVE_CONFIG_H
! #include "rcs_config_include.h"
! #else
! #include "filemem_no_config.h"
! #endif
#include "filemem.hh" // class FILEMEM
#include "cms.hh" // class CMS
***************
*** 21,90 ****
#include "timer.hh" // etime()
-
- #ifdef HAVE_CONFIG_H
- #include "rcs_config_include.h"
-
- #else
-
- #ifdef EXTERN_C_STD_HEADERS
- extern "C"
- {
- #endif
-
- #include <stdlib.h> // malloc()
- #include <string.h> // strcpy(), strcmp()
- #include <errno.h> // errno
-
-
- #ifdef USE_FCNTL_FILE_LOCKING
- #include <fcntl.h>
- #endif
-
- #if defined(USE_FCNTL_FILE_LOCKING) && defined(FILEMEM_USE_SEMAPHORES)
- #error Can not compile with both defined(USE_FCNTL_FILE_LOCKING && FILEMEM_USE_SEMAPHORES)
- #endif
-
- #if defined(lynxosPC) || defined(sunos4)
-
- // no prototypes for these in LynxOS-- how lame. Let's do them here
-
- #include <stdio.h> /* ftell(), fpos_t */
- #include <unistd.h> // SEEK_SET
-
- static int fgetpos (FILE * stream, fpos_t * ptr);
- static int fsetpos (FILE * stream, const fpos_t * ptr);
-
- // FIXME-- test these!
-
- int fgetpos (FILE * stream, fpos_t * ptr)
- {
- long retval;
-
- retval = ftell (stream);
-
- if (retval == -1L)
- {
- return -1;
- }
- else
- {
- *ptr = (fpos_t) retval;
- return 0;
- }
- }
-
- int fsetpos (FILE * stream, const fpos_t * ptr)
- {
- return fseek (stream, (long) *ptr, SEEK_SET);
- }
-
- #endif
-
- #ifdef EXTERN_C_STD_HEADERS
- }
- #endif
-
- #endif // HAVE_CONFIG_H
-
/* rw-rw-r-- permissions */
#ifndef WIN32
--- 17,20 ----
***************
*** 103,106 ****
--- 33,55 ----
#endif
+ class FILEMEM_NONPORT_INTERNALS
+ {
+ friend class FILEMEM;
+
+ fpos_t last_read_pos;
+ fpos_t last_write_pos;
+ #ifdef FILEMEM_USE_SEMAPHORES
+ key_t key; /* key for sem */
+ RCS_SEMAPHORE *sem; /* semaphore */
+ #endif
+
+ #ifdef USE_FCNTL_FILE_LOCKING
+ struct flock read_lock;
+ struct flock write_lock;
+ int input_fd;
+ int output_fd;
+ #endif
+
+ };
FILEMEM::FILEMEM (char *bufline, char *procline, int set_to_server,
***************
*** 112,115 ****
--- 61,66 ----
char *end_name = (char *) NULL;
+ internals = new FILEMEM_NONPORT_INTERNALS();
+
int master;
master = is_local_master;
***************
*** 148,152 ****
#ifdef FILEMEM_USE_SEMAPHORES
/* Save parameters from configuration file. */
! if (sscanf (bufline, "%*s %*s %*s %*s %*d %*s %*s %*d %d", &key) != 1)
{
rcs_print_error ("FILEMEM: Invalid configuration file format.\n");
--- 99,103 ----
#ifdef FILEMEM_USE_SEMAPHORES
/* Save parameters from configuration file. */
! if (sscanf (bufline, "%*s %*s %*s %*s %*d %*s %*s %*d %d", &internals->key) != 1)
{
rcs_print_error ("FILEMEM: Invalid configuration file format.\n");
***************
*** 250,255 ****
if (is_local_master)
{
! sem = new RCS_SEMAPHORE (key, RCS_SEMAPHORE_CREATE, -1, (int) MODE, 1);
! if (NULL == sem)
{
rcs_print_error ("CMS: couldn't create RCS_SEMAPHORE.\n");
--- 201,206 ----
if (is_local_master)
{
! internals->sem = new RCS_SEMAPHORE (internals->key, RCS_SEMAPHORE_CREATE, -1, (int) MODE, 1);
! if (NULL == internals->sem)
{
rcs_print_error ("CMS: couldn't create RCS_SEMAPHORE.\n");
***************
*** 258,262 ****
return;
}
! if (!sem->valid ())
{
rcs_print_error ("CMS: RCS_SEMAPHORE is invalid.\n");
--- 209,213 ----
return;
}
! if (!internals->sem->valid ())
{
rcs_print_error ("CMS: RCS_SEMAPHORE is invalid.\n");
***************
*** 267,272 ****
else
{
! sem = new RCS_SEMAPHORE (key, RCS_SEMAPHORE_NOCREATE, -1);
! if (NULL == sem)
{
rcs_print_error ("CMS: couldn't create RCS_SEMAPHORE.\n");
--- 218,223 ----
else
{
! internals->sem = new RCS_SEMAPHORE (internals->key, RCS_SEMAPHORE_NOCREATE, -1);
! if (NULL == internals->sem)
{
rcs_print_error ("CMS: couldn't create RCS_SEMAPHORE.\n");
***************
*** 275,279 ****
return;
}
! if (!sem->valid ())
{
rcs_print_error ("CMS: RCS_SEMAPHORE is invalid.\n");
--- 226,230 ----
return;
}
! if (!internals->sem->valid ())
{
rcs_print_error ("CMS: RCS_SEMAPHORE is invalid.\n");
***************
*** 286,291 ****
! fgetpos (in, &last_read_pos);
! fgetpos (out, &last_write_pos);
}
--- 237,242 ----
! fgetpos (in, &internals->last_read_pos);
! fgetpos (out, &internals->last_write_pos);
}
***************
*** 305,323 ****
}
#ifdef FILEMEM_USE_SEMAPHORES
! if (NULL != sem)
{
if (is_local_master || delete_totally)
{
! sem->setflag (RCS_SEMAPHORE_CREATE);
}
else
{
! sem->setflag (RCS_SEMAPHORE_NOCREATE);
}
! delete sem;
! sem = (RCS_SEMAPHORE *) NULL;
}
#endif
!
}
--- 256,278 ----
}
#ifdef FILEMEM_USE_SEMAPHORES
! if (NULL != internals->sem)
{
if (is_local_master || delete_totally)
{
! internals->sem->setflag (RCS_SEMAPHORE_CREATE);
}
else
{
! internals->sem->setflag (RCS_SEMAPHORE_NOCREATE);
}
! delete internals->sem;
! internals->sem = (RCS_SEMAPHORE *) NULL;
}
#endif
! if(internals)
! {
! delete internals;
! internals=0;
! }
}
***************
*** 362,366 ****
{
memset (input_buffer, 0, FILEMEM_INPUT_BUFFER_SIZE);
! fgetpos (in, &last_read_pos);
fgets (input_buffer, FILEMEM_INPUT_BUFFER_SIZE, in);
if (!strncmp (input_buffer, "MSG", 3))
--- 317,321 ----
{
memset (input_buffer, 0, FILEMEM_INPUT_BUFFER_SIZE);
! fgetpos (in, &internals->last_read_pos);
fgets (input_buffer, FILEMEM_INPUT_BUFFER_SIZE, in);
if (!strncmp (input_buffer, "MSG", 3))
***************
*** 423,427 ****
if (!strncmp (input_buffer, "END", 3))
{
! fsetpos (in, &last_read_pos);
unlock_input ();
close_input ();
--- 378,382 ----
if (!strncmp (input_buffer, "END", 3))
{
! fsetpos (in, &internals->last_read_pos);
unlock_input ();
close_input ();
***************
*** 443,463 ****
}
#ifdef FILEMEM_USE_SEMAPHORES
! if (NULL == sem)
{
return -1;
}
! return sem->wait ();
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! input_fd = fileno (in);
! read_lock.l_type = F_RDLCK;
! read_lock.l_start = 0;
! read_lock.l_whence = SEEK_SET;
! read_lock.l_len = 0;
while (1)
{
! switch (fcntl (input_fd, F_SETLK, &read_lock))
{
case -1:
--- 398,418 ----
}
#ifdef FILEMEM_USE_SEMAPHORES
! if (NULL == internals->sem)
{
return -1;
}
! return internals->sem->wait ();
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! internals->input_fd = fileno (in);
! internals->read_lock.l_type = F_RDLCK;
! internals->read_lock.l_start = 0;
! internals->read_lock.l_whence = SEEK_SET;
! internals->read_lock.l_len = 0;
while (1)
{
! switch (fcntl (internals->input_fd, F_SETLK, &internals->read_lock))
{
case -1:
***************
*** 486,496 ****
}
#ifdef FILEMEM_USE_SEMAPHORES
! sem->post ();
return 0;
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! read_lock.l_type = F_UNLCK;
! fcntl (input_fd, F_SETLK, &read_lock);
#endif
return 0;
--- 441,451 ----
}
#ifdef FILEMEM_USE_SEMAPHORES
! internals->sem->post ();
return 0;
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! internals->read_lock.l_type = F_UNLCK;
! fcntl (internals->input_fd, F_SETLK, &internals->read_lock);
#endif
return 0;
***************
*** 506,525 ****
#ifdef FILEMEM_USE_SEMAPHORES
! if (NULL == sem)
{
return -1;
}
! return sem->wait ();
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! output_fd = fileno (out);
! write_lock.l_type = F_WRLCK;
! write_lock.l_start = 0;
! write_lock.l_whence = SEEK_SET;
! write_lock.l_len = 0;
while (1)
{
! switch (fcntl (output_fd, F_SETLK, &write_lock))
{
case -1:
--- 461,480 ----
#ifdef FILEMEM_USE_SEMAPHORES
! if (NULL == internals->sem)
{
return -1;
}
! return internals->sem->wait ();
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! internals->output_fd = fileno (out);
! internals->write_lock.l_type = F_WRLCK;
! internals->write_lock.l_start = 0;
! internals->write_lock.l_whence = SEEK_SET;
! internals->write_lock.l_len = 0;
while (1)
{
! switch (fcntl (internals->output_fd, F_SETLK, &internals->write_lock))
{
case -1:
***************
*** 548,558 ****
}
#ifdef FILEMEM_USE_SEMAPHORES
! sem->post ();
return 0;
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! write_lock.l_type = F_UNLCK;
! fcntl (output_fd, F_SETLK, &write_lock);
#endif
return 0;
--- 503,513 ----
}
#ifdef FILEMEM_USE_SEMAPHORES
! internals->sem->post ();
return 0;
#endif
#ifdef USE_FCNTL_FILE_LOCKING
! internals->write_lock.l_type = F_UNLCK;
! fcntl (internals->output_fd, F_SETLK, &internals->write_lock);
#endif
return 0;
***************
*** 582,586 ****
{
read_cycle = file_cycle;
! fgetpos (in, &last_read_pos);
return;
}
--- 537,541 ----
{
read_cycle = file_cycle;
! fgetpos (in, &internals->last_read_pos);
return;
}
***************
*** 618,622 ****
{
read_cycle = file_cycle;
! fgetpos (in, &last_read_pos);
return;
}
--- 573,577 ----
{
read_cycle = file_cycle;
! fgetpos (in, &internals->last_read_pos);
return;
}
***************
*** 649,653 ****
write_time = etime ();
write_count++;
! fsetpos (out, &last_write_pos);
if (write_count > max_output_messages &&
max_output_messages > 0 && strcmp (outfile_name, "stdout") != 0)
--- 604,608 ----
write_time = etime ();
write_count++;
! fsetpos (out, &internals->last_write_pos);
if (write_count > max_output_messages &&
max_output_messages > 0 && strcmp (outfile_name, "stdout") != 0)
***************
*** 698,702 ****
return (status = CMS_MISC_ERROR);
}
! fgetpos (out, &last_write_pos);
}
--- 653,657 ----
return (status = CMS_MISC_ERROR);
}
! fgetpos (out, &internals->last_write_pos);
}
***************
*** 730,734 ****
last_write_time = write_time;
! fgetpos (out, &last_write_pos);
if (fprintf (out, "\nEND>\n#") < 0)
{
--- 685,689 ----
last_write_time = write_time;
! fgetpos (out, &internals->last_write_pos);
if (fprintf (out, "\nEND>\n#") < 0)
{
Index: filemem.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/filemem.hh,v
retrieving revision 4.33
retrieving revision 4.33.2.1
diff -C2 -d -r4.33 -r4.33.2.1
*** filemem.hh 6 Sep 2001 14:32:54 -0000 4.33
--- filemem.hh 22 Aug 2003 20:06:36 -0000 4.33.2.1
***************
*** 9,66 ****
#define FILEMEM_HH
- #if defined(VXWORKS) || defined(DOS_WINDOWS) || defined(lynxosPC)
- #ifdef USE_FCNTL_FILE_LOCKING
- #undef USE_FCNTL_FILE_LOCKING
- #endif
- #endif
-
- #if !defined(USE_FCNTL_FILE_LOCKING) && !defined(MSDOS)
- #define FILEMEM_USE_SEMAPHORES
- #endif
-
- #include "rcs_defs.hh" // DOS_WINDOWS
#include "cms.hh" // class CMS
- #include <stdio.h> // FILE *, fpos_t
-
- #ifdef FILEMEM_USE_SEMAPHORES
- #include "sem.hh" // class RCS_SEMAPHORE
-
- #if !defined(DOS_WINDOWS) && !defined(VXWORKS)
- #include <sys/types.h> /* key_t */
- #include <sys/ipc.h>
- #include <sys/sem.h>
- #endif
-
- #include <stddef.h> /* size_t */
-
- #ifndef KEY_T_DEFINED
-
- #ifdef VXWORKS
- typedef int key_t; /* key_t is not defined in VxWorks or Windows -- do
- it here, and it should be visible
- throughout all the shared mem code */
- #endif
-
- #ifdef WIN32
- typedef long key_t;
- #endif
- #endif
-
- #endif
-
#define FILEMEM_INPUT_BUFFER_SIZE (2048)
! #ifdef USE_FCNTL_FILE_LOCKING
! #include <sys/fcntl.h>
! #endif
!
! #ifdef sunos4
! // The sunos4 header files say that fgetpos and fsetpos take a pointer to a
! // a long even though ANSI says they should take an fpos_t.
! typedef long fpos_t;
! #endif
class FILEMEM:public CMS
--- 9,20 ----
#define FILEMEM_HH
+ #include <stdio.h> // FILE
#include "cms.hh" // class CMS
#define FILEMEM_INPUT_BUFFER_SIZE (2048)
! class FILEMEM_NONPORT_INTERNALS;
class FILEMEM:public CMS
***************
*** 101,123 ****
int read_cycle;
int add_waits;
! fpos_t last_read_pos;
! fpos_t last_write_pos;
! #ifdef FILEMEM_USE_SEMAPHORES
! key_t key; /* key for sem */
! RCS_SEMAPHORE *sem; /* semaphore */
! #endif
long write_file_length;
- #ifdef USE_FCNTL_FILE_LOCKING
- struct flock read_lock;
- struct flock write_lock;
- int input_fd;
- int output_fd;
- #endif
int lock_input ();
int lock_output ();
int unlock_input ();
int unlock_output ();
-
-
};
--- 55,66 ----
int read_cycle;
int add_waits;
!
! class FILEMEM_NONPORT_INTERNALS *internals;
!
long write_file_length;
int lock_input ();
int lock_output ();
int unlock_input ();
int unlock_output ();
};
Index: nml.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/nml.hh,v
retrieving revision 4.38.2.1
retrieving revision 4.38.2.2
diff -C2 -d -r4.38.2.1 -r4.38.2.2
*** nml.hh 8 Aug 2003 14:21:10 -0000 4.38.2.1
--- nml.hh 22 Aug 2003 20:06:36 -0000 4.38.2.2
***************
*** 14,19 ****
/* Include Files */
- #include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
-
#ifdef EXTERN_C_STD_HEADERS
--- 14,17 ----
***************
*** 39,43 ****
#endif
! class RCS_EXPORT NMLmsg; /* Use only partial definition to avoid */
/* depending on nmlmsg.hh. */
--- 37,41 ----
#endif
! class NMLmsg; /* Use only partial definition to avoid */
/* depending on nmlmsg.hh. */
***************
*** 46,50 ****
/* Typedef for pointer to the function used to decode a message */
/* by its id number. */
! typedef int (*NML_FORMAT_PTR) (NMLTYPE, void RCS_FAR *, CMS RCS_FAR *);
/* Values for NML::error_type. */
--- 44,48 ----
/* Typedef for pointer to the function used to decode a message */
/* by its id number. */
! typedef int (*NML_FORMAT_PTR) (NMLTYPE, void *, CMS *);
/* Values for NML::error_type. */
***************
*** 79,83 ****
/* nml interface to CMS. */
! class RCS_EXPORT NML:public virtual CMS_USER
{
protected:
--- 77,81 ----
/* nml interface to CMS. */
! class NML:public virtual CMS_USER
{
protected:
***************
*** 98,103 ****
int pid;
#ifdef _Windows
! // HANDLE replaced with void RCS_FAR *
! void RCS_FAR *task_handle;
#endif
/* Get Address of message for user after read. */
--- 96,101 ----
int pid;
#ifdef _Windows
! // HANDLE replaced with void *
! void *task_handle;
#endif
/* Get Address of message for user after read. */
***************
*** 249,267 ****
! int RCS_EXPORT create_NML (NML **, NML_FORMAT_PTR f_ptr,
char *buf, char *proc, char *file);
! void RCS_EXPORT free_NML (NML *);
! extern RCS_LINKED_LIST RCS_FAR *NML_Main_Channel_List;
extern "C"
{
! extern void RCS_EXPORT nml_start ();
! extern void RCS_EXPORT nml_cleanup ();
! extern void RCS_EXPORT nml_wipeout_lists ();
! extern void RCS_EXPORT set_default_nml_config_file (const char RCS_FAR *);
! extern const char *RCS_EXPORT get_default_nml_config_file ();
! extern NML *RCS_EXPORT nmlWaitOpen (NML_FORMAT_PTR fPtr, char *buffer,
char *name, char *file,
double sleepTime);
--- 247,266 ----
! int create_NML (NML **, NML_FORMAT_PTR f_ptr,
char *buf, char *proc, char *file);
! void free_NML (NML *);
! extern RCS_LINKED_LIST *NML_Main_Channel_List;
!
extern "C"
{
! extern void nml_start ();
! extern void nml_cleanup ();
! extern void nml_wipeout_lists ();
! extern void set_default_nml_config_file (const char *);
! extern const char *get_default_nml_config_file ();
! extern NML *nmlWaitOpen (NML_FORMAT_PTR fPtr, char *buffer,
char *name, char *file,
double sleepTime);
Index: nml_srv.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/nml_srv.cc,v
retrieving revision 4.35.2.1
retrieving revision 4.35.2.2
diff -C2 -d -r4.35.2.1 -r4.35.2.2
*** nml_srv.cc 8 Aug 2003 14:21:10 -0000 4.35.2.1
--- nml_srv.cc 22 Aug 2003 20:06:36 -0000 4.35.2.2
***************
*** 8,41 ****
*************************************************************************/
! #include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
!
! #ifdef EXTERN_C_STD_HEADERS
! extern "C"
! {
! #endif
!
! #include <string.h> /* memcpy() */
!
! #if defined(WIN32) && !defined(gnuwin32)
! #if defined(WIN32) && !defined(USE_OLD_WINSOCK)
! // Lame problem if windows.h is included before winsock2.h many redefined
! // compiler errors result.
! #include <winsock2.h>
! #endif
- #include <windows.h> /* GetCurrentProcessId(), GetCurrentThreadID() */
#else
! #include <signal.h> /* kill() */
! #include <sys/types.h>
! #include <unistd.h> /* getpid() */
! #include <sys/wait.h> /* waitpid() */
! #include <stdlib.h> /* atexit() */
! #ifdef VXWORKS
! #include <taskLib.h> /* taskIdSelf() */
! #endif
! #endif
!
! #ifdef EXTERN_C_STD_HEADERS
! }
#endif
--- 8,16 ----
*************************************************************************/
! #if HAVE_CONFIG_H
! #include "rcs_config_include.h"
#else
! #include "nml_srv_no_config.h"
#endif
***************
*** 51,54 ****
--- 26,31 ----
#include "timer.hh" // esleep()
#include "dbg_mem.h" // DEBUG_MALLOC, DEBUG_FREE
+
+ #include "cms_clnt_info.hh" // class CMS_CLIENT_INFO
#ifdef CMS_USE_DIAG
Index: nml_srv.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/nml_srv.hh,v
retrieving revision 4.32
retrieving revision 4.32.2.1
diff -C2 -d -r4.32 -r4.32.2.1
*** nml_srv.hh 6 Sep 2001 14:32:55 -0000 4.32
--- nml_srv.hh 22 Aug 2003 20:06:37 -0000 4.32.2.1
***************
*** 11,42 ****
#define NML_SERVER_HH
- #include "rcs_defs.hh" /* EXTERN_C_STD_HEADERS */
-
- #ifdef EXTERN_C_STD_HEADERS
- extern "C"
- {
- #endif
-
- #ifdef WIN32
-
- #if defined(WIN32) && !defined(USE_OLD_WINSOCK)
- /* Lame problem if windows.h is included before winsock2.h many redefined
- compiler errors result. */
- #include <winsock2.h>
- #endif
-
- #include <windows.h>
- #else
-
- #ifndef VXWORKS
- #include <sys/types.h>
- #include <unistd.h> /* pid_t */
- #endif
- #endif
-
- #ifdef EXTERN_C_STD_HEADERS
- }
- #endif
-
#include "cms_srv.hh" /* class CMS_SERVER */
#include "nml.hh" /* class NML */
--- 11,14 ----
***************
*** 45,49 ****
/* Server class */
! class RCS_EXPORT NML_SERVER_LOCAL_PORT:public CMS_SERVER_LOCAL_PORT
{
protected:
--- 17,21 ----
/* Server class */
! class NML_SERVER_LOCAL_PORT:public CMS_SERVER_LOCAL_PORT
{
protected:
***************
*** 69,73 ****
};
! class RCS_EXPORT NML_SERVER:public CMS_SERVER
{
protected:
--- 41,45 ----
};
! class NML_SERVER:public CMS_SERVER
{
protected:
***************
*** 83,87 ****
};
! class RCS_EXPORT NML_SUPER_SERVER
{
public:
--- 55,59 ----
};
! class NML_SUPER_SERVER
{
public:
***************
*** 97,107 ****
};
! extern RCS_EXPORT NML_SUPER_SERVER *NML_Default_Super_Server;
! extern void RCS_EXPORT run_nml_servers ();
! extern void RCS_EXPORT spawn_nml_servers ();
! extern void RCS_EXPORT kill_nml_servers ();
extern "C"
{
! extern void RCS_EXPORT nml_server_cleanup ();
}
--- 69,79 ----
};
! extern NML_SUPER_SERVER *NML_Default_Super_Server;
! extern void run_nml_servers ();
! extern void spawn_nml_servers ();
! extern void kill_nml_servers ();
extern "C"
{
! extern void nml_server_cleanup ();
}
Index: nmlmsg.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/nmlmsg.hh,v
retrieving revision 4.33.2.1
retrieving revision 4.33.2.2
diff -C2 -d -r4.33.2.1 -r4.33.2.2
*** nmlmsg.hh 8 Aug 2003 14:21:10 -0000 4.33.2.1
--- nmlmsg.hh 22 Aug 2003 20:06:37 -0000 4.33.2.2
***************
*** 11,16 ****
#define NMLMSG_HH
- #include "rcs_defs.hh" /* RCS_EXPORT */
-
/* Include Files */
#ifdef EXTERN_C_STD_HEADERS
--- 11,14 ----
***************
*** 26,30 ****
/* Definitions from other Header files. */
! class RCS_EXPORT CMS; /* Use only partial definition to avoid */
/* depending on cms.hh */
--- 24,28 ----
/* Definitions from other Header files. */
! class CMS; /* Use only partial definition to avoid */
/* depending on cms.hh */
***************
*** 42,46 ****
/* Derived classes should pass the type and size to the NMLmsg constructor. */
/* and define their own update function. */
! class RCS_EXPORT NMLmsg
{
protected:
--- 40,44 ----
/* Derived classes should pass the type and size to the NMLmsg constructor. */
/* and define their own update function. */
! class NMLmsg
{
protected:
Index: nmlqr.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/nmlqr.hh,v
retrieving revision 4.32
retrieving revision 4.32.2.1
diff -C2 -d -r4.32 -r4.32.2.1
*** nmlqr.hh 6 Sep 2001 14:32:55 -0000 4.32
--- nmlqr.hh 22 Aug 2003 20:06:37 -0000 4.32.2.1
***************
*** 4,8 ****
#define NMLQR_HH
- #include "rcs_defs.hh"
#include "nml.hh"
#include "nmlmsg.hh"
--- 4,7 ----
***************
*** 18,22 ****
};
! class RCS_EXPORT NML_QUERY_CHANNEL:public NML
{
public:
--- 17,21 ----
};
! class NML_QUERY_CHANNEL:public NML
{
public:
***************
*** 30,34 ****
};
! class RCS_EXPORT NML_ID_CHANNEL:public NML
{
public:
--- 29,33 ----
};
! class NML_ID_CHANNEL:public NML
{
public:
Index: nmltest.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/nmltest.cc,v
retrieving revision 4.37.2.1
retrieving revision 4.37.2.2
diff -C2 -d -r4.37.2.1 -r4.37.2.2
*** nmltest.cc 8 Aug 2003 14:21:10 -0000 4.37.2.1
--- nmltest.cc 22 Aug 2003 20:06:37 -0000 4.37.2.2
***************
*** 9,12 ****
--- 9,13 ----
#include "rcs.hh"
+ #include "inetfile.hh"
#ifdef CMS_USE_DIAG
Index: physmem.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/physmem.cc,v
retrieving revision 4.35
retrieving revision 4.35.2.1
diff -C2 -d -r4.35 -r4.35.2.1
*** physmem.cc 6 May 2003 15:18:15 -0000 4.35
--- physmem.cc 22 Aug 2003 20:06:37 -0000 4.35.2.1
***************
*** 12,64 ****
***********************************************************************/
! #include "rcs_defs.hh" /* __MSDOS__, RCS_FAR, EXTERN_C_STD_HEADERS */
! #include "dbg_mem.h" // DEBUG_MALLOC, DEBUG_FREE
! #ifdef EXTERN_C_STD_HEADERS
! extern "C"
! {
#endif
[...999 lines suppressed...]
int
! PHYSMEM_HANDLE::write_byte_to_genport (BYTE data, ULONG PortNumber)
{
// The following is returned by IOCTL. It is true if the read succeeds.
--- 1048,1052 ----
int
! PHYSMEM_INTERNALS::write_byte_to_genport (BYTE data, ULONG PortNumber)
{
// The following is returned by IOCTL. It is true if the read succeeds.
***************
*** 1018,1019 ****
--- 1083,1088 ----
#endif
+ // USE_GENPORT
+
+ #endif
+ // WIN32 && !gnuwin32
Index: physmem.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/physmem.hh,v
retrieving revision 4.33
retrieving revision 4.33.2.1
diff -C2 -d -r4.33 -r4.33.2.1
*** physmem.hh 6 May 2003 15:18:15 -0000 4.33
--- physmem.hh 22 Aug 2003 20:06:37 -0000 4.33.2.1
***************
*** 15,20 ****
#define PHYSMEM_HH
- #include "rcs_defs.hh" /* _Windows, RCS_FAR, EXTERN_C_STD_HEADERS */
-
#ifdef EXTERN_C_STD_HEADERS
extern "C"
--- 15,18 ----
***************
*** 28,79 ****
#endif
! #ifdef USE_BIT3
! #ifndef USING_BIT3
! #define USING_BIT3
! #endif
! #endif
!
! #ifdef USING_BIT3
! #ifndef USE_BIT3
! #define USE_BIT3
! #endif
! #endif
!
!
! #ifdef WIN16
! #include <windows.h> /* LPBYTE, WORD */
! typedef LPBYTE LOCAL_ADDRESS_TYPE;
! #else
! typedef char RCS_FAR *LOCAL_ADDRESS_TYPE;
! #endif
!
! #if defined(WIN32) && !defined(gnuwin32)
! #if defined(WIN32) && !defined(USE_OLD_WINSOCK)
! /* Lame problem if windows.h is included before winsock2.h many redefined
! compiler errors result. */
! #include <winsock2.h>
! #endif
! #include <windows.h> /* HANDLE */
! #include "mapmem.h" /* PHYSICAL_MEMORY_INFO */
! #include "gpioctl.h" /* GENPORT_WRITE_INPUT */
! #endif
!
! #if defined(USE_BIT3) && defined(WIN32)
! #include "btapi.h"
! #endif
!
! /* ADDRESS TYPE MACROS --
! * Under Windows Pass one of these as the _address_code for
! * PHYSMEM_HANDLE */
! #define NT_ISA_MEM_ADDRESS ((long) 1)
! #define NT_ISA_IO_ADDRESS ((long) 2)
!
! class RCS_EXPORT PHYSMEM_HANDLE
{
public:
PHYSMEM_HANDLE (); /* Constructor for blank handle. */
#if defined(USE_BIT3) && defined(WIN32)
! PHYSMEM_HANDLE (bt_desc_t _btd, unsigned long _btd_offset, long _size,
int _swap_mode);
#endif
--- 26,37 ----
#endif
+ class PHYSMEM_INTERNALS;
! class PHYSMEM_HANDLE
{
public:
PHYSMEM_HANDLE (); /* Constructor for blank handle. */
#if defined(USE_BIT3) && defined(WIN32)
! PHYSMEM_HANDLE (void *_btd_ptr, unsigned long _btd_offset, long _size,
int _swap_mode);
#endif
***************
*** 105,146 ****
char *temp_buf;
unsigned long physical_address;
- LOCAL_ADDRESS_TYPE local_address;
protected:
! #ifdef VXWORKS
! char RCS_FAR *bus_address;
! #endif
! #ifdef WIN16
! WORD selector;
! #endif
! #if defined(WIN32) && !defined(gnuwin32)
! HANDLE hMapMemDriver;
! HANDLE hGenPortDriver;
! PHYSICAL_MEMORY_INFO pmi;
! GENPORT_WRITE_INPUT gpwi;
! WORD ioport;
! int read_from_genport (void *, long);
! int read_dword_from_genport (DWORD *, ULONG);
! int read_word_from_genport (WORD *, ULONG);
! int read_byte_from_genport (BYTE *, ULONG);
! int write_to_genport (void *, long);
! int write_dword_to_genport (DWORD, ULONG);
! int write_word_to_genport (WORD, ULONG);
! int write_byte_to_genport (BYTE, ULONG);
! #endif
- #ifdef lynxosPC
- char smem_name[40];
- #endif
public:
- #if defined(USE_BIT3) && defined(WIN32)
- bt_desc_t btd;
- unsigned long btd_offset;
- int swap_mode;
- bt_msec_t bt_lock_timeout;
- int bt_use_lock;
- bt_error_t bt_status; /* Mirror API return value */
- #endif
int using_bit3;
double total_bytes_moved;
--- 63,73 ----
char *temp_buf;
unsigned long physical_address;
protected:
! class PHYSMEM_INTERNALS *internals;
!
public:
int using_bit3;
double total_bytes_moved;
Index: recvline.c
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/recvline.c,v
retrieving revision 4.38
retrieving revision 4.38.2.1
diff -C2 -d -r4.38 -r4.38.2.1
*** recvline.c 6 May 2003 15:18:15 -0000 4.38
--- recvline.c 22 Aug 2003 20:06:37 -0000 4.38.2.1
***************
*** 9,49 ****
#endif
- #include "rcs_defs.hh" /* _Windows */
-
#include "recvline.h" /* recvline(int, void *, int, double) */
#ifdef HAVE_CONFIG_H
#include "rcs_config_include.h"
-
- #else
-
- #if (!defined(_Windows) && !defined(MSDOS)) || defined(gnuwin32)
- #include <unistd.h> /* select() */
- #include <sys/types.h> /* typedef fd_set, FD_ZERO, FD_SET */
- #include <sys/socket.h> /* recv() */
- #ifndef VXWORKS
- #include <sys/time.h> /* struct timeval */
#else
! #include <sys/times.h> /* struct timeval */
! #endif
! #else
! #ifdef _Windows
! #ifdef USE_OLD_WINSOCK
! #include <winsock.h> /* select(), typedef fd_set, FD_ZERO, FD_SET, struct */
! #else
! #include <winsock2.h>
! #endif
! #else
! #include <tklib.h> /* select(), recv(), typedef fd_set, FD_ZERO, FD_SET */
! #include <tk_errno.h> /* tk_geterrno(), EWOULDBLOCK */
! #endif
#endif
- #include <stddef.h> /* size_t */
- #include <errno.h> /* errno */
- #include <stdlib.h> /* malloc(), free() */
- #include <string.h> /* strerror() */
- #include <math.h> /* modf(), fabs() */
-
- #endif /* HAVE_CONFIG_H */
#include "rcs_prnt.hh" /* rcs_print_error() */
--- 9,19 ----
#endif
#include "recvline.h" /* recvline(int, void *, int, double) */
#ifdef HAVE_CONFIG_H
#include "rcs_config_include.h"
#else
! #include "recvline_no_config.h"
#endif
#include "rcs_prnt.hh" /* rcs_print_error() */
***************
*** 183,187 ****
int *bytes_read_ptr)
{
! #if defined(_Windows)
int error_value = 0;
#endif
--- 153,159 ----
int *bytes_read_ptr)
{
! unsigned long ioctlsocket_arg;
!
! #if defined(_Windows) || defined(WIN32)
int error_value = 0;
#endif
***************
*** 503,508 ****
}
}
! #if defined(WIN32) && !defined(gnuwin32)
! dl_ioctlsocket (fd, FIONREAD, &bytes_ready);
#else
#ifndef VXWORKS
--- 475,482 ----
}
}
! #if defined(WIN32) && !defined(gnuwin32) || defined(WIN32)
! ioctlsocket_arg = (unsigned long ) bytes_ready;
! dl_ioctlsocket (fd, FIONREAD, &ioctlsocket_arg);
! bytes_ready = ioctlsocket_arg;
#else
#ifndef VXWORKS
***************
*** 539,543 ****
if ((nrecv = dl_recv (fd, ptr, bytes_ready, flags)) == -1)
{
! #if (!defined(_WINDOWS) && !defined(MSDOS)) || defined(gnuwin32)
if (errno == EWOULDBLOCK)
{
--- 513,517 ----
if ((nrecv = dl_recv (fd, ptr, bytes_ready, flags)) == -1)
{
! #if (!defined(_WINDOWS) && !defined(WIN32) && !defined(MSDOS)) || defined(gnuwin32)
if (errno == EWOULDBLOCK)
{
***************
*** 563,567 ****
}
#else
! #if defined(_Windows)
error_value = dl_WSAGetLastError ();
if (WSAEWOULDBLOCK != error_value)
--- 537,541 ----
}
#else
! #if defined(_Windows) || defined(WIN32)
error_value = dl_WSAGetLastError ();
if (WSAEWOULDBLOCK != error_value)
Index: rem_msg.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/cms/rem_msg.hh,v
retrieving revision 4.35
retrieving revision 4.35.2.1
diff -C2 -d -r4.35 -r4.35.2.1
*** rem_msg.hh 6 May 2003 15:18:15 -0000 4.35
--- rem_msg.hh 22 Aug 2003 20:06:37 -0000 4.35.2.1
***************
*** 17,28 ****
#define REM_MSG_HH
- #include "rcs_defs.hh" /* RCS_EXPORT, RCS_PASCAL, RCS_FAR */
-
! class RCS_EXPORT CMS_DIAGNOSTICS_INFO;
! struct RCS_EXPORT CMS_HEADER;
! struct RCS_EXPORT REMOTE_CMS_MESSAGE
{
};
--- 17,26 ----
#define REM_MSG_HH
! class CMS_DIAGNOSTICS_INFO;
! struct CMS_HEADER;
! struct REMOTE_CMS_MESSAGE
{
};
***************
*** 52,56 ****
};
! struct RCS_EXPORT REMOTE_CLIENT_ID
{
public:
--- 50,54 ----
};
! struct REMOTE_CLIENT_ID
{
public:
***************
*** 66,70 ****
! struct RCS_EXPORT REMOTE_CMS_REQUEST:public REMOTE_CMS_MESSAGE
{
REMOTE_CMS_REQUEST (REMOTE_CMS_REQUEST_TYPE _type)
--- 64,68 ----
! struct REMOTE_CMS_REQUEST:public REMOTE_CMS_MESSAGE
{
REMOTE_CMS_REQUEST (REMOTE_CMS_REQUEST_TYPE _type)
***************
*** 80,84 ****
};
! struct RCS_EXPORT REMOTE_CMS_REPLY:public REMOTE_CMS_MESSAGE
{
REMOTE_CMS_REPLY ()
--- 78,82 ----
};
! struct REMOTE_CMS_REPLY:public REMOTE_CMS_MESSAGE
{
REMOTE_CMS_REPLY ()
***************
*** 90,94 ****
/* Structure sent by client to server to initiate a read. */
! struct RCS_EXPORT REMOTE_BLOCKING_READ_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_BLOCKING_READ_REQUEST ():REMOTE_CMS_REQUEST
--- 88,92 ----
/* Structure sent by client to server to initiate a read. */
! struct REMOTE_BLOCKING_READ_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_BLOCKING_READ_REQUEST ():REMOTE_CMS_REQUEST
***************
*** 108,112 ****
/* Structure sent by client to server to initiate a read. */
! struct RCS_EXPORT REMOTE_GET_BUF_NAME_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_GET_BUF_NAME_REQUEST ():REMOTE_CMS_REQUEST
--- 106,110 ----
/* Structure sent by client to server to initiate a read. */
! struct REMOTE_GET_BUF_NAME_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_GET_BUF_NAME_REQUEST ():REMOTE_CMS_REQUEST
***************
*** 116,120 ****
};
! struct RCS_EXPORT REMOTE_READ_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_READ_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_READ_REQUEST_TYPE)
--- 114,118 ----
};
! struct REMOTE_READ_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_READ_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_READ_REQUEST_TYPE)
***************
*** 129,142 ****
/* Structure returned by server to client after a read. */
! struct RCS_EXPORT REMOTE_READ_REPLY:public REMOTE_CMS_REPLY
{
int size; /* size of message stored in data. */
long write_id; /* Id from the buffer. */
long was_read; /* Was this message already read? */
! void RCS_FAR *data; /* Location of stored message. */
};
/* Structure returned by server to client after a read. */
! struct RCS_EXPORT REMOTE_GET_BUF_NAME_REPLY:public REMOTE_CMS_REPLY
{
char name[32]; /* Location of stored buffer name (truncated to 31 characters). */
--- 127,140 ----
/* Structure returned by server to client after a read. */
! struct REMOTE_READ_REPLY:public REMOTE_CMS_REPLY
{
int size; /* size of message stored in data. */
long write_id; /* Id from the buffer. */
long was_read; /* Was this message already read? */
! void *data; /* Location of stored message. */
};
/* Structure returned by server to client after a read. */
! struct REMOTE_GET_BUF_NAME_REPLY:public REMOTE_CMS_REPLY
{
char name[32]; /* Location of stored buffer name (truncated to 31 characters). */
***************
*** 145,168 ****
/* Structure returned by server to client after a read. */
! struct RCS_EXPORT REMOTE_BLOCKING_READ_REPLY:public REMOTE_READ_REPLY
{
};
/* Structure sent by client to server to initiate a write. */
! struct RCS_EXPORT REMOTE_WRITE_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_WRITE_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_WRITE_REQUEST_TYPE)
{
! data = NULL;
size = 0;
};
int access_type; /* write or write_if_read */
int size; /* size of message in data */
! void RCS_FAR *data; /* location of message to write into buffer */
void *_nml;
};
/* Structure returned by server to client after a write. */
! struct RCS_EXPORT REMOTE_WRITE_REPLY:public REMOTE_CMS_REPLY
{
long was_read; /* Was the message to be overwriten ever read? */
--- 143,166 ----
/* Structure returned by server to client after a read. */
! struct REMOTE_BLOCKING_READ_REPLY:public REMOTE_READ_REPLY
{
};
/* Structure sent by client to server to initiate a write. */
! struct REMOTE_WRITE_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_WRITE_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_WRITE_REQUEST_TYPE)
{
! data = 0;
size = 0;
};
int access_type; /* write or write_if_read */
int size; /* size of message in data */
! void *data; /* location of message to write into buffer */
void *_nml;
};
/* Structure returned by server to client after a write. */
! struct REMOTE_WRITE_REPLY:public REMOTE_CMS_REPLY
{
long was_read; /* Was the message to be overwriten ever read? */
***************
*** 170,174 ****
};
! struct RCS_EXPORT REMOTE_CHECK_IF_READ_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CHECK_IF_READ_REQUEST ():REMOTE_CMS_REQUEST
--- 168,172 ----
};
! struct REMOTE_CHECK_IF_READ_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CHECK_IF_READ_REQUEST ():REMOTE_CMS_REQUEST
***************
*** 178,187 ****
};
! struct RCS_EXPORT REMOTE_CHECK_IF_READ_REPLY:public REMOTE_CMS_REPLY
{
int was_read;
};
! struct RCS_EXPORT REMOTE_CLEAR_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CLEAR_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_CLEAR_REQUEST_TYPE)
--- 176,185 ----
};
! struct REMOTE_CHECK_IF_READ_REPLY:public REMOTE_CMS_REPLY
{
int was_read;
};
! struct REMOTE_CLEAR_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CLEAR_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_CLEAR_REQUEST_TYPE)
***************
*** 190,198 ****
};
! struct RCS_EXPORT REMOTE_CLEAR_REPLY:public REMOTE_CMS_REPLY
{
};
! struct RCS_EXPORT REMOTE_CLOSE_CHANNEL_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CLOSE_CHANNEL_REQUEST ():REMOTE_CMS_REQUEST
--- 188,196 ----
};
! struct REMOTE_CLEAR_REPLY:public REMOTE_CMS_REPLY
{
};
! struct REMOTE_CLOSE_CHANNEL_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CLOSE_CHANNEL_REQUEST ():REMOTE_CMS_REQUEST
***************
*** 202,211 ****
};
! struct RCS_EXPORT REMOTE_CLOSE_CHANNEL_REPLY:public REMOTE_CMS_REPLY
{
};
! struct RCS_EXPORT REMOTE_GET_KEYS_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_GET_KEYS_REQUEST ():REMOTE_CMS_REQUEST
--- 200,209 ----
};
! struct REMOTE_CLOSE_CHANNEL_REPLY:public REMOTE_CMS_REPLY
{
};
! struct REMOTE_GET_KEYS_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_GET_KEYS_REQUEST ():REMOTE_CMS_REQUEST
***************
*** 216,220 ****
};
! struct RCS_EXPORT REMOTE_GET_KEYS_REPLY:public REMOTE_CMS_REPLY
{
char key1[8];
--- 214,218 ----
};
! struct REMOTE_GET_KEYS_REPLY:public REMOTE_CMS_REPLY
{
char key1[8];
***************
*** 222,226 ****
};
! struct RCS_EXPORT REMOTE_LOGIN_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_LOGIN_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_LOGIN_REQUEST_TYPE)
--- 220,224 ----
};
! struct REMOTE_LOGIN_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_LOGIN_REQUEST ():REMOTE_CMS_REQUEST (REMOTE_CMS_LOGIN_REQUEST_TYPE)
***************
*** 231,235 ****
};
! struct RCS_EXPORT REMOTE_LOGIN_REPLY:public REMOTE_CMS_REPLY
{
int success; // 1 = logged in, 0 = not
--- 229,233 ----
};
! struct REMOTE_LOGIN_REPLY:public REMOTE_CMS_REPLY
{
int success; // 1 = logged in, 0 = not
***************
*** 243,247 ****
};
! struct RCS_EXPORT REMOTE_SET_SUBSCRIPTION_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_SET_SUBSCRIPTION_REQUEST ():REMOTE_CMS_REQUEST
--- 241,245 ----
};
! struct REMOTE_SET_SUBSCRIPTION_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_SET_SUBSCRIPTION_REQUEST ():REMOTE_CMS_REQUEST
***************
*** 254,258 ****
};
! struct RCS_EXPORT REMOTE_SET_SUBSCRIPTION_REPLY:public REMOTE_CMS_REPLY
{
int success; // 1 = logged in, 0 = not
--- 252,256 ----
};
! struct REMOTE_SET_SUBSCRIPTION_REPLY:public REMOTE_CMS_REPLY
{
int success; // 1 = logged in, 0 = not
***************
*** 261,265 ****
! struct RCS_EXPORT REMOTE_CANCEL_SUBSCRIPTION_REQUEST:public REMOTE_CMS_REQUEST
{
REMOTE_CANC...
[truncated message content] |