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
|
|---|---|---|---|---|---|---|---|---|---|
947bb5ff14287bac17e03a6de4998384a6b72afe
|
partition/Diffusive/src/engpar_sides.h
|
partition/Diffusive/src/engpar_sides.h
|
#ifndef ENGPAR_SIDES_H
#define ENGPAR_SIDES_H
#include <ngraph.h>
#include <PCU.h>
#include "engpar_container.h"
#include <engpar_metrics.h>
#include "engpar_diffusive_input.h"
namespace engpar {
class Sides : public Container<int> {
public:
Sides(agi::Ngraph* g, agi::etype t) {
agi::Ngraph* graph = g;
agi::GraphEdge* edge;
agi::EdgeIterator* eitr = graph->begin(t);
while ((edge = graph->iterate(eitr))) {
agi::Peers res;
g->getResidence(edge,res);
if (res.size()>1) {
agi::Peers::iterator itr;
for (itr=res.begin();itr!=res.end();itr++) {
if (*itr!=PCU_Comm_Self()) {
increment2(*itr);
}
}
my_total++;
}
}
g->destroy(eitr);
}
};
Sides* makeSides(DiffusiveInput* in);
Sides* makeSides(agi::Ngraph* g, agi::etype t);
}
#endif
|
#ifndef ENGPAR_SIDES_H
#define ENGPAR_SIDES_H
#include <ngraph.h>
#include <PCU.h>
#include "engpar_container.h"
#include <engpar_metrics.h>
#include "engpar_diffusive_input.h"
namespace engpar {
class Sides : public Container<int> {
public:
Sides(agi::Ngraph* g, agi::etype t) {
agi::Ngraph* graph = g;
agi::GraphEdge* edge;
agi::EdgeIterator* eitr = graph->begin(t);
while ((edge = graph->iterate(eitr))) {
agi::Peers res;
g->getResidence(edge,res);
if (res.size()>1) {
agi::Peers::iterator itr;
for (itr=res.begin();itr!=res.end();itr++) {
if (*itr != PCU_Comm_Self()) {
(*this)[*itr]+=g->weight(edge);
}
}
my_total+= g->weight(edge);
}
}
g->destroy(eitr);
}
};
Sides* makeSides(DiffusiveInput* in);
Sides* makeSides(agi::Ngraph* g, agi::etype t);
}
#endif
|
Add edge weights to side calculations
|
Add edge weights to side calculations
|
C
|
bsd-3-clause
|
SCOREC/EnGPar,SCOREC/EnGPar,SCOREC/EnGPar
|
cc41ed4411ea07febb3e03fd525ea2981e086643
|
ext/baz/baz_vector_ruby.h
|
ext/baz/baz_vector_ruby.h
|
// ext/baz/baz_vector_ruby.h
#ifndef BAZ_VECTOR_RUBY_H
#define BAZ_VECTOR_RUBY_H
#include "baz_vector_lib.h"
#include <ruby.h>
void init_baz_vector( VALUE parent_module );
#endif
|
// ext/baz/baz_vector_ruby.h
#ifndef BAZ_VECTOR_RUBY_H
#define BAZ_VECTOR_RUBY_H
#include "baz_vector_lib.h"
#include <ruby.h>
// Ruby 1.8.7 compatibility patch
#ifndef DBL2NUM
#define DBL2NUM( dbl_val ) rb_float_new( dbl_val )
#endif
void init_baz_vector( VALUE parent_module );
#endif
|
Add definition of DBL2NUM for 1.8.7
|
Add definition of DBL2NUM for 1.8.7
|
C
|
mit
|
neilslater/ruby_nex_cpp,neilslater/ruby_nex_cpp,neilslater/ruby_nex_cpp
|
8cef253d30d0099fcaadb47e30c98f754b8e8a41
|
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: http://src.chromium.org/svn/trunk/src@81368 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 72f86cdd70ccbe468222911d421f064981d34746
|
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
|
8b7b69ad99b2a227dfb42ec0240883d4f3354224
|
src/common.h
|
src/common.h
|
#pragma once
#include <cstdio>
// HACK: No idea where this should actually be defined
#define nullptr 0x0
#pragma GCC diagnostic ignored "-Wattributes"
#include "openvr.h"
#pragma GCC diagnostic warning "-Wattributes"
using namespace vr;
#ifdef __x86_64__
// MS instead of SysV ABI for 64bit
#define WOVR_ENTRY __attribute__((ms_abi))
#else
// Thispointer-in-ECX for 32bit
#define WOVR_ENTRY __attribute__((thiscall))
#endif
|
#pragma once
#include <cstdio>
// HACK: No idea where this should actually be defined
#define nullptr 0x0
// If _WIN32 is defined, openvr.h will decorate the exported functions with __declspec(dllimport) which implies
// __attribute__((ms_abi)). This makes things explode, as we need to call them with SysV ABI.
#undef _WIN32
#include "openvr.h"
using namespace vr;
#ifdef __x86_64__
// MS instead of SysV ABI for 64bit
#define WOVR_ENTRY __attribute__((ms_abi))
#else
// Thispointer-in-ECX for 32bit
#define WOVR_ENTRY __attribute__((thiscall))
#endif
|
Fix implied ms_abi where it shouldn't be
|
Fix implied ms_abi where it shouldn't be
|
C
|
bsd-3-clause
|
roothorick/WineOpenVR,roothorick/WineOpenVR,roothorick/WineOpenVR
|
2060f21af2c0e469250ab8c30370739b24b18e9e
|
src/common.h
|
src/common.h
|
// Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_COMMON_H_
#define SCALLOC_COMMON_H_
#include <stddef.h> // size_t
#include "config.h"
#define UNLIKELY(x) __builtin_expect((x), 0)
#define LIKELY(x) __builtin_expect((x), 1)
#define cache_aligned __attribute__((aligned(64)))
#define always_inline inline __attribute__((always_inline))
#define no_inline __attribute__((noinline))
const size_t kSystemPageSize = PAGE_SIZE;
// Prohibit reordering of instructions by the compiler.
inline void CompilerBarrier() {
__asm__ __volatile__("" : : : "memory");
}
// Full memory fence on x86-64
inline void MemoryBarrier() {
__asm__ __volatile__("mfence" : : : "memory");
}
always_inline size_t PadSize(size_t size, size_t multiple) {
return (size + multiple - 1) / multiple * multiple;
}
#endif // SCALLOC_COMMON_H_
|
// Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is governed
// by a BSD license that can be found in the LICENSE file.
#ifndef SCALLOC_COMMON_H_
#define SCALLOC_COMMON_H_
#include <stddef.h> // size_t
#include "config.h"
#define UNLIKELY(x) __builtin_expect((x), 0)
#define LIKELY(x) __builtin_expect((x), 1)
#define cache_aligned __attribute__((aligned(64)))
#define always_inline inline __attribute__((always_inline))
#define no_inline __attribute__((noinline))
const size_t kSystemPageSize = PAGE_SIZE;
const size_t kMinAlignment = 16;
const size_t kMaxSmallSize = 512;
const size_t kNumClasses = kMaxSmallSize / kMinAlignment;
// Prohibit reordering of instructions by the compiler.
inline void CompilerBarrier() {
__asm__ __volatile__("" : : : "memory");
}
// Full memory fence on x86-64
inline void MemoryBarrier() {
__asm__ __volatile__("mfence" : : : "memory");
}
always_inline size_t PadSize(size_t size, size_t multiple) {
return (size + multiple - 1) / multiple * multiple;
}
#endif // SCALLOC_COMMON_H_
|
Add some allocator constants like minimum alignment or maximum small size.
|
Add some allocator constants like minimum alignment or maximum small size.
Signed-off-by: Michael Lippautz <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com>
|
C
|
bsd-2-clause
|
cksystemsgroup/scalloc,cksystemsgroup/scalloc,cksystemsgroup/scalloc
|
5c18be3539a8150fc3f18a482fc077b881c2dc90
|
firmware/ShinyeiPPD42NS/ShinyeiPPD42NS.h
|
firmware/ShinyeiPPD42NS/ShinyeiPPD42NS.h
|
#include <cmath>
class ShinyeiPPD42NS {
public:
ShinyeiPPD42NS(unsigned long sampling_interval_ms) {
_sampling_interval_ms = sampling_interval_ms;
_is_sampling_complete = false;
}
void startSampling(unsigned long stms);
float getConcentration(unsigned long duration, unsigned long current_time_ms);
bool isSamplingComplete();
private:
ShinyeiPPD42NS() { }
unsigned long _start_time_ms;
unsigned long _low_pulse_occupancy;
unsigned long _sampling_interval_ms;
float _concentration;
bool _is_sampling_complete;
};
|
#include <cmath>
class ShinyeiPPD42NS {
public:
ShinyeiPPD42NS(float sampling_interval_ms) {
_sampling_interval_ms = sampling_interval_ms;
_is_sampling_complete = false;
}
void startSampling(unsigned long stms);
float getConcentration(unsigned long duration, unsigned long current_time_ms);
bool isSamplingComplete();
private:
ShinyeiPPD42NS() { }
unsigned long _start_time_ms;
unsigned long _low_pulse_occupancy;
float _sampling_interval_ms;
float _concentration;
bool _is_sampling_complete;
};
|
Improve precision for dust particle counts
|
Improve precision for dust particle counts
|
C
|
mit
|
Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard
|
97461cc2b13d7084eeb38442b845cf1d96621364
|
Ashton/AshtonObjc/AshtonObjcMixedContentPreprocessor.h
|
Ashton/AshtonObjc/AshtonObjcMixedContentPreprocessor.h
|
//
// AshtonObjcMixedContentPreprocessor.h
// Ashton
//
// Created by Michael Schwarz on 15.01.18.
// Copyright © 2018 Michael Schwarz. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface AshtonObjcMixedContentPreprocessor: NSObject
- (NSString *)preprocessHTMLString:(NSString *)htmlString;
@end
NS_ASSUME_NONNULL_END
|
//
// AshtonObjcMixedContentPreprocessor.h
// Ashton
//
// Created by Michael Schwarz on 15.01.18.
// Copyright © 2018 Michael Schwarz. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// TBXML parser cannot handle html mixed content, therefore we have to preprocess it
/// mixedContent = "<html>test <strong>sample</strong></html>", will be processed to
/// "<html><wrapped>test </wrapped><strong><wrapped>sample</wrapped></strong></html>
@interface AshtonObjcMixedContentPreprocessor: NSObject
- (NSString *)preprocessHTMLString:(NSString *)htmlString;
@end
NS_ASSUME_NONNULL_END
|
Add comment regarding mixed content preprocessor
|
Add comment regarding mixed content preprocessor
|
C
|
mit
|
IdeasOnCanvas/Ashton,IdeasOnCanvas/Ashton,IdeasOnCanvas/Ashton
|
355c96ef5a42de8929a53c8dbd4d852cb6d61181
|
test/Sema/x86-intrinsics-headers.c
|
test/Sema/x86-intrinsics-headers.c
|
// RUN: %clang -fsyntax-only %s
// RUN: %clang -fsyntax-only -fno-lax-vector-conversions %s
// RUN: %clang -fsyntax-only -x c++ %s
#if defined(i386) || defined(__x86_64__)
# if defined(__MMX__)
#include <emmintrin.h>
#include <mm_malloc.h>
# endif
# if defined(__SSE__)
#include <xmmintrin.h>
# endif
# if defined(__SSE3__)
#include <pmmintrin.h>
# endif
# if defined(__SSSE3__)
#include <tmmintrin.h>
# endif
#endif
|
// RUN: %clang -fsyntax-only %s
// RUN: %clang -fsyntax-only -fno-lax-vector-conversions %s
// RUN: %clang -fsyntax-only -x c++ %s
#if defined(i386) || defined(__x86_64__)
# if defined(__MMX__)
#include <emmintrin.h>
#include <mm_malloc.h>
# endif
# if defined(__SSE__)
#include <xmmintrin.h>
# endif
# if defined(__SSE3__)
#include <pmmintrin.h>
# endif
# if defined(__SSSE3__)
#include <tmmintrin.h>
# endif
# if defined(__SSE4_1__)
#include <smmintrin.h>
# endif
#endif
|
Add include for smmintrin.h to this test.
|
Add include for smmintrin.h to this test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@99019 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
c1089b86e56123ae7556f19d809d19edd4974c74
|
Utilities/vxl/v3p/netlib/libf2c/c_sqrt.c
|
Utilities/vxl/v3p/netlib/libf2c/c_sqrt.c
|
#include "v3p_f2c.h"
#ifdef KR_headers
extern double sqrt(), f__cabs();
VOID c_sqrt(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
#ifdef __cplusplus
extern "C" {
#endif
extern double f__cabs(double, double);
void c_sqrt(complex *r, complex *z)
#endif
{
double mag, t;
double zi = z->i, zr = z->r;
if( (mag = f__cabs(zr, zi)) == 0.)
r->r = r->i = 0.;
else if(zr > 0)
{
r->r = t = sqrt(0.5 * (mag + zr) );
t = zi / t;
r->i = 0.5 * t;
}
else
{
t = sqrt(0.5 * (mag - zr) );
if(zi < 0)
t = -t;
r->i = t;
t = zi / t;
r->r = 0.5 * t;
}
}
#ifdef __cplusplus
}
#endif
|
#include "v3p_f2c.h"
#ifdef KR_headers
extern double sqrt(), f__cabs();
VOID c_sqrt(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
#ifdef __cplusplus
extern "C" {
#endif
extern double f__cabs(double, double);
#undef complex
#define complex v3p_netlib_complex
void c_sqrt(complex *r, complex *z)
#endif
{
double mag, t;
double zi = z->i, zr = z->r;
if( (mag = f__cabs(zr, zi)) == 0.)
r->r = r->i = 0.;
else if(zr > 0)
{
r->r = t = sqrt(0.5 * (mag + zr) );
t = zi / t;
r->i = 0.5 * t;
}
else
{
t = sqrt(0.5 * (mag - zr) );
if(zi < 0)
t = -t;
r->i = t;
t = zi / t;
r->r = 0.5 * t;
}
}
#ifdef __cplusplus
}
#endif
|
Fix for complex reference on Mac.
|
COMP: Fix for complex reference on Mac.
|
C
|
apache-2.0
|
jcfr/ITK,heimdali/ITK,hendradarwin/ITK,hinerm/ITK,stnava/ITK,BlueBrain/ITK,zachary-williamson/ITK,fuentesdt/InsightToolkit-dev,blowekamp/ITK,BRAINSia/ITK,richardbeare/ITK,eile/ITK,CapeDrew/DCMTK-ITK,malaterre/ITK,eile/ITK,BRAINSia/ITK,thewtex/ITK,malaterre/ITK,BlueBrain/ITK,BRAINSia/ITK,GEHC-Surgery/ITK,eile/ITK,hjmjohnson/ITK,rhgong/itk-with-dom,daviddoria/itkHoughTransform,biotrump/ITK,zachary-williamson/ITK,BlueBrain/ITK,eile/ITK,eile/ITK,fbudin69500/ITK,fuentesdt/InsightToolkit-dev,hinerm/ITK,hjmjohnson/ITK,biotrump/ITK,InsightSoftwareConsortium/ITK,malaterre/ITK,wkjeong/ITK,InsightSoftwareConsortium/ITK,PlutoniumHeart/ITK,vfonov/ITK,daviddoria/itkHoughTransform,cpatrick/ITK-RemoteIO,stnava/ITK,stnava/ITK,zachary-williamson/ITK,hendradarwin/ITK,InsightSoftwareConsortium/ITK,thewtex/ITK,PlutoniumHeart/ITK,PlutoniumHeart/ITK,stnava/ITK,cpatrick/ITK-RemoteIO,Kitware/ITK,LucasGandel/ITK,zachary-williamson/ITK,heimdali/ITK,daviddoria/itkHoughTransform,ajjl/ITK,cpatrick/ITK-RemoteIO,hjmjohnson/ITK,spinicist/ITK,richardbeare/ITK,vfonov/ITK,spinicist/ITK,Kitware/ITK,paulnovo/ITK,msmolens/ITK,LucasGandel/ITK,hinerm/ITK,atsnyder/ITK,richardbeare/ITK,GEHC-Surgery/ITK,LucasGandel/ITK,CapeDrew/DITK,CapeDrew/DCMTK-ITK,hendradarwin/ITK,LucasGandel/ITK,fedral/ITK,stnava/ITK,richardbeare/ITK,BlueBrain/ITK,eile/ITK,GEHC-Surgery/ITK,atsnyder/ITK,LucasGandel/ITK,wkjeong/ITK,spinicist/ITK,CapeDrew/DCMTK-ITK,blowekamp/ITK,rhgong/itk-with-dom,paulnovo/ITK,Kitware/ITK,LucHermitte/ITK,itkvideo/ITK,itkvideo/ITK,vfonov/ITK,malaterre/ITK,PlutoniumHeart/ITK,GEHC-Surgery/ITK,fbudin69500/ITK,paulnovo/ITK,richardbeare/ITK,paulnovo/ITK,paulnovo/ITK,atsnyder/ITK,itkvideo/ITK,spinicist/ITK,hjmjohnson/ITK,atsnyder/ITK,ajjl/ITK,hinerm/ITK,daviddoria/itkHoughTransform,LucHermitte/ITK,daviddoria/itkHoughTransform,BRAINSia/ITK,spinicist/ITK,BRAINSia/ITK,fuentesdt/InsightToolkit-dev,hinerm/ITK,zachary-williamson/ITK,BlueBrain/ITK,heimdali/ITK,hjmjohnson/ITK,ajjl/ITK,hendradarwin/ITK,fbudin69500/ITK,cpatrick/ITK-RemoteIO,vfonov/ITK,Kitware/ITK,hendradarwin/ITK,vfonov/ITK,thewtex/ITK,BRAINSia/ITK,blowekamp/ITK,malaterre/ITK,atsnyder/ITK,atsnyder/ITK,cpatrick/ITK-RemoteIO,stnava/ITK,hinerm/ITK,fedral/ITK,fbudin69500/ITK,blowekamp/ITK,biotrump/ITK,jmerkow/ITK,thewtex/ITK,fbudin69500/ITK,BlueBrain/ITK,itkvideo/ITK,itkvideo/ITK,spinicist/ITK,cpatrick/ITK-RemoteIO,LucasGandel/ITK,rhgong/itk-with-dom,vfonov/ITK,InsightSoftwareConsortium/ITK,daviddoria/itkHoughTransform,jmerkow/ITK,CapeDrew/DITK,hendradarwin/ITK,CapeDrew/DCMTK-ITK,BRAINSia/ITK,LucHermitte/ITK,cpatrick/ITK-RemoteIO,jcfr/ITK,wkjeong/ITK,paulnovo/ITK,InsightSoftwareConsortium/ITK,InsightSoftwareConsortium/ITK,GEHC-Surgery/ITK,hjmjohnson/ITK,rhgong/itk-with-dom,biotrump/ITK,daviddoria/itkHoughTransform,jmerkow/ITK,itkvideo/ITK,PlutoniumHeart/ITK,daviddoria/itkHoughTransform,stnava/ITK,richardbeare/ITK,fuentesdt/InsightToolkit-dev,blowekamp/ITK,jcfr/ITK,msmolens/ITK,jmerkow/ITK,malaterre/ITK,ajjl/ITK,rhgong/itk-with-dom,PlutoniumHeart/ITK,fbudin69500/ITK,msmolens/ITK,fuentesdt/InsightToolkit-dev,fedral/ITK,CapeDrew/DCMTK-ITK,GEHC-Surgery/ITK,biotrump/ITK,atsnyder/ITK,itkvideo/ITK,BlueBrain/ITK,jcfr/ITK,eile/ITK,CapeDrew/DITK,biotrump/ITK,rhgong/itk-with-dom,fedral/ITK,blowekamp/ITK,zachary-williamson/ITK,msmolens/ITK,LucHermitte/ITK,daviddoria/itkHoughTransform,thewtex/ITK,stnava/ITK,ajjl/ITK,zachary-williamson/ITK,hinerm/ITK,hinerm/ITK,jcfr/ITK,hjmjohnson/ITK,CapeDrew/DITK,hendradarwin/ITK,jcfr/ITK,PlutoniumHeart/ITK,heimdali/ITK,eile/ITK,ajjl/ITK,fuentesdt/InsightToolkit-dev,wkjeong/ITK,LucasGandel/ITK,blowekamp/ITK,rhgong/itk-with-dom,malaterre/ITK,LucHermitte/ITK,paulnovo/ITK,Kitware/ITK,itkvideo/ITK,wkjeong/ITK,jcfr/ITK,vfonov/ITK,biotrump/ITK,ajjl/ITK,CapeDrew/DITK,spinicist/ITK,vfonov/ITK,richardbeare/ITK,thewtex/ITK,heimdali/ITK,CapeDrew/DITK,jmerkow/ITK,heimdali/ITK,PlutoniumHeart/ITK,CapeDrew/DCMTK-ITK,LucHermitte/ITK,fedral/ITK,jcfr/ITK,wkjeong/ITK,CapeDrew/DCMTK-ITK,hendradarwin/ITK,fedral/ITK,hinerm/ITK,paulnovo/ITK,CapeDrew/DCMTK-ITK,jmerkow/ITK,fuentesdt/InsightToolkit-dev,stnava/ITK,blowekamp/ITK,msmolens/ITK,fbudin69500/ITK,BlueBrain/ITK,eile/ITK,zachary-williamson/ITK,ajjl/ITK,malaterre/ITK,heimdali/ITK,cpatrick/ITK-RemoteIO,zachary-williamson/ITK,msmolens/ITK,fuentesdt/InsightToolkit-dev,Kitware/ITK,spinicist/ITK,atsnyder/ITK,GEHC-Surgery/ITK,wkjeong/ITK,heimdali/ITK,CapeDrew/DCMTK-ITK,Kitware/ITK,msmolens/ITK,wkjeong/ITK,biotrump/ITK,CapeDrew/DITK,msmolens/ITK,spinicist/ITK,GEHC-Surgery/ITK,LucasGandel/ITK,jmerkow/ITK,InsightSoftwareConsortium/ITK,fedral/ITK,LucHermitte/ITK,fuentesdt/InsightToolkit-dev,fbudin69500/ITK,atsnyder/ITK,thewtex/ITK,LucHermitte/ITK,itkvideo/ITK,fedral/ITK,jmerkow/ITK,CapeDrew/DITK,rhgong/itk-with-dom,malaterre/ITK,CapeDrew/DITK,vfonov/ITK
|
e2321d5144bb9807da20753df47b221e6f039a73
|
src/qt/optionsdialog.h
|
src/qt/optionsdialog.h
|
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <QDialog>
namespace Ui {
class OptionsDialog;
}
class OptionsModel;
class MonitoredDataMapper;
class QValidatedLineEdit;
/** Preferences dialog. */
class OptionsDialog : public QDialog
{
Q_OBJECT
public:
explicit OptionsDialog(QWidget *parent = 0);
~OptionsDialog();
void setModel(OptionsModel *model);
void setMapper();
protected:
bool eventFilter(QObject *object, QEvent *event);
private slots:
/* enable only apply button */
void enableApplyButton();
/* disable only apply button */
void disableApplyButton();
/* enable apply button and OK button */
void enableSaveButtons();
/* disable apply button and OK button */
void disableSaveButtons();
/* set apply button and OK button state (enabled / disabled) */
void setSaveButtonState(bool fState);
void on_okButton_clicked();
void on_cancelButton_clicked();
void on_applyButton_clicked();
void showRestartWarning_Proxy();
void showRestartWarning_fDark();
void showRestartWarning_Lang();
void updateDisplayUnit();
void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
signals:
void proxyIpValid(QValidatedLineEdit *object, bool fValid);
private:
Ui::OptionsDialog *ui;
OptionsModel *model;
MonitoredDataMapper *mapper;
bool fRestartWarningDisplayed_Proxy;
bool fRestartWarningDisplayed_fDark;
bool fRestartWarningDisplayed_Lang;
bool fProxyIpValid;
};
#endif // OPTIONSDIALOG_H
|
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <QDialog>
namespace Ui {
class OptionsDialog;
}
class OptionsModel;
class MonitoredDataMapper;
class QValidatedLineEdit;
/** Preferences dialog. */
class OptionsDialog : public QDialog
{
Q_OBJECT
public:
explicit OptionsDialog(QWidget *parent = 0);
~OptionsDialog();
void setModel(OptionsModel *model);
void setMapper();
protected:
bool eventFilter(QObject *object, QEvent *event);
private slots:
/* enable only apply button */
void enableApplyButton();
/* disable only apply button */
void disableApplyButton();
/* enable apply button and OK button */
void enableSaveButtons();
/* disable apply button and OK button */
void disableSaveButtons();
/* set apply button and OK button state (enabled / disabled) */
void setSaveButtonState(bool fState);
void on_okButton_clicked();
void on_cancelButton_clicked();
void on_applyButton_clicked();
void showRestartWarning_Proxy();
void showRestartWarning_fTor();
void showRestartWarning_Lang();
void updateDisplayUnit();
void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
signals:
void proxyIpValid(QValidatedLineEdit *object, bool fValid);
private:
Ui::OptionsDialog *ui;
OptionsModel *model;
MonitoredDataMapper *mapper;
bool fRestartWarningDisplayed_Proxy;
bool fRestartWarningDisplayed_fTor;
bool fRestartWarningDisplayed_Lang;
bool fProxyIpValid;
};
#endif // OPTIONSDIALOG_H
|
Use Tor refs - options headers
|
Use Tor refs - options headers
|
C
|
mit
|
mammix2/boostcoin-core,mammix2/boostcoin-core,mammix2/boostcoin-core,mammix2/boostcoin-core,mammix2/boostcoin-core
|
f2253cbc614b005453ddd8935bc1bea6dce71472
|
SimpleAT.h
|
SimpleAT.h
|
#ifndef SIMPLEAT_H
#define SIMPLEAT_H
#include <stdint.h>
#define AT_MAX_NUMBER_OF_ARGS 4
#define CLIENT_FUNCTION_TYPE uint16_t
#define ECHO_MODE_ON 1
#define AT_NO_ARGS {0}
#define AT_ARGS(...) {__VA_ARGS__, -1}
#define AT_ARG(x) ((uint8_t) sizeof (x))
#define AT_COMMAND(name, args, client) {(char*)#name, 0, args , 0, client}
#define ATReplyByteArray(x) ((uint8_t *) &x), sizeof(x)
typedef struct {
char *command;
uint8_t sizeOfCommand;
int8_t argsSize[AT_MAX_NUMBER_OF_ARGS];
uint8_t numberOfArgs;
void (*client)(const CLIENT_FUNCTION_TYPE*);
} ATCommandDescriptor;
void ATEngineDriverInit(uint8_t (*open)(void),
uint8_t (*read)(void),
void (*write)(uint8_t),
uint8_t (*available)(void));
void ATEngineInit(ATCommandDescriptor *engine, uint8_t sizeOfEngine);
uint8_t ATEngineRun();
void ATReplyWithByteArray(uint8_t *data, int size);
void ATReplyWithByte(uint8_t data);
void ATReplyWithString(char *str);
#endif // SIMPLEAT_H
|
#ifndef SIMPLEAT_H
#define SIMPLEAT_H
#include <stdint.h>
#define AT_MAX_NUMBER_OF_ARGS 4
#define CLIENT_FUNCTION_TYPE uint16_t
#define ECHO_MODE_ON 1
#define AT_NO_ARGS {0}
#define AT_ARGS(...) {__VA_ARGS__, -1}
#define AT_TYPE(x) ((uint8_t) sizeof (x))
#define AT_COMMAND(name, args, client) {(char*)#name, 0, args , 0, client}
#define ATReplyByteArray(x) ((uint8_t *) &x), sizeof(x)
typedef struct {
char *command;
uint8_t sizeOfCommand;
int8_t argsSize[AT_MAX_NUMBER_OF_ARGS];
uint8_t numberOfArgs;
void (*client)(const CLIENT_FUNCTION_TYPE*);
} ATCommandDescriptor;
void ATEngineDriverInit(uint8_t (*open)(void),
uint8_t (*read)(void),
void (*write)(uint8_t),
uint8_t (*available)(void));
void ATEngineInit(ATCommandDescriptor *engine, uint8_t sizeOfEngine);
uint8_t ATEngineRun();
void ATReplyWithByteArray(uint8_t *data, int size);
void ATReplyWithByte(uint8_t data);
void ATReplyWithString(char *str);
#endif // SIMPLEAT_H
|
Improve name AT_ARG changed to AT_TYPE
|
Improve name AT_ARG changed to AT_TYPE
Signed-off-by: rodrigopex <3b2e0cd8e32147e0545aeecd8920e147dee7f189@gmail.com>
|
C
|
mit
|
rodrigopex/SimpleAT
|
1d777adbe4b7b314287a60b63e6f56212c8f286b
|
include/plat/tk1/plat/machine/hardware.h
|
include/plat/tk1/plat/machine/hardware.h
|
/*
* Copyright 2016, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT_MACHINE_HARDWARE_H
#define physBase 0x80000000
#define kernelBase 0xe0000000
#define physMappingOffset (kernelBase - physBase)
#define BASE_OFFSET physMappingOffset
#define PPTR_TOP 0xfff00000
#define PADDR_TOP (PPTR_TOP - BASE_OFFSET)
#endif
|
/*
* Copyright 2016, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT_MACHINE_HARDWARE_H
#include <plat/machine/hardware_gen.h>
#define physBase 0x80000000
#define kernelBase 0xe0000000
#define physMappingOffset (kernelBase - physBase)
#define BASE_OFFSET physMappingOffset
#define PPTR_TOP 0xfff00000
#define PADDR_TOP (PPTR_TOP - BASE_OFFSET)
#endif
|
Correct previous merge with master
|
arm-hyp: Correct previous merge with master
|
C
|
bsd-2-clause
|
cmr/seL4,cmr/seL4,cmr/seL4
|
2ea2f9ce2d3a23d54ab508ddd5d01ce0a54a4bbc
|
include/features.h
|
include/features.h
|
#ifndef __FEATURES_H
#define __FEATURES_H
/* Major and minor version number of the uCLibc library package. Use
these macros to test for features in specific releases. */
#define __UCLIBC__ 0
#define __UCLIBC_MAJOR__ 9
#define __UCLIBC_MINOR__ 1
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almost ansi */
#if __STDC__ != 1
#define const
#define volatile
#endif
#else /* K&R */
#define __P(x) ()
#define __const
#define const
#define volatile
#endif
/* No C++ */
#define __BEGIN_DECLS
#define __END_DECLS
/* GNUish things */
#define __CONSTVALUE
#define __CONSTVALUE2
#define __USE_BSD
#define __USE_MISC
#define __USE_POSIX
#define __USE_POSIX2
#define _POSIX_THREAD_SAFE_FUNCTIONS
#include <sys/cdefs.h>
#endif
|
#ifndef __FEATURES_H
#define __FEATURES_H
/* Major and minor version number of the uCLibc library package. Use
these macros to test for features in specific releases. */
#define __UCLIBC__ 0
#define __UCLIBC_MAJOR__ 9
#define __UCLIBC_MINOR__ 1
/* __restrict is known in EGCS 1.2 and above. */
#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ <
92)
# define __restrict /* Ignore */
#endif
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almost ansi */
#if __STDC__ != 1
#define const
#define volatile
#endif
#else /* K&R */
#define __P(x) ()
#define __const
#define const
#define volatile
#endif
/* No C++ */
#define __BEGIN_DECLS
#define __END_DECLS
/* GNUish things */
#define __CONSTVALUE
#define __CONSTVALUE2
#define __USE_BSD
#define __USE_MISC
#define __USE_POSIX
#define __USE_POSIX2
#define _POSIX_THREAD_SAFE_FUNCTIONS
#include <sys/cdefs.h>
#endif
|
Remove __restrict when not supported -Erik
|
Remove __restrict when not supported
-Erik
|
C
|
lgpl-2.1
|
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
|
4a50f0e986c8e57fb734bd66a93f951e89fa370a
|
includes/sv-comp.c
|
includes/sv-comp.c
|
void __VERIFIER_error() { abort(); }
int __VERIFIER_nondet_int() { int val; return val; }
|
void __VERIFIER_error() { abort(); }
// Some files define __VERIFIER_assume, some declare as extern. What happens when redefined?
void __VERIFIER_assume(int expression) { if (!expression) { LOOP: goto LOOP; }; return; }
// #define __VERIFIER_nondet(X) X __VERIFIER_nondet_##X() { X val; return val; }
#define __VERIFIER_nondet2(X, Y) X __VERIFIER_nondet_##Y() { X val; return val; }
#define __VERIFIER_nondet(X) __VERIFIER_nondet2(X, X)
__VERIFIER_nondet2(_Bool, bool)
__VERIFIER_nondet(char)
__VERIFIER_nondet2(unsigned char, uchar)
// int __VERIFIER_nondet_int() { int val; return val; }
__VERIFIER_nondet(int)
__VERIFIER_nondet2(unsigned int, uint)
__VERIFIER_nondet(long)
__VERIFIER_nondet2(unsigned long, ulong)
// void* __VERIFIER_nondet_pointer() { void* val; return val; }
__VERIFIER_nondet2(void*, pointer)
|
Add more common __VERIFIER functions
|
Add more common __VERIFIER functions
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
ba9175808084f22081a755314f966fa26026a8d7
|
test/Driver/qa_override.c
|
test/Driver/qa_override.c
|
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
// CHECK: "-cc1"
// CHECK-NOT: "-Oignore"
// CHECK: "-Omagic"
// CHECK-NOT: "-Oignore"
// RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-mfoo
// RM-WERROR-NEXT: ### Deleting argument -Werror
// RM-WERROR-NEXT: ### Adding argument -mfoo at end
// RM-WERROR: warning: argument unused during compilation: '-mfoo'
// RM-WERROR-NOT: "-Werror"
|
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-msse" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
// CHECK: "-cc1"
// CHECK-NOT: "-Oignore"
// CHECK: "-Omagic"
// CHECK-NOT: "-Oignore"
// RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-msse
// RM-WERROR-NEXT: ### Deleting argument -Werror
// RM-WERROR-NEXT: ### Adding argument -msse at end
// RM-WERROR-NOT: "-Werror"
|
Use a valid option (-msse) for testing QA_OVERRIDE_GCC3_OPTIONS.
|
Use a valid option (-msse) for testing QA_OVERRIDE_GCC3_OPTIONS.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191300 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
3be568cfef886afadf3c820d5c194d3d98d4f250
|
test/Profile/func-entry.c
|
test/Profile/func-entry.c
|
// Test that function entry counts are set correctly.
// RUN: llvm-profdata merge %S/Inputs/func-entry.proftext -o %t.profdata
// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S -fprofile-instr-use=%t.profdata | FileCheck %s
void foo(void);
// CHECK: define void @foo() #0 !prof [[FOO:![0-9]+]]
void foo() { return; }
// CHECK: define i32 @main() #1 !prof [[MAIN:![0-9]+]]
int main() {
int i;
for (i = 0; i < 10000; i++) foo();
return 0;
}
// CHECK: [[FOO]] = !{!"function_entry_count", i64 1000}
// CHECK: [[MAIN]] = !{!"function_entry_count", i64 1}
|
// Test that function entry counts are set correctly.
// RUN: llvm-profdata merge %S/Inputs/func-entry.proftext -o %t.profdata
// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S -fprofile-instr-use=%t.profdata | FileCheck %s
void foo(void);
// CHECK: @foo() #0 !prof [[FOO:![0-9]+]]
void foo() { return; }
// CHECK: @main() #1 !prof [[MAIN:![0-9]+]]
int main() {
int i;
for (i = 0; i < 10000; i++) foo();
return 0;
}
// CHECK: [[FOO]] = !{!"function_entry_count", i64 1000}
// CHECK: [[MAIN]] = !{!"function_entry_count", i64 1}
|
Fix PPC failure. Adjust CHECK pattern.
|
Fix PPC failure. Adjust CHECK pattern.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@238413 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
154fe2b4be294050b9975edbbe2d83294a83d6b6
|
crypto/lhash/lhash_lcl.h
|
crypto/lhash/lhash_lcl.h
|
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
struct lhash_node_st {
void *data;
struct lhash_node_st *next;
unsigned long hash;
};
struct lhash_st {
LHASH_NODE **b;
OPENSSL_LH_COMPFUNC comp;
OPENSSL_LH_HASHFUNC hash;
unsigned int num_nodes;
unsigned int num_alloc_nodes;
unsigned int p;
unsigned int pmax;
unsigned long up_load; /* load times 256 */
unsigned long down_load; /* load times 256 */
unsigned long num_items;
unsigned long num_expands;
unsigned long num_expand_reallocs;
unsigned long num_contracts;
unsigned long num_contract_reallocs;
unsigned long num_hash_calls;
unsigned long num_comp_calls;
unsigned long num_insert;
unsigned long num_replace;
unsigned long num_delete;
unsigned long num_no_delete;
unsigned long num_retrieve;
unsigned long num_retrieve_miss;
unsigned long num_hash_comps;
int error;
};
|
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
struct lhash_node_st {
void *data;
struct lhash_node_st *next;
unsigned long hash;
};
struct lhash_st {
OPENSSL_LH_NODE **b;
OPENSSL_LH_COMPFUNC comp;
OPENSSL_LH_HASHFUNC hash;
unsigned int num_nodes;
unsigned int num_alloc_nodes;
unsigned int p;
unsigned int pmax;
unsigned long up_load; /* load times 256 */
unsigned long down_load; /* load times 256 */
unsigned long num_items;
unsigned long num_expands;
unsigned long num_expand_reallocs;
unsigned long num_contracts;
unsigned long num_contract_reallocs;
unsigned long num_hash_calls;
unsigned long num_comp_calls;
unsigned long num_insert;
unsigned long num_replace;
unsigned long num_delete;
unsigned long num_no_delete;
unsigned long num_retrieve;
unsigned long num_retrieve_miss;
unsigned long num_hash_comps;
int error;
};
|
Complete the rename of LHASH functions and types
|
Complete the rename of LHASH functions and types
LHASH_NODE was used internally, which doesn't work when configured
'no-deprecated'
Reviewed-by: Rich Salz <c04971a99e5a9ee80eaab4b1deb37e845b0bd697@openssl.org>
|
C
|
apache-2.0
|
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl
|
0324b6204df54b3c93d3847eb5d50fe7ce55c22e
|
EZForm/EZForm/src/EZFormField+Private.h
|
EZForm/EZForm/src/EZFormField+Private.h
|
//
// EZForm
//
// Copyright 2011-2013 Chris Miles. All rights reserved.
//
// 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 "EZFormField.h"
@class EZForm;
@interface EZFormField (Private)
@property (nonatomic, assign, readwrite) EZForm *form;
@end
|
//
// EZForm
//
// Copyright 2011-2013 Chris Miles. All rights reserved.
//
// 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 "EZFormField.h"
@class EZForm;
@interface EZFormField (Private)
@property (nonatomic, weak, readwrite) EZForm *form;
@end
|
Update project to Xcode 11 beta 7
|
Update project to Xcode 11 beta 7
Only update required is to replace `assign` with `weak`
|
C
|
mit
|
realestate-com-au/EZForm,realestate-com-au/EZForm
|
db0dc75d6403b6663c0eab4c6ccb672eb9b2ed72
|
arch/x86/lib/usercopy.c
|
arch/x86/lib/usercopy.c
|
/*
* User address space access functions.
*
* For licencing details see kernel-base/COPYING
*/
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/word-at-a-time.h>
/*
* best effort, GUP based copy_from_user() that is NMI-safe
*/
unsigned long
copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
{
unsigned long offset, addr = (unsigned long)from;
unsigned long size, len = 0;
struct page *page;
void *map;
int ret;
do {
ret = __get_user_pages_fast(addr, 1, 0, &page);
if (!ret)
break;
offset = addr & (PAGE_SIZE - 1);
size = min(PAGE_SIZE - offset, n - len);
map = kmap_atomic(page);
memcpy(to, map+offset, size);
kunmap_atomic(map);
put_page(page);
len += size;
to += size;
addr += size;
} while (len < n);
return len;
}
EXPORT_SYMBOL_GPL(copy_from_user_nmi);
|
/*
* User address space access functions.
*
* For licencing details see kernel-base/COPYING
*/
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/word-at-a-time.h>
#include <linux/sched.h>
/*
* best effort, GUP based copy_from_user() that is NMI-safe
*/
unsigned long
copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
{
unsigned long offset, addr = (unsigned long)from;
unsigned long size, len = 0;
struct page *page;
void *map;
int ret;
if (__range_not_ok(from, n, TASK_SIZE) == 0)
return len;
do {
ret = __get_user_pages_fast(addr, 1, 0, &page);
if (!ret)
break;
offset = addr & (PAGE_SIZE - 1);
size = min(PAGE_SIZE - offset, n - len);
map = kmap_atomic(page);
memcpy(to, map+offset, size);
kunmap_atomic(map);
put_page(page);
len += size;
to += size;
addr += size;
} while (len < n);
return len;
}
EXPORT_SYMBOL_GPL(copy_from_user_nmi);
|
Check user address explicitly in copy_from_user_nmi()
|
perf/x86: Check user address explicitly in copy_from_user_nmi()
Signed-off-by: Arun Sharma <c2cb8b536bb785a11a9303a3d5590407e9ac6d77@fb.com>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Signed-off-by: Peter Zijlstra <645ca7d3a8d3d4f60557176cd361ea8351edc32b@chello.nl>
Link: http://lkml.kernel.org/r/1334961696-19580-5-git-send-email-c2cb8b536bb785a11a9303a3d5590407e9ac6d77@fb.com
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
|
e0b44e2f0dc3124674bdb7ba6cc3ea0c3e38779c
|
src/commands.c
|
src/commands.c
|
#include "commands.h"
#include <stdbool.h>
#include <stdio.h>
#include "util.h"
static const char* quit_matches[] = {"quit"};
static const char* help_matches[] = {"help"};
static void print_commands_help() {
puts(" Commands available:\n");
puts(" :quit \tExit laco");
puts(" :help \tDisplay this list of commands");
}
static inline bool is_quit(const char* command) {
return laco_is_match(quit_matches, command);
}
static inline bool is_help(const char* command) {
return laco_is_match(help_matches, command);
}
void handle_command(struct LacoState* laco, char* line) {
if(laco != NULL && line != NULL) {
const char* command = line + 1;
if(is_quit(command)) {
laco_kill(laco, 0, "Exiting laco...");
} else if(is_help(command)) {
print_commands_help();
}
/* Make it seem like this was an empty line */
line[0] = '\0';
}
}
|
#include "commands.h"
#include <stdbool.h>
#include <stdio.h>
#include "util.h"
static const char* quit_matches[] = {"quit"};
static const char* help_matches[] = {"help", "?"};
static void print_commands_help() {
puts(" Commands available:\n");
puts(" :quit \tExit laco");
puts(" :help, :? \tDisplay this list of commands");
}
static inline bool is_quit(const char* command) {
return laco_is_match(quit_matches, command);
}
static inline bool is_help(const char* command) {
return laco_is_match(help_matches, command);
}
void handle_command(struct LacoState* laco, char* line) {
if(laco != NULL && line != NULL) {
const char* command = line + 1;
if(is_quit(command)) {
laco_kill(laco, 0, "Exiting laco...");
} else if(is_help(command)) {
print_commands_help();
}
/* Make it seem like this was an empty line */
line[0] = '\0';
}
}
|
Add short hand for help command
|
Add short hand for help command
|
C
|
bsd-2-clause
|
sourrust/laco
|
42d67826408f0c67cc6c9e9d2f41d203531031e0
|
TATLayout/TATLayout.h
|
TATLayout/TATLayout.h
|
//
// TATLayout.h
// TATLayout
//
// An expressive, simple yet poweful way for coding layout constraints in iOS.
//
// Copyright (c) 2014 Claudio Romandini.
//
// 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 "NSLayoutConstraint+TATConstraintFactory.h"
#import "UIView+TATViewConstraints.h"
|
//
// TATLayout.h
// TATLayout
//
// An expressive, simple yet poweful way for coding layout constraints in iOS.
//
// Copyright (c) 2014 Claudio Romandini.
//
// 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 "NSLayoutConstraint+TATConstraintFactory.h"
#import "UIView+TATViewConstraints.h"
#import "TATLayoutManager.h"
#import "TATLayoutHelper.h"
|
Add imports in main library header
|
Add imports in main library header
|
C
|
mit
|
cromandini/TATLayout,cromandini/TATLayout
|
2114a48105c52b6b0e1c1cbbe59080ea8583e846
|
cupy/cuda/cupy_thrust.h
|
cupy/cuda/cupy_thrust.h
|
#ifndef INCLUDE_GUARD_CUPY_CUDA_THRUST_H
#define INCLUDE_GUARD_CUPY_CUDA_THRUST_H
#ifndef CUPY_NO_CUDA
namespace cupy {
namespace thrust {
template <typename T>
void _sort(void *, size_t *, const std::vector<ptrdiff_t>&, size_t, void *);
template <typename T>
void _lexsort(size_t *, void *, size_t, size_t, size_t, void *);
template <typename T>
void _argsort(size_t *, void *, void *, const std::vector<ptrdiff_t>&, size_t,
void *);
} // namespace thrust
} // namespace cupy
#else // CUPY_NO_CUDA
#include "cupy_common.h"
namespace cupy {
namespace thrust {
template <typename T> void _sort(...) { return; }
template <typename T> void _lexsort(...) { return; }
template <typename T> void _argsort(...) { return; }
} // namespace thrust
} // namespace cupy
#endif // #ifndef CUPY_NO_CUDA
#endif // INCLUDE_GUARD_CUPY_CUDA_THRUST_H
|
#ifndef INCLUDE_GUARD_CUPY_CUDA_THRUST_H
#define INCLUDE_GUARD_CUPY_CUDA_THRUST_H
#ifndef CUPY_NO_CUDA
namespace cupy {
namespace thrust {
template <typename T>
void _sort(void *, size_t *, const std::vector<ptrdiff_t>&, size_t, void *);
template <typename T>
void _lexsort(size_t *, void *, size_t, size_t, size_t, void *);
template <typename T>
void _argsort(size_t *, void *, void *, const std::vector<ptrdiff_t>&, size_t,
void *);
} // namespace thrust
} // namespace cupy
#else // CUPY_NO_CUDA
#include "cupy_common.h"
namespace cupy {
namespace thrust {
template <typename T>
void _sort(void *, size_t *, const std::vector<ptrdiff_t>&, size_t, void *) {
return;
}
template <typename T>
void _lexsort(size_t *, void *, size_t, size_t, size_t, void *) {
return;
}
template <typename T>
void _argsort(size_t *, void *, void *, const std::vector<ptrdiff_t>&, size_t,
void *) {
return;
}
} // namespace thrust
} // namespace cupy
#endif // #ifndef CUPY_NO_CUDA
#endif // INCLUDE_GUARD_CUPY_CUDA_THRUST_H
|
Fix for no cuda environment
|
Fix for no cuda environment
|
C
|
mit
|
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
|
f6aacdd94fe8d648081d42cd578cf5280f6f55fe
|
config/config_class.h
|
config/config_class.h
|
#ifndef CONFIG_CLASS_H
#define CONFIG_CLASS_H
#include <map>
class Config;
class ConfigObject;
class ConfigType;
class ConfigValue;
class ConfigClass {
friend class Config;
std::string name_;
std::map<std::string, ConfigType *> members_;
protected:
ConfigClass(const std::string& name)
: name_(name),
members_()
{ }
private:
~ConfigClass();
virtual bool activate(ConfigObject *)
{
return (true);
}
bool set(ConfigObject *, const std::string&, ConfigValue *);
ConfigType *member(const std::string& mname) const
{
std::map<std::string, ConfigType *>::const_iterator it;
it = members_.find(mname);
if (it == members_.end())
return (NULL);
return (it->second);
}
};
#endif /* !CONFIG_CLASS_H */
|
#ifndef CONFIG_CLASS_H
#define CONFIG_CLASS_H
#include <map>
class Config;
class ConfigObject;
class ConfigType;
class ConfigValue;
class ConfigClass {
friend class Config;
std::string name_;
std::map<std::string, ConfigType *> members_;
protected:
ConfigClass(const std::string& name)
: name_(name),
members_()
{ }
private:
~ConfigClass();
protected:
void add_member(const std::string& mname, ConfigType *type)
{
ASSERT(members_.find(mname) == members_.end());
members_[mname] = type;
}
private:
virtual bool activate(ConfigObject *)
{
return (true);
}
bool set(ConfigObject *, const std::string&, ConfigValue *);
ConfigType *member(const std::string& mname) const
{
std::map<std::string, ConfigType *>::const_iterator it;
it = members_.find(mname);
if (it == members_.end())
return (NULL);
return (it->second);
}
};
#endif /* !CONFIG_CLASS_H */
|
Add an add_member method for adding members. Change visibility of everything.
|
Add an add_member method for adding members. Change visibility of everything.
git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@156 4068ffdb-0463-0410-8185-8cc71e3bd399
|
C
|
bsd-2-clause
|
diegows/wanproxy,splbio/wanproxy,diegows/wanproxy,splbio/wanproxy,diegows/wanproxy,splbio/wanproxy
|
18f6f1d23ea4838ce05b6cde0bb96f74d9e738fe
|
High_Temp_MCP320x.h
|
High_Temp_MCP320x.h
|
/*
High_Temp.h
2014 Copyright (c) Seeed Technology Inc. All right reserved.
Loovee
2013-4-14
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __HIGH_TEMP_MCP320x_H__
#define __HIGH_TEMP_MCPx320x_H__
#include <MCP3208.h>
#include <High_Temp.h>
class HighTempMCP320x: public HighTemp{
public:
HighTempMCP320x(int _spiCS, int _pinTmp, int _pinThmc);
private:
int spiChipSelect;
MCP3208 adc;
public:
int getAnalog(int pin);
};
#endif
|
/*
High_Temp.h
2014 Copyright (c) Seeed Technology Inc. All right reserved.
Loovee
2013-4-14
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __HIGH_TEMP_MCP320x_H__
#define __HIGH_TEMP_MCPx320x_H__
#include <MCP3208.h>
#include <High_Temp.h>
class HighTempMCP320x: public HighTemp{
public:
HighTempMCP320x(int _spiCS, int _pinTmp, int _pinThmc);
private:
MCP3208 adc;
public:
int getAnalog(int pin);
};
#endif
|
Remove chipselect member - not needed
|
Remove chipselect member - not needed
|
C
|
mit
|
mhaas/Grove_HighTemp_Sensor
|
5a060de3f13d00e80d51486fc4a7410186aa3bfd
|
lib/GPIOlib.h
|
lib/GPIOlib.h
|
#ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
int resetCounter();
void getCounter(int *countLeft,int *countRight);
int turnTo(int angle);
void delay(int milliseconds);
}
#endif
|
#ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
int resetCounter();
void getCounter(int *countLeft,int *countRight);
int turnTo(int angle);
void delay(int milliseconds);
}
#endif
|
Remove texts for understanding to Wiki pages
|
Remove texts for understanding to Wiki pages
|
C
|
mit
|
miaoxw/EmbeddedSystemNJU2017-Demo
|
6bc030767c511ee71fa99f2c8f36c2dcb2844698
|
perl/xs/KinoSearch/Util/StringHelper.c
|
perl/xs/KinoSearch/Util/StringHelper.c
|
/* 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.
*/
#include "xs/XSBind.h"
#include "KinoSearch/Util/StringHelper.h"
// TODO: replace with code from ICU in common/ucnv_u8.c.
chy_bool_t
kino_StrHelp_utf8_valid(const char *ptr, size_t size)
{
const U8 *uptr = (const U8*)ptr;
return is_utf8_string(uptr, size);
}
|
/* 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.
*/
#include "xs/XSBind.h"
#include "KinoSearch/Util/StringHelper.h"
// TODO: replace with code from ICU in common/ucnv_u8.c.
chy_bool_t
kino_StrHelp_utf8_valid(const char *ptr, size_t size)
{
const U8 *uptr = (const U8*)ptr;
return size == 0 ? true : !!is_utf8_string(uptr, size);
}
|
Work around undocumented feature/bug in perlapi function is_utf8_string() by short-circuiting StrHelp_utf8_valid() to return true when the length of the string is 0.
|
Work around undocumented feature/bug in perlapi function is_utf8_string() by
short-circuiting StrHelp_utf8_valid() to return true when the length of the
string is 0.
git-svn-id: 0e6074679e66e8f1cc73dfc755b08bab367f805b@1027787 13f79535-47bb-0310-9956-ffa450edef68
|
C
|
apache-2.0
|
kidaa/lucy,rectang/lucy,pombredanne/apache-lucy,pombredanne/apache-lucy,apache/lucy,kidaa/lucy,rbevers/lucy,apache/lucy,nwellnhof/lucy,apache/lucy,kidaa/lucy,pombredanne/apache-lucy,kidaa/lucy,kidaa/lucy,rectang/lucy,apache/lucy,rbevers/lucy,apache/lucy,nwellnhof/lucy,rectang/lucy,nwellnhof/lucy,pombredanne/apache-lucy,rectang/lucy,pombredanne/apache-lucy,pombredanne/apache-lucy,nwellnhof/lucy,rectang/lucy,rectang/lucy,nwellnhof/lucy,kidaa/lucy,rbevers/lucy,rbevers/lucy,nwellnhof/lucy,pombredanne/apache-lucy,rectang/lucy,apache/lucy,rbevers/lucy,nwellnhof/lucy,apache/lucy,kidaa/lucy,rbevers/lucy,kidaa/lucy,rbevers/lucy
|
dc5390b941c4694b601b52dc1a0ad5c69ed1cfa2
|
tests/auto/common/declarativewebutils.h
|
tests/auto/common/declarativewebutils.h
|
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Raine Makelainen <raine.makelainen@jolla.com>
**
****************************************************************************/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DECLARATIVEWEBUTILS_H
#define DECLARATIVEWEBUTILS_H
#include <QObject>
#include <QString>
#include <QColor>
#include <qqml.h>
class DeclarativeWebUtils : public QObject
{
Q_OBJECT
Q_PROPERTY(QString homePage READ homePage NOTIFY homePageChanged FINAL)
public:
explicit DeclarativeWebUtils(QObject *parent = 0);
Q_INVOKABLE int getLightness(QColor color) const;
Q_INVOKABLE QString displayableUrl(QString fullUrl) const;
static DeclarativeWebUtils *instance();
QString homePage() const;
bool firstUseDone() const;
void setFirstUseDone(bool firstUseDone);
signals:
void homePageChanged();
private:
QString m_homePage;
bool m_firstUseDone;
};
QML_DECLARE_TYPE(DeclarativeWebUtils)
#endif
|
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Raine Makelainen <raine.makelainen@jolla.com>
**
****************************************************************************/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DECLARATIVEWEBUTILS_H
#define DECLARATIVEWEBUTILS_H
#include <QObject>
#include <QString>
#include <QColor>
#include <qqml.h>
class DeclarativeWebUtils : public QObject
{
Q_OBJECT
Q_PROPERTY(QString homePage READ homePage NOTIFY homePageChanged FINAL)
Q_PROPERTY(bool firstUseDone READ firstUseDone NOTIFY firstUseDoneChanged FINAL)
public:
explicit DeclarativeWebUtils(QObject *parent = 0);
Q_INVOKABLE int getLightness(QColor color) const;
Q_INVOKABLE QString displayableUrl(QString fullUrl) const;
static DeclarativeWebUtils *instance();
QString homePage() const;
bool firstUseDone() const;
void setFirstUseDone(bool firstUseDone);
signals:
void homePageChanged();
void firstUseDoneChanged();
private:
QString m_homePage;
bool m_firstUseDone;
};
QML_DECLARE_TYPE(DeclarativeWebUtils)
#endif
|
Add missing property for WebUtils mock
|
[sailfish-browser] Add missing property for WebUtils mock
A warning was printed when running unit tests.
|
C
|
mpl-2.0
|
alinelena/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,alinelena/sailfish-browser,rojkov/sailfish-browser,alinelena/sailfish-browser,alinelena/sailfish-browser,rojkov/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,rojkov/sailfish-browser,sailfishos/sailfish-browser
|
9cbbb1707f067cd7806a6a408e9e25a258649209
|
iobuf/iobuf_timeout.c
|
iobuf/iobuf_timeout.c
|
#include <errno.h>
#include <sys/poll.h>
#include "iobuf.h"
int iobuf_timeout(iobuf* io, int poll_out)
{
struct pollfd pfd;
int result;
if (!io->timeout) return 1;
pfd.fd = io->fd;
pfd.events = poll_out ? POLLOUT : POLLIN;
while ((result = poll(&pfd, 1, io->timeout)) == -1) {
if (errno == EAGAIN) continue;
IOBUF_SET_ERROR(io);
}
if (result) return 1;
io->flags |= IOBUF_TIMEOUT;
return 0;
}
|
#include <errno.h>
#include "iobuf.h"
#include "iopoll.h"
int iobuf_timeout(iobuf* io, int poll_out)
{
iopoll_fd pfd;
int result;
if (!io->timeout) return 1;
pfd.fd = io->fd;
pfd.events = poll_out ? IOPOLL_WRITE : IOPOLL_READ;
while ((result = iopoll(&pfd, 1, io->timeout)) == -1) {
if (errno == EAGAIN) continue;
IOBUF_SET_ERROR(io);
}
if (result) return 1;
io->flags |= IOBUF_TIMEOUT;
return 0;
}
|
Use iopoll instead of poll directly.
|
Use iopoll instead of poll directly.
|
C
|
lgpl-2.1
|
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
|
8e5fa6ed489c9101bd87452b92db2559666c606c
|
Source/Export.h
|
Source/Export.h
|
///////////////////////////////////////////////////////////////////////////////
// This source file is part of Zeroth.
//
// Copyright (c) 2016 Colin Hill
//
///////////////////////////////////////////////////////////////////////////////
#pragma once
#include <Hect/Core/Export.h>
#ifdef HECT_WINDOWS_BUILD
#ifdef ZEROTH_EXPORTS
#define ZEROTH_EXPORT __declspec(dllexport)
#else
#define ZEROTH_EXPORT __declspec(dllimport)
#endif
#else
#define ZEROTH_EXPORTS
#endif
|
///////////////////////////////////////////////////////////////////////////////
// This source file is part of Zeroth.
//
// Copyright (c) 2016 Colin Hill
//
///////////////////////////////////////////////////////////////////////////////
#pragma once
#include <Hect/Core/Export.h>
#ifdef HECT_WINDOWS_BUILD
#ifdef ZEROTH_EXPORTS
#define ZEROTH_EXPORT __declspec(dllexport)
#else
#define ZEROTH_EXPORT __declspec(dllimport)
#endif
#else
#define ZEROTH_EXPORT
#endif
|
Fix export macro for non-MS compilers
|
Fix export macro for non-MS compilers
|
C
|
mit
|
colinhect/zeroth,colinhect/zeroth,colinhect/zeroth
|
6c8a791702467c48fa62f506baa18a5980b7fcf9
|
deps/cellulariot/src/SDL_Pi_HDC1000.h
|
deps/cellulariot/src/SDL_Pi_HDC1000.h
|
/* @author: Samuel G samuel.genois@mail.mcgill.ca
Modification Log:
Date Author Modification
-----------------------------------------------------------------
31-Oct-2018 Samuel G Created the file
==================================================================*/
#define HDC1000_CONFIG_TEMPERATURE_RESOLUTION_14BIT 0x0000
#define HDC1000_CONFIG_HUMIDITY_RESOLUTION_14BIT 0x0000
typedef struct {
//TODO
} HDC1000;
int HDC1000_init(HDC1000 *handle);
void setTemperatureResolution(int resolution);
void setHumidityResolution(int resolution);
int readTemperature(HDC1000 *handle, int *data);
int readHumidity(HDC1000 *handle, int *data);
|
/* @author: Samuel G samuel.genois@mail.mcgill.ca
Modification Log:
Date Author Modification
-----------------------------------------------------------------
31-Oct-2018 Samuel G Created the file
07-Nov-2018 Matthew L-K Switch to file descriptor design
==================================================================*/
#define HDC1000_CONFIG_TEMPERATURE_RESOLUTION_14BIT 0x0000
#define HDC1000_CONFIG_HUMIDITY_RESOLUTION_14BIT 0x0000
int HDC1000_temp_open();
int HDC1000_humid_open();
int read_temperature(int *data);
int read_humidity(int *data);
int HDC1000_temp_close();
int HDC1000_humid_close();
|
Switch HDC1000 to file descriptor design
|
Switch HDC1000 to file descriptor design
|
C
|
mit
|
anrl/JAM,anrl/JAM,anrl/JAM,anrl/JAM,anrl/JAM,anrl/JAM
|
3de1c775e0cd2e3c0a2c6d9723da6dc2d82640b2
|
include/truth/panic.h
|
include/truth/panic.h
|
#pragma once
#include <truth/cpu.h>
#include <truth/types.h>
#include <truth/log.h>
#define Not_Reached false
#define assert(x) \
if (!(x)) { \
logf("Assertion failed: (%s) function %s, file %s, line %d.", \
(#x), __func__, __FILE__, __LINE__); \
panic(); \
}
#define assert_ok(x) \
if (x != Ok) { \
logf("Assertion failed (%s) status: %s, function %s, file %s, " \
"line %d.", (#x), status_message(x), __func__, __FILE__, \
__LINE__); \
panic(); \
}
static inline void no_return panic() {
disable_interrupts();
halt();
}
|
#pragma once
#include <truth/cpu.h>
#include <truth/types.h>
#include <truth/log.h>
#define Not_Reached false
#define assert(x) \
if (!(x)) { \
logf("Assertion failed: (%s) function %s, file %s, line %d.", \
(#x), __func__, __FILE__, __LINE__); \
panic(); \
}
#define assert_ok(x) \
if (x != Ok) { \
logf("Assertion failed (%s) status: %s, function %s, file %s, " \
"line %d.", (#x), status_message(x), __func__, __FILE__, \
__LINE__); \
panic(); \
}
static inline void panic() {
disable_interrupts();
halt();
}
|
Remove attribute ignored by compiler
|
Remove attribute ignored by compiler
|
C
|
mit
|
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
|
557d3de09e89c71aa82403b113bd9b863ae3fb0d
|
test/CodeGen/pgo-sample.c
|
test/CodeGen/pgo-sample.c
|
// Test if PGO sample use passes are invoked.
//
// Ensure Pass PGOInstrumentationGenPass is invoked.
// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s
// CHECK: Remove unused exception handling info
// CHECK: Sample profile pass
|
// Test if PGO sample use passes are invoked.
//
// Ensure Pass PGOInstrumentationGenPass is invoked.
// RUN: %clang_cc1 -O2 -fno-experimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=LEGACY
// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=NEWPM
// LEGACY: Remove unused exception handling info
// LEGACY: Sample profile pass
// NEWPM: SimplifyCFGPass
// NEWPM: SampleProfileLoaderPass
int func(int a) { return a; }
|
Remove exception handling before loading pgo sample profile data
|
[clang][NewPM] Remove exception handling before loading pgo sample profile data
This patch ensures that SimplifyCFGPass comes before SampleProfileLoaderPass
on PGO runs in the new PM and fixes clang/test/CodeGen/pgo-sample.c.
Differential Revision: https://reviews.llvm.org/D63626
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@364201 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
4de18794094da4ebb67698b7c5a3b7a11fd5d477
|
src/rtcmix/sockdefs.h
|
src/rtcmix/sockdefs.h
|
#include <netinet/in.h>
#include "defs.h" /* for MAXDISPARGS */
#define MAXTEXTARGS ((MAXDISPARGS*sizeof(double))/512)
#define MYPORT (IPPORT_RESERVED + 78)
/* IPPORT_RESERVED is 1024, so this is socket 1102
IPPORT_MAXPORT is 65535 on SGIs */
typedef struct sockdata {
char name[100]; /* the cmix command name */
union {
double p[MAXDISPARGS]; /* the p-fields */
char text[MAXTEXTARGS][512]; /* or text arrays */
} data;
int n_args; /* number of p-fields used */
} RTsockstr;
|
#include <netinet/in.h>
#include "maxdispargs.h"
#define MAXTEXTARGS ((MAXDISPARGS*sizeof(double))/512)
#define MYPORT (IPPORT_RESERVED + 78)
/* IPPORT_RESERVED is 1024, so this is socket 1102
IPPORT_MAXPORT is 65535 on SGIs */
typedef struct sockdata {
char name[100]; /* the cmix command name */
union {
double p[MAXDISPARGS]; /* the p-fields */
char text[MAXTEXTARGS][512]; /* or text arrays */
} data;
int n_args; /* number of p-fields used */
} RTsockstr;
|
Include maxdispargs.h instead of defs.h.
|
Include maxdispargs.h instead of defs.h.
|
C
|
apache-2.0
|
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
|
5a429584d9cab3ffa15d6cd091a27181dc454c54
|
Opcodes/ftest.c
|
Opcodes/ftest.c
|
#include "csdl.h"
#include <math.h>
void tanhtable(FUNC *ftp, FGDATA *ff)
{
MYFLT *fp = ftp->ftable;
MYFLT range = ff->e.p[5];
double step = (double)range/(ff->e.p[3]);
int i;
double x;
for (i=0, x=FL(0.0); i<ff->e.p[3]; i++, x+=step)
*fp++ = (MYFLT)tanh(x);
}
static void gentune(FUNC *ftp, FGDATA *ff) /* Gab 1/3/2005 */
{
int j;
int notenum;
int grade;
int numgrades;
int basekeymidi;
MYFLT basefreq, factor,interval;
MYFLT *fp = ftp->ftable, *pp = &(ff->e.p[5]);
int nvals = ff->e.pcnt - 4;
numgrades = (int) *pp++;
interval = *pp++;
basefreq = *pp++;
basekeymidi= (int) *pp++;
nvals = ff->flenp1 - 1;
for (j =0; j < nvals; j++) {
notenum = j;
if (notenum < basekeymidi) {
notenum = basekeymidi - notenum;
grade = (numgrades-(notenum % numgrades)) % numgrades;
factor = - (MYFLT)(int) ((notenum+numgrades-1) / numgrades) ;
}
else {
notenum = notenum - basekeymidi;
grade = notenum % numgrades;
factor = (MYFLT)(int) (notenum / numgrades);
}
factor = (MYFLT)pow((double)interval, (double)factor);
fp[j] = pp[grade] * factor * basefreq;
}
}
static NGFENS localfgens[] = {
{ "tanh", (void(*)(void))tanhtable},
{ "cpstune", (void(*)(void))gentune},
{ NULL, NULL}
};
#define S sizeof
static OENTRY localops[] = {};
FLINKAGE
|
#include "csdl.h"
#include <math.h>
void tanhtable(FUNC *ftp, FGDATA *ff)
{
MYFLT *fp = ftp->ftable;
MYFLT range = ff->e.p[5];
double step = (double)range/(ff->e.p[3]);
int i;
double x;
for (i=0, x=FL(0.0); i<ff->e.p[3]; i++, x+=step)
*fp++ = (MYFLT)tanh(x);
}
static NGFENS localfgens[] = {
{ "tanh", (void(*)(void))tanhtable},
{ NULL, NULL}
};
#define S sizeof
static OENTRY localops[] = {};
FLINKAGE
|
Remove gen from loadable code
|
Remove gen from loadable code
|
C
|
lgpl-2.1
|
ketchupok/csound,ketchupok/csound,ketchupok/csound,ketchupok/csound,csound/csound,ketchupok/csound,csound/csound,csound/csound,csound/csound,csound/csound,csound/csound,csound/csound,ketchupok/csound,csound/csound,ketchupok/csound,csound/csound,ketchupok/csound,csound/csound,ketchupok/csound,ketchupok/csound
|
27390e0138f13a06c5d52054510e7a979e900f97
|
test/wasm/soft/float/fixunstfdi.c
|
test/wasm/soft/float/fixunstfdi.c
|
#include "src/math/reinterpret.h"
#include <math.h>
#include <stdint.h>
#include <assert.h>
static _Bool run(uint64_t a)
{
return a == truncl(a);
}
int main(void)
{
const uint64_t delta = 0x0008D46BA87B5A22;
for (uint64_t i = 0x3FFFFFFFFFFFFFFF; i < 0x4340000000000000; i += delta)
assert(run(reinterpret(double, i)));
for (uint64_t i = 0; i <= UINT64_MAX / delta; ++i)
assert(run(i * delta));
}
|
#include "src/math/reinterpret.h"
#include <math.h>
#include <stdint.h>
#include <assert.h>
int main(void)
{
const __int128 delta = (__int128)0x17E93193 << 64 | 0xC0605887B0E6B634;
for (__int128 i = reinterpret(__int128, 0.9L); i < reinterpret(__int128, 0x1p64L); i += delta) {
long double x = reinterpret(long double, i);
assert((uint64_t)x == truncl(x));
}
}
|
Test truncation of long double -> uint64_t
|
Test truncation of long double -> uint64_t
|
C
|
mit
|
jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic
|
ae2f6d0a505d398642a1d6c6a057b971d93b1611
|
sw/device/lib/runtime/check.h
|
sw/device/lib/runtime/check.h
|
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0`
#ifndef OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
#define OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
#include <stdbool.h>
#include "sw/device/lib/base/log.h"
#include "sw/device/lib/runtime/abort.h"
/**
* Runtime assertion macros with log.h integration.
*/
/**
* Checks that the given condition is true. If the condition is false, this
* function logs and then aborts.
*
* @param condition an expression to check.
* @param ... arguments to a LOG_* macro, which are evaluated if the check
* fails.
*/
#define CHECK(condition, ...) \
do { \
if (!(condition)) { \
LOG_ERROR("CHECK-fail: " __VA_ARGS__); \
abort(); \
} \
} while (false)
/**
* Shorthand for CHECK(value == 0).
*
* @param condition a value to check.
* @param ... arguments to a LOG_* macro, which are evaluated if the check
* fails.
*/
#define CHECKZ(value, ...) CHECK((value) == 0, ...)
#endif // OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
|
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0`
#ifndef OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
#define OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
#include <stdbool.h>
#include "sw/device/lib/base/log.h"
#include "sw/device/lib/runtime/hart.h"
/**
* Runtime assertion macros with log.h integration.
*/
/**
* Checks that the given condition is true. If the condition is false, this
* function logs and then aborts.
*
* @param condition an expression to check.
* @param ... arguments to a LOG_* macro, which are evaluated if the check
* fails.
*/
#define CHECK(condition, ...) \
do { \
if (!(condition)) { \
LOG_ERROR("CHECK-fail: " __VA_ARGS__); \
abort(); \
} \
} while (false)
/**
* Shorthand for CHECK(value == 0).
*
* @param condition a value to check.
* @param ... arguments to a LOG_* macro, which are evaluated if the check
* fails.
*/
#define CHECKZ(value, ...) CHECK((value) == 0, ##__VA_ARGS__)
#endif // OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
|
Fix a couple typos in the CHECK macros.
|
[sw] Fix a couple typos in the CHECK macros.
Signed-off-by: Miguel Young de la Sota <71b8e7f4945fd97b98544cf897992af89646547a@google.com>
|
C
|
apache-2.0
|
lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan
|
66cd92fa8407ceeecd4abfe1968eaaed60e04b1d
|
src/host/string_hash.c
|
src/host/string_hash.c
|
/**
* \file string_hash.c
* \brief Computes a hash value for a string.
* \author Copyright (c) 2012-2014 Jason Perkins and the Premake project
*/
#include "premake.h"
#include <string.h>
int string_hash(lua_State* L)
{
const char* str = luaL_checkstring(L, 1);
unsigned long seed = luaL_optint(L, 2, 0);
lua_pushnumber(L, do_hash(str, seed));
return 1;
}
unsigned long do_hash(const char* str, int seed)
{
/* DJB2 hashing; see http://www.cse.yorku.ca/~oz/hash.html */
unsigned long hash = 5381;
if (seed != 0) {
hash = hash * 33 + seed;
}
while (*str) {
hash = hash * 33 + (*str);
str++;
}
return hash;
}
|
/**
* \file string_hash.c
* \brief Computes a hash value for a string.
* \author Copyright (c) 2012-2014 Jason Perkins and the Premake project
*/
#include "premake.h"
#include <string.h>
int string_hash(lua_State* L)
{
const char* str = luaL_checkstring(L, 1);
unsigned long seed = luaL_optint(L, 2, 0);
lua_pushnumber(L, (lua_Number)do_hash(str, seed));
return 1;
}
unsigned long do_hash(const char* str, int seed)
{
/* DJB2 hashing; see http://www.cse.yorku.ca/~oz/hash.html */
unsigned long hash = 5381;
if (seed != 0) {
hash = hash * 33 + seed;
}
while (*str) {
hash = hash * 33 + (*str);
str++;
}
return hash;
}
|
Fix implicit conversion warning when building with floating point Lua
|
Fix implicit conversion warning when building with floating point Lua
|
C
|
bsd-3-clause
|
annulen/premake,annulen/premake,annulen/premake,annulen/premake
|
1e88990b7b2b4bfc9999b79a78a08e7decf7e416
|
src/types.h
|
src/types.h
|
/*
* types.h
* Ansilove 4.1.0
* https://www.ansilove.org
*
* Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
* All rights reserved.
*
* Ansilove is licensed under the BSD 2-Clause License.
* See LICENSE file for details.
*/
#ifndef TYPES_H
#define TYPES_H
#define ANSILOVE_FILETYPE_ANS 1
#define ANSILOVE_FILETYPE_ADF 2
#define ANSILOVE_FILETYPE_BIN 3
#define ANSILOVE_FILETYPE_IDF 4
#define ANSILOVE_FILETYPE_PCB 5
#define ANSILOVE_FILETYPE_TND 6
#define ANSILOVE_FILETYPE_XB 7
extern char *types[];
extern int filetypes[];
extern int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *);
#endif /* TYPES_H */
|
/*
* types.h
* Ansilove 4.1.0
* https://www.ansilove.org
*
* Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
* All rights reserved.
*
* Ansilove is licensed under the BSD 2-Clause License.
* See LICENSE file for details.
*/
#ifndef TYPES_H
#define TYPES_H
#define ANSILOVE_FILETYPE_ANS 1
#define ANSILOVE_FILETYPE_ADF 2
#define ANSILOVE_FILETYPE_BIN 3
#define ANSILOVE_FILETYPE_IDF 4
#define ANSILOVE_FILETYPE_PCB 5
#define ANSILOVE_FILETYPE_TND 6
#define ANSILOVE_FILETYPE_XB 7
struct ansilove_ctx;
struct ansilove_options;
extern char *types[];
extern int filetypes[];
extern int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *);
#endif /* TYPES_H */
|
Add forward declarations for ansilove_ctx and ansilove_options structs.
|
Add forward declarations for ansilove_ctx and ansilove_options structs.
|
C
|
bsd-2-clause
|
ansilove/ansilove,ansilove/AnsiLove-C
|
d4eb917f1f92bbcbe4efd035125a1d5f0d776cd8
|
include/Range.h
|
include/Range.h
|
#ifndef EFDL_RANGE_H
#define EFDL_RANGE_H
#include <QPair>
#include <QDebug>
namespace efdl {
typedef QPair<qint64, qint64> Range; // (start, end)
}
QDebug operator<<(QDebug dbg, const efdl::Range &r);
#endif // EFDL_RANGE_H
|
#ifndef EFDL_RANGE_H
#define EFDL_RANGE_H
#include <QPair>
#include <QDebug>
namespace efdl {
/**
* Encapsulates a file data range of the form [start, end[
*
* Note that "end" is not inclusive!
*/
typedef QPair<qint64, qint64> Range;
}
QDebug operator<<(QDebug dbg, const efdl::Range &r);
#endif // EFDL_RANGE_H
|
Make it explicit that the 'end' in a range [start, end[ is _not_ inclusive.
|
Make it explicit that the 'end' in a range [start, end[ is _not_ inclusive.
|
C
|
mit
|
netromdk/efdl,netromdk/efdl
|
b3ee386a185c0e97967506b17ff6555668716b02
|
src/qt/guiconstants.h
|
src/qt/guiconstants.h
|
#ifndef GUICONSTANTS_H
#define GUICONSTANTS_H
/* Milliseconds between model updates */
static const int MODEL_UPDATE_DELAY = 500;
/* Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024;
/* Size of icons in status bar */
static const int STATUSBAR_ICONSIZE = 16;
/* Invalid field background style */
#define STYLE_INVALID "background:#FF8080"
/* Transaction list -- unconfirmed transaction */
#define COLOR_UNCONFIRMED QColor(128, 128, 128)
/* Transaction list -- negative amount */
#define COLOR_NEGATIVE QColor(136, 0, 21)
/* Table List -- negative amount */
#define COLOR_NEGATIVE_TABLE QColor(224, 0, 0)
/* Transaction list -- positive amount */
#define COLOR_POSITIVE QColor(0, 128, 0)
/* Transaction list -- bare address (without label) */
#define COLOR_BAREADDRESS QColor(140, 140, 140)
/* Colors for minting tab for each coin age group */
#define COLOR_MINT_YOUNG QColor(127, 127, 240)
#define COLOR_MINT_MATURE QColor(127, 240, 127)
#define COLOR_MINT_OLD QColor(240, 127, 127)
#endif // GUICONSTANTS_H
|
#ifndef GUICONSTANTS_H
#define GUICONSTANTS_H
/* Milliseconds between model updates */
static const int MODEL_UPDATE_DELAY = 500;
/* Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024;
/* Size of icons in status bar */
static const int STATUSBAR_ICONSIZE = 16;
/* Invalid field background style */
#define STYLE_INVALID "background:#FF8080"
/* Transaction list -- unconfirmed transaction */
#define COLOR_UNCONFIRMED QColor(128, 128, 128)
/* Transaction list -- negative amount */
#define COLOR_NEGATIVE QColor(136, 0, 21)
/* Table List -- negative amount */
#define COLOR_NEGATIVE_TABLE QColor(255, 80, 80)
/* Transaction list -- positive amount */
#define COLOR_POSITIVE QColor(0, 128, 0)
/* Transaction list -- bare address (without label) */
#define COLOR_BAREADDRESS QColor(140, 140, 140)
/* Colors for minting tab for each coin age group */
#define COLOR_MINT_YOUNG QColor(128, 64, 64)
#define COLOR_MINT_MATURE QColor(64, 128, 64)
#define COLOR_MINT_OLD QColor(26, 77, 26)
#endif // GUICONSTANTS_H
|
Improve colors of minting tab and transactions tab.
|
Improve colors of minting tab and transactions tab.
|
C
|
mit
|
Peerunity/Peerunity,Peerunity/Peerunity,Peerunity/Peerunity,Peerunity/Peerunity
|
c3097e8290c50f7fc67920233a4d4a7a20d68dcb
|
fmt/sign_pad.c
|
fmt/sign_pad.c
|
#include <string.h>
#include "number.h"
/** Format padding for a signed number. */
unsigned fmt_sign_pad(char* buffer, int sign, unsigned width, char pad)
{
char* s = buffer;
if (buffer == 0)
return width + (sign != 0);
if (!width) {
if (sign)
*s++ = '-';
}
else {
if (pad != '0') {
memset(s, pad, width);
s += width;
}
if (sign)
*s++ = '-';
if (pad == '0') {
memset(s, pad, width);
s += width;
}
}
return s - buffer;
}
#ifdef SELFTEST_MAIN
#include "selftest.c"
void test(int sign, unsigned width, char pad)
{
char buf[10];
buf[fmt_sign_pad(buf, sign, width, pad)] = 0;
obuf_puts(&outbuf, buf);
NL();
}
MAIN
{
test(0, 0, 0);
test(1, 0, 0);
test(0, 4, 'x');
test(1, 4, 'x');
test(0, 4, '0');
test(1, 4, '0');
}
#endif
#ifdef SELFTEST_EXP
-
xxxx
xxxx-
0000
-0000
#endif
|
#include <string.h>
#include "number.h"
/** Format padding for a signed number. */
unsigned fmt_sign_pad(char* buffer, int sign, unsigned width, char pad)
{
char* s = buffer;
if (buffer == 0)
return width + (sign != 0);
if (!width) {
if (sign)
*s++ = '-';
}
else {
if (pad != '0') {
memset(s, pad, width);
s += width;
}
if (sign)
*s++ = '-';
if (pad == '0') {
memset(s, pad, width);
s += width;
}
}
return s - buffer;
}
#ifdef SELFTEST_MAIN
#include "selftest.c"
void test(int sign, unsigned width, char pad)
{
char buf[10];
obuf_putu(&outbuf, fmt_sign_pad(0, sign, width, pad));
obuf_putc(&outbuf, ':');
buf[fmt_sign_pad(buf, sign, width, pad)] = 0;
obuf_puts(&outbuf, buf);
NL();
}
MAIN
{
test(0, 0, 0);
test(1, 0, 0);
test(0, 4, 'x');
test(1, 4, 'x');
test(0, 4, '0');
test(1, 4, '0');
}
#endif
#ifdef SELFTEST_EXP
0:
1:-
4:xxxx
5:xxxx-
4:0000
5:-0000
#endif
|
Include the no-buffer length when testing this function.
|
Include the no-buffer length when testing this function.
|
C
|
lgpl-2.1
|
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
|
56bfdc11d63694e8f2248e98b8d1ee1eedfb0e43
|
src/avfs/avfsincludes.h
|
src/avfs/avfsincludes.h
|
#include "assertive.h"
#include <VSScript.h>
#include <VapourSynth.h>
#include <VSHelper.h>
#include <climits>
#include <cstdint>
#include <cstdarg>
#include <cstring>
#include <cstdlib>
#include <wchar.h>
#include <cstdio>
#include <algorithm>
#include <new>
#include <codecvt>
#include <string>
#include <fstream>
#include <vector>
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#include <windows.h>
#include <vfw.h>
#include <aviriff.h>
#include "ss.h"
#pragma warning(disable: 4244) // size conversion warning
#pragma warning(disable: 4245) // sign conversion warning
#include "avisynth.h"
#pragma warning(default: 4244)
#pragma warning(default: 4245)
#include "avfspfm.h"
#include "xxfs.h"
#include "avfs.h"
#include "vsfs.h"
#include "videoinfoadapter.h"
#include "../common/p2p_api.h"
#include "../common/fourcc.h"
|
#include "assertive.h"
#include <VSScript.h>
#include <VapourSynth.h>
#include <VSHelper.h>
#include <climits>
#include <cstdint>
#include <cstdarg>
#include <cstring>
#include <cstdlib>
#include <wchar.h>
#include <cstdio>
#include <algorithm>
#include <new>
#include <codecvt>
#include <string>
#include <fstream>
#include <vector>
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#include <windows.h>
#include "ss.h"
#pragma warning(disable: 4244) // size conversion warning
#pragma warning(disable: 4245) // sign conversion warning
#include "avisynth.h"
#pragma warning(default: 4244)
#pragma warning(default: 4245)
#include "avfspfm.h"
#include "xxfs.h"
#include "avfs.h"
#include "vsfs.h"
#include "videoinfoadapter.h"
#include "../common/p2p_api.h"
#include "../common/fourcc.h"
// Common vfw defines
#define WAVE_FORMAT_PCM 1
#define WAVE_FORMAT_IEEE_FLOAT 0x0003
|
Reduce the number of windows specific includes in AVFS
|
Reduce the number of windows specific includes in AVFS
|
C
|
lgpl-2.1
|
vapoursynth/vapoursynth,Kamekameha/vapoursynth,vapoursynth/vapoursynth,vapoursynth/vapoursynth,Kamekameha/vapoursynth,Kamekameha/vapoursynth,vapoursynth/vapoursynth,Kamekameha/vapoursynth
|
b336f8736f562f6723777d70f6f5956e28ccab73
|
util.h
|
util.h
|
#ifndef UTIL_H
#define UTIL_H
void set_verbose_on();
void set_debug_on();
void error(const char * fmt, ...);
void verbose(const char * fmt, ...);
void debug(const char * fmt, ...);
#endif
|
#ifndef UTIL_H
#define UTIL_H
void set_verbose_on();
void set_debug_on();
void error(const char * fmt, ...);
void verbose(const char * fmt, ...);
void debug(const char * fmt, ...);
void run_command(char * const argv[]);
#endif
|
Allow run_command to be accessed from other files
|
Allow run_command to be accessed from other files
|
C
|
mit
|
jaybosamiya/wifi-sniffer,jaybosamiya/wifi-sniffer
|
ed56e96ebeffec4ee264c707ddacc3ac3b3bb2fd
|
include/body.h
|
include/body.h
|
#ifndef CPR_BODY_H
#define CPR_BODY_H
#include <string>
#include "defines.h"
namespace cpr {
class Body : public std::string {
public:
Body() = default;
Body(const Body& rhs) = default;
Body(Body&& rhs) = default;
Body& operator=(const Body& rhs) = default;
Body& operator=(Body&& rhs) = default;
explicit Body(const char* raw_string) : std::string(raw_string) {}
explicit Body(const char* raw_string, size_t length) : std::string(raw_string, length) {}
explicit Body(size_t to_fill, char character) : std::string(to_fill, character) {}
explicit Body(const std::string& std_string) : std::string(std_string) {}
explicit Body(const std::string& std_string, size_t position, size_t length = std::string::npos)
: std::string(std_string, position, length) {}
explicit Body(std::initializer_list<char> il) : std::string(il) {}
template <class InputIterator>
explicit Body(InputIterator first, InputIterator last)
: std::string(first, last) {}
};
} // namespace cpr
#endif
|
#ifndef CPR_BODY_H
#define CPR_BODY_H
#include <cstring>
#include <initializer_list>
#include <string>
#include "defines.h"
namespace cpr {
class Body : public std::string {
public:
Body() = default;
Body(const Body& rhs) = default;
Body(Body&& rhs) = default;
Body& operator=(const Body& rhs) = default;
Body& operator=(Body&& rhs) = default;
explicit Body(const char* raw_string) : std::string(raw_string) {}
explicit Body(const char* raw_string, size_t length) : std::string(raw_string, length) {}
explicit Body(size_t to_fill, char character) : std::string(to_fill, character) {}
explicit Body(const std::string& std_string) : std::string(std_string) {}
explicit Body(const std::string& std_string, size_t position, size_t length = std::string::npos)
: std::string(std_string, position, length) {}
explicit Body(std::initializer_list<char> il) : std::string(il) {}
template <class InputIterator>
explicit Body(InputIterator first, InputIterator last)
: std::string(first, last) {}
};
} // namespace cpr
#endif
|
Add specific headers for used symbols in Body
|
Add specific headers for used symbols in Body
|
C
|
mit
|
whoshuu/cpr,SuperV1234/cpr,whoshuu/cpr,msuvajac/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,msuvajac/cpr,whoshuu/cpr
|
9daa20c4f49febf0046ed42e0b436ad9f6956a2c
|
qsjsonlistmodel.h
|
qsjsonlistmodel.h
|
#pragma once
#include <QObject>
#include <QQmlParserStatus>
#include "qslistmodel.h"
class QSJsonListModel : public QSListModel, public QQmlParserStatus
{
Q_OBJECT
Q_PROPERTY(QString keyField READ keyField WRITE setKeyField NOTIFY keyFieldChanged)
Q_PROPERTY(QVariantList source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QStringList fields READ fields WRITE setFields NOTIFY fieldsChanged)
Q_INTERFACES(QQmlParserStatus)
public:
explicit QSJsonListModel(QObject *parent = 0);
QString keyField() const;
void setKeyField(const QString &keyField);
QVariantList source() const;
void setSource(const QVariantList &source);
QStringList fields() const;
void setFields(const QStringList &roleNames);
signals:
void keyFieldChanged();
void sourceChanged();
void fieldsChanged();
public slots:
protected:
virtual void classBegin();
virtual void componentComplete();
private:
void sync();
QString m_keyField;
QVariantList m_source;
QStringList m_fields;
bool componentCompleted;
};
|
#pragma once
#include <QObject>
#include <QQmlParserStatus>
#include "qslistmodel.h"
/* QSJsonListModel is a data model that combine QSListModel and QSDiffRunner
* into a single class. It may take a Javascript array object as source input,
* it will compare with previous input then update the model according to
* the diff.
*/
class QSJsonListModel : public QSListModel, public QQmlParserStatus
{
Q_OBJECT
Q_PROPERTY(QString keyField READ keyField WRITE setKeyField NOTIFY keyFieldChanged)
Q_PROPERTY(QVariantList source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QStringList fields READ fields WRITE setFields NOTIFY fieldsChanged)
Q_INTERFACES(QQmlParserStatus)
public:
explicit QSJsonListModel(QObject *parent = 0);
QString keyField() const;
void setKeyField(const QString &keyField);
QVariantList source() const;
void setSource(const QVariantList &source);
QStringList fields() const;
void setFields(const QStringList &roleNames);
signals:
void keyFieldChanged();
void sourceChanged();
void fieldsChanged();
public slots:
protected:
virtual void classBegin();
virtual void componentComplete();
private:
void sync();
QString m_keyField;
QVariantList m_source;
QStringList m_fields;
bool componentCompleted;
};
|
Add description to QSJsonListModel in source file.
|
Add description to QSJsonListModel in source file.
|
C
|
apache-2.0
|
benlau/qsyncable,benlau/qsyncable
|
e59e627e6e8ef1baab2dcd79e5b28f1a6d31978c
|
libyaul/yaul.h
|
libyaul/yaul.h
|
/*
* Copyright (c) 2012-2014 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _LIBYAUL_H_
#define _LIBYAUL_H_
/* CPU */
#include <cpu.h>
/* SCU */
#include <scu.h>
/* CS0 */
#include <arp.h>
#include <dram-cartridge.h>
#include <usb-cartridge.h>
/* CS2 */
#include <cd-block.h>
/* VDP1 */
#include <vdp1.h>
/* VDP2 */
#include <vdp2.h>
/* SMPC */
#include <smpc.h>
/* Kernel */
#include <common.h>
#include <irq-mux.h>
#include <cons.h>
#include <fs/iso9660/iso9660.h>
#include <fs/romdisk/romdisk.h>
#include <gdb.h>
#endif /* !_LIBYAUL_H_ */
|
/*
* Copyright (c) 2012-2014 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _LIBYAUL_H_
#define _LIBYAUL_H_
/* CPU-bus CPU */
#include <cpu.h>
/* CPU-bus SMPC */
#include <smpc.h>
/* SCU */
#include <scu.h>
/* CS0 */
#include <arp.h>
#include <dram-cartridge.h>
#include <usb-cartridge.h>
/* CS2 */
#include <cd-block.h>
/* B-bus VDP1 */
#include <vdp1.h>
/* B-bus VDP2 */
#include <vdp2.h>
/* B-bus SCSP */
#include <scsp.h>
/* Kernel */
#include <common.h>
#include <irq-mux.h>
#include <cons.h>
#include <fs/iso9660/iso9660.h>
#include <fs/romdisk/romdisk.h>
#include <gdb.h>
#endif /* !_LIBYAUL_H_ */
|
Add missing header (for SCSP)
|
Add missing header (for SCSP)
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
9a91e90810d8c91e9e83799e7824f1ff9b171266
|
IPCalculator/IPAddress.h
|
IPCalculator/IPAddress.h
|
#include <iostream>
// An IPv4 address has the following form:
// "A.B.C.D", where A, B, C and D are bytes
class IPAddress {
public:
IPAddress (unsigned char a = 0, unsigned char b = 0, unsigned char c = 0, unsigned char d = 0);
IPAddress operator& (const IPAddress& addr) const;
IPAddress operator| (const IPAddress& addr) const;
IPAddress operator~ () const;
bool operator== (const IPAddress& addr) const;
bool operator!= (const IPAddress& addr) const;
friend std::ostream& operator<< (std::ostream& os, const IPAddress& addr);
friend std::istream& operator>> (std::istream& is, IPAddress& addr);
void setAddress (unsigned char a, unsigned char b, unsigned char c, unsigned char d);
private:
unsigned char m_a;
unsigned char m_b;
unsigned char m_c;
unsigned char m_d;
};
|
#ifndef _IP_ADDRESS_H_
#define _IP_ADDRESS_H_
#include <iostream>
// An IPv4 address has the following form:
// "A.B.C.D", where A, B, C and D are bytes
class IPAddress {
public:
IPAddress (unsigned char a = 0, unsigned char b = 0, unsigned char c = 0, unsigned char d = 0);
IPAddress operator& (const IPAddress& addr) const;
IPAddress operator| (const IPAddress& addr) const;
IPAddress operator~ () const;
bool operator== (const IPAddress& addr) const;
bool operator!= (const IPAddress& addr) const;
friend std::ostream& operator<< (std::ostream& os, const IPAddress& addr);
friend std::istream& operator>> (std::istream& is, IPAddress& addr);
void setAddress (unsigned char a, unsigned char b, unsigned char c, unsigned char d);
private:
unsigned char m_a;
unsigned char m_b;
unsigned char m_c;
unsigned char m_d;
};
#endif // _IPADDRESS_H_
|
Add header guard to prevent multiple inclusion errors
|
Add header guard to prevent multiple inclusion errors
|
C
|
mit
|
ocpodariu/ip-calculator
|
ca7cea3fe392766a1252c86274554950384663e4
|
bench/udb2/test-mlib.c
|
bench/udb2/test-mlib.c
|
#include "../common.c"
#include "m-dict.h"
static inline bool oor_equal_p(unsigned int k, unsigned char n)
{
return k == (unsigned int)n;
}
static inline void oor_set(unsigned int *k, unsigned char n)
{
*k = (unsigned int)n;
}
DICT_OA_DEF2(dict_oa_uint,
unsigned int, M_OPEXTEND(M_DEFAULT_OPLIST, OOR_EQUAL(oor_equal_p), OOR_SET(oor_set M_IPTR)),
unsigned int, M_DEFAULT_OPLIST)
uint32_t test_int(uint32_t n, uint32_t x0)
{
uint32_t i, x, z = 0;
dict_oa_uint_t h;
dict_oa_uint_init(h);
for (i = 0, x = x0; i < n; ++i) {
x = hash32(x);
unsigned int key = get_key(n, x);
unsigned int *ptr = dict_oa_uint_get_at(h, key);
(*ptr)++;
z += *ptr;
}
fprintf(stderr, "# unique keys: %d; checksum: %u\n", (int) dict_oa_uint_size(h), z);
z = dict_oa_uint_size(h);
dict_oa_uint_clear(h);
return z;
}
|
#include "../common.c"
#define DICTI_OA_PROBING(s) 1
#include "m-dict.h"
static inline bool oor_equal_p(unsigned int k, unsigned char n)
{
return k == (unsigned int)n;
}
static inline void oor_set(unsigned int *k, unsigned char n)
{
*k = (unsigned int)n;
}
DICT_OA_DEF2(dict_oa_uint,
unsigned int, M_OPEXTEND(M_DEFAULT_OPLIST, HASH(hash_fn), OOR_EQUAL(oor_equal_p), OOR_SET(oor_set M_IPTR)),
unsigned int, M_DEFAULT_OPLIST)
uint32_t test_int(uint32_t n, uint32_t x0)
{
uint32_t i, x, z = 0;
dict_oa_uint_t h;
dict_oa_uint_init(h);
for (i = 0, x = x0; i < n; ++i) {
x = hash32(x);
unsigned int key = get_key(n, x);
unsigned int *ptr = dict_oa_uint_get_at(h, key);
(*ptr)++;
z += *ptr;
}
fprintf(stderr, "# unique keys: %d; checksum: %u\n", (int) dict_oa_uint_size(h), z);
z = dict_oa_uint_size(h);
dict_oa_uint_clear(h);
return z;
}
|
Use of linear probing and the same hash function as other libraries
|
Use of linear probing and the same hash function as other libraries
|
C
|
bsd-2-clause
|
P-p-H-d/mlib,P-p-H-d/mlib
|
fcf556ee83012bf061286ddaea7dd84826dab7d1
|
src/bin/e_error.c
|
src/bin/e_error.c
|
#include "e.h"
/* local subsystem functions */
/* local subsystem globals */
/* externally accessible functions */
EAPI void
e_error_message_show_internal(char *txt)
{
/* FIXME: maybe log these to a file and display them at some point */
printf("<<<< Enlightenment Error >>>>\n"
"%s\n",
txt);
}
/* local subsystem functions */
|
#include "e.h"
/* local subsystem functions */
/* local subsystem globals */
/* externally accessible functions */
EAPI void
e_error_message_show_internal(char *txt)
{
/* FIXME: maybe log these to a file and display them at some point */
printf("<<<< Enlightenment Error >>>>\n%s\n", txt);
}
/* local subsystem functions */
|
Fix formatting. (Really ??? 3 lines for something that can fit on one ?)
|
E: Fix formatting. (Really ??? 3 lines for something that can fit on
one ?)
git-svn-id: 6ac5796aeae0cef97fb47bcc287d4ce899c6fa6e@61614 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
|
C
|
bsd-2-clause
|
jordemort/e17,jordemort/e17,jordemort/e17
|
13cd844ad3d0ab3c71578f5ddcb49699f3845fb1
|
src/condor_includes/condor_constants.h
|
src/condor_includes/condor_constants.h
|
#ifndef CONSTANTS_H
#define CONSTANTS_H
#if !defined(__STDC__) && !defined(__cplusplus)
#define const
#endif
/*
Set up a boolean variable type. Since this definition could conflict
with other reasonable definition of BOOLEAN, i.e. using an enumeration,
it is conditional.
*/
#ifndef BOOLEAN_TYPE_DEFINED
typedef int BOOLEAN;
typedef int BOOL;
#endif
#if defined(TRUE)
# undef TRUE
# undef FALSE
#endif
static const int TRUE = 1;
static const int FALSE = 0;
/*
Useful constants for turning seconds into larger units of time. Since
these constants may have already been defined elsewhere, they are
conditional.
*/
#ifndef TIME_CONSTANTS_DEFINED
static const int MINUTE = 60;
static const int HOUR = 60 * 60;
static const int DAY = 24 * 60 * 60;
#endif
/*
This is for use with strcmp() and related functions which will return
0 upon a match.
*/
#ifndef MATCH
static const int MATCH = 0;
#endif
#endif
|
#ifndef CONSTANTS_H
#define CONSTANTS_H
#if !defined(__STDC__) && !defined(__cplusplus)
#define const
#endif
/*
Set up a boolean variable type. Since this definition could conflict
with other reasonable definition of BOOLEAN, i.e. using an enumeration,
it is conditional.
*/
#ifndef BOOLEAN_TYPE_DEFINED
typedef int BOOLEAN;
typedef int BOOL_T;
#endif
#if defined(TRUE)
# undef TRUE
# undef FALSE
#endif
static const int TRUE = 1;
static const int FALSE = 0;
/*
Useful constants for turning seconds into larger units of time. Since
these constants may have already been defined elsewhere, they are
conditional.
*/
#ifndef TIME_CONSTANTS_DEFINED
static const int MINUTE = 60;
static const int HOUR = 60 * 60;
static const int DAY = 24 * 60 * 60;
#endif
/*
This is for use with strcmp() and related functions which will return
0 upon a match.
*/
#ifndef MATCH
static const int MATCH = 0;
#endif
#endif
|
Change BOOL to BOOL_T to avoid confilct with "condor_expr.h".
|
Change BOOL to BOOL_T to avoid confilct with "condor_expr.h".
|
C
|
apache-2.0
|
djw8605/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,djw8605/htcondor,clalancette/condor-dcloud,clalancette/condor-dcloud,djw8605/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,neurodebian/htcondor,djw8605/condor,neurodebian/htcondor,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,djw8605/condor,djw8605/condor,neurodebian/htcondor,zhangzhehust/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,mambelli/osg-bosco-marco,neurodebian/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,neurodebian/htcondor,djw8605/condor,neurodebian/htcondor,djw8605/condor,htcondor/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/condor,zhangzhehust/htcondor,djw8605/htcondor,clalancette/condor-dcloud,htcondor/htcondor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,neurodebian/htcondor
|
bb43546c7a3d535576b49f0a729761ba6a348892
|
include/sound/asound.h
|
include/sound/asound.h
|
#include <alsa/sound/uapi/asound.h>
|
/* workaround for building with old glibc / kernel headers */
#ifdef __linux__
#include <linux/types.h>
#else
#include <sys/types.h>
#endif
#ifndef __kernel_long_t
#define __kernel_long_t long
#endif
#include <alsa/sound/uapi/asound.h>
|
Fix build error with old kernel headers
|
header: Fix build error with old kernel headers
Old development environment doesn't necessarily contain the headers
defining __kernel_long_t that is recently used for y2038 timespec
conditional. Define it explicitly in such a case.
Signed-off-by: Takashi Iwai <4596b3305151c7ee743192a95d394341e3d3b644@suse.de>
|
C
|
lgpl-2.1
|
tiwai/alsa-lib,alsa-project/alsa-lib,alsa-project/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,tiwai/alsa-lib,alsa-project/alsa-lib,takaswie/alsa-lib,alsa-project/alsa-lib,takaswie/alsa-lib,tiwai/alsa-lib,tiwai/alsa-lib,takaswie/alsa-lib
|
5ede7ca028f40c0770b8cb646138b592a84ead78
|
SSPSolution/SSPSolution/GameStateHandler.h
|
SSPSolution/SSPSolution/GameStateHandler.h
|
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
//#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<GameState*> m_statesToRemove;
public:
GameStateHandler();
~GameStateHandler();
int ShutDown();
int Initialize(ComponentHandler* cHandler, Camera* cameraRef);
int Update(float dt, InputHandler* inputHandler);
//Push a state to the stack
int PushStateToStack(GameState* state);
private:
};
#endif
|
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<GameState*> m_statesToRemove;
public:
GameStateHandler();
~GameStateHandler();
int ShutDown();
int Initialize(ComponentHandler* cHandler, Camera* cameraRef);
int Update(float dt, InputHandler* inputHandler);
//Push a state to the stack
int PushStateToStack(GameState* state);
private:
};
#endif
|
UPDATE default start without menu
|
UPDATE default start without menu
|
C
|
apache-2.0
|
Chringo/SSP,Chringo/SSP
|
8b6c24dce25e743ceecd06d1c175c1cf8b91627b
|
browser/brightray_paths.h
|
browser/brightray_paths.h
|
// Copyright 2015 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 BROWSER_BRIGHTRAY_PATHS_H_
#define BROWSER_BRIGHTRAY_PATHS_H_
#include "base/compiler_specific.h"
#if defined(OS_WIN)
#include "base/base_paths_win.h"
#elif defined(OS_MACOSX)
#include "base/base_paths_mac.h"
#endif
#if defined(OS_POSIX)
#include "base/base_paths_posix.h"
#endif
namespace brightray {
enum {
PATH_START = 1000,
DIR_USER_DATA = PATH_START, // Directory where user data can be written.
DIR_USER_CACHE, // Directory where user cache can be written.
#if defined(OS_LINUX)
DIR_APP_DATA, // Application Data directory under the user profile.
#else
DIR_APP_DATA = base::DIR_APP_DATA,
#endif
#if defined(OS_POSIX)
DIR_CACHE = base::DIR_CACHE, // Directory where to put cache data.
#else
DIR_CACHE = base::DIR_APP_DATA,
#endif
PATH_END
};
} // namespace brightray
#endif // BROWSER_BRIGHTRAY_PATHS_H_
|
// Copyright 2015 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 BROWSER_BRIGHTRAY_PATHS_H_
#define BROWSER_BRIGHTRAY_PATHS_H_
#include "base/compiler_specific.h"
#if defined(OS_WIN)
#include "base/base_paths_win.h"
#elif defined(OS_MACOSX)
#include "base/base_paths_mac.h"
#endif
#if defined(OS_POSIX)
#include "base/base_paths_posix.h"
#endif
namespace brightray {
enum {
PATH_START = 11000,
DIR_USER_DATA = PATH_START, // Directory where user data can be written.
DIR_USER_CACHE, // Directory where user cache can be written.
#if defined(OS_LINUX)
DIR_APP_DATA, // Application Data directory under the user profile.
#else
DIR_APP_DATA = base::DIR_APP_DATA,
#endif
#if defined(OS_POSIX)
DIR_CACHE = base::DIR_CACHE, // Directory where to put cache data.
#else
DIR_CACHE = base::DIR_APP_DATA,
#endif
PATH_END
};
} // namespace brightray
#endif // BROWSER_BRIGHTRAY_PATHS_H_
|
Change our PATH_START to 11000
|
Change our PATH_START to 11000
|
C
|
mit
|
atom/brightray,bbondy/brightray,brave/brightray,atom/brightray,brave/brightray,bbondy/brightray
|
314f4b9a1ea1272e83165570ff5634d53425f2fc
|
scene/geometry/sphere.h
|
scene/geometry/sphere.h
|
/*
* A sphere which can be added
* Author: Dino Wernli
*/
#ifndef SPHERE_H_
#define SPHERE_H_
#include "scene/element.h"
#include "util/point3.h"
#include "util/random.h"
class Material;
class Sphere : public Element {
public:
// Does not take ownership of material.
Sphere(const Point3& center, Scalar radius, const Material& material);
virtual ~Sphere();
virtual bool Intersect(const Ray& ray, IntersectionData* data = NULL) const;
// Returns a uniformly distributed random point on the surface of the sphere.
// This guarantees that "point" is visible from the returned point.
Point3 Sample(const Point3& point) const;
private:
Point3 center_;
Scalar radius_;
static Random random_;
};
#endif /* SPHERE_H_ */
|
/*
* A sphere which can be added
* Author: Dino Wernli
*/
#ifndef SPHERE_H_
#define SPHERE_H_
#include "scene/element.h"
#include "util/point3.h"
#include "util/random.h"
class Material;
class Sphere : public Element {
public:
// Does not take ownership of material.
Sphere(const Point3& center, Scalar radius, const Material& material);
virtual ~Sphere();
virtual bool Intersect(const Ray& ray, IntersectionData* data = NULL) const;
// Returns a uniformly distributed random point on the surface of the sphere.
// This guarantees that "point" is visible from the returned point.
// TODO(dinow): This is not true, replace this my a method taking a normal.
Point3 Sample(const Point3& point) const;
private:
Point3 center_;
Scalar radius_;
static Random random_;
};
#endif /* SPHERE_H_ */
|
Add todo because comment is wrong.
|
Add todo because comment is wrong.
|
C
|
mit
|
dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer
|
9340480f46eb97d0774b77f47c316fe0bb4632e5
|
dhash/dhblock_chash_srv.h
|
dhash/dhblock_chash_srv.h
|
#include <dhblock_srv.h>
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli, str dbname, str dbext,
str desc, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
|
#include <dhblock_srv.h>
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli,
str desc, str dbname, str dbext, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
|
Fix mis-named parameters in header.
|
Fix mis-named parameters in header.
|
C
|
mit
|
weidezhang/dht,sit/dht,sit/dht,sit/dht,weidezhang/dht,weidezhang/dht,sit/dht,sit/dht,weidezhang/dht,weidezhang/dht
|
d4e76b1eb2dd6a96faf591ea6935088095528b96
|
include/rose/memory.h
|
include/rose/memory.h
|
/*
* Copyright (c) 2012 Rob Hoelz <rob at hoelz.ro>
*
* 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.
*/
#ifndef ROSE_MEMORY_H
#define ROSE_MEMORY_H
void memory_init_gdt(void);
void memory_init_paging(void *kernel_start, void *kernel_end);
#endif
|
/*
* Copyright (c) 2012 Rob Hoelz <rob at hoelz.ro>
*
* 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.
*/
#ifndef ROSE_MEMORY_H
#define ROSE_MEMORY_H
void memory_init_gdt(void);
void memory_init_paging(void *kernel_start, void *kernel_end);
#define MEMORY_PAGE_ALIGN(addr)\
((void *) (((long)addr) & ~0xFFF))
#define MEMORY_IS_PAGE_ALIGNED(addr)\
((((long)addr) & 0xFFF) == 0)
#endif
|
Add macros for page aligning
|
Add macros for page aligning
|
C
|
mit
|
hoelzro/rose-kernel,hoelzro/rose-kernel
|
6e21b4d8465f8cd4dc4181ea10683b576b361455
|
Base/RXBufferMacros.h
|
Base/RXBufferMacros.h
|
//
// RXBufferMacros.h
// rivenx
//
#if !defined(RX_BUFFER_MACROS_H)
#define RX_BUFFER_MACROS_H
#define BUFFER_OFFSET(buffer, bytes) (__typeof__(buffer))((uintptr_t)buffer + (bytes))
#define BUFFER_NOFFSET(buffer, bytes) (__typeof__(buffer))((uintptr_t)buffer - (bytes))
#define BUFFER_ADD_OFFSET(buffer, bytes) (buffer) = BUFFER_OFFSET((buffer), (bytes))
#define BUFFER_DELTA(head_ptr, read_ptr) ((size_t)(((uintptr_t)read_ptr) - ((uintptr_t)head_ptr)))
#define BUFFER_ALIGN(buffer, a) (__typeof__(buffer))(((uintptr_t)(buffer) + (a-1ul)) & ~(a-1ul))
#define BUFFER_ALIGN_SIZE(buffer, a) (size_t)((uintptr_t)BUFFER_ALIGN((buffer), a) - (uintptr_t)(buffer))
#define BUFFER_ALIGN2(buffer) BUFFER_ALIGN(buffer, 2ul)
#define BUFFER_ALIGN4(buffer) BUFFER_ALIGN(buffer, 4ul)
#define BUFFER_ALIGN8(buffer) BUFFER_ALIGN(buffer, 8ul)
#define BUFFER_ALIGN16(buffer) BUFFER_ALIGN(buffer, 16ul)
#endif // RX_BUFFER_MACROS_H
|
//
// RXBufferMacros.h
// rivenx
//
#if !defined(RX_BUFFER_MACROS_H)
#define RX_BUFFER_MACROS_H
#define BUFFER_OFFSET(buffer, bytes) (__typeof__(buffer))((uintptr_t)(buffer) + (bytes))
#define BUFFER_NOFFSET(buffer, bytes) (__typeof__(buffer))((uintptr_t)(buffer) - (bytes))
#define BUFFER_ADD_OFFSET(buffer, bytes) (buffer) = BUFFER_OFFSET((buffer), (bytes))
#define BUFFER_DELTA(head_ptr, read_ptr) ((size_t)(((uintptr_t)(read_ptr)) - ((uintptr_t)(head_ptr))))
#define BUFFER_ALIGN(buffer, a) (__typeof__(buffer))(((uintptr_t)(buffer) + (a-1ul)) & ~(a-1ul))
#define BUFFER_ALIGN_SIZE(buffer, a) (size_t)((uintptr_t)BUFFER_ALIGN((buffer), (a)) - (uintptr_t)(buffer))
#define BUFFER_ALIGN2(buffer) BUFFER_ALIGN(buffer, 2ul)
#define BUFFER_ALIGN4(buffer) BUFFER_ALIGN(buffer, 4ul)
#define BUFFER_ALIGN8(buffer) BUFFER_ALIGN(buffer, 8ul)
#define BUFFER_ALIGN16(buffer) BUFFER_ALIGN(buffer, 16ul)
#endif // RX_BUFFER_MACROS_H
|
Fix the new buffer macros by ensuring macro arguments are evaluated first.
|
Fix the new buffer macros by ensuring macro arguments are evaluated first.
|
C
|
bsd-3-clause
|
jfroy/rivenx,jfroy/rivenx,jfroy/rivenx,jfroy/rivenx
|
53f6358ae3dd63a1ca308409a3faeccee1d3e0ad
|
src/murmurhash3.h
|
src/murmurhash3.h
|
//-----------------------------------------------------------------------------
// MurmurHash3 was written by Austin Appleby, and is placed in the public
// domain. The author hereby disclaims copyright to this source code.
#ifndef _MURMURHASH3_H_
#define _MURMURHASH3_H_
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
// Microsoft Visual Studio
#if defined(_MSC_VER)
typedef unsigned char uint8_t;
typedef unsigned long uint32_t;
typedef unsigned __int64 uint64_t;
// Other compilers
#else // defined(_MSC_VER)
#include <stdint.h>
#endif // !defined(_MSC_VER)
//-----------------------------------------------------------------------------
void MurmurHash3_x86_32 (const void * key, int len, uint32_t seed,
void * out);
/**
* The following 2 functions have been altered to just return the
* 64 most significant bits.
*/
void MurmurHash3_x86_128 (const void * key, int len, uint32_t seed,
void * out);
void MurmurHash3_x64_128 (const void * key, int len, uint32_t seed,
void * out);
//-----------------------------------------------------------------------------
#endif // _MURMURHASH3_H_
|
//-----------------------------------------------------------------------------
// MurmurHash3 was written by Austin Appleby, and is placed in the public
// domain. The author hereby disclaims copyright to this source code.
#ifndef _MURMURHASH3_H_
#define _MURMURHASH3_H_
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
#include <stdint.h>
//-----------------------------------------------------------------------------
void MurmurHash3_x86_32 (const void * key, int len, uint32_t seed,
void * out);
/**
* The following 2 functions have been altered to just return the
* 64 most significant bits.
*/
void MurmurHash3_x86_128 (const void * key, int len, uint32_t seed,
void * out);
void MurmurHash3_x64_128 (const void * key, int len, uint32_t seed,
void * out);
//-----------------------------------------------------------------------------
#endif // _MURMURHASH3_H_
|
Fix build break on WIN32
|
Fix build break on WIN32
New versions of MSVC have stdint.h
Change-Id: Ica591b67c9e09541648d3a47e6c8fc98afde2547
Reviewed-on: http://review.couchbase.org/42716
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Reviewed-by: Chiyoung Seo <fcffc23db27b19ee4ebba46695ee6b50e09216a2@couchbase.com>
|
C
|
bsd-3-clause
|
jimwwalker/ep-engine,membase/ep-engine,owendCB/ep-engine,daverigby/kv_engine,daverigby/ep-engine,daverigby/kv_engine,hisundar/ep-engine,owendCB/ep-engine,teligent-ru/ep-engine,owendCB/ep-engine,owendCB/ep-engine,hisundar/ep-engine,couchbase/ep-engine,sriganes/ep-engine,couchbase/ep-engine,jimwwalker/ep-engine,membase/ep-engine,daverigby/ep-engine,daverigby/kv_engine,couchbase/ep-engine,sriganes/ep-engine,sriganes/ep-engine,hisundar/ep-engine,jimwwalker/ep-engine,membase/ep-engine,membase/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,jimwwalker/ep-engine,teligent-ru/ep-engine,teligent-ru/ep-engine,hisundar/ep-engine,daverigby/ep-engine,daverigby/kv_engine,daverigby/ep-engine,sriganes/ep-engine
|
31193e4a68582e1b495f8fbf9bdf7904ec44b304
|
src/kernel/task/resource/vfork/res_vfork.c
|
src/kernel/task/resource/vfork/res_vfork.c
|
/**
* @file res_vfork.c
* @brief Task resource for vfork
* @date May 16, 2014
* @author Anton Bondarev
*/
#include <stddef.h>
#include <setjmp.h>
#include <kernel/task.h>
#include <kernel/task/resource.h>
#include <kernel/task/resource/task_vfork.h>
TASK_RESOURCE_DEF(task_vfork_desc, struct task_vfork);
static void task_vfork_init(const struct task *task, void *vfork_buff) {
task_vfork_end((struct task *)task);
}
static int task_vfork_inherit(const struct task *task,
const struct task *parent) {
return 0;
}
static size_t task_vfork_offset;
static const struct task_resource_desc task_vfork_desc = {
.init = task_vfork_init,
.inherit = task_vfork_inherit,
.resource_size = sizeof(struct task_vfork),
.resource_offset = &task_vfork_offset
};
struct task_vfork *task_resource_vfork(const struct task *task) {
assert(task != NULL);
return (void *)task->resources + task_vfork_offset;
}
|
/**
* @file res_vfork.c
* @brief Task resource for vfork
* @date May 16, 2014
* @author Anton Bondarev
*/
#include <stddef.h>
#include <setjmp.h>
#include <util/binalign.h>
#include <kernel/task.h>
#include <kernel/task/resource.h>
#include <kernel/task/resource/task_vfork.h>
TASK_RESOURCE_DEF(task_vfork_desc, struct task_vfork);
static void task_vfork_init(const struct task *task, void *vfork_buff) {
task_vfork_end((struct task *)task);
}
static int task_vfork_inherit(const struct task *task,
const struct task *parent) {
return 0;
}
static size_t task_vfork_offset;
static const struct task_resource_desc task_vfork_desc = {
.init = task_vfork_init,
.inherit = task_vfork_inherit,
.resource_size = sizeof(struct task_vfork),
.resource_offset = &task_vfork_offset,
};
struct task_vfork *task_resource_vfork(const struct task *task) {
size_t offset;
assert(task != NULL);
offset = (size_t)((void *)task->resources + task_vfork_offset);
#ifdef PT_REGS_ALIGN
return (void *)binalign_bound(offset, PT_REGS_ALIGN);
#else
return (void *)offset;
#endif
}
|
Add alignment for 'vfork' task resource
|
kernel: Add alignment for 'vfork' task resource
|
C
|
bsd-2-clause
|
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
|
7751530df026441258cabf46f474761c85330f8d
|
test/Sema/attr-noescape.c
|
test/Sema/attr-noescape.c
|
// RUN: %clang_cc1 %s -fblocks -verify -fsyntax-only
#if !__has_attribute(noescape)
# error "missing noescape attribute"
#endif
int *global_var __attribute((noescape)); // expected-warning{{'noescape' attribute only applies to parameters}}
void foo(__attribute__((noescape)) int *int_ptr,
__attribute__((noescape)) int (^block)(int),
__attribute((noescape)) int integer) { // expected-warning{{'noescape' attribute ignored on parameter of non-pointer type 'int'}}
}
|
// RUN: %clang_cc1 %s -fblocks -verify -fsyntax-only
#if !__has_attribute(noescape)
# error "missing noescape attribute"
#endif
int *global_var __attribute((noescape)); // expected-warning{{'noescape' attribute only applies to parameters}}
void foo(__attribute__((noescape)) int *int_ptr,
__attribute__((noescape)) int (^block)(int),
__attribute((noescape)) int integer) { // expected-warning{{'noescape' attribute only applies to pointer arguments}}
}
|
Fix expected warning after r313945.
|
Fix expected warning after r313945.
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
c8828e1233954b718cd29ff91cd600513aa87a14
|
Artsy/Resources/Artsy-Bridging-Header.h
|
Artsy/Resources/Artsy-Bridging-Header.h
|
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "UIViewController+FullScreenLoading.h"
#import "ArtsyAPI+Sales.h"
#import "ARScrollNavigationChief.h"
#import "ARWhitespaceGobbler.h"
#import "ARCountdownView.h"
#import "UIView+HitTestExpansion.h"
#import "ARSeparatorViews.h"
#import "ArtsyAPI+CurrentUserFunctions.h"
// Perhaps in the future we could use https://github.com/orta/ar_dispatch/ for now though eigen does more than this lib
#import "ARDispatchManager.h"
// Models.
#import "Sale.h"
#import "Artwork.h"
#import "AREmbeddedModelsViewController.h"
#import "ARArtworkMasonryModule.h"
#import "UIViewController+SimpleChildren.h"
#import "UIViewController+ARUserActivity.h"
// For building out Auction Information VC
#import "ARNavigationButtonsViewController.h"
#import "ARNavigationButton.h"
#import "ARSerifNavigationViewController.h"
#import "ARTextView.h"
#import "ARThemedFactory.h"
#import "ARFonts.h"
// Temporary for building out auctionVC
#import "ARArtistNetworkModel.h"
#import "ARGeneArtworksNetworkModel.h"
// Libraries
#import <Aerodramus/Aerodramus.h>
|
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "UIViewController+FullScreenLoading.h"
#import "ArtsyAPI+Sales.h"
#import "ARScrollNavigationChief.h"
#import "ARWhitespaceGobbler.h"
#import "ARCountdownView.h"
#import "UIView+HitTestExpansion.h"
#import "ARSeparatorViews.h"
#import "ArtsyAPI+CurrentUserFunctions.h"
// Perhaps in the future we could use https://github.com/orta/ar_dispatch/ for now though eigen does more than this lib
#import "ARDispatchManager.h"
// Models.
#import "Sale.h"
#import "Artwork.h"
#import "AREmbeddedModelsViewController.h"
#import "ARArtworkMasonryModule.h"
#import "UIViewController+SimpleChildren.h"
#import "UIViewController+ARUserActivity.h"
// For building out Auction Information VC
#import "ARNavigationButtonsViewController.h"
#import "ARNavigationButton.h"
#import "ARSerifNavigationViewController.h"
#import "ARTextView.h"
#import "ARFonts.h"
// Temporary for building out auctionVC
#import "ARArtistNetworkModel.h"
#import "ARGeneArtworksNetworkModel.h"
|
Remove unused imports from the swift bridging header
|
Remove unused imports from the swift bridging header
|
C
|
mit
|
artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen,artsy/eigen
|
06fbd5ddb83944b92f2ed0eb67eb017a385c940f
|
grantlee_core_library/grantlee_export.h
|
grantlee_core_library/grantlee_export.h
|
/*
This file is part of the Grantlee template system.
Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 3 only, as published by the Free Software Foundation.
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 version 3 for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRANTLEE_EXPORT_H
#define GRANTLEE_EXPORT_H
#ifndef GRANTLEE_EXPORT
# if defined(GRANTLEE_CORE_LIB_MAKEDLL)
# define GRANTLEE_EXPORT __declspec(dllexport)
# else
# define GRANTLEE_EXPORT __declspec(dllimport)
# endif
#endif
#endif
|
/*
This file is part of the Grantlee template system.
Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 3 only, as published by the Free Software Foundation.
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 version 3 for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRANTLEE_EXPORT_H
#define GRANTLEE_EXPORT_H
#if defined(_WIN32) || defined(_WIN64)
# ifndef GRANTLEE_EXPORT
# if defined(GRANTLEE_CORE_LIB_MAKEDLL)
# define GRANTLEE_EXPORT __declspec(dllexport)
# else
# define GRANTLEE_EXPORT __declspec(dllimport)
# endif
# endif
#else
# define GRANTLEE_EXPORT
#endif
#endif
|
Disable the export stuff on non-windows.
|
Disable the export stuff on non-windows.
|
C
|
lgpl-2.1
|
cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee
|
949ddf0d60e041c9a96a81ce68e9b25882b455b3
|
net/ldap/inc/LinkDef.h
|
net/ldap/inc/LinkDef.h
|
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TLDAPServer;
#pragma link C++ class TLDAPResult;
#pragma link C++ class TLDAPEntry;
#pragma link C++ class TLDAPAttribute;
#pragma link C++ global LDAP_PORT;
#pragma link C++ global LDAP_SCOPE_DEFAULT;
#pragma link C++ global LDAP_SCOPE_BASE;
#pragma link C++ global LDAP_SCOPE_ONELEVEL;
#pragma link C++ global LDAP_SCOPE_SUBTREE;
#pragma link C++ global LDAP_MOD_ADD;
#pragma link C++ global LDAP_MOD_DELETE;
#pragma link C++ global LDAP_MOD_REPLACE;
#pragma link C++ global LDAP_MOD_BVALUES;
#pragma link C++ global LDAP_SERVER_DOWN;
#endif
|
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TLDAPServer;
#pragma link C++ class TLDAPResult;
#pragma link C++ class TLDAPEntry;
#pragma link C++ class TLDAPAttribute;
// These constants are preprocessor statements
// in ldap.h and not variables
// #pragma link C++ global LDAP_PORT;
// #pragma link C++ global LDAP_SCOPE_DEFAULT;
// #pragma link C++ global LDAP_SCOPE_BASE;
// #pragma link C++ global LDAP_SCOPE_ONELEVEL;
// #pragma link C++ global LDAP_SCOPE_SUBTREE;
// #pragma link C++ global LDAP_MOD_ADD;
// #pragma link C++ global LDAP_MOD_DELETE;
// #pragma link C++ global LDAP_MOD_REPLACE;
// #pragma link C++ global LDAP_MOD_BVALUES;
// #pragma link C++ global LDAP_SERVER_DOWN;
#endif
|
Remove selection of preprocessor macros as globals in the linkdef
|
Remove selection of preprocessor macros as globals in the linkdef
|
C
|
lgpl-2.1
|
krafczyk/root,karies/root,sawenzel/root,pspe/root,CristinaCristescu/root,omazapa/root,vukasinmilosevic/root,CristinaCristescu/root,olifre/root,satyarth934/root,vukasinmilosevic/root,bbockelm/root,satyarth934/root,krafczyk/root,smarinac/root,karies/root,krafczyk/root,CristinaCristescu/root,agarciamontoro/root,agarciamontoro/root,Duraznos/root,georgtroska/root,zzxuanyuan/root,Duraznos/root,0x0all/ROOT,mattkretz/root,mattkretz/root,nilqed/root,gganis/root,beniz/root,abhinavmoudgil95/root,pspe/root,jrtomps/root,veprbl/root,evgeny-boger/root,gbitzes/root,vukasinmilosevic/root,mkret2/root,mhuwiler/rootauto,vukasinmilosevic/root,Y--/root,simonpf/root,buuck/root,mhuwiler/rootauto,krafczyk/root,bbockelm/root,omazapa/root,omazapa/root-old,gbitzes/root,sbinet/cxx-root,georgtroska/root,CristinaCristescu/root,perovic/root,davidlt/root,zzxuanyuan/root,smarinac/root,beniz/root,lgiommi/root,jrtomps/root,esakellari/root,omazapa/root,zzxuanyuan/root,sirinath/root,bbockelm/root,esakellari/my_root_for_test,evgeny-boger/root,bbockelm/root,arch1tect0r/root,abhinavmoudgil95/root,karies/root,satyarth934/root,agarciamontoro/root,gganis/root,satyarth934/root,evgeny-boger/root,thomaskeck/root,abhinavmoudgil95/root,root-mirror/root,perovic/root,thomaskeck/root,olifre/root,mkret2/root,jrtomps/root,sawenzel/root,zzxuanyuan/root,esakellari/my_root_for_test,Y--/root,jrtomps/root,georgtroska/root,krafczyk/root,gganis/root,davidlt/root,abhinavmoudgil95/root,krafczyk/root,gbitzes/root,gbitzes/root,sirinath/root,veprbl/root,root-mirror/root,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,agarciamontoro/root,gganis/root,zzxuanyuan/root,arch1tect0r/root,jrtomps/root,nilqed/root,CristinaCristescu/root,Y--/root,BerserkerTroll/root,lgiommi/root,perovic/root,georgtroska/root,satyarth934/root,mhuwiler/rootauto,vukasinmilosevic/root,evgeny-boger/root,esakellari/my_root_for_test,mattkretz/root,beniz/root,root-mirror/root,sawenzel/root,pspe/root,nilqed/root,BerserkerTroll/root,jrtomps/root,gganis/root,mattkretz/root,olifre/root,perovic/root,omazapa/root-old,bbockelm/root,nilqed/root,arch1tect0r/root,agarciamontoro/root,satyarth934/root,evgeny-boger/root,agarciamontoro/root,davidlt/root,root-mirror/root,olifre/root,arch1tect0r/root,mhuwiler/rootauto,omazapa/root-old,evgeny-boger/root,perovic/root,georgtroska/root,simonpf/root,veprbl/root,georgtroska/root,simonpf/root,satyarth934/root,0x0all/ROOT,veprbl/root,karies/root,zzxuanyuan/root,BerserkerTroll/root,arch1tect0r/root,CristinaCristescu/root,sbinet/cxx-root,BerserkerTroll/root,abhinavmoudgil95/root,buuck/root,buuck/root,mkret2/root,evgeny-boger/root,satyarth934/root,root-mirror/root,simonpf/root,pspe/root,smarinac/root,smarinac/root,bbockelm/root,smarinac/root,pspe/root,smarinac/root,sirinath/root,lgiommi/root,veprbl/root,mattkretz/root,CristinaCristescu/root,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,olifre/root,zzxuanyuan/root-compressor-dummy,jrtomps/root,nilqed/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,veprbl/root,mkret2/root,Y--/root,olifre/root,omazapa/root-old,BerserkerTroll/root,beniz/root,pspe/root,esakellari/my_root_for_test,omazapa/root,sirinath/root,vukasinmilosevic/root,buuck/root,root-mirror/root,davidlt/root,olifre/root,lgiommi/root,Duraznos/root,evgeny-boger/root,Y--/root,sawenzel/root,thomaskeck/root,veprbl/root,buuck/root,dfunke/root,Y--/root,omazapa/root,bbockelm/root,gbitzes/root,dfunke/root,sirinath/root,beniz/root,krafczyk/root,zzxuanyuan/root-compressor-dummy,gganis/root,arch1tect0r/root,sawenzel/root,sirinath/root,perovic/root,satyarth934/root,esakellari/root,esakellari/root,omazapa/root-old,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,beniz/root,beniz/root,zzxuanyuan/root,zzxuanyuan/root,olifre/root,mkret2/root,sawenzel/root,perovic/root,pspe/root,vukasinmilosevic/root,karies/root,0x0all/ROOT,jrtomps/root,buuck/root,abhinavmoudgil95/root,veprbl/root,CristinaCristescu/root,pspe/root,omazapa/root-old,veprbl/root,0x0all/ROOT,vukasinmilosevic/root,agarciamontoro/root,beniz/root,karies/root,davidlt/root,georgtroska/root,simonpf/root,davidlt/root,jrtomps/root,veprbl/root,sirinath/root,simonpf/root,zzxuanyuan/root-compressor-dummy,nilqed/root,simonpf/root,karies/root,CristinaCristescu/root,0x0all/ROOT,thomaskeck/root,smarinac/root,root-mirror/root,omazapa/root-old,buuck/root,thomaskeck/root,sawenzel/root,Duraznos/root,lgiommi/root,omazapa/root-old,omazapa/root-old,bbockelm/root,sirinath/root,sawenzel/root,simonpf/root,omazapa/root,gbitzes/root,dfunke/root,sbinet/cxx-root,Duraznos/root,zzxuanyuan/root,dfunke/root,perovic/root,simonpf/root,davidlt/root,omazapa/root,zzxuanyuan/root-compressor-dummy,BerserkerTroll/root,arch1tect0r/root,gganis/root,karies/root,smarinac/root,omazapa/root-old,arch1tect0r/root,BerserkerTroll/root,Y--/root,BerserkerTroll/root,sbinet/cxx-root,gganis/root,omazapa/root-old,lgiommi/root,lgiommi/root,Y--/root,gbitzes/root,bbockelm/root,mkret2/root,davidlt/root,karies/root,omazapa/root,BerserkerTroll/root,abhinavmoudgil95/root,sbinet/cxx-root,lgiommi/root,CristinaCristescu/root,georgtroska/root,vukasinmilosevic/root,bbockelm/root,gbitzes/root,georgtroska/root,Duraznos/root,lgiommi/root,buuck/root,dfunke/root,dfunke/root,mattkretz/root,sbinet/cxx-root,abhinavmoudgil95/root,arch1tect0r/root,thomaskeck/root,thomaskeck/root,Duraznos/root,evgeny-boger/root,veprbl/root,abhinavmoudgil95/root,sirinath/root,mhuwiler/rootauto,satyarth934/root,gbitzes/root,smarinac/root,Y--/root,nilqed/root,mkret2/root,omazapa/root,zzxuanyuan/root,beniz/root,mkret2/root,buuck/root,zzxuanyuan/root,gganis/root,esakellari/root,evgeny-boger/root,omazapa/root,thomaskeck/root,dfunke/root,mattkretz/root,BerserkerTroll/root,olifre/root,esakellari/root,karies/root,esakellari/root,nilqed/root,abhinavmoudgil95/root,mhuwiler/rootauto,pspe/root,dfunke/root,esakellari/root,esakellari/root,CristinaCristescu/root,olifre/root,nilqed/root,mkret2/root,sbinet/cxx-root,krafczyk/root,mattkretz/root,sawenzel/root,smarinac/root,davidlt/root,davidlt/root,root-mirror/root,bbockelm/root,nilqed/root,gbitzes/root,beniz/root,esakellari/my_root_for_test,esakellari/root,buuck/root,sawenzel/root,sbinet/cxx-root,thomaskeck/root,esakellari/my_root_for_test,lgiommi/root,lgiommi/root,sirinath/root,simonpf/root,agarciamontoro/root,agarciamontoro/root,sbinet/cxx-root,esakellari/my_root_for_test,jrtomps/root,0x0all/ROOT,evgeny-boger/root,Duraznos/root,georgtroska/root,thomaskeck/root,abhinavmoudgil95/root,gganis/root,Duraznos/root,Y--/root,perovic/root,mattkretz/root,pspe/root,Duraznos/root,mattkretz/root,jrtomps/root,mhuwiler/rootauto,krafczyk/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,Y--/root,BerserkerTroll/root,krafczyk/root,esakellari/my_root_for_test,mattkretz/root,sbinet/cxx-root,vukasinmilosevic/root,esakellari/my_root_for_test,beniz/root,esakellari/root,omazapa/root,agarciamontoro/root,davidlt/root,pspe/root,perovic/root,arch1tect0r/root,root-mirror/root,karies/root,georgtroska/root,gganis/root,olifre/root,root-mirror/root,zzxuanyuan/root-compressor-dummy,0x0all/ROOT,nilqed/root,krafczyk/root,mkret2/root,buuck/root,0x0all/ROOT,esakellari/my_root_for_test,dfunke/root,simonpf/root,sbinet/cxx-root,mhuwiler/rootauto,dfunke/root,perovic/root,dfunke/root,root-mirror/root,vukasinmilosevic/root,satyarth934/root,gbitzes/root,zzxuanyuan/root,mkret2/root,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,sirinath/root,esakellari/root,sawenzel/root,0x0all/ROOT
|
578cb132ff6498c08fe8ad7c354b59507dd48491
|
subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_util.c
|
subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt_util.c
|
/*
* Copyright (c) 2018-2021 mcumgr authors
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <string.h>
#include "img_mgmt/image.h"
#include "img_mgmt/img_mgmt.h"
int
img_mgmt_ver_str(const struct image_version *ver, char *dst)
{
int rc = 0;
int rc1 = 0;
rc = snprintf(dst, IMG_MGMT_VER_MAX_STR_LEN, "%hhu.%hhu.%hu",
ver->iv_major, ver->iv_minor, ver->iv_revision);
if (rc >= 0 && ver->iv_build_num != 0) {
rc1 = snprintf(&dst[rc], IMG_MGMT_VER_MAX_STR_LEN - rc, ".%u",
ver->iv_build_num);
}
if (rc1 >= 0 && rc >= 0) {
rc = rc + rc1;
} else {
/* If any failed then all failed */
rc = -1;
}
return rc;
}
|
/*
* Copyright (c) 2018-2021 mcumgr authors
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <string.h>
#include "img_mgmt/image.h"
#include "img_mgmt/img_mgmt.h"
int
img_mgmt_ver_str(const struct image_version *ver, char *dst)
{
int rc = 0;
int rc1 = 0;
rc = snprintf(dst, IMG_MGMT_VER_MAX_STR_LEN, "%hu.%hu.%hu",
(uint16_t)ver->iv_major, (uint16_t)ver->iv_minor,
ver->iv_revision);
if (rc >= 0 && ver->iv_build_num != 0) {
rc1 = snprintf(&dst[rc], IMG_MGMT_VER_MAX_STR_LEN - rc, ".%u",
ver->iv_build_num);
}
if (rc1 >= 0 && rc >= 0) {
rc = rc + rc1;
} else {
/* If any failed then all failed */
rc = -1;
}
return rc;
}
|
Make version string work with CONFIG_NEWLIB_LIBC
|
mgmt/mcumgr/lib: Make version string work with CONFIG_NEWLIB_LIBC
By default the newlib does not compile with %hhu processing,
to avoid turning on additional options for newlib compilation
this commit changes formatting string to use %hu instead.
The commit fixes problem with malformed version string being
returned, by smp_svr, when CONFIG_NEWLIB_LIBC=y is set together
with CONFIG_NEWLIB_LIBC_NANO=y.
Fixes #45261
Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>
|
C
|
apache-2.0
|
galak/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr
|
0c47b2bee26a859ef99a11a81feecee6aa8248f9
|
src/math.h
|
src/math.h
|
#ifndef G_EBKLRON9896QUFJSD3FNA40IITV3F
#define G_EBKLRON9896QUFJSD3FNA40IITV3F
#ifdef __cplusplus
extern "C" {
#endif
/*@self.public()*/
static const double CAL_PI = 3.141592653589793238462643383279502884197169399375;
#ifdef __cplusplus
}
#endif
#endif
|
#ifndef G_EBKLRON9896QUFJSD3FNA40IITV3F
#define G_EBKLRON9896QUFJSD3FNA40IITV3F
#ifdef __cplusplus
extern "C" {
#endif
/*@self.public()*/
#ifndef M_PI
#define M_PI 3.141592653589793238462643383279502884197169399375
#endif
#ifdef __cplusplus
}
#endif
#endif
|
Define M_PI instead of CAL_PI
|
Define M_PI instead of CAL_PI
|
C
|
mit
|
Rufflewind/calico,Rufflewind/calico,Rufflewind/calico
|
b70c1ec7f3a81a044b1e42c0f25b8d083810a177
|
c/boards/arduino_uno/riot_arduino_uno.c
|
c/boards/arduino_uno/riot_arduino_uno.c
|
#include "riot_arduino_uno.h"
#include "utils.h"
riot_arduino_uno_sinks* riot_arduino_uno_sinks_create() {
riot_arduino_uno_sinks *sinks = xmalloc(sizeof(riot_arduino_uno_sinks));
return sinks;
}
riot_arduino_uno_sources* riot_arduino_uno_sources_create() {
riot_arduino_uno_sources *sources = xmalloc(sizeof(riot_arduino_uno_sources));
return sources;
};
|
#include "riot_arduino_uno.h"
#include "utils.h"
riot_arduino_uno_sinks* riot_arduino_uno_sinks_create() {
riot_arduino_uno_sinks *sinks = xmalloc(sizeof(riot_arduino_uno_sinks));
return sinks;
}
riot_arduino_uno_sources* riot_arduino_uno_sources_create() {
riot_arduino_uno_sources *sources = xmalloc(sizeof(riot_arduino_uno_sources));
return sources;
};
int riot_arduino_uno_run(riot_arduino_uno_main main) {
if(main == NULL) {
return -1;
}
riot_arduino_uno_sources *sources = riot_arduino_uno_sources_create();
if(sources == NULL) {
return -2;
}
riot_arduino_uno_sinks *sinks = main(sources);
if(sinks == NULL) {
return -3;
}
while(true) {
// TODO: Read all inputs and map to sources
// TODO: If all sinks/outputs have completed, break
}
return 0;
}
|
Add basic riot_run function definition
|
Add basic riot_run function definition
|
C
|
mit
|
artfuldev/RIoT
|
028eec9dc1352855a8d0f1e6077decfdc653b208
|
src/SequenceLocation.h
|
src/SequenceLocation.h
|
#ifndef __SEQUENCELOCATION_H__
#define __SEQUENCELOCATION_H__
#include "Types.h"
#include "IRefProvider.h"
//#pragma pack(push)
//#pragma pack(2)
struct SequenceLocation
{
uint m_Location;
short m_RefId;
bool used() {
return m_Location != 0;
}
bool operator< (SequenceLocation const & rhs) const
{
if (m_Location < rhs.m_Location)
return true;
else if (m_Location == rhs.m_Location)
return (m_RefId < rhs.m_RefId);
return false;
}
SequenceLocation() {
}
SequenceLocation(uint const loc, short const refid) {
m_Location = loc;
m_RefId = refid;
}
SequenceLocation(Location const & other) {
m_Location = other.m_Location;
}
};
//#pragma pack(pop)
#endif
|
#ifndef __SEQUENCELOCATION_H__
#define __SEQUENCELOCATION_H__
#include "Types.h"
#include "IRefProvider.h"
//#pragma pack(push)
//#pragma pack(2)
struct SequenceLocation
{
uint m_Location;
int m_RefId;
bool used() {
return m_Location != 0;
}
bool operator< (SequenceLocation const & rhs) const
{
if (m_Location < rhs.m_Location)
return true;
else if (m_Location == rhs.m_Location)
return (m_RefId < rhs.m_RefId);
return false;
}
SequenceLocation() {
}
SequenceLocation(uint const loc, short const refid) {
m_Location = loc;
m_RefId = refid;
}
SequenceLocation(Location const & other) {
m_Location = other.m_Location;
}
};
//#pragma pack(pop)
#endif
|
Fix for references with more than 32k sequences.
|
Fix for references with more than 32k sequences.
|
C
|
mit
|
philres/ngmlr,philres/ngmlr,philres/ngmlr,philres/ngmlr
|
b5703fa20995fc5dd01f9026f6259b2ceeadcdb1
|
mini7digit.c
|
mini7digit.c
|
/*
1
4 5
2
6 7
3
*/
#include <stdio.h>
void line(char** a, int u, int v) {
char *c = a[1];
while(*c) {
int y = ("|O6VYNnX~^")[*c++-48]+1;
printf("%c%c%c%c",
y & u ? '|' : 32,
y & v ? '_' : 32,
y & u*2 ? '|' : 32,
c[0] ? ' ' : '\n');
}
}
int main(int y, char **a) {
line(a, 0, 1);
line(a, 8, 2);
line(a, 32, 4);
return 0;
}
|
/*
1
4 5
2
6 7
3
*/
#include <stdio.h>
#define L(u,v) \
for(char *c = a[1];*c;) { \
printf("%c%c%c%c", \
y & u ? '|' : 32, \
y & v ? '_' : 32, \
(y = ("|O6VYNnX~^")[*c++-48]+1) & u*2 ? '|' : 32, \
c[1] ? ' ' : '\n'); \
};
int main(int y, char **a) {
L(0, 1);
L(8, 2);
L(32, 4);
return 0;
}
|
Use a single call only (warning x86 only) Move the y assignment to another point in code
|
Use a single call only (warning x86 only)
Move the y assignment to another point in code
|
C
|
mit
|
McZonk/7segements,McZonk/7segements
|
34bfe82ca656fcad46859c533d4f7b17cb4226ed
|
frame.h
|
frame.h
|
//
// Created by admarkov on 22.04.17.
//
#ifndef FUNC_COMPOSER_FRAME_H
#define FUNC_COMPOSER_FRAME_H
#include <string>
typedef unsigned int index;
void crash(char info[]="") {
puts("Fatal error.");
exit(0);
}
#endif //FUNC_COMPOSER_FRAME_H
|
//
// Created by admarkov on 22.04.17.
//
#ifndef FUNC_COMPOSER_FRAME_H
#define FUNC_COMPOSER_FRAME_H
#include <string>
using namespace std;
typedef unsigned int index;
void crash(string info="No information.") {
puts("Fatal error: "+info);
exit(0);
}
#endif //FUNC_COMPOSER_FRAME_H
|
Add error output for crash()
|
Add error output for crash()
|
C
|
mit
|
admarkov/func_composer,admarkov/func_composer
|
e6db6f62fd25e728c2efe15928cbaab095b71457
|
include/core/SkMilestone.h
|
include/core/SkMilestone.h
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 109
#endif
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 110
#endif
|
Update Skia milestone to 110
|
Update Skia milestone to 110
Change-Id: I99decad5e458e0353dfba0737c6d527ff550ae2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/603820
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Auto-Submit: Rakshit Sharma <e91e6cdce3825eaad0fa11b55195605cfed87fab@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
|
C
|
bsd-3-clause
|
google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia
|
98bfd42cf7a9dcd974071926232d0082fb80e1dc
|
include/CudaLE.h
|
include/CudaLE.h
|
/////////////////////////////////////////////////////////////////////////////////////////
///
/// \file CudaLE.h
///
/// __Description__: Main include file for the CudaLE lib
///
/// __Version__: 1.0\n
/// __Author__: Alex Chen, fizban007@gmail.com\n
/// __Organization__: Columbia University
///
/////////////////////////////////////////////////////////////////////////////////////////
#ifndef _CUDALE_H_
#define _CUDALE_H_
#include "cudaControl.h"
#include "Operators.h"
#include "Variable.h"
#include "Functions.h"
#include "Derivative.h"
#ifndef DEFINE_FUNCTOR
#define DEFINE_FUNCTOR(NAME, FUNCTOR) \
private: \
typedef typeof(FUNCTOR) NAME ## _type; \
NAME ## _type defaultValue_ ## NAME () { \
return FUNCTOR; \
} \
public: \
NAME ## _type NAME
#endif
#endif // ----- #ifndef _CUDALE_H_ -----
|
/////////////////////////////////////////////////////////////////////////////////////////
///
/// \file CudaLE.h
///
/// __Description__: Main include file for the CudaLE lib
///
/// __Version__: 1.0\n
/// __Author__: Alex Chen, fizban007@gmail.com\n
/// __Organization__: Columbia University
///
/////////////////////////////////////////////////////////////////////////////////////////
#ifndef _CUDALE_H_
#define _CUDALE_H_
#include "cudaControl.h"
#include "Operators.h"
#include "Variable.h"
#include "Functions.h"
#include "Derivative.h"
#ifndef DEFINE_FUNCTOR
#define DEFINE_FUNCTOR(NAME, FUNCTOR) \
private: \
typedef __typeof__(FUNCTOR) NAME ## _type; \
NAME ## _type defaultValue_ ## NAME () { \
return FUNCTOR; \
} \
public: \
NAME ## _type NAME
#endif
#endif // ----- #ifndef _CUDALE_H_ -----
|
Make the macro play nice with clang
|
Make the macro play nice with clang
|
C
|
mit
|
fizban007/CudaLE,fizban007/CudaLE
|
72b5907f318972685252659ca191d63fbe2f352b
|
lib/enable_execute_stack.c
|
lib/enable_execute_stack.c
|
//===-- enable_execute_stack.c - Implement __enable_execute_stack ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <stdint.h>
#include <sys/mman.h>
//
// The compiler generates calls to __enable_execute_stack() when creating
// trampoline functions on the stack for use with nested functions.
// It is expected to mark the page(s) containing the address
// and the next 48 bytes as executable. Since the stack is normally rw-
// that means changing the protection on those page(s) to rwx.
//
void __enable_execute_stack(void* addr)
{
#if __APPLE__
// On Darwin, pagesize is always 4096 bytes
const uintptr_t pageSize = 4096;
#else
abort();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;
unsigned char* startPage = (unsigned char*)(p & pageAlignMask);
unsigned char* endPage = (unsigned char*)((p+48+pageSize) & pageAlignMask);
mprotect(startPage, endPage-startPage, PROT_READ | PROT_WRITE | PROT_EXEC);
}
|
//===-- enable_execute_stack.c - Implement __enable_execute_stack ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <stdint.h>
#include <sys/mman.h>
//
// The compiler generates calls to __enable_execute_stack() when creating
// trampoline functions on the stack for use with nested functions.
// It is expected to mark the page(s) containing the address
// and the next 48 bytes as executable. Since the stack is normally rw-
// that means changing the protection on those page(s) to rwx.
//
void __enable_execute_stack(void* addr)
{
#if __APPLE__
// On Darwin, pagesize is always 4096 bytes
const uintptr_t pageSize = 4096;
#else
// FIXME: We should have a configure check for this.
const uintptr_t pagesize = getpagesize();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;
unsigned char* startPage = (unsigned char*)(p & pageAlignMask);
unsigned char* endPage = (unsigned char*)((p+48+pageSize) & pageAlignMask);
mprotect(startPage, endPage-startPage, PROT_READ | PROT_WRITE | PROT_EXEC);
}
|
Use getpagesize() on non-Darwin platforms. - Presumably we will eventually need configure magic for this stuff.
|
Use getpagesize() on non-Darwin platforms.
- Presumably we will eventually need configure magic for this stuff.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@74586 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
|
e02046531c3e291aeb87a92918dda0f21bad9700
|
libs/compiler/tables.h
|
libs/compiler/tables.h
|
/*
* Copyright 2020 Andrey Terekhov, Maxim Menshikov
*
* 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.
*/
#pragma once
#include "context.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Save up a string array to reprtab
*
* @param context RuC context
* @param str Target string
*
* @return FIXME
*/
int toreprtab(compiler_context *context, char str[]);
/**
* Mode table initialization
*
* @param context RuC context
*/
void init_modetab(compiler_context *context);
#ifdef __cplusplus
} /* extern "C" */
#endif
|
/*
* Copyright 2020 Andrey Terekhov, Maxim Menshikov
*
* 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.
*/
#pragma once
#include "context.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Mode table initialization
*
* @param context RuC context
*/
void init_modetab(compiler_context *context);
#ifdef __cplusplus
} /* extern "C" */
#endif
|
Remove useless interface of toreprtab
|
Remove useless interface of toreprtab
|
C
|
apache-2.0
|
andrey-terekhov/RuC,andrey-terekhov/RuC,andrey-terekhov/RuC
|
176b9678afe004e1847e16c600f85120b3378dfd
|
fast-xattr-test/fast-xattr-test/main.c
|
fast-xattr-test/fast-xattr-test/main.c
|
//
// main.c
// fast-xattr-test
//
// Created by David Schlachter on 2015-07-09.
// Copyright (c) 2015 David Schlachter. All rights reserved.
//
#include <stdio.h>
#include <sys/xattr.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
int main(int argc, const char * argv[]) {
//char a[80];
//strcpy(a, argv[1]);
const char *path = argv[1];
//char b[32];
//strcpy(b, argv[2]);
const char *name = argv[2];
int value[1];
long rval = 0;
rval = getxattr(path, name, &value, sizeof(value), 0, 0);
int c = errno;
if (rval != -1) {
return 0;
} else {
return 1;
};
}
|
//
// main.c
// fast-xattr-test
//
// Created by David Schlachter on 2015-07-09.
// Copyright (c) 2015 David Schlachter. All rights reserved.
//
#include <stdio.h>
#include <sys/xattr.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
int main(int argc, const char * argv[]) {
//char a[80];
//strcpy(a, argv[2]);
const char *path = argv[1];
//char b[32];
//strcpy(b, argv[1]);
const char *name = argv[2];
int value[1];
long rval = 0;
rval = getxattr(path, name, &value, sizeof(value), 0, 0);
int c = errno;
if (rval != -1) {
return 0;
} else {
return 1;
};
}
|
Set first argument to name, second to path
|
Set first argument to name, second to path
|
C
|
mit
|
davidschlachter/fast-xattr-test
|
d0b6352558dfc24ff3d1e5a65d3811b065f9ca93
|
CodeSamples/UserTypeToString.h
|
CodeSamples/UserTypeToString.h
|
#pragma once
#include <iostream>
#include <string>
class UserTypeToString
{
public:
UserTypeToString(std::string name, int age, double netWorth);
~UserTypeToString();
friend std::ostream& operator<<(std::ostream& os, const UserTypeToString& obj);
std::string name;
int age;
double netWorth;
};
std::ostream& operator<<(std::ostream& os, const UserTypeToString& obj);
//{
// // write obj to stream
// os << "name - " << obj.name.c_str() << "age - " << obj.age << "netWorth - " << obj.netWorth << std::endl;
// return os;
//}
|
#pragma once
#include <iostream>
#include <string>
class UserTypeToString
{
public:
UserTypeToString(std::string name, int age, double netWorth);
~UserTypeToString();
friend std::ostream& operator<<(std::ostream& os, const UserTypeToString& obj);
std::string name;
int age;
double netWorth;
};
// Must be inline or defined in the .cpp and can't be a member of the class
std::ostream& operator<<(std::ostream& os, const UserTypeToString& obj);
|
Remove unneccesary code and add a comment to the declaration of operator<<
|
Remove unneccesary code and add a comment to the declaration of operator<<
|
C
|
mit
|
Shawn1874/CodeSamples,Shawn1874/CodeSamples,Shawn1874/CodeSamples,Shawn1874/CodeSamples
|
3d1939e899fdbb7d71998f33221e687b61c291af
|
include/HubFramework/HUBHeaderMacros.h
|
include/HubFramework/HUBHeaderMacros.h
|
#import <Foundation/Foundation.h>
/// Macro that marks an initializer as designated, and also makes the default Foundation initializers unavailable
#define HUB_DESIGNATED_INITIALIZER NS_DESIGNATED_INITIALIZER; \
/** Unavailable. Use the designated initializer instead */ \
+ (instancetype)new NS_UNAVAILABLE; \
/** Unavailable. Use the designated initializer instead */ \
- (instancetype)init NS_UNAVAILABLE; \
/** Unavailable. Use the designated initializer instead */ \
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
|
#import <Foundation/Foundation.h>
/// Macro that marks an initializer as designated, and also makes the default Foundation initializers unavailable
#define HUB_DESIGNATED_INITIALIZER NS_DESIGNATED_INITIALIZER; \
/** Unavailable. Use the designated initializer instead */ \
+ (instancetype)new NS_UNAVAILABLE; \
/** Unavailable. Use the designated initializer instead */ \
- (instancetype)init NS_UNAVAILABLE; \
/** Unavailable. Use the designated initializer instead */ \
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
/// This macro was introduced in Xcode 8, so adding this here for now (if not defined) to support Xcode 7 as well
#ifndef NS_EXTENSIBLE_STRING_ENUM
#define NS_EXTENSIBLE_STRING_ENUM
#endif
|
Define NS_EXTENSIBLE_STRING_ENUM if not defined
|
Define NS_EXTENSIBLE_STRING_ENUM if not defined
This enables us to support building with Xcode 7.
|
C
|
apache-2.0
|
spotify/HubFramework,spotify/HubFramework,spotify/HubFramework,spotify/HubFramework
|
73649ffabcf481cc0e2f668062526931d5040901
|
ldso/include/unsecvars.h
|
ldso/include/unsecvars.h
|
/*
* Environment variable to be removed for SUID programs. The names are all
* stuffed in a single string which means they have to be terminated with a
* '\0' explicitly.
*/
#define UNSECURE_ENVVARS \
"LD_PRELOAD\0" \
"LD_LIBRARY_PATH\0" \
"LD_DEBUG\0" \
"LD_DEBUG_OUTPUT\0" \
"LD_TRACE_LOADED_OBJECTS\0" \
"TMPDIR\0"
/*
* LD_TRACE_LOADED_OBJECTS is not in glibc-2.3.5's unsecvars.h
* though used by ldd
*
* These environment variables are defined by glibc but ignored in
* uClibc, but may very well have an equivalent in uClibc.
*
* LD_ORIGIN_PATH, LD_PROFILE, LD_USE_LOAD_BIAS, LD_DYNAMIC_WEAK, LD_SHOW_AUXV,
* GCONV_PATH, GETCONF_DIR, HOSTALIASES, LOCALDOMAIN, LOCPATH, MALLOC_TRACE,
* NLSPATH, RESOLV_HOST_CONF, RES_OPTIONS, TMPDIR, TZDIR
*/
|
/*
* Environment variable to be removed for SUID programs. The names are all
* stuffed in a single string which means they have to be terminated with a
* '\0' explicitly.
*/
#define UNSECURE_ENVVARS \
"LD_PRELOAD\0" \
"LD_LIBRARY_PATH\0" \
"LD_DEBUG\0" \
"LD_DEBUG_OUTPUT\0" \
"LD_TRACE_LOADED_OBJECTS\0" \
"TMPDIR\0"
/*
* LD_TRACE_LOADED_OBJECTS is not in glibc-2.3.5's unsecvars.h
* though used by ldd
*
* These environment variables are defined by glibc but ignored in
* uClibc, but may very well have an equivalent in uClibc.
*
* LD_ORIGIN_PATH, LD_PROFILE, LD_USE_LOAD_BIAS, LD_DYNAMIC_WEAK, LD_SHOW_AUXV,
* GCONV_PATH, GETCONF_DIR, HOSTALIASES, LOCALDOMAIN, LOCPATH, MALLOC_TRACE,
* NLSPATH, RESOLV_HOST_CONF, RES_OPTIONS, TZDIR
*/
|
Remove TMPDIR from glibc's commented list
|
Remove TMPDIR from glibc's commented list
|
C
|
lgpl-2.1
|
wbx-github/uclibc-ng,kraj/uclibc-ng,skristiansson/uClibc-or1k,klee/klee-uclibc,ddcc/klee-uclibc-0.9.33.2,groundwater/uClibc,OpenInkpot-archive/iplinux-uclibc,ndmsystems/uClibc,OpenInkpot-archive/iplinux-uclibc,m-labs/uclibc-lm32,hwoarang/uClibc,ChickenRunjyd/klee-uclibc,majek/uclibc-vx32,foss-for-synopsys-dwc-arc-processors/uClibc,klee/klee-uclibc,ffainelli/uClibc,ffainelli/uClibc,hjl-tools/uClibc,skristiansson/uClibc-or1k,hwoarang/uClibc,m-labs/uclibc-lm32,foss-xtensa/uClibc,foss-xtensa/uClibc,brgl/uclibc-ng,ysat0/uClibc,kraj/uClibc,hwoarang/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,majek/uclibc-vx32,kraj/uclibc-ng,foss-xtensa/uClibc,wbx-github/uclibc-ng,atgreen/uClibc-moxie,mephi42/uClibc,ChickenRunjyd/klee-uclibc,waweber/uclibc-clang,ddcc/klee-uclibc-0.9.33.2,ChickenRunjyd/klee-uclibc,hwoarang/uClibc,ysat0/uClibc,ndmsystems/uClibc,waweber/uclibc-clang,klee/klee-uclibc,waweber/uclibc-clang,atgreen/uClibc-moxie,ffainelli/uClibc,OpenInkpot-archive/iplinux-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,groundwater/uClibc,ysat0/uClibc,gittup/uClibc,m-labs/uclibc-lm32,ysat0/uClibc,mephi42/uClibc,gittup/uClibc,brgl/uclibc-ng,wbx-github/uclibc-ng,ffainelli/uClibc,foss-xtensa/uClibc,groundwater/uClibc,waweber/uclibc-clang,groundwater/uClibc,gittup/uClibc,hjl-tools/uClibc,kraj/uclibc-ng,kraj/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,mephi42/uClibc,skristiansson/uClibc-or1k,atgreen/uClibc-moxie,groundwater/uClibc,majek/uclibc-vx32,OpenInkpot-archive/iplinux-uclibc,klee/klee-uclibc,gittup/uClibc,skristiansson/uClibc-or1k,czankel/xtensa-uclibc,ddcc/klee-uclibc-0.9.33.2,majek/uclibc-vx32,m-labs/uclibc-lm32,mephi42/uClibc,ChickenRunjyd/klee-uclibc,czankel/xtensa-uclibc,ndmsystems/uClibc,hjl-tools/uClibc,hjl-tools/uClibc,ddcc/klee-uclibc-0.9.33.2,czankel/xtensa-uclibc,kraj/uClibc,hjl-tools/uClibc,ffainelli/uClibc,brgl/uclibc-ng,atgreen/uClibc-moxie,ndmsystems/uClibc,kraj/uClibc,kraj/uClibc,czankel/xtensa-uclibc,brgl/uclibc-ng
|
40d0f7fefc15d4830f769f3b3115a622e9254452
|
source/logging.c
|
source/logging.c
|
#include "logging.h"
void error_log(const char *format, ...){
FILE *flog;
//If the log file is over 3.5 megabytes, empty it and start again
struct stat st;
if (!stat(log_filename, &st) && st.st_size >= 36700160) //1048576 per megabyte
flog = fopen(log_filename, "w+");
else flog = fopen(log_filename, "a+");
//Write to the log file
if (!flog) fprintf(stderr, "Error! Could not open log file for writing!\n");
else{
//Get time of error
time_t raw;
struct tm *t;
time(&raw);
t = localtime(&raw);
fprintf(flog, "[%d/%d %d:%d:%d] ", t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
//Write error
va_list args;
va_start(args, format);
vfprintf(flog, format, args);
va_end(args);
fclose(flog);
}
}
|
#include "logging.h"
void error_log(const char *format, ...){
FILE *flog;
//If the log file is over 3.5 megabytes, empty it and start again
struct stat st;
if (!stat(log_filename, &st) && st.st_size >= 3670016) //1048576 per megabyte
flog = fopen(log_filename, "w+");
else flog = fopen(log_filename, "a+");
//Write to the log file
if (!flog) fprintf(stderr, "Error! Could not open log file for writing!\n");
else{
//Get time of error
time_t raw;
struct tm *t;
time(&raw);
t = localtime(&raw);
fprintf(flog, "[%d/%d %d:%d:%d] ", t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
//Write error
va_list args;
va_start(args, format);
vfprintf(flog, format, args);
va_end(args);
fclose(flog);
}
}
|
Set log limit back to 3.5 megabytes
|
Set log limit back to 3.5 megabytes
|
C
|
mit
|
Azmisov/NIMBYDaemon,Azmisov/NIMBYDaemon,Azmisov/NIMBYDaemon
|
efa2803eb4c8b930f0b57c2b7d46d222641c3c4a
|
plugins/wacom-raw/fu-wacom-emr-device.h
|
plugins/wacom-raw/fu-wacom-emr-device.h
|
/*
* Copyright (C) 2018-2019 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fu-wacom-device.h"
#define FU_TYPE_WACOM_EMR_DEVICE (fu_wacom_emr_device_get_type ())
G_DECLARE_FINAL_TYPE (FuWacomEmrDevice, fu_wacom_emr_device, FU, WACOM_EMR_DEVICE, FuUdevDevice)
FuWacomEmrDevice *fu_wacom_emr_device_new (FuUdevDevice *device);
|
/*
* Copyright (C) 2018-2019 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fu-wacom-device.h"
#define FU_TYPE_WACOM_EMR_DEVICE (fu_wacom_emr_device_get_type ())
G_DECLARE_FINAL_TYPE (FuWacomEmrDevice, fu_wacom_emr_device, FU, WACOM_EMR_DEVICE, FuWacomDevice)
FuWacomEmrDevice *fu_wacom_emr_device_new (FuUdevDevice *device);
|
Fix a regression for EMR devices
|
wacom-emr: Fix a regression for EMR devices
Actually trying to instantiate the object leads to:
Specified class size for type 'FuWacomEmrDevice' is smaller than the
parent type's 'FuWacomDevice' class size.
Fixes https://github.com/fwupd/fwupd/issues/1456
|
C
|
lgpl-2.1
|
fwupd/fwupd,fwupd/fwupd,hughsie/fwupd,hughsie/fwupd,fwupd/fwupd,fwupd/fwupd,hughsie/fwupd,hughsie/fwupd
|
7bc4e913236c28418cd445f5414852257073e3d4
|
hello.c
|
hello.c
|
#include <stdio.h>
int main(void)
{
printf("hello, world\n")
return 0;
}
|
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}
|
Fix the previous, remarkable error.
|
Fix the previous, remarkable error.
|
C
|
apache-2.0
|
jsh/services_test
|
4fe3e0c8113f407bcb99f3bfe9c73f6532ecef6d
|
libvirt-gconfig/libvirt-gconfig-compat.h
|
libvirt-gconfig/libvirt-gconfig-compat.h
|
/*
* libvirt-gconfig-compat.h: libvirt configuration
*
* Copyright (C) 2012 Red Hat, Inc.
*
* 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
*
* Author: Christophe Fergeau <cfergeau@redhat.com>
*/
#ifndef __LIBVIRT_GCONFIG_COMPAT_H__
#define __LIBVIRT_GCONFIG_COMPAT_H__
#include <glib-object.h>
#if GLIB_CHECK_VERSION(2, 34, 0)
#define g_type_init()
#endif
#endif /* __LIBVIRT_GCONFIG_COMPAT_H__ */
|
/*
* libvirt-gconfig-compat.h: libvirt configuration
*
* Copyright (C) 2012 Red Hat, Inc.
*
* 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
*
* Author: Christophe Fergeau <cfergeau@redhat.com>
*/
#ifndef __LIBVIRT_GCONFIG_COMPAT_H__
#define __LIBVIRT_GCONFIG_COMPAT_H__
#include <glib-object.h>
#if GLIB_CHECK_VERSION(2, 35, 0)
#define g_type_init()
#endif
#endif /* __LIBVIRT_GCONFIG_COMPAT_H__ */
|
Fix glib version check for g_type_init
|
Fix glib version check for g_type_init
g_type_init has been deprecated in glib 2.35, not 2.34. With versions
older than 2.35, we have to call it or we'll get a runtime failure.
|
C
|
lgpl-2.1
|
libvirt/libvirt-glib,libvirt/libvirt-glib,libvirt/libvirt-glib
|
b30b294d1c079e18068f8ddef7acfa2713cc427f
|
hat-trie/src/common.h
|
hat-trie/src/common.h
|
/*
* This file is part of hat-trie.
*
* Copyright (c) 2011 by Daniel C. Jones <dcjones@cs.washington.edu>
*
*
* Common typedefs, etc.
*
*/
#ifndef HATTRIE_COMMON_H
#define HATTRIE_COMMON_H
typedef unsigned long value_t;
#endif
|
/*
* This file is part of hat-trie.
*
* Copyright (c) 2011 by Daniel C. Jones <dcjones@cs.washington.edu>
*
*
* Common typedefs, etc.
*
*/
#ifndef HATTRIE_COMMON_H
#define HATTRIE_COMMON_H
#include "pstdint.h"
typedef uintptr_t value_t;
#endif
|
Update hat-trie C library. Fix GH-11.
|
Update hat-trie C library. Fix GH-11.
|
C
|
mit
|
kmike/hat-trie,kmike/hat-trie,kmike/hat-trie,kmike/hat-trie
|
1310c9b735555ded81f2cf088d047fe8e62db294
|
test.c
|
test.c
|
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <sys/time.h>
int main(int argc, char ** argv){
printf("Test %d\n", argc);
int i;
for(i = 0; i < argc; i++){
printf("%d: %s\n", i, argv[i]);
}
struct timeval tv;
if(gettimeofday(&tv, NULL) == 0){
printf("Gettimeofday %d %d\n", tv.tv_sec, tv.tv_usec);
void* test = malloc(1024*1024);
if(test > 0){
printf("Malloc %x\n", test);
free(test);
printf("Free\n");
DIR * dir = opendir("file:///");
if (dir != NULL) {
struct dirent * ent;
while ((ent = readdir(dir)) != NULL) {
printf("%s\n", ent->d_name);
}
closedir(dir);
pid_t pid = fork();
if(pid == 0){
printf("Fork Parent\n");
}else if(pid > 0){
printf("Fork Child %d\n", pid);
} else {
printf("Fork Failed\n");
}
}else{
printf("Opendir Failed\n");
}
} else {
printf("Malloc Failed\n");
}
} else {
printf("Gettimeofday Failed\n");
}
return 0;
}
|
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <sys/time.h>
int main(int argc, char ** argv){
printf("Test %d\n", argc);
int i;
for(i = 0; i < argc; i++){
printf("%d: %s\n", i, argv[i]);
}
struct timespec tp;
if(clock_gettime(CLOCK_REALTIME, &tp) == 0){
printf("clock_gettime %d %d\n", tp.tv_sec, tp.tv_nsec);
void* test = malloc(1024*1024);
if(test > 0){
printf("Malloc %x\n", test);
free(test);
printf("Free\n");
DIR * dir = opendir("file:///");
if (dir != NULL) {
struct dirent * ent;
while ((ent = readdir(dir)) != NULL) {
printf("%s\n", ent->d_name);
}
closedir(dir);
pid_t pid = fork();
if(pid > 0){
printf("Fork Parent %d = %d\n", getpid(), pid);
}else if(pid == 0){
printf("Fork Child %d = %d\n", getpid(), pid);
} else {
printf("Fork Failed %d = %d\n", getpid(), pid);
}
}else{
printf("Opendir Failed\n");
}
} else {
printf("Malloc Failed\n");
}
} else {
printf("clock_gettime Failed\n");
}
return 0;
}
|
Implement PID, fix forking in C
|
Implement PID, fix forking in C
|
C
|
mit
|
redox-os/libc,redox-os/libc,redox-os/libc
|
7f2afc7a1926bf85cf3b990ebe4ed1fc70968251
|
src/quickavro.h
|
src/quickavro.h
|
/*
* Copyright 2016 Chris Marshall
*
* 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 __QUICKAVRO_H
#define __QUICKAVRO_H
#ifdef __cplusplus
extern "C" {
#endif
// Used when reading 'zig-zag' encoded values
#define MAX_VARINT_SIZE 10
// Initial write buffer
#define INITIAL_BUFFER_SIZE 1024
#ifdef __cplusplus
}
#endif
#endif
|
/*
* Copyright 2016 Chris Marshall
*
* 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 __QUICKAVRO_H
#define __QUICKAVRO_H
#ifdef __cplusplus
extern "C" {
#endif
// Used when reading 'zig-zag' encoded values
#define MAX_VARINT_SIZE 10
// Initial write buffer
#define INITIAL_BUFFER_SIZE 1024 * 8
#ifdef __cplusplus
}
#endif
#endif
|
Increase initial buffer to 8192 bytes
|
Increase initial buffer to 8192 bytes
|
C
|
apache-2.0
|
ChrisRx/quickavro,ChrisRx/quickavro
|
3278ef5a293184162b68aad23ee89e1b713c564c
|
util.h
|
util.h
|
/*
KindlePDFViewer: buffer for blitting muPDF data to framebuffer (blitbuffer)
Copyright (C) 2011 Hans-Werner Hilse <hilse@web.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _UTIL_H
#define _UTIL_H
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
int luaopen_util(lua_State *L);
#endif
|
/*
KindlePDFViewer: miscellaneous utility functions for Lua
Copyright (C) 2011 Hans-Werner Hilse <hilse@web.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _UTIL_H
#define _UTIL_H
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
int luaopen_util(lua_State *L);
#endif
|
Correct the comment (the existing text was referring to a different file).
|
Correct the comment (the existing text was referring to a different file).
|
C
|
agpl-3.0
|
apletnev/koreader-base,frankyifei/koreader-base,lgeek/koreader,houqp/koreader-base,mihailim/koreader,Hzj-jie/koreader-base,apletnev/koreader-base,koreader/koreader-base,robert00s/koreader,frankyifei/koreader-base,ashhher3/koreader,frankyifei/koreader-base,koreader/koreader-base,chrox/koreader,chihyang/koreader,Frenzie/koreader-base,houqp/koreader,pazos/koreader,houqp/koreader-base,apletnev/koreader,apletnev/koreader-base,koreader/koreader,frankyifei/koreader-base,frankyifei/koreader,NiLuJe/koreader-base,Markismus/koreader,poire-z/koreader,koreader/koreader-base,apletnev/koreader-base,NiLuJe/koreader,noname007/koreader,Hzj-jie/koreader,Hzj-jie/koreader-base,houqp/koreader-base,koreader/koreader-base,houqp/koreader-base,NiLuJe/koreader,Frenzie/koreader-base,Hzj-jie/koreader-base,Frenzie/koreader-base,Frenzie/koreader,NiLuJe/koreader-base,poire-z/koreader,NiLuJe/koreader-base,NickSavage/koreader,ashang/koreader,Frenzie/koreader,koreader/koreader,NiLuJe/koreader-base,Hzj-jie/koreader-base,Frenzie/koreader-base,mwoz123/koreader
|
69e015dd8893abecc2f17f86544c7b82e86416cb
|
include/stud/string.h
|
include/stud/string.h
|
#ifndef STUD_String_H
#define STUD_String_H
#include <initializer_list>
#include <string>
namespace stud {
class string : public std::string {
public:
string() = default;
string(const string& rhs) = default;
string(string&& rhs) = default;
string& operator=(const string& rhs) = default;
string& operator=(string&& rhs) = default;
explicit string(const char* raw_string) : std::string(raw_string) {}
explicit string(const char* raw_string, size_t length) : std::string(raw_string, length) {}
explicit string(size_t to_fill, char character) : std::string(to_fill, character) {}
explicit string(const std::string& std_string) : std::string(std_string) {}
explicit string(const std::string& std_string, size_t position,
size_t length = std::string::npos)
: std::string(std_string, position, length) {}
explicit string(std::initializer_list<char> il) : std::string(il) {}
template <class InputIterator>
explicit string(InputIterator first, InputIterator last)
: std::string(first, last) {}
};
} // namespace stud
#endif // STUD_String_H
|
#ifndef STUD_String_H
#define STUD_String_H
#include <cstring>
#include <initializer_list>
#include <string>
namespace stud {
class string : public std::string {
public:
string() = default;
string(const string& rhs) = default;
string(string&& rhs) = default;
string& operator=(const string& rhs) = default;
string& operator=(string&& rhs) = default;
explicit string(const char* raw_string) : std::string(raw_string) {}
explicit string(const char* raw_string, size_t length) : std::string(raw_string, length) {}
explicit string(size_t to_fill, char character) : std::string(to_fill, character) {}
explicit string(const std::string& std_string) : std::string(std_string) {}
explicit string(const std::string& std_string, size_t position,
size_t length = std::string::npos)
: std::string(std_string, position, length) {}
explicit string(std::initializer_list<char> il) : std::string(il) {}
template <class InputIterator>
explicit string(InputIterator first, InputIterator last)
: std::string(first, last) {}
};
} // namespace stud
#endif // STUD_String_H
|
Add explicit header for size_t
|
Add explicit header for size_t
|
C
|
mit
|
whoshuu/stud
|
7c76027db0b7a22bd1addfb3055c435b425fa16b
|
test/CodeGen/regparm.c
|
test/CodeGen/regparm.c
|
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
#define FASTCALL __attribute__((regparm(2)))
typedef struct {
int aaa;
double bbbb;
int ccc[200];
} foo;
typedef void (*FType)(int, int) __attribute ((regparm (3), stdcall));
FType bar;
static void FASTCALL
reduced(char b, double c, foo* d, double e, int f);
int
main(void) {
// CHECK: call void @reduced(i8 signext inreg 0, {{.*}} %struct.anon* inreg null
reduced(0, 0.0, 0, 0.0, 0);
// CHECK: call x86_stdcallcc void %tmp(i32 inreg 1, i32 inreg 2)
bar(1,2);
}
|
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
#define FASTCALL __attribute__((regparm(2)))
typedef struct {
int aaa;
double bbbb;
int ccc[200];
} foo;
typedef void (*FType)(int, int) __attribute ((regparm (3), stdcall));
FType bar;
static void FASTCALL
reduced(char b, double c, foo* d, double e, int f);
int
main(void) {
// CHECK: call void @reduced(i8 signext inreg 0, {{.*}} %struct.anon* inreg null
reduced(0, 0.0, 0, 0.0, 0);
// CHECK: call x86_stdcallcc void {{.*}}(i32 inreg 1, i32 inreg 2)
bar(1,2);
}
|
Fix test in -Asserts build.
|
Fix test in -Asserts build.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@99960 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
2c7aba48f3719344f9952dca59095805297aa254
|
test/default/cmptest.h
|
test/default/cmptest.h
|
#ifndef __CMPTEST_H__
#define __CMPTEST_H__
#include <stdio.h>
#include "sodium.h"
#define TEST_NAME_RES TEST_NAME ".res"
#define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp"
FILE *fp_res;
int xmain(void);
int main(void)
{
FILE *fp_out;
int c;
if ((fp_res = fopen(TEST_NAME_RES, "w+")) == NULL) {
perror("fopen(" TEST_NAME_RES ")");
return 99;
}
if (sodium_init() != 0) {
return 99;
}
xmain();
rewind(fp_res);
if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) {
perror("fopen(" TEST_NAME_OUT ")");
return 99;
}
do {
if ((c = fgetc(fp_res)) != fgetc(fp_out)) {
return 99;
}
} while (c != EOF);
return 0;
}
#undef printf
#define printf(...) fprintf(fp_res, __VA_ARGS__)
#define main xmain
#endif
|
#ifndef __CMPTEST_H__
#define __CMPTEST_H__
#include <stdio.h>
#include "sodium.h"
#define TEST_NAME_RES TEST_NAME ".res"
#define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp"
#ifdef HAVE_ARC4RANDOM
# undef rand
# define rand(X) arc4random(X)
#endif
FILE *fp_res;
int xmain(void);
int main(void)
{
FILE *fp_out;
int c;
if ((fp_res = fopen(TEST_NAME_RES, "w+")) == NULL) {
perror("fopen(" TEST_NAME_RES ")");
return 99;
}
if (sodium_init() != 0) {
return 99;
}
xmain();
rewind(fp_res);
if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) {
perror("fopen(" TEST_NAME_OUT ")");
return 99;
}
do {
if ((c = fgetc(fp_res)) != fgetc(fp_out)) {
return 99;
}
} while (c != EOF);
return 0;
}
#undef printf
#define printf(...) fprintf(fp_res, __VA_ARGS__)
#define main xmain
#endif
|
Use arc4random() in tests if available.
|
Use arc4random() in tests if available.
|
C
|
isc
|
mvduin/libsodium,akkakks/libsodium,soumith/libsodium,netroby/libsodium,netroby/libsodium,akkakks/libsodium,pmienk/libsodium,netroby/libsodium,tml/libsodium,akkakks/libsodium,donpark/libsodium,Payshare/libsodium,eburkitt/libsodium,optedoblivion/android_external_libsodium,soumith/libsodium,pyparallel/libsodium,GreatFruitOmsk/libsodium,tml/libsodium,CyanogenMod/android_external_dnscrypt_libsodium,donpark/libsodium,donpark/libsodium,paragonie-scott/libsodium,rustyhorde/libsodium,Payshares/libsodium,akkakks/libsodium,SpiderOak/libsodium,Payshare/libsodium,kytvi2p/libsodium,rustyhorde/libsodium,JackWink/libsodium,HappyYang/libsodium,soumith/libsodium,kytvi2p/libsodium,zhuqling/libsodium,pyparallel/libsodium,HappyYang/libsodium,pmienk/libsodium,SpiderOak/libsodium,GreatFruitOmsk/libsodium,kytvi2p/libsodium,eburkitt/libsodium,optedoblivion/android_external_libsodium,CyanogenMod/android_external_dnscrypt_libsodium,HappyYang/libsodium,SpiderOak/libsodium,optedoblivion/android_external_libsodium,zhuqling/libsodium,paragonie-scott/libsodium,SpiderOak/libsodium,mvduin/libsodium,Payshares/libsodium,GreatFruitOmsk/libsodium,Payshares/libsodium,paragonie-scott/libsodium,JackWink/libsodium,zhuqling/libsodium,Payshare/libsodium,pmienk/libsodium,mvduin/libsodium,pyparallel/libsodium,JackWink/libsodium,rustyhorde/libsodium,eburkitt/libsodium,rustyhorde/libsodium,tml/libsodium,CyanogenMod/android_external_dnscrypt_libsodium
|
21c2073f136951a8c7911c74fe37b3fd6ecd9c6b
|
nacl-src/decoder.h
|
nacl-src/decoder.h
|
// Copyright 2014 Google Inc. All rights reserved.
//
// 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.
/**
* Base class for decoders.
*/
#ifndef DECODER_H_
#define DECODER_H_
#include <memory>
#include <stdint.h>
#include <vector>
#include "dsp.h"
using namespace std;
namespace radioreceiver {
/**
* Base class for decoders.
*/
class Decoder {
public:
/**
* Demodulates a block of floating-point samples, producing a block of
* stereo audio.
* @param samples The samples to decode.
* @param inStereo Whether to try decoding a stereo signal.
* @return The generated stereo audio block.
*/
virtual StereoAudio decode(const Samples& samples, bool inStereo) = 0;
};
} // namespace radioreceiver
#endif // DECODER_BASE_H_
|
// Copyright 2014 Google Inc. All rights reserved.
//
// 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.
/**
* Base class for decoders.
*/
#ifndef DECODER_H_
#define DECODER_H_
#include <memory>
#include <stdint.h>
#include <vector>
#include "dsp.h"
using namespace std;
namespace radioreceiver {
/**
* Base class for decoders.
*/
class Decoder {
public:
virtual ~Decoder() {}
/**
* Demodulates a block of floating-point samples, producing a block of
* stereo audio.
* @param samples The samples to decode.
* @param inStereo Whether to try decoding a stereo signal.
* @return The generated stereo audio block.
*/
virtual StereoAudio decode(const Samples& samples, bool inStereo) = 0;
};
} // namespace radioreceiver
#endif // DECODER_BASE_H_
|
Add virtual destructor to base class.
|
Add virtual destructor to base class.
|
C
|
apache-2.0
|
smcclure879/radioreceiver,google/radioreceiver,smcclure879/radioreceiver,google/radioreceiver,smcclure879/radioreceiver
|
45d1a525caae45b9d1bbecd3f472442e5d17de65
|
system.c
|
system.c
|
#include <stdio.h>
#include <stdlib.h>
#include "system.h"
void SystemPause() {
puts("\nPress Enter to continue...");
while (getchar() != '\n') {}
}
void SystemClear() {
system("clear");
}
|
#include <stdio.h>
#include <stdlib.h>
#include "system.h"
void SystemPause() {
puts("\nPress Enter to continue...");
while (getchar() != '\n') {}
}
void SystemClear() {
fputs("\033[2J\033[H", stdout);
}
|
Use escape sequence to clear screen
|
Use escape sequence to clear screen
|
C
|
mit
|
pathawks/Castle
|
6d94dba7a5c4660c82ca2e55c1167129e4bb812a
|
Realm/RLMSchema_Private.h
|
Realm/RLMSchema_Private.h
|
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2014 Realm Inc.
//
// 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.
//
////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif
#import <Realm/RLMSchema.h>
#import <Realm/RLMDefines.h>
RLM_ASSUME_NONNULL_BEGIN
@class RLMRealm;
//
// RLMSchema private interface
//
@class RLMRealm;
@interface RLMSchema ()
@property (nonatomic, readwrite, copy) NSArray *objectSchema;
// schema based on runtime objects
+ (instancetype)sharedSchema;
// schema based on tables in a Realm
+ (instancetype)dynamicSchemaFromRealm:(RLMRealm *)realm;
// class for string
+ (nullable Class)classForString:(NSString *)className;
// shallow copy for reusing schema properties accross the same Realm on multiple threads
- (instancetype)shallowCopy;
@end
RLM_ASSUME_NONNULL_END
#ifdef __cplusplus
}
#endif
|
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2014 Realm Inc.
//
// 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.
//
////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif
#import <Realm/RLMSchema.h>
#import <Realm/RLMDefines.h>
RLM_ASSUME_NONNULL_BEGIN
@class RLMRealm;
//
// RLMSchema private interface
//
@class RLMRealm;
@interface RLMSchema ()
@property (nonatomic, readwrite, copy) NSArray *objectSchema;
// schema based on runtime objects
+ (nullable instancetype)sharedSchema;
// schema based on tables in a Realm
+ (instancetype)dynamicSchemaFromRealm:(RLMRealm *)realm;
// class for string
+ (nullable Class)classForString:(NSString *)className;
// shallow copy for reusing schema properties accross the same Realm on multiple threads
- (instancetype)shallowCopy;
@end
RLM_ASSUME_NONNULL_END
#ifdef __cplusplus
}
#endif
|
Mark +[RLMSchema sharedSchema] as nullable.
|
Mark +[RLMSchema sharedSchema] as nullable.
|
C
|
apache-2.0
|
ul7290/realm-cocoa,sunzeboy/realm-cocoa,lumoslabs/realm-cocoa,Havi4/realm-cocoa,duk42111/realm-cocoa,sunfei/realm-cocoa,bugix/realm-cocoa,bestwpw/realm-cocoa,lumoslabs/realm-cocoa,nathankot/realm-cocoa,Havi4/realm-cocoa,bestwpw/realm-cocoa,hejunbinlan/realm-cocoa,vuchau/realm-cocoa,vuchau/realm-cocoa,iOS--wsl--victor/realm-cocoa,isaacroldan/realm-cocoa,ul7290/realm-cocoa,ChenJian345/realm-cocoa,kylebshr/realm-cocoa,kevinmlong/realm-cocoa,sunfei/realm-cocoa,bugix/realm-cocoa,hejunbinlan/realm-cocoa,HuylensHu/realm-cocoa,thdtjsdn/realm-cocoa,ul7290/realm-cocoa,bestwpw/realm-cocoa,isaacroldan/realm-cocoa,dilizarov/realm-cocoa,zilaiyedaren/realm-cocoa,dilizarov/realm-cocoa,Havi4/realm-cocoa,yuuki1224/realm-cocoa,bestwpw/realm-cocoa,iOS--wsl--victor/realm-cocoa,xmartlabs/realm-cocoa,neonichu/realm-cocoa,bugix/realm-cocoa,kevinmlong/realm-cocoa,thdtjsdn/realm-cocoa,iOSCowboy/realm-cocoa,kevinmlong/realm-cocoa,nathankot/realm-cocoa,neonichu/realm-cocoa,Palleas/realm-cocoa,tenebreux/realm-cocoa,thdtjsdn/realm-cocoa,isaacroldan/realm-cocoa,sunzeboy/realm-cocoa,sunzeboy/realm-cocoa,hejunbinlan/realm-cocoa,Palleas/realm-cocoa,hejunbinlan/realm-cocoa,kylebshr/realm-cocoa,bestwpw/realm-cocoa,codyDu/realm-cocoa,iOSCowboy/realm-cocoa,neonichu/realm-cocoa,ChenJian345/realm-cocoa,yuuki1224/realm-cocoa,iOS--wsl--victor/realm-cocoa,duk42111/realm-cocoa,kylebshr/realm-cocoa,xmartlabs/realm-cocoa,vuchau/realm-cocoa,yuuki1224/realm-cocoa,thdtjsdn/realm-cocoa,sunfei/realm-cocoa,sunzeboy/realm-cocoa,Havi4/realm-cocoa,isaacroldan/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,sunfei/realm-cocoa,Palleas/realm-cocoa,sunzeboy/realm-cocoa,bugix/realm-cocoa,dilizarov/realm-cocoa,nathankot/realm-cocoa,imjerrybao/realm-cocoa,ChenJian345/realm-cocoa,dilizarov/realm-cocoa,thdtjsdn/realm-cocoa,codyDu/realm-cocoa,isaacroldan/realm-cocoa,ChenJian345/realm-cocoa,imjerrybao/realm-cocoa,codyDu/realm-cocoa,yuuki1224/realm-cocoa,codyDu/realm-cocoa,brasbug/realm-cocoa,neonichu/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,zilaiyedaren/realm-cocoa,codyDu/realm-cocoa,vuchau/realm-cocoa,vuchau/realm-cocoa,lumoslabs/realm-cocoa,brasbug/realm-cocoa,xmartlabs/realm-cocoa,zilaiyedaren/realm-cocoa,brasbug/realm-cocoa,tenebreux/realm-cocoa,kylebshr/realm-cocoa,dilizarov/realm-cocoa,hejunbinlan/realm-cocoa,iOS--wsl--victor/realm-cocoa,Palleas/realm-cocoa,sunfei/realm-cocoa,lumoslabs/realm-cocoa,iOSCowboy/realm-cocoa,tenebreux/realm-cocoa,iOS--wsl--victor/realm-cocoa,iOSCowboy/realm-cocoa,Palleas/realm-cocoa,brasbug/realm-cocoa,tenebreux/realm-cocoa,neonichu/realm-cocoa,zilaiyedaren/realm-cocoa,imjerrybao/realm-cocoa,zilaiyedaren/realm-cocoa,duk42111/realm-cocoa,imjerrybao/realm-cocoa,HuylensHu/realm-cocoa,ul7290/realm-cocoa,HuylensHu/realm-cocoa,lumoslabs/realm-cocoa,kevinmlong/realm-cocoa,ChenJian345/realm-cocoa,bugix/realm-cocoa,imjerrybao/realm-cocoa,yuuki1224/realm-cocoa,kevinmlong/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,tenebreux/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,iOSCowboy/realm-cocoa,Havi4/realm-cocoa,HuylensHu/realm-cocoa,brasbug/realm-cocoa,duk42111/realm-cocoa,xmartlabs/realm-cocoa,ul7290/realm-cocoa,duk42111/realm-cocoa,HuylensHu/realm-cocoa,kylebshr/realm-cocoa,xmartlabs/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,nathankot/realm-cocoa,nathankot/realm-cocoa
|
fdae0200e90f6ca93fda8f992002b03629f75d15
|
net/server/http_server_response_info.h
|
net/server/http_server_response_info.h
|
// Copyright 2013 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 NET_SERVER_HTTP_SERVER_RESPONSE_INFO_H_
#define NET_SERVER_HTTP_SERVER_RESPONSE_INFO_H_
#include <string>
#include <utility>
#include <vector>
#include "net/http/http_status_code.h"
namespace net {
class HttpServerResponseInfo {
public:
// Creates a 200 OK HttpServerResponseInfo.
HttpServerResponseInfo();
explicit HttpServerResponseInfo(HttpStatusCode status_code);
~HttpServerResponseInfo();
static HttpServerResponseInfo CreateFor404();
static HttpServerResponseInfo CreateFor500(const std::string& body);
void AddHeader(const std::string& name, const std::string& value);
// This also adds an appropriate Content-Length header.
void SetBody(const std::string& body, const std::string& content_type);
// Sets content-length and content-type. Body should be sent separately.
void SetContentHeaders(size_t content_length,
const std::string& content_type);
std::string Serialize() const;
HttpStatusCode status_code() const;
const std::string& body() const;
private:
typedef std::vector<std::pair<std::string, std::string> > Headers;
HttpStatusCode status_code_;
Headers headers_;
std::string body_;
};
} // namespace net
#endif // NET_SERVER_HTTP_SERVER_RESPONSE_INFO_H_
|
// Copyright 2013 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 NET_SERVER_HTTP_SERVER_RESPONSE_INFO_H_
#define NET_SERVER_HTTP_SERVER_RESPONSE_INFO_H_
#include <string>
#include <utility>
#include "base/strings/string_split.h"
#include "net/http/http_status_code.h"
namespace net {
class HttpServerResponseInfo {
public:
// Creates a 200 OK HttpServerResponseInfo.
HttpServerResponseInfo();
explicit HttpServerResponseInfo(HttpStatusCode status_code);
~HttpServerResponseInfo();
static HttpServerResponseInfo CreateFor404();
static HttpServerResponseInfo CreateFor500(const std::string& body);
void AddHeader(const std::string& name, const std::string& value);
// This also adds an appropriate Content-Length header.
void SetBody(const std::string& body, const std::string& content_type);
// Sets content-length and content-type. Body should be sent separately.
void SetContentHeaders(size_t content_length,
const std::string& content_type);
std::string Serialize() const;
HttpStatusCode status_code() const;
const std::string& body() const;
private:
using Headers = base::StringPairs;
HttpStatusCode status_code_;
Headers headers_;
std::string body_;
};
} // namespace net
#endif // NET_SERVER_HTTP_SERVER_RESPONSE_INFO_H_
|
Use of base::StringPairs appropriately in server
|
Use of base::StringPairs appropriately in server
Bescause base/strings/string_split.h defines:
typedef std::vector<std::pair<std::string, std::string> > StringPairs;
BUG=412250
Review URL: https://codereview.chromium.org/1093823005
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#327241}
|
C
|
bsd-3-clause
|
Chilledheart/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk
|
904957e60a296aa04db2384b7d69f0e382656740
|
Modules/News/iPad/MITCollectionViewGridLayoutSection.h
|
Modules/News/iPad/MITCollectionViewGridLayoutSection.h
|
#import <Foundation/Foundation.h>
@class MITCollectionViewNewsGridLayout;
@interface MITCollectionViewGridLayoutSection : NSObject
@property (nonatomic,readonly,weak) MITCollectionViewNewsGridLayout *layout;
@property (nonatomic,readonly) NSInteger section;
@property (nonatomic) CGPoint origin;
@property (nonatomic) UIEdgeInsets contentInsets;
@property (nonatomic, readonly) CGSize bounds;
@property (nonatomic,readonly) CGRect frame;
@property (nonatomic,readonly,strong) UICollectionViewLayoutAttributes *headerLayoutAttributes;
@property (nonatomic,readonly,strong) UICollectionViewLayout *featuredItemLayoutAttributes;
@property (nonatomic,readonly,strong) NSArray *itemLayoutAttributes;
+ (instancetype)sectionWithLayout:(MITCollectionViewNewsGridLayout*)layout section:(NSInteger)section;
- (NSArray*)layoutAttributesInRect:(CGRect)rect;
- (UICollectionViewLayoutAttributes*)layoutAttributesForItemAtIndexPath:(NSIndexPath*)indexPath;
@end
|
#import <Foundation/Foundation.h>
@class MITCollectionViewNewsGridLayout;
@interface MITCollectionViewGridLayoutSection : NSObject
@property (nonatomic,readonly,weak) MITCollectionViewNewsGridLayout *layout;
@property (nonatomic,readonly) NSInteger section;
@property (nonatomic) CGPoint origin;
@property (nonatomic) UIEdgeInsets contentInsets;
@property (nonatomic,readonly) CGRect bounds;
@property (nonatomic,readonly) CGRect frame;
@property (nonatomic,readonly,strong) UICollectionViewLayoutAttributes *headerLayoutAttributes;
@property (nonatomic,readonly,strong) UICollectionViewLayoutAttributes *featuredItemLayoutAttributes;
@property (nonatomic,readonly,strong) NSArray *itemLayoutAttributes;
+ (instancetype)sectionWithLayout:(MITCollectionViewNewsGridLayout*)layout forSection:(NSInteger)section numberOfColumns:(NSInteger)numberOfColumns;
- (NSArray*)layoutAttributesInRect:(CGRect)rect;
- (UICollectionViewLayoutAttributes*)layoutAttributesForItemAtIndexPath:(NSIndexPath*)indexPath;
@end
|
Clean up some inconsistencies in the section helper header
|
Clean up some inconsistencies in the section helper header
|
C
|
lgpl-2.1
|
MIT-Mobile/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS,MIT-Mobile/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS
|
5e0171da9259c8261ec8661a099c35a2ed8c0733
|
CefSharp/IRequestHandler.h
|
CefSharp/IRequestHandler.h
|
// Copyright 2010-2013 The CefSharp Project. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "IRequestResponse.h"
using namespace System;
using namespace System::Net;
namespace CefSharp
{
public enum class NavigationType
{
LinkClicked = NAVIGATION_LINK_CLICKED,
FormSubmitted = NAVIGATION_FORM_SUBMITTED,
BackForward = NAVIGATION_BACK_FORWARD,
Reload = NAVIGATION_RELOAD,
FormResubmitted = NAVIGATION_FORM_RESUBMITTED,
Other = NAVIGATION_OTHER
};
public interface class IRequestHandler
{
public:
bool OnBeforeBrowse(IWebBrowser^ browser, IRequest^ request, NavigationType navigationType, bool isRedirect);
bool OnBeforeResourceLoad(IWebBrowser^ browser, IRequestResponse^ requestResponse);
void OnResourceResponse(IWebBrowser^ browser, String^ url, int status, String^ statusText, String^ mimeType, WebHeaderCollection^ headers);
bool GetDownloadHandler(IWebBrowser^ browser, String^ mimeType, String^ fileName, Int64 contentLength, IDownloadHandler ^% handler);
bool GetAuthCredentials(IWebBrowser^ browser, bool isProxy, String^ host ,int port, String^ realm, String^ scheme, String^% username, String^% password);
};
}
|
// Copyright 2010-2013 The CefSharp Project. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "IRequestResponse.h"
using namespace System;
using namespace System::Net;
using namespace System::Runtime::InteropServices;
namespace CefSharp
{
public enum class NavigationType
{
LinkClicked = NAVIGATION_LINK_CLICKED,
FormSubmitted = NAVIGATION_FORM_SUBMITTED,
BackForward = NAVIGATION_BACK_FORWARD,
Reload = NAVIGATION_RELOAD,
FormResubmitted = NAVIGATION_FORM_RESUBMITTED,
Other = NAVIGATION_OTHER
};
public interface class IRequestHandler
{
bool OnBeforeBrowse(IWebBrowser^ browser, IRequest^ request, NavigationType navigationType, bool isRedirect);
bool OnBeforeResourceLoad(IWebBrowser^ browser, IRequestResponse^ requestResponse);
void OnResourceResponse(IWebBrowser^ browser, String^ url, int status, String^ statusText, String^ mimeType, WebHeaderCollection^ headers);
bool GetDownloadHandler(IWebBrowser^ browser, [Out] IDownloadHandler ^% handler);
bool GetAuthCredentials(IWebBrowser^ browser, bool isProxy, String^ host ,int port, String^ realm, String^ scheme, String^% username, String^% password);
};
}
|
Use a proper Out parameter.
|
Use a proper Out parameter.
|
C
|
bsd-3-clause
|
wangzheng888520/CefSharp,VioletLife/CefSharp,VioletLife/CefSharp,yoder/CefSharp,AJDev77/CefSharp,wangzheng888520/CefSharp,wangzheng888520/CefSharp,illfang/CefSharp,AJDev77/CefSharp,battewr/CefSharp,battewr/CefSharp,NumbersInternational/CefSharp,windygu/CefSharp,twxstar/CefSharp,Haraguroicha/CefSharp,Livit/CefSharp,zhangjingpu/CefSharp,rover886/CefSharp,Haraguroicha/CefSharp,zhangjingpu/CefSharp,VioletLife/CefSharp,yoder/CefSharp,haozhouxu/CefSharp,rlmcneary2/CefSharp,dga711/CefSharp,gregmartinhtc/CefSharp,rlmcneary2/CefSharp,rover886/CefSharp,zhangjingpu/CefSharp,joshvera/CefSharp,gregmartinhtc/CefSharp,jamespearce2006/CefSharp,Haraguroicha/CefSharp,jamespearce2006/CefSharp,Octopus-ITSM/CefSharp,haozhouxu/CefSharp,dga711/CefSharp,yoder/CefSharp,joshvera/CefSharp,ITGlobal/CefSharp,haozhouxu/CefSharp,ITGlobal/CefSharp,AJDev77/CefSharp,Octopus-ITSM/CefSharp,haozhouxu/CefSharp,Octopus-ITSM/CefSharp,gregmartinhtc/CefSharp,dga711/CefSharp,twxstar/CefSharp,jamespearce2006/CefSharp,ITGlobal/CefSharp,windygu/CefSharp,gregmartinhtc/CefSharp,jamespearce2006/CefSharp,Livit/CefSharp,Livit/CefSharp,ruisebastiao/CefSharp,illfang/CefSharp,zhangjingpu/CefSharp,Octopus-ITSM/CefSharp,windygu/CefSharp,AJDev77/CefSharp,ruisebastiao/CefSharp,NumbersInternational/CefSharp,twxstar/CefSharp,illfang/CefSharp,rover886/CefSharp,yoder/CefSharp,battewr/CefSharp,ruisebastiao/CefSharp,jamespearce2006/CefSharp,rover886/CefSharp,VioletLife/CefSharp,dga711/CefSharp,ruisebastiao/CefSharp,rlmcneary2/CefSharp,windygu/CefSharp,NumbersInternational/CefSharp,joshvera/CefSharp,ITGlobal/CefSharp,NumbersInternational/CefSharp,rover886/CefSharp,wangzheng888520/CefSharp,Livit/CefSharp,Haraguroicha/CefSharp,illfang/CefSharp,battewr/CefSharp,Haraguroicha/CefSharp,twxstar/CefSharp,joshvera/CefSharp,rlmcneary2/CefSharp
|
172dfb5cae6780455d338fd38a16c87dfe92073b
|
include/edata.h
|
include/edata.h
|
#ifndef _MY_EDATA
#define _MY_EDATA
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#endif
/** @brief struct that carries all information about experimental data */
typedef struct edata {
/** observed data */
double *am_my;
/** standard deviation of observed data */
double *am_ysigma;
/** observed events */
double *am_mz;
/** standard deviation of observed events */
double *am_zsigma;
/** boolean indicating whether experimental data was provided */
bool am_bexpdata;
} ExpData;
EXTERNC void freeExpData(ExpData *edata);
#endif /* _MY_EDATA */
|
#ifndef _MY_EDATA
#define _MY_EDATA
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#include <stdbool.h>
#endif
/** @brief struct that carries all information about experimental data */
typedef struct edata {
/** observed data */
double *am_my;
/** standard deviation of observed data */
double *am_ysigma;
/** observed events */
double *am_mz;
/** standard deviation of observed events */
double *am_zsigma;
/** boolean indicating whether experimental data was provided */
bool am_bexpdata;
} ExpData;
EXTERNC void freeExpData(ExpData *edata);
#endif /* _MY_EDATA */
|
Fix type bool for C
|
Fix type bool for C
|
C
|
bsd-2-clause
|
AMICI-developer/AMICI,FFroehlich/AMICI,AMICI-developer/AMICI,AMICI-developer/AMICI,FFroehlich/AMICI,FFroehlich/AMICI,FFroehlich/AMICI,AMICI-developer/AMICI
|
7e8e1e91c25b4c2664b1768b96070e722f804c74
|
include/error.h
|
include/error.h
|
#ifndef CPR_ERROR_H
#define CPR_ERROR_H
#include <string>
#include "cprtypes.h"
#include "defines.h"
namespace cpr {
enum class ErrorCode {
OK = 0,
CONNECTION_FAILURE,
EMPTY_RESPONSE,
HOST_RESOLUTION_FAILURE,
INTERNAL_ERROR,
INVALID_URL_FORMAT,
NETWORK_RECEIVE_ERROR,
NETWORK_SEND_FAILURE,
OPERATION_TIMEDOUT,
PROXY_RESOLUTION_FAILURE,
SSL_CONNECT_ERROR,
SSL_LOCAL_CERTIFICATE_ERROR,
SSL_REMOTE_CERTIFICATE_ERROR,
SSL_CACERT_ERROR,
GENERIC_SSL_ERROR,
UNSUPPORTED_PROTOCOL,
UNKNOWN_ERROR = 1000,
};
ErrorCode getErrorCodeForCurlError(int curl_code);
class Error {
public:
Error() : code{ErrorCode::OK}, message{""} {}
template <typename TextType>
Error(const ErrorCode& p_error_code, TextType&& p_error_message)
: code{p_error_code}, message{CPR_FWD(p_error_message)} {}
explicit operator bool() const {
return code != ErrorCode::OK;
}
ErrorCode code;
std::string message;
};
} // namespace cpr
#endif
|
#ifndef CPR_ERROR_H
#define CPR_ERROR_H
#include <string>
#include "cprtypes.h"
#include "defines.h"
namespace cpr {
enum class ErrorCode {
OK = 0,
CONNECTION_FAILURE,
EMPTY_RESPONSE,
HOST_RESOLUTION_FAILURE,
INTERNAL_ERROR,
INVALID_URL_FORMAT,
NETWORK_RECEIVE_ERROR,
NETWORK_SEND_FAILURE,
OPERATION_TIMEDOUT,
PROXY_RESOLUTION_FAILURE,
SSL_CONNECT_ERROR,
SSL_LOCAL_CERTIFICATE_ERROR,
SSL_REMOTE_CERTIFICATE_ERROR,
SSL_CACERT_ERROR,
GENERIC_SSL_ERROR,
UNSUPPORTED_PROTOCOL,
UNKNOWN_ERROR = 1000,
};
ErrorCode getErrorCodeForCurlError(int curl_code);
class Error {
public:
Error() : code{ErrorCode::OK} {}
template <typename TextType>
Error(const ErrorCode& p_error_code, TextType&& p_error_message)
: code{p_error_code}, message{CPR_FWD(p_error_message)} {}
explicit operator bool() const {
return code != ErrorCode::OK;
}
ErrorCode code;
std::string message;
};
} // namespace cpr
#endif
|
Remove explicit instantiation of empty message
|
Remove explicit instantiation of empty message
|
C
|
mit
|
whoshuu/cpr,SuperV1234/cpr,msuvajac/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr,SuperV1234/cpr,SuperV1234/cpr,msuvajac/cpr
|
cc8f0b827fdd616a3358fc939a2811bc0d6c3f79
|
arch/mips/qemu/q-irq.c
|
arch/mips/qemu/q-irq.c
|
#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/i8259.h>
#include <asm/mipsregs.h>
#include <asm/qemu.h>
#include <asm/system.h>
#include <asm/time.h>
extern asmlinkage void qemu_handle_int(void);
asmlinkage void plat_irq_dispatch(void)
{
unsigned int pending = read_c0_status() & read_c0_cause();
if (pending & 0x8000) {
ll_timer_interrupt(Q_COUNT_COMPARE_IRQ);
return;
}
if (pending & 0x0400) {
int irq = i8259_irq();
if (likely(irq >= 0))
do_IRQ(irq);
return;
}
}
void __init arch_init_irq(void)
{
mips_hpt_frequency = QEMU_C0_COUNTER_CLOCK; /* 100MHz */
init_i8259_irqs();
set_c0_status(0x8400);
}
|
#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/i8259.h>
#include <asm/mipsregs.h>
#include <asm/qemu.h>
#include <asm/system.h>
#include <asm/time.h>
asmlinkage void plat_irq_dispatch(void)
{
unsigned int pending = read_c0_status() & read_c0_cause();
if (pending & 0x8000) {
ll_timer_interrupt(Q_COUNT_COMPARE_IRQ);
return;
}
if (pending & 0x0400) {
int irq = i8259_irq();
if (likely(irq >= 0))
do_IRQ(irq);
return;
}
}
void __init arch_init_irq(void)
{
mips_hpt_frequency = QEMU_C0_COUNTER_CLOCK; /* 100MHz */
init_i8259_irqs();
set_c0_status(0x8400);
}
|
Remove prototype for deleted function qemu_handle_int
|
[MIPS] Remove prototype for deleted function qemu_handle_int
Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
|
4c370c5d3e82c2e043b83b778950ca3056976e9f
|
test/profile/instrprof-error.c
|
test/profile/instrprof-error.c
|
// RUN: %clang_profgen -o %t -O3 %s
// RUN: env LLVM_PROFILE_FILE="/" LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
int main(int argc, const char *argv[]) {
if (argc < 2)
return 1;
return 0;
}
// CHECK: LLVM Profile: Failed to write file
|
// RUN: %clang_profgen -o %t -O3 %s
// RUN: env LLVM_PROFILE_FILE="%t/" LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
int main(int argc, const char *argv[]) {
if (argc < 2)
return 1;
return 0;
}
// CHECK: LLVM Profile: Failed to write file
|
Test error reporting by writing to a temp directory
|
[profile] Test error reporting by writing to a temp directory
This test case is meant to check whether verbose error logging works. It
does this by _failing_ to write a profile to a path corresponding to a
directory. Make this clearer by writing to a temporary directory.
Patch suggested by Sean Silva!
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@264817 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
|
37812c16e76bd7dd05d87f817005f8e32c5659fb
|
core/metautils/src/vectorLinkdef.h
|
core/metautils/src/vectorLinkdef.h
|
#include <string>
#include <vector>
#ifndef __hpux
using namespace std;
#endif
#pragma create TClass vector<bool>;
#pragma create TClass vector<char>;
#pragma create TClass vector<short>;
#pragma create TClass vector<long>;
#pragma create TClass vector<unsigned char>;
#pragma create TClass vector<unsigned short>;
#pragma create TClass vector<unsigned int>;
#pragma create TClass vector<unsigned long>;
#pragma create TClass vector<float>;
#pragma create TClass vector<double>;
#pragma create TClass vector<char*>;
#pragma create TClass vector<const char*>;
#pragma create TClass vector<string>;
#if (!(G__GNUC==3 && G__GNUC_MINOR==1)) && !defined(G__KCC) && (!defined(G__VISUAL) || G__MSC_VER<1300)
// gcc3.1,3.2 has a problem with iterator<void*,...,void&>
#pragma create TClass vector<void*>;
#endif
|
#include <string>
#include <vector>
#ifndef __hpux
using namespace std;
#endif
#pragma create TClass vector<bool>;
#pragma create TClass vector<char>;
#pragma create TClass vector<short>;
#pragma create TClass vector<long>;
#pragma create TClass vector<unsigned char>;
#pragma create TClass vector<unsigned short>;
#pragma create TClass vector<unsigned int>;
#pragma create TClass vector<unsigned long>;
#pragma create TClass vector<float>;
#pragma create TClass vector<double>;
#pragma create TClass vector<char*>;
#pragma create TClass vector<const char*>;
#pragma create TClass vector<string>;
#pragma create TClass vector<Long64_t>;
#pragma create TClass vector<ULong64_t>;
#if (!(G__GNUC==3 && G__GNUC_MINOR==1)) && !defined(G__KCC) && (!defined(G__VISUAL) || G__MSC_VER<1300)
// gcc3.1,3.2 has a problem with iterator<void*,...,void&>
#pragma create TClass vector<void*>;
#endif
|
Add missing TClass creation for vector<Long64_t> and vector<ULong64_t>
|
Add missing TClass creation for vector<Long64_t> and vector<ULong64_t>
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@38659 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical
|
15d259806b2d761e5d5e01ebdbd8e7b5db12eb94
|
test/FrontendC/x86-64-red-zone.c
|
test/FrontendC/x86-64-red-zone.c
|
// RUN: $llvmgcc -m64 -fomit-frame-pointer -O2 %s -S -o - > %t
// RUN: not grep subq %t
// RUN: not grep addq %t
// RUN: grep {\\-4(%%rsp)} %t | count 2
// RUN: $llvmgcc -m64 -fomit-frame-pointer -O2 %s -S -o - -mno-red-zone > %t
// RUN: grep subq %t | count 1
// RUN: grep addq %t | count 1
// This is a test for x86-64, add your target below if it FAILs.
// XFAIL: alpha|ia64|arm|powerpc|sparc|x86
long double f0(float f) { return f; }
|
// RUN: $llvmgcc -m64 -fomit-frame-pointer -O2 %s -S -o - > %t
// RUN: not grep subq %t
// RUN: not grep addq %t
// RUN: grep {\\-4(%%rsp)} %t | count 2
// RUN: $llvmgcc -m64 -fomit-frame-pointer -O2 %s -S -o - -mno-red-zone > %t
// RUN: grep subq %t | count 1
// RUN: grep addq %t | count 1
// This is a test for x86-64, add your target below if it FAILs.
// XFAIL: alpha|ia64|arm|powerpc|sparc|i.86
long double f0(float f) { return f; }
|
Make the XFAIL line actually match x86-32 targets.
|
Make the XFAIL line actually match x86-32 targets.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@63507 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.