diff --git a/.gitignore b/.gitignore index 4c374be4e..259922042 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ +# Produced files jerry +# IDE related files +nbproject + # Compiled Object files *.slo *.lo diff --git a/src/ctx-manager.c b/src/ctx-manager.c index a4097aaac..b4621eaa2 100644 --- a/src/ctx-manager.c +++ b/src/ctx-manager.c @@ -17,7 +17,7 @@ #include "ctx-reference.h" #include "globals.h" #include "ecma-alloc.h" -#include "ecma-defs.h" +#include "ecma-globals.h" #include "ecma-conversion.h" #include "ecma-gc.h" #include "ecma-helpers.h" diff --git a/src/ctx-manager.h b/src/ctx-manager.h index ddf482724..ade9a1f5a 100644 --- a/src/ctx-manager.h +++ b/src/ctx-manager.h @@ -18,7 +18,7 @@ #include "ctx-reference.h" #include "globals.h" -#include "ecma-defs.h" +#include "ecma-globals.h" /** \addtogroup ctxman Context manager * @{ diff --git a/src/ctx-reference.c b/src/ctx-reference.c index 65decddcd..1d2f37240 100644 --- a/src/ctx-reference.c +++ b/src/ctx-reference.c @@ -25,7 +25,7 @@ */ #include "globals.h" -#include "ecma-defs.h" +#include "ecma-globals.h" #include "ecma-helpers.h" #include "ctx-reference.h" diff --git a/src/ctx-reference.h b/src/ctx-reference.h index 4d18c2d47..9a481df31 100644 --- a/src/ctx-reference.h +++ b/src/ctx-reference.h @@ -18,7 +18,7 @@ #include "ctx-reference.h" #include "globals.h" -#include "ecma-defs.h" +#include "ecma-globals.h" /** \addtogroup ctxman Context manager * @{ diff --git a/src/ecma-alloc.c b/src/ecma-alloc.c index 23a25e5c3..9de7f97fc 100644 --- a/src/ecma-alloc.c +++ b/src/ecma-alloc.c @@ -34,7 +34,7 @@ #include "globals.h" #include "ecma-alloc.h" -#include "ecma-defs.h" +#include "ecma-globals.h" #include "ecma-gc.h" #include "mem-poolman.h" diff --git a/src/ecma-alloc.h b/src/ecma-alloc.h index 43978c863..78e660a98 100644 --- a/src/ecma-alloc.h +++ b/src/ecma-alloc.h @@ -23,7 +23,7 @@ #ifndef JERRY_ECMA_ALLOC_H #define JERRY_ECMA_ALLOC_H -#include "ecma-defs.h" +#include "ecma-globals.h" /** * Allocate memory for ecma-object diff --git a/src/ecma-conversion.h b/src/ecma-conversion.h index a02120c87..26922564e 100644 --- a/src/ecma-conversion.h +++ b/src/ecma-conversion.h @@ -23,7 +23,7 @@ #ifndef JERRY_ECMA_CONVERSION_H #define JERRY_ECMA_CONVERSION_H -#include "ecma-defs.h" +#include "ecma-globals.h" #include "ecma-helpers.h" extern ecma_Object_t* ecma_ToObject( ecma_Value_t value); diff --git a/src/ecma-gc.c b/src/ecma-gc.c index 7cdcb7f07..69128e454 100644 --- a/src/ecma-gc.c +++ b/src/ecma-gc.c @@ -26,7 +26,7 @@ #include "globals.h" #include "ecma-alloc.h" -#include "ecma-defs.h" +#include "ecma-globals.h" #include "ecma-gc.h" #include "ecma-helpers.h" diff --git a/src/ecma-gc.h b/src/ecma-gc.h index 3c7afb512..db299d930 100644 --- a/src/ecma-gc.h +++ b/src/ecma-gc.h @@ -27,7 +27,7 @@ * Garbage collector interface */ -#include "ecma-defs.h" +#include "ecma-globals.h" extern void ecma_GCInit( void); extern void ecma_RefObject(ecma_Object_t *pObject); diff --git a/src/ecma-defs.h b/src/ecma-globals.h similarity index 98% rename from src/ecma-defs.h rename to src/ecma-globals.h index c73c5484d..edf1c3dfd 100644 --- a/src/ecma-defs.h +++ b/src/ecma-globals.h @@ -20,8 +20,8 @@ * @{ */ -#ifndef JERRY_ECMA_DEFS_H -#define JERRY_ECMA_DEFS_H +#ifndef JERRY_ECMA_GLOBALS_H +#define JERRY_ECMA_GLOBALS_H #include "globals.h" #include "mem-allocator.h" @@ -309,7 +309,7 @@ typedef struct { uint8_t m_Elements[ ECMA_ARRAY_CHUNK_SIZE_IN_BYTES - sizeof (uint16_t) ]; } ecma_ArrayNonFirstChunk_t; -#endif /* JERRY_ECMA_DEFS_H */ +#endif /* JERRY_ECMA_GLOBALS_H */ /** * @} diff --git a/src/ecma-helpers.c b/src/ecma-helpers.c index 7a08b4232..c2d3625b1 100644 --- a/src/ecma-helpers.c +++ b/src/ecma-helpers.c @@ -25,7 +25,7 @@ */ #include "ecma-alloc.h" -#include "ecma-defs.h" +#include "ecma-globals.h" #include "ecma-helpers.h" #include "jerry-libc.h" diff --git a/src/ecma-helpers.h b/src/ecma-helpers.h index 4c8b096d2..fe13dda2d 100644 --- a/src/ecma-helpers.h +++ b/src/ecma-helpers.h @@ -23,7 +23,7 @@ #ifndef JERRY_ECMA_HELPERS_H #define JERRY_ECMA_HELPERS_H -#include "ecma-defs.h" +#include "ecma-globals.h" extern uintptr_t ecma_CompressPointer(void *pointer); extern void* ecma_DecompressPointer(uintptr_t compressedPointer); diff --git a/src/globals.h b/src/globals.h index 0a11621d9..5f73690d0 100644 --- a/src/globals.h +++ b/src/globals.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef JERRY_DEFS_H -#define JERRY_DEFS_H +#ifndef JERRY_GLOBALS_H +#define JERRY_GLOBALS_H #include #include @@ -42,7 +42,6 @@ typedef signed int int32_t; /** * Constants */ -#define NULL ((void*)0) #define JERRY_BITSINBYTE 8 @@ -153,4 +152,4 @@ jerry_SetBitFieldValue(uint32_t container, /**< container to insert bit-field to return ( container & ~shiftedBitFieldMask) | shiftedNewBitFieldValue; } /* jerry_SetBitFieldValue */ -#endif /* !JERRY_DEFS_H */ +#endif /* !JERRY_GLOBALS_H */ diff --git a/src/libperipherals/actuators.c b/src/libperipherals/actuators.c new file mode 100644 index 000000000..609246d9a --- /dev/null +++ b/src/libperipherals/actuators.c @@ -0,0 +1,16 @@ +/* Copyright 2014 Samsung Electronics Co., Ltd. + * + * 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. + */ + + diff --git a/src/libperipherals/actuators.h b/src/libperipherals/actuators.h new file mode 100644 index 000000000..928f714b5 --- /dev/null +++ b/src/libperipherals/actuators.h @@ -0,0 +1,28 @@ +/* Copyright 2014 Samsung Electronics Co., Ltd. + * + * 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. + */ + +/* + * File: actuators.h + * Author: egavrin + * + * Created on July 2, 2014, 2:06 PM + */ + +#ifndef ACTUATORS_H +#define ACTUATORS_H + + +#endif /* ACTUATORS_H */ + diff --git a/src/libperipherals/common-io.c b/src/libperipherals/common-io.c new file mode 100644 index 000000000..609246d9a --- /dev/null +++ b/src/libperipherals/common-io.c @@ -0,0 +1,16 @@ +/* Copyright 2014 Samsung Electronics Co., Ltd. + * + * 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. + */ + + diff --git a/src/libperipherals/common-io.h b/src/libperipherals/common-io.h new file mode 100644 index 000000000..1193d5970 --- /dev/null +++ b/src/libperipherals/common-io.h @@ -0,0 +1,33 @@ +/* Copyright 2014 Samsung Electronics Co., Ltd. + * + * 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. + */ + +/* + * File: common-io.h + * Author: egavrin + * + * Created on July 2, 2014, 2:14 PM + */ + +#ifndef COMMON_IO_H +#define COMMON_IO_H + +int digital_read(int, int); +void digital_write(int, int); + +int analog_read(int, int); +void analog_write(int, int); + +#endif /* COMMON_IO_H */ + diff --git a/src/libperipherals/sensors.c b/src/libperipherals/sensors.c new file mode 100644 index 000000000..609246d9a --- /dev/null +++ b/src/libperipherals/sensors.c @@ -0,0 +1,16 @@ +/* Copyright 2014 Samsung Electronics Co., Ltd. + * + * 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. + */ + + diff --git a/src/libperipherals/sensors.h b/src/libperipherals/sensors.h new file mode 100644 index 000000000..9a677b5f4 --- /dev/null +++ b/src/libperipherals/sensors.h @@ -0,0 +1,28 @@ +/* Copyright 2014 Samsung Electronics Co., Ltd. + * + * 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. + */ + +/* + * File: sensors.h + * Author: egavrin + * + * Created on July 2, 2014, 2:05 PM + */ + +#ifndef SENSORS_H +#define SENSORS_H + + +#endif /* SENSORS_H */ + diff --git a/src/pretty-printer.c b/src/pretty-printer.c index ddf69ceb1..23062ba71 100644 --- a/src/pretty-printer.c +++ b/src/pretty-printer.c @@ -15,8 +15,7 @@ #include "pretty-printer.h" #include "error.h" - -#include +#include "globals.h" static int intendation; static bool was_function_expression;