stage4/stage4.cc
changeset 594 c8092e909886
parent 580 b6350d9f204d
child 596 4efb11e44065
equal deleted inserted replaced
593:412780374bd3 594:c8092e909886
   134     indent_spaces.erase(indent_spaces.length() - indent_level.length(), indent_level.length());
   134     indent_spaces.erase(indent_spaces.length() - indent_level.length(), indent_level.length());
   135   else
   135   else
   136     indent_spaces.erase();
   136     indent_spaces.erase();
   137 }
   137 }
   138 
   138 
   139 
   139 void *stage4out_c::print(           std::string value) {if (!allow_output) return NULL; *out << value; return NULL;}
   140 void *stage4out_c::print(const char *str) {
   140 void *stage4out_c::print(           const char *value) {if (!allow_output) return NULL; *out << value; return NULL;}
   141   if (!allow_output) return NULL;
   141 //void *stage4out_c::print(               int64_t value) {if (!allow_output) return NULL; *out << value; return NULL;}
   142   *out << str;
   142 //void *stage4out_c::print(              uint64_t value) {if (!allow_output) return NULL; *out << value; return NULL;}
   143   return NULL;
   143 void *stage4out_c::print(              real64_t value) {if (!allow_output) return NULL; *out << value; return NULL;}
   144 }
   144 void *stage4out_c::print(                   int value) {if (!allow_output) return NULL; *out << value; return NULL;}
   145 
   145 void *stage4out_c::print(              long int value) {if (!allow_output) return NULL; *out << value; return NULL;}
   146 void *stage4out_c::print_integer(int integer) {
   146 void *stage4out_c::print(         long long int value) {if (!allow_output) return NULL; *out << value; return NULL;}
   147   if (!allow_output) return NULL;
   147 void *stage4out_c::print(unsigned           int value) {if (!allow_output) return NULL; *out << value; return NULL;}
   148   *out << integer;
   148 void *stage4out_c::print(unsigned      long int value) {if (!allow_output) return NULL; *out << value; return NULL;}
   149   return NULL;
   149 void *stage4out_c::print(unsigned long long int value) {if (!allow_output) return NULL; *out << value; return NULL;}
   150 }
   150 
   151 
   151 
   152 void *stage4out_c::print_long_integer(unsigned long l_integer, bool suffix) {
   152 void *stage4out_c::print_long_integer(unsigned long l_integer, bool suffix) {
   153   if (!allow_output) return NULL;
   153   if (!allow_output) return NULL;
   154   *out << l_integer;
   154   *out << l_integer;
   155   if (suffix) *out << "UL";
   155   if (suffix) *out << "UL";
   161   *out << ll_integer;
   161   *out << ll_integer;
   162   if (suffix) *out << "ULL";
   162   if (suffix) *out << "ULL";
   163   return NULL;
   163   return NULL;
   164 }
   164 }
   165 
   165 
   166 void *stage4out_c::print_int64(int64_t integer) {
       
   167   if (!allow_output) return NULL;
       
   168   *out << integer;
       
   169   return NULL;
       
   170 }
       
   171 
       
   172 void *stage4out_c::print_uint64(uint64_t integer) {
       
   173   if (!allow_output) return NULL;
       
   174   *out << integer;
       
   175   return NULL;
       
   176 }
       
   177 
       
   178 void *stage4out_c::print_real64(real64_t integer) {
       
   179   if (!allow_output) return NULL;
       
   180   *out << integer;
       
   181   return NULL;
       
   182 }
       
   183 
   166 
   184 void *stage4out_c::printupper(const char *str) {
   167 void *stage4out_c::printupper(const char *str) {
   185   if (!allow_output) return NULL;
   168   if (!allow_output) return NULL;
   186   for (int i = 0; str[i] != '\0'; i++)
   169   for (int i = 0; str[i] != '\0'; i++)
   187     *out << (unsigned char)toupper(str[i]);
   170     *out << (unsigned char)toupper(str[i]);
   211     else
   194     else
   212       *out << (unsigned char)toupper(str[i]);
   195       *out << (unsigned char)toupper(str[i]);
   213   return NULL;
   196   return NULL;
   214 }
   197 }
   215 
   198 
   216 
       
   217 void *stage4out_c::print(std::string str) {
       
   218   if (!allow_output) return NULL;
       
   219   *out << str;
       
   220   return NULL;
       
   221 }
       
   222 
   199 
   223 
   200 
   224 void *stage4out_c::printupper(std::string str) {
   201 void *stage4out_c::printupper(std::string str) {
   225   if (!allow_output) return NULL;
   202   if (!allow_output) return NULL;
   226   /* The string standard class does not have a converter member function to upper case.
   203   /* The string standard class does not have a converter member function to upper case.