--- libaitpelco/src/aitpelco.c 2012/07/22 22:21:50 1.3 +++ libaitpelco/src/aitpelco.c 2013/05/30 09:20:16 1.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitpelco.c,v 1.3 2012/07/22 22:21:50 misho Exp $ +* $Id: aitpelco.c,v 1.4 2013/05/30 09:20:16 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -56,21 +56,21 @@ static char pelco_Error[STRSIZ]; // // pelco_GetErrno() Get error code of last operation -inline int +int pelco_GetErrno() { return pelco_Errno; } // pelco_GetError() Get error text of last operation -inline const char * +const char * pelco_GetError() { return pelco_Error; } // pelco_SetErr() Set error to variables for internal use!!! -inline void +void pelcoSetErr(int eno, char *estr, ...) { va_list lst; @@ -90,7 +90,7 @@ pelcoSetErr(int eno, char *estr, ...) * @camNo = Packet for camera number address * return: NULL error, !=NULL ok, allocated memory for packet */ -inline void * +void * pelcoOpen(u_char pelcoVer, u_char camNo) { pelco_d_t *pd; @@ -143,7 +143,7 @@ pelcoOpen(u_char pelcoVer, u_char camNo) * pelcoClose() Close packet record and free memory * @p = Packet structure for close */ -inline void +void pelcoClose(void * __restrict p) { if (p) @@ -155,7 +155,7 @@ pelcoClose(void * __restrict p) * @buffer = Pelco packet from input buffer * return: NULL error, !=NULL ok, allocated memory for packet */ -inline void * +void * pelcoLoad(u_char *buffer) { pelco_d_t *pd; @@ -208,7 +208,7 @@ pelcoLoad(u_char *buffer) * @data[2] = Input Data for commands 1 & 2 * return: 0xFF - error, 0 - ok */ -inline u_char +u_char pelcoAddCmdData(void * __restrict p, u_char * __restrict cmd, u_char * __restrict data) { u_char ret = 0; @@ -261,7 +261,7 @@ pelcoAddCmdData(void * __restrict p, u_char * __restri * @data[2] = Output Data for commands 1 & 2 * return: 'd' - PelcoD, 'p' - PelcoP, 0 - unknown or bad packet */ -inline u_char +u_char pelcoGetCmdData(void * __restrict p, u_char * __restrict cmd, u_char * __restrict data) { return pelco_GetCamCmdData(p, NULL, cmd, data); @@ -273,7 +273,7 @@ pelcoGetCmdData(void * __restrict p, u_char * __restri * @correct = Calculate new check sum if incorrect !=0, if ==0 only check * return: 0xFF - bad packet, 1 invalid check sum, 0 check sum is correct. */ -inline u_char +u_char pelcoChkSum(void * __restrict p, u_char correct) { u_char sum, *ptr = p;