network byte order stuff / added strDup function to Helpers
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.2 1996/08/13 23:13:34 jhill
|
||||
* win NT changes
|
||||
*
|
||||
* Revision 1.1 1996/06/25 19:11:29 jbk
|
||||
* new in EPICS base
|
||||
*
|
||||
@@ -31,6 +34,14 @@
|
||||
#define AIT_NEED_BYTE_SWAP 1
|
||||
#endif
|
||||
|
||||
#ifdef AIT_NEED_BYTE_SWAP
|
||||
#define aitLocalNetworkDataFormatSame 0
|
||||
#else
|
||||
#define aitLocalNetworkDataFormatSame 1
|
||||
#endif
|
||||
|
||||
typedef enum { aitLocalDataFormat=0, aitNetworkDataFormat } aitDataFormat;
|
||||
|
||||
/* all conversion functions have this prototype */
|
||||
typedef void (*aitFunc)(void* dest,const void* src,aitIndex count);
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.7 1996/08/22 21:05:39 jbk
|
||||
* More fixes to make strings and fixed string work better.
|
||||
*
|
||||
* Revision 1.6 1996/08/14 12:30:10 jbk
|
||||
* fixes for converting aitString to aitInt8* and back
|
||||
* fixes for managing the units field for the dbr types
|
||||
@@ -33,11 +36,19 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#ifndef assert // allows use of epicsAssert.h
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
inline char* strDup(const char* x)
|
||||
{
|
||||
char* y = new char[strlen(x)+1];
|
||||
strcpy(y,x);
|
||||
return y;
|
||||
}
|
||||
|
||||
const unsigned NSecPerSec = 1000000000u;
|
||||
const unsigned NSecPerUSec = 1000u;
|
||||
const unsigned SecPerMin = 60u;
|
||||
|
||||
Reference in New Issue
Block a user