Changeset bc73be3 in mainline for uspace/lib/c/include/str.h


Ignore:
Timestamp:
2019-06-27T08:51:20Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8add15e0
Parents:
ad40b74b (diff), aeba767 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

cpp: merge and resolve conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/str.h

    rad40b74b rbc73be3  
    11/*
     2 * Copyright (c) 2001-2004 Jakub Jermar
    23 * Copyright (c) 2005 Martin Decky
    34 * Copyright (c) 2011 Oleg Romanenko
     
    3435 */
    3536
    36 #ifndef LIBC_STR_H_
    37 #define LIBC_STR_H_
    38 
    39 #ifdef __cplusplus
    40 extern "C" {
    41 #endif
     37#ifndef _LIBC_STR_H_
     38#define _LIBC_STR_H_
    4239
    4340#include <errno.h>
    44 #include <mem.h>
     41#include <stdbool.h>
    4542#include <stddef.h>
    4643#include <stdint.h>
    47 #include <stdbool.h>
    4844
    49 #define U_SPECIAL  '?'
     45#include <mem.h>
     46#include <_bits/decls.h>
     47
     48#ifndef __cplusplus
     49
     50/* Common Unicode characters */
     51#define U_SPECIAL      '?'
    5052
    5153/** No size limit constant */
     
    6163#define SPASCII_STR_BUFSIZE(spa_size) ((spa_size) + 1)
    6264
     65#endif
     66
     67__HELENOS_DECLS_BEGIN;
     68
    6369extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
    6470extern wchar_t str_decode_reverse(const char *str, size_t *offset, size_t sz);
    65 extern errno_t chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz);
     71extern errno_t chr_encode(wchar_t ch, char *str, size_t *offset, size_t sz);
    6672
    6773extern size_t str_size(const char *str);
     
    116122extern bool wstr_remove(wchar_t *str, size_t pos);
    117123
    118 extern char *str_dup(const char *);
    119 extern char *str_ndup(const char *, size_t max_size);
     124extern char *str_dup(const char *src);
     125extern char *str_ndup(const char *src, size_t n);
    120126
    121127extern char *str_tok(char *, const char *, char **);
     
    131137extern errno_t str_size_t(const char *, const char **, unsigned int, bool,
    132138    size_t *);
    133 extern int str_int64_t(const char *, const char **, unsigned int, bool,
     139extern errno_t str_int64_t(const char *, const char **, unsigned int, bool,
    134140    int64_t *);
    135141
     
    144150extern unsigned long strtoul(const char *, char **, int);
    145151
    146 #ifdef __cplusplus
    147 }
    148 #endif
     152__HELENOS_DECLS_END;
    149153
    150154#endif
Note: See TracChangeset for help on using the changeset viewer.