commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 1
4.87k
| subject
stringlengths 15
778
| message
stringlengths 15
8.75k
| lang
stringclasses 266
values | license
stringclasses 13
values | repos
stringlengths 5
127k
|
|---|---|---|---|---|---|---|---|---|---|
77d8b067bf60caa27bddb974a4e1841287334a8c
|
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
|
features/cryptocell/FEATURE_CRYPTOCELL310/mbedtls_device.h
|
/*
* mbedtls_device.h
*
* Copyright (C) 2018, Arm Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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 __MBEDTLS_DEVICE__
#define __MBEDTLS_DEVICE__
#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
#define MBEDTLS_SHA1_ALT
#define MBEDTLS_SHA256_ALT
#define MBEDTLS_CCM_ALT
#define MBEDTLS_CMAC_ALT
#define MBEDTLS_ECDSA_VERIFY_ALT
#define MBEDTLS_ECDSA_SIGN_ALT
#define MBEDTLS_ECDSA_GENKEY_ALT
#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
#endif //__MBEDTLS_DEVICE__
|
/*
* mbedtls_device.h
*
* Copyright (C) 2018-2019, Arm Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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 __MBEDTLS_DEVICE__
#define __MBEDTLS_DEVICE__
#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
#define MBEDTLS_SHA1_ALT
#define MBEDTLS_SHA256_ALT
#define MBEDTLS_CCM_ALT
//#define MBEDTLS_CMAC_ALT
#define MBEDTLS_ECDSA_VERIFY_ALT
#define MBEDTLS_ECDSA_SIGN_ALT
#define MBEDTLS_ECDSA_GENKEY_ALT
#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
#endif //__MBEDTLS_DEVICE__
|
Make the alternative cmac optional
|
Make the alternative cmac optional
Have the alternative cmac undefined by default,
in order not to break backwards compatability.
|
C
|
apache-2.0
|
andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed
|
fbb9d30f44ad3373b96ef0319a4fb404b60be5de
|
critical-mutex.c
|
critical-mutex.c
|
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include "uv.h"
static uv_mutex_t mutex;
static uv_thread_t thread;
static int crit_data = 0;
static void thread_cb(void* arg) {
uv_mutex_lock(&mutex);
printf("thread mutex start\n");
crit_data = 2;
printf("thread mutex end\n");
uv_mutex_unlock(&mutex);
}
int main() {
assert(0 == uv_mutex_init(&mutex));
assert(0 == uv_thread_create(&thread, thread_cb, NULL));
uv_mutex_lock(&mutex);
printf("main mutex start\n");
sleep(1);
crit_data = 1;
printf("main mutex end\n");
uv_mutex_unlock(&mutex);
uv_thread_join(&thread);
uv_mutex_destroy(&mutex);
return 0;
}
|
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include "uv.h"
static uv_mutex_t mutex;
static uv_thread_t thread;
static void thread_cb(void* arg) {
printf("thread_cb\n");
uv_mutex_lock(&mutex);
printf("thread mutex\n");
uv_mutex_unlock(&mutex);
}
int main() {
assert(0 == uv_mutex_init(&mutex));
assert(0 == uv_thread_create(&thread, thread_cb, NULL));
uv_mutex_lock(&mutex);
printf("main mutex start\n");
sleep(1);
printf("main mutex end\n");
uv_mutex_unlock(&mutex);
uv_thread_join(&thread);
uv_mutex_destroy(&mutex);
return 0;
}
|
Make use of mutex easier to see
|
Make use of mutex easier to see
With the access to the data, the use of the actual mutex could have been
confused. By simply using the mutex the example is a lot more clear.
|
C
|
mit
|
trevnorris/libuv-examples
|
c79489d69b73dc523442fa797b5cc38a8c841f35
|
src/kernel/thread/signal/sigstd_stub.h
|
src/kernel/thread/signal/sigstd_stub.h
|
/**
* @file
* @brief Stubs for standard signals.
*
* @date 07.10.2013
* @author Eldar Abusalimov
*/
#ifndef KERNEL_THREAD_SIGSTD_STUB_H_
#define KERNEL_THREAD_SIGSTD_STUB_H_
#include <errno.h>
#define SIGSTD_MIN 0
#define SIGSTD_MAX -1
struct sigstd_data { }; /* stub */
static inline struct sigstd_data * sigstd_data_init(
struct sigstd_data *sigstd_data) {
return sigstd_data;
}
static inline int sigstd_raise(struct sigstd_data *data, int sig) {
return -ENOSYS;
}
static inline void sigstd_handle(struct sigstd_data *data,
struct sigaction *sig_table) {
/* no-op */
}
#endif /* KERNEL_THREAD_SIGSTD_STUB_H_ */
|
/**
* @file
* @brief Stubs for standard signals.
*
* @date 07.10.2013
* @author Eldar Abusalimov
*/
#ifndef KERNEL_THREAD_SIGSTD_STUB_H_
#define KERNEL_THREAD_SIGSTD_STUB_H_
#include <errno.h>
#include <signal.h>
#define SIGSTD_MIN 0
#define SIGSTD_MAX -1
struct sigstd_data { }; /* stub */
static inline struct sigstd_data * sigstd_data_init(
struct sigstd_data *sigstd_data) {
return sigstd_data;
}
static inline int sigstd_raise(struct sigstd_data *data, int sig) {
return -ENOSYS;
}
static inline void sigstd_handle(struct sigstd_data *data,
struct sigaction *sig_table) {
/* no-op */
}
#endif /* KERNEL_THREAD_SIGSTD_STUB_H_ */
|
Fix stub implementation (add missing sigaction decl)
|
signal: Fix stub implementation (add missing sigaction decl)
|
C
|
bsd-2-clause
|
mike2390/embox,Kefir0192/embox,mike2390/embox,Kakadu/embox,embox/embox,embox/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,embox/embox,abusalimov/embox,vrxfile/embox-trik,abusalimov/embox,mike2390/embox,Kefir0192/embox,gzoom13/embox,Kakadu/embox,vrxfile/embox-trik,Kakadu/embox,embox/embox,gzoom13/embox,mike2390/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,gzoom13/embox,abusalimov/embox,embox/embox,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,gzoom13/embox,Kefir0192/embox,embox/embox,abusalimov/embox,gzoom13/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,gzoom13/embox,abusalimov/embox,abusalimov/embox,mike2390/embox,Kefir0192/embox
|
e971b9bcafa2d73d310a94ee1793163d6e1de14f
|
libsel4/include/sel4/macros.h
|
libsel4/include/sel4/macros.h
|
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#ifndef __LIBSEL4_MACROS_H
#define __LIBSEL4_MACROS_H
#include <autoconf.h>
/*
* Some compilers attempt to pack enums into the smallest possible type.
* For ABI compatability with the kernel, we need to ensure they remain
* the same size as an 'int'.
*/
#define SEL4_FORCE_LONG_ENUM(type) \
_enum_pad_ ## type = (1U << ((sizeof(int)*8) - 1)) - 1
#ifndef CONST
#define CONST __attribute__((__const__))
#endif
#ifndef PURE
#define PURE __attribute__((__pure__))
#endif
#define SEL4_OFFSETOF(type, member) __builtin_offsetof(type, member)
#ifdef CONFIG_LIB_SEL4_INLINE_INVOCATIONS
#define LIBSEL4_INLINE static inline
#else
#define LIBSEL4_INLINE __attribute__((noinline)) __attribute__((unused)) __attribute__((weak))
#endif
#endif
|
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#ifndef __LIBSEL4_MACROS_H
#define __LIBSEL4_MACROS_H
#include <autoconf.h>
/*
* Some compilers attempt to pack enums into the smallest possible type.
* For ABI compatability with the kernel, we need to ensure they remain
* the same size as a 'long'.
*/
#define SEL4_FORCE_LONG_ENUM(type) \
_enum_pad_ ## type = (1ULL << ((sizeof(long)*8) - 1)) - 1
#ifndef CONST
#define CONST __attribute__((__const__))
#endif
#ifndef PURE
#define PURE __attribute__((__pure__))
#endif
#define SEL4_OFFSETOF(type, member) __builtin_offsetof(type, member)
#ifdef CONFIG_LIB_SEL4_INLINE_INVOCATIONS
#define LIBSEL4_INLINE static inline
#else
#define LIBSEL4_INLINE __attribute__((noinline)) __attribute__((unused)) __attribute__((weak))
#endif
#endif
|
Make FORCE_LONG_ENUM actually force a long instead of an int
|
libsel4: Make FORCE_LONG_ENUM actually force a long instead of an int
|
C
|
bsd-2-clause
|
cmr/seL4,zhicheng/seL4,cmr/seL4,cmr/seL4,zhicheng/seL4,zhicheng/seL4
|
893b75e2bf2784f5b38837371cbcb33f884fee04
|
c/src/base/ByteStream.h
|
c/src/base/ByteStream.h
|
#ifndef C_BYTESTREAM_H
#define C_BYTESTREAM_H
#include "ByteListener.h"
#include "ByteProducer.h"
#include "ByteSubscription.h"
typedef struct ByteStream {
void (*add_listener) (struct ByteStream *self, ByteListener *listener);
void (*remove_listener) (struct ByteStream *self, ByteListener *listener);
void *(*subscribe) (struct ByteStream *self, ByteListener *listener);
ByteSubscription *(*unsubscribe) (struct ByteStream *self, ByteListener *listener);
} ByteStream;
ByteStream *byte_stream_create (ByteProducer *producer);
#endif // C_BYTESTREAM_H
|
#ifndef C_BYTESTREAM_H
#define C_BYTESTREAM_H
#include "ByteListener.h"
#include "ByteProducer.h"
#include "ByteSubscription.h"
#include "ByteListenerInternal.h"
#include "ByteProducerInternal.h"
#include "VariableLengthArray.h"
typedef uint8_t Boolean;
typedef Byte (*byte_steam_map_function) (Byte value);
typedef Boolean (*byte_steam_filter_function) (Byte value);
typedef struct ByteStream {
void (*add_listener) (struct ByteStream *self, ByteListener *listener);
void (*remove_listener) (struct ByteStream *self, ByteListener *listener);
void *(*subscribe) (struct ByteStream *self, ByteListener *listener);
ByteSubscription *(*unsubscribe) (struct ByteStream *self, ByteListener *listener);
ByteListenerInternal *_internal_listener;
ByteProducerInternal *_producer;
VariableLengthArray *_internal_listeners;
int _stop_id;
int _error;
void (*_teardown) (struct ByteStream *self);
void (*_stop_now) (struct ByteStream *self);
void (*_add) (struct ByteStream *self, ByteListenerInternal *listener);
void (*_remove) (struct ByteStream *self, ByteListenerInternal *listener);
struct ByteStream *(*map) (struct ByteStream *self, byte_steam_map_function map);
struct ByteStream *(*mapTo) (struct ByteStream *self, Byte value);
struct ByteStream *(*filter) (struct ByteStream *self, byte_steam_filter_function filter);
struct ByteStream *(*take) (struct ByteStream *self, int count);
struct ByteStream *(*drop) (struct ByteStream *self, int count);
struct ByteStream *(*last) (struct ByteStream *self);
} ByteStream;
ByteStream *byte_stream_create (ByteProducer *producer);
ByteStream *byte_stream_never ();
ByteStream *byte_stream_empty ();
ByteStream *byte_stream_throw ();
ByteStream *byte_stream_from_array (Byte array[]);
ByteStream *byte_stream_periodic (int milliseconds);
ByteStream *byte_stream_merge (ByteStream streams[]);
#endif // C_BYTESTREAM_H
|
Add fuller definition of Stream<Byte>
|
Add fuller definition of Stream<Byte>
|
C
|
mit
|
artfuldev/RIoT
|
2c68ddc27ccc965b15ebc50159cae4d76ed5af2b
|
cbits/gradient_decent.c
|
cbits/gradient_decent.c
|
#include "gradient_decent.h"
void decend_cpu(int len, double rate, double momentum, double regulariser,
const double* weights,
const double* gradient,
const double* last,
double* outputWeights, double* outputMomentum) {
for (int i = 0; i <= len; i++) {
outputMomentum[i] = momentum * last[i] - rate * gradient[i];
outputWeights[i] = weights[i] + outputMomentum[i] - (rate * regulariser) * weights[i];
}
}
|
#include "gradient_decent.h"
void decend_cpu(int len, double rate, double momentum, double regulariser,
const double* weights,
const double* gradient,
const double* last,
double* outputWeights, double* outputMomentum) {
for (int i = 0; i < len; i++) {
outputMomentum[i] = momentum * last[i] - rate * gradient[i];
outputWeights[i] = weights[i] + outputMomentum[i] - (rate * regulariser) * weights[i];
}
}
|
Fix off-by-one error in C code
|
Fix off-by-one error in C code
|
C
|
bsd-2-clause
|
HuwCampbell/grenade,HuwCampbell/grenade
|
0aedae3932bef0b8d4bcd83e9681489073a0beb9
|
android_webview/common/devtools_instrumentation.h
|
android_webview/common/devtools_instrumentation.h
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
#define ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
#include "base/debug/trace_event.h"
namespace android_webview {
namespace devtools_instrumentation {
namespace internal {
const char kCategory[] = "Java,devtools";
const char kEmbedderCallback[] = "EmbedderCallback";
const char kCallbackNameArgument[] = "callbackName";
} // namespace internal
class ScopedEmbedderCallbackTask {
public:
ScopedEmbedderCallbackTask(const char* callback_name) {
TRACE_EVENT_BEGIN1(internal::kCategory,
internal::kEmbedderCallback,
internal::kCallbackNameArgument,
callback_name);
}
~ScopedEmbedderCallbackTask() {
TRACE_EVENT_END0(internal::kCategory,
internal::kEmbedderCallback);
}
private:
DISALLOW_COPY_AND_ASSIGN(ScopedEmbedderCallbackTask);
};
} // namespace devtools_instrumentation
} // namespace android_webview
#endif // ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
#define ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
#include "base/debug/trace_event.h"
namespace android_webview {
namespace devtools_instrumentation {
namespace internal {
const char kCategory[] = "Java,devtools,disabled-by-default-devtools.timeline";
const char kEmbedderCallback[] = "EmbedderCallback";
const char kCallbackNameArgument[] = "callbackName";
} // namespace internal
class ScopedEmbedderCallbackTask {
public:
ScopedEmbedderCallbackTask(const char* callback_name) {
TRACE_EVENT_BEGIN1(internal::kCategory,
internal::kEmbedderCallback,
internal::kCallbackNameArgument,
callback_name);
}
~ScopedEmbedderCallbackTask() {
TRACE_EVENT_END0(internal::kCategory,
internal::kEmbedderCallback);
}
private:
DISALLOW_COPY_AND_ASSIGN(ScopedEmbedderCallbackTask);
};
} // namespace devtools_instrumentation
} // namespace android_webview
#endif // ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
|
Add devtools trace events for Timeline EmbedderCallback notification
|
Add devtools trace events for Timeline EmbedderCallback notification
This events will be used instead of existing implementation in InspectorTimelineAgent.cpp after switching Timeline to trace events as backend.
BUG=361045
Review URL: https://codereview.chromium.org/254313002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@268152 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
PeterWangIntel/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,ltilve/chromium,dednal/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,jaruba/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,krieger-od/nwjs_chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,littlstar/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,dednal/chromium.src,Chilledheart/chromium,Chilledheart/chromium,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,littlstar/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,ltilve/chromium,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,littlstar/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,littlstar/chromium.src,dednal/chromium.src
|
0049997b699676539caf7d2ae52f690ba374123c
|
src/configuration.h
|
src/configuration.h
|
#ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_APPLICATION_VERSION "v. 1.0.9 (beta)"
namespace QGC
{
const QString APPNAME = "QGROUNDCONTROL";
const QString COMPANYNAME = "QGROUNDCONTROL";
const int APPLICATIONVERSION = 109; // 1.0.9
}
#endif // QGC_CONFIGURATION_H
|
#ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_APPLICATION_VERSION "v. 1.0.10 (beta)"
namespace QGC
{
const QString APPNAME = "QGROUNDCONTROL";
const QString COMPANYNAME = "QGROUNDCONTROL";
const int APPLICATIONVERSION = 109; // 1.0.9
}
#endif // QGC_CONFIGURATION_H
|
Increment version number, since the new AHRS would break setting loading
|
Increment version number, since the new AHRS would break setting loading
|
C
|
agpl-3.0
|
hejunbok/apm_planner,mihadyuk/qgroundcontrol,josephlewis42/UDenverQGC2,gpaes/apm_planner,iidioter/qgroundcontrol,ethz-asl/qgc_asl,dcarpy/apm_planner,TheIronBorn/qgroundcontrol,381426068/apm_planner,jy723/qgroundcontrol,BMP-TECH/qgroundcontrol,caoxiongkun/qgroundcontrol,labtoast/apm_planner,gpaes/apm_planner,duststorm/apm_planner,LIKAIMO/qgroundcontrol,LIKAIMO/apm_planner,sutherlandm/apm_planner,gpaes/apm_planner,BMP-TECH/qgroundcontrol,duststorm/apm_planner,sutherlandm/apm_planner,mihadyuk/qgroundcontrol,dcarpy/apm_planner,ethz-asl/qgc_asl,duststorm/apm_planner,BMP-TECH/qgroundcontrol,Icenowy/apm_planner,RedoXyde/PX4_qGCS,LittleBun/apm_planner,gpaes/apm_planner,lis-epfl/qgroundcontrol,catch-twenty-two/qgroundcontrol,381426068/apm_planner,LIKAIMO/apm_planner,mirkix/apm_planner,LIKAIMO/qgroundcontrol,jy723/qgroundcontrol,mirkix/apm_planner,LittleBun/apm_planner,LittleBun/apm_planner,cfelipesouza/qgroundcontrol,Icenowy/apm_planner,diydrones/apm_planner,mrpilot2/apm_planner,hejunbok/apm_planner,381426068/apm_planner,TheIronBorn/qgroundcontrol,LittleBun/apm_planner,kd0aij/qgroundcontrol,caoxiongkun/qgroundcontrol,mirkix/apm_planner,fizzaly/qgroundcontrol,LIKAIMO/qgroundcontrol,diydrones/apm_planner,jy723/qgroundcontrol,fizzaly/qgroundcontrol,UAVenture/qgroundcontrol,devbharat/qgroundcontrol,381426068/apm_planner,dagoodma/qgroundcontrol,CornerOfSkyline/qgroundcontrol,scott-eddy/qgroundcontrol,catch-twenty-two/qgroundcontrol,sverling/qgc_asl,CornerOfSkyline/qgroundcontrol,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,greenoaktree/qgroundcontrol,kellyschrock/apm_planner,sutherlandm/apm_planner,caoxiongkun/qgroundcontrol,cfelipesouza/qgroundcontrol,TheIronBorn/qgroundcontrol,mirkix/apm_planner,greenoaktree/qgroundcontrol,mihadyuk/qgroundcontrol,WorkerBees/apm_planner,hejunbok/qgroundcontrol,CornerOfSkyline/qgroundcontrol,hejunbok/qgroundcontrol,diydrones/apm_planner,duststorm/apm_planner,catch-twenty-two/qgroundcontrol,caoxiongkun/qgroundcontrol,Icenowy/apm_planner,sutherlandm/apm_planner,chen0510566/apm_planner,xros/apm_planner,josephlewis42/UDenverQGC2,jy723/qgroundcontrol,devbharat/qgroundcontrol,greenoaktree/qgroundcontrol,abcdelf/apm_planner,Hunter522/qgroundcontrol,mihadyuk/qgroundcontrol,kd0aij/qgroundcontrol,dcarpy/apm_planner,dcarpy/apm_planner,kd0aij/qgroundcontrol,sutherlandm/apm_planner,diydrones/apm_planner,labtoast/apm_planner,abcdelf/apm_planner,dcarpy/apm_planner,iidioter/qgroundcontrol,lis-epfl/qgroundcontrol,hejunbok/qgroundcontrol,greenoaktree/qgroundcontrol,kd0aij/qgroundcontrol,TheIronBorn/qgroundcontrol,UAVenture/qgroundcontrol,RedoXyde/PX4_qGCS,gpaes/apm_planner,Icenowy/apm_planner,LIKAIMO/qgroundcontrol,jy723/qgroundcontrol,sverling/qgc_asl,381426068/apm_planner,WorkerBees/apm_planner,hejunbok/qgroundcontrol,sverling/qgc_asl,TheIronBorn/qgroundcontrol,devbharat/qgroundcontrol,diydrones/apm_planner,xros/apm_planner,remspoor/qgroundcontrol,hejunbok/apm_planner,chen0510566/apm_planner,LIKAIMO/qgroundcontrol,LIKAIMO/apm_planner,remspoor/qgroundcontrol,labtoast/apm_planner,devbharat/qgroundcontrol,abcdelf/apm_planner,CornerOfSkyline/qgroundcontrol,chen0510566/apm_planner,abcdelf/apm_planner,greenoaktree/qgroundcontrol,UAVenture/qgroundcontrol,dagoodma/qgroundcontrol,devbharat/qgroundcontrol,diydrones/apm_planner,LIKAIMO/apm_planner,catch-twenty-two/qgroundcontrol,Icenowy/apm_planner,catch-twenty-two/qgroundcontrol,iidioter/qgroundcontrol,dagoodma/qgroundcontrol,xros/apm_planner,scott-eddy/qgroundcontrol,WorkerBees/apm_planner,kellyschrock/apm_planner,hejunbok/apm_planner,scott-eddy/qgroundcontrol,LIKAIMO/qgroundcontrol,BMP-TECH/qgroundcontrol,Icenowy/apm_planner,mrpilot2/apm_planner,gpaes/apm_planner,mihadyuk/qgroundcontrol,remspoor/qgroundcontrol,nado1688/qgroundcontrol,remspoor/qgroundcontrol,scott-eddy/qgroundcontrol,UAVenture/qgroundcontrol,cfelipesouza/qgroundcontrol,RedoXyde/PX4_qGCS,kellyschrock/apm_planner,lis-epfl/qgroundcontrol,fizzaly/qgroundcontrol,dagoodma/qgroundcontrol,xros/apm_planner,caoxiongkun/qgroundcontrol,381426068/apm_planner,LIKAIMO/apm_planner,UAVenture/qgroundcontrol,greenoaktree/qgroundcontrol,duststorm/apm_planner,fizzaly/qgroundcontrol,remspoor/qgroundcontrol,catch-twenty-two/qgroundcontrol,lis-epfl/qgroundcontrol,kd0aij/qgroundcontrol,cfelipesouza/qgroundcontrol,kellyschrock/apm_planner,CornerOfSkyline/qgroundcontrol,TheIronBorn/qgroundcontrol,hejunbok/apm_planner,iidioter/qgroundcontrol,mirkix/apm_planner,dagoodma/qgroundcontrol,josephlewis42/UDenverQGC2,hejunbok/qgroundcontrol,LittleBun/apm_planner,chen0510566/apm_planner,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,RedoXyde/PX4_qGCS,ethz-asl/qgc_asl,fizzaly/qgroundcontrol,hejunbok/qgroundcontrol,dagoodma/qgroundcontrol,abcdelf/apm_planner,lis-epfl/qgroundcontrol,mrpilot2/apm_planner,nado1688/qgroundcontrol,scott-eddy/qgroundcontrol,labtoast/apm_planner,labtoast/apm_planner,mrpilot2/apm_planner,dcarpy/apm_planner,chen0510566/apm_planner,labtoast/apm_planner,cfelipesouza/qgroundcontrol,xros/apm_planner,caoxiongkun/qgroundcontrol,kellyschrock/apm_planner,LIKAIMO/apm_planner,duststorm/apm_planner,xros/apm_planner,josephlewis42/UDenverQGC2,WorkerBees/apm_planner,nado1688/qgroundcontrol,abcdelf/apm_planner,UAVenture/qgroundcontrol,chen0510566/apm_planner,nado1688/qgroundcontrol,RedoXyde/PX4_qGCS,mrpilot2/apm_planner,hejunbok/apm_planner,BMP-TECH/qgroundcontrol,iidioter/qgroundcontrol,sutherlandm/apm_planner,mirkix/apm_planner,kellyschrock/apm_planner,scott-eddy/qgroundcontrol,mihadyuk/qgroundcontrol,ethz-asl/qgc_asl,remspoor/qgroundcontrol,CornerOfSkyline/qgroundcontrol,RedoXyde/PX4_qGCS,kd0aij/qgroundcontrol,ethz-asl/qgc_asl,iidioter/qgroundcontrol,nado1688/qgroundcontrol,fizzaly/qgroundcontrol,sverling/qgc_asl,jy723/qgroundcontrol,nado1688/qgroundcontrol,BMP-TECH/qgroundcontrol,Hunter522/qgroundcontrol,devbharat/qgroundcontrol,LittleBun/apm_planner,sverling/qgc_asl,mrpilot2/apm_planner,cfelipesouza/qgroundcontrol
|
57d1526e288953b4a419bcd2f32da885cdbebcf6
|
src/cpp2/expr_tok.h
|
src/cpp2/expr_tok.h
|
#ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_modulus = '%',
tok_plus = '+',
tok_minus = '-',
tok_xor = '^',
tok_or = '|',
tok_and = '&',
tok_orsc = -1,
tok_andsc = -2,
tok_shiftl = -3,
tok_shiftr = -4,
/* unary - TODO */
tok_not = '!',
tok_bnot = '~',
/* comparison */
tok_eq = -5,
tok_ne = -6,
tok_le = -7,
tok_lt = '<',
tok_ge = -8,
tok_gt = '>',
/* ternary */
tok_question = '?',
tok_colon = ':',
#define MIN_OP -8
} tok_cur;
void tok_next(void);
void tok_begin(char *);
const char *tok_last(void);
#endif
|
#ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_modulus = '%',
tok_plus = '+',
tok_minus = '-',
tok_xor = '^',
tok_or = '|',
tok_and = '&',
tok_orsc = -3,
tok_andsc = -4,
tok_shiftl = -5,
tok_shiftr = -6,
/* unary - TODO */
tok_not = '!',
tok_bnot = '~',
/* comparison */
tok_eq = -7,
tok_ne = -8,
tok_le = -9,
tok_lt = '<',
tok_ge = -10,
tok_gt = '>',
/* ternary */
tok_question = '?',
tok_colon = ':',
#define MIN_OP -10
} tok_cur;
void tok_next(void);
void tok_begin(char *);
const char *tok_last(void);
#endif
|
Fix clash in cpp tokens
|
Fix clash in cpp tokens
|
C
|
mit
|
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
|
c4187c9c4b352f48252afe0ee30fa93d84e692a5
|
include/lib/cpus/aarch64/neoverse_e1.h
|
include/lib/cpus/aarch64/neoverse_e1.h
|
/*
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef NEOVERSE_E1_H
#define NEOVERSE_E1_H
#include <lib/utils_def.h>
#define NEOVERSE_E1_MIDR U(0x410FD060)
/*******************************************************************************
* CPU Extended Control register specific definitions.
******************************************************************************/
#define NEOVERSE_E1_ECTLR_EL1 S3_0_C15_C1_4
/*******************************************************************************
* CPU Auxiliary Control register specific definitions.
******************************************************************************/
#define NEOVERSE_E1_CPUACTLR_EL1 S3_0_C15_C1_0
/*******************************************************************************
* CPU Power Control register specific definitions.
******************************************************************************/
#define NEOVERSE_E1_CPUPWRCTLR_EL1 S3_0_C15_C2_7
#define NEOVERSE_E1_CPUPWRCTLR_EL1_CORE_PWRDN_BIT (U(1) << 0)
#endif /* NEOVERSE_E1_H */
|
/*
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef NEOVERSE_E1_H
#define NEOVERSE_E1_H
#include <lib/utils_def.h>
#define NEOVERSE_E1_MIDR U(0x410FD4A0)
/*******************************************************************************
* CPU Extended Control register specific definitions.
******************************************************************************/
#define NEOVERSE_E1_ECTLR_EL1 S3_0_C15_C1_4
/*******************************************************************************
* CPU Auxiliary Control register specific definitions.
******************************************************************************/
#define NEOVERSE_E1_CPUACTLR_EL1 S3_0_C15_C1_0
/*******************************************************************************
* CPU Power Control register specific definitions.
******************************************************************************/
#define NEOVERSE_E1_CPUPWRCTLR_EL1 S3_0_C15_C2_7
#define NEOVERSE_E1_CPUPWRCTLR_EL1_CORE_PWRDN_BIT (U(1) << 0)
#endif /* NEOVERSE_E1_H */
|
Fix wrong MIDR_EL1 value for Neoverse E1
|
Fix wrong MIDR_EL1 value for Neoverse E1
Change-Id: I75ee39d78c81ecb528a671c0cfadfc2fe7b5d818
Signed-off-by: John Tsichritzis <c5e6a94b5ed6b01ab911c6a4e005fdf814669fe4@arm.com>
|
C
|
bsd-3-clause
|
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
|
e6b9ebba53038ac4d1e2377ebdd15359c28368cb
|
lib/asan/interception/interception_linux.h
|
lib/asan/interception/interception_linux.h
|
//===-- interception_linux.h ------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
// Linux-specific interception methods.
//===----------------------------------------------------------------------===//
#ifdef __linux__
#if !defined(INCLUDED_FROM_INTERCEPTION_LIB)
# error "interception_mac.h should be included from interception library only"
#endif
#ifndef INTERCEPTION_LINUX_H
#define INTERCEPTION_LINUX_H
namespace __interception {
// returns true if a function with the given name was found.
bool GetRealFunctionAddress(const char *func_name, void **func_addr);
} // namespace __interception
#define INTERCEPT_FUNCTION_LINUX(func) \
::__interception::GetRealFunctionAddress(#func, (void**)&REAL(func))
#endif // INTERCEPTION_LINUX_H
#endif // __linux__
|
//===-- interception_linux.h ------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
// Linux-specific interception methods.
//===----------------------------------------------------------------------===//
#ifdef __linux__
#if !defined(INCLUDED_FROM_INTERCEPTION_LIB)
# error "interception_linux.h should be included from interception library only"
#endif
#ifndef INTERCEPTION_LINUX_H
#define INTERCEPTION_LINUX_H
namespace __interception {
// returns true if a function with the given name was found.
bool GetRealFunctionAddress(const char *func_name, void **func_addr);
} // namespace __interception
#define INTERCEPT_FUNCTION_LINUX(func) \
::__interception::GetRealFunctionAddress(#func, (void**)&REAL(func))
#endif // INTERCEPTION_LINUX_H
#endif // __linux__
|
Fix a wrong filename mentioned in a comment
|
[ASan] Fix a wrong filename mentioned in a comment
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@151145 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
|
d202d7b2059eb440c044477993a6e0d6aa4d5086
|
app/tests/test_device_msg_deserialize.c
|
app/tests/test_device_msg_deserialize.c
|
#include <assert.h>
#include <string.h>
#include "device_msg.h"
#include <stdio.h>
static void test_deserialize_clipboard(void) {
const unsigned char input[] = {
DEVICE_MSG_TYPE_CLIPBOARD,
0x00, 0x03, // text length
0x41, 0x42, 0x43, // "ABC"
};
struct device_msg msg;
ssize_t r = device_msg_deserialize(input, sizeof(input), &msg);
assert(r == 6);
assert(msg.type == DEVICE_MSG_TYPE_CLIPBOARD);
assert(msg.clipboard.text);
assert(!strcmp("ABC", msg.clipboard.text));
device_msg_destroy(&msg);
}
int main(void) {
test_deserialize_clipboard();
return 0;
}
|
#include <assert.h>
#include <string.h>
#include "device_msg.h"
#include <stdio.h>
static void test_deserialize_clipboard(void) {
const unsigned char input[] = {
DEVICE_MSG_TYPE_CLIPBOARD,
0x00, 0x03, // text length
0x41, 0x42, 0x43, // "ABC"
};
struct device_msg msg;
ssize_t r = device_msg_deserialize(input, sizeof(input), &msg);
assert(r == 6);
assert(msg.type == DEVICE_MSG_TYPE_CLIPBOARD);
assert(msg.clipboard.text);
assert(!strcmp("ABC", msg.clipboard.text));
device_msg_destroy(&msg);
}
static void test_deserialize_clipboard_big(void) {
unsigned char input[DEVICE_MSG_SERIALIZED_MAX_SIZE];
input[0] = DEVICE_MSG_TYPE_CLIPBOARD;
input[1] = DEVICE_MSG_TEXT_MAX_LENGTH >> 8; // MSB
input[2] = DEVICE_MSG_TEXT_MAX_LENGTH & 0xff; // LSB
memset(input + 3, 'a', DEVICE_MSG_TEXT_MAX_LENGTH);
struct device_msg msg;
ssize_t r = device_msg_deserialize(input, sizeof(input), &msg);
assert(r == DEVICE_MSG_SERIALIZED_MAX_SIZE);
assert(msg.type == DEVICE_MSG_TYPE_CLIPBOARD);
assert(msg.clipboard.text);
assert(strlen(msg.clipboard.text) == DEVICE_MSG_TEXT_MAX_LENGTH);
assert(msg.clipboard.text[0] == 'a');
device_msg_destroy(&msg);
}
int main(void) {
test_deserialize_clipboard();
test_deserialize_clipboard_big();
return 0;
}
|
Add unit test for big clipboard device message
|
Add unit test for big clipboard device message
Test clipboard synchronization from the device to the computer.
|
C
|
apache-2.0
|
Genymobile/scrcpy,Genymobile/scrcpy,Genymobile/scrcpy
|
89f7600802d05329facf46d92910ad8b1bdc642d
|
libmue/tests/test_guest_tuple_iterator.h
|
libmue/tests/test_guest_tuple_iterator.h
|
#ifndef TEST_GUEST_TUPLE_ITERATOR_H
#define TEST_GUEST_TUPLE_ITERATOR_H
#include <cxxtest/TestSuite.h>
#include <unordered_set>
#include <vector>
#include "teams.h"
#include "guest_tuple_iterator.h"
class TestSeenTable : public CxxTest::TestSuite
{
private:
std::vector<mue::Team> make_testteams(int num)
{
std::vector<mue::Team> teams;
for (mue::Team_id i = 0; i < num; ++i)
teams.push_back(mue::Team(i));
return teams;
}
public:
void testFooBar(void)
{
}
};
#endif
|
#ifndef TEST_GUEST_TUPLE_ITERATOR_H
#define TEST_GUEST_TUPLE_ITERATOR_H
#include <cxxtest/TestSuite.h>
#include <unordered_set>
#include <vector>
#include "teams.h"
#include "guest_tuple_iterator.h"
class TestSeenTable : public CxxTest::TestSuite
{
public:
void testFooBar(void)
{
}
};
#endif
|
Clean skel for guest tuple iterator tests
|
Clean skel for guest tuple iterator tests
Signed-off-by: Jan Losinski <577c4104c61edf9f052c616c0c23e67bef4a9955@wh2.tu-dresden.de>
|
C
|
bsd-3-clause
|
janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool
|
a7bbc288ca4149eb804a9e5152c33dbe07f431fe
|
src/rtcmix/funderflow.c
|
src/rtcmix/funderflow.c
|
#ifdef sgi
#include <sys/fpu.h>
/*
THE FOLLOWING FUNCTION
sets the special "flush zero" but (FS, bit 24) in the
Control Status Register of the FPU of R4k and beyond
so that the result of any underflowing operation will
be clamped to zero, and no exception of any kind will
be generated on the CPU. This has no effect on
an R3000.
*/
void flush_all_underflows_to_zero()
{
union fpc_csr f;
f.fc_word = get_fpc_csr();
f.fc_struct.flush = 1;
set_fpc_csr(f.fc_word);
}
#endif
#ifdef LINUX
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
void sigfpe_handler(int sig)
{
fprintf(stderr,
"\nRTcmix FATAL ERROR: floating point exception halted process.\n");
exit(1);
}
#endif
|
#ifdef sgi
#include <sys/fpu.h>
/*
THE FOLLOWING FUNCTION
sets the special "flush zero" but (FS, bit 24) in the
Control Status Register of the FPU of R4k and beyond
so that the result of any underflowing operation will
be clamped to zero, and no exception of any kind will
be generated on the CPU. This has no effect on
an R3000.
*/
void flush_all_underflows_to_zero()
{
union fpc_csr f;
f.fc_word = get_fpc_csr();
f.fc_struct.flush = 1;
set_fpc_csr(f.fc_word);
}
#endif
#ifdef LINUX
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
void sigfpe_handler(int sig)
{
fprintf(stderr,
"\nRTcmix FATAL ERROR: floating point exception halted process.\n");
exit(1);
}
#endif
|
Fix include from last checkin.
|
Fix include from last checkin.
|
C
|
apache-2.0
|
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
|
6541894e50b82b4f2f2dd5a875ee37c5645f6c85
|
JTFadingInfoViewController/JTFadingInfoViewController.h
|
JTFadingInfoViewController/JTFadingInfoViewController.h
|
//
// JTFadingInfoViewController.h
// JTFadingInfoViewController
//
// Created by DCL_JT on 2015/07/29.
// Copyright (c) 2015年 Junichi Tsurukawa. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface JTFadingInfoViewController : UIViewController
@end
|
//
// JTFadingInfoViewController.h
// JTFadingInfoViewController
//
// Created by DCL_JT on 2015/07/29.
// Copyright (c) 2015年 Junichi Tsurukawa. All rights reserved.
//
#import <UIKit/UIKit.h>
#pragma mark - Fade in/out options
typedef enum {
FadeInFromAbove = 1,
FadeInFromBelow,
FadeInFromLeft,
FadeInFromRight
} FadeInType;
typedef enum {
FadeOutToAbove = 1,
FadeOutToBelow,
FadeOutToLeft,
FadeOutToRight
} FadeOutType;
@interface JTFadingInfoViewController : UIViewController
#pragma mark - Functions
/*
* Add subView with Selected Type of Fading in.
*
* @param view A view to be added.
* @param fadeType A Type of Fading when appering.
*
*/
- (void)addSubView:(UIView *)view WithFade:(FadeInType)fadeType;
/*
* Remove subView from SuperView with Selected Type of Fading out.
*
* @param fadeType A Type of Fading when disappering.
*
*/
- (void)removeFromSuperViewWithFade: (FadeInType)fadeType;
/*
* ~SOME DESCRIPTION GOES HERE~
*
* @param fadeInType A Type of Fading when appering.
*
* @param duration Time for displaying the view.
*
* @param fadeOutType A Type of Fading when disappering.
*/
- (void)showSubView: (UIView *)view withAppearType: (FadeInType)fadeInType
showDuration: (float)duration
withDisapperType: (FadeOutType)fadeOutType;
#pragma mark - Properties
#pragma Shadow
/** A Boolean value for whether the shadow effect is enabled or not. */
@property BOOL isShadowEnabled;
#pragma Animatoins
/** A float represeting the time for displaying this view itself. If 0, view will not disapper */
@property float displayDuration;
/** A float representing the time the view is appeared by. */
@property float appearingDuration;
/** A float representing the time the view is disappeared by. */
@property float disappearingDuration;
@end
|
Determine initial properties and functions
|
Determine initial properties and functions
|
C
|
mit
|
mohsinalimat/JTFadingInfoView,JunichiT/JTFadingInfoView,machelix/JTFadingInfoView,gaurav1981/JTFadingInfoView,carabina/JTFadingInfoView
|
1a10f81750d935eaf84b6ea02d39201471b5fa84
|
pmpa_internals.h
|
pmpa_internals.h
|
/*
* pmpa_internals.h
* Part of pmpa
* Copyright (c) 2014 Philip Wernersbach
*
* Dual-Licensed under the Public Domain and the Unlicense.
* Choose the one that you prefer.
*/
#ifndef HAVE_PMPA_INTERNALS_H
#include <stdbool.h>
#include <pmpa.h>
typedef struct {
pmpa_memory_int size;
bool allocated;
char data;
} pmpa_memory_block;
#define PMPA_MEMORY_BLOCK_HEADER_SIZE ( sizeof(pmpa_memory_int) + sizeof(bool) )
#ifdef PMPA_UNIT_TEST
#define PMPA_STATIC_UNLESS_TESTING
extern PMPA_STATIC_UNLESS_TESTING __thread pmpa_memory_block *master_memory_block;
extern PMPA_STATIC_UNLESS_TESTING __thread pmpa_memory_int master_memory_block_size;
#else
#define PMPA_STATIC_UNLESS_TESTING static
#endif
#define HAVE_PMPA_INTERNALS_H
#endif
|
/*
* pmpa_internals.h
* Part of pmpa
* Copyright (c) 2014 Philip Wernersbach
*
* Dual-Licensed under the Public Domain and the Unlicense.
* Choose the one that you prefer.
*/
#ifndef HAVE_PMPA_INTERNALS_H
#include <stddef.h>
#include <stdbool.h>
#include <pmpa.h>
typedef struct {
pmpa_memory_int size;
bool allocated;
char data;
} pmpa_memory_block;
#define PMPA_MEMORY_BLOCK_HEADER_SIZE ( offsetof(pmpa_memory_block, data) )
#ifdef PMPA_UNIT_TEST
#define PMPA_STATIC_UNLESS_TESTING
extern PMPA_STATIC_UNLESS_TESTING __thread pmpa_memory_block *master_memory_block;
extern PMPA_STATIC_UNLESS_TESTING __thread pmpa_memory_int master_memory_block_size;
#else
#define PMPA_STATIC_UNLESS_TESTING static
#endif
#define HAVE_PMPA_INTERNALS_H
#endif
|
Use offsetof() to compute the memory block header size.
|
Use offsetof() to compute the memory block header size.
On compilers that don’t pad structs to alignment, this is equivalent to
using the sizeof() method. On compilers that do pad structs to
alignment, the sizeof() method will yield the wrong size, whereas this
method will work.
|
C
|
unlicense
|
philip-wernersbach/memory-pool-allocator
|
a6b11e049ace86d58eb016015b598c5b8ed1655c
|
MagicalRecord/Categories/DataImport/MagicalImportFunctions.h
|
MagicalRecord/Categories/DataImport/MagicalImportFunctions.h
|
//
// MagicalImportFunctions.h
// Magical Record
//
// Created by Saul Mora on 3/7/12.
// Copyright (c) 2012 Magical Panda Software LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MagicalRecord/MagicalRecordXcode7CompatibilityMacros.h>
NSDateFormatter * __MR_nonnull MR_dateFormatterWithFormat(NSString *format);
NSDate * __MR_nonnull MR_adjustDateForDST(NSDate *__MR_nonnull date);
NSDate * __MR_nonnull MR_dateFromString(NSString *__MR_nonnull value, NSString *__MR_nonnull format);
NSDate * __MR_nonnull MR_dateFromNumber(NSNumber *__MR_nonnull value, BOOL milliseconds);
NSNumber * __MR_nonnull MR_numberFromString(NSString *__MR_nonnull value);
NSString * __MR_nonnull MR_attributeNameFromString(NSString *__MR_nonnull value);
NSString * __MR_nonnull MR_primaryKeyNameFromString(NSString *__MR_nonnull value);
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
UIColor * __MR_nullable MR_colorFromString(NSString *__MR_nonnull serializedColor);
#else
#import <AppKit/AppKit.h>
NSColor * __MR_nullable MR_colorFromString(NSString *__MR_nonnull serializedColor);
#endif
NSInteger * __MR_nullable MR_newColorComponentsFromString(NSString *__MR_nonnull serializedColor);
|
//
// MagicalImportFunctions.h
// Magical Record
//
// Created by Saul Mora on 3/7/12.
// Copyright (c) 2012 Magical Panda Software LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MagicalRecord/MagicalRecordXcode7CompatibilityMacros.h>
NSDateFormatter * __MR_nonnull MR_dateFormatterWithFormat(NSString *__MR_nonnull format);
NSDate * __MR_nonnull MR_adjustDateForDST(NSDate *__MR_nonnull date);
NSDate * __MR_nonnull MR_dateFromString(NSString *__MR_nonnull value, NSString *__MR_nonnull format);
NSDate * __MR_nonnull MR_dateFromNumber(NSNumber *__MR_nonnull value, BOOL milliseconds);
NSNumber * __MR_nonnull MR_numberFromString(NSString *__MR_nonnull value);
NSString * __MR_nonnull MR_attributeNameFromString(NSString *__MR_nonnull value);
NSString * __MR_nonnull MR_primaryKeyNameFromString(NSString *__MR_nonnull value);
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
UIColor * __MR_nullable MR_colorFromString(NSString *__MR_nonnull serializedColor);
#else
#import <AppKit/AppKit.h>
NSColor * __MR_nullable MR_colorFromString(NSString *__MR_nonnull serializedColor);
#endif
NSInteger * __MR_nullable MR_newColorComponentsFromString(NSString *__MR_nonnull serializedColor);
|
Add the missing nullability annotation
|
Add the missing nullability annotation
|
C
|
mit
|
yiplee/MagicalRecord,yiplee/MagicalRecord
|
9ebc8db0a72fd67a73e7a1e0c371d41b2b1f6bdf
|
main/main_gpio.c
|
main/main_gpio.c
|
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "esp_wifi.h"
#include "esp_system.h"
void app_main(void)
{
gpio_set_direction(GPIO_NUM_5, GPIO_MODE_OUTPUT);
int level = 0;
while (true) {
printf("Hello, world.\n");
gpio_set_level(GPIO_NUM_5, level);
level = !level;
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}
|
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "esp_wifi.h"
#include "esp_system.h"
void app_main(void)
{
gpio_set_direction(GPIO_NUM_5, GPIO_MODE_OUTPUT);
int level = 0;
while (true) {
printf("Hello, world.\n");
gpio_set_level(GPIO_NUM_5, level);
level = !level;
vTaskDelay(500 / portTICK_PERIOD_MS);
}
}
|
Speed up default blink to disambiguate from default program on Sparkfun board.
|
Speed up default blink to disambiguate from default program on Sparkfun board.
|
C
|
apache-2.0
|
cmason1978/esp32-examples,cmason1978/esp32-examples
|
ab28a98e50d0b686a4e4f2343459b2ff4a1812ec
|
include/aerial_autonomy/actions_guards/land_functors.h
|
include/aerial_autonomy/actions_guards/land_functors.h
|
#pragma once
#include <aerial_autonomy/actions_guards/base_functors.h>
#include <aerial_autonomy/logic_states/base_state.h>
#include <aerial_autonomy/robot_systems/uav_system.h>
#include <aerial_autonomy/basic_events.h>
#include <aerial_autonomy/types/completed_event.h>
#include <parsernode/common.h>
using namespace basic_events;
template <class LogicStateMachineT>
struct LandTransitionActionFunctor_
: ActionFunctor<Land, UAVSystem, LogicStateMachineT> {
void run(const Land &, UAVSystem &robot_system, LogicStateMachineT &) {
robot_system.land();
}
};
// TODO (Gowtham) How to abort Land??
template <class LogicStateMachineT>
struct LandInternalActionFunctor_
: InternalActionFunctor<UAVSystem, LogicStateMachineT> {
void run(const InternalTransitionEvent &, UAVSystem &robot_system,
LogicStateMachineT &logic_state_machine) {
parsernode::common::quaddata data = robot_system.getUAVData();
// Can also use uav status here TODO (Gowtham)
if (data.altitude < 0.1) {
logic_state_machine.process_event(Completed());
}
}
};
template <class LogicStateMachineT>
using Landing_ = BaseState<UAVSystem, LogicStateMachineT,
LandInternalActionFunctor_<LogicStateMachineT>>;
|
#pragma once
#include <aerial_autonomy/actions_guards/base_functors.h>
#include <aerial_autonomy/logic_states/base_state.h>
#include <aerial_autonomy/robot_systems/uav_system.h>
#include <aerial_autonomy/basic_events.h>
#include <aerial_autonomy/types/completed_event.h>
#include <parsernode/common.h>
using namespace basic_events;
template <class LogicStateMachineT>
struct LandTransitionActionFunctor_
: ActionFunctor<Land, UAVSystem, LogicStateMachineT> {
void run(const Land &, UAVSystem &robot_system, LogicStateMachineT &) {
robot_system.land();
}
};
// TODO (Gowtham) How to abort Land??
template <class LogicStateMachineT>
struct LandInternalActionFunctor_
: InternalActionFunctor<UAVSystem, LogicStateMachineT> {
void run(const InternalTransitionEvent &, UAVSystem &robot_system,
LogicStateMachineT &logic_state_machine) {
parsernode::common::quaddata data = robot_system.getUAVData();
std::cout << data.altitude << std::endl;
// Can also use uav status here TODO (Gowtham)
if (data.altitude < 0.1) {
logic_state_machine.process_event(Completed());
}
}
};
template <class LogicStateMachineT>
using Landing_ = BaseState<UAVSystem, LogicStateMachineT,
LandInternalActionFunctor_<LogicStateMachineT>>;
|
Add tests for land, takeoff, position control funs
|
Add tests for land, takeoff, position control funs
|
C
|
mpl-2.0
|
jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy
|
68165f179e1e617702fe640ccbeccf2e9eb7b6c3
|
src/aker_mem.c
|
src/aker_mem.c
|
/**
* Copyright 2017 Comcast Cable Communications Management, LLC
*
* 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.
*
*/
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
void *aker_malloc(size_t size)
{
return aker_malloc(size);
}
void aker_free (void *ptr)
{
aker_free(ptr);
}
|
/**
* Copyright 2017 Comcast Cable Communications Management, LLC
*
* 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.
*
*/
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
void *aker_malloc(size_t size)
{
return malloc(size);
}
void aker_free (void *ptr)
{
free(ptr);
}
|
Correct error on previous commit.
|
Correct error on previous commit.
|
C
|
apache-2.0
|
Comcast/aker,Comcast/aker
|
fad2a3cf8fd4c75268dc46bbc7dddb48baeddf14
|
src/datetime.c
|
src/datetime.c
|
/**
* Copyright (c) 2015, Chao Wang <hit9@icloud.com>
*/
#include <time.h>
#include <sys/time.h>
/* Get timestamp (in milliseconds) for now. */
double
datetime_stamp_now(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return (1000000 * tv.tv_sec + tv.tv_usec) / 1000.0;
}
|
/**
* Copyright (c) 2015, Chao Wang <hit9@icloud.com>
*/
#include <assert.h>
#include <time.h>
#include <sys/time.h>
/* Get timestamp (in milliseconds) for now. */
double
datetime_stamp_now(void)
{
#if defined CLOCK_REALTIME
struct timespec ts;
int rc = clock_gettime(CLOCK_REALTIME, &ts);
assert(rc == 0);
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000.0;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
return (1000000 * tv.tv_sec + tv.tv_usec) / 1000.0;
#endif
}
|
Use clock_gettime if have (linux/bsd but not apple)
|
Use clock_gettime if have (linux/bsd but not apple)
|
C
|
bsd-2-clause
|
hit9/C-Snip,hit9/C-Snip
|
d494380487e6ed926ea0ef8a74ec2772022e9bed
|
content/common/child_process_messages.h
|
content/common/child_process_messages.h
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Common IPC messages used for child processes.
// Multiply-included message file, hence no include guard.
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message_macros.h"
#define IPC_MESSAGE_START ChildProcessMsgStart
// Messages sent from the browser to the child process.
// Tells the child process it should stop.
IPC_MESSAGE_CONTROL0(ChildProcessMsg_AskBeforeShutdown)
// Sent in response to ChildProcessHostMsg_ShutdownRequest to tell the child
// process that it's safe to shutdown.
IPC_MESSAGE_CONTROL0(ChildProcessMsg_Shutdown)
#if defined(IPC_MESSAGE_LOG_ENABLED)
// Tell the child process to begin or end IPC message logging.
IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIPCLoggingEnabled,
bool /* on or off */)
#endif
// Messages sent from the child process to the browser.
IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest)
// Get the list of proxies to use for |url|, as a semicolon delimited list
// of "<TYPE> <HOST>:<PORT>" | "DIRECT".
IPC_SYNC_MESSAGE_CONTROL1_2(ChildProcessHostMsg_ResolveProxy,
GURL /* url */,
int /* network error */,
std::string /* proxy list */)
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Common IPC messages used for child processes.
// Multiply-included message file, hence no include guard.
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message_macros.h"
#define IPC_MESSAGE_START ChildProcessMsgStart
// Messages sent from the browser to the child process.
// Tells the child process it should stop.
IPC_MESSAGE_CONTROL0(ChildProcessMsg_AskBeforeShutdown)
// Sent in response to ChildProcessHostMsg_ShutdownRequest to tell the child
// process that it's safe to shutdown.
IPC_MESSAGE_CONTROL0(ChildProcessMsg_Shutdown)
#if defined(IPC_MESSAGE_LOG_ENABLED)
// Tell the child process to begin or end IPC message logging.
IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetIPCLoggingEnabled,
bool /* on or off */)
#endif
// Messages sent from the child process to the browser.
IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest)
// Get the list of proxies to use for |url|, as a semicolon delimited list
// of "<TYPE> <HOST>:<PORT>" | "DIRECT".
IPC_SYNC_MESSAGE_CONTROL1_2(ChildProcessHostMsg_ResolveProxy,
GURL /* url */,
int /* network error */,
std::string /* proxy list */)
|
Add newline at end of file
|
Add newline at end of file
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@78227 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
adobe/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium
|
b2a8283ef2108adcb67e40c8abd5283b59d2b14f
|
Source/MMMarkdown.h
|
Source/MMMarkdown.h
|
//
// MMMarkdown.h
// MMMarkdown
//
// Copyright (c) 2012 Matt Diephouse.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import <Foundation/Foundation.h>
@interface MMMarkdown : NSObject
+ (NSString *)HTMLStringWithMarkdown:(NSString *)string error:(__autoreleasing NSError **)error __attribute__((nonnull(1)));
@end
|
//
// MMMarkdown.h
// MMMarkdown
//
// Copyright (c) 2012 Matt Diephouse.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import <Foundation/Foundation.h>
@interface MMMarkdown : NSObject
/*! Converts a Markdown string to HTML.
*
* @param string A Markdown string. Must not be nil.
* @param error Out parameter used if an error occurs while parsing the Markdown. May be NULL.
* @return An HTML string.
*/
+ (NSString *)HTMLStringWithMarkdown:(NSString *)string error:(__autoreleasing NSError **)error __attribute__((nonnull(1)));
@end
|
Add documentation that Xcode can find
|
Add documentation that Xcode can find
|
C
|
mit
|
jonesgithub/MMMarkdown,isaacroldan/MMMarkdown,mobilejazz/MMMarkdown,isaacroldan/AttributedMarkdown,albertbori/MMMarkdown,iosdev-republicofapps/MMMarkdown,gonefish/MMMarkdown,1aurabrown/MMMarkdown,1aurabrown/MMMarkdown,mdiep/MMMarkdown,isaacroldan/AttributedMarkdown,mobilejazz/MMMarkdown,AgileBits/MMMarkdown,isaacroldan/AttributedMarkdown,gonefish/MMMarkdown,iosdev-republicofapps/MMMarkdown,albertbori/MMMarkdown,jonesgithub/MMMarkdown,cnbin/MMMarkdown,AgileBits/MMMarkdown,isaacroldan/MMMarkdown,albertbori/MMMarkdown,mjzac/MMMarkdown,isaacroldan/AttributedMarkdown,isaacroldan/AttributedMarkdown,babbage/MMMarkdown,mdiep/MMMarkdown,babbage/MMMarkdown,cnbin/MMMarkdown,mjzac/MMMarkdown
|
ac59c3f410a9fbebed551cb0c05bfcf047adb2c4
|
TDTChocolate/TestingAdditions/XCTAssert+TDTAdditions.h
|
TDTChocolate/TestingAdditions/XCTAssert+TDTAdditions.h
|
#import <Foundation/Foundation.h>
/**
Custom asserts that provide better error messages when the assert fails.
*/
/**
Assert that @p array contains @p object
*/
#define TDTXCTAssertContains(array, object) \
XCTAssertTrue([(array) containsObject:(object)], @"Expected %@ to contain %@", (array), (object))
/**
Assert that @p string contains @p substring
*/
#define TDTXCTAssertContainsString(string, substring) \
XCTAssertTrue([(string) tdt_containsString:(substring)], @"Expected %@ to contain %@", (string), (substring))
/**
Assert that @p a is <= @p b.
*/
#define TDTXCTAssertEarlierEqualDate(a, b) \
XCTAssertTrue([(a) tdt_isEarlierThanOrEqualToDate:(b)], @"Expected %@ to be earlier than or same as %@", (a), (b))
|
#import <Foundation/Foundation.h>
/**
Custom asserts that provide better error messages when the assert fails.
*/
/**
Assert that @p array contains @p object
*/
#define TDTXCTAssertContains(array, object) \
XCTAssertTrue([(array) containsObject:(object)], @"Expected %@ to contain %@", (array), (object))
/**
Assert that @p string contains @p substring
*/
#define TDTXCTAssertContainsString(string, substring) \
XCTAssertTrue([(string) tdt_containsString:(substring)], @"Expected %@ to contain %@", (string), (substring))
/**
Assert that @p a is <= @p b.
*/
#define TDTXCTAssertEarlierThanOrEqualToDate(a, b) \
XCTAssertTrue([(a) tdt_isEarlierThanOrEqualToDate:(b)], @"Expected %@ to be earlier than or equal to %@", (a), (b))
|
Rename the custom assert name to reflect the underlying method
|
Rename the custom assert name to reflect the underlying method
|
C
|
bsd-3-clause
|
talk-to/Chocolate,talk-to/Chocolate
|
c72770ef3ba510bd83746aadbc3aa1b7e6b328bf
|
src/math/p_inv.c
|
src/math/p_inv.c
|
#include <pal.h>
/**
*
* Element wise inversion (reciprocal) of elements in 'a'.
*
* @param a Pointer to input vector
*
* @param c Pointer to output vector
*
* @param n Size of 'a' and 'c' vector.
*
* @param p Number of processor to use (task parallelism)
*
* @param team Team to work with
*
* @return None
*
*/
#include <math.h>
void p_inv_f32(const float *a, float *c, int n, int p, p_team_t team)
{
int i;
float cur;
for (i = 0; i < n; i++) {
cur = *(a + i);
union {
float f;
uint32_t x;
} u = {cur};
/* First approximation */
u.x = 0x7EF312AC - u.x;
/* Refine */
u.f = u.f * (2 - u.f * cur);
u.f = u.f * (2 - u.f * cur);
*(c + i) = u.f;
}
}
|
#include <pal.h>
/**
*
* Element wise inversion (reciprocal) of elements in 'a'.
*
* @param a Pointer to input vector
*
* @param c Pointer to output vector
*
* @param n Size of 'a' and 'c' vector.
*
* @param p Number of processor to use (task parallelism)
*
* @param team Team to work with
*
* @return None
*
*/
#include <math.h>
void p_inv_f32(const float *a, float *c, int n, int p, p_team_t team)
{
int i;
float cur;
for (i = 0; i < n; i++) {
cur = *(a + i);
union {
float f;
uint32_t x;
} u = {cur};
/* First approximation */
u.x = 0x7EF312AC - u.x;
/* Refine */
u.f = u.f * (2 - u.f * cur);
u.f = u.f * (2 - u.f * cur);
*(c + i) = u.f;
}
}
|
Use spaces instead of tabs
|
Use spaces instead of tabs
|
C
|
apache-2.0
|
debug-de-su-ka/pal,parallella/pal,Adamszk/pal3,Adamszk/pal3,olajep/pal,Adamszk/pal3,parallella/pal,mateunho/pal,8l/pal,aolofsson/pal,RafaelRMA/pal,debug-de-su-ka/pal,eliteraspberries/pal,mateunho/pal,mateunho/pal,aolofsson/pal,mateunho/pal,eliteraspberries/pal,debug-de-su-ka/pal,aolofsson/pal,eliteraspberries/pal,parallella/pal,RafaelRMA/pal,olajep/pal,8l/pal,debug-de-su-ka/pal,8l/pal,RafaelRMA/pal,parallella/pal,parallella/pal,Adamszk/pal3,eliteraspberries/pal,olajep/pal,8l/pal,aolofsson/pal,olajep/pal,debug-de-su-ka/pal,eliteraspberries/pal,RafaelRMA/pal,mateunho/pal
|
7ca370ebec19fe07ddee0dbea32c99c386ac7078
|
Sources/SPTPersistentCacheFileManager+Private.h
|
Sources/SPTPersistentCacheFileManager+Private.h
|
#import "SPTPersistentCacheFileManager.h"
#import <SPTPersistentCache/SPTPersistentCacheOptions.h>
NS_ASSUME_NONNULL_BEGIN
/// Private interface exposed for testability.
@interface SPTPersistentCacheFileManager ()
@property (nonatomic, copy, readonly) SPTPersistentCacheOptions *options;
@property (nonatomic, copy, readonly, nullable) SPTPersistentCacheDebugCallback debugOutput;
@property (nonatomic, strong, readonly) NSFileManager *fileManager;
@end
NS_ASSUME_NONNULL_END
|
/*
* Copyright (c) 2016 Spotify AB.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
#import "SPTPersistentCacheFileManager.h"
#import <SPTPersistentCache/SPTPersistentCacheOptions.h>
NS_ASSUME_NONNULL_BEGIN
/// Private interface exposed for testability.
@interface SPTPersistentCacheFileManager ()
@property (nonatomic, copy, readonly) SPTPersistentCacheOptions *options;
@property (nonatomic, copy, readonly, nullable) SPTPersistentCacheDebugCallback debugOutput;
@property (nonatomic, strong, readonly) NSFileManager *fileManager;
@end
NS_ASSUME_NONNULL_END
|
Add license header to private file manager header
|
Add license header to private file manager header
|
C
|
apache-2.0
|
FootballAddicts/SPTPersistentCache,FootballAddicts/SPTPersistentCache,chrisbtreats/SPTPersistentCache,chrisbtreats/SPTPersistentCache,spotify/SPTPersistentCache,FootballAddicts/SPTPersistentCache,spotify/SPTPersistentCache,spotify/SPTPersistentCache,chrisbtreats/SPTPersistentCache,FootballAddicts/SPTPersistentCache,chrisbtreats/SPTPersistentCache
|
c4551d3d21053281cb36d89796948c9957b708b4
|
include/llvm/System/Atomic.h
|
include/llvm/System/Atomic.h
|
//===- llvm/System/Atomic.h - Atomic Operations -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the llvm::sys atomic operations.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_SYSTEM_ATOMIC_H
#define LLVM_SYSTEM_ATOMIC_H
#include <stdint.h>
namespace llvm {
namespace sys {
void MemoryFence();
typedef uint32_t cas_flag;
cas_flag CompareAndSwap(volatile cas_flag* ptr,
cas_flag new_value,
cas_flag old_value);
}
}
#endif
|
//===- llvm/System/Atomic.h - Atomic Operations -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the llvm::sys atomic operations.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_SYSTEM_ATOMIC_H
#define LLVM_SYSTEM_ATOMIC_H
#include "llvm/Support/DataTypes.h"
namespace llvm {
namespace sys {
void MemoryFence();
typedef uint32_t cas_flag;
cas_flag CompareAndSwap(volatile cas_flag* ptr,
cas_flag new_value,
cas_flag old_value);
}
}
#endif
|
Use DataTypes.h instead of stdint.h.
|
Use DataTypes.h instead of stdint.h.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@72201 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm
|
7c043e3049a6ec1b718208221ea4eed0d74e1ecd
|
bindings/f95/plflt.c
|
bindings/f95/plflt.c
|
/* Auxiliary program: write the include file for determining
PLplot's floating-point type
*/
#include <stdio.h>
#include <stdlib.h>
#include "plConfig.h"
main(int argc, char *argv[] )
{
FILE *outfile;
char *kind;
outfile = fopen( "plflt.inc", "w" ) ;
#ifdef PL_DOUBLE
kind = "1.0d0";
#else
kind = "1.0";
#endif
fprintf( outfile, "C NOTE: Generated code\n");
fprintf( outfile, "C\n");
fprintf( outfile, "C Type of floating-point numbers in PLplot\n");
fprintf( outfile, "C\n");
fprintf( outfile, " integer, parameter :: plf = kind(%s)\n", kind);
fprintf( outfile, " integer, parameter :: plflt = plf\n");
fclose( outfile);
}
|
/* Auxiliary program: write the include file for determining
PLplot's floating-point type
*/
#include <stdio.h>
#include <stdlib.h>
#include "plConfig.h"
main(int argc, char *argv[] )
{
FILE *outfile;
char *kind;
outfile = fopen( "plflt.inc", "w" ) ;
#ifdef PL_DOUBLE
kind = "1.0d0";
#else
kind = "1.0";
#endif
fprintf( outfile, "! NOTE: Generated code\n");
fprintf( outfile, "!\n");
fprintf( outfile, "! Type of floating-point numbers in PLplot\n");
fprintf( outfile, "!\n");
fprintf( outfile, " integer, parameter :: plf = kind(%s)\n", kind);
fprintf( outfile, " integer, parameter :: plflt = plf\n");
fclose( outfile);
}
|
Transform the fortran result of this executable to free form.
|
Transform the fortran result of this executable to free form.
svn path=/trunk/; revision=6513
|
C
|
lgpl-2.1
|
FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot
|
5394589f53072a71942a11695470d7ca97ab7a70
|
tests/testTime.c
|
tests/testTime.c
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
int main(int argc, char **argv) {
struct timeval tv;
struct timezone tz;
struct tm *tm;
gettimeofday(&tv, &tz);
tm = localtime(&tv.tv_sec);
char timestr[128];
size_t length = strftime(timestr, 128, "%F %T", tm);
snprintf(timestr+length, 128-length, ".%ld", tv.tv_usec/1000);
printf("Time string: %s\n", timestr);
}
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include "../../bluez-5.28/lib/bluetooth.h"
int main(int argc, char **argv) {
struct timeval tv;
struct timezone tz;
struct tm *tm;
gettimeofday(&tv, &tz);
tm = localtime(&tv.tv_sec);
char timestr[128];
size_t length = strftime(timestr, 128, "%F %T", tm);
snprintf(timestr+length, 128-length, ".%ld", tv.tv_usec/1000);
printf("Time string: %s\n", timestr);
long ms = htobl(tv.tv_sec)*1000 + htobl(tv.tv_usec)/1000;
int64_t ms64 = htobl(tv.tv_sec)*1000 + htobl(tv.tv_usec)/1000;
printf("Sizeof(long) = %d, ms=%ld, ms64=%ld\n", sizeof(ms), ms, ms64);
}
|
Test long size and timeval to long conversion
|
Test long size and timeval to long conversion
|
C
|
apache-2.0
|
starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser
|
53ed2c4576f6e25c3c409d61c1f59b7221631554
|
Source/Core/Helpers/HCReturnTypeHandler.h
|
Source/Core/Helpers/HCReturnTypeHandler.h
|
//
// OCHamcrest - HCReturnTypeHandler.h
// Copyright 2014 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest
//
#import <Foundation/Foundation.h>
@interface HCReturnTypeHandler : NSObject
@property (nonatomic, strong) HCReturnTypeHandler *successor;
- (instancetype)initWithType:(char const *)handlerType;
- (id)valueForReturnType:(char const *)type fromInvocation:(NSInvocation *)invocation;
@end
|
//
// OCHamcrest - HCReturnTypeHandler.h
// Copyright 2014 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest
//
#import <Foundation/Foundation.h>
/**
Chain-of-responsibility for handling NSInvocation return types.
*/
@interface HCReturnTypeHandler : NSObject
@property (nonatomic, strong) HCReturnTypeHandler *successor;
- (instancetype)initWithType:(char const *)handlerType;
- (id)valueForReturnType:(char const *)type fromInvocation:(NSInvocation *)invocation;
@end
|
Add comment to explicitly identify Chain of Responsibility
|
Add comment to explicitly identify Chain of Responsibility
|
C
|
bsd-2-clause
|
hamcrest/OCHamcrest,hamcrest/OCHamcrest,klundberg/OCHamcrest,klundberg/OCHamcrest,hamcrest/OCHamcrest
|
f90bb76d0ea96d1a6115fec0f5a922832b02759c
|
Interfaces/WorldLogicInterface.h
|
Interfaces/WorldLogicInterface.h
|
/**
* For conditions of distribution and use, see copyright notice in license.txt
*
* @file WorldLogicInterface.h
* @brief
*/
#include "ServiceInterface.h"
#ifndef incl_Interfaces_WorldLogicInterface_h
#define incl_Interfaces_WorldLogicInterface_h
#include "ForwardDefines.h"
#include <QObject>
class QString;
namespace Foundation
{
class WorldLogicInterface : public QObject, public ServiceInterface
{
Q_OBJECT
public:
/// Default constructor.
WorldLogicInterface() {}
/// Destructor.
virtual ~WorldLogicInterface() {}
/// Returns user's avatar entity.
virtual Scene::EntityPtr GetUserAvatarEntity() const = 0;
/// Returns currently active camera entity.
virtual Scene::EntityPtr GetCameraEntity() const = 0;
/// Returns entity with certain entity component in it or null if not found.
/// @param entity_id Entity ID.
/// @param component Type name of the component.
virtual Scene::EntityPtr GetEntityWithComponent(uint entity_id, const QString &component) const = 0;
/// Hack function for getting EC_AvatarAppearance info to UiModule
virtual const QString &GetAvatarAppearanceProperty(const QString &name) const = 0;
signals:
/// Emitted just before we start to delete world (scene).
void AboutToDeleteWorld();
};
}
#endif
|
/**
* For conditions of distribution and use, see copyright notice in license.txt
*
* @file WorldLogicInterface.h
* @brief
*/
#ifndef incl_Interfaces_WorldLogicInterface_h
#define incl_Interfaces_WorldLogicInterface_h
#include "ServiceInterface.h"
#include "ForwardDefines.h"
#include <QObject>
class QString;
namespace Foundation
{
class WorldLogicInterface : public QObject, public ServiceInterface
{
Q_OBJECT
public:
/// Default constructor.
WorldLogicInterface() {}
/// Destructor.
virtual ~WorldLogicInterface() {}
/// Returns user's avatar entity.
virtual Scene::EntityPtr GetUserAvatarEntity() const = 0;
/// Returns currently active camera entity.
virtual Scene::EntityPtr GetCameraEntity() const = 0;
/// Returns entity with certain entity component in it or null if not found.
/// @param entity_id Entity ID.
/// @param component Type name of the component.
virtual Scene::EntityPtr GetEntityWithComponent(uint entity_id, const QString &component) const = 0;
/// Hack function for getting EC_AvatarAppearance info to UiModule
virtual const QString &GetAvatarAppearanceProperty(const QString &name) const = 0;
signals:
/// Emitted just before we start to delete world (scene).
void AboutToDeleteWorld();
};
}
#endif
|
Move include within include guards.
|
Move include within include guards.
|
C
|
apache-2.0
|
antont/tundra,jesterKing/naali,antont/tundra,realXtend/tundra,BogusCurry/tundra,realXtend/tundra,pharos3d/tundra,pharos3d/tundra,BogusCurry/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,jesterKing/naali,antont/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,jesterKing/naali,realXtend/tundra,BogusCurry/tundra,pharos3d/tundra,antont/tundra,jesterKing/naali,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,BogusCurry/tundra,realXtend/tundra,antont/tundra,jesterKing/naali,pharos3d/tundra,AlphaStaxLLC/tundra,jesterKing/naali,realXtend/tundra,pharos3d/tundra,antont/tundra,pharos3d/tundra,realXtend/tundra,AlphaStaxLLC/tundra,antont/tundra,jesterKing/naali
|
b6656313eafd4a1742b9449c9886624f5a83d5aa
|
content/browser/renderer_host/quota_dispatcher_host.h
|
content/browser/renderer_host/quota_dispatcher_host.h
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#include "base/basictypes.h"
#include "content/browser/browser_message_filter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h"
class GURL;
class QuotaDispatcherHost : public BrowserMessageFilter {
public:
~QuotaDispatcherHost();
bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok);
private:
void OnQueryStorageUsageAndQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type);
void OnRequestStorageQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type,
int64 requested_size);
};
#endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#include "base/basictypes.h"
#include "content/browser/browser_message_filter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h"
class GURL;
class QuotaDispatcherHost : public BrowserMessageFilter {
public:
~QuotaDispatcherHost();
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok);
private:
void OnQueryStorageUsageAndQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type);
void OnRequestStorageQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type,
int64 requested_size);
};
#endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
|
Fix clang build that have been broken by 81364.
|
Fix clang build that have been broken by 81364.
BUG=none
TEST=green tree
TBR=jam
Review URL: http://codereview.chromium.org/6838008
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@81368 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium
|
27cf500cbbf4672c98f4d31442bfba689cd0d508
|
stag.c
|
stag.c
|
// stdio for file I/O
#include <stdio.h>
int main(int argc, char *argv[]) {
int status = 1;
float value;
while(status != EOF) {
status = fscanf(stdin, "%f\n", &value);
if(status == 1)
fprintf(stdout, "%f\n", value);
else
fprintf(stdout, "Error reading data (%d)\n", status);
}
}
|
// stdio for file I/O
#include <stdio.h>
#define HISTORY_SIZE 5
void print_values(float *values, int current_i) {
// Print values to stdout, starting from one after newest (oldest) and
// circle around to newest
int i = current_i;
for(i = current_i; i < current_i + HISTORY_SIZE; i++) {
fprintf(stdout, "%.1f, ", values[i%HISTORY_SIZE]);
}
fprintf(stdout, "\n");
}
int main(int argc, char *argv[]) {
int status = 1;
int values_i = 0;
float v;
float values[HISTORY_SIZE];
// Read floats to values, circle around after filling buffer
while(status != EOF) {
status = fscanf(stdin, "%f\n", &v);
if(status == 1) {
values[values_i] = v;
values_i = (values_i+1) % HISTORY_SIZE;
print_values(values, values_i);
//fprintf(stdout, "%f\n", v);
} else {
fprintf(stdout, "Error reading data (%d)\n", status);\
}
}
}
|
Save value history as circular array, print function for debug
|
Save value history as circular array, print function for debug
|
C
|
bsd-3-clause
|
seenaburns/stag
|
a07bd876a0486a1adfcf319dc39001d73183db9f
|
grantlee_defaultfilters/join.h
|
grantlee_defaultfilters/join.h
|
/*
Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
*/
#ifndef JOINFILTER_H
#define JOINFILTER_H
#include "filter.h"
using namespace Grantlee;
class GRANTLEE_EXPORT JoinFilter : public Filter
{
Q_OBJECT
public:
JoinFilter(QObject *parent = 0);
Grantlee::SafeString doFilter(const QVariant &input, const Grantlee::SafeString &argument = QString(), bool autoescape=false) const;
};
#endif
|
/*
Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
*/
#ifndef JOINFILTER_H
#define JOINFILTER_H
#include "filter.h"
using namespace Grantlee;
class GRANTLEE_EXPORT JoinFilter : public Filter
{
Q_OBJECT
public:
JoinFilter(QObject *parent = 0);
Grantlee::SafeString doFilter(const QVariant &input, const Grantlee::SafeString &argument = QString(), bool autoescape=false) const;
bool isSafe() { return true; }
};
#endif
|
Join is a safe filter.
|
Join is a safe filter.
|
C
|
lgpl-2.1
|
simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,simonwagner/grantlee
|
e0891a9816316b5e05fd5b0453ffe9fd6a56f489
|
include/asm-generic/getorder.h
|
include/asm-generic/getorder.h
|
#ifndef __ASM_GENERIC_GETORDER_H
#define __ASM_GENERIC_GETORDER_H
#ifndef __ASSEMBLY__
#include <linux/compiler.h>
/* Pure 2^n version of get_order */
static inline __attribute_const__ int get_order(unsigned long size)
{
int order;
size = (size - 1) >> (PAGE_SHIFT - 1);
order = -1;
do {
size >>= 1;
order++;
} while (size);
return order;
}
#endif /* __ASSEMBLY__ */
#endif /* __ASM_GENERIC_GETORDER_H */
|
#ifndef __ASM_GENERIC_GETORDER_H
#define __ASM_GENERIC_GETORDER_H
#ifndef __ASSEMBLY__
#include <linux/compiler.h>
/**
* get_order - Determine the allocation order of a memory size
* @size: The size for which to get the order
*
* Determine the allocation order of a particular sized block of memory. This
* is on a logarithmic scale, where:
*
* 0 -> 2^0 * PAGE_SIZE and below
* 1 -> 2^1 * PAGE_SIZE to 2^0 * PAGE_SIZE + 1
* 2 -> 2^2 * PAGE_SIZE to 2^1 * PAGE_SIZE + 1
* 3 -> 2^3 * PAGE_SIZE to 2^2 * PAGE_SIZE + 1
* 4 -> 2^4 * PAGE_SIZE to 2^3 * PAGE_SIZE + 1
* ...
*
* The order returned is used to find the smallest allocation granule required
* to hold an object of the specified size.
*
* The result is undefined if the size is 0.
*
* This function may be used to initialise variables with compile time
* evaluations of constants.
*/
static inline __attribute_const__ int get_order(unsigned long size)
{
int order;
size = (size - 1) >> (PAGE_SHIFT - 1);
order = -1;
do {
size >>= 1;
order++;
} while (size);
return order;
}
#endif /* __ASSEMBLY__ */
#endif /* __ASM_GENERIC_GETORDER_H */
|
Adjust the comment on get_order() to describe the size==0 case
|
bitops: Adjust the comment on get_order() to describe the size==0 case
Adjust the comment on get_order() to note that the result of passing a size of
0 results in an undefined value.
Signed-off-by: David Howells <ebac1d06c1688626821bb0e574a037a7a5354e49@redhat.com>
Link: bda992bc1329f96689c6a1f1fe8e9514639fac43@warthog.procyon.org.uk
Acked-by: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>
Signed-off-by: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
bb1883ff25f52e7f65b31ea9582842b18af0c336
|
file4.c
|
file4.c
|
file4.c - r1
Test checkin in master1-updated
Test checkin in master2
|
file4.c - r1
Test checkin in master1-updated - updated_by_master
Test checkin in master2
Test checkin in master3
Test checkin in master4
|
Test commit in master4 branch
|
Test commit in master4 branch
|
C
|
apache-2.0
|
shahedmolla/test
|
410ddc6b7c4c652769e924bb66fa9d5fd1221cea
|
PDKTModelBuilder/CoreData/NSManagedObject+PDKTModelBuilder.h
|
PDKTModelBuilder/CoreData/NSManagedObject+PDKTModelBuilder.h
|
//
// NSManagedObject+PDKTUtils.h
// PDKTModelBuilder
//
// Created by Daniel García García on 31/08/14.
// Copyright (c) 2014 Produkt. All rights reserved.
//
#import <CoreData/CoreData.h>
#import "PDKTModelBuilderEntity.h"
@protocol PDKTModelBuilderCoreDataEntity <PDKTModelBuilderEntity>
@optional
@property (strong, nonatomic) NSDate *entityUpdateDate;
@end
@class PDKTEntityDataParser;
@interface NSManagedObject (PDKTModelBuilderEntityDefault)
+ (NSString *)defaultEntityIdPropertyName;
@end
@interface NSManagedObject (PDKTModelBuilder)
+ (instancetype)updateOrInsertIntoManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withDictionary:(NSDictionary *)dictionary;
+ (instancetype)insertIntoManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withDictionary:(NSDictionary *)dictionary;
+ (instancetype)fetchObjectWithValue:(id)value forKey:(NSString *)key inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext;
+ (NSString *)objectIdWithDictionary:(NSDictionary *)dictionary;
@end
|
//
// NSManagedObject+PDKTUtils.h
// PDKTModelBuilder
//
// Created by Daniel García García on 31/08/14.
// Copyright (c) 2014 Produkt. All rights reserved.
//
#import <CoreData/CoreData.h>
#import "PDKTModelBuilderEntity.h"
@protocol PDKTModelBuilderCoreDataEntity <PDKTModelBuilderEntity>
@optional
@property (strong, nonatomic) NSDate *entityUpdateDate;
@property (strong, nonatomic) NSNumber *order;
@end
@class PDKTEntityDataParser;
@interface NSManagedObject (PDKTModelBuilderEntityDefault)
+ (NSString *)defaultEntityIdPropertyName;
@end
@interface NSManagedObject (PDKTModelBuilder)
+ (instancetype)updateOrInsertIntoManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withDictionary:(NSDictionary *)dictionary;
+ (instancetype)insertIntoManagedObjectContext:(NSManagedObjectContext *)managedObjectContext withDictionary:(NSDictionary *)dictionary;
+ (instancetype)fetchObjectWithValue:(id)value forKey:(NSString *)key inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext;
+ (NSString *)objectIdWithDictionary:(NSDictionary *)dictionary;
@end
|
Add order property to protocol
|
Add order property to protocol
|
C
|
mit
|
antjimar/PDKTModelBuilder
|
2f0d82a50ba16300dff596f6ddc7c957f803179a
|
ports/raspberrypi/boards/challenger_nb_rp2040_wifi/mpconfigboard.h
|
ports/raspberrypi/boards/challenger_nb_rp2040_wifi/mpconfigboard.h
|
#define MICROPY_HW_BOARD_NAME "Challenger NB RP2040 WiFi"
#define MICROPY_HW_MCU_NAME "rp2040"
#define DEFAULT_UART_BUS_TX (&pin_GPIO16)
#define DEFAULT_UART_BUS_RX (&pin_GPIO17)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO22)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO23)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO24)
|
#define MICROPY_HW_BOARD_NAME "Challenger NB RP2040 WiFi"
#define MICROPY_HW_MCU_NAME "rp2040"
#define DEFAULT_UART_BUS_TX (&pin_GPIO16)
#define DEFAULT_UART_BUS_RX (&pin_GPIO17)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
|
Disable board.SPI() for Challenger NB RP2040 WiFi
|
Disable board.SPI() for Challenger NB RP2040 WiFi
This was done as a result of an issue with the SPI pin mappings.
Please refer to the following for additional information: https://ilabs.se/challenger-rp2040-wifi-spi-bug
|
C
|
mit
|
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
|
a8904687f65f794ab5d01c58c6f9beeda5742325
|
kernel/libc/newlib/newlib_isatty.c
|
kernel/libc/newlib/newlib_isatty.c
|
/* KallistiOS ##version##
newlib_isatty.c
Copyright (C)2004 Dan Potter
*/
#include <sys/reent.h>
int isatty(int fd) {
return 0;
}
int _isatty_r(struct _reent *reent, int fd) {
return 0;
}
|
/* KallistiOS ##version##
newlib_isatty.c
Copyright (C) 2004 Dan Potter
Copyright (C) 2012 Lawrence Sebald
*/
#include <sys/reent.h>
int isatty(int fd) {
/* Make sure that stdin, stdout, and stderr are shown as ttys, otherwise
they won't be set as line-buffered. */
if(fd >= 0 && fd <= 2) {
return 1;
}
return 0;
}
int _isatty_r(struct _reent *reent, int fd) {
/* Make sure that stdin, stdout, and stderr are shown as ttys, otherwise
they won't be set as line-buffered.*/
if(fd >= 0 && fd <= 2) {
return 1;
}
return 0;
}
|
Make it so that stdin/stdout/stderr will be set as line buffered (newlib has to think they're ttys if we have fcntl, which we do now).
|
Make it so that stdin/stdout/stderr will be set as line buffered (newlib has to think they're ttys if we have fcntl, which we do now).
|
C
|
bsd-3-clause
|
DreamcastSDK/kos,DreamcastSDK/kos,DreamcastSDK/kos
|
3cc120b985c7134fd6c3d2a40bab85711b2da4ee
|
Runtime/Rendering/LightingPass.h
|
Runtime/Rendering/LightingPass.h
|
#pragma once
#include "Rendering/RenderingPass.h"
#include "Math/Vector3.h"
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
Vector3 LightRadiance;
Vector3 LightDirection;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
}
|
#pragma once
#include "Rendering/RenderingPass.h"
#include "Math/Vector3.h"
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
Vector3 LightDirection;
Vector3 LightRadiance;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
}
|
Reorder light params buffer struct
|
Reorder light params buffer struct
|
C
|
mit
|
HoRangDev/MileEngine,HoRangDev/MileEngine
|
e9148261b2105762119d5fecae3ef88d653d519f
|
src/condor_includes/condor_fix_timeval.h
|
src/condor_includes/condor_fix_timeval.h
|
#ifndef TIMEVAL_H
#define TIMEVAL_H
#if defined(ULTRIX42) || defined(ULTRIX43) || defined(HPUX9)
#if !defined(_ALL_SOURCE)
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
struct itimerval {
struct timeval it_interval; /* timer interval */
struct timeval it_value; /* current value */
};
#endif /* _ALL_SOURCE */
#else
#include <sys/time.h>
#endif
#endif
|
#ifndef TIMEVAL_H
#define TIMEVAL_H
#if defined(ULTRIX43) && !defined(_ALL_SOURCE)
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
struct itimerval {
struct timeval it_interval; /* timer interval */
struct timeval it_value; /* current value */
};
#else
# include <sys/time.h>
#endif
#endif
|
Simplify a bit as special treatment is no longer needed for HPUX.
|
Simplify a bit as special treatment is no longer needed for HPUX.
|
C
|
apache-2.0
|
zhangzhehust/htcondor,htcondor/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/condor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,neurodebian/htcondor,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,neurodebian/htcondor,neurodebian/htcondor,djw8605/htcondor,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,djw8605/condor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,clalancette/condor-dcloud,djw8605/condor,mambelli/osg-bosco-marco,djw8605/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,djw8605/condor,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/htcondor,clalancette/condor-dcloud,htcondor/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,htcondor/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,zhangzhehust/htcondor,djw8605/condor,djw8605/condor,htcondor/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,neurodebian/htcondor,neurodebian/htcondor,djw8605/condor,bbockelm/condor-network-accounting
|
c0d5cbad61bdde819a3d6c04e5b174fc85384343
|
src/modules/conf_randr/e_smart_monitor.h
|
src/modules/conf_randr/e_smart_monitor.h
|
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_MONITOR_H
# define E_SMART_MONITOR_H
Evas_Object *e_smart_monitor_add(Evas *evas);
void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch);
void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output);
void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid, Evas_Coord gx, Evas_Coord gy, Evas_Coord gw, Evas_Coord gh);
void e_smart_monitor_virtual_size_set(Evas_Object *obj, Evas_Coord vw, Evas_Coord vh);
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
# endif
#endif
|
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_MONITOR_H
# define E_SMART_MONITOR_H
Evas_Object *e_smart_monitor_add(Evas *evas);
void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch);
void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output);
void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid, Evas_Coord gx, Evas_Coord gy, Evas_Coord gw, Evas_Coord gh);
void e_smart_monitor_grid_virtual_size_set(Evas_Object *obj, Evas_Coord vw, Evas_Coord vh);
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
void e_smart_monitor_current_geometry_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
# endif
#endif
|
Add function prototype for setting current geometry. Rename function prototype for grid virtual size set.
|
Add function prototype for setting current geometry.
Rename function prototype for grid virtual size set.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 84195
|
C
|
bsd-2-clause
|
FlorentRevest/Enlightenment,rvandegrift/e,tasn/enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment
|
6ce734489e2bef9002541cc45c29aad582e08f32
|
Analytics/SEGEcommerce.h
|
Analytics/SEGEcommerce.h
|
//
// SEGEcommerce.h
// Analytics
//
// Created by Travis Jeffery on 7/17/14.
// Copyright (c) 2014 Segment.io. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol SEGEcommerce <NSObject>
- (void)viewedProduct;
- (void)removedProduct;
- (void)addedProduct;
- (void)completedOrder;
@end
|
//
// SEGEcommerce.h
// Analytics
//
// Created by Travis Jeffery on 7/17/14.
// Copyright (c) 2014 Segment.io. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol SEGEcommerce <NSObject>
@optional
- (void)viewedProduct:(NSDictionary *)properties;
- (void)removedProduct:(NSDictionary *)properties;
- (void)addedProduct:(NSDictionary *)properties;
- (void)completedOrder:(NSDictionary *)properties;
@end
|
Fix ecommerce methods to take properties dictionary
|
Fix ecommerce methods to take properties dictionary
Acked-by: Travis Jeffery <546b05909706652891a87f7bfe385ae147f61f91@travisjeffery.com>
|
C
|
mit
|
rudywen/analytics-ios,jlandon/analytics-ios,jtomson-mdsol/analytics-ios,hzalaz/analytics-ios,cfraz89/analytics-ios,jlandon/analytics-ios,operator/analytics-ios,orta/analytics-ios,hzalaz/analytics-ios,abodo-dev/analytics-ios,segmentio/analytics-ios,dbachrach/analytics-ios,dcaunt/analytics-ios,string-team/analytics-ios,lumoslabs/analytics-ios,dcaunt/analytics-ios,vinod1988/analytics-ios,rudywen/analytics-ios,cfraz89/analytics-ios,abodo-dev/analytics-ios,jonathannorris/analytics-ios,abodo-dev/analytics-ios,cfraz89/analytics-ios,djfink-carglass/analytics-ios,rudywen/analytics-ios,graingert/analytics-ios,jonathannorris/analytics-ios,ldiqual/analytics-ios,jonathannorris/analytics-ios,operator/analytics-ios,dcaunt/analytics-ios,string-team/analytics-ios,vinod1988/analytics-ios,ldiqual/analytics-ios,lumoslabs/analytics-ios,lumoslabs/analytics-ios,djfink-carglass/analytics-ios,jtomson-mdsol/analytics-ios,vinod1988/analytics-ios,segmentio/analytics-ios,graingert/analytics-ios,hzalaz/analytics-ios,segmentio/analytics-ios,orta/analytics-ios,dbachrach/analytics-ios,jtomson-mdsol/analytics-ios,string-team/analytics-ios,segmentio/analytics-ios,ldiqual/analytics-ios,orta/analytics-ios,dbachrach/analytics-ios,operator/analytics-ios,jlandon/analytics-ios,djfink-carglass/analytics-ios,graingert/analytics-ios
|
0ae1522b36e4f7fbea3770d108a10d4bc784d26f
|
include/franka/lowpass_filter.h
|
include/franka/lowpass_filter.h
|
// Copyright (c) 2017 Franka Emika GmbH
// Use of this source code is governed by the Apache-2.0 license, see LICENSE
#pragma once
#include <cmath>
/**
* @file lowpass_filter.h
* Contains functions for filtering signals with a low-pass filter.
*/
namespace franka {
/**
* Maximum cutoff frequency
*/
constexpr double kMaxCutoffFrequency = 1000.0;
/**
* Default cutoff frequency
*/
constexpr double kDefaultCutoffFrequency = 100.0;
/**
* Applies a first-order low-pass filter
*
* @param[in] sample_time Sample time constant
* @param[in] y Current value of the signal to be filtered
* @param[in] y_last Value of the signal to be filtered in the previous time step
* @param[in] cutoff_frequency Cutoff frequency of the low-pass filter
*
* @return Filtered value.
*/
inline double lowpassFilter(double sample_time, double y, double y_last, double cutoff_frequency) {
double gain = sample_time / (sample_time + (1.0 / (2.0 * M_PI * cutoff_frequency)));
return gain * y + (1 - gain) * y_last;
}
} // namespace franka
|
// Copyright (c) 2017 Franka Emika GmbH
// Use of this source code is governed by the Apache-2.0 license, see LICENSE
#pragma once
#include <cmath>
/**
* @file lowpass_filter.h
* Contains functions for filtering signals with a low-pass filter.
*/
namespace franka {
/**
* Maximum cutoff frequency
*/
constexpr double kMaxCutoffFrequency = 1000.0;
/**
* Default cutoff frequency
*/
constexpr double kDefaultCutoffFrequency = 100.0;
/**
* Applies a first-order low-pass filter
*
* @param[in] sample_time Sample time constant
* @param[in] y Current value of the signal to be filtered
* @param[in] y_last Value of the signal to be filtered in the previous time step
* @param[in] cutoff_frequency Cutoff frequency of the low-pass filter
* @throw std::invalid_argument if y is infinite or NaN.
*
* @return Filtered value.
*/
inline double lowpassFilter(double sample_time, double y, double y_last, double cutoff_frequency) {
if (!std::isfinite(y)){
throw std::invalid_argument("Commanding value is infinite or NaN.");
}
double gain = sample_time / (sample_time + (1.0 / (2.0 * M_PI * cutoff_frequency)));
return gain * y + (1 - gain) * y_last;
}
} // namespace franka
|
Add NaN/Inf check for low-pass filter.
|
Add NaN/Inf check for low-pass filter.
|
C
|
apache-2.0
|
frankaemika/libfranka,frankaemika/libfranka,frankaemika/libfranka
|
22a04f32bae2446bd7ca32386592b386cbc5fe38
|
lib/gibber/gibber-namespaces.h
|
lib/gibber/gibber-namespaces.h
|
#define GIBBER_XMPP_NS_STREAM \
(const gchar *)"http://etherx.jabber.org/streams"
#define GIBBER_XMPP_NS_TLS \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-tls"
#define GIBBER_XMPP_NS_SASL_AUTH \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-sasl"
|
#define GIBBER_XMPP_NS_STREAM \
(const gchar *)"http://etherx.jabber.org/streams"
#define GIBBER_XMPP_NS_TLS \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-tls"
#define GIBBER_XMPP_NS_SASL_AUTH \
(const gchar *)"urn:ietf:params:xml:ns:xmpp-sasl"
#define GIBBER_XMPP_NS_XHTML_IM \
(const gchar *)"http://jabber.org/protocol/xhtml-im"
#define GIBBER_W3C_NS_XHTML \
(const gchar *)"http://www.w3.org/1999/xhtml"
|
Add xhtml-im and w3c xhtml namespace
|
Add xhtml-im and w3c xhtml namespace
20070316212630-93b9a-bcdbd042585561b0f20076b5e7f5f1c41c1e2867.gz
|
C
|
lgpl-2.1
|
freedesktop-unofficial-mirror/telepathy__telepathy-salut,freedesktop-unofficial-mirror/telepathy__telepathy-salut,freedesktop-unofficial-mirror/telepathy__telepathy-salut,freedesktop-unofficial-mirror/telepathy__telepathy-salut
|
7798b4a999726f6804a9968bc24f61365da7b1e0
|
ext/cap2/cap2.c
|
ext/cap2/cap2.c
|
#include <ruby.h>
#include <errno.h>
#include <sys/capability.h>
static VALUE cap2_getpcaps(VALUE self, VALUE pid) {
cap_t cap_d;
ssize_t length;
char *caps;
VALUE result;
Check_Type(pid, T_FIXNUM);
cap_d = cap_get_pid(FIX2INT(pid));
if (cap_d == NULL) {
rb_raise(
rb_eRuntimeError,
"Failed to get cap's for proccess %d: (%s)\n",
FIX2INT(pid), strerror(errno)
);
} else {
caps = cap_to_text(cap_d, &length);
result = rb_str_new(caps, length);
cap_free(caps);
cap_free(cap_d);
}
return result;
}
void Init_cap2(void) {
VALUE rb_mCap2;
rb_mCap2 = rb_define_module("Cap2");
rb_define_module_function(rb_mCap2, "getpcaps", cap2_getpcaps, 1);
}
|
#include <ruby.h>
#include <errno.h>
#include <sys/capability.h>
static VALUE cap2_getpcaps(VALUE self, VALUE pid) {
cap_t cap_d;
ssize_t length;
char *caps;
VALUE result;
Check_Type(pid, T_FIXNUM);
cap_d = cap_get_pid(FIX2INT(pid));
if (cap_d == NULL) {
rb_raise(
rb_eRuntimeError,
"Failed to get capabilities for proccess %d: (%s)\n",
FIX2INT(pid), strerror(errno)
);
} else {
caps = cap_to_text(cap_d, &length);
result = rb_str_new(caps, length);
cap_free(caps);
cap_free(cap_d);
}
return result;
}
void Init_cap2(void) {
VALUE rb_mCap2;
rb_mCap2 = rb_define_module("Cap2");
rb_define_module_function(rb_mCap2, "getpcaps", cap2_getpcaps, 1);
}
|
Update error text in Cap2.getpcaps
|
Update error text in Cap2.getpcaps
|
C
|
mit
|
lmars/cap2,lmars/cap2
|
0a604550e4f39b0d40732bf6cefe143ddcd00091
|
alura/c/forca.c
|
alura/c/forca.c
|
#include <stdio.h>
#include <string.h>
int main() {
char palavrasecreta[20];
sprintf(palavrasecreta, "MELANCIA");
int acertou = 0;
int enforcou = 0;
char chutes[26];
int tentativas = 0;
do {
for(int i = 0; i < strlen(palavrasecreta); i++) {
int achou = 0;
for(int j = 0; j < tentativas; j++) {
if(chutes[j] == palavrasecreta[i]) {
achou = 1;
break;
}
}
if(achou) {
printf("%c ", palavrasecreta[i]);
} else {
printf("_ ");
}
}
printf("\n");
char chute;
scanf(" %c", &chute);
chutes[tentativas] = chute;
tentativas++;
} while(!acertou && !enforcou);
}
|
#include <stdio.h>
#include <string.h>
int main() {
char palavrasecreta[20];
sprintf(palavrasecreta, "MELANCIA");
int acertou = 0;
int enforcou = 0;
char chutes[26];
int tentativas = 0;
do {
for(int i = 0; i < strlen(palavrasecreta); i++) {
int achou = 0;
for(int j = 0; j < tentativas; j++) {
if(chutes[j] == palavrasecreta[i]) {
achou = 1;
break;
}
}
if(achou) {
printf("%c ", palavrasecreta[i]);
} else {
printf("_ ");
}
}
printf("\n");
char chute;
printf("Qual letra? ");
scanf(" %c", &chute);
chutes[tentativas] = chute;
tentativas++;
} while(!acertou && !enforcou);
}
|
Update files, Alura, Introdução a C - Parte 2, Aula 2.6
|
Update files, Alura, Introdução a C - Parte 2, Aula 2.6
|
C
|
mit
|
fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs
|
4b62610ef39e999c1328e884b01cc14c7dcd9591
|
core/alsp_src/generic/fpbasis.c
|
core/alsp_src/generic/fpbasis.c
|
/*===========================================================================*
| fpbasis.c
| Copyright (c) 1996-97 Applied Logic Systems, Inc.
|
| -- Floating point math abstractions
|
*===========================================================================*/
#include "defs.h"
#include "fpbasis.h"
#ifdef MacOS
#include <fp.h>
#endif
int is_ieee_nan PARAMS( (double) );
int is_ieee_inf PARAMS( (double) );
int
is_ieee_nan(v)
double v;
{
return isnan(v);
}
int
is_ieee_inf(v)
double v;
{
#ifdef SOLARIS
switch (fpclass(v)) {
case FP_NINF:
return(1);
case FP_PINF:
return(1);
default:
return(0);
}
#elif defined(WIN32) || defined(AIX)
return !finite(v);
#elif defined(MacOS)
return !isfinite(v);
#elif (defined(__sgi) && defined(__mips))
return(!finite(v));
#else
return isinf(v);
#endif
}
|
/*===========================================================================*
| fpbasis.c
| Copyright (c) 1996-97 Applied Logic Systems, Inc.
|
| -- Floating point math abstractions
|
*===========================================================================*/
#include "defs.h"
#include "fpbasis.h"
#ifdef MacOS
#include <fp.h>
#endif
int is_ieee_nan PARAMS( (double) );
int is_ieee_inf PARAMS( (double) );
int
is_ieee_nan(v)
double v;
{
return isnan(v);
}
int
is_ieee_inf(v)
double v;
{
#if defined(SOLARIS) || defined(UNIX_SOLARIS)
switch (fpclass(v)) {
case FP_NINF:
return(1);
case FP_PINF:
return(1);
default:
return(0);
}
#elif defined(WIN32) || defined(AIX)
return !finite(v);
#elif defined(MacOS)
return !isfinite(v);
#elif (defined(__sgi) && defined(__mips))
return(!finite(v));
#else
return isinf(v);
#endif
}
|
Change for new config system
|
Change for new config system
|
C
|
mit
|
AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog
|
c5949064707026e60dd7f370870fd76be5f2c78a
|
gpu/include/GrGLConfig_chrome.h
|
gpu/include/GrGLConfig_chrome.h
|
#ifndef GrGLConfig_chrome_DEFINED
#define GrGLConfig_chrome_DEFINED
#define GR_SUPPORT_GLES2 1
// gl2ext.h will define these extensions macros but Chrome doesn't provide
// prototypes.
#define GL_OES_mapbuffer 0
#define GL_IMG_multisampled_render_to_texture 0
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#define GR_GL_FUNC
#define GR_GL_PROC_ADDRESS(X) &X
// chrome always assumes BGRA
#define GR_GL_32BPP_COLOR_FORMAT GR_BGRA
// glGetError() forces a sync with gpu process on chrome
#define GR_GL_CHECK_ERROR_START 0
#endif
|
#ifndef GrGLConfig_chrome_DEFINED
#define GrGLConfig_chrome_DEFINED
#define GR_SUPPORT_GLES2 1
// gl2ext.h will define these extensions macros but Chrome doesn't provide
// prototypes.
#define GL_OES_mapbuffer 0
#define GL_IMG_multisampled_render_to_texture 0
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#define GR_GL_FUNC
#define GR_GL_PROC_ADDRESS(X) &X
// chrome always assumes BGRA
#define GR_GL_32BPP_COLOR_FORMAT GR_BGRA
// glGetError() forces a sync with gpu process on chrome
#define GR_GL_CHECK_ERROR_START 0
// Using the static vb precludes batching rect-to-rect draws
// because there are matrix changes between each one.
// Chrome was getting top performance on Windows with
// batched rect-to-rect draws. But there seems to be some
// regression that now causes any dynamic VB data to perform
// very poorly. In any event the static VB seems to get equal
// perf to what batching was producing and it always seems to
// be better on Linux.
#define GR_STATIC_RECT_VB 1
#endif
|
Make chrome use the static square vb when drawing rects.
|
Make chrome use the static square vb when drawing rects.
Review URL: http://codereview.appspot.com/4280053/
|
C
|
bsd-3-clause
|
csulmone/skia,csulmone/skia,csulmone/skia,csulmone/skia
|
f749ea43d24a3ee328ee77c6de3838f3fef11d30
|
beaksh.c
|
beaksh.c
|
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "linenoise.h"
char* findPrompt();
void executeCommand(const char *text);
int main() {
int childPid;
int child_status;
char *line;
char *prompt;
prompt = findPrompt();
while((line = linenoise(prompt)) != NULL) {
if (line[0] != '\0') {
linenoiseHistoryAdd(line);
childPid = fork();
if(childPid == 0) {
executeCommand(line);
} else {
wait(&child_status);
}
}
free(line);
}
return 0;
}
char* findPrompt() {
return "$ ";
}
void executeCommand(const char *text) {
execlp(text, text, NULL);
}
|
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/param.h>
#include "linenoise.h"
#define HISTORY_FILE ".beaksh_history"
char* findPrompt();
char* getHistoryPath();
void executeCommand(const char *text);
int main() {
int childPid;
int child_status;
char *line;
char *prompt;
prompt = findPrompt();
char *historyPath = getHistoryPath();
linenoiseHistoryLoad(historyPath);
while((line = linenoise(prompt)) != NULL) {
if (line[0] != '\0') {
linenoiseHistoryAdd(line);
linenoiseHistorySave(historyPath);
childPid = fork();
if(childPid == 0) {
executeCommand(line);
} else {
wait(&child_status);
}
}
free(line);
}
if(historyPath)
free(historyPath);
return EXIT_SUCCESS;
}
char* findPrompt() {
return "$ ";
}
/*
Resolve dotfile path for history. Returns NULL if file can't be resolved.
*/
char* getHistoryPath() {
char *home = getenv("HOME");
if(!home)
return NULL;
int home_path_len = strnlen(home, MAXPATHLEN);
int history_path_len = home_path_len + strlen(HISTORY_FILE) + 1;
char *result;
if((result = malloc(history_path_len + 1)) == NULL) {
fprintf(stderr, "Problem resolving path for history file, no history will be recorded\n");
return NULL;
}
strncpy(result, home, home_path_len);
strncat(result, "/", 1);
strncat(result, HISTORY_FILE, strlen(HISTORY_FILE));
return result;
}
void executeCommand(const char *text) {
execlp(text, text, NULL);
}
|
Add persistent history to shell
|
Add persistent history to shell
Closes #3.
|
C
|
mit
|
futureperfect/beaksh
|
43c33cfb95bd6b94e459b1ee64449a787b92a0aa
|
test/com/facebook/buck/features/rust/testdata/cxx_with_rust_dep/main.c
|
test/com/facebook/buck/features/rust/testdata/cxx_with_rust_dep/main.c
|
#include <stdio.h>
extern void helloer(void);
int main() {
printf("Calling helloer\n");
helloer();
printf("Helloer called\n");
}
|
#include <stdio.h>
extern void helloer(void);
int main() {
printf("Calling helloer\n");
helloer();
printf("Helloer called\n");
return 0;
}
|
Fix test failures with GCC
|
rust: Fix test failures with GCC
Summary:
GCC 4.8.5 (and likely other versions of GCC) compiles C code as C89
(-std=gnu89) by default. In C89, if main does not explicitly return, the
program's exit code is unspecified. This means the hello program in
cxx_with_rust_dep can return non-zero on success.
Many of Buck's tests assert that the hello program exits with a zero
exit code. When these tests use GCC 4.8.5, the tests often fail, since
the exit code is non-zero.
Fix the test failures by making the hello program explicitly return zero
on success.
(Some other compilers compile C code as C99 or C11 by default. Since
C99, if main does not explicitly return, the program's exit code is
zero. This means the hello program always returns zero on success.)
Reviewed By: styurin
fbshipit-source-id: 46c4dd6f68
|
C
|
apache-2.0
|
brettwooldridge/buck,romanoid/buck,brettwooldridge/buck,SeleniumHQ/buck,facebook/buck,JoelMarcey/buck,Addepar/buck,SeleniumHQ/buck,romanoid/buck,rmaz/buck,romanoid/buck,brettwooldridge/buck,nguyentruongtho/buck,zpao/buck,facebook/buck,JoelMarcey/buck,nguyentruongtho/buck,Addepar/buck,brettwooldridge/buck,rmaz/buck,SeleniumHQ/buck,facebook/buck,Addepar/buck,nguyentruongtho/buck,brettwooldridge/buck,JoelMarcey/buck,rmaz/buck,romanoid/buck,zpao/buck,Addepar/buck,rmaz/buck,brettwooldridge/buck,kageiit/buck,kageiit/buck,Addepar/buck,rmaz/buck,JoelMarcey/buck,romanoid/buck,brettwooldridge/buck,zpao/buck,romanoid/buck,rmaz/buck,nguyentruongtho/buck,shs96c/buck,zpao/buck,SeleniumHQ/buck,romanoid/buck,rmaz/buck,SeleniumHQ/buck,kageiit/buck,JoelMarcey/buck,rmaz/buck,JoelMarcey/buck,Addepar/buck,romanoid/buck,nguyentruongtho/buck,Addepar/buck,shs96c/buck,brettwooldridge/buck,facebook/buck,SeleniumHQ/buck,Addepar/buck,kageiit/buck,SeleniumHQ/buck,JoelMarcey/buck,brettwooldridge/buck,rmaz/buck,brettwooldridge/buck,SeleniumHQ/buck,romanoid/buck,facebook/buck,nguyentruongtho/buck,SeleniumHQ/buck,romanoid/buck,JoelMarcey/buck,SeleniumHQ/buck,SeleniumHQ/buck,shs96c/buck,rmaz/buck,kageiit/buck,JoelMarcey/buck,SeleniumHQ/buck,rmaz/buck,shs96c/buck,Addepar/buck,shs96c/buck,JoelMarcey/buck,shs96c/buck,brettwooldridge/buck,rmaz/buck,SeleniumHQ/buck,zpao/buck,shs96c/buck,JoelMarcey/buck,romanoid/buck,Addepar/buck,kageiit/buck,brettwooldridge/buck,kageiit/buck,Addepar/buck,nguyentruongtho/buck,romanoid/buck,JoelMarcey/buck,shs96c/buck,shs96c/buck,JoelMarcey/buck,rmaz/buck,Addepar/buck,facebook/buck,zpao/buck,romanoid/buck,facebook/buck,shs96c/buck,brettwooldridge/buck,zpao/buck,shs96c/buck,Addepar/buck,shs96c/buck,shs96c/buck
|
06be45bd2a250ccba120c46c673b7e4a5242947e
|
api/inc/tour.h
|
api/inc/tour.h
|
#ifndef __TOURH__
#define __TOURH__
#include <stdio.h>
#include <stdlib.h>
#define tour int*
#define city int
//initializes a new tour
tour create_tour(int ncities);
//returns true if the tour t is shorter than
//a distance indicated by dist
int is_shtr(tour t, int dist);
//defines the starter point of a tour
void strt_point(tour t, city c);
//defines a new tour changing the order of two cities
void swap_cities(tour* t, city c1, city c2);
#endif
|
#ifndef __TOURH__
#define __TOURH__
#include <stdio.h>
#include <stdlib.h>
typedef int* tour;
typedef int city;
//inicializa um tour
tour create_tour(int ncities);
//popula um tour pre-definido com cidades
void populate_tour(tour t, int ncities);
//retorna true se a distancia total do
//tour t for menor que dist
int is_shoter(tour t, int dist);
//define a cidade inicial de um tour
void start_point(tour t, city c);
//inverte a posição de duas cidades no tour
void swap_cities(tour t, int c1, int c2);
#endif
|
Change type creation from define to typedef.
|
Change type creation from define to typedef.
|
C
|
apache-2.0
|
frila/caixeiro
|
53c85fb989a60ef015bbbe3a2541b9ff1020ef15
|
components/libc/dlib/sys/types.h
|
components/libc/dlib/sys/types.h
|
#ifndef __TYPES_H__
#define __TYPES_H__
#include <stdint.h>
#include <rtthread.h>
typedef rt_int32_t clockid_t;
typedef rt_int32_t key_t; /* Used for interprocess communication. */
typedef rt_int32_t pid_t; /* Used for process IDs and process group IDs. */
typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */
#endif
|
#ifndef __TYPES_H__
#define __TYPES_H__
#include <stdint.h>
#include <rtthread.h>
typedef rt_int32_t clockid_t;
typedef rt_int32_t key_t; /* Used for interprocess communication. */
typedef rt_int32_t pid_t; /* Used for process IDs and process group IDs. */
typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */
typedef int mode_t;
#endif
|
Add missing definition of mode_t
|
[libc][dlib] Add missing definition of mode_t
For using pthread with IAR tool chain
|
C
|
apache-2.0
|
ArdaFu/rt-thread,ArdaFu/rt-thread,RT-Thread/rt-thread,geniusgogo/rt-thread,FlyLu/rt-thread,FlyLu/rt-thread,yongli3/rt-thread,yongli3/rt-thread,FlyLu/rt-thread,gbcwbz/rt-thread,FlyLu/rt-thread,FlyLu/rt-thread,wolfgangz2013/rt-thread,weety/rt-thread,AubrCool/rt-thread,AubrCool/rt-thread,AubrCool/rt-thread,yongli3/rt-thread,gbcwbz/rt-thread,nongxiaoming/rt-thread,weiyuliang/rt-thread,gbcwbz/rt-thread,armink/rt-thread,zhaojuntao/rt-thread,ArdaFu/rt-thread,weiyuliang/rt-thread,wolfgangz2013/rt-thread,weiyuliang/rt-thread,yongli3/rt-thread,weety/rt-thread,weiyuliang/rt-thread,weiyuliang/rt-thread,nongxiaoming/rt-thread,wolfgangz2013/rt-thread,hezlog/rt-thread,AubrCool/rt-thread,armink/rt-thread,AubrCool/rt-thread,yongli3/rt-thread,ArdaFu/rt-thread,hezlog/rt-thread,weiyuliang/rt-thread,hezlog/rt-thread,yongli3/rt-thread,zhaojuntao/rt-thread,nongxiaoming/rt-thread,igou/rt-thread,wolfgangz2013/rt-thread,igou/rt-thread,gbcwbz/rt-thread,geniusgogo/rt-thread,weiyuliang/rt-thread,FlyLu/rt-thread,igou/rt-thread,armink/rt-thread,gbcwbz/rt-thread,nongxiaoming/rt-thread,armink/rt-thread,hezlog/rt-thread,RT-Thread/rt-thread,zhaojuntao/rt-thread,RT-Thread/rt-thread,geniusgogo/rt-thread,igou/rt-thread,RT-Thread/rt-thread,AubrCool/rt-thread,wolfgangz2013/rt-thread,weety/rt-thread,yongli3/rt-thread,weety/rt-thread,weety/rt-thread,armink/rt-thread,zhaojuntao/rt-thread,weety/rt-thread,ArdaFu/rt-thread,geniusgogo/rt-thread,hezlog/rt-thread,hezlog/rt-thread,RT-Thread/rt-thread,geniusgogo/rt-thread,armink/rt-thread,igou/rt-thread,ArdaFu/rt-thread,ArdaFu/rt-thread,zhaojuntao/rt-thread,armink/rt-thread,geniusgogo/rt-thread,gbcwbz/rt-thread,zhaojuntao/rt-thread,igou/rt-thread,nongxiaoming/rt-thread,gbcwbz/rt-thread,igou/rt-thread,geniusgogo/rt-thread,FlyLu/rt-thread,wolfgangz2013/rt-thread,nongxiaoming/rt-thread,weety/rt-thread,wolfgangz2013/rt-thread,nongxiaoming/rt-thread,RT-Thread/rt-thread,zhaojuntao/rt-thread,RT-Thread/rt-thread,AubrCool/rt-thread,hezlog/rt-thread
|
3059f29d3aca2555583bd8c15e94a5840eaba11b
|
src/condor_includes/condor_fix_stdio.h
|
src/condor_includes/condor_fix_stdio.h
|
#ifndef FIX_STDIO_H
#define FIX_STDIO_H
#include <stdio.h>
/*
For some reason the stdio.h on Ultrix 4.3 fails to provide a prototype
for pclose() if _POSIX_SOURCE is defined - even though it does
provide a prototype for popen().
*/
#if defined(ULTRIX43)
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__STDC__) || defined(__cplusplus)
int pclose( FILE *__stream );
#else
int pclose();
#endif
#if defined(__cplusplus)
}
#endif
#endif /* ULTRIX43 */
#endif
|
#ifndef FIX_STDIO_H
#define FIX_STDIO_H
#include <stdio.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
For some reason the stdio.h on OSF1 fails to provide prototypes
for popen() and pclose() if _POSIX_SOURCE is defined.
*/
#if defined(OSF1)
#if defined(__STDC__) || defined(__cplusplus)
FILE *popen( char *, char * );
int pclose( FILE *__stream );
#else
FILE *popen();
int pclose();
#endif
#endif /* OSF1 */
/*
For some reason the stdio.h on Ultrix 4.3 fails to provide a prototype
for pclose() if _POSIX_SOURCE is defined - even though it does
provide a prototype for popen().
*/
#if defined(ULTRIX43)
#if defined(__STDC__) || defined(__cplusplus)
int pclose( FILE *__stream );
#else
int pclose();
#endif
#endif /* ULTRIX43 */
#if defined(__cplusplus)
}
#endif
#endif
|
Add prototypes for popen()/pclose() for OSF1 machines.
|
Add prototypes for popen()/pclose() for OSF1 machines.
|
C
|
apache-2.0
|
djw8605/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,htcondor/htcondor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,djw8605/condor,mambelli/osg-bosco-marco,neurodebian/htcondor,neurodebian/htcondor,djw8605/condor,htcondor/htcondor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,djw8605/condor,clalancette/condor-dcloud,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/condor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/condor,djw8605/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/condor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,bbockelm/condor-network-accounting,htcondor/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,htcondor/htcondor,neurodebian/htcondor,htcondor/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,djw8605/htcondor,neurodebian/htcondor,htcondor/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/htcondor
|
7f4192ca175b3d5fc718d4d9c49ce658bc8f3deb
|
src/auth/userdb-passwd.c
|
src/auth/userdb-passwd.c
|
/* Copyright (C) 2002-2003 Timo Sirainen */
#include "config.h"
#undef HAVE_CONFIG_H
#ifdef USERDB_PASSWD
#include "common.h"
#include "userdb.h"
#include <pwd.h>
static void passwd_lookup(const char *user, userdb_callback_t *callback,
void *context)
{
struct user_data data;
struct passwd *pw;
pw = getpwnam(user);
if (pw == NULL) {
if (errno != 0)
i_error("getpwnam(%s) failed: %m", user);
else if (verbose)
i_info("passwd(%s): unknown user", user);
callback(NULL, context);
return;
}
memset(&data, 0, sizeof(data));
data.uid = pw->pw_uid;
data.gid = pw->pw_gid;
data.virtual_user = data.system_user = pw->pw_name;
data.home = pw->pw_dir;
callback(&data, context);
}
struct userdb_module userdb_passwd = {
NULL, NULL,
passwd_lookup
};
#endif
|
/* Copyright (C) 2002-2003 Timo Sirainen */
#include "config.h"
#undef HAVE_CONFIG_H
#ifdef USERDB_PASSWD
#include "common.h"
#include "userdb.h"
#include <pwd.h>
static void passwd_lookup(const char *user, userdb_callback_t *callback,
void *context)
{
struct user_data data;
struct passwd *pw;
size_t len;
pw = getpwnam(user);
if (pw == NULL) {
if (errno != 0)
i_error("getpwnam(%s) failed: %m", user);
else if (verbose)
i_info("passwd(%s): unknown user", user);
callback(NULL, context);
return;
}
memset(&data, 0, sizeof(data));
data.uid = pw->pw_uid;
data.gid = pw->pw_gid;
data.virtual_user = data.system_user = pw->pw_name;
len = strlen(pw->pw_dir);
if (len < 3 || strcmp(pw->pw_dir + len - 3, "/./") != 0)
data.home = pw->pw_dir;
else {
/* wu-ftpd uses <chroot>/./<dir>. We don't support
the dir after chroot, but this should work well enough. */
data.home = t_strndup(pw->pw_dir, len-3);
data.chroot = TRUE;
}
callback(&data, context);
}
struct userdb_module userdb_passwd = {
NULL, NULL,
passwd_lookup
};
#endif
|
Support wu-ftpd-like chrooting in /etc/passwd. If home directory ends with "/./", it's chrooted to.
|
Support wu-ftpd-like chrooting in /etc/passwd. If home directory ends with
"/./", it's chrooted to.
|
C
|
mit
|
Distrotech/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,damoxc/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot,LTD-Beget/dovecot
|
e16b6dec212a86fb65db026ddcfcdd89efd30ec5
|
master.c
|
master.c
|
#include "master.h"
//Master configurations
MODBUSMasterStatus MODBUSMaster;
void MODBUSParseResponse( uint8_t *Frame, uint8_t FrameLength )
{
//This function parses response from master
//Calling it will lead to losing all data and exceptions stored in MODBUSMaster (space will be reallocated)
//Allocate memory for union and copy frame to it
union MODBUSParser *Parser = malloc( FrameLength );
memcpy( ( *Parser ).Frame, Frame, FrameLength );
if ( MODBUS_MASTER_BASIC )
MODBUSParseResponseBasic( Parser );
//Free used memory
free( Parser );
}
void MODBUSMasterInit( )
{
//Very basic init of master side
MODBUSMaster.Request.Frame = malloc( 8 );
MODBUSMaster.Request.Length = 0;
MODBUSMaster.Data = malloc( sizeof( MODBUSData ) );
MODBUSMaster.DataLength = 0;
}
|
#include "master.h"
//Master configurations
MODBUSMasterStatus MODBUSMaster;
void MODBUSParseException( union MODBUSParser *Parser )
{
//Parse exception frame and write data to MODBUSMaster structure
//Allocate memory for exception parser
union MODBUSException *Exception = malloc( sizeof( union MODBUSException ) );
memcpy( ( *Exception ).Frame, ( *Parser ).Frame, sizeof( union MODBUSException ) );
//Check CRC
if ( MODBUSCRC16( ( *Exception ).Frame, 3 ) != ( *Exception ).Exception.CRC )
{
free( Exception );
return;
}
//Copy data
MODBUSMaster.Exception.Address = ( *Exception ).Exception.Address;
MODBUSMaster.Exception.Function = ( *Exception ).Exception.Function;
MODBUSMaster.Exception.Code = ( *Exception ).Exception.ExceptionCode;
MODBUSMaster.Error = 1;
free( Exception );
}
void MODBUSParseResponse( uint8_t *Frame, uint8_t FrameLength )
{
//This function parses response from master
//Calling it will lead to losing all data and exceptions stored in MODBUSMaster (space will be reallocated)
//Allocate memory for union and copy frame to it
union MODBUSParser *Parser = malloc( FrameLength );
memcpy( ( *Parser ).Frame, Frame, FrameLength );
//Check if frame is exception response
if ( ( *Parser ).Base.Function & 128 )
{
MODBUSParseException( Parser );
}
else
{
if ( MODBUS_MASTER_BASIC )
MODBUSParseResponseBasic( Parser );
}
//Free used memory
free( Parser );
}
void MODBUSMasterInit( )
{
//Very basic init of master side
MODBUSMaster.Request.Frame = malloc( 8 );
MODBUSMaster.Request.Length = 0;
MODBUSMaster.Data = malloc( sizeof( MODBUSData ) );
MODBUSMaster.DataLength = 0;
}
|
Add exceptions parsing (not tested yet)
|
Add exceptions parsing (not tested yet)
|
C
|
mit
|
Jacajack/modlib
|
687d7dd560c87624776c33d62b4646b6824bf3c4
|
Arduino/libraries/MavlinkForArduino/MavlinkForArduino.h
|
Arduino/libraries/MavlinkForArduino/MavlinkForArduino.h
|
//Move this directory to ~/sketchbook/libraries
// and clone https://github.com/mavlink/c_library.git inside
// git clone https://github.com/mavlink/c_library.git ~/sketchbook/libraries/MavlinkForArduino
#include "c_library/ardupilotmega/mavlink.h"
|
//Move this directory to ~/sketchbook/libraries
// and clone https://github.com/mavlink/c_library_v2.git inside
// git clone https://github.com/mavlink/c_library_V2.git ~/Arduino/libraries/MavlinkForArduino/c_library_v2
#include "c_library_v2/ardupilotmega/mavlink.h"
|
Use updated mavlink library v2
|
Use updated mavlink library v2
|
C
|
mit
|
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
|
04ebbdd9ecb46461d3a04c4c5c010136aeb6a3ba
|
Include/allobjects.h
|
Include/allobjects.h
|
/* "allobjects.c" -- Source for precompiled header "allobjects.h" */
#include <stdio.h>
#include "string.h"
#include "PROTO.h"
#include "object.h"
#include "objimpl.h"
#include "intobject.h"
#include "floatobject.h"
#include "stringobject.h"
#include "tupleobject.h"
#include "listobject.h"
#include "dictobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "funcobject.h"
#include "classobject.h"
#include "fileobject.h"
#include "errors.h"
#include "malloc.h"
extern char *strdup PROTO((const char *));
|
/* "allobjects.c" -- Source for precompiled header "allobjects.h" */
#include <stdio.h>
#include <string.h>
#include "PROTO.h"
#include "object.h"
#include "objimpl.h"
#include "intobject.h"
#include "floatobject.h"
#include "stringobject.h"
#include "tupleobject.h"
#include "listobject.h"
#include "dictobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "funcobject.h"
#include "classobject.h"
#include "fileobject.h"
#include "errors.h"
#include "malloc.h"
extern char *strdup PROTO((const char *));
|
Include <string.h> instead of "string.h".
|
Include <string.h> instead of "string.h".
|
C
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
d02f1c16e441c48e450d05ac145c53282ebd4aa4
|
mordor/streams/limited.h
|
mordor/streams/limited.h
|
#ifndef __MORDOR_LIMITED_STREAM_H__
#define __MORDOR_LIMITED_STREAM_H__
// Copyright (c) 2009 - Mozy, Inc.
#include "filter.h"
namespace Mordor {
class LimitedStream : public MutatingFilterStream
{
public:
typedef boost::shared_ptr<LimitedStream> ptr;
public:
LimitedStream(Stream::ptr parent, long long size, bool own = true);
bool strict() { return m_strict; }
void strict(bool strict) { m_strict = strict; }
bool supportsSeek() { return parent()->supportsSeek(); }
bool supportsTell() { return true; }
bool supportsSize() { return true; }
bool supportsTruncate() { return false; }
size_t read(Buffer &b, size_t len);
size_t write(const Buffer &b, size_t len);
long long seek(long long offset, Anchor anchor = BEGIN);
long long size();
void truncate(long long size);
void unread(const Buffer &b, size_t len);
private:
long long m_pos, m_size;
bool m_strict;
};
}
#endif
|
#ifndef __MORDOR_LIMITED_STREAM_H__
#define __MORDOR_LIMITED_STREAM_H__
// Copyright (c) 2009 - Mozy, Inc.
#include "filter.h"
namespace Mordor {
class LimitedStream : public MutatingFilterStream
{
public:
typedef boost::shared_ptr<LimitedStream> ptr;
public:
LimitedStream(Stream::ptr parent, long long size, bool own = true);
void reset() { m_pos = 0; }
void reset(long long size) { m_pos = 0; m_size = size; }
bool strict() { return m_strict; }
void strict(bool strict) { m_strict = strict; }
bool supportsSeek() { return parent()->supportsSeek(); }
bool supportsTell() { return true; }
bool supportsSize() { return true; }
bool supportsTruncate() { return false; }
size_t read(Buffer &b, size_t len);
size_t write(const Buffer &b, size_t len);
long long seek(long long offset, Anchor anchor = BEGIN);
long long size();
void truncate(long long size);
void unread(const Buffer &b, size_t len);
private:
long long m_pos, m_size;
bool m_strict;
};
}
#endif
|
Support for resetting a LimitedStream
|
Support for resetting a LimitedStream
Both current position, and total length.
Change-Id: Ia484e8b91e98d8cd2153496cbb1d5b183dacb14f
Reviewed-on: https://gerrit.dechocorp.com/8980
Reviewed-by: Punky Brewster (labs admin) <4fefd66e0791c836d3da15985fe778b56ecb4b1b@example.com>
Reviewed-by: Jeremy Stanley <b3f594e10a9edcf5413cf1190121d45078c62290@mozy.com>
|
C
|
bsd-3-clause
|
mozy/mordor,cgaebel/mordor,ccutrer/mordor,cgaebel/mordor,adfin/mordor,ccutrer/mordor,mtanski/mordor,mozy/mordor,mtanski/mordor,adfin/mordor,ccutrer/mordor,mtanski/mordor,mozy/mordor,adfin/mordor
|
cd6ab8cc43ee0171d90bf6a0b94b19e12fb831c5
|
test/CodeGen/2004-02-13-Memset.c
|
test/CodeGen/2004-02-13-Memset.c
|
// RUN: %clang_cc1 %s -emit-llvm -o - | grep llvm.memset | count 3
#ifndef memset
void *memset(void*, int, unsigned long);
#endif
#ifndef bzero
void bzero(void*, unsigned long);
#endif
void test(int* X, char *Y) {
// CHECK: call i8* llvm.memset
memset(X, 4, 1000);
// CHECK: call void bzero
bzero(Y, 100);
}
|
// RUN: %clang_cc1 %s -emit-llvm -o - | grep llvm.memset | count 3
typedef __SIZE_TYPE__ size_t;
void *memset(void*, int, size_t);
void bzero(void*, size_t);
void test(int* X, char *Y) {
// CHECK: call i8* llvm.memset
memset(X, 4, 1000);
// CHECK: call void bzero
bzero(Y, 100);
}
|
Use the correct definition for memset.
|
Use the correct definition for memset.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136188 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
32e9ffa0d946ff15494526ef91a3c6ca6dd5b4e4
|
Pod/VOKAlertHelper/VOKAlertHelper.h
|
Pod/VOKAlertHelper/VOKAlertHelper.h
|
//
// VOKAlertHelper.h
// VOKUtilities
//
// Created by Rachel Hyman on 6/15/15.
// Copyright (c) 2015 Vokal. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <VOKAlertAction.h>
typedef void(^VOKAlertHelperActionBlock)(void);
NS_ASSUME_NONNULL_BEGIN
@interface VOKAlertHelper : NSObject
/**
* Displays an alert in the OS-appropriate fashion.
*
* @param viewController View controller responsible for presenting the alert.
* @param title Title for the alert.
* @param message Message for the alert.
* @param buttons Array of VOKAlertAction objects that correspond to button(s). Must have at least one object.
*/
+ (void)showAlertFromViewController:(UIViewController *)viewController
withTitle:(nullable NSString *)title
message:(nullable NSString *)message
buttons:(NSArray<VOKAlertAction *> *)buttons;
@end
NS_ASSUME_NONNULL_END
|
//
// VOKAlertHelper.h
// VOKUtilities
//
// Created by Rachel Hyman on 6/15/15.
// Copyright (c) 2015 Vokal. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "VOKAlertAction.h"
typedef void(^VOKAlertHelperActionBlock)(void);
NS_ASSUME_NONNULL_BEGIN
@interface VOKAlertHelper : NSObject
/**
* Displays an alert in the OS-appropriate fashion.
*
* @param viewController View controller responsible for presenting the alert.
* @param title Title for the alert.
* @param message Message for the alert.
* @param buttons Array of VOKAlertAction objects that correspond to button(s). Must have at least one object.
*/
+ (void)showAlertFromViewController:(UIViewController *)viewController
withTitle:(nullable NSString *)title
message:(nullable NSString *)message
buttons:(NSArray<VOKAlertAction *> *)buttons;
@end
NS_ASSUME_NONNULL_END
|
Use quotes for local include
|
Use quotes for local include
|
C
|
mit
|
designatednerd/VOKUtilities,vokal/VOKUtilities,designatednerd/VOKUtilities,designatednerd/VOKUtilities,brockboland/VOKUtilities,brockboland/VOKUtilities,vokal/VOKUtilities,vokal/VOKUtilities,brockboland/VOKUtilities
|
8d066a64a7a835e3b5b173fa637b2d66e2c3e2c2
|
WikipediaUnitTests/Code/WMFDisambiguationPagesViewController.h
|
WikipediaUnitTests/Code/WMFDisambiguationPagesViewController.h
|
#import "WMFArticleListTableViewController.h"
@interface WMFDisambiguationPagesViewController : WMFArticleListTableViewController
@property (nonatomic, strong, readonly) MWKArticle* article;
- (instancetype)initWithArticle:(MWKArticle*)article dataStore:(MWKDataStore*)dataStore;
@end
|
#import "WMFArticleListDataSourceTableViewController.h"
@interface WMFDisambiguationPagesViewController : WMFArticleListDataSourceTableViewController
@property (nonatomic, strong, readonly) MWKArticle* article;
- (instancetype)initWithArticle:(MWKArticle*)article dataStore:(MWKDataStore*)dataStore;
@end
|
Update disambiguation VC base class
|
Update disambiguation VC base class
|
C
|
mit
|
montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/apps-ios-wikipedia,anirudh24seven/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,anirudh24seven/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,anirudh24seven/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,anirudh24seven/wikipedia-ios,anirudh24seven/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,wikimedia/apps-ios-wikipedia,anirudh24seven/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,anirudh24seven/wikipedia-ios,julienbodet/wikipedia-ios,anirudh24seven/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia
|
63257791efa4c36b614386ab3e32f8d5f0e3a715
|
DataSet.h
|
DataSet.h
|
#ifndef DATASET_H
#define DATASET_H
#include "Record.h"
#include "Filter.h"
#include "RIVVector.h"
#include <map>
#include <string>
#include <vector>
template<typename... Ts>
class RIVDataSet {
public:
RIVVector<RIVRecord<Ts...>> records;
RIVVector<Filter*> filters;
};
//class RIVDataSet
//{
//private :
// //map<string,vector<int>> int_records;
// std::vector<RIVRecord<float>> float_records;
//
// std::vector<Filter*> filters;
//
// std::map<int,bool> filtered_values; //Whether or not the value was filtered by any applied filters
// //vector<int> filtered_value_indices; //Record value indices that do not pass the filters. //CAUTION: Obsolete, not efficient
//
//public:
// RIVDataSet(void);
// ~RIVDataSet(void);
// //void AddData(string name,vector<int>);
// void AddRecord(RIVRecord<float>);
// std::pair<float,float>* MinMax(int);
// size_t NumberOfRecords();
// size_t NumberOfValuesPerRecord();
// RIVRecord<float>* GetRecord(int);
// float* GetRecordValue(int,int);
// void AddFilter(Filter*);
// bool HasFilters();
// void ClearFilters();
// void ApplyFilters();
//};
#endif
|
#ifndef DATASET_H
#define DATASET_H
#include "Record.h"
#include "Filter.h"
#include "RIVVector.h"
#include <map>
#include <string>
#include <vector>
template<typename... Ts>
class RIVDataSet {
public:
RIVVector<RIVRecord<Ts...>> records;
};
//class RIVDataSet
//{
//private :
// //map<string,vector<int>> int_records;
// std::vector<RIVRecord<float>> float_records;
//
// std::vector<Filter*> filters;
//
// std::map<int,bool> filtered_values; //Whether or not the value was filtered by any applied filters
// //vector<int> filtered_value_indices; //Record value indices that do not pass the filters. //CAUTION: Obsolete, not efficient
//
//public:
// RIVDataSet(void);
// ~RIVDataSet(void);
// //void AddData(string name,vector<int>);
// void AddRecord(RIVRecord<float>);
// std::pair<float,float>* MinMax(int);
// size_t NumberOfRecords();
// size_t NumberOfValuesPerRecord();
// RIVRecord<float>* GetRecord(int);
// float* GetRecordValue(int,int);
// void AddFilter(Filter*);
// bool HasFilters();
// void ClearFilters();
// void ApplyFilters();
//};
#endif
|
Revert "Introduced a neat vector class"
|
Revert "Introduced a neat vector class"
This reverts commit 15b0b1147ad0f2f77ae9b485ceb323c84f8d439f.
|
C
|
mit
|
gerardsimons/pbr-visualizer,gerardsimons/pbr-visualizer,gerardsimons/pbr-visualizer,gerardsimons/pbr-visualizer
|
46033b0be1cce8f444eb8e80e1b26677f161194f
|
test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c
|
test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c
|
typedef struct {
union {
struct { } __attribute((packed));
};
} fenv_t;
const fenv_t _FE_DFL_ENV = {{{ 0, 0, 0, 0 }}};
|
// RUN: %llvmgcc -S %s
typedef struct {
union {
struct { } __attribute((packed));
};
} fenv_t;
const fenv_t _FE_DFL_ENV = {{{ 0, 0, 0, 0 }}};
|
Add a RUN line to the test case to make it functional. <rdar://problem/9055247>
|
Add a RUN line to the test case to make it functional. <rdar://problem/9055247>
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@127312 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm
|
571d83314ae9424b23d35ef1b7c3efce6403aad3
|
sha/sha.h
|
sha/sha.h
|
/***************************************************************************/
/* sha.h */
/* */
/* SHA-1 code header file. */
/* Taken from the public domain implementation by Peter C. Gutmann */
/* on 2 Sep 1992, modified by Carl Ellison to be SHA-1. */
/***************************************************************************/
#ifndef _SHA_H_
#define _SHA_H_
/* Define APG_LITTLE_ENDIAN if the machine is little-endian */
#define APG_LITTLE_ENDIAN
/* Useful defines/typedefs */
typedef unsigned char BYTE ;
typedef unsigned long LONG ;
/* The SHA block size and message digest sizes, in bytes */
#define SHA_BLOCKSIZE 64
#define SHA_DIGESTSIZE 20
/* The structure for storing SHA info */
typedef struct {
LONG digest[ 5 ] ; /* Message digest */
LONG countLo, countHi ; /* 64-bit bit count */
LONG data[ 16 ] ; /* SHA data buffer */
LONG slop ; /* # of bytes saved in data[] */
} apg_SHA_INFO ;
void apg_shaInit( apg_SHA_INFO *shaInfo ) ;
void apg_shaUpdate( apg_SHA_INFO *shaInfo, BYTE *buffer, int count ) ;
void apg_shaFinal( apg_SHA_INFO *shaInfo, BYTE hash[SHA_DIGESTSIZE] ) ;
#endif /* _SHA_H_ */
|
/***************************************************************************/
/* sha.h */
/* */
/* SHA-1 code header file. */
/* Taken from the public domain implementation by Peter C. Gutmann */
/* on 2 Sep 1992, modified by Carl Ellison to be SHA-1. */
/***************************************************************************/
#ifndef _SHA_H_
#define _SHA_H_
#include <stdint.h>
/* Define APG_LITTLE_ENDIAN if the machine is little-endian */
#define APG_LITTLE_ENDIAN
/* Useful defines/typedefs */
typedef uint8_t BYTE ;
typedef uint32_t LONG ;
/* The SHA block size and message digest sizes, in bytes */
#define SHA_BLOCKSIZE 64
#define SHA_DIGESTSIZE 20
/* The structure for storing SHA info */
typedef struct {
LONG digest[ 5 ] ; /* Message digest */
LONG countLo, countHi ; /* 64-bit bit count */
LONG data[ 16 ] ; /* SHA data buffer */
LONG slop ; /* # of bytes saved in data[] */
} apg_SHA_INFO ;
void apg_shaInit( apg_SHA_INFO *shaInfo ) ;
void apg_shaUpdate( apg_SHA_INFO *shaInfo, BYTE *buffer, int count ) ;
void apg_shaFinal( apg_SHA_INFO *shaInfo, BYTE hash[SHA_DIGESTSIZE] ) ;
#endif /* _SHA_H_ */
|
Use uint8_t and uint32_t in SHA-1 implementation.
|
Use uint8_t and uint32_t in SHA-1 implementation.
|
C
|
bsd-3-clause
|
wilx/apg,wilx/apg,rogerapras/apg,rogerapras/apg,wilx/apg,rogerapras/apg,rogerapras/apg,wilx/apg
|
8b00f90e146db2f555897d7aa66bc7a403883f74
|
src/diskusage.h
|
src/diskusage.h
|
#pragma once
#include <cstdint>
#include <string>
class SystemError
{
public:
SystemError(int errorno, const std::string& syscall, const std::string& message, const std::string& path)
: m_errorno(errorno), m_syscall(syscall), m_message(message), m_path(path)
{}
int errorno() const { return m_errorno; }
const char* syscall() const { return m_syscall.c_str(); }
const char* message() const { return m_message.c_str(); }
const char* path() const { return m_path.c_str(); }
private:
int m_errorno;
std::string m_syscall;
std::string m_message;
std::string m_path;
};
struct DiskUsage {
uint64_t available;
uint64_t free;
uint64_t total;
};
DiskUsage GetDiskUsage(const char* path);
|
#pragma once
#include <stdint.h>
#include <string>
class SystemError
{
public:
SystemError(int errorno, const std::string& syscall, const std::string& message, const std::string& path)
: m_errorno(errorno), m_syscall(syscall), m_message(message), m_path(path)
{}
int errorno() const { return m_errorno; }
const char* syscall() const { return m_syscall.c_str(); }
const char* message() const { return m_message.c_str(); }
const char* path() const { return m_path.c_str(); }
private:
int m_errorno;
std::string m_syscall;
std::string m_message;
std::string m_path;
};
struct DiskUsage {
uint64_t available;
uint64_t free;
uint64_t total;
};
DiskUsage GetDiskUsage(const char* path);
|
Use stdint.h instead of cstdint
|
Use stdint.h instead of cstdint
Fixes #16.
|
C
|
mit
|
jduncanator/node-diskusage,jduncanator/node-diskusage,jduncanator/node-diskusage
|
b5ae6109ae7151d1fb91009a205bd3d470323f24
|
src/hpctoolkit/csprof/unwind/x86-family/x86-unwind-support.c
|
src/hpctoolkit/csprof/unwind/x86-family/x86-unwind-support.c
|
#include <ucontext.h>
#include "x86-decoder.h"
#include "unwind.h"
void
unw_init_arch(void)
{
x86_family_decoder_init();
}
void
unw_init_cursor_arch(ucontext_t* context, unw_cursor_t *cursor)
{
mcontext_t * mctxt = &(context->uc_mcontext);
#ifdef __CRAYXT_CATAMOUNT_TARGET
cursor->pc = (void *) mctxt->sc_rip;
cursor->bp = (void **) mctxt->sc_rbp;
cursor->sp = (void **) mctxt->sc_rsp;
#else
cursor->pc = (void *) mctxt->gregs[REG_RIP];
cursor->bp = (void **) mctxt->gregs[REG_RBP];
cursor->sp = (void **) mctxt->gregs[REG_RSP];
#endif
}
int
unw_get_reg_arch(unw_cursor_t *cursor, int reg_id, void **reg_value)
{
assert(reg_id == UNW_REG_IP);
*reg_value = cursor->pc;
return 0;
}
|
#include <ucontext.h>
#include <assert.h>
#include "x86-decoder.h"
#include "unwind.h"
void
unw_init_arch(void)
{
x86_family_decoder_init();
}
void
unw_init_cursor_arch(ucontext_t* context, unw_cursor_t *cursor)
{
mcontext_t * mctxt = &(context->uc_mcontext);
#ifdef __CRAYXT_CATAMOUNT_TARGET
cursor->pc = (void *) mctxt->sc_rip;
cursor->bp = (void **) mctxt->sc_rbp;
cursor->sp = (void **) mctxt->sc_rsp;
#else
cursor->pc = (void *) mctxt->gregs[REG_RIP];
cursor->bp = (void **) mctxt->gregs[REG_RBP];
cursor->sp = (void **) mctxt->gregs[REG_RSP];
#endif
}
int
unw_get_reg_arch(unw_cursor_t *cursor, int reg_id, void **reg_value)
{
assert(reg_id == UNW_REG_IP);
*reg_value = cursor->pc;
return 0;
}
|
Include <assert.h> to prevent linking error (unknown symbol 'assert').
|
Include <assert.h> to prevent linking error (unknown symbol 'assert').
|
C
|
bsd-3-clause
|
zcth428/hpctoolkit111,HPCToolkit/hpctoolkit,zcth428/hpctoolkit,HPCToolkit/hpctoolkit,zcth428/hpctoolkit,HPCToolkit/hpctoolkit,zcth428/hpctoolkit111,HPCToolkit/hpctoolkit,zcth428/hpctoolkit111,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,zcth428/hpctoolkit,zcth428/hpctoolkit,zcth428/hpctoolkit111,zcth428/hpctoolkit111,zcth428/hpctoolkit
|
c12e2945e24c544883ce43c49803e5f16b66a96b
|
Sample/SampleApp/ViewController.h
|
Sample/SampleApp/ViewController.h
|
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController <UIAlertViewDelegate, UIActionSheetDelegate>
@property (nonatomic, strong) Class alertControllerClass;
@property (nonatomic, strong) IBOutlet UIButton *showAlertButton;
@property (nonatomic, strong) IBOutlet UIButton *showActionSheetButton;
@property (nonatomic, assign) BOOL alertDefaultActionExecuted;
@property (nonatomic, assign) BOOL alertCancelActionExecuted;
@property (nonatomic, assign) BOOL alertDestroyActionExecuted;
- (IBAction)showAlert:(id)sender;
- (IBAction)showActionSheet:(id)sender;
@end
|
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) Class alertControllerClass;
@property (nonatomic, strong) IBOutlet UIButton *showAlertButton;
@property (nonatomic, strong) IBOutlet UIButton *showActionSheetButton;
@property (nonatomic, assign) BOOL alertDefaultActionExecuted;
@property (nonatomic, assign) BOOL alertCancelActionExecuted;
@property (nonatomic, assign) BOOL alertDestroyActionExecuted;
- (IBAction)showAlert:(id)sender;
- (IBAction)showActionSheet:(id)sender;
@end
|
Remove unused protocol conformance from sample
|
Remove unused protocol conformance from sample
|
C
|
mit
|
foulkesjohn/MockUIAlertController,yas375/MockUIAlertController,carabina/MockUIAlertController
|
9d4a59f2cab4179f3ff5b73477044f2f9289d5b8
|
thread/future.h
|
thread/future.h
|
#ifndef FUTURE_H_INCLUDED
#define FUTURE_H_INCLUDED
#include <boost/thread/thread.hpp>
#include <boost/thread/future.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/result_of.hpp>
namespace thread {
template<typename Func>
boost::shared_future<typename boost::result_of<Func()>::type> submit_task(Func f) {
typedef typename boost::result_of<Func()>::type ResultType;
typedef boost::packaged_task<ResultType> PackagedTaskType;
PackagedTaskType task(f);
boost::shared_future<ResultType> res(task.get_future());
boost::thread task_thread(std::move(task));
return res;
}
}
#endif // FUTURE_H_INCLUDED
|
#ifndef FUTURE_H_INCLUDED
#define FUTURE_H_INCLUDED
#include <boost/thread/thread.hpp>
#include <boost/thread/future.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/result_of.hpp>
namespace thread {
template<typename Func>
boost::shared_future<typename boost::result_of<Func()>::type> submit_task(Func f) {
typedef typename boost::result_of<Func()>::type ResultType;
typedef boost::packaged_task<ResultType> PackagedTaskType;
PackagedTaskType task(f);
boost::shared_future<ResultType> res(task.get_future());
boost::thread task_thread(boost::move(task));
return res;
}
}
#endif // FUTURE_H_INCLUDED
|
Use boost::move rather than std::move which seems to hate some versions ofr G++
|
Use boost::move rather than std::move which seems to hate some versions ofr G++
|
C
|
bsd-2-clause
|
Kazade/kazbase,Kazade/kazbase
|
b7d35893186564bf8c4e706e5d05df06b23d2dc7
|
test/CodeGen/functions.c
|
test/CodeGen/functions.c
|
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
int g();
int foo(int i) {
return g(i);
}
int g(int i) {
return g(i);
}
// rdar://6110827
typedef void T(void);
void test3(T f) {
f();
}
int a(int);
int a() {return 1;}
// RUN: grep 'define void @f0()' %t
void f0() {}
void f1();
// RUN: grep 'call void @f1()' %t
void f2(void) {
f1(1, 2, 3);
}
// RUN: grep 'define void @f1()' %t
void f1() {}
// RUN: grep 'define .* @f3' %t | not grep -F '...'
struct foo { int X, Y, Z; } f3() {
while (1) {}
}
// PR4423 - This shouldn't crash in codegen
void f4() {}
void f5() { f4(42); }
// Qualifiers on parameter types shouldn't make a difference.
static void f6(const float f, const float g) {
}
void f7(float f, float g) {
f6(f, g);
// CHECK: define void @f7(float{{.*}}, float{{.*}})
// CHECK: call void @f6(float{{.*}}, float{{.*}})
}
|
// RUN: %clang_cc1 %s -emit-llvm -o - -verify | FileCheck %s
int g();
int foo(int i) {
return g(i);
}
int g(int i) {
return g(i);
}
// rdar://6110827
typedef void T(void);
void test3(T f) {
f();
}
int a(int);
int a() {return 1;}
void f0() {}
// CHECK: define void @f0()
void f1();
void f2(void) {
// CHECK: call void @f1()
f1(1, 2, 3);
}
// CHECK: define void @f1()
void f1() {}
// CHECK: define {{.*}} @f3()
struct foo { int X, Y, Z; } f3() {
while (1) {}
}
// PR4423 - This shouldn't crash in codegen
void f4() {}
void f5() { f4(42); } //expected-warning {{too many arguments}}
// Qualifiers on parameter types shouldn't make a difference.
static void f6(const float f, const float g) {
}
void f7(float f, float g) {
f6(f, g);
// CHECK: define void @f7(float{{.*}}, float{{.*}})
// CHECK: call void @f6(float{{.*}}, float{{.*}})
}
|
Fix test case and convert fully to FileCheck.
|
Fix test case and convert fully to FileCheck.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@97032 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
fcc92cf5633589068313897d39036686ec32e875
|
src/driver/utility.h
|
src/driver/utility.h
|
#pragma once
#include <fstream>
#include <llvm/ADT/StringRef.h>
inline std::ostream& operator<<(std::ostream& stream, llvm::StringRef string) {
return stream.write(string.data(), string.size());
}
template<typename... Args>
[[noreturn]] inline void error(SrcLoc srcLoc, Args&&... args) {
std::cout << srcLoc.file << ':';
if (srcLoc.isValid()) std::cout << srcLoc.line << ':' << srcLoc.column << ':';
std::cout << " error: ";
using expander = int[];
(void)expander{0, (void(std::cout << std::forward<Args>(args)), 0)...};
// Output caret.
std::ifstream file(srcLoc.file);
while (--srcLoc.line) file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
std::string line;
std::getline(file, line);
std::cout << '\n' << line << '\n';
while (--srcLoc.column) std::cout << ' ';
std::cout << "^\n";
exit(1);
}
|
#pragma once
#include <fstream>
#include <llvm/ADT/StringRef.h>
inline std::ostream& operator<<(std::ostream& stream, llvm::StringRef string) {
return stream.write(string.data(), string.size());
}
template<typename... Args>
[[noreturn]] inline void error(SrcLoc srcLoc, Args&&... args) {
if (srcLoc.file) {
std::cout << srcLoc.file << ':';
if (srcLoc.isValid()) std::cout << srcLoc.line << ':' << srcLoc.column << ':';
} else {
std::cout << "<unknown file>:";
}
std::cout << " error: ";
using expander = int[];
(void)expander{0, (void(std::cout << std::forward<Args>(args)), 0)...};
if (srcLoc.file && srcLoc.isValid()) {
// Output caret.
std::ifstream file(srcLoc.file);
while (--srcLoc.line) file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
std::string line;
std::getline(file, line);
std::cout << '\n' << line << '\n';
while (--srcLoc.column) std::cout << ' ';
std::cout << "^\n";
}
exit(1);
}
|
Fix error() if srcLoc.file is null or !srcLoc.isValid()
|
Fix error() if srcLoc.file is null or !srcLoc.isValid()
|
C
|
mit
|
emlai/delta,emlai/delta,emlai/delta,emlai/delta,delta-lang/delta,delta-lang/delta,delta-lang/delta,delta-lang/delta
|
0e8f41582505e156243a37100568f94f158ec978
|
modules/electromagnetics/test/include/functions/MMSTestFunc.h
|
modules/electromagnetics/test/include/functions/MMSTestFunc.h
|
#ifndef MMSTESTFUNC_H
#define MMSTESTFUNC_H
#include "Function.h"
#include "FunctionInterface.h"
class MMSTestFunc;
template <>
InputParameters validParams<MMSTestFunc>();
/**
* Function of RHS for manufactured solution in spatial_constant_helmholtz test
*/
class MMSTestFunc : public Function, public FunctionInterface
{
public:
MMSTestFunc(const InputParameters & parameters);
virtual Real value(Real t, const Point & p) const override;
protected:
Real _length;
const Function & _a;
const Function & _b;
Real _d;
Real _h;
Real _g_0_real;
Real _g_0_imag;
Real _g_l_real;
Real _g_l_imag;
MooseEnum _component;
};
#endif // MMSTESTFUNC_H
|
#pragma once
#include "Function.h"
#include "FunctionInterface.h"
class MMSTestFunc;
template <>
InputParameters validParams<MMSTestFunc>();
/**
* Function of RHS for manufactured solution in spatial_constant_helmholtz test
*/
class MMSTestFunc : public Function, public FunctionInterface
{
public:
MMSTestFunc(const InputParameters & parameters);
virtual Real value(Real t, const Point & p) const override;
protected:
Real _length;
const Function & _a;
const Function & _b;
Real _d;
Real _h;
Real _g_0_real;
Real _g_0_imag;
Real _g_l_real;
Real _g_l_imag;
MooseEnum _component;
};
|
Convert to pragma once in test functions
|
Convert to pragma once in test functions
refs #21085
|
C
|
lgpl-2.1
|
laagesen/moose,harterj/moose,andrsd/moose,sapitts/moose,milljm/moose,milljm/moose,idaholab/moose,lindsayad/moose,harterj/moose,idaholab/moose,andrsd/moose,sapitts/moose,harterj/moose,sapitts/moose,dschwen/moose,andrsd/moose,dschwen/moose,milljm/moose,sapitts/moose,dschwen/moose,laagesen/moose,lindsayad/moose,andrsd/moose,idaholab/moose,idaholab/moose,milljm/moose,harterj/moose,sapitts/moose,laagesen/moose,lindsayad/moose,milljm/moose,laagesen/moose,lindsayad/moose,lindsayad/moose,dschwen/moose,idaholab/moose,andrsd/moose,dschwen/moose,laagesen/moose,harterj/moose
|
2ec53d6f185a4a3e91ea6a2b879089eeac7896dd
|
storage/src/vespa/storage/bucketdb/minimumusedbitstracker.h
|
storage/src/vespa/storage/bucketdb/minimumusedbitstracker.h
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <algorithm>
#include <vespa/document/bucket/bucketid.h>
namespace storage {
/**
* Utility class for keeping track of the lowest used bits count seen
* across a set of buckets.
*
* Not threadsafe by itself.
*/
class MinimumUsedBitsTracker
{
uint32_t _minUsedBits;
public:
MinimumUsedBitsTracker()
: _minUsedBits(58)
{}
/**
* Returns true if new bucket led to a decrease in the used bits count.
*/
bool update(const document::BucketId& bucket) {
if (bucket.getUsedBits() < _minUsedBits) {
_minUsedBits = bucket.getUsedBits();
return true;
}
return false;
}
uint32_t getMinUsedBits() const {
return _minUsedBits;
}
void setMinUsedBits(uint32_t minUsedBits) {
_minUsedBits = minUsedBits;
}
};
}
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/document/bucket/bucketid.h>
#include <atomic>
namespace storage {
/**
* Utility class for keeping track of the lowest used bits count seen
* across a set of buckets.
*
* Thread safe for reads and writes.
*/
class MinimumUsedBitsTracker
{
std::atomic<uint32_t> _min_used_bits;
public:
constexpr MinimumUsedBitsTracker() noexcept
: _min_used_bits(58)
{}
/**
* Returns true iff new bucket led to a decrease in the used bits count.
*/
bool update(const document::BucketId& bucket) noexcept {
const uint32_t bucket_bits = bucket.getUsedBits();
uint32_t current_bits = _min_used_bits.load(std::memory_order_relaxed);
if (bucket_bits < current_bits) {
while (!_min_used_bits.compare_exchange_strong(current_bits, bucket_bits,
std::memory_order_relaxed,
std::memory_order_relaxed))
{
if (bucket_bits >= current_bits) {
return false; // We've raced with another writer that had lower or equal bits to our own bucket.
}
}
return true;
}
return false;
}
[[nodiscard]] uint32_t getMinUsedBits() const noexcept {
return _min_used_bits.load(std::memory_order_relaxed);
}
void setMinUsedBits(uint32_t minUsedBits) noexcept {
_min_used_bits.store(minUsedBits, std::memory_order_relaxed);
}
};
}
|
Make MinimumUsedBitsTracker thread safe for both reads and writes
|
Make MinimumUsedBitsTracker thread safe for both reads and writes
|
C
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
03cb0d30b60c3702edc0752fe535abb1ae41a32d
|
src/controllers/chooseyourcat.c
|
src/controllers/chooseyourcat.c
|
#include "debug.h"
#include "input.h"
#include "scene.h"
#include "sound.h"
#include "controller.h"
#include "controllers/chooseyourcat.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
NEW_CONTROLLER(ChooseYourCat);
static void p1_confirm() {
Sound_playSE(FX_SELECT);
Scene_close();
Scene_load(SCENE_PRESSSTART);
}
static void p2_confirm() {
Sound_playSE(FX_SELECT);
Scene_close();
Scene_load(SCENE_PRESSSTART);
}
static void ChooseYourCatController_init() {
EVENT_ASSOCIATE(press, P1_MARU, p1_confirm);
EVENT_ASSOCIATE(press, P2_MARU, p2_confirm);
logprint(success_msg);
}
|
#include "debug.h"
#include "input.h"
#include "scene.h"
#include "sound.h"
#include "controller.h"
#include "scenes/chooseyourcat.h"
#include "controllers/chooseyourcat.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
static int P1_HAS_CHOSEN = false;
/* false -> P1 escolhe o gato;
true -> P2 escolhe o gato. */
NEW_CONTROLLER(ChooseYourCat);
static void p1_confirm() {
if (!P1_HAS_CHOSEN) {
Sound_playSE(FX_SELECT);
P1_HAS_CHOSEN = true;
}
}
static void p2_confirm() {
if (P1_HAS_CHOSEN) {
/* code */
Sound_playSE(FX_SELECT);
Scene_close();
Scene_load(SCENE_PRESSSTART);
}
}
static void ChooseYourCatController_init() {
EVENT_ASSOCIATE(press, P1_MARU, p1_confirm);
EVENT_ASSOCIATE(press, P2_MARU, p2_confirm);
logprint(success_msg);
}
|
Add step for each player on choose your cat scene
|
Add step for each player on choose your cat scene
|
C
|
mit
|
OrenjiAkira/spacegame,OrenjiAkira/spacegame,OrenjiAkira/spacegame
|
2240e7ad952671f460d73f1edcb3052d6cd84b5a
|
chrome/browser/extensions/convert_web_app.h
|
chrome/browser/extensions/convert_web_app.h
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#define CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#pragma once
#include <string>
#include "base/ref_counted.h"
class Extension;
namespace base {
class Time;
}
namespace webkit_glue {
struct WebApplicationInfo;
}
// Generates a version number for an extension from a time. The goal is to make
// use of the version number to communicate some useful information. The
// returned version has the format:
// <year>.<month><day>.<upper 16 bits of unix timestamp>.<lower 16 bits>
std::string ConvertTimeToExtensionVersion(const base::Time& time);
// Wraps the specified web app in an extension. The extension is created
// unpacked in the system temp dir. Returns a valid extension that the caller
// should take ownership on success, or NULL and |error| on failure.
//
// NOTE: This function does file IO and should not be called on the UI thread.
// NOTE: The caller takes ownership of the directory at extension->path() on the
// returned object.
scoped_refptr<Extension> ConvertWebAppToExtension(
const webkit_glue::WebApplicationInfo& web_app_info,
const base::Time& create_time);
#endif // CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#define CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#pragma once
#include <string>
#include "base/ref_counted.h"
class Extension;
namespace base {
class Time;
}
namespace webkit_glue {
class WebApplicationInfo;
}
// Generates a version number for an extension from a time. The goal is to make
// use of the version number to communicate some useful information. The
// returned version has the format:
// <year>.<month><day>.<upper 16 bits of unix timestamp>.<lower 16 bits>
std::string ConvertTimeToExtensionVersion(const base::Time& time);
// Wraps the specified web app in an extension. The extension is created
// unpacked in the system temp dir. Returns a valid extension that the caller
// should take ownership on success, or NULL and |error| on failure.
//
// NOTE: This function does file IO and should not be called on the UI thread.
// NOTE: The caller takes ownership of the directory at extension->path() on the
// returned object.
scoped_refptr<Extension> ConvertWebAppToExtension(
const webkit_glue::WebApplicationInfo& web_app_info,
const base::Time& create_time);
#endif // CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
|
Revert 64847 - Clang fix.
|
Revert 64847 - Clang fix.
TBR=evan@chromium.org
Review URL: http://codereview.chromium.org/4300003
git-svn-id: http://src.chromium.org/svn/trunk/src@64850 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 61481afd2d1e81e91b533a55dc544a62738ba663
|
C
|
bsd-3-clause
|
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
|
f8c16eb52a703986b5448c23fd02838af152978a
|
ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_core.h
|
ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_core.h
|
// Copyright 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE file.
#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
#include "native_client/src/include/nacl_macros.h"
class PPB_Core;
namespace ppapi_proxy {
// Implements the untrusted side of the PPB_Core interface.
// We will also need an rpc service to implement the trusted side, which is a
// very thin wrapper around the PPB_Core interface returned from the browser.
class PluginCore {
public:
// Return an interface pointer usable by PPAPI plugins.
static const PPB_Core* GetInterface();
// Mark the calling thread as the main thread for IsMainThread.
static void MarkMainThread();
private:
NACL_DISALLOW_COPY_AND_ASSIGN(PluginCore);
};
} // namespace ppapi_proxy
#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
#include "native_client/src/include/nacl_macros.h"
struct PPB_Core;
namespace ppapi_proxy {
// Implements the untrusted side of the PPB_Core interface.
// We will also need an rpc service to implement the trusted side, which is a
// very thin wrapper around the PPB_Core interface returned from the browser.
class PluginCore {
public:
// Return an interface pointer usable by PPAPI plugins.
static const PPB_Core* GetInterface();
// Mark the calling thread as the main thread for IsMainThread.
static void MarkMainThread();
private:
NACL_DISALLOW_COPY_AND_ASSIGN(PluginCore);
};
} // namespace ppapi_proxy
#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_CORE_H_
|
Declare PPB_Core as a struct, not a class. (Prevents Clang warning)
|
Declare PPB_Core as a struct, not a class. (Prevents Clang warning)
Review URL: http://codereview.chromium.org/8002017
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@102565 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
robclark/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,robclark/chromium,anirudhSK/chromium,littlstar/chromium.src,dednal/chromium.src,Chilledheart/chromium,dednal/chromium.src,dednal/chromium.src,keishi/chromium,patrickm/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,keishi/chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,M4sse/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,keishi/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,zcbenz/cefode-chromium,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,keishi/chromium,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,rogerwang/chromium,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,ltilve/chromium,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,M4sse/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,keishi/chromium,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,ondra-novak/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,ltilve/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,Jonekee/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,dednal/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,keishi/chromium,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,rogerwang/chromium,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,Jonekee/chromium.src,rogerwang/chromium,Just-D/chromium-1,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,anirudhSK/chromium,ltilve/chromium,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,littlstar/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,Jonekee/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,M4sse/chromium.src,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,Just-D/chromium-1,dednal/chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk,rogerwang/chromium,Just-D/chromium-1,rogerwang/chromium,mogoweb/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,markYoungH/chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,keishi/chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,Jonekee/chromium.src,rogerwang/chromium,patrickm/chromium.src,jaruba/chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,rogerwang/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,dushu1203/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,robclark/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,hujiajie/pa-chromium,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,robclark/chromium,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,patrickm/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,patrickm/chromium.src,anirudhSK/chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,ltilve/chromium,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,patrickm/chromium.src,patrickm/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,robclark/chromium,robclark/chromium,ltilve/chromium,anirudhSK/chromium,dednal/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,patrickm/chromium.src
|
dbb4fc6fb1f9967305f5490969a2b05c659d4b51
|
Problem039/C/solution_1.c
|
Problem039/C/solution_1.c
|
#include <stdio.h>
#define MAX 1000
int main() {
int i, j, k, maxP;
int ps[1001];
for(i = 1; i <= MAX; i++) {
for(j = i;j <= MAX; j++) {
for(k = j; (k * k) < (i * i + j * j); k++);
if((i * i + j * j) == (k * k) && (i + j + k) <= MAX) {
ps[i+j+k]++;
}
}
}
for(i = 1; i <= MAX; i++) {
if(ps[maxP] < ps[i])
maxP = i;
}
printf("%d\n",maxP);
return 0;
}
|
#include <stdio.h>
#define MAX 1000
int main() {
int i, j , k, maxP = 1;
int ps[1001];
for (i=0; i <= MAX; ps[++i] =0);
for(i = 1; i <= MAX; i++) {
for(j = i;j <= MAX; j++) {
for(k = j; (k * k) < (i * i + j * j); k++);
if((i * i + j * j) == (k * k) && (i + j + k) <= MAX) {
ps[i+j+k] += 1;
}
}
}
for(i = 1; i <= MAX; i++) {
if(ps[maxP] < ps[i])
maxP = i;
}
printf("%d\n",maxP);
return 0;
}
|
Fix C solution for Problem039
|
Fix C solution for Problem039
The Author forgot to explicitily initialize the vector elements with
zeros. On my computer, without this, I get the wrong answer.
BTW, if maxP is not defined before, I don't even get a wrong answer.
A beatiful segmentation fault is raised.
|
C
|
mit
|
DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler
|
a6b6814f07cfb18f2203584c015a5a93da8ad9d5
|
LYCategory/Classes/_Foundation/_Work/NSString+Convert.h
|
LYCategory/Classes/_Foundation/_Work/NSString+Convert.h
|
//
// NSString+Convert.h
// LYCATEGORY
//
// CREATED BY LUO YU ON 2016-11-04.
// COPYRIGHT (C) 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <Foundation/Foundation.h>
@interface NSString (Convert)
- (NSString *)encodingURL;
@end
|
//
// NSString+Convert.h
// LYCATEGORY
//
// CREATED BY LUO YU ON 2016-11-04.
// COPYRIGHT (C) 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <Foundation/Foundation.h>
@interface NSString (Convert)
- (NSString *)encodingURL;
- (NSString *)pinyin;
@end
|
Add : string convert to pinyin
|
Add : string convert to pinyin
|
C
|
mit
|
blodely/LYCategory,blodely/LYCategory,blodely/LYCategory,blodely/LYCategory
|
b0411affebefe3ed78dbeb60637d9730159a5d99
|
tools/cncframework/templates/unified_c_api/common/StepFunc.c
|
tools/cncframework/templates/unified_c_api/common/StepFunc.c
|
{% import "common_macros.inc.c" as util with context -%}
{% set stepfun = g.stepFunctions[targetStep] -%}
#include "{{g.name}}.h"
/**
* Step function defintion for "{{stepfun.collName}}"
*/
void {{util.qualified_step_name(stepfun)}}({{ util.print_tag(stepfun.tag, typed=True)
}}{{ util.print_bindings(stepfun.inputItems, typed=True)
}}{{util.g_ctx_param()}}) {
{% if stepfun.rangedInputItems %}
//
// INPUTS
//
{% call util.render_indented(1) -%}
{{ util.render_step_inputs(stepfun.rangedInputItems) }}
{% endcall -%}
{% endif %}
//
// OUTPUTS
//
{% call util.render_indented(1) -%}
{{ util.render_step_outputs(stepfun.outputs) }}
{%- endcall %}
}
|
{% import "common_macros.inc.c" as util with context -%}
{% set stepfun = g.stepFunctions[targetStep] -%}
#include "{{g.name}}.h"
/**
* Step function definition for "{{stepfun.collName}}"
*/
void {{util.qualified_step_name(stepfun)}}({{ util.print_tag(stepfun.tag, typed=True)
}}{{ util.print_bindings(stepfun.inputItems, typed=True)
}}{{util.g_ctx_param()}}) {
{% if stepfun.rangedInputItems %}
//
// INPUTS
//
{% call util.render_indented(1) -%}
{{ util.render_step_inputs(stepfun.rangedInputItems) }}
{% endcall -%}
{% endif %}
//
// OUTPUTS
//
{% call util.render_indented(1) -%}
{{ util.render_step_outputs(stepfun.outputs) }}
{%- endcall %}
}
|
Fix typo in step function comment
|
Fix typo in step function comment
|
C
|
bsd-3-clause
|
habanero-rice/cnc-framework,habanero-rice/cnc-framework,chamibuddhika/cnc-framework,habanero-rice/cnc-framework,habanero-rice/cnc-framework,chamibuddhika/cnc-framework,habanero-rice/cnc-framework,habanero-rice/cnc-framework
|
7208a32b3dfb6cdd73c509add8378a20b31bb5a7
|
libyaul/scu/bus/cpu/cpu_slave.c
|
libyaul/scu/bus/cpu/cpu_slave.c
|
/*
* Copyright (c) 2012-2016
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com
*/
#include <sys/cdefs.h>
#include <smpc/smc.h>
#include <cpu/instructions.h>
#include <cpu/frt.h>
#include <cpu/intc.h>
#include <cpu/map.h>
#include <cpu/slave.h>
static void _slave_entry(void);
static void _default_entry(void);
static void (*_entry)(void) = _default_entry;
void
cpu_slave_init(void)
{
smpc_smc_sshoff_call();
cpu_slave_entry_clear();
cpu_intc_ihr_set(INTC_INTERRUPT_SLAVE_ENTRY, _slave_entry);
smpc_smc_sshon_call();
}
void
cpu_slave_entry_set(void (*entry)(void))
{
_entry = (entry != NULL) ? entry : _default_entry;
}
static void
_slave_entry(void)
{
while (true) {
while (((cpu_frt_status_get()) & FRTCS_ICF) == 0x00);
cpu_frt_control_chg((uint8_t)~FRTCS_ICF);
_entry();
}
}
static void
_default_entry(void)
{
}
|
/*
* Copyright (c) 2012-2016
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com
*/
#include <sys/cdefs.h>
#include <smpc/smc.h>
#include <cpu/instructions.h>
#include <cpu/frt.h>
#include <cpu/intc.h>
#include <cpu/map.h>
#include <cpu/slave.h>
static void _slave_entry(void);
static void _default_entry(void);
static void (*_entry)(void) = _default_entry;
void
cpu_slave_init(void)
{
smpc_smc_sshoff_call();
cpu_slave_entry_clear();
cpu_intc_ihr_set(INTC_INTERRUPT_SLAVE_ENTRY, _slave_entry);
smpc_smc_sshon_call();
}
void
cpu_slave_entry_set(void (*entry)(void))
{
_entry = (entry != NULL) ? entry : _default_entry;
}
static void __noreturn
_slave_entry(void)
{
while (true) {
while (((cpu_frt_status_get()) & FRTCS_ICF) == 0x00);
cpu_frt_control_chg((uint8_t)~FRTCS_ICF);
_entry();
}
}
static void
_default_entry(void)
{
}
|
Mark _slave_entry to never return
|
Mark _slave_entry to never return
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
94212f6fdc2b9f135f69e42392485adce8b04cc7
|
util/metadata.h
|
util/metadata.h
|
#include <stdio.h>
#include <stdlib.h>
#ifndef METADATA_H
#define METADATA_H
typedef struct Metadata
{
/**
* File's name.
*/
char md_name[255];
/**
* File's extension.
*/
char md_extension[10];
/**
* List of keywords to describe the file.
*/
char md_keywords[255];
/**
* Hash of the content. We use SHA-1 which generates a
* 160-bit hash value rendered as 40 digits long in
* hexadecimal.
*/
char md_hash[41];
} Metadata;
Metadata *new_metadata(char name[], char extension[], char keywords[], char hash[]);
void free_metadata(Metadata *md);
Metadata *create_metadata_from_path(char pathFile[1000]);
#endif /* METADATA_H */
|
#include <stdio.h>
#include <stdlib.h>
#ifndef METADATA_H
#define METADATA_H
typedef struct Metadata
{
/**
* File's name.
*/
char md_name[255];
/**
* File's extension.
*/
char md_extension[10];
/**
* List of keywords to describe the file.
*/
char md_keywords[255];
/**
* Hash of the content. We use SHA-1 which generates a
* 160-bit hash value rendered as 40 digits long in
* hexadecimal.
*/
char md_hash[41];
} Metadata;
Metadata *new_metadata(char name[], char extension[], char keywords[], char hash[]);
void free_metadata(Metadata *md);
Metadata *create_metadata_from_path(char pathFile[1000]);
#endif /* METADATA_H */
|
Indent better than Videl :)
|
Indent better than Videl :)
|
C
|
mit
|
Videl/FrogidelTorrent,Videl/FrogidelTorrent
|
e8a66aeb8e09270662bbd58cdd4cebc8537df31c
|
MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalDataImport.h
|
MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalDataImport.h
|
//
// NSManagedObject+JSONHelpers.h
//
// Created by Saul Mora on 6/28/11.
// Copyright 2011 Magical Panda Software LLC. All rights reserved.
//
#import <CoreData/CoreData.h>
extern NSString * const kMagicalRecordImportCustomDateFormatKey;
extern NSString * const kMagicalRecordImportDefaultDateFormatString;
extern NSString * const kMagicalRecordImportUnixTimeString;
extern NSString * const kMagicalRecordImportAttributeKeyMapKey;
extern NSString * const kMagicalRecordImportAttributeValueClassNameKey;
extern NSString * const kMagicalRecordImportRelationshipMapKey;
extern NSString * const kMagicalRecordImportRelationshipLinkedByKey;
extern NSString * const kMagicalRecordImportRelationshipTypeKey;
@interface NSManagedObject (MagicalRecord_DataImport)
+ (instancetype) MR_importFromObject:(id)data;
+ (instancetype) MR_importFromObject:(id)data inContext:(NSManagedObjectContext *)context;
+ (NSArray *) MR_importFromArray:(NSArray *)listOfObjectData;
+ (NSArray *) MR_importFromArray:(NSArray *)listOfObjectData inContext:(NSManagedObjectContext *)context;
@end
@interface NSManagedObject (MagicalRecord_DataImportControls)
- (BOOL) shouldImport:(id)data;
- (void) willImport:(id)data;
- (void) didImport:(id)data;
@end
|
//
// NSManagedObject+JSONHelpers.h
//
// Created by Saul Mora on 6/28/11.
// Copyright 2011 Magical Panda Software LLC. All rights reserved.
//
#import <CoreData/CoreData.h>
extern NSString * const kMagicalRecordImportCustomDateFormatKey;
extern NSString * const kMagicalRecordImportDefaultDateFormatString;
extern NSString * const kMagicalRecordImportUnixTimeString;
extern NSString * const kMagicalRecordImportAttributeKeyMapKey;
extern NSString * const kMagicalRecordImportAttributeValueClassNameKey;
extern NSString * const kMagicalRecordImportRelationshipMapKey;
extern NSString * const kMagicalRecordImportRelationshipLinkedByKey;
extern NSString * const kMagicalRecordImportRelationshipTypeKey;
@protocol MagicalRecordDataImportProtocol <NSObject>
@optional
- (BOOL) shouldImport:(id)data;
- (void) willImport:(id)data;
- (void) didImport:(id)data;
@end
@interface NSManagedObject (MagicalRecord_DataImport) <MagicalRecordDataImportProtocol>
+ (instancetype) MR_importFromObject:(id)data;
+ (instancetype) MR_importFromObject:(id)data inContext:(NSManagedObjectContext *)context;
+ (NSArray *) MR_importFromArray:(NSArray *)listOfObjectData;
+ (NSArray *) MR_importFromArray:(NSArray *)listOfObjectData inContext:(NSManagedObjectContext *)context;
@end
|
Move the import controls into a formal protocol
|
Move the import controls into a formal protocol
|
C
|
mit
|
naqi/MagicalRecord,naqi/MagicalRecord
|
669cbb41fab72b377fffd64f9ef0171fe13c5834
|
cleanup.h
|
cleanup.h
|
///
/// \file cleanup.h
/// \brief Functions to clean up memory
/// \defgroup cleanup Memory Cleanup
/// \brief Frees memory before loading
/// @{
///
#ifndef UVL_CLEANUP
#define UVL_CLEANUP
#include "types.h"
int uvl_cleanup_memory ();
int uvl_unload_all_modules ();
#endif
/// @}
|
///
/// \file cleanup.h
/// \brief Functions to clean up memory
/// \defgroup cleanup Memory Cleanup
/// \brief Frees memory before loading
/// @{
///
#ifndef UVL_CLEANUP
#define UVL_CLEANUP
#include "types.h"
int uvl_cleanup_memory ();
int uvl_unload_all_modules();
void uvl_pre_clean();
#endif
/// @}
|
Fix a warning about implicit function declaration.
|
Fix a warning about implicit function declaration.
|
C
|
apache-2.0
|
MrNetrix/UVLoader,yifanlu/UVLoader,yifanlu/UVLoader,MrNetrix/UVLoader
|
0602fcde6e03bc08b0a333b291d8fe45cb4f56e3
|
libevmjit/Utils.h
|
libevmjit/Utils.h
|
#pragma once
#include <iostream>
// The same as assert, but expression is always evaluated and result returned
#define CHECK(expr) (assert(expr), expr)
#if !defined(NDEBUG) // Debug
namespace dev
{
namespace evmjit
{
std::ostream& getLogStream(char const* _channel);
}
}
#define DLOG(CHANNEL) ::dev::evmjit::getLogStream(#CHANNEL)
#else // Release
#define DLOG(CHANNEL) true ? std::cerr : std::cerr
#endif
|
#pragma once
#include <iostream>
// The same as assert, but expression is always evaluated and result returned
#define CHECK(expr) (assert(expr), expr)
#if !defined(NDEBUG) // Debug
namespace dev
{
namespace evmjit
{
std::ostream& getLogStream(char const* _channel);
}
}
#define DLOG(CHANNEL) ::dev::evmjit::getLogStream(#CHANNEL)
#else // Release
namespace dev
{
namespace evmjit
{
struct Voider
{
void operator=(std::ostream const&) {}
};
}
}
#define DLOG(CHANNEL) true ? (void)0 : ::dev::evmjit::Voider{} = std::cerr
#endif
|
Reimplement no-op version of DLOG to avoid C++ compiler warning
|
Reimplement no-op version of DLOG to avoid C++ compiler warning
|
C
|
mit
|
LefterisJP/webthree-umbrella,LefterisJP/webthree-umbrella,smartbitcoin/cpp-ethereum,vaporry/cpp-ethereum,johnpeter66/ethminer,expanse-project/cpp-expanse,karek314/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,gluk256/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,arkpar/webthree-umbrella,expanse-project/cpp-expanse,yann300/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,anthony-cros/cpp-ethereum,d-das/cpp-ethereum,xeddmc/cpp-ethereum,vaporry/evmjit,vaporry/cpp-ethereum,smartbitcoin/cpp-ethereum,gluk256/cpp-ethereum,karek314/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,LefterisJP/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,vaporry/webthree-umbrella,yann300/cpp-ethereum,joeldo/cpp-ethereum,d-das/cpp-ethereum,joeldo/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,subtly/cpp-ethereum-micro,d-das/cpp-ethereum,joeldo/cpp-ethereum,programonauta/webthree-umbrella,xeddmc/cpp-ethereum,ethers/cpp-ethereum,anthony-cros/cpp-ethereum,xeddmc/cpp-ethereum,yann300/cpp-ethereum,anthony-cros/cpp-ethereum,chfast/webthree-umbrella,vaporry/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,smartbitcoin/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,ethers/cpp-ethereum,johnpeter66/ethminer,PaulGrey30/go-get--u-github.com-tools-godep,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,yann300/cpp-ethereum,expanse-org/cpp-expanse,smartbitcoin/cpp-ethereum,ethers/cpp-ethereum,LefterisJP/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,programonauta/webthree-umbrella,d-das/cpp-ethereum,vaporry/cpp-ethereum,vaporry/evmjit,joeldo/cpp-ethereum,expanse-project/cpp-expanse,d-das/cpp-ethereum,subtly/cpp-ethereum-micro,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,eco/cpp-ethereum,expanse-org/cpp-expanse,anthony-cros/cpp-ethereum,expanse-org/cpp-expanse,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,joeldo/cpp-ethereum,LefterisJP/cpp-ethereum,yann300/cpp-ethereum,karek314/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,expanse-org/cpp-expanse,karek314/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,ethers/cpp-ethereum,xeddmc/cpp-ethereum,subtly/cpp-ethereum-micro,expanse-project/cpp-expanse,d-das/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,eco/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,LefterisJP/cpp-ethereum,anthony-cros/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,expanse-project/cpp-expanse,eco/cpp-ethereum,eco/cpp-ethereum,vaporry/cpp-ethereum,subtly/cpp-ethereum-micro,subtly/cpp-ethereum-micro,gluk256/cpp-ethereum,LefterisJP/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,eco/cpp-ethereum,karek314/cpp-ethereum,johnpeter66/ethminer,smartbitcoin/cpp-ethereum,karek314/cpp-ethereum,yann300/cpp-ethereum,expanse-org/cpp-expanse,subtly/cpp-ethereum-micro,gluk256/cpp-ethereum,expanse-project/cpp-expanse,ethers/cpp-ethereum,gluk256/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,vaporry/cpp-ethereum,gluk256/cpp-ethereum,joeldo/cpp-ethereum,ethers/cpp-ethereum,xeddmc/cpp-ethereum,LefterisJP/cpp-ethereum,smartbitcoin/cpp-ethereum,eco/cpp-ethereum,expanse-org/cpp-expanse,Sorceror32/go-get--u-github.com-tools-godep,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,xeddmc/cpp-ethereum,anthony-cros/cpp-ethereum
|
4f78441af442507e2496e40d7f150934bc984d8b
|
linkedLists/linked_lists_test.c
|
linkedLists/linked_lists_test.c
|
//tests for linked lists tasks from the "Cracking The Coding Interview".
#include <assert.h>
#include <stdbool.h>
int main()
{
assert(false && "First unit test");
return 0;
}
|
//tests for linked lists tasks from the "Cracking The Coding Interview".
#include <assert.h>
#include <stdbool.h>
#include "../../c_double_linked_list/double_linked_list.h"
int main()
{
struct Node* h = initHeadNode(0);
printList(h);
clear(h);
return 0;
}
|
Add simple test (proof of working) for double linked list api.
|
Add simple test (proof of working) for double linked list api.
|
C
|
bsd-3-clause
|
MikhSol/crackingTheCodingInterviewC
|
10ca149c4add37f104200e33271d826460f8964b
|
drivers/scsi/qla4xxx/ql4_version.h
|
drivers/scsi/qla4xxx/ql4_version.h
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.04.00-k3"
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.04.00-k4"
|
Update driver version to 5.04.00-k4
|
[SCSI] qla4xxx: Update driver version to 5.04.00-k4
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
1cb1819cbae564c8a3bda066c73987368e921ac9
|
src/api/add.h
|
src/api/add.h
|
#ifndef CTF_ADD_H
#define CTF_ADD_H
#include <sys/queue.h>
#include <sys/stddef.h>
#include "file/errors.h"
#define _CTF_ADD_PROTO(FUNCTION_NAME, OBJECT_TYPE, VALUE_TYPE) \
int \
FUNCTION_NAME (OBJECT_TYPE object, VALUE_TYPE value);
#define _CTF_ADD_IMPL(FUNCTION_NAME, OBJECT_TYPE, VALUE_TYPE, LIST_NAME, \
LIST_ENTRY_NAME) \
int \
FUNCTION_NAME (OBJECT_TYPE object, VALUE_TYPE value) \
{ \
if (object != NULL) \
{ \
if (object->LIST_NAME != NULL) \
{ \
TAILQ_INSERT_TAIL(object->LIST_NAME, value, LIST_ENTRY_NAME); \
return CTF_OK; \
} \
else \
return CTF_E_NULL; \
} \
else \
return CTF_E_NULL; \
}
#endif
|
#ifndef CTF_ADD_H
#define CTF_ADD_H
#include <sys/queue.h>
#include <sys/stddef.h>
#include "file/errors.h"
#define _CTF_ADD_PROTO(FUNCTION_NAME, OBJECT_TYPE, VALUE_TYPE) \
int \
FUNCTION_NAME (OBJECT_TYPE object, VALUE_TYPE value);
#define _CTF_ADD_IMPL(FUNCTION_NAME, OBJECT_TYPE, VALUE_TYPE, LIST_NAME, \
LIST_ENTRY_NAME, LIST_COUNTER) \
int \
FUNCTION_NAME (OBJECT_TYPE object, VALUE_TYPE value) \
{ \
if (object != NULL) \
{ \
if (object->LIST_NAME != NULL) \
{ \
TAILQ_INSERT_TAIL(object->LIST_NAME, value, LIST_ENTRY_NAME); \
object->LIST_COUNTER++; \
return CTF_OK; \
} \
else \
return CTF_E_NULL; \
} \
else \
return CTF_E_NULL; \
}
#endif
|
Add API increments count variable
|
Add API increments count variable
|
C
|
bsd-2-clause
|
lovasko/libctf,lovasko/libctf
|
becd309739fcd9e9f6fecdeb0ccf5cac3523caee
|
adapters/Mintegral/MintegralAdapter/GADMediationAdapterMintegralConstants.h
|
adapters/Mintegral/MintegralAdapter/GADMediationAdapterMintegralConstants.h
|
// Copyright 2022 Google LLC
//
// 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.
#import <Foundation/Foundation.h>
/// Mintegral mediation adapter version.
static NSString *const GADMAdapterMintegralVersion = @"7.2.1.0";
/// Mintegral mediation adapter Mintegral App ID parameter key.
static NSString *const GADMAdapterMintegralAppID = @"app_id";
/// Mintegral mediation adapter Mintegral App Key parameter key.
static NSString *const GADMAdapterMintegralAppKey = @"app_key";
/// Mintegral mediation adapter Ad Unit ID parameter key.
static NSString *const GADMAdapterMintegralAdUnitID = @"ad_unit_id";
/// Mintegral mediation adapter Ad Placement ID parameter key.
static NSString *const GADMAdapterMintegralPlacementID = @"placement_id";
/// Mintegral adapter error domain.
static NSString *const GADMAdapterMintegralErrorDomain = @"com.google.mediation.mintegral";
|
// Copyright 2022 Google LLC
//
// 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.
#import <Foundation/Foundation.h>
/// Mintegral mediation adapter version.
static NSString *const GADMAdapterMintegralVersion = @"7.2.4.0";
/// Mintegral mediation adapter Mintegral App ID parameter key.
static NSString *const GADMAdapterMintegralAppID = @"app_id";
/// Mintegral mediation adapter Mintegral App Key parameter key.
static NSString *const GADMAdapterMintegralAppKey = @"app_key";
/// Mintegral mediation adapter Ad Unit ID parameter key.
static NSString *const GADMAdapterMintegralAdUnitID = @"ad_unit_id";
/// Mintegral mediation adapter Ad Placement ID parameter key.
static NSString *const GADMAdapterMintegralPlacementID = @"placement_id";
/// Mintegral adapter error domain.
static NSString *const GADMAdapterMintegralErrorDomain = @"com.google.mediation.mintegral";
|
Modify the adapter version number.
|
Modify the adapter version number.
|
C
|
apache-2.0
|
googleads/googleads-mobile-ios-mediation,googleads/googleads-mobile-ios-mediation,googleads/googleads-mobile-ios-mediation,googleads/googleads-mobile-ios-mediation
|
bc65ee3b42944d7f36645334ca083a6d82eda6f9
|
src/lib/ldm.h
|
src/lib/ldm.h
|
/*
* This file is part of linux-driver-management.
*
* Copyright © 2016-2017 Ikey Doherty
*
* linux-driver-management is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*/
#pragma once
#include <manager.h>
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=8 tabstop=8 expandtab:
* :indentSize=8:tabSize=8:noTabs=true:
*/
|
/*
* This file is part of linux-driver-management.
*
* Copyright © 2016-2017 Ikey Doherty
*
* linux-driver-management is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*/
#pragma once
#include <device.h>
#include <manager.h>
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=8 tabstop=8 expandtab:
* :indentSize=8:tabSize=8:noTabs=true:
*/
|
Include device in the LDM headers
|
Include device in the LDM headers
Signed-off-by: Ikey Doherty <d8d992cf0016e35c2a8339d5e7d44bebd12a2d77@solus-project.com>
|
C
|
lgpl-2.1
|
solus-project/linux-driver-management,solus-project/linux-driver-management
|
8d873ed8fa874802c30983001bb10366c7f13401
|
lib/node_modules/@stdlib/strided/common/include/stdlib/strided_macros.h
|
lib/node_modules/@stdlib/strided/common/include/stdlib/strided_macros.h
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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.
*/
/**
* Header file containing strided array macros.
*/
#ifndef STDLIB_STRIDED_MACROS_H
#define STDLIB_STRIDED_MACROS_H
#include "strided_nullary_macros.h"
#include "strided_unary_macros.h"
#include "strided_binary_macros.h"
#include "strided_ternary_macros.h"
#include "strided_quaternary_macros.h"
#include "strided_quinary_macros.h"
#endif // !STDLIB_STRIDED_MACROS_H
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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.
*/
/**
* Header file containing strided array macros.
*/
#ifndef STDLIB_STRIDED_MACROS_H
#define STDLIB_STRIDED_MACROS_H
// Note: keep in alphabetical order...
#include "strided_binary_macros.h"
#include "strided_nullary_macros.h"
#include "strided_quaternary_macros.h"
#include "strided_quinary_macros.h"
#include "strided_ternary_macros.h"
#include "strided_unary_macros.h"
#endif // !STDLIB_STRIDED_MACROS_H
|
Sort headers in alphabetical order
|
Sort headers in alphabetical order
|
C
|
apache-2.0
|
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
|
2b1c7246a6be5f0b57ee0cfea70b6a2613163b7e
|
src/modules/sdl/consumer_sdl_osx.h
|
src/modules/sdl/consumer_sdl_osx.h
|
/*
* consumer_sdl_osx.m -- An OS X compatibility shim for SDL
* Copyright (C) 2010 Ushodaya Enterprises Limited
* Author: Dan Dennedy
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CONSUMER_SDL_OSX_H_
#define _CONSUMER_SDL_OSX_H_
#ifdef __DARWIN__
void* mlt_cocoa_autorelease_init();
void mlt_cocoa_autorelease_close( void* );
#else
static inline void *mlt_cocoa_autorelease_init()
{
return NULL;
}
static inline void mlt_cocoa_autorelease_close(void*)
{
}
#endif
#endif
|
/*
* consumer_sdl_osx.m -- An OS X compatibility shim for SDL
* Copyright (C) 2010 Ushodaya Enterprises Limited
* Author: Dan Dennedy
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CONSUMER_SDL_OSX_H_
#define _CONSUMER_SDL_OSX_H_
#ifdef __DARWIN__
void* mlt_cocoa_autorelease_init();
void mlt_cocoa_autorelease_close( void* );
#else
static inline void *mlt_cocoa_autorelease_init()
{
return NULL;
}
static inline void mlt_cocoa_autorelease_close(void* p)
{
}
#endif
#endif
|
Fix build on non-OSX due to missing parameter name.
|
Fix build on non-OSX due to missing parameter name.
|
C
|
lgpl-2.1
|
ttill/MLT,ttill/MLT-roto,siddharudh/mlt,xzhavilla/mlt,anba8005/mlt,zzhhui/mlt,ttill/MLT-roto-tracking,mltframework/mlt,siddharudh/mlt,j-b-m/mlt,mltframework/mlt,wideioltd/mlt,zzhhui/mlt,xzhavilla/mlt,j-b-m/mlt,zzhhui/mlt,siddharudh/mlt,anba8005/mlt,j-b-m/mlt,ttill/MLT-roto,ttill/MLT-roto-tracking,mltframework/mlt,gmarco/mlt-orig,wideioltd/mlt,xzhavilla/mlt,ttill/MLT,j-b-m/mlt,j-b-m/mlt,j-b-m/mlt,mltframework/mlt,xzhavilla/mlt,siddharudh/mlt,ttill/MLT-roto-tracking,xzhavilla/mlt,wideioltd/mlt,zzhhui/mlt,ttill/MLT,zzhhui/mlt,j-b-m/mlt,ttill/MLT-roto,ttill/MLT-roto,gmarco/mlt-orig,ttill/MLT-roto-tracking,siddharudh/mlt,wideioltd/mlt,ttill/MLT-roto,anba8005/mlt,gmarco/mlt-orig,ttill/MLT,anba8005/mlt,zzhhui/mlt,ttill/MLT-roto,anba8005/mlt,j-b-m/mlt,mltframework/mlt,gmarco/mlt-orig,wideioltd/mlt,ttill/MLT-roto-tracking,anba8005/mlt,gmarco/mlt-orig,wideioltd/mlt,xzhavilla/mlt,ttill/MLT-roto,gmarco/mlt-orig,ttill/MLT,mltframework/mlt,zzhhui/mlt,mltframework/mlt,ttill/MLT,gmarco/mlt-orig,j-b-m/mlt,gmarco/mlt-orig,gmarco/mlt-orig,mltframework/mlt,mltframework/mlt,wideioltd/mlt,xzhavilla/mlt,ttill/MLT,ttill/MLT-roto-tracking,j-b-m/mlt,siddharudh/mlt,siddharudh/mlt,ttill/MLT-roto-tracking,wideioltd/mlt,zzhhui/mlt,ttill/MLT-roto-tracking,ttill/MLT-roto-tracking,ttill/MLT-roto,anba8005/mlt,anba8005/mlt,anba8005/mlt,zzhhui/mlt,ttill/MLT-roto,xzhavilla/mlt,mltframework/mlt,wideioltd/mlt,siddharudh/mlt,ttill/MLT,siddharudh/mlt,xzhavilla/mlt,ttill/MLT
|
f32bb0311860f453a1b1f4d8c5755c26894e8b41
|
src/platform/governance.h
|
src/platform/governance.h
|
#ifndef CROWN_PLATFORM_GOVERNANCE_H
#define CROWN_PLATFORM_GOVERNANCE_H
#include "primitives/transaction.h"
#include "uint256.h"
#include <boost/function.hpp>
#include <vector>
namespace Platform
{
class Vote
{
public:
enum Value { abstain = 0, yes, no };
CTxIn voterId;
int64_t electionCode;
uint256 candidate;
Value value;
std::vector<unsigned char> signature;
};
class VotingRound
{
public:
virtual void RegisterCandidate(uint256 id) = 0;
virtual void AcceptVote(const Vote& vote) = 0;
virtual std::vector<uint256> CalculateResult() const = 0;
virtual void NotifyResultChange(
boost::function<void(uint256)> onElected,
boost::function<void(uint256)> onDismissed
) = 0;
};
VotingRound& AgentsVoting();
}
#endif //CROWN_PLATFORM_GOVERNANCE_H
|
#ifndef CROWN_PLATFORM_GOVERNANCE_H
#define CROWN_PLATFORM_GOVERNANCE_H
#include "primitives/transaction.h"
#include "uint256.h"
#include <boost/function.hpp>
#include <vector>
namespace Platform
{
class Vote
{
public:
enum Value { abstain = 0, yes, no };
CTxIn voterId;
int64_t electionCode;
uint256 candidate;
Value value;
std::vector<unsigned char> signature;
};
class VotingRound
{
public:
virtual ~VotingRound() = default;
virtual void RegisterCandidate(uint256 id) = 0;
virtual void AcceptVote(const Vote& vote) = 0;
virtual std::vector<uint256> CalculateResult() const = 0;
virtual void NotifyResultChange(
boost::function<void(uint256)> onElected,
boost::function<void(uint256)> onDismissed
) = 0;
};
VotingRound& AgentsVoting();
}
#endif //CROWN_PLATFORM_GOVERNANCE_H
|
Fix issues pointed out in review
|
Fix issues pointed out in review
|
C
|
mit
|
Crowndev/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin
|
f95dd734687945f12b708f2659ac8198b640d959
|
test/CodeGen/2009-10-20-GlobalDebug.c
|
test/CodeGen/2009-10-20-GlobalDebug.c
|
// RUN: %clang -ccc-host-triple i386-apple-darwin10 -S -g -dA %s -o - | FileCheck %s
int global;
// CHECK: asciz "global" ## DW_AT_name
int main() { return 0;}
|
// RUN: %clang -ccc-host-triple i386-apple-darwin10 -S -g -dA %s -o - | FileCheck %s
int global;
// CHECK: asciz "global" ## External Name
int main() { return 0;}
|
Adjust testcase for recent DWARF printer changes.
|
Adjust testcase for recent DWARF printer changes.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@94306 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
cbeac1945a4d0da0745c80a1766dc6ddeb809930
|
gen_message_hashes/hash_func.h
|
gen_message_hashes/hash_func.h
|
static inline unsigned int hash_func_string(const char* key)
{
unsigned int hash = 0;
int c;
while ((c = *key++) != 0)
hash = c + (hash << 6) + (hash << 16) - hash;
return hash;
}
|
static inline uint32_t hash_func_string(const char* key)
{
uint32_t hash = 0;
int c;
while ((c = *key++) != 0)
hash = c + (hash << 6) + (hash << 16) - hash;
return hash;
}
|
Change unsigned int to uint32_t.
|
Change unsigned int to uint32_t.
The fixed width data type is necessary to calculate the hash function
correctly.
|
C
|
mit
|
mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet
|
59b6d5b7e4f337320ea12d381e9cad0aa9c9fa75
|
tests/slice.c
|
tests/slice.c
|
#include <stdio.h>
#include "../slice.h"
#include "../assert.h"
#include "../nelem.h"
int main( void )
{
int const xs[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
printf( "Testing subset slice...\n" );
int const ws[] = { SLICE( xs, 3, 4 ) };
ASSERT( NELEM( ws ) == 4,
ws[ 0 ] == xs[ 3 ],
ws[ 1 ] == xs[ 4 ],
ws[ 2 ] == xs[ 5 ],
ws[ 3 ] == xs[ 6 ] );
printf( "Testing total slice...\n" );
int const ys[] = { SLICE( xs, 0, 6 ) };
ASSERT( NELEM( ys ) == 6,
ys[ 0 ] == xs[ 0 ],
ys[ 1 ] == xs[ 1 ],
ys[ 2 ] == xs[ 2 ],
ys[ 3 ] == xs[ 3 ],
ys[ 4 ] == xs[ 4 ],
ys[ 5 ] == xs[ 5 ] );
printf( "Testing empty slice...\n" );
int const zs[] = { 0, SLICE( xs, 2, 0 ) };
ASSERT( NELEM( zs ) == 1 );
printf( "SLICE() tests passed.\n" );
}
|
#include <stdio.h>
#include "../slice.h"
#include "../assert.h"
#include "../nelem.h"
int main( void )
{
int const xs[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
printf( "Testing subset slice...\n" );
int const ws[] = { SLICE( xs, 3, 4 ) };
ASSERT( NELEM( ws ) == 4,
ws[ 0 ] == xs[ 3 ],
ws[ 1 ] == xs[ 4 ],
ws[ 2 ] == xs[ 5 ],
ws[ 3 ] == xs[ 6 ] );
( void ) ws;
printf( "Testing total slice...\n" );
int const ys[] = { SLICE( xs, 0, 6 ) };
ASSERT( NELEM( ys ) == 6,
ys[ 0 ] == xs[ 0 ],
ys[ 1 ] == xs[ 1 ],
ys[ 2 ] == xs[ 2 ],
ys[ 3 ] == xs[ 3 ],
ys[ 4 ] == xs[ 4 ],
ys[ 5 ] == xs[ 5 ] );
( void ) ys;
printf( "Testing empty slice...\n" );
int const zs[] = { 0, SLICE( xs, 2, 0 ) };
ASSERT( NELEM( zs ) == 1 );
( void ) zs;
printf( "SLICE() tests passed.\n" );
}
|
Fix 'unused variable' warning on fast build
|
Fix 'unused variable' warning on fast build
|
C
|
agpl-3.0
|
mcinglis/libmacro,mcinglis/libmacro,mcinglis/libmacro
|
d3c505c880592f481c7ee356bb6dc6650a95a14b
|
include/ofpi_config.h
|
include/ofpi_config.h
|
/* Copyright (c) 2015, ENEA Software AB
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _OFPI_CONFIG_H_
#define _OFPI_CONFIG_H_
#include "ofp_config.h"
#define ARP_SANITY_CHECK 1
#endif
|
/* Copyright (c) 2015, ENEA Software AB
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _OFPI_CONFIG_H_
#define _OFPI_CONFIG_H_
#include "api/ofp_config.h"
#define ARP_SANITY_CHECK 1
#endif
|
Fix include path for ofp_config.h
|
Fix include path for ofp_config.h
Signed-off-by: Bogdan Pricope <385103c4eae27e55111df6ab7856eefb0647e14e@enea.com>
Reviewed-by: Sorin Vultureanu <64c6f728decd077990042fe7e6ea94271dcc3ede@enea.com>
|
C
|
bsd-3-clause
|
OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,TolikH/ofp,TolikH/ofp,TolikH/ofp,OpenFastPath/ofp
|
1a9f189af8076cf1f67b92567e47d7dd8e0514fa
|
applications/plugins/SofaPython/PythonCommon.h
|
applications/plugins/SofaPython/PythonCommon.h
|
#ifndef SOFAPYTHON_PYTHON_H
#define SOFAPYTHON_PYTHON_H
// This header simply includes Python.h, taking care of platform-specific stuff
// It should be included before any standard headers:
// "Since Python may define some pre-processor definitions which affect the
// standard headers on some systems, you must include Python.h before any
// standard headers are included."
#if defined(_WIN32)
# define MS_NO_COREDLL // deactivate pragma linking on Win32 done in Python.h
#endif
#if defined(_MSC_VER) && defined(_DEBUG)
// undefine _DEBUG since we want to always link agains the release version of
// python and pyconfig.h automatically links debug version if _DEBUG is defined.
// ocarre: no we don't, in debug on Windows we cannot link with python release, if we want to build SofaPython in debug we have to compile python in debug
//# undef _DEBUG
# include <Python.h>
//# define _DEBUG
#elif defined(__APPLE__) && defined(__MACH__)
# include <Python/Python.h>
#else
# include <Python.h>
#endif
#endif
|
#ifndef SOFAPYTHON_PYTHON_H
#define SOFAPYTHON_PYTHON_H
// This header simply includes Python.h, taking care of platform-specific stuff
// It should be included before any standard headers:
// "Since Python may define some pre-processor definitions which affect the
// standard headers on some systems, you must include Python.h before any
// standard headers are included."
#if defined(_WIN32)
# define MS_NO_COREDLL // deactivate pragma linking on Win32 done in Python.h
# define Py_ENABLE_SHARED 1 // this flag ensure to use dll's version (needed because of MS_NO_COREDLL define).
#endif
#if defined(_MSC_VER) && defined(_DEBUG)
// if you use Python on windows in debug build, be sure to provide a compiled version because
// installation package doesn't come with debug libs.
# include <Python.h>
#elif defined(__APPLE__) && defined(__MACH__)
# include <Python/Python.h>
#else
# include <Python.h>
#endif
#endif
|
Fix python link in release build.
|
Fix python link in release build.
Former-commit-id: f2b0e4ff65df702ae4f98bed2a39dcfdc0f7e9c4
|
C
|
lgpl-2.1
|
FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,FabienPean/sofa,FabienPean/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,FabienPean/sofa,hdeling/sofa,FabienPean/sofa,Anatoscope/sofa,FabienPean/sofa,Anatoscope/sofa,hdeling/sofa
|
4529eb33e50f0662b6711bcc984ad3b298c2b169
|
src/Atomic.h
|
src/Atomic.h
|
/*
*******************************************************************************
*
* Purpose: Utils. Atomic types helper.
*
*******************************************************************************
* Copyright Monstrenyatko 2014.
*
* Distributed under the MIT License.
* (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
*******************************************************************************
*/
#ifndef UTILS_ATOMIC_H_
#define UTILS_ATOMIC_H_
#ifndef __has_feature
#define __has_feature(__x) 0
#endif
#if __has_feature(cxx_atomic)
#include <atomic>
#else
#include <boost/atomic.hpp>
#define UTILS_USE_BOOST_ATOMIC
#endif
namespace Utils {
#ifdef UTILS_USE_BOOST_ATOMIC
typedef boost::atomic_bool atomic_bool;
typedef boost::atomic_uint32_t atomic_uint32_t;
#else
typedef std::atomic_bool atomic_bool;
typedef std::atomic<uint32_t> atomic_uint32_t;
#endif
} /* namespace Utils */
#endif /* UTILS_ATOMIC_H_ */
|
/*
*******************************************************************************
*
* Purpose: Utils. Atomic types helper.
*
*******************************************************************************
* Copyright Monstrenyatko 2014.
*
* Distributed under the MIT License.
* (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
*******************************************************************************
*/
#ifndef UTILS_ATOMIC_H_
#define UTILS_ATOMIC_H_
#ifndef __has_feature
#define __has_feature(__x) 0
#endif
#if __cplusplus < 201103L
#include <boost/atomic.hpp>
#define UTILS_USE_BOOST_ATOMIC
#else
#include <atomic>
#endif
namespace Utils {
#ifdef UTILS_USE_BOOST_ATOMIC
typedef boost::atomic_bool atomic_bool;
typedef boost::atomic_uint32_t atomic_uint32_t;
#else
typedef std::atomic_bool atomic_bool;
typedef std::atomic<uint32_t> atomic_uint32_t;
#endif
} /* namespace Utils */
#endif /* UTILS_ATOMIC_H_ */
|
Use boost::atomic if C++ compiler older than 201103.
|
Use boost::atomic if C++ compiler older than 201103.
|
C
|
mit
|
monstrenyatko/butler-xbee-gateway,monstrenyatko/XBeeGateway,monstrenyatko/butler-xbee-gateway,monstrenyatko/XBeeGateway,monstrenyatko/butler-xbee-gateway
|
9275184cf22bcc045842bee7a26067e62381178a
|
lib/Remarks/RemarkParserImpl.h
|
lib/Remarks/RemarkParserImpl.h
|
//===-- RemarkParserImpl.h - Implementation details -------------*- C++/-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file provides implementation details for the remark parser.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_REMARKS_REMARK_PARSER_IMPL_H
#define LLVM_REMARKS_REMARK_PARSER_IMPL_H
namespace llvm {
namespace remarks {
/// This is used as a base for any parser implementation.
struct ParserImpl {
enum class Kind { YAML };
// The parser kind. This is used as a tag to safely cast between
// implementations.
Kind ParserKind;
};
} // end namespace remarks
} // end namespace llvm
#endif /* LLVM_REMARKS_REMARK_PARSER_IMPL_H */
|
//===-- RemarkParserImpl.h - Implementation details -------------*- C++/-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file provides implementation details for the remark parser.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_REMARKS_REMARK_PARSER_IMPL_H
#define LLVM_REMARKS_REMARK_PARSER_IMPL_H
namespace llvm {
namespace remarks {
/// This is used as a base for any parser implementation.
struct ParserImpl {
enum class Kind { YAML };
explicit ParserImpl(Kind TheParserKind) : ParserKind(TheParserKind) {}
// Virtual destructor prevents mismatched deletes
virtual ~ParserImpl() {}
// The parser kind. This is used as a tag to safely cast between
// implementations.
Kind ParserKind;
};
} // end namespace remarks
} // end namespace llvm
#endif /* LLVM_REMARKS_REMARK_PARSER_IMPL_H */
|
Fix mismatched delete due to missing virtual destructor
|
[Remarks] Fix mismatched delete due to missing virtual destructor
This fixes an asan failure introduced in r356519.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@356583 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm
|
83443f472fff11a74e983e42c56a245953890248
|
src/ref.h
|
src/ref.h
|
#pragma once
#include <chrono>
#include <string>
enum class ref_src_t {
FILE,
AIRCRAFT,
PLUGIN,
USER_MSG,
BLACKLIST,
};
/// Superclass defining some common interface items for dataref and commandref.
class RefRecord {
protected:
std::string name;
ref_src_t source;
std::chrono::system_clock::time_point last_updated;
std::chrono::system_clock::time_point last_updated_big;
RefRecord(const std::string & name, ref_src_t source) : name(name), source(source), last_updated(std::chrono::system_clock::now()) {}
public:
virtual ~RefRecord() {}
const std::string & getName() const { return name; }
ref_src_t getSource() const { return source; }
virtual std::string getDisplayString(size_t display_length) const = 0;
bool isBlacklisted() const { return ref_src_t::BLACKLIST == source; }
const std::chrono::system_clock::time_point & getLastUpdateTime() const { return last_updated; }
const std::chrono::system_clock::time_point & getLastBigUpdateTime() const { return last_updated_big; }
};
|
#pragma once
#include <chrono>
#include <string>
enum class ref_src_t {
FILE,
AIRCRAFT,
PLUGIN,
USER_MSG,
BLACKLIST,
};
/// Superclass defining some common interface items for dataref and commandref.
class RefRecord {
protected:
std::string name;
ref_src_t source;
std::chrono::system_clock::time_point last_updated;
std::chrono::system_clock::time_point last_updated_big;
RefRecord(const std::string & name, ref_src_t source) : name(name), source(source), last_updated(std::chrono::system_clock::from_time_t(0)), last_updated_big(std::chrono::system_clock::from_time_t(0)) {}
public:
virtual ~RefRecord() {}
const std::string & getName() const { return name; }
ref_src_t getSource() const { return source; }
virtual std::string getDisplayString(size_t display_length) const = 0;
bool isBlacklisted() const { return ref_src_t::BLACKLIST == source; }
const std::chrono::system_clock::time_point & getLastUpdateTime() const { return last_updated; }
const std::chrono::system_clock::time_point & getLastBigUpdateTime() const { return last_updated_big; }
};
|
Handle initialization of change detection variables in a more sane way. No more false positives of changes on startup.
|
Handle initialization of change detection variables in a more sane way. No more false positives of changes on startup.
|
C
|
mit
|
leecbaker/datareftool,leecbaker/datareftool,leecbaker/datareftool
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.