TA-REF
tools.c File Reference
#include <stddef.h>
#include <stdarg.h>
#include "tools.h"
#include <stdio.h>
#include "ocall_wrapper.h"
+ Include dependency graph for tools.c:

Functions

static unsigned int _strlen (const char *str)
 
int puts (const char *s)
 
int putchar (int c)
 
int printf (const char *fmt,...)
 

Function Documentation

◆ _strlen()

static unsigned int _strlen ( const char *  str)
inlinestatic

◆ printf()

int printf ( const char *  fmt,
  ... 
)

printf() - Function sends formatted output to stdout.

format can optionally contain embedded format tags that are replaced by the values specified in subsequent additional arguments and formatted as requested.

Parameters
fmThis is the string that contains the text to be written to stdout.
Returns
string length If success.
0 Error occured.

◆ putchar()

int putchar ( int  c)

putchar() - Function writes a character (an unsigned char) specified by the argument char to stdout.

This function returns the character written as an unsigned char cast to an int or EOF on error.

Parameters
cThis is the character to be written. This is passed as its int promotion.
Returns
size If success.
0 Error occured.

◆ puts()

int puts ( const char *  s)

puts() - Function writes a string to stdout up to but not including the null character.

A newline character is appended to the output by calling putchar(). Compiler may replace simple printf to puts and putchar.

Parameters
sThis is the C string to be written
Returns
size If success.
0 Error occured.