File: common-defs.h

package info (click to toggle)
kbdd 0.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 272 kB
  • sloc: ansic: 1,226; makefile: 43; xml: 29; sh: 3
file content (54 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef INCLUDE_COMMON_DEFS_H
#define INCLUDE_COMMON_DEFS_H

/********************************************************************* 
 * Kbdd - simple per-window-keyboard layout library and deamon 
 * Copyright (C) 2010  Alexander V Vershilov and collaborators
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/

// common settings for all KBDD source files
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef DEBUG
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
//void current() {
//    size_t s=strftime(_tout,12,"[%H:%M:%S]",localtime(NULL));
//    _tout[s+1] = NULL;
//}
#define dbg(fmtstr,args...) \
    do { \
     /*char _tout[64]; \
     time_t * _tmt = time(NULL); \
     struct tm _tm = localtime(_tmt); \
     size_t s=strftime((char *)&_tout,12,"[%H:%M:%S]",&_tm); \
     _tout[s+1] = NULL; \
     printf("%s %s " fmtstr "\n",(char *)_tout,__func__,##args);*/ \
     printf(fmtstr "\n",##args); \
     } while (0)
#else
#define dbg(dummy...)
#endif

#define DEFAULT_FST_LAYOUT 0
#define DEFAULT_SND_LAYOUT 1

#endif

//vim:ts=4:expandtab