P_LIB_API pchar * p_strtok (pchar *str, const pchar *delim, pchar **buf) { if (P_UNLIKELY (delim == NULL)) return str; #ifdef P_OS_WIN # ifdef P_CC_MSVC if (P_UNLIKELY (buf == NULL)) return str; # if _MSC_VER < 1400 P_UNUSED (buf); return strtok (str, delim); # else return strtok_s (str, delim, buf); # endif # else P_UNUSED (buf); return strtok (str, delim); # endif #else if (P_UNLIKELY (buf == NULL)) return str; return strtok_r (str, delim, buf); #endif }
P_LIB_API pboolean p_shm_unlock (PShm *shm, PError **error) { P_UNUSED (shm); P_UNUSED (error); return FALSE; }
P_LIB_API PShm * p_shm_new (const pchar *name, psize size, PShmAccessPerms perms, PError **error) { P_UNUSED (name); P_UNUSED (size); P_UNUSED (perms); P_UNUSED (error); return NULL; }
P_LIB_API pboolean p_dir_create (const pchar *path, pint mode, PError **error) { P_UNUSED (mode); if (P_UNLIKELY (path == NULL)) { p_error_set_error_p (error, (pint) P_ERROR_IO_INVALID_ARGUMENT, 0, "Invalid input argument"); return FALSE; } if (p_dir_is_exists (path)) return TRUE; if (P_UNLIKELY (CreateDirectoryA (path, NULL) == 0)) { p_error_set_error_p (error, (pint) p_error_get_last_io (), p_error_get_last_system (), "Failed to call CreateDirectoryA() to create directory"); return FALSE; } else return TRUE; }
P_LIB_API psize p_shm_get_size (const PShm *shm) { P_UNUSED (shm); return 0; }
P_LIB_API ppointer p_shm_get_address (const PShm *shm) { P_UNUSED (shm); return NULL; }
int p_init(int *argc, char*** argv) { P_UNUSED(argc); P_UNUSED(argv); if (!(g_wl_display = wl_display_connect(NULL))) { p_log("Failed to connect to a Wayland compositor.\n"); return (-1); } if (get_registry_objects() < 0) { p_log("The compositor does not provide the required Wayland " "interface objects.\n"); return (-1); } return 0; /* No error. */ }
P_LIB_API void p_shm_take_ownership (PShm *shm) { P_UNUSED (shm); }
P_LIB_API void p_shm_free (PShm *shm) { P_UNUSED (shm); }
static void pp_cond_variable_close_vista (PCondVariable *cond) { P_UNUSED (cond); }
extern "C" void pmem_free (ppointer block) { P_UNUSED (block); }
extern "C" ppointer pmem_realloc (ppointer block, psize nbytes) { P_UNUSED (block); P_UNUSED (nbytes); return (ppointer) NULL; }
extern "C" ppointer pmem_alloc (psize nbytes) { P_UNUSED (nbytes); return (ppointer) NULL; }