1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-04 02:00:04 +00:00

Update to latest bitbake

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2006-03-20 17:45:11 +00:00
parent 3cd47ad235
commit b26a945734
29 changed files with 4868 additions and 410 deletions
+18 -5
View File
@@ -24,13 +24,24 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef TOKEN_H
#define TOKEN_H
#include <ctype.h>
#include <string.h>
#define PURE_METHOD
/**
* Special Value for End Of File Handling. We set it to
* 1001 so we can have up to 1000 Terminal Symbols on
* grammar. Currenlty we have around 20
*/
#define T_EOF 1001
struct token_t {
const char* string()const PURE_METHOD;
static char* concatString(const char* l, const char* r);
void assignString(const char* str);
void assignString(char* str);
void copyString(const char* str);
void release_this();
@@ -51,15 +62,17 @@ inline const char* token_t::string()const
inline char* token_t::concatString(const char* l, const char* r)
{
size_t cb = (l ? strlen (l) : 0) + strlen (r) + 1;
r_sz = new char[cb];
char *r_sz = new char[cb];
*r_sz = 0;
if (l) strcat (r_sz, l);
if (l)
strcat (r_sz, l);
strcat (r_sz, r);
return r_sz;
}
inline void token_t::assignString(const char* str)
inline void token_t::assignString(char* str)
{
m_string = str;
m_stringLen = str ? strlen(str) : 0;
@@ -70,7 +83,7 @@ inline void token_t::copyString(const char* str)
if( str ) {
m_stringLen = strlen(str);
m_string = new char[m_stringLen+1];
strcpy(m_string, str)
strcpy(m_string, str);
}
}