Branch: Tag:

2018-02-22

2018-02-22 16:57:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use directive_* function for #pragma.

Improves code readablility somewhat.

920:    *! Disable disassembly output (default).    *! @endstring   */ +  PIKEFUN string(0..0) directive_pragma(int flags, string line) +  { +  struct CPP_struct *this = THIS;    -  +  if (OUTP()) { +  /* FIXME: Prefix with this->prefix? */ +  string_builder_strcat(&this->buf, "#pragma "); +  +  ref_push_string(line); +  push_int(flags); +  apply_current(f_CPP_low_cpp_fun_num, 2); +  pop_stack(); +  } +  +  push_empty_string(); +  } +    /*! @decl int(0..1) defined(mixed identifier)    *!    *! Check whether an identifier is a cpp macro or not.
4113:    }    case 'p': /* pragma */    { -  -  if(GOBBLE_WORD(pragma_)) -  { -  if(OUTP()) -  string_builder_strcat(&this->buf, "#pragma"); -  else -  FIND_EOL(); -  break; -  } +     if(GOBBLE_WORD(pike_))    {    if(OUTP())