]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
added cplusplus support into all .h files
authorLudwig Maier <lmaier@zardoz.e12.ph.tum.de>
Fri, 29 Nov 2013 15:49:29 +0000 (16:49 +0100)
committerLudwig Maier <lmaier@zardoz.e12.ph.tum.de>
Fri, 29 Nov 2013 15:49:29 +0000 (16:49 +0100)
21 files changed:
allParam/include/allParam.h
hadaq/Makefile.am
hadaq/Makefile.in
hadaq/ansiTape.h
hadaq/args.h
hadaq/ctu.h
hadaq/debug.h
hadaq/evt.h
hadaq/genid32.h
hadaq/hadtu.h
hadaq/hadtuqueue.h
hadaq/hardware.h
hadaq/hldread.h
hadaq/logger.h
hadaq/nettrans.h
hadaq/psxshm.h
hadaq/resdata.h
hadaq/shmtrans.h
hadaq/stats.h
hadaq/subevt.h
hadaq/worker.h

index a022ddb14927e91558fef0f8f869ef11c4b5c443..dd19a84cf755017c33915d527f5f74126352413b 100644 (file)
@@ -1,19 +1,17 @@
 #ifndef ALLPARAM_H
 #define ALLPARAM_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
 #include <stdio.h>
-#ifdef __cplusplus
-}
-#endif
 
 /* limitations */
 #define PARAM_MAX_ARRAY_LEN 128
 #define PARAM_MAX_VALUE_LEN 128
 #define PARAM_MAX_NAME_LEN 128
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* class */
 typedef struct ParamS {
        char *basedir;
@@ -59,4 +57,8 @@ void Param_clearCache(const Param *param);
 
 const char *Param_getErrStr(const Param *param);
 
+
+#ifdef __cplusplus
+}
+#endif
 #endif                                                 /* !ALLPARAM_H */
index 18204ece9db4ff6e63a5f49fc11baea6aa9a9782..4e561329541abf999879044d3e6f935e7faba54d 100644 (file)
@@ -37,7 +37,7 @@ libhadaq_a_SOURCES = readout.c\
        shmtrans.c hadtuqueue.c \
                psxshm.c \
                hadtu.c
-include_HEADERS = worker.h subevt.h shmtrans.h hadtuqueue.h psxshm.h hadtu.h \
+include_HEADERS = worker.h evt.h subevt.h shmtrans.h hadtuqueue.h psxshm.h hadtu.h \
        hardware.h
 
 daq_xmanage_SOURCES = tcldaq.c tkAppInit.c \
index f92a8b5de584aa2708837a158fc014b3c0ed554d..a57a4267cf55c531b16ec5f856913e62c80d28b1 100644 (file)
@@ -311,7 +311,7 @@ libhadaq_a_SOURCES = readout.c\
                psxshm.c \
                hadtu.c
 
-include_HEADERS = worker.h subevt.h shmtrans.h hadtuqueue.h psxshm.h hadtu.h \
+include_HEADERS = worker.h evt.h subevt.h shmtrans.h hadtuqueue.h psxshm.h hadtu.h \
        hardware.h
 
 daq_xmanage_SOURCES = tcldaq.c tkAppInit.c \
index dbbc1b4b7ab885ced6bcc37e4ac49763a6593c9c..f1c5509dcc0a981365dc0afb4623a1bf7633f3aa 100644 (file)
@@ -1,7 +1,10 @@
-
 #ifndef ANSITAPE_H
 #define ANSITAPE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BLOCKSIZE 8192
 
 typedef struct AnsiTapeS {
@@ -22,4 +25,7 @@ AnsiTape *openAnsiTape(const char *, const char *);
 int writeAnsiTape(AnsiTape *, const char *, size_t);
 int closeAnsiTape(AnsiTape *);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 5b6343ced2132a546397fda980dac2fccf4810d4..3115316cf8d04496c8d31be0dba4f00105c1631b 100644 (file)
@@ -7,6 +7,10 @@
 
 #include <allParam.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct TheArgsS {
         char progName[PARAM_MAX_VALUE_LEN];
        unsigned long nrOfMsgs;
@@ -87,4 +91,7 @@ int Args_fromParam(TheArgs *my, int argc, char *argv[]);
 void Args_dump(TheArgs *my);
 int Args_prefixCode(TheArgs *my);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index a10a8fb19e39e0b78a168f13cd97f228370e421a..4a12f76c3c7f0070bc145a5df478fec3b592b8cb 100644 (file)
 #define MEM_RESET      0x38
 #define MAGIC          0x3c
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct CtuS {
        volatile uint8_t *base;
        uint16_t internalTrigNr;
@@ -233,4 +237,7 @@ static void desCtu(Ctu * my)
        return_controller((unsigned long) my->base, 0x10000UL);
 }
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index f6932cae0b2efa791c4be1ea7aeb10bbfbc5e76a..de978c286aa88bb362b6d1c2890e29fefa4456da 100644 (file)
@@ -8,6 +8,10 @@
 #define MAXDEBUGEVTS 20
 #define MAXINPATH 100
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct TheDebugS {
        unsigned long *evtsBroken[MAXINPATH];
        unsigned long evtsBrokenS[MAXINPATH][MAXDEBUGEVTS];
@@ -31,5 +35,7 @@ void Debug_print(TheArgs *theArgs, TheStats *theStats, TheDebug * theDebug);
 void Debug_printBrokenTrigMismatch(TheArgs *theArgs, TheStats *theStats);
 void Debug_printPopTrigMismatch(TheArgs *theArgs, TheStats *theStats, TheDebug * theDebug, int qi);
 
-
+#ifdef __cplusplus
+}
+#endif
 #endif
index 5f0577e8dcd9deafa5f06713a02358833dc0d833..0cc2a87c06197e8d1bd49ce94db86ad723d7d1d8 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef EVT_H
 #define EVT_H
 
@@ -6,12 +5,15 @@
 #include <time.h>
 #include <stdint.h>
 
-
 #include "hadtu.h"
 #include "subevt.h"
 
 #define EVT_MAXSIZE (1024 * 1024)
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static const int evtBlockSize = 8 * 1024;
 
 enum EvtId {
@@ -89,4 +91,7 @@ void deleteEvt(void *my);
 void *Evt_fget(FILE *file);
 void *Evt_appendSubEvt(void *my, void *subEvt);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index b34cb8a0e32dd9b1da899240165662248e4e120d..f4cda778df7dda33c5c72f19768de140b91256ce 100644 (file)
@@ -1,9 +1,15 @@
-
 #ifndef GENID32_H
 #define GENID32_H
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 uint32_t genId32(void);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index f7c08782f2222275d4e3585e9e2d939859f57e42..dfaad94aa40e856a9a4b5d43b6170d9f964234ac 100644 (file)
@@ -1,10 +1,12 @@
-
 #ifndef HADTU_H
 #define HADTU_H
 
 #include <stddef.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 enum HadTu_Decoding {
        HadTu_queueDecoding = 3 << 16 | 99
@@ -153,4 +155,7 @@ static void *HadTu_next(const void *my, const void *hadTu)
        return (void *) ((char *) hadTu + paddedSize);
 }
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 5f44bfc2ea60170872e365988f6ae878df367f50..30462a0d4290852fa2f612593a88ae552d73fccb 100644 (file)
@@ -1,10 +1,13 @@
-
 #ifndef HADTUQUEUE_H
 #define HADTUQUEUE_H
 
 #include <stddef.h>
 #include "hadtu.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct HadTuQueueS HadTuQueue;
 
 typedef enum HadTuQueueProtE {
@@ -28,4 +31,7 @@ void *HadTuQueue_2voidP(const HadTuQueue *my);
 void *HadTuQueue_front(const HadTuQueue *my);
 void HadTuQueue_pop(HadTuQueue *my);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 420a0dda6c4df26ef9292b4cdfafe19aeebe46ef..b48b010bc2b6c9e046f7dec0135e7f2f563f9e73 100644 (file)
@@ -1,9 +1,12 @@
-
 #ifndef HARDWARE_H
 #define HARDWARE_H
 
 #include <syslog.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct HardwareS Hardware;
 
 int readoutMain(int argc, char *argv[]);
@@ -68,4 +71,7 @@ static int getCards(Param *param, const char *subsystem, const char *cardtype, i
        return getCardsR;
 }
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index f6404365775bc61fe55bf08aa7d02cc63ed21fd9..e9ee7bec9193903b9ca95d68261c510e65287785 100644 (file)
@@ -1,11 +1,18 @@
-
 #ifndef HLDREAD_H
 #define HLDREAD_H
 
 #include "evt.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int startAnalysis(int argc, char **argv);
 int analyseEvt(void *evt);
 int stopAnalysis(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 9ad5afb8c596fc3bd7cd1f4cf138e6077bb70131..8b8c95ab57724aa97386e7a7907e5d1fd9f43669 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef LOGGER_H
 #define LOGGER_H
 
@@ -6,10 +5,17 @@
 #include "stats.h"
 #include "worker.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void storeLogInfo(TheArgs *theArgs, const char *msg);
 void storeRunInfoStart(time_t t, TheArgs *myArgs);
 void storeRunInfoStop(time_t t, TheArgs *myArgs, TheStats *myStats);
 void storeInfoStart(const char *n, time_t t, TheArgs *my);
 void storeInfoStop(const char *n, time_t t, Worker *w, TheArgs *my);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index a37e5bc02ae3a881a2213cba83848f00c791460e..1471daeaf725b528fd34e89d6dbdbdcaa381f80b 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef NETTRANS_H
 #define NETTRANS_H
 
@@ -10,6 +9,10 @@
 #include "worker.h"
 #include "hadtu.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum NetTransTypeE {
        NetTransType_invalid,
        NetTransType_udp
@@ -49,4 +52,7 @@ void NetTrans_recv(NetTrans *my, void *hadTu, size_t size);
 unsigned long NetTrans_multiRecv(NetTrans *my[], void *hadTu[], size_t size[], int nrOfMsgs);
 void NetTrans_multiReceive(NetTrans *my[], fd_set *fdSet, int nrOfMsgs);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index d350cf0a293e3c360bf128153699d002363e1953..bed0202b122dc4b1eba8ccbaeaab2f2d0676ee65 100644 (file)
@@ -1,9 +1,12 @@
-
 #ifndef PSXSHM_H
 #define PSXSHM_H
 
 #include <sys/types.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct PsxShmS {
        int fd;
        void *addr;
@@ -16,4 +19,7 @@ PsxShm *PsxShm_open(const char *name, int oflag, mode_t mode, off_t size);
 int PsxShm_close(PsxShm *my);
 int PsxShm_unlink(const char *name);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 32b4854763e24fe0c6e008c4772ec21b6e0b21d2..20b7dc0d2dd79bcb044a033b0990940875f69d78 100644 (file)
@@ -8,10 +8,17 @@
 
 #define EVENT_NUM_OFFSET 100
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int Res_openFile(TheArgs *theArgs, time_t res_time);
 int Res_writeFile(void *evt, uint32_t runNr, uint32_t seqNr);
 int Res_closeFile(TheArgs *theArgs);
 int Res_smartThreshold(TheArgs *theArgs, TheStats *theStats);
 int remove_file(char *path);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 0069af4a8eaf86e1cc0113c64d9a1561acd9ab9a..756e22c46fbb5f8d04a0a5c9e2133fd650e20eec 100644 (file)
 #define _POSIX_PATH_MAX 255
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct ShmTransS {
        char name[_POSIX_PATH_MAX];
        PsxShm *shm;
@@ -44,4 +48,7 @@ void ShmTrans_requestData(ShmTrans *my);
 void ShmTrans_free(ShmTrans *my);
 void ShmTrans_freeWhole(ShmTrans *my);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index f03f8bf2105fa545f07812121ba9a4c940df928b..18a566f9187f7aa22572e3b48d5a35dd4d43b36d 100644 (file)
 #define NEVTIDS 64UL                   /* must be 2^n */
 #define ERRBITPTRNMAX 5
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct TheStatsS {
        unsigned long *evtsDiscarded;
        unsigned long *evtsComplete;
@@ -46,4 +50,7 @@ void Stats_coreAffinity(TheStats *theStats, int interval);
 void Stats_buffFillLvls(TheArgs *theArgs, TheStats *my, float interval, ShmTrans **shmtr);
 void Stats_dump(TheArgs *theArgs, TheStats *my, int interval);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 16960a27bfe23c6f7c2d92ea6d1604d48da5b40a..4988b4b37d5e5c80d70e87fb5c0d46860609a9ea 100644 (file)
@@ -1,12 +1,14 @@
-
 #ifndef SUBEVT_H
 #define SUBEVT_H
 
 #include <stdint.h>
 
-
 #include "hadtu.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum SubEvtId {
        SubEvtId_invalid = 0,
        SubEvtId_test1 = 1,
@@ -138,4 +140,7 @@ void *newSubEvt(uint32_t decoding, uint32_t id, uint32_t trigNr);
 void deleteSubEvt(void *my);
 void *SubEvt_appendData(void *my, const void *data, size_t size);
 
+#ifdef __cplusplus
+}
+#endif
 #endif
index 4b0108c99611b124e06e6f0c1d19feccd69100d9..4841ad0f10ee070b32af58372f571aca489a5f10 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef WORKER_H
 #define WORKER_H
 
@@ -10,6 +9,10 @@
 #define WORKER_MAX_NUM_STATS 850
 #define WORKER_MAX_NAME_LEN 32
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct StatisticS {
        char name[WORKER_MAX_NAME_LEN];
        unsigned long value;
@@ -47,4 +50,7 @@ void Worker_dump(Worker *my, time_t interval);
 int Worker_getStatistic(const char *name, const char *stat, unsigned long int *value);
 int Worker_setStatistic(const char *name, const char *stat, unsigned long int *value);
 
+#ifdef __cplusplus
+}
+#endif
 #endif