hostlib.h File Reference
#include <fcntl.h>
#include <limits.h>
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <unistd.h>
Include dependency graph for hostlib.h:

Go to the source code of this file.

Macros

#define _POSIX_C_SOURCE   200112L
 
#define ARRAY_SIZE(x)   (int)(sizeof(x) / sizeof((x)[0]))
 
#define JOIN_AGAIN(_a, _b)   _a##_b
 
#define JOIN(_a, _b)   JOIN_AGAIN(_a, _b)
 

Functions

int msleep (unsigned ms)
 
size_t getHostAppDir (char *path, size_t bufSize)
 Get directory where application is executing from. More...
 

Macro Definition Documentation

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   200112L

hostlib.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the Sming Framework Project

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SHEM. If not, see https://www.gnu.org/licenses/.

◆ ARRAY_SIZE

#define ARRAY_SIZE (   x)    (int)(sizeof(x) / sizeof((x)[0]))

◆ JOIN

#define JOIN (   _a,
  _b 
)    JOIN_AGAIN(_a, _b)

◆ JOIN_AGAIN

#define JOIN_AGAIN (   _a,
  _b 
)    _a##_b

Function Documentation

◆ getHostAppDir()

size_t getHostAppDir ( char *  path,
size_t  bufSize 
)

Get directory where application is executing from.

Parameters
pathReceives directory path, including trailing path separator
bufSize
Return values
size_tNumber of characters written, excluding NUL

◆ msleep()

int msleep ( unsigned  ms)