mirror of
https://github.com/google/pebble.git
synced 2025-07-15 06:05:58 +00:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
45
third_party/jerryscript/jerry-libc/include/assert.h
vendored
Normal file
45
third_party/jerryscript/jerry-libc/include/assert.h
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef JERRY_LIBC_ASSERT_H
|
||||
#define JERRY_LIBC_ASSERT_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define assert(x) \
|
||||
do \
|
||||
{ \
|
||||
if (__builtin_expect (!(x), 0)) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: %s: Assertion `%s' failed.", __FILE__, __LINE__, __func__, #x); \
|
||||
abort (); \
|
||||
} \
|
||||
} while (0)
|
||||
#else /* NDEBUG */
|
||||
#define assert(x) ((void) 0)
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_LIBC_ASSERT_H */
|
65
third_party/jerryscript/jerry-libc/include/setjmp.h
vendored
Normal file
65
third_party/jerryscript/jerry-libc/include/setjmp.h
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef JERRY_LIBC_SETJMP_H
|
||||
#define JERRY_LIBC_SETJMP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* Storage for context, used for nonlocal goto
|
||||
*
|
||||
* x86_64 (8 * 8 + 2 bytes):
|
||||
* 0x00 - %rsp
|
||||
* 0x08 - return address
|
||||
* 0x10 - %rbp
|
||||
* 0x18 - %rbx
|
||||
* 0x20 - %r12
|
||||
* 0x28 - %r13
|
||||
* 0x30 - %r14
|
||||
* 0x38 - %r15
|
||||
* 0x40 - x87 control word
|
||||
*
|
||||
* x86_32 (6 * 4 + 2 bytes):
|
||||
* - %ebx
|
||||
* - %esp
|
||||
* - %ebp
|
||||
* - %esi
|
||||
* - %edi
|
||||
* - return address (to jump to upon longjmp)
|
||||
* - x87 control word
|
||||
*
|
||||
* ARMv7 (10 * 4 + 16 * 4 bytes):
|
||||
* - r4 - r11, sp, lr
|
||||
* - s16 - s31 (if hardfp enabled)
|
||||
*
|
||||
* See also:
|
||||
* setjmp, longjmp
|
||||
*/
|
||||
typedef uint64_t jmp_buf[14];
|
||||
|
||||
int setjmp (jmp_buf env);
|
||||
void longjmp (jmp_buf env, int val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_LIBC_SETJMP_H */
|
54
third_party/jerryscript/jerry-libc/include/stdio.h
vendored
Normal file
54
third_party/jerryscript/jerry-libc/include/stdio.h
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef JERRY_LIBC_STDIO_H
|
||||
#define JERRY_LIBC_STDIO_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* File descriptor type
|
||||
*/
|
||||
typedef void FILE;
|
||||
|
||||
/**
|
||||
* Standard file descriptors
|
||||
*/
|
||||
extern FILE *stdin;
|
||||
extern FILE *stdout;
|
||||
extern FILE *stderr;
|
||||
|
||||
/**
|
||||
* I/O routines
|
||||
*/
|
||||
int vfprintf (FILE *stream, const char *format, va_list ap);
|
||||
FILE *fopen (const char *path, const char *mode);
|
||||
int fclose (FILE *fp);
|
||||
size_t fread (void *ptr, size_t size, size_t nmemb, FILE *stream);
|
||||
size_t fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream);
|
||||
int printf (const char *format, ...);
|
||||
int fprintf (FILE *stream, const char *format, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_LIBC_STDIO_H */
|
41
third_party/jerryscript/jerry-libc/include/stdlib.h
vendored
Normal file
41
third_party/jerryscript/jerry-libc/include/stdlib.h
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef JERRY_LIBC_STDLIB_H
|
||||
#define JERRY_LIBC_STDLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* Maximum integer that could be returned by random number generator
|
||||
*
|
||||
* See also:
|
||||
* rand
|
||||
*/
|
||||
#define RAND_MAX (0x7fffffffu)
|
||||
|
||||
void __attribute__ ((noreturn)) exit (int);
|
||||
void __attribute__ ((noreturn)) abort (void);
|
||||
int rand (void);
|
||||
void srand (unsigned int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_LIBC_STDLIB_H */
|
39
third_party/jerryscript/jerry-libc/include/string.h
vendored
Normal file
39
third_party/jerryscript/jerry-libc/include/string.h
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef JERRY_LIBC_STRING_H
|
||||
#define JERRY_LIBC_STRING_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
void *memcpy (void *dest, const void *src, size_t n);
|
||||
void *memset (void *s, int c, size_t n);
|
||||
void *memmove (void *dest, const void *src, size_t n);
|
||||
int memcmp (const void *s1, const void *s2, size_t n);
|
||||
int strcmp (const char *s1, const char *s2);
|
||||
int strncmp (const char *s1, const char *s2, size_t n);
|
||||
char *strncpy (char *dest, const char *src, size_t n);
|
||||
size_t strlen (const char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_LIBC_STRING_H */
|
48
third_party/jerryscript/jerry-libc/include/sys/time.h
vendored
Normal file
48
third_party/jerryscript/jerry-libc/include/sys/time.h
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
* Copyright 2016 University of Szeged
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef JERRY_LIBC_TIME_H
|
||||
#define JERRY_LIBC_TIME_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* Time value structure
|
||||
*/
|
||||
struct timeval
|
||||
{
|
||||
unsigned long tv_sec; /**< seconds */
|
||||
unsigned long tv_usec; /**< microseconds */
|
||||
};
|
||||
|
||||
/**
|
||||
* Timezone structure
|
||||
*/
|
||||
struct timezone
|
||||
{
|
||||
int tz_minuteswest; /**< minutes west of Greenwich */
|
||||
int tz_dsttime; /**< type of DST correction */
|
||||
};
|
||||
|
||||
int gettimeofday (void *tp, void *tzp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* !JERRY_LIBC_TIME_H */
|
Loading…
Add table
Add a link
Reference in a new issue