utils.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 #                                                                              #
00003 #      MJPG-streamer allows to stream JPG frames from an input-plugin          #
00004 #      to several output plugins                                               #
00005 #                                                                              #
00006 #      Copyright (C) 2007 Tom Stöveken                                         #
00007 #                                                                              #
00008 # This program is free software; you can redistribute it and/or modify         #
00009 # it under the terms of the GNU General Public License as published by         #
00010 # the Free Software Foundation; version 2 of the License.                      #
00011 #                                                                              #
00012 # This program is distributed in the hope that it will be useful,              #
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of               #
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
00015 # GNU General Public License for more details.                                 #
00016 #                                                                              #
00017 # You should have received a copy of the GNU General Public License            #
00018 # along with this program; if not, write to the Free Software                  #
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    #
00020 #                                                                              #
00021 *******************************************************************************/
00022 
00023 #define ABS(a) (((a) < 0) ? -(a) : (a))
00024 #ifndef MIN
00025 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
00026 #endif
00027 #ifndef MAX
00028 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
00029 #endif
00030 #define LENGTH_OF(x) (sizeof(x)/sizeof(x[0]))
00031 
00032 /******************************************************************************
00033 Description.: getopt must get reset, otherwise it can only be called once
00034 Input Value.: -
00035 Return Value: -
00036 ******************************************************************************/
00037 static inline void reset_getopt(void)
00038 {
00039     /* optind=1; opterr=1; optopt=63; */
00040 #ifdef __GLIBC__
00041     optind = 0;
00042 #else
00043     optind = 1;
00044 #endif
00045 
00046 #ifdef HAVE_OPTRESET
00047     optreset = 1;
00048 #endif
00049 }
00050 
00051 void daemon_mode(void);


corobot_pantilt
Author(s):
autogenerated on Sun Oct 5 2014 23:18:21