HeMPS  8.0
Macros | Functions
utils.c File Reference

This module implements utils functions. More...

#include "../include/plasma.h"
#include "utils.h"
Include dependency graph for utils.c:

Macros

#define FALSE   0
 
#define TRUE   1
 

Functions

int puts (char *string)
 
char * itoa (unsigned int num)
 
char * itoh (unsigned int num)
 
int abs (int num)
 
int rand (int seed, int min, int max)
 
int add (int a, int b)
 
int sub (int a, int b)
 
void * memset (void *dst, int c, unsigned long bytes)
 
char * fixetoa (int nume)
 
char * strcpy (char *dst, const char *src)
 
int strlen (const char *string)
 

Detailed Description

This module implements utils functions.

HEMPS VERSION - 8.0 - support for RT applications

Distribution: June 2016

Edited by: Marcelo Ruaro - contact: marce.nosp@m.lo.r.nosp@m.uaro@.nosp@m.acad.nosp@m..pucr.nosp@m.s.br

Research group: GAPH-PUCRS - contact: ferna.nosp@m.ndo..nosp@m.morae.nosp@m.s@pu.nosp@m.crs.b.nosp@m.r

Function Documentation

int abs ( int  num)

Module

Parameters
numInput number
Returns
Module result
char* itoa ( unsigned int  num)

Converts a integer number to its decimal representation in a array of char

Parameters
numInteger number to be converted
Returns
Array of chars
char* itoh ( unsigned int  num)

Converts a integer number to its hexadecimal representation in a array of char

Parameters
numInteger number to be converted
Returns
Array of chars
int puts ( char *  string)

Print the string in the text file log

Parameters
stringarray of chars
Returns
The int return is only to avoid a build-in warning
int rand ( int  seed,
int  min,
int  max 
)
Parameters