3 * This file is part of AnonAccess, an access system which can be used
4 * to open door or doing other things with an anonymity featured
6 * Copyright (C) 2006, 2007, 2008, 2009 Daniel Otte (daniel.otte@rub.de)
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 * email: daniel.otte@rub.de
32 #include <avr/pgmspace.h>
34 /******************************************************************************/
36 uint8_t dbz_strcount(const char* str){
38 if(*str=='\0' && *(str+1)=='\0')
49 /******************************************************************************/
51 void dbz_splitup(char* dbzstr, char** strings){
52 if(*dbzstr=='\0' && *(dbzstr+1)=='\0')
64 /******************************************************************************/
66 uint8_t dbz_strcount_P(PGM_P str){
68 if(pgm_read_byte(str)=='\0' && pgm_read_byte(str+1)=='\0')
71 while(pgm_read_byte(str++))
73 if(pgm_read_byte(str)=='\0')
79 /******************************************************************************/
81 void dbz_splitup_P(PGM_P dbzstr, PGM_P* strings){
82 if(pgm_read_byte(dbzstr)=='\0' && pgm_read_byte(dbzstr+1)=='\0')
86 while(pgm_read_byte(dbzstr++))
88 if(pgm_read_byte(dbzstr)=='\0')
94 /******************************************************************************/