/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
#ifndef FIRM_BE_BEEMITTER_H
#define FIRM_BE_BEEMITTER_H
-#include "firm_config.h"
-
#include <stdio.h>
#include <stdarg.h>
#include "firm_types.h"
/* don't use the following vars directly, they're only here for the inlines */
extern FILE *emit_file;
extern struct obstack emit_obst;
-extern int emit_linelength;
/**
* Emit a character to the (assembler) output.
*
* @param env the emitter environment
*/
-static INLINE void be_emit_char(char c)
+static inline void be_emit_char(char c)
{
obstack_1grow(&emit_obst, c);
- emit_linelength++;
}
/**
* @param str the string
* @param l the length of the given string
*/
-static INLINE void be_emit_string_len(const char *str, size_t l)
+static inline void be_emit_string_len(const char *str, size_t l)
{
obstack_grow(&emit_obst, str, l);
- emit_linelength += l;
}
/**
* @param env the emitter environment
* @param str the null-terminated string
*/
-static INLINE void be_emit_string(const char *str)
+static inline void be_emit_string(const char *str)
{
size_t len = strlen(str);
be_emit_string_len(str, len);
* @param str the null-terminated string constant
*/
#define be_emit_cstring(str) \
- do { be_emit_string_len(str, sizeof(str)-1); } while(0)
+ be_emit_string_len(str, sizeof(str) - 1)
/**
* Initializes an emitter environment.