Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include
File: autosprintf.h
/* Class autosprintf - formatted output to an ostream.
[0] Fix | Delete
Copyright (C) 2002, 2012-2016 Free Software Foundation, Inc.
[1] Fix | Delete
[2] Fix | Delete
This program is free software: you can redistribute it and/or modify
[3] Fix | Delete
it under the terms of the GNU Lesser General Public License as published by
[4] Fix | Delete
the Free Software Foundation; either version 2.1 of the License, or
[5] Fix | Delete
(at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
This program is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[10] Fix | Delete
GNU Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public License
[13] Fix | Delete
along with this program. If not, see <http://www.gnu.org/licenses/>. */
[14] Fix | Delete
[15] Fix | Delete
#ifndef _AUTOSPRINTF_H
[16] Fix | Delete
#define _AUTOSPRINTF_H
[17] Fix | Delete
[18] Fix | Delete
/* This feature is available in gcc versions 2.5 and later. */
[19] Fix | Delete
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
[20] Fix | Delete
# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() /* empty */
[21] Fix | Delete
#else
[22] Fix | Delete
/* The __-protected variants of 'format' and 'printf' attributes
[23] Fix | Delete
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
[24] Fix | Delete
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
[25] Fix | Delete
# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \
[26] Fix | Delete
__attribute__ ((__format__ (__printf__, 2, 3)))
[27] Fix | Delete
# else
[28] Fix | Delete
# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \
[29] Fix | Delete
__attribute__ ((format (printf, 2, 3)))
[30] Fix | Delete
# endif
[31] Fix | Delete
#endif
[32] Fix | Delete
[33] Fix | Delete
#include <string>
[34] Fix | Delete
#include <iostream>
[35] Fix | Delete
[36] Fix | Delete
namespace gnu
[37] Fix | Delete
{
[38] Fix | Delete
/* A temporary object, usually allocated on the stack, representing
[39] Fix | Delete
the result of an asprintf() call. */
[40] Fix | Delete
class autosprintf
[41] Fix | Delete
{
[42] Fix | Delete
public:
[43] Fix | Delete
/* Constructor: takes a format string and the printf arguments. */
[44] Fix | Delete
autosprintf (const char *format, ...)
[45] Fix | Delete
_AUTOSPRINTF_ATTRIBUTE_FORMAT();
[46] Fix | Delete
/* Copy constructor. */
[47] Fix | Delete
autosprintf (const autosprintf& src);
[48] Fix | Delete
autosprintf& operator = (autosprintf copy);
[49] Fix | Delete
/* Destructor: frees the temporarily allocated string. */
[50] Fix | Delete
~autosprintf ();
[51] Fix | Delete
/* Conversion to string. */
[52] Fix | Delete
operator char * () const;
[53] Fix | Delete
operator std::string () const;
[54] Fix | Delete
/* Output to an ostream. */
[55] Fix | Delete
friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
[56] Fix | Delete
{
[57] Fix | Delete
stream << (tmp.str ? tmp.str : "(error in autosprintf)");
[58] Fix | Delete
return stream;
[59] Fix | Delete
}
[60] Fix | Delete
private:
[61] Fix | Delete
char *str;
[62] Fix | Delete
};
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
#endif /* _AUTOSPRINTF_H */
[66] Fix | Delete
[67] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function