Files
libgphoto2/tests/ddb/ddb-common.h
Hans Ulrich Niedermann cb23f70b2a Use _GPHOTO2_INTERNAL_CODE to compile internal code, put GP_DEBUG there.
* GP_DEBUG now is only available if _GPHOTO2_INTERNAL_CODE is defined.
  * _GPHOTO2_INTERNAL_CODE is defined via AM_CPPFLAGS, so all code should
    be compiled correctly.
  * Users of GP_DEBUG external to the gphoto project should use something
    else.



git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9265 67ed7778-7388-44ab-90cf-0a291f65f57c
2006-10-04 19:08:12 +00:00

87 lines
2.2 KiB
C

/** \file ddb-common.h
* \author Copyright (C) 2006 Hans Ulrich Niedermann
*
* \note
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* \note
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __DDB_TXT_H__
#define __DDB_TXT_H__
#include <stdio.h>
#include <gphoto2/gphoto2-abilities-list.h>
typedef union {
char *str_val;
unsigned int ui_val;
} symtype;
#define YYSTYPE symtype
extern int yylineno;
void
yyerror (const char *filename, CameraAbilitiesList *al,
const char *str);
int
yyparse (const char *filenname, CameraAbilitiesList *al);
#define YYLTYPE my_yyltype
typedef struct {
int lineno;
int column;
const char *filename;
} FilePosition;
typedef struct YYLTYPE {
FilePosition begin, end;
} YYLTYPE;
#define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (N) \
{ \
(Current).begin.lineno = YYRHSLOC(Rhs, 1).begin.lineno; \
(Current).begin.column = YYRHSLOC(Rhs, 1).begin.column; \
(Current).end.lineno = YYRHSLOC(Rhs, N).end.lineno; \
(Current).end.lineno = YYRHSLOC(Rhs, N).end.column; \
} \
else \
{ \
(Current).begin.lineno = (Current).end.lineno = \
YYRHSLOC(Rhs, 0).end.lineno; \
(Current).begin.column = (Current).end.column = \
YYRHSLOC(Rhs, 0).end.column; \
} \
while (0)
#define YY_DECL int yylex (void)
YY_DECL;
/* #define YYLEX_PARAM void */
// #define YYDEBUG 1
extern FILE *yyin;
void lexer_reset(const char *_filename);
#endif /* !__DDB_TXT_H__ */