Subversion Repositories HelenOS

Rev

Rev 3386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4263
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup generic
29
/** @addtogroup generic
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
35
#ifndef KERN_PRINTF_CORE_H_
35
#ifndef KERN_PRINTF_CORE_H_
36
#define KERN_PRINTF_CORE_H_
36
#define KERN_PRINTF_CORE_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <typedefs.h>
39
#include <arch/arg.h>
39
#include <arch/arg.h>
40
 
40
 
41
/** Structure for specifying output methods for different printf clones. */
41
/** Structure for specifying output methods for different printf clones. */
42
struct printf_spec {
42
typedef struct {
43
    /* Output function, returns count of printed characters or EOF */
43
    /* String output function, returns number of printed characters or EOF */
44
    int (*write)(void *, size_t, void *);
44
    int (*str_write)(const char *, size_t, void *);
-
 
45
   
-
 
46
    /* Wide string output function, returns number of printed characters or EOF */
-
 
47
    int (*wstr_write)(const wchar_t *, size_t, void *);
-
 
48
   
45
    /* Support data - output stream specification, its state, locks,... */
49
    /* User data - output stream specification, state, locks, etc. */
46
    void *data;
50
    void *data;
-
 
51
} printf_spec_t;
47
 
52
 
48
};
-
 
49
 
-
 
50
int printf_core(const char *fmt, struct printf_spec *ps, va_list ap);
53
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
51
 
54
 
52
#endif
55
#endif
53
 
56
 
54
/** @}
57
/** @}
55
 */
58
 */