Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
abfutil.h
Go to the documentation of this file.
1//***********************************************************************************************
2//
3// Copyright (c) 1993-1999 Axon Instruments.
4// All rights reserved.
5// Permission is granted to freely to use, modify and copy the code in this file.
6//
7//***********************************************************************************************
8//
9// HEADER: ABFUTIL.H Prototypes for functions in ABFUTIL.CPP
10// AUTHOR: BHI Feb 1995
11
12#ifndef INC_ABFUTIL_H
13#define INC_ABFUTIL_H
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include "AxAbffio32.h"
20#include "abfheadr.h"
21
22#if defined(_WINDOWS) && !defined(__MINGW32__)
23UINT WINAPI ABFU_GetTempFileName(LPCSTR szPrefix, UINT uUnique, LPSTR lpTempName);
24#endif
25
26BOOL WINAPI ABFU_ReadFile(FILEHANDLE hFile, LPVOID lpBuf, DWORD dwBytesToRead);
27/*
28BOOL WINAPI ABFU_FormatDouble(double dNum, int nDigits, char *pszString, UINT uSize);
29
30int WINAPI ABFU_FormatHMS( UINT uSeconds, char *pszBuffer, UINT uMaxLen );
31*/
32void WINAPI ABFU_SetABFString(LPSTR psDest, LPCSTR psSrce, int nMaxLength);
33
34void WINAPI ABFU_GetABFString(LPSTR psDest, int nMaxDest, LPCSTR psSrce, int nMaxSrce);
35/*
36BOOL WINAPI ABFU_IsValidSignalName(LPCSTR pszName);
37
38LPCSTR WINAPI ABFU_GetValidSignalNameChars();
39
40void WINAPI ABFU_FixSignalName( LPSTR pszSignalName );
41
42*/
43// Checks the date is Y2K compliant and fixes it if needed.
44long WINAPI ABFU_FixFileStartDate( long lDate );
45
46
47#define ABF_BLANK_FILL(d) (memset((void *)(d), ' ', sizeof(d)))
48#define ABF_SET_STRING(d, s) (ABFU_SetABFString(d, s, sizeof(d)))
49#define ABF_GET_STRING(d, s, n) (ABFU_GetABFString(d, n, s, sizeof(s)))
50/*
51// Assert that an ABF header is writeable - accounting for the header size.
52inline void ABFH_WASSERT( ABFFileHeader * pFH )
53{
54#ifdef _DEBUG
55 UINT uHeaderSize = ABFH_IsNewHeader(pFH) ? ABF_HEADERSIZE : ABF_OLDHEADERSIZE;
56 ASSERT(pFH != NULL && !IsBadWritePtr( pFH, uHeaderSize ));
57 //TRACE1( "ABF Header is writeable (%d bytes).\n", uHeaderSize );
58#endif
59}
60
61// Assert that an ABF header is readable - accounting for the header size.
62inline void ABFH_ASSERT( const ABFFileHeader * pFH )
63{
64#ifdef _DEBUG
65 UINT uHeaderSize = ABFH_IsNewHeader(pFH) ? ABF_HEADERSIZE : ABF_OLDHEADERSIZE;
66 ASSERT(pFH != NULL && !IsBadReadPtr( pFH, uHeaderSize ));
67 //TRACE1( "ABF Header is readable (%d bytes).\n", uHeaderSize );
68#endif
69}
70*/
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif // INC_ABFUTIL_H
void WINAPI ABFU_SetABFString(LPSTR psDest, LPCSTR psSrce, int nMaxLength)
UINT WINAPI ABFU_GetTempFileName(LPCSTR szPrefix, UINT uUnique, LPSTR lpTempName)
BOOL WINAPI ABFU_ReadFile(FILEHANDLE hFile, LPVOID lpBuf, DWORD dwBytesToRead)
long WINAPI ABFU_FixFileStartDate(long lDate)
void WINAPI ABFU_GetABFString(LPSTR psDest, int nMaxDest, LPCSTR psSrce, int nMaxSrce)
int BOOL
Definition unix.h:49
unsigned int UINT
Definition unix.h:47
FILE * FILEHANDLE
Definition unix.h:38
#define WINAPI
Definition unix.h:198
void * LPVOID
Definition unix.h:52
CHAR * LPSTR
Definition unix.h:93
unsigned ABFLONG DWORD
Definition unix.h:45
const CHAR * LPCSTR
Definition unix.h:94