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
|
|---|---|---|---|---|---|---|---|---|---|
57041b6f3337f733eff945ca0c43434eb20c8410
|
test/FrontendC/2010-03-5-LexicalScope.c
|
test/FrontendC/2010-03-5-LexicalScope.c
|
// RUN: %llvmgcc -S -O0 -g %s -o - | grep DW_TAG_lexical_block | count 3
int foo(int i) {
if (i) {
int j = 2;
}
else {
int j = 3;
}
return i;
}
|
// RUN: %llvmgcc -S -O0 -g %s -o - | grep DW_TAG_lexical_block | count 2
int foo(int i) {
if (i) {
int j = 2;
}
else {
int j = 3;
}
return i;
}
|
Adjust test case for lexical block pruning. Follow-on to r104842 and Radar 7424645.
|
Adjust test case for lexical block pruning. Follow-on to r104842 and Radar 7424645.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@104876 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm
|
f779b0dc0bb152e1d1e9d4cab5de36c1ab1bf13e
|
libyaul/scu/bus/b/vdp1/vdp1/map.h
|
libyaul/scu/bus/b/vdp1/vdp1/map.h
|
/*
* Copyright (c) 2012-2014 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _VDP1_MAP_H_
#define _VDP1_MAP_H_
#include <scu-internal.h>
/* Macros specific for processor */
#define VDP1(x) (0x25D00000 + (x))
/* Helpers specific to this processor */
#define TVMR 0x0000
#define FBCR 0x0002
#define PTMR 0x0004
#define EWDR 0x0006
#define EWLR 0x0008
#define EWRR 0x000A
#define ENDR 0x000C
#define EDSR 0x000E
#define LOPR 0x0010
#define COPR 0x0012
#define MODR 0x0014
#endif /* !_VDP1_MAP_H_ */
|
/*
* Copyright (c) 2012-2014 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _VDP1_MAP_H_
#define _VDP1_MAP_H_
#include <scu-internal.h>
/* Macros specific for processor */
#define VDP1(x) (0x25D00000 + (x))
/* Helpers specific to this processor */
#define TVMR 0x0000
#define FBCR 0x0002
#define PTMR 0x0004
#define EWDR 0x0006
#define EWLR 0x0008
#define EWRR 0x000A
#define ENDR 0x000C
#define EDSR 0x0010
#define LOPR 0x0012
#define COPR 0x0014
#define MODR 0x0016
#endif /* !_VDP1_MAP_H_ */
|
Fix offsets to VDP1 registers
|
Fix offsets to VDP1 registers
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
6da70aa62048e85e652464e7a7dfe3d705c505e3
|
backend.native/tests/interop/kt43502/main.c
|
backend.native/tests/interop/kt43502/main.c
|
#include "libinterop_kt43502_api.h"
int main() {
libinterop_kt43502_symbols()->kotlin.root.printExternPtr();
}
|
#include "testlib_api.h"
int main() {
testlib_symbols()->kotlin.root.printExternPtr();
}
|
Fix KT-43502 testcase on windows
|
Fix KT-43502 testcase on windows
|
C
|
apache-2.0
|
JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native
|
9497abecbfcb29dc2c7daa90c98c7d4d23fedc29
|
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)
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
|
/****************************************************************************
**
** 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();
void beforeShutdown();
private:
QString m_homePage;
bool m_firstUseDone;
};
QML_DECLARE_TYPE(DeclarativeWebUtils)
#endif
|
Add beforeShutdown signal to mock object
|
Add beforeShutdown signal to mock object
|
C
|
mpl-2.0
|
rojkov/sailfish-browser,alinelena/sailfish-browser,sailfishos/sailfish-browser,alinelena/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,sailfishos/sailfish-browser,alinelena/sailfish-browser,alinelena/sailfish-browser,rojkov/sailfish-browser,rojkov/sailfish-browser
|
51bd503c3429ee5522bd065c71f6f5dbbfb0a876
|
Classes/xkcdAppDelegate.h
|
Classes/xkcdAppDelegate.h
|
//
// xkcdAppDelegate.h
// xkcd
//
// Created by Joshua Bleecher Snyder on 8/25/09.
// Copyright Treeline Labs 2009. All rights reserved.
//
#define GENERATE_DEFAULT_PNG 0
#define AppDelegate ((xkcdAppDelegate *)[UIApplication sharedApplication].delegate)
#define kUseragent @"xkcd iPhone app (xkcdapp@treelinelabs.com; http://bit.ly/rZtDq). Thank you for the API!"
@class ComicListViewController;
@interface xkcdAppDelegate : NSObject<UIApplicationDelegate> {
UINavigationController *navigationController;
ComicListViewController *listViewController;
NSManagedObjectModel *managedObjectModel;
NSManagedObjectContext *managedObjectContext;
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSUserDefaults *userDefaults;
UIWindow *window;
}
- (void)save;
- (BOOL)rotate;
- (BOOL)downloadNewComics;
- (BOOL)openZoomedOut;
- (BOOL)openAfterDownload;
@property(nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel;
@property(nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext;
@property(nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property(weak, nonatomic, readonly) NSString *applicationDocumentsDirectory;
@property(nonatomic, strong) IBOutlet UIWindow *window;
@end
|
//
// xkcdAppDelegate.h
// xkcd
//
// Created by Joshua Bleecher Snyder on 8/25/09.
// Copyright Treeline Labs 2009. All rights reserved.
//
#define GENERATE_DEFAULT_PNG 0
#define AppDelegate ((xkcdAppDelegate *)[UIApplication sharedApplication].delegate)
#define kUseragent @"xkcd iPhone app (josh@treelinelabs.com; http://bit.ly/xkcdapp). Thank you for the API!"
@class ComicListViewController;
@interface xkcdAppDelegate : NSObject<UIApplicationDelegate> {
UINavigationController *navigationController;
ComicListViewController *listViewController;
NSManagedObjectModel *managedObjectModel;
NSManagedObjectContext *managedObjectContext;
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSUserDefaults *userDefaults;
UIWindow *window;
}
- (void)save;
- (BOOL)rotate;
- (BOOL)downloadNewComics;
- (BOOL)openZoomedOut;
- (BOOL)openAfterDownload;
@property(nonatomic, strong, readonly) NSManagedObjectModel *managedObjectModel;
@property(nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext;
@property(nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property(weak, nonatomic, readonly) NSString *applicationDocumentsDirectory;
@property(nonatomic, strong) IBOutlet UIWindow *window;
@end
|
Update the useragent a bit
|
Update the useragent a bit
|
C
|
mit
|
paulrehkugler/xkcd,paulrehkugler/xkcd,nameloCmaS/xkcd,nameloCmaS/xkcd
|
ef62a17b0e154377a38d58e0913b8b5d6471e36b
|
src/expanduino/expanduino.h
|
src/expanduino/expanduino.h
|
#pragma once
#include "expanduino-subdevice.h"
#include "classes/meta.h"
#define EXPANDUINO_MAX_RESPONSE_SIZE 128
class ExpanduinoInterruption {
public:
ExpanduinoSubdevice* source;
ExpanduinoInterruption* next;
};
class Expanduino {
MetaExpanduinoSubdevice metaSubdevice;
const char* vendorName;
const char* productName;
const char* serialNumber;
const char* shortName;
ExpanduinoInterruption* nextInterruption;
friend class ExpanduinoSubdevice;
friend class MetaExpanduinoSubdevice;
public:
Expanduino();
uint8_t getNumSubdevices();
ExpanduinoSubdevice* getDevice(uint8_t devNumber);
void dispatch(uint8_t cmd, Stream& request, Print& response);
void getVendorName(Print& out);
void getProductName(Print& out);
void getSerialNumber(Print& out);
void getShortName(Print& out);
void beginSubdevices();
void endSubdevices();
void reset();
virtual bool readInterruptionData(Print& response);
virtual bool requestInterruption(ExpanduinoSubdevice* dev);
};
|
#pragma once
#include "expanduino-subdevice.h"
#include "classes/meta.h"
#define EXPANDUINO_MAX_RESPONSE_SIZE 128
class ExpanduinoInterruption {
public:
ExpanduinoSubdevice* source;
ExpanduinoInterruption* next;
};
class Expanduino {
protected:
MetaExpanduinoSubdevice metaSubdevice;
ExpanduinoInterruption* nextInterruption;
friend class ExpanduinoSubdevice;
friend class MetaExpanduinoSubdevice;
public:
Expanduino();
uint8_t getNumSubdevices();
ExpanduinoSubdevice* getDevice(uint8_t devNumber);
void dispatch(uint8_t cmd, Stream& request, Print& response);
void getVendorName(Print& out);
void getProductName(Print& out);
void getSerialNumber(Print& out);
void getShortName(Print& out);
void beginSubdevices();
void endSubdevices();
void reset();
virtual bool readInterruptionData(Print& response);
virtual bool requestInterruption(ExpanduinoSubdevice* dev);
const char* vendorName;
const char* productName;
const char* serialNumber;
const char* shortName;
};
|
Make public some attributes of Expanduino
|
Make public some attributes of Expanduino
|
C
|
unlicense
|
Expanduino/Expanduino-Arduino,Expanduino/Expanduino-Arduino
|
b9ace4e896cf2c070053a179a5e092dcb79e7d9c
|
MAGDebugKit/Classes/Logging/MAGLogging.h
|
MAGDebugKit/Classes/Logging/MAGLogging.h
|
#import <Foundation/Foundation.h>
#import <CocoaLumberjack/CocoaLumberjack.h>
extern DDLogLevel magDebugKitLogLevel;
extern BOOL magDebugKitAsyncLogs;
#define LOG_ASYNC_ENABLED magDebugKitAsyncLogs
#define LOG_LEVEL_DEF magDebugKitLogLevel
@interface MAGLogging : NSObject
+ (instancetype)sharedInstance;
@property (nonatomic) DDLogLevel logLevel;
@property (nonatomic) BOOL fileLoggingEnabled;
@property (nonatomic) BOOL ttyLoggingEnabled;
@property (nonatomic) BOOL aslLoggingEnabled;
// Send logs via TCP socket.
@property (nonatomic) NSNumber *remoteLoggingEnabled;
@property (nonatomic, copy) NSString *remoteLoggingHost;
@property (nonatomic) NSNumber *remoteLoggingPort;
@property (nonatomic, copy) NSDictionary *remoteLoggingDictionary;
@end
|
#import <Foundation/Foundation.h>
#import <CocoaLumberjack/CocoaLumberjack.h>
extern DDLogLevel magDebugKitLogLevel;
extern BOOL magDebugKitAsyncLogs;
#ifdef LOG_ASYNC_ENABLED
#undef LOG_ASYNC_ENABLED
#endif
#define LOG_ASYNC_ENABLED magDebugKitAsyncLogs
#ifdef LOG_LEVEL_DEF
#undef LOG_LEVEL_DEF
#endif
#define LOG_LEVEL_DEF magDebugKitLogLevel
@interface MAGLogging : NSObject
+ (instancetype)sharedInstance;
@property (nonatomic) DDLogLevel logLevel;
@property (nonatomic) BOOL fileLoggingEnabled;
@property (nonatomic) BOOL ttyLoggingEnabled;
@property (nonatomic) BOOL aslLoggingEnabled;
// Send logs via TCP socket.
@property (nonatomic) NSNumber *remoteLoggingEnabled;
@property (nonatomic, copy) NSString *remoteLoggingHost;
@property (nonatomic) NSNumber *remoteLoggingPort;
@property (nonatomic, copy) NSDictionary *remoteLoggingDictionary;
@end
|
Fix some warnings (redefined macro definitions)
|
Fix some warnings (redefined macro definitions)
|
C
|
apache-2.0
|
Magora-IOS/MAGDebugKit,Magora-IOS/MAGDebugKit
|
b0a039d70ab17fb7b68afc498ae635825c8300cd
|
Source/LuminoCore/Include/LuminoMath.h
|
Source/LuminoCore/Include/LuminoMath.h
|
#ifndef LUMINO_MATH_H
#define LUMINO_MATH_H
#include "Lumino/Math/MathUtils.h"
#include "Lumino/Math/Vector2.h"
#include "Lumino/Math/Vector3.h"
#include "Lumino/Math/Vector4.h"
#include "Lumino/Math/Matrix.h"
#include "Lumino/Math/Quaternion.h"
#include "Lumino/Math/AttitudeTransform.h"
#include "Lumino/Math/Geometries.h"
#include "Lumino/Math/Plane.h"
#include "Lumino/Math/ViewFrustum.h"
#include "Lumino/Math/Random.h"
#endif // LUMINO_MATH_H
|
#ifndef LUMINO_MATH_H
#define LUMINO_MATH_H
#pragma push_macro("min")
#pragma push_macro("max")
#undef min
#undef max
#include "Lumino/Math/MathUtils.h"
#include "Lumino/Math/Vector2.h"
#include "Lumino/Math/Vector3.h"
#include "Lumino/Math/Vector4.h"
#include "Lumino/Math/Matrix.h"
#include "Lumino/Math/Quaternion.h"
#include "Lumino/Math/AttitudeTransform.h"
#include "Lumino/Math/Geometries.h"
#include "Lumino/Math/Plane.h"
#include "Lumino/Math/ViewFrustum.h"
#include "Lumino/Math/Random.h"
#pragma pop_macro("min")
#pragma pop_macro("max")
#endif // LUMINO_MATH_H
|
Improve windows min max macro for MFC
|
Improve windows min max macro for MFC
|
C
|
mit
|
lriki/Lumino,lriki/Lumino,lriki/Lumino,lriki/Lumino,lriki/Lumino,lriki/Lumino,lriki/Lumino
|
d19925f48fcbad32755c4cf0dca845a6487fe3c8
|
test/FrontendC/2007-02-16-WritableStrings.c
|
test/FrontendC/2007-02-16-WritableStrings.c
|
// Test the -fwritable-strings option.
// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
// RUN: grep {private global}
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {private constant}
char *X = "foo";
|
// Test the -fwritable-strings option.
// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
// RUN: grep {internal global}
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {private constant}
char *X = "foo";
|
Update test to match 95961.
|
Update test to match 95961.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@95971 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap
|
d0fbd28a7230f6500a19f5cf6216f18eef07d1d9
|
src/scenarios/base.h
|
src/scenarios/base.h
|
#pragma once
#include <vector>
#include <memory>
#include <boost/noncopyable.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include "../factory.h"
#include "../visualisation.h"
#include "../agents.h"
namespace scenarios {
class base : public boost::noncopyable {
public:
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
template<typename DERIVED>
class scenario : public base {
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
template<typename DERIVED>
factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED>::s_factory;
template<typename DERIVED>
scenario<DERIVED>::scenario(const boost::property_tree::ptree& config) {
}
template<typename DERIVED>
scenario<DERIVED>::~scenario() {
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
}
|
#pragma once
#include <vector>
#include <memory>
#include <boost/noncopyable.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include "../factory.h"
#include "../visualisation.h"
#include "../agents.h"
namespace scenarios {
class base : public boost::noncopyable {
public:
base(const boost::property_tree::ptree& config) {}
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
template<typename DERIVED, typename BASE = base>
class scenario : public BASE {
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
template<typename DERIVED, typename BASE>
factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED, BASE>::s_factory;
template<typename DERIVED, typename BASE>
scenario<DERIVED, BASE>::scenario(const boost::property_tree::ptree& config) : BASE(config) {
}
template<typename DERIVED, typename BASE>
scenario<DERIVED, BASE>::~scenario() {
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
}
|
Allow scenarios inheritance for scenarios::scenario template
|
Allow scenarios inheritance for scenarios::scenario template
|
C
|
mit
|
martin-pr/group_motion_editing,martin-pr/group_motion_editing
|
3a50d847e098f36e3bf8bc14eea07a6cc35f7803
|
test/FixIt/fixit-errors-1.c
|
test/FixIt/fixit-errors-1.c
|
// RUN: cp %s %t
// RUN: %clang_cc1 -pedantic -fixit %t
// RUN: echo %clang_cc1 -pedantic -Werror -x c %t
/* This is a test of the various code modification hints that are
provided as part of warning or extension diagnostics. All of the
warnings will be fixed by -fixit, and the resulting file should
compile cleanly with -Werror -pedantic. */
// FIXME: If you put a space at the end of the line, it doesn't work yet!
char *s = "hi\
there";
// The following line isn't terminated, don't fix it.
int i; // expected-error{{no newline at end of file}}
|
// RUN: cp %s %t
// RUN: %clang_cc1 -pedantic -fixit %t
// RUN: %clang_cc1 -pedantic -Werror -x c %t
/* This is a test of the various code modification hints that are
provided as part of warning or extension diagnostics. All of the
warnings will be fixed by -fixit, and the resulting file should
compile cleanly with -Werror -pedantic. */
// FIXME: If you put a space at the end of the line, it doesn't work yet!
char *s = "hi\
there";
// The following line isn't terminated, don't fix it.
int i; // expected-error{{no newline at end of file}}
|
Fix test to actually check the FixIt-applied code
|
Fix test to actually check the FixIt-applied code
r102230 added an 'echo' making this a no-op.
Also fixes FAIL on native Windows with no shell/GnuWin32.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@193938 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang
|
bdb6a9aeec6ae5f94d7a9abe17fc78f6eefa0dc0
|
gst/glib-compat-private.h
|
gst/glib-compat-private.h
|
/*
* glib-compat.c
* Functions copied from glib 2.10
*
* Copyright 2005 David Schleef <ds@schleef.org>
*/
#ifndef __GLIB_COMPAT_PRIVATE_H__
#define __GLIB_COMPAT_PRIVATE_H__
#include <glib.h>
G_BEGIN_DECLS
#if !GLIB_CHECK_VERSION(2,25,0)
typedef struct stat GStatBuf;
#endif
#if GLIB_CHECK_VERSION(2,26,0)
#define GLIB_HAS_GDATETIME
#endif
/* copies */
/* adaptations */
G_END_DECLS
#endif
|
/*
* glib-compat.c
* Functions copied from glib 2.10
*
* Copyright 2005 David Schleef <ds@schleef.org>
*/
#ifndef __GLIB_COMPAT_PRIVATE_H__
#define __GLIB_COMPAT_PRIVATE_H__
#include <glib.h>
G_BEGIN_DECLS
#if !GLIB_CHECK_VERSION(2,25,0)
#if defined (_MSC_VER) && !defined(_WIN64)
typedef struct _stat32 GStatBuf;
#else
typedef struct stat GStatBuf;
#endif
#endif
#if GLIB_CHECK_VERSION(2,26,0)
#define GLIB_HAS_GDATETIME
#endif
/* copies */
/* adaptations */
G_END_DECLS
#endif
|
Fix GStatBuf definition for win32 when building against older glib. Now matches upstream glib definition.
|
Fix GStatBuf definition for win32 when building against older glib.
Now matches upstream glib definition.
|
C
|
lgpl-2.1
|
Distrotech/gstreamer,ensonic/gstreamer,magcius/gstreamer,shelsonjava/gstreamer,jpakkane/gstreamer,mparis/gstreamer,ahmedammar/platform_external_gst_gstreamer,justinjoy/gstreamer,cablelabs/gstreamer,Lachann/gstreamer,justinjoy/gstreamer,ylatuya/gstreamer,magcius/gstreamer,magcius/gstreamer,Distrotech/gstreamer,StreamUtils/gstreamer,collects/gstreamer,krieger-od/gstreamer,mparis/gstreamer,ensonic/gstreamer,jpxiong/gstreamer,ylatuya/gstreamer,cfoch/gstreamer,surround-io/gstreamer,ensonic/gstreamer,surround-io/gstreamer,lubosz/gstreamer,mrchapp/gstreamer,lubosz/gstreamer,Lachann/gstreamer,jpxiong/gstreamer,justinjoy/gstreamer,drothlis/gstreamer,StreamUtils/gstreamer,centricular/gstreamer,krichter722/gstreamer,lovebug356/gstreamer,drothlis/gstreamer,collects/gstreamer,cfoch/gstreamer,Distrotech/gstreamer,ensonic/gstreamer,surround-io/gstreamer,lubosz/gstreamer,shelsonjava/gstreamer,lovebug356/gstreamer,mparis/gstreamer,centricular/gstreamer,justinjoy/gstreamer,ahmedammar/platform_external_gst_gstreamer,krieger-od/gstreamer,cablelabs/gstreamer,StreamUtils/gstreamer,ylatuya/gstreamer,cfoch/gstreamer,centricular/gstreamer,StreamUtils/gstreamer,centricular/gstreamer,jpakkane/gstreamer,lovebug356/gstreamer,cablelabs/gstreamer,mrchapp/gstreamer,ahmedammar/platform_external_gst_gstreamer,krichter722/gstreamer,ylatuya/gstreamer,drothlis/gstreamer,cfoch/gstreamer,krieger-od/gstreamer,mparis/gstreamer,surround-io/gstreamer,drothlis/gstreamer,ylatuya/gstreamer,surround-io/gstreamer,lovebug356/gstreamer,Lachann/gstreamer,shelsonjava/gstreamer,jpxiong/gstreamer,ahmedammar/platform_external_gst_gstreamer,collects/gstreamer,mrchapp/gstreamer,StreamUtils/gstreamer,krieger-od/gstreamer,mparis/gstreamer,Lachann/gstreamer,lovebug356/gstreamer,cfoch/gstreamer,mrchapp/gstreamer,collects/gstreamer,cablelabs/gstreamer,jpxiong/gstreamer,lubosz/gstreamer,magcius/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,Lachann/gstreamer,shelsonjava/gstreamer,collects/gstreamer,drothlis/gstreamer,krichter722/gstreamer,ahmedammar/platform_external_gst_gstreamer,ensonic/gstreamer,krichter722/gstreamer,mrchapp/gstreamer,krichter722/gstreamer,jpxiong/gstreamer,Distrotech/gstreamer,magcius/gstreamer,shelsonjava/gstreamer,jpakkane/gstreamer,jpakkane/gstreamer,cablelabs/gstreamer,jpakkane/gstreamer,Distrotech/gstreamer,centricular/gstreamer,justinjoy/gstreamer
|
d85f6007cddb22af28640298a9c73a3a6bb4d514
|
include/ofp/actionid.h
|
include/ofp/actionid.h
|
// Copyright 2014-present Bill Fisher. All rights reserved.
#ifndef OFP_ACTIONID_H_
#define OFP_ACTIONID_H_
#include "ofp/constants.h"
#include "ofp/actiontype.h"
namespace ofp {
class ActionID {
public:
public:
enum {
ProtocolIteratorSizeOffset = sizeof(OFPActionType),
ProtocolIteratorAlignment = 4
};
explicit ActionID(OFPActionType type = OFPAT_OUTPUT, UInt32 experimenter = 0)
: type_(type, type == OFPAT_EXPERIMENTER ? 8U : 4U),
experimenter_{experimenter} {}
explicit ActionID(ActionType type, UInt32 experimenter = 0)
: ActionID{type.enumType(), experimenter} {}
ActionType type() const { return type_.zeroLength(); }
UInt32 experimenter() const { return experimenter_; }
private:
ActionType type_;
Big32 experimenter_;
size_t length() const { return type_.length(); }
friend class ActionIDList;
};
} // namespace ofp
#endif // OFP_ACTIONID_H_
|
// Copyright 2014-present Bill Fisher. All rights reserved.
#ifndef OFP_ACTIONID_H_
#define OFP_ACTIONID_H_
#include "ofp/constants.h"
#include "ofp/actiontype.h"
namespace ofp {
class ActionID {
public:
enum {
ProtocolIteratorSizeOffset = sizeof(OFPActionType),
ProtocolIteratorAlignment = 4
};
explicit ActionID(OFPActionType type = OFPAT_OUTPUT, UInt32 experimenter = 0)
: type_(type, type == OFPAT_EXPERIMENTER ? 8U : 4U),
experimenter_{experimenter} {}
explicit ActionID(ActionType type, UInt32 experimenter = 0)
: ActionID{type.enumType(), experimenter} {}
ActionType type() const { return type_.zeroLength(); }
UInt32 experimenter() const { return experimenter_; }
private:
ActionType type_;
Big32 experimenter_;
size_t length() const { return type_.length(); }
friend class ActionIDList;
};
} // namespace ofp
#endif // OFP_ACTIONID_H_
|
Remove extra public access modifier.
|
Remove extra public access modifier.
|
C
|
mit
|
byllyfish/libofp,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr,byllyfish/oftr
|
95d84862445bd79fe523ffd1091d1bd55b7024af
|
UIforETW/Version.h
|
UIforETW/Version.h
|
#pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.44f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// increment that won't trigger the new-version checks, handy for minor
// releases that I don't want to bother users about.
//#define VERSION_SUFFIX 'b'
|
#pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.45f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// increment that won't trigger the new-version checks, handy for minor
// releases that I don't want to bother users about.
//#define VERSION_SUFFIX 'b'
|
Increase version to 1.44 in preparation for new release
|
Increase version to 1.44 in preparation for new release
|
C
|
apache-2.0
|
ariccio/UIforETW,ariccio/UIforETW,MikeMarcin/UIforETW,MikeMarcin/UIforETW,google/UIforETW,mwinterb/UIforETW,google/UIforETW,ariccio/UIforETW,mwinterb/UIforETW,google/UIforETW,google/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,MikeMarcin/UIforETW
|
af0b5cf70b1f96c329ef66c654d69847d8029c02
|
platform/stm32/templates/f3/stm32f3-discovery/board.conf.h
|
platform/stm32/templates/f3/stm32f3-discovery/board.conf.h
|
#include <stm32f3discovery.conf.h>
CONFIG {
uarts[1].status = ENABLED;
}
|
#include <stm32f3discovery.conf.h>
CONFIG {
uarts[1].status = ENABLED;
leds[0].status = ENABLED;
leds[1].status = ENABLED;
leds[2].status = ENABLED;
leds[3].status = ENABLED;
leds[4].status = ENABLED;
leds[5].status = ENABLED;
leds[6].status = ENABLED;
leds[7].status = ENABLED;
}
|
Add LEDs enable to platform/stm32/f3/stm32f3-discovery/
|
templates: Add LEDs enable to platform/stm32/f3/stm32f3-discovery/
|
C
|
bsd-2-clause
|
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
|
dfa3930196159638c475d37a89a7e0e5b395d92a
|
include/mgmt/mcumgr/zephyr_groups.h
|
include/mgmt/mcumgr/zephyr_groups.h
|
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands */
#define ZEPHYR_MGMT_GRP_BASE MGMT_GROUP_ID_PERUSER
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */
|
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands. The group numbers decrease
* from PERUSER to avoid collision with user defined groups.
*/
#define ZEPHYR_MGMT_GRP_BASE (MGMT_GROUP_ID_PERUSER - 1)
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */
|
Fix collision with user defined groups
|
subsys/mgmt/mcumgr: Fix collision with user defined groups
The commit moves definition of Zephyr specific mcumgr basic group to
PERUSER - 1. This has been done to avoid collision with application
specific groups, defined by users.
Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>
|
C
|
apache-2.0
|
galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,galak/zephyr
|
802af5afb6b869036b2bd46b8e0704f1ea2b1e47
|
ExternData/Resources/Include/ED_XMLFile.h
|
ExternData/Resources/Include/ED_XMLFile.h
|
#if !defined(ED_XMLFILE_H)
#define ED_XMLFILE_H
void* ED_createXML(const char* fileName);
void ED_destroyXML(void* _xml);
double ED_getDoubleFromXML(void* _xml, const char* varName);
const char* ED_getStringFromXML(void* _xml, const char* varName);
int ED_getIntFromXML(void* _xml, const char* varName);
void ED_getDoubleArray1DFromXML(void* _xml, const char* varName, double* a, size_t n);
void ED_getDoubleArray2DFromXML(void* _xml, const char* varName, double* a, size_t m, size_t n);
#endif
|
#if !defined(ED_XMLFILE_H)
#define ED_XMLFILE_H
#include <stdlib.h>
void* ED_createXML(const char* fileName);
void ED_destroyXML(void* _xml);
double ED_getDoubleFromXML(void* _xml, const char* varName);
const char* ED_getStringFromXML(void* _xml, const char* varName);
int ED_getIntFromXML(void* _xml, const char* varName);
void ED_getDoubleArray1DFromXML(void* _xml, const char* varName, double* a, size_t n);
void ED_getDoubleArray2DFromXML(void* _xml, const char* varName, double* a, size_t m, size_t n);
#endif
|
Fix missing include (for size_t)
|
Fix missing include (for size_t)
|
C
|
bsd-2-clause
|
modelica-3rdparty/ExternData,modelica-3rdparty/ExternData,modelica-3rdparty/ExternData,modelica-3rdparty/ExternData
|
c85f8eafe16e04213d16b2ff55e7bbe7ed911d98
|
nofork.c
|
nofork.c
|
/*
* preventfork.c
* Copyright (C) 2010 Adrian Perez <aperez@igalia.com>
*
* Distributed under terms of the MIT license.
*/
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
pid_t
fork (void)
{
return 0;
}
int
daemon (int nochdir, int noclose)
{
if (!nochdir == 0) {
if (chdir ("/"))
return -1;
}
if (!noclose) {
close (0);
if (open ("/dev/null", O_RDONLY, 0) != 0)
return -1;
close (1);
if (open ("/dev/null", O_WRONLY, 0) != 1)
return -1;
close (2);
if (dup (1) != 2)
return -1;
}
return 0;
}
|
/*
* nofork.c
* Copyright (C) 2010 Adrian Perez <aperez@igalia.com>
*
* Distributed under terms of the MIT license.
*/
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
pid_t
fork (void)
{
return 0;
}
int
daemon (int nochdir, int noclose)
{
if (!nochdir == 0) {
if (chdir ("/"))
return -1;
}
if (!noclose) {
close (0);
if (open ("/dev/null", O_RDONLY, 0) != 0)
return -1;
close (1);
if (open ("/dev/null", O_WRONLY, 0) != 1)
return -1;
close (2);
if (dup (1) != 2)
return -1;
}
return 0;
}
|
Fix file name in comment header
|
Fix file name in comment header
|
C
|
mit
|
aperezdc/dmon
|
e170f2bff908bd06dcbcc1b113e9365098c337f9
|
cint/include/iosfwd.h
|
cint/include/iosfwd.h
|
#ifndef G__IOSFWD_H
#define G__IOSFWD_H
#include <iostream.h>
typedef basic_streambuf<char, char_traits<char> > streambuf;
#endif
|
#ifndef G__IOSFWD_H
#define G__IOSFWD_H
#include <iostream.h>
#endif
|
Undo change proposed by Philippe. Too many side effects.
|
Undo change proposed by Philippe. Too many side effects.
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@5468 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
sawenzel/root,veprbl/root,root-mirror/root,buuck/root,0x0all/ROOT,pspe/root,simonpf/root,perovic/root,Duraznos/root,zzxuanyuan/root,esakellari/my_root_for_test,sbinet/cxx-root,mkret2/root,smarinac/root,jrtomps/root,0x0all/ROOT,sirinath/root,ffurano/root5,mattkretz/root,satyarth934/root,mhuwiler/rootauto,agarciamontoro/root,pspe/root,thomaskeck/root,mattkretz/root,jrtomps/root,agarciamontoro/root,davidlt/root,nilqed/root,thomaskeck/root,cxx-hep/root-cern,ffurano/root5,mhuwiler/rootauto,satyarth934/root,beniz/root,CristinaCristescu/root,BerserkerTroll/root,dfunke/root,beniz/root,dfunke/root,esakellari/root,sawenzel/root,karies/root,strykejern/TTreeReader,bbockelm/root,gganis/root,evgeny-boger/root,BerserkerTroll/root,sbinet/cxx-root,dfunke/root,georgtroska/root,evgeny-boger/root,dfunke/root,agarciamontoro/root,lgiommi/root,sawenzel/root,krafczyk/root,omazapa/root-old,esakellari/root,olifre/root,alexschlueter/cern-root,simonpf/root,CristinaCristescu/root,satyarth934/root,sawenzel/root,jrtomps/root,omazapa/root-old,krafczyk/root,cxx-hep/root-cern,davidlt/root,root-mirror/root,davidlt/root,mkret2/root,veprbl/root,sbinet/cxx-root,vukasinmilosevic/root,strykejern/TTreeReader,agarciamontoro/root,abhinavmoudgil95/root,mkret2/root,zzxuanyuan/root-compressor-dummy,karies/root,buuck/root,zzxuanyuan/root,Y--/root,davidlt/root,thomaskeck/root,sbinet/cxx-root,omazapa/root,gganis/root,krafczyk/root,lgiommi/root,davidlt/root,Duraznos/root,smarinac/root,krafczyk/root,Duraznos/root,esakellari/root,zzxuanyuan/root,abhinavmoudgil95/root,gganis/root,sawenzel/root,agarciamontoro/root,ffurano/root5,beniz/root,zzxuanyuan/root-compressor-dummy,gbitzes/root,strykejern/TTreeReader,mhuwiler/rootauto,smarinac/root,beniz/root,karies/root,mkret2/root,davidlt/root,arch1tect0r/root,Y--/root,esakellari/root,0x0all/ROOT,abhinavmoudgil95/root,omazapa/root-old,cxx-hep/root-cern,smarinac/root,agarciamontoro/root,omazapa/root,pspe/root,omazapa/root,gganis/root,sawenzel/root,davidlt/root,bbockelm/root,esakellari/my_root_for_test,esakellari/root,bbockelm/root,bbockelm/root,esakellari/my_root_for_test,Dr15Jones/root,sawenzel/root,karies/root,sawenzel/root,veprbl/root,mattkretz/root,krafczyk/root,simonpf/root,veprbl/root,kirbyherm/root-r-tools,0x0all/ROOT,kirbyherm/root-r-tools,cxx-hep/root-cern,veprbl/root,georgtroska/root,thomaskeck/root,esakellari/my_root_for_test,jrtomps/root,root-mirror/root,arch1tect0r/root,nilqed/root,gganis/root,mkret2/root,vukasinmilosevic/root,esakellari/root,gbitzes/root,omazapa/root-old,buuck/root,pspe/root,BerserkerTroll/root,mattkretz/root,ffurano/root5,gbitzes/root,evgeny-boger/root,vukasinmilosevic/root,CristinaCristescu/root,tc3t/qoot,esakellari/root,perovic/root,zzxuanyuan/root-compressor-dummy,buuck/root,alexschlueter/cern-root,pspe/root,tc3t/qoot,CristinaCristescu/root,sbinet/cxx-root,bbockelm/root,olifre/root,evgeny-boger/root,sbinet/cxx-root,buuck/root,esakellari/my_root_for_test,simonpf/root,buuck/root,esakellari/my_root_for_test,beniz/root,pspe/root,ffurano/root5,buuck/root,vukasinmilosevic/root,mattkretz/root,Dr15Jones/root,bbockelm/root,sbinet/cxx-root,pspe/root,abhinavmoudgil95/root,evgeny-boger/root,karies/root,mattkretz/root,karies/root,olifre/root,beniz/root,abhinavmoudgil95/root,karies/root,arch1tect0r/root,root-mirror/root,sirinath/root,Duraznos/root,gganis/root,gbitzes/root,tc3t/qoot,kirbyherm/root-r-tools,mkret2/root,CristinaCristescu/root,CristinaCristescu/root,zzxuanyuan/root,georgtroska/root,jrtomps/root,zzxuanyuan/root-compressor-dummy,esakellari/root,abhinavmoudgil95/root,0x0all/ROOT,mattkretz/root,beniz/root,smarinac/root,mhuwiler/rootauto,agarciamontoro/root,BerserkerTroll/root,sbinet/cxx-root,BerserkerTroll/root,sirinath/root,krafczyk/root,arch1tect0r/root,georgtroska/root,agarciamontoro/root,zzxuanyuan/root,omazapa/root,tc3t/qoot,georgtroska/root,buuck/root,satyarth934/root,dfunke/root,pspe/root,mkret2/root,0x0all/ROOT,Duraznos/root,mattkretz/root,pspe/root,mkret2/root,olifre/root,perovic/root,zzxuanyuan/root-compressor-dummy,strykejern/TTreeReader,dfunke/root,gbitzes/root,omazapa/root-old,sawenzel/root,simonpf/root,karies/root,omazapa/root-old,sbinet/cxx-root,olifre/root,mhuwiler/rootauto,jrtomps/root,gganis/root,perovic/root,krafczyk/root,lgiommi/root,alexschlueter/cern-root,satyarth934/root,ffurano/root5,0x0all/ROOT,davidlt/root,olifre/root,simonpf/root,zzxuanyuan/root,beniz/root,BerserkerTroll/root,CristinaCristescu/root,smarinac/root,perovic/root,Duraznos/root,sirinath/root,lgiommi/root,kirbyherm/root-r-tools,CristinaCristescu/root,Y--/root,Duraznos/root,veprbl/root,simonpf/root,smarinac/root,root-mirror/root,olifre/root,krafczyk/root,arch1tect0r/root,BerserkerTroll/root,thomaskeck/root,pspe/root,karies/root,simonpf/root,root-mirror/root,satyarth934/root,vukasinmilosevic/root,smarinac/root,omazapa/root,abhinavmoudgil95/root,perovic/root,evgeny-boger/root,kirbyherm/root-r-tools,zzxuanyuan/root,simonpf/root,omazapa/root,krafczyk/root,Y--/root,zzxuanyuan/root,root-mirror/root,dfunke/root,alexschlueter/cern-root,arch1tect0r/root,zzxuanyuan/root-compressor-dummy,gganis/root,root-mirror/root,arch1tect0r/root,thomaskeck/root,gbitzes/root,esakellari/my_root_for_test,vukasinmilosevic/root,esakellari/my_root_for_test,alexschlueter/cern-root,thomaskeck/root,jrtomps/root,smarinac/root,dfunke/root,alexschlueter/cern-root,evgeny-boger/root,perovic/root,nilqed/root,nilqed/root,agarciamontoro/root,Y--/root,ffurano/root5,karies/root,vukasinmilosevic/root,dfunke/root,vukasinmilosevic/root,omazapa/root,0x0all/ROOT,Y--/root,root-mirror/root,tc3t/qoot,buuck/root,Y--/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,mkret2/root,cxx-hep/root-cern,esakellari/root,BerserkerTroll/root,tc3t/qoot,esakellari/my_root_for_test,Y--/root,beniz/root,nilqed/root,davidlt/root,gganis/root,simonpf/root,mattkretz/root,simonpf/root,zzxuanyuan/root-compressor-dummy,Y--/root,tc3t/qoot,arch1tect0r/root,nilqed/root,zzxuanyuan/root,bbockelm/root,satyarth934/root,davidlt/root,sbinet/cxx-root,georgtroska/root,mhuwiler/rootauto,strykejern/TTreeReader,lgiommi/root,Dr15Jones/root,omazapa/root-old,bbockelm/root,bbockelm/root,mattkretz/root,dfunke/root,agarciamontoro/root,evgeny-boger/root,BerserkerTroll/root,georgtroska/root,georgtroska/root,gbitzes/root,kirbyherm/root-r-tools,zzxuanyuan/root-compressor-dummy,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,0x0all/ROOT,nilqed/root,thomaskeck/root,strykejern/TTreeReader,abhinavmoudgil95/root,zzxuanyuan/root,karies/root,nilqed/root,omazapa/root,lgiommi/root,alexschlueter/cern-root,evgeny-boger/root,mhuwiler/rootauto,pspe/root,sirinath/root,bbockelm/root,sirinath/root,omazapa/root-old,nilqed/root,beniz/root,zzxuanyuan/root,arch1tect0r/root,Duraznos/root,dfunke/root,cxx-hep/root-cern,mattkretz/root,evgeny-boger/root,abhinavmoudgil95/root,Dr15Jones/root,olifre/root,thomaskeck/root,vukasinmilosevic/root,beniz/root,Y--/root,smarinac/root,root-mirror/root,esakellari/root,veprbl/root,gbitzes/root,Y--/root,bbockelm/root,sawenzel/root,lgiommi/root,lgiommi/root,Dr15Jones/root,esakellari/my_root_for_test,CristinaCristescu/root,sirinath/root,jrtomps/root,gbitzes/root,omazapa/root,sirinath/root,gbitzes/root,BerserkerTroll/root,satyarth934/root,root-mirror/root,arch1tect0r/root,sirinath/root,gbitzes/root,omazapa/root-old,sirinath/root,lgiommi/root,veprbl/root,thomaskeck/root,mhuwiler/rootauto,olifre/root,perovic/root,gganis/root,omazapa/root-old,olifre/root,buuck/root,georgtroska/root,tc3t/qoot,mkret2/root,BerserkerTroll/root,davidlt/root,zzxuanyuan/root,satyarth934/root,agarciamontoro/root,strykejern/TTreeReader,abhinavmoudgil95/root,mhuwiler/rootauto,satyarth934/root,CristinaCristescu/root,nilqed/root,kirbyherm/root-r-tools,veprbl/root,perovic/root,tc3t/qoot,Duraznos/root,mhuwiler/rootauto,krafczyk/root,Duraznos/root,gganis/root,omazapa/root,arch1tect0r/root,Dr15Jones/root,georgtroska/root,mhuwiler/rootauto,lgiommi/root,veprbl/root,veprbl/root,Dr15Jones/root,vukasinmilosevic/root,Duraznos/root,abhinavmoudgil95/root,lgiommi/root,cxx-hep/root-cern,perovic/root,zzxuanyuan/root-compressor-dummy,omazapa/root,sawenzel/root,olifre/root,sirinath/root,perovic/root,nilqed/root,jrtomps/root,CristinaCristescu/root,buuck/root,vukasinmilosevic/root,jrtomps/root,esakellari/root,georgtroska/root,tc3t/qoot,krafczyk/root,jrtomps/root,satyarth934/root,mkret2/root,cxx-hep/root-cern,sbinet/cxx-root
|
fbf9f480bc7faebf123213c2932022c7e0ba4321
|
wangle/concurrent/NamedThreadFactory.h
|
wangle/concurrent/NamedThreadFactory.h
|
/*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <atomic>
#include <string>
#include <thread>
#include <wangle/concurrent/ThreadFactory.h>
#include <folly/Conv.h>
#include <folly/Range.h>
#include <folly/ThreadName.h>
namespace wangle {
class NamedThreadFactory : public ThreadFactory {
public:
explicit NamedThreadFactory(folly::StringPiece prefix)
: prefix_(prefix.str()), suffix_(0) {}
std::thread newThread(folly::Func&& func) override {
auto thread = std::thread(std::move(func));
folly::setThreadName(
thread.native_handle(),
folly::to<std::string>(prefix_, suffix_++));
return thread;
}
void setNamePrefix(folly::StringPiece prefix) {
prefix_ = prefix.str();
}
std::string getNamePrefix() {
return prefix_;
}
private:
std::string prefix_;
std::atomic<uint64_t> suffix_;
};
} // namespace wangle
|
/*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <atomic>
#include <string>
#include <thread>
#include <wangle/concurrent/ThreadFactory.h>
#include <folly/Conv.h>
#include <folly/Range.h>
#include <folly/ThreadName.h>
namespace wangle {
class NamedThreadFactory : public ThreadFactory {
public:
explicit NamedThreadFactory(folly::StringPiece prefix)
: prefix_(prefix.str()), suffix_(0) {}
std::thread newThread(folly::Func&& func) override {
auto thread = std::thread([&](folly::Func&& funct) {
folly::setThreadName(folly::to<std::string>(prefix_, suffix_++));
funct();
}, std::move(func));
return thread;
}
void setNamePrefix(folly::StringPiece prefix) {
prefix_ = prefix.str();
}
std::string getNamePrefix() {
return prefix_;
}
private:
std::string prefix_;
std::atomic<uint64_t> suffix_;
};
} // namespace wangle
|
Switch various calls to folly::setThreadName to set the current thread's name
|
Switch various calls to folly::setThreadName to set the current thread's name
Summary: This is in preparation for killing the pthread_t overload of folly::setThreadName.
Reviewed By: yfeldblum
Differential Revision: D5012627
fbshipit-source-id: a4e6e2c2cb5bd02b1ebea85c305eac59355a7d42
|
C
|
apache-2.0
|
facebook/wangle,facebook/wangle,facebook/wangle
|
1210d9a9faf1f60edd489b74c9b74414fcacb6c2
|
src/Application.h
|
src/Application.h
|
//
// Created by Dawid Drozd aka Gelldur on 05.02.16.
//
#pragma once
#include <string>
#include <memory>
#include <api/ApiThreadPool.h>
#include <data/Preferences.h>
#include <platform/Bridge.h>
#include <screen/ScreenCreator.h>
#include "UILoop.h"
class Application
{
public:
Application(CrossMobile::Platform::Bridge* bridge, ScreenCreator* screenCreator);
virtual ~Application() = default;
virtual void onCreate();
virtual void startScreen(const std::string& screenName);
UILoop& getUILoop()
{
return _uiLoop;
}
ApiThreadPool& getApiThreadPool()
{
return *_apiThreadPool;
}
Preferences& getPreferences()
{
return _preferences;
}
const std::unique_ptr<ScreenCreator>& getScreenCreator() const;
CrossMobile::Platform::Bridge& getBridge();
static Application* getInstance();
private:
UILoop _uiLoop;
std::unique_ptr<ApiThreadPool> _apiThreadPool;
Preferences _preferences;
std::unique_ptr<CrossMobile::Platform::Bridge> _bridge;
std::unique_ptr<ScreenCreator> _screenCreator;
};
|
//
// Created by Dawid Drozd aka Gelldur on 05.02.16.
//
#pragma once
#include <string>
#include <memory>
#include <api/ApiThreadPool.h>
#include <data/Preferences.h>
#include <platform/Bridge.h>
#include <screen/ScreenCreator.h>
#include "UILoop.h"
class Application
{
public:
Application(CrossMobile::Platform::Bridge* bridge, ScreenCreator* screenCreator);
virtual ~Application() = default;
virtual void onCreate();
virtual void startScreen(const std::string& screenName);
UILoop& getUILoop()
{
return _uiLoop;
}
ApiThreadPool& getApiThreadPool()
{
return _apiThreadPool;
}
Preferences& getPreferences()
{
return _preferences;
}
const std::unique_ptr<ScreenCreator>& getScreenCreator() const;
CrossMobile::Platform::Bridge& getBridge();
static Application* getInstance();
private:
UILoop _uiLoop;
ApiThreadPool _apiThreadPool;
Preferences _preferences;
std::unique_ptr<CrossMobile::Platform::Bridge> _bridge;
std::unique_ptr<ScreenCreator> _screenCreator;
};
|
Fix ApiThreadPool after android changes
|
Fix ApiThreadPool after android changes
|
C
|
apache-2.0
|
gelldur/DexodeEngine,gelldur/DexodeEngine,gelldur/DexodeEngine
|
cb7e078f9a6dcb0762ee5a006f40253e6e510879
|
TLKSocketIOSignalingDelegate.h
|
TLKSocketIOSignalingDelegate.h
|
//
// TLKSocketIOSignalingDelegate.h
// Copyright (c) 2014 &yet, LLC and TLKWebRTC contributors
//
#import <Foundation/Foundation.h>
@class TLKSocketIOSignaling;
@protocol TLKSocketIOSignalingDelegate <NSObject>
@optional
// Called when a connect request has failed due to a bad room key. Delegate is expected to
// get the room key from the user, and then call connect again with the correct key
-(void)serverRequiresPassword:(TLKSocketIOSignaling*)server;
-(void)addedStream:(TLKMediaStreamWrapper*)stream;
-(void)removedStream:(TLKMediaStreamWrapper*)stream;
-(void)peer:(NSString*)peer toggledAudioMute:(BOOL)mute;
-(void)peer:(NSString*)peer toggledVideoMute:(BOOL)mute;
-(void)lockChange:(BOOL)locked;
@end
|
//
// TLKSocketIOSignalingDelegate.h
// Copyright (c) 2014 &yet, LLC and TLKWebRTC contributors
//
#import <Foundation/Foundation.h>
@class TLKSocketIOSignaling;
@class TLKMediaStreamWrapper;
@protocol TLKSocketIOSignalingDelegate <NSObject>
@optional
// Called when a connect request has failed due to a bad room key. Delegate is expected to
// get the room key from the user, and then call connect again with the correct key
-(void)serverRequiresPassword:(TLKSocketIOSignaling*)server;
-(void)addedStream:(TLKMediaStreamWrapper*)stream;
-(void)removedStream:(TLKMediaStreamWrapper*)stream;
-(void)peer:(NSString*)peer toggledAudioMute:(BOOL)mute;
-(void)peer:(NSString*)peer toggledVideoMute:(BOOL)mute;
-(void)lockChange:(BOOL)locked;
@end
|
Fix missing class forward declaration that could cause build errors with some include orders.
|
Fix missing class forward declaration that could cause build errors with some include orders.
|
C
|
mit
|
otalk/TLKSimpleWebRTC,martinkubat/TLKSimpleWebRTC
|
e3e136ee56fdb815e408b5764cf0f1e54fe7ad17
|
sbr/seq_setprev.c
|
sbr/seq_setprev.c
|
/*
* seq_setprev.c -- set the Previous-Sequence
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include <h/mh.h>
/*
* Add all the messages currently SELECTED to
* the Previous-Sequence. This way, when the next
* command is given, there is a convenient way to
* selected all the messages used in the previous
* command.
*/
void
seq_setprev (struct msgs *mp)
{
char **ap, *cp, *dp;
/*
* Get the list of sequences for Previous-Sequence
* and split them.
*/
if ((cp = context_find (psequence))) {
dp = getcpy (cp);
if (!(ap = brkstring (dp, " ", "\n")) || !*ap) {
free (dp);
return;
}
} else {
return;
}
/* Now add all SELECTED messages to each sequence */
for (; *ap; ap++)
seq_addsel (mp, *ap, -1, 1);
free (dp);
}
|
/*
* seq_setprev.c -- set the Previous-Sequence
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include <h/mh.h>
#include <h/utils.h>
/*
* Add all the messages currently SELECTED to
* the Previous-Sequence. This way, when the next
* command is given, there is a convenient way to
* selected all the messages used in the previous
* command.
*/
void
seq_setprev (struct msgs *mp)
{
char **ap, *cp, *dp;
/*
* Get the list of sequences for Previous-Sequence
* and split them.
*/
if ((cp = context_find (psequence))) {
dp = mh_xstrdup(cp);
if (!(ap = brkstring (dp, " ", "\n")) || !*ap) {
free (dp);
return;
}
} else {
return;
}
/* Now add all SELECTED messages to each sequence */
for (; *ap; ap++)
seq_addsel (mp, *ap, -1, 1);
free (dp);
}
|
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
|
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
|
C
|
bsd-3-clause
|
mcr/nmh,mcr/nmh
|
f98fbd91e74a366419c67071b39519b28c0e112c
|
cbits/honk-windows.c
|
cbits/honk-windows.c
|
/*
* Copyright 2011 Chris Wong.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "honk-windows.h"
#if !(defined(_WIN32))
# error This file can only be used on Microsoft Windows systems.
#endif
#include <windows.h>
/**
* Windows doesn't need a handle to the console,
* so we just use an arbitrary value instead
*/
static const int default_handle = 42;
int
beep_open() {
return default_handle;
}
int
beep_do(handle_t handle, double freq, double len) {
/* Check the user passed in the same handle we gave them earlier */
if (handle != default_handle)
FAIL;
/* Perform the beep */
Beep((DWORD) freq, (DWORD) (len * 1000));
/* Return the handle */
return handle;
}
void
beep_close(handle_t handle) {
/* Turn off the speaker, if it is running */
Beep(0, 0);
}
|
/*
* Copyright 2011 Chris Wong.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "honk.h"
#if !(defined(_WIN32))
# error This file can only be used on Microsoft Windows systems.
#endif
#include <windows.h>
/**
* Windows doesn't need a handle to the console,
* so we just use an arbitrary value instead
*/
static const int default_handle = 42;
int
beep_open() {
return default_handle;
}
int
beep_do(handle_t handle, double freq, double len) {
/* Check the user passed in the same handle we gave them earlier */
if (handle != default_handle)
FAIL;
/* Perform the beep */
Beep((DWORD) freq, (DWORD) (len * 1000));
/* Return the handle */
return handle;
}
void
beep_close(handle_t handle) {
/* Turn off the speaker, if it is running */
Beep(0, 0);
}
|
Fix typo in header name
|
Fix typo in header name
|
C
|
apache-2.0
|
lfairy/honk
|
33e867ba6f31305b4591c77bfee8118fc3b4a349
|
chrome/browser/cocoa/objc_zombie.h
|
chrome/browser/cocoa/objc_zombie.h
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#pragma once
#import <Foundation/Foundation.h>
// You should think twice every single time you use anything from this
// namespace.
namespace ObjcEvilDoers {
// Enable zombies. Returns NO if it fails to enable.
//
// When |zombieAllObjects| is YES, all objects inheriting from
// NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie
// is queried to determine whether to make the object a zombie.
//
// |zombieCount| controls how many zombies to store before freeing the
// oldest. Set to 0 to free objects immediately after making them
// zombies.
BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount);
// Disable zombies.
void ZombieDisable();
} // namespace ObjcEvilDoers
@interface NSObject (CrZombie)
- (BOOL)shouldBecomeCrZombie;
@end
#endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#pragma once
#import <Foundation/Foundation.h>
// You should think twice every single time you use anything from this
// namespace.
namespace ObjcEvilDoers {
// Enable zombie object debugging. This implements a variant of Apple's
// NSZombieEnabled which can help expose use-after-free errors where messages
// are sent to freed Objective-C objects in production builds.
//
// Returns NO if it fails to enable.
//
// When |zombieAllObjects| is YES, all objects inheriting from
// NSObject become zombies on -dealloc. If NO, -shouldBecomeCrZombie
// is queried to determine whether to make the object a zombie.
//
// |zombieCount| controls how many zombies to store before freeing the
// oldest. Set to 0 to free objects immediately after making them
// zombies.
BOOL ZombieEnable(BOOL zombieAllObjects, size_t zombieCount);
// Disable zombies.
void ZombieDisable();
} // namespace ObjcEvilDoers
@interface NSObject (CrZombie)
- (BOOL)shouldBecomeCrZombie;
@end
#endif // CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
|
Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before.
|
Add link to explanation of what we mean by zombie
The person triaging / debugging a zombie crash may never have heard of this before.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3763002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@62723 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium
|
79278824c6433ef6634532a1b5192961acc248a4
|
libqimessaging/c/qimessaging/c/object_c.h
|
libqimessaging/c/qimessaging/c/object_c.h
|
/*
**
** Author(s):
** - Cedric GESTES <gestes@aldebaran-robotics.com>
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#ifndef _QIMESSAGING_OBJECT_H_
#define _QIMESSAGING_OBJECT_H_
#include <qimessaging/c/api_c.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct qi_object_t_s {} qi_object_t;
//forward declaration
typedef struct qi_message_t_s qi_message_t;
typedef struct qi_future_t_s qi_future_t;
QIMESSAGING_API typedef void (*qi_object_method_t)(const char *complete_signature, qi_message_t *msg, qi_message_t *ret, void *data);
QIMESSAGING_API qi_object_t *qi_object_create(const char *name);
QIMESSAGING_API void qi_object_destroy(qi_object_t *object);
QIMESSAGING_API int qi_object_register_method(qi_object_t *object, const char *complete_signature, qi_object_method_t func, void *data);
QIMESSAGING_API qi_future_t *qi_object_call(qi_object_t *object, const char *signature, qi_message_t *message);
#ifdef __cplusplus
}
#endif
#endif
|
/*
**
** Author(s):
** - Cedric GESTES <gestes@aldebaran-robotics.com>
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#ifndef _QIMESSAGING_OBJECT_H_
#define _QIMESSAGING_OBJECT_H_
#include <qimessaging/c/api_c.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct qi_object_t_s {} qi_object_t;
//forward declaration
typedef struct qi_message_t_s qi_message_t;
typedef struct qi_future_t_s qi_future_t;
typedef void (*qi_object_method_t)(const char *complete_signature, qi_message_t *msg, qi_message_t *ret, void *data);
QIMESSAGING_API qi_object_t *qi_object_create(const char *name);
QIMESSAGING_API void qi_object_destroy(qi_object_t *object);
QIMESSAGING_API int qi_object_register_method(qi_object_t *object, const char *complete_signature, qi_object_method_t func, void *data);
QIMESSAGING_API qi_future_t *qi_object_call(qi_object_t *object, const char *signature, qi_message_t *message);
#ifdef __cplusplus
}
#endif
#endif
|
Remove unnecessary API export on typedef
|
Remove unnecessary API export on typedef
Change-Id: Id9b225ad5a7a645763f4377c7f949e9c9bd4f890
Reviewed-on: http://gerrit.aldebaran.lan:8080/4588
Reviewed-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
Tested-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
|
C
|
bsd-3-clause
|
bsautron/libqi,aldebaran/libqi,aldebaran/libqi,aldebaran/libqi-java,aldebaran/libqi-java,aldebaran/libqi,aldebaran/libqi-java,vbarbaresi/libqi
|
2efca45c3c1e2186386bb713d4b0b37eb3adee61
|
autowiring/C++11/boost_tuple.h
|
autowiring/C++11/boost_tuple.h
|
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
#pragma once
#include <boost/tuple/tuple.hpp>
namespace std {
template<typename... Ts>
class tuple {
public:
tuple(const Ts&... ele):
m_tuple(ele...)
{}
virtual ~tuple(void){}
bool operator==(const tuple<Ts...>& other) const {
return m_tuple == other.m_tuple;
}
bool operator<(const tuple<Ts...>& other) const {
return m_tuple < other.m_tuple;
}
boost::tuple<Ts...> m_tuple;
};
template<int I, typename... Ts>
auto get(const ::std::tuple<Ts...>& tup) -> decltype(boost::get<I>(tup.m_tuple)) {
return boost::get<I>(tup.m_tuple);
}
template<typename... Ts>
::std::tuple<Ts...> make_tuple(const Ts&... ele) {
return ::std::tuple<Ts...>(ele...);
}
}//namespace std
|
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
#pragma once
#include <boost/tuple/tuple.hpp>
#include "boost/tuple/tuple_comparison.hpp"
namespace std {
template<typename... Ts>
class tuple {
public:
tuple(const Ts&... ele):
m_tuple(ele...)
{}
virtual ~tuple(void){}
bool operator==(const tuple<Ts...>& other) const {
return m_tuple == other.m_tuple;
}
bool operator<(const tuple<Ts...>& other) const {
return m_tuple < other.m_tuple;
}
boost::tuple<Ts...> m_tuple;
};
template<int I, typename... Ts>
auto get(const ::std::tuple<Ts...>& tup) -> decltype(boost::get<I>(tup.m_tuple)) {
return boost::get<I>(tup.m_tuple);
}
template<typename... Ts>
::std::tuple<Ts...> make_tuple(const Ts&... ele) {
return ::std::tuple<Ts...>(ele...);
}
}//namespace std
|
Add boost tuple comparison header
|
Add boost tuple comparison header
|
C
|
apache-2.0
|
codemercenary/autowiring,leapmotion/autowiring,codemercenary/autowiring,leapmotion/autowiring,codemercenary/autowiring,codemercenary/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,leapmotion/autowiring,codemercenary/autowiring,codemercenary/autowiring
|
3dbfb109ef1ee964a95c283076821be2bcaa896e
|
include/visionaray/math/ray.h
|
include/visionaray/math/ray.h
|
// This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_MATH_RAY_H
#define VSNRAY_MATH_RAY_H 1
#include "config.h"
#include "vector.h"
namespace MATH_NAMESPACE
{
template <typename T>
class basic_ray
{
public:
typedef T scalar_type;
typedef vector<3, T> vec_type;
public:
vec_type ori;
vec_type dir;
basic_ray() = default;
MATH_FUNC basic_ray(vector<3, T> const& o, vector<3, T> const& d);
};
} // MATH_NAMESPACE
#include "detail/ray.inl"
#endif // VSNRAY_MATH_RAY_H
|
// This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_MATH_RAY_H
#define VSNRAY_MATH_RAY_H 1
#include "config.h"
#include "vector.h"
namespace MATH_NAMESPACE
{
template <typename T>
class basic_ray
{
public:
typedef T scalar_type;
typedef vector<3, T> vec_type;
public:
vec_type ori;
vec_type dir;
MATH_FUNC basic_ray() = default;
MATH_FUNC basic_ray(vector<3, T> const& o, vector<3, T> const& d);
};
} // MATH_NAMESPACE
#include "detail/ray.inl"
#endif // VSNRAY_MATH_RAY_H
|
Mark default ctor host/device for hcc
|
Mark default ctor host/device for hcc
|
C
|
mit
|
szellmann/visionaray,szellmann/visionaray
|
9c44b57857b611f81c040d6ca57cff0908029e77
|
mudlib/mud/home/System/lib/auto/second_auto.c
|
mudlib/mud/home/System/lib/auto/second_auto.c
|
#include <kotaka/privilege.h>
#include <kotaka/paths.h>
#include <kotaka/log.h>
#include <trace.h>
#include <type.h>
#include <status.h>
inherit "call_guard";
inherit "callout_guard";
inherit "touch";
inherit "object";
object canary;
/**********/
/* status */
/**********/
void set_canary(object new_canary)
{
ACCESS_CHECK(SYSTEM());
canary = new_canary;
}
object query_canary()
{
ACCESS_CHECK(SYSTEM());
return canary;
}
nomask void _F_dummy()
{
}
nomask mixed _F_status(mixed args ...)
{
ACCESS_CHECK(SYSTEM());
return status(this_object(), args ...);
}
|
#include <kotaka/privilege.h>
#include <kotaka/paths.h>
#include <kotaka/log.h>
#include <trace.h>
#include <type.h>
#include <status.h>
inherit "call_guard";
inherit "callout_guard";
inherit "touch";
inherit "object";
object canary;
/**********/
/* status */
/**********/
void set_canary(object new_canary)
{
ACCESS_CHECK(SYSTEM());
canary = new_canary;
}
object query_canary()
{
ACCESS_CHECK(SYSTEM());
return canary;
}
nomask void _F_dummy()
{
}
nomask mixed _F_status(mixed args ...)
{
ACCESS_CHECK(SYSTEM());
return status(this_object(), args ...);
}
#if 0
nomask void save_object(string filename)
{
error("save_object is disabled");
}
nomask void restore_object(string filename)
{
error("restore_object is disabled");
}
#endif
|
Allow disable of save/restore object
|
Allow disable of save/restore object
|
C
|
agpl-3.0
|
shentino/kotaka,shentino/kotaka,shentino/kotaka
|
b2340338a2ae45bc6e4481893fb7c70b9a662840
|
lib/StaticAnalyzer/Checkers/InterCheckerAPI.h
|
lib/StaticAnalyzer/Checkers/InterCheckerAPI.h
|
//==--- InterCheckerAPI.h ---------------------------------------*- C++ -*-==//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// This file allows introduction of checker dependencies. It contains APIs for
// inter-checker communications.
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_INTERCHECKERAPI_H
#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_INTERCHECKERAPI_H
namespace clang {
namespace ento {
/// Register the checker which evaluates CString API calls.
void registerCStringCheckerBasic(CheckerManager &Mgr);
}}
#endif /* INTERCHECKERAPI_H_ */
|
//==--- InterCheckerAPI.h ---------------------------------------*- C++ -*-==//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// This file allows introduction of checker dependencies. It contains APIs for
// inter-checker communications.
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_INTERCHECKERAPI_H
#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_INTERCHECKERAPI_H
namespace clang {
class CheckerManager;
namespace ento {
/// Register the checker which evaluates CString API calls.
void registerCStringCheckerBasic(CheckerManager &Mgr);
}}
#endif /* INTERCHECKERAPI_H_ */
|
Add a missing forward def of CheckerManager. NFC.
|
Add a missing forward def of CheckerManager. NFC.
This file doesn't include CheckerManager or forward declare it, so is sensitive to include order.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@235209 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
4a12cae7ef2612eb094c4b48e8b37cf837e3df55
|
arch/arm64/include/asm/spinlock_types.h
|
arch/arm64/include/asm/spinlock_types.h
|
/*
* Copyright (C) 2012 ARM Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 __ASM_SPINLOCK_TYPES_H
#define __ASM_SPINLOCK_TYPES_H
#if !defined(__LINUX_SPINLOCK_TYPES_H) && !defined(__ASM_SPINLOCK_H)
# error "please don't include this file directly"
#endif
#define TICKET_SHIFT 16
typedef struct {
u16 owner;
u16 next;
} __aligned(4) arch_spinlock_t;
#define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 }
typedef struct {
volatile unsigned int lock;
} arch_rwlock_t;
#define __ARCH_RW_LOCK_UNLOCKED { 0 }
#endif
|
/*
* Copyright (C) 2012 ARM Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 __ASM_SPINLOCK_TYPES_H
#define __ASM_SPINLOCK_TYPES_H
#if !defined(__LINUX_SPINLOCK_TYPES_H) && !defined(__ASM_SPINLOCK_H)
# error "please don't include this file directly"
#endif
#define TICKET_SHIFT 16
typedef struct {
#ifdef __AARCH64EB__
u16 next;
u16 owner;
#else
u16 owner;
u16 next;
#endif
} __aligned(4) arch_spinlock_t;
#define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 }
typedef struct {
volatile unsigned int lock;
} arch_rwlock_t;
#define __ARCH_RW_LOCK_UNLOCKED { 0 }
#endif
|
Fix the endianness of arch_spinlock_t
|
arm64: Fix the endianness of arch_spinlock_t
The owner and next members of the arch_spinlock_t structure need to be
swapped when compiling for big endian.
Signed-off-by: Catalin Marinas <15ce75b290ebaf27c3f9fd73ab848685ed3d8261@arm.com>
Reported-by: Matthew Leach <968f99dd328b703d57aa48028082f52162903fed@arm.com>
Acked-by: Will Deacon <b913f13ef92ac157955c954ccaaff7be065faba4@arm.com>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
b129ff9f3ce7d5f931d16f6eb0d68b9ee95ebc22
|
InputPacket.h
|
InputPacket.h
|
#pragma once
#include <cstdint>
namespace ni {
struct InputPacket {
constexpr static int MAGIC = 0xD00D;
constexpr static int TYPE_LENGTH = 16;
constexpr static int DATA_LENGTH = 128;
uint16_t magic;
char type[TYPE_LENGTH];
uint16_t length;
uint8_t data[DATA_LENGTH];
bool isValid() const;
bool isSafe() const;
};
}
|
#pragma once
#include <cstdint>
#include "DeviceType.h"
namespace ni {
struct InputPacket {
constexpr static int MAGIC = 0xD00D;
constexpr static int DATA_LENGTH = 128;
uint16_t magic;
DeviceType type;
uint16_t length;
uint8_t data[DATA_LENGTH];
bool isValid() const;
bool isSafe() const;
};
}
|
Use DeviceType enum for the type field.
|
Use DeviceType enum for the type field.
|
C
|
mit
|
jack-karamanian/NetInput
|
f8c9e7d30e824f4b1a983b4b1134feba4385293e
|
src/gui/GuiText.h
|
src/gui/GuiText.h
|
//
// Created by dar on 2/13/16.
//
#ifndef C003_GUITEXT_H
#define C003_GUITEXT_H
#include "GuiElement.h"
#include <string>
class GuiText : public GuiElement {
public:
GuiText(const std::string &string, int x, int y, char position, float scale, int color, char flags) {
this->string = string;
this->rawX = x;
this->rawY = y;
this->positionFlag = position;
this->scale = scale;
this->recalculateSize();
}
const std::string &getString() const {
return string;
}
void updateString(const std::string &string) {
this->string = string;
this->recalculateSize();
}
float getScale() const {
return scale;
}
void setScale(float scale) {
GuiText::scale = scale;
}
int getColor() const {
return color;
}
void setColor(int color) {
GuiText::color = color;
}
char getFlags() const {
return flags;
}
void setFlags(char flags) {
GuiText::flags = flags;
}
private:
std::string string;
float scale;
int color;
char flags;
void recalculateSize() {
//TODO this->width = getStringWidth(string); this->height = ...
}
};
#endif //C003_GUITEXT_H
|
//
// Created by dar on 2/13/16.
//
#ifndef C003_GUITEXT_H
#define C003_GUITEXT_H
#include "GuiElement.h"
#include <string>
class GuiText : public GuiElement {
public:
GuiText(const std::string &string, int x, int y, char position, float scale, int color, char flags) {
this->string = string;
this->rawX = x;
this->rawY = y;
this->positionFlag = position;
this->scale = scale;
this->flags = flags;
this->recalculateSize();
}
const std::string &getString() const {
return string;
}
void updateString(const std::string &string) {
this->string = string;
this->recalculateSize();
}
float getScale() const {
return scale;
}
void setScale(float scale) {
GuiText::scale = scale;
}
int getColor() const {
return color;
}
void setColor(int color) {
GuiText::color = color;
}
char getFlags() const {
return flags;
}
void setFlags(char flags) {
GuiText::flags = flags;
}
private:
std::string string;
float scale;
int color;
char flags;
void recalculateSize() {
//TODO this->width = getStringWidth(string); this->height = ...
}
};
#endif //C003_GUITEXT_H
|
Set "flags" variable in constructor
|
Set "flags" variable in constructor
|
C
|
mit
|
darsto/spooky,darsto/spooky
|
8f39850a0cc1114eeb77d3e71fa2eed98f61ca87
|
ffmpeg/lpms_ffmpeg.h
|
ffmpeg/lpms_ffmpeg.h
|
#include <libavutil/rational.h>
typedef struct {
char *fname;
int w, h, bitrate;
AVRational fps;
} output_params;
void lpms_init();
void lpms_deinit();
int lpms_rtmp2hls(char *listen, char *outf, char *ts_tmpl, char *seg_time, char *seg_start);
int lpms_transcode(char *inp, output_params *params, int nb_outputs);
int lpms_length(char *inp, int ts_max, int packet_max);
|
#ifndef _LPMS_FFMPEG_H_
#define _LPMS_FFMPEG_H_
#include <libavutil/rational.h>
typedef struct {
char *fname;
int w, h, bitrate;
AVRational fps;
} output_params;
void lpms_init();
int lpms_rtmp2hls(char *listen, char *outf, char *ts_tmpl, char *seg_time, char *seg_start);
int lpms_transcode(char *inp, output_params *params, int nb_outputs);
#endif // _LPMS_FFMPEG_H_
|
Remove unused declarations from headers.
|
ffmpeg: Remove unused declarations from headers.
Also add some include guards.
|
C
|
mit
|
livepeer/lpms,livepeer/lpms,livepeer/lpms,livepeer/lpms
|
809c60bbcec764ce8068515dac7d853d1d2771a6
|
pgf+/include/gf/IOException.h
|
pgf+/include/gf/IOException.h
|
//
// IOException.h
// pgf+
//
// Created by Emil Djupfeldt on 2012-06-22.
// Copyright (c) 2012 Chalmers University of Technology. All rights reserved.
//
#ifndef pgf__IOException_h
#define pgf__IOException_h
#include <gf/Exception.h>
namespace gf {
class IOException : public Exception {
private:
public:
IOException();
IOException(const std::string& message);
virtual ~IOException();
};
}
#endif
|
//
// IOException.h
// pgf+
//
// Created by Emil Djupfeldt on 2012-06-22.
// Copyright (c) 2012 Chalmers University of Technology. All rights reserved.
//
#ifndef pgf__IOException_h
#define pgf__IOException_h
#include <gf/Exception.h>
namespace gf {
class IOException : public Exception {
private:
public:
IOException();
IOException(const std::string& message);
IOException(int err);
virtual ~IOException();
};
}
#endif
|
Add a constructor taking an c error number.
|
Add a constructor taking an c error number.
|
C
|
bsd-2-clause
|
egladil/mscthesis,egladil/mscthesis,egladil/mscthesis
|
458cc64daaccf3d2e69222538aeaf3598eed1137
|
libkcal/kcalversion.h
|
libkcal/kcalversion.h
|
/*
This file is part of libkcal.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KCAL_KCALVERSION_H
#define KCAL_KCALVERSION_H
#define LIBKCAL_IS_VERSION( a,b,c ) ( LIBKCAL_VERSION >= KDE_MAKE_VERSION(a,b,c) )
#define LIBKCAL_VERSION KDE_MAKE_VERSION(1,1,0)
#define LIBKCAL_VERSIONSTR "1.1"
#endif
|
/*
This file is part of libkcal.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KCAL_KCALVERSION_H
#define KCAL_KCALVERSION_H
#define LIBKCAL_IS_VERSION( a,b,c ) ( LIBKCAL_VERSION >= KDE_MAKE_VERSION(a,b,c) )
#define LIBKCAL_VERSION KDE_MAKE_VERSION(1,2,0)
#define LIBKCAL_VERSIONSTR "1.2"
#endif
|
Increase libkcal version number, since we had bic changes since kde 3.3....
|
Increase libkcal version number, since we had bic changes since kde 3.3....
svn path=/trunk/kdepim/; revision=385823
|
C
|
lgpl-2.1
|
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
|
48d1fe7a3839c98aa923e98e8c77574c9c611d9b
|
tensorflow_serving/util/inline_executor.h
|
tensorflow_serving/util/inline_executor.h
|
/* Copyright 2016 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.
==============================================================================*/
#ifndef TENSORFLOW_SERVING_UTIL_INLINE_EXECUTOR_H_
#define TENSORFLOW_SERVING_UTIL_INLINE_EXECUTOR_H_
#include <functional>
#include "tensorflow/core/platform/macros.h"
#include "tensorflow_serving/util/executor.h"
namespace tensorflow {
namespace serving {
// An InlineExecutor is a trivial executor that immediately executes the closure
// given to it. It's useful as a mock, and in cases where an executor is needed,
// but multi-threadedness is not.
class InlineExecutor : public Executor {
public:
InlineExecutor();
~InlineExecutor() override;
void Schedule(std::function<void()> fn) override;
};
} // namespace serving
} // namespace tensorflow
#endif // TENSORFLOW_SERVING_UTIL_INLINE_EXECUTOR_H_
|
/* Copyright 2016 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.
==============================================================================*/
#ifndef TENSORFLOW_SERVING_UTIL_INLINE_EXECUTOR_H_
#define TENSORFLOW_SERVING_UTIL_INLINE_EXECUTOR_H_
#include <functional>
#include "tensorflow/core/platform/macros.h"
#include "tensorflow_serving/util/executor.h"
namespace tensorflow {
namespace serving {
// An InlineExecutor is a trivial executor that immediately executes the closure
// given to it. It's useful as a fake, and in cases where an executor is needed,
// but multi-threadedness is not.
class InlineExecutor : public Executor {
public:
InlineExecutor();
~InlineExecutor() override;
void Schedule(std::function<void()> fn) override;
};
} // namespace serving
} // namespace tensorflow
#endif // TENSORFLOW_SERVING_UTIL_INLINE_EXECUTOR_H_
|
Correct mock -> fake in InlineExecutor documentation. Change: 163386931
|
Correct mock -> fake in InlineExecutor documentation.
Change: 163386931
|
C
|
apache-2.0
|
sreddybr3/serving,penguin138/serving,penguin138/serving,tensorflow/serving,tensorflow/serving,penguin138/serving,sreddybr3/serving,tensorflow/serving,tensorflow/serving,sreddybr3/serving,penguin138/serving,sreddybr3/serving
|
2448675327ceaa844ae2fab4a15c46d0981cad17
|
test/test_encode_int.c
|
test/test_encode_int.c
|
#include <bert/encoder.h>
#include <bert/magic.h>
#include <bert/errno.h>
#include "test.h"
unsigned char output[6];
void test_output()
{
if (output[0] != BERT_MAGIC)
{
test_fail("bert_encoder_push did not add the magic byte");
}
if (output[1] != BERT_INT)
{
test_fail("bert_encoder_push did not add the INT magic byte");
}
unsigned int i;
for (i=2;i<6;i++)
{
if (output[i] != 0xff)
{
test_fail("output[%u] is 0x%x, expected 0x%x",output[i],0xff);
}
}
}
int main()
{
bert_encoder_t *encoder = test_encoder(output,6);
bert_data_t *data;
if (!(data = bert_data_create_int(0xffffffff)))
{
test_fail("malloc failed");
}
test_encoder_push(encoder,data);
bert_data_destroy(data);
bert_encoder_destroy(encoder);
test_output();
return 0;
}
|
#include <bert/encoder.h>
#include <bert/magic.h>
#include <bert/errno.h>
#include "test.h"
unsigned char output[6];
void test_output()
{
if (output[0] != BERT_MAGIC)
{
test_fail("bert_encoder_push did not add the magic byte");
}
if (output[1] != BERT_INT)
{
test_fail("bert_encoder_push did not add the INT magic byte");
}
unsigned char bytes[] = {0xff, 0xff, 0xff, 0xff};
test_bytes(output+2,bytes,4);
}
int main()
{
bert_encoder_t *encoder = test_encoder(output,6);
bert_data_t *data;
if (!(data = bert_data_create_int(0xffffffff)))
{
test_fail("malloc failed");
}
test_encoder_push(encoder,data);
bert_data_destroy(data);
bert_encoder_destroy(encoder);
test_output();
return 0;
}
|
Make use of test_bytes in the int encoder test.
|
Make use of test_bytes in the int encoder test.
|
C
|
mit
|
postmodern/libBERT
|
5a420f60da6ebf3aadaa5130ee5ce097d1f982b5
|
libraries/datastruct/hash/lookup-node.c
|
libraries/datastruct/hash/lookup-node.c
|
/* lookup-node.c -- hash */
#include <stdlib.h>
#include "datastruct/hash.h"
#include "impl.h"
hash_node_t **hash_lookup_node(hash_t *h, const void *key)
{
int hash;
hash_node_t **n;
hash = h->hash_fn(key) % h->nbins;
for (n = &h->bins[hash]; *n != NULL; n = &(*n)->next)
if (h->compare(key, (*n)->key) == 0)
break;
return n;
}
|
/* lookup-node.c -- hash */
#include <stdlib.h>
#include "datastruct/hash.h"
#include "impl.h"
hash_node_t **hash_lookup_node(hash_t *h, const void *key)
{
unsigned int hash;
hash_node_t **n;
hash = h->hash_fn(key) % h->nbins;
for (n = &h->bins[hash]; *n != NULL; n = &(*n)->next)
if (h->compare(key, (*n)->key) == 0)
break;
return n;
}
|
Make return type decl match hash_fn.
|
hash_lookup_node: Make return type decl match hash_fn.
|
C
|
bsd-2-clause
|
dpt/DPTLib
|
877bfcfaf592e63916333fd644bb8f30b673f35d
|
lib/sanitizer_common/sanitizer_placement_new.h
|
lib/sanitizer_common/sanitizer_placement_new.h
|
//===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.
//
// The file provides 'placement new'.
// Do not include it into header files, only into source files.
//===----------------------------------------------------------------------===//
#ifndef SANITIZER_PLACEMENT_NEW_H
#define SANITIZER_PLACEMENT_NEW_H
#include "sanitizer_internal_defs.h"
#if __WORDSIZE == 64
inline void *operator new(__sanitizer::uptr sz, void *p) {
return p;
}
#else
inline void *operator new(__sanitizer::u32 sz, void *p) {
return p;
}
#endif
#endif // SANITIZER_PLACEMENT_NEW_H
|
//===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.
//
// The file provides 'placement new'.
// Do not include it into header files, only into source files.
//===----------------------------------------------------------------------===//
#ifndef SANITIZER_PLACEMENT_NEW_H
#define SANITIZER_PLACEMENT_NEW_H
#include "sanitizer_internal_defs.h"
namespace __sanitizer {
#if (__WORDSIZE == 64) || defined(__APPLE__)
typedef __sanitizer::uptr operator_new_ptr_type;
#else
typedef __sanitizer::u32 operator_new_ptr_type;
#endif
} // namespace __sanitizer
inline void *operator new(operator_new_ptr_type sz, void *p) {
return p;
}
#endif // SANITIZER_PLACEMENT_NEW_H
|
Fix type for placement new on 32-bit Mac
|
[Sanitizer] Fix type for placement new on 32-bit Mac
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@158524 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
|
28f427e69ea72b113380a835c1096c1e15ca4d22
|
src/include/dev/char_device.h
|
src/include/dev/char_device.h
|
/**
* @file
* @description char devices
*/
#ifndef __CHAR_DEVICE_H
#define __CHAR_DEVICE_H
typedef struct chardev {
int (*putc) (void);
int (*getc) (int);
} chardev_t;
#define MAX_COUNT_CHAR_DEVICES 10
static chardev_t pool_chardev[MAX_COUNT_CHAR_DEVICES];
static int chardev_c = 0;
#define ADD_CHAR_DEVICE(__NAME,__IN,__OUT) \
int __NAME=0;\
__NAME=chardev_c; \
pool_chardev[chardev_c++] = { \
.getc = __IN; \
.putc = __OUT;\
};
#endif /* __CHAR_DEVICE_H */
|
/**
* @file
* @description char devices
*/
#ifndef __CHAR_DEVICE_H
#define __CHAR_DEVICE_H
typedef struct chardev {
int (*putc) (void);
int (*getc) (int);
} chardev_t;
#if 0
#define MAX_COUNT_CHAR_DEVICES 10
static chardev_t pool_chardev[MAX_COUNT_CHAR_DEVICES];
static int chardev_c = 0;
#define ADD_CHAR_DEVICE(__NAME,__IN,__OUT) \
int __NAME=0;\
__NAME=chardev_c; \
pool_chardev[chardev_c++] = { \
.getc = __IN; \
.putc = __OUT;\
};
#endif
#endif /* __CHAR_DEVICE_H */
|
Delete char_dev massive from header
|
Delete char_dev massive from header
|
C
|
bsd-2-clause
|
gzoom13/embox,vrxfile/embox-trik,Kefir0192/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,mike2390/embox,embox/embox,embox/embox,abusalimov/embox,embox/embox,embox/embox,mike2390/embox,Kakadu/embox,Kakadu/embox,abusalimov/embox,vrxfile/embox-trik,Kefir0192/embox,abusalimov/embox,Kakadu/embox,gzoom13/embox,mike2390/embox,vrxfile/embox-trik,Kakadu/embox,Kakadu/embox,mike2390/embox,Kefir0192/embox,gzoom13/embox,vrxfile/embox-trik,embox/embox,vrxfile/embox-trik,Kefir0192/embox,gzoom13/embox,gzoom13/embox,abusalimov/embox,gzoom13/embox,Kakadu/embox,embox/embox,Kefir0192/embox,mike2390/embox,Kakadu/embox,mike2390/embox,abusalimov/embox,vrxfile/embox-trik,Kefir0192/embox
|
26d810473db6b338ffcf6fb21cb7dc35e6d7cffc
|
src/fake-lock-screen-pattern.h
|
src/fake-lock-screen-pattern.h
|
#ifndef _FAKE_LOCK_SCREEN_PATTERN_H_
#define _FAKE_LOCK_SCREEN_PATTERN_H_
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
#endif
typedef struct _FakeLockOption {
void *module;
gchar *real;
gchar *dummy;
} FakeLockOption;
typedef struct {
gint mark;
gint value;
GdkPoint top_left;
GdkPoint bottom_right;
} FakeLockPatternPoint;
typedef enum {
FLSP_ONE_STROKE,
FLSP_ON_BOARD,
FLSP_N_PATTERN,
} FakeLockScreenPattern;
void flsp_draw_circle(cairo_t *context,
gint x, gint y, gint radius,
GdkRGBA circle, GdkRGBA border);
gboolean is_marked(gint x, gint y,
gint *marked, void *user_data);
#endif
|
#ifndef _FAKE_LOCK_SCREEN_PATTERN_H_
#define _FAKE_LOCK_SCREEN_PATTERN_H_
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
#endif
typedef struct _FakeLockOption {
void *module;
gint width;
gint height;
gchar *real;
gchar *dummy;
} FakeLockOption;
typedef struct {
gint mark;
gint value;
GdkPoint top_left;
GdkPoint bottom_right;
} FakeLockPatternPoint;
typedef enum {
FLSP_ONE_STROKE,
FLSP_ON_BOARD,
FLSP_N_PATTERN,
} FakeLockScreenPattern;
void flsp_draw_circle(cairo_t *context,
gint x, gint y, gint radius,
GdkRGBA circle, GdkRGBA border);
gboolean is_marked(gint x, gint y,
gint *marked, void *user_data);
#endif
|
Store size of drawing area
|
Store size of drawing area
|
C
|
mit
|
kenhys/fake-lock-screen-pattern,kenhys/fake-lock-screen-pattern
|
8d8f4eef73993a3ea51b47c2d7a7c238b627369a
|
src/modules/graphics/opengl.h
|
src/modules/graphics/opengl.h
|
#ifdef LOVR_WEBGL
#include <GLES3/gl3.h>
#include <GLES2/gl2ext.h>
#include <GL/gl.h>
#include <GL/glext.h>
#else
#include "lib/glad/glad.h"
#endif
#include <stdint.h>
#pragma once
#define GPU_BUFFER_FIELDS \
uint32_t id; \
uint8_t incoherent;
#define GPU_CANVAS_FIELDS \
uint32_t framebuffer; \
uint32_t resolveBuffer; \
uint32_t depthBuffer; \
bool immortal;
#define GPU_MESH_FIELDS \
uint32_t vao; \
uint32_t ibo;
#define GPU_SHADER_FIELDS \
uint32_t program;
#define GPU_TEXTURE_FIELDS \
GLuint id; \
GLuint msaaId; \
GLenum target; \
uint8_t incoherent;
|
#ifdef LOVR_WEBGL
#include <GLES3/gl3.h>
#include <GLES2/gl2ext.h>
#include <GL/gl.h>
#include <GL/glext.h>
#else
#include "lib/glad/glad.h"
#endif
#include <stdint.h>
#pragma once
#define GPU_BUFFER_FIELDS \
uint32_t id; \
uint8_t incoherent;
#define GPU_CANVAS_FIELDS \
uint32_t framebuffer; \
uint32_t resolveBuffer; \
uint32_t depthBuffer; \
bool immortal;
#define GPU_MESH_FIELDS \
uint32_t vao; \
uint32_t ibo;
#define GPU_SHADER_FIELDS \
uint32_t program;
#define GPU_TEXTURE_FIELDS \
uint8_t incoherent; \
GLuint id; \
GLuint msaaId; \
GLenum target;
|
Adjust Texture padding so it's 64 bytes;
|
Adjust Texture padding so it's 64 bytes;
|
C
|
mit
|
bjornbytes/lovr,bjornbytes/lovr,bjornbytes/lovr,bjornbytes/lovr,bjornbytes/lovr
|
f503a09cc3e24c8a87a16ab55b8bf2eedb2f0b85
|
mlpack/trunk/src/mlpack/core/tree/bounds.h
|
mlpack/trunk/src/mlpack/core/tree/bounds.h
|
/**
* @file tree/bounds.h
*
* Bounds that are useful for binary space partitioning trees.
*
* TODO: Come up with a better design so you can do plug-and-play distance
* metrics.
*
* @experimental
*/
#ifndef TREE_BOUNDS_H
#define TREE_BOUNDS_H
#include <mlpack/core/math/math_lib.h>
#include <mlpack/core/kernels/lmetric.h>
#include "hrectbound.h"
#include "dhrectperiodicbound.h"
#include "dballbound.h"
#endif // TREE_BOUNDS_H
|
/**
* @file tree/bounds.h
*
* Bounds that are useful for binary space partitioning trees.
*
* TODO: Come up with a better design so you can do plug-and-play distance
* metrics.
*
* @experimental
*/
#ifndef TREE_BOUNDS_H
#define TREE_BOUNDS_H
#include <mlpack/core/math/math_lib.h>
#include <mlpack/core/math/range.h>
#include <mlpack/core/math/kernel.h>
#include <mlpack/core/kernels/lmetric.h>
#include "hrectbound.h"
#include "dhrectperiodicbound.h"
#include "dballbound.h"
#endif // TREE_BOUNDS_H
|
Include the correct files since math_lib.h no longer does that.
|
Include the correct files since math_lib.h no longer does that.
|
C
|
bsd-3-clause
|
ersanliqiao/mlpack,ranjan1990/mlpack,trungda/mlpack,darcyliu/mlpack,Azizou/mlpack,erubboli/mlpack,ranjan1990/mlpack,thirdwing/mlpack,ajjl/mlpack,BookChan/mlpack,Azizou/mlpack,ajjl/mlpack,bmswgnp/mlpack,stereomatchingkiss/mlpack,stereomatchingkiss/mlpack,Azizou/mlpack,bmswgnp/mlpack,theranger/mlpack,theranger/mlpack,trungda/mlpack,datachand/mlpack,minhpqn/mlpack,trungda/mlpack,BookChan/mlpack,thirdwing/mlpack,ajjl/mlpack,chenmoshushi/mlpack,datachand/mlpack,minhpqn/mlpack,datachand/mlpack,erubboli/mlpack,minhpqn/mlpack,palashahuja/mlpack,darcyliu/mlpack,ranjan1990/mlpack,stereomatchingkiss/mlpack,BookChan/mlpack,palashahuja/mlpack,palashahuja/mlpack,lezorich/mlpack,ersanliqiao/mlpack,lezorich/mlpack,ersanliqiao/mlpack,lezorich/mlpack,chenmoshushi/mlpack,erubboli/mlpack,darcyliu/mlpack,theranger/mlpack,chenmoshushi/mlpack,bmswgnp/mlpack,thirdwing/mlpack
|
920b443aae561319aff2332863b45535fe016453
|
android/expoview/src/main/jni/EXGL.c
|
android/expoview/src/main/jni/EXGL.c
|
#include <stdint.h>
#include <jni.h>
#include <JavaScriptCore/JSContextRef.h>
#include "EXGL.h"
JNIEXPORT jint JNICALL
Java_host_exp_exponent_exgl_EXGL_EXGLContextCreate
(JNIEnv *env, jclass clazz, jlong jsCtxPtr) {
JSGlobalContextRef jsCtx = (JSGlobalContextRef) (intptr_t) jsCtxPtr;
if (jsCtx) {
return EXGLContextCreate(jsCtx);
}
return 0;
}
JNIEXPORT void JNICALL
Java_host_exp_exponent_exgl_EXGL_EXGLContextDestroy
(JNIEnv *env, jclass clazz, jint exglCtxId) {
EXGLContextDestroy(exglCtxId);
}
JNIEXPORT void JNICALL
Java_host_exp_exponent_exgl_EXGL_EXGLContextFlush
(JNIEnv *env, jclass clazz, jint exglCtxId) {
EXGLContextFlush(exglCtxId);
}
|
#include <stdint.h>
#include <jni.h>
#include <JavaScriptCore/JSContextRef.h>
#include "EXGL.h"
JNIEXPORT jint JNICALL
Java_host_exp_exponent_exgl_EXGL_EXGLContextCreate
(JNIEnv *env, jclass clazz, jlong jsCtxPtr) {
JSGlobalContextRef jsCtx = (JSGlobalContextRef) (intptr_t) jsCtxPtr;
if (jsCtx) {
return UEXGLContextCreate(jsCtx);
}
return 0;
}
JNIEXPORT void JNICALL
Java_host_exp_exponent_exgl_EXGL_EXGLContextDestroy
(JNIEnv *env, jclass clazz, jint exglCtxId) {
UEXGLContextDestroy(exglCtxId);
}
JNIEXPORT void JNICALL
Java_host_exp_exponent_exgl_EXGL_EXGLContextFlush
(JNIEnv *env, jclass clazz, jint exglCtxId) {
UEXGLContextFlush(exglCtxId);
}
|
Update to `UEX` prefix for unversioned C/C++ API
|
Update to `UEX` prefix for unversioned C/C++ API
fbshipit-source-id: 57bd0cb
|
C
|
bsd-3-clause
|
exponentjs/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent
|
6149b9f287815806eafa12f8ff1b310ea904e25b
|
tools/regression/tls/ttls4/ttls4.c
|
tools/regression/tls/ttls4/ttls4.c
|
/*
* This program tests if a new thread's initial tls data
* is clean.
*
* David Xu <davidxu@freebsd.org>
*
* $FreeBSD$
*/
#include <stdio.h>
#include <pthread.h>
int __thread n;
void *f1(void *arg)
{
n = 1;
return (0);
}
void *f2(void *arg)
{
if (n != 0) {
printf("bug, n == %d \n", n);
exit(1);
}
return (0);
}
int main()
{
pthread_t td;
int i;
pthread_create(&td, NULL, f1, NULL);
pthread_join(td, NULL);
for (i = 0; i < 1000; ++i) {
pthread_create(&td, NULL, f2, NULL);
pthread_yield();
pthread_join(td, NULL);
}
return (0);
}
|
/*
* This program tests if a new thread's initial tls data
* is clean.
*
* David Xu <davidxu@freebsd.org>
*
* $FreeBSD$
*/
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
int __thread n;
void *f1(void *arg)
{
if (n != 0) {
printf("bug, n == %d \n", n);
exit(1);
}
n = 1;
return (0);
}
int main()
{
pthread_t td;
int i;
for (i = 0; i < 1000; ++i) {
pthread_create(&td, NULL, f1, NULL);
pthread_join(td, NULL);
}
sleep(2);
for (i = 0; i < 1000; ++i) {
pthread_create(&td, NULL, f1, NULL);
pthread_join(td, NULL);
}
return (0);
}
|
Adjust code to be more reliable.
|
Adjust code to be more reliable.
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
e865f3e6f4ef2d2617f5003c7c819ed15b5a511b
|
include/asm-sparc/device.h
|
include/asm-sparc/device.h
|
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#include <asm-generic/device.h>
|
/*
* Arch specific extensions to struct device
*
* This file is released under the GPLv2
*/
#ifndef _ASM_SPARC_DEVICE_H
#define _ASM_SPARC_DEVICE_H
struct device_node;
struct of_device;
struct dev_archdata {
struct device_node *prom_node;
struct of_device *op;
};
#endif /* _ASM_SPARC_DEVICE_H */
|
Define minimal struct dev_archdata, similarly to sparc64.
|
[SPARC]: Define minimal struct dev_archdata, similarly to sparc64.
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
|
C
|
mit
|
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,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
4c870904cd1ae7954ea1412d9145ca75b927dc18
|
gobject/gobject-autocleanups.h
|
gobject/gobject-autocleanups.h
|
/*
* Copyright © 2015 Canonical Limited
*
* 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 of the licence, 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
#error "Only <glib-object.h> can be included directly."
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_clear)
|
/*
* Copyright © 2015 Canonical Limited
*
* 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 of the licence, 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, see <http://www.gnu.org/licenses/>.
*
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
#error "Only <glib-object.h> can be included directly."
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
|
Revert "gvalue: Use g_value_clear as clear function"
|
Revert "gvalue: Use g_value_clear as clear function"
This reverts commit 3bb2e8dfc9eae7c6abd8fbec5fa751ffcb495121.
|
C
|
lgpl-2.1
|
MathieuDuponchelle/glib,mzabaluev/glib,endlessm/glib,cention-sany/glib,MathieuDuponchelle/glib,endlessm/glib,johne53/MB3Glib,mzabaluev/glib,endlessm/glib,mzabaluev/glib,johne53/MB3Glib,cention-sany/glib,MathieuDuponchelle/glib,johne53/MB3Glib,Distrotech/glib,ieei/glib,johne53/MB3Glib,cention-sany/glib,endlessm/glib,ieei/glib,Distrotech/glib,endlessm/glib,mzabaluev/glib,johne53/MB3Glib,MathieuDuponchelle/glib,Distrotech/glib,Distrotech/glib,ieei/glib,ieei/glib,Distrotech/glib,cention-sany/glib,johne53/MB3Glib,ieei/glib,cention-sany/glib,MathieuDuponchelle/glib,mzabaluev/glib
|
e590329059edafa461324397f550cf314e35be70
|
include/dijkstra.h
|
include/dijkstra.h
|
#ifndef __DIJKSTRA_H__
#define __DIJKSTRA_H__
#include <track_node.h>
int dijkstra(const track_node* const track,
const track_node* const start,
const track_node* const end,
path_node* const path);
#endif
|
#ifndef __DIJKSTRA_H__
#define __DIJKSTRA_H__
#include <track_node.h>
#define MAX_ROUTING_TIME_ESTIMATE 5
int dijkstra(const track_node* const track,
const track_node* const start,
const track_node* const end,
path_node* const path);
#endif
|
Add a max routing time estimate (in clock ticks)
|
Add a max routing time estimate (in clock ticks)
|
C
|
mit
|
ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme
|
f72844ae685bc5516a818402115b0df8b3efd016
|
libevmjit-cpp/JitVM.h
|
libevmjit-cpp/JitVM.h
|
#pragma once
#include <libevm/VMFace.h>
#include <evmjit/libevmjit/ExecutionEngine.h>
namespace dev
{
namespace eth
{
class JitVM: public VMFace
{
public:
virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final;
private:
jit::RuntimeData m_data;
jit::ExecutionEngine m_engine;
std::unique_ptr<VMFace> m_fallbackVM; ///< VM used in case of input data rejected by JIT
};
}
}
|
#pragma once
#include <libevm/VMFace.h>
#include <evmjit/libevmjit/ExecutionEngine.h>
namespace dev
{
namespace eth
{
class JitVM: public VMFace
{
public:
virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp, uint64_t _steps) override final;
private:
jit::RuntimeData m_data;
jit::ExecutionEngine m_engine;
std::unique_ptr<VMFace> m_fallbackVM; ///< VM used in case of input data rejected by JIT
};
}
}
|
Change the way execution results are collected.
|
Change the way execution results are collected.
Changes handling ExecutionResult by Executive. From now execution results are collected on if a storage for results (ExecutionResult) is provided to an Executiove instance up front. This change allow better output management for calls - VM interface improved.
|
C
|
mit
|
ethereum/evmjit,ethereum/evmjit,ethereum/evmjit
|
61481afd2d1e81e91b533a55dc544a62738ba663
|
chrome/browser/extensions/convert_web_app.h
|
chrome/browser/extensions/convert_web_app.h
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#define CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#pragma once
#include <string>
#include "base/ref_counted.h"
class Extension;
namespace base {
class Time;
}
namespace webkit_glue {
struct WebApplicationInfo;
}
// Generates a version number for an extension from a time. The goal is to make
// use of the version number to communicate some useful information. The
// returned version has the format:
// <year>.<month><day>.<upper 16 bits of unix timestamp>.<lower 16 bits>
std::string ConvertTimeToExtensionVersion(const base::Time& time);
// Wraps the specified web app in an extension. The extension is created
// unpacked in the system temp dir. Returns a valid extension that the caller
// should take ownership on success, or NULL and |error| on failure.
//
// NOTE: This function does file IO and should not be called on the UI thread.
// NOTE: The caller takes ownership of the directory at extension->path() on the
// returned object.
scoped_refptr<Extension> ConvertWebAppToExtension(
const webkit_glue::WebApplicationInfo& web_app_info,
const base::Time& create_time);
#endif // CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#define CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
#pragma once
#include <string>
#include "base/ref_counted.h"
class Extension;
namespace base {
class Time;
}
namespace webkit_glue {
class WebApplicationInfo;
}
// Generates a version number for an extension from a time. The goal is to make
// use of the version number to communicate some useful information. The
// returned version has the format:
// <year>.<month><day>.<upper 16 bits of unix timestamp>.<lower 16 bits>
std::string ConvertTimeToExtensionVersion(const base::Time& time);
// Wraps the specified web app in an extension. The extension is created
// unpacked in the system temp dir. Returns a valid extension that the caller
// should take ownership on success, or NULL and |error| on failure.
//
// NOTE: This function does file IO and should not be called on the UI thread.
// NOTE: The caller takes ownership of the directory at extension->path() on the
// returned object.
scoped_refptr<Extension> ConvertWebAppToExtension(
const webkit_glue::WebApplicationInfo& web_app_info,
const base::Time& create_time);
#endif // CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_
|
Revert 64847 - Clang fix.
|
Revert 64847 - Clang fix.
TBR=evan@chromium.org
Review URL: http://codereview.chromium.org/4300003
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@64850 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
|
C
|
bsd-3-clause
|
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
|
ac42aa1f7aa6de3cd131ecb8224f1a6d51179760
|
libgo/go/log/syslog/syslog_c.c
|
libgo/go/log/syslog/syslog_c.c
|
/* syslog_c.c -- call syslog for Go.
Copyright 2011 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <syslog.h>
/* We need to use a C function to call the syslog function, because we
can't represent a C varargs function in Go. */
void syslog_c(int, const char*)
asm ("libgo_syslog.syslog.syslog_c");
void
syslog_c (int priority, const char *msg)
{
syslog (priority, "%s", msg);
}
|
/* syslog_c.c -- call syslog for Go.
Copyright 2011 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <syslog.h>
/* We need to use a C function to call the syslog function, because we
can't represent a C varargs function in Go. */
void syslog_c(int, const char*)
asm ("libgo_log.syslog.syslog_c");
void
syslog_c (int priority, const char *msg)
{
syslog (priority, "%s", msg);
}
|
Fix name of C syslog function.
|
syslog: Fix name of C syslog function.
From Rainer Orth.
R=iant
CC=gofrontend-dev
https://golang.org/cl/5480052
|
C
|
bsd-3-clause
|
golang/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,golang/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,golang/gofrontend
|
31e4a57f6460265515233833bead6202e7304e07
|
EmbeddedPkg/Include/Library/DebugAgentTimerLib.h
|
EmbeddedPkg/Include/Library/DebugAgentTimerLib.h
|
/** @file
Platform specific Debug Agent abstraction for timer used by the agent.
The timer is used by the debugger to break into a running program.
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __GDB_TIMER_LIB__
#define __GDB_TIMER_LIB__
/**
Setup all the hardware needed for the debug agents timer.
This function is used to set up debug enviroment. It may enable interrupts.
**/
VOID
EFIAPI
DebugAgentTimerIntialize (
VOID
);
/**
Set the period for the debug agent timer. Zero means disable the timer.
@param[in] TimerPeriodMilliseconds Frequency of the debug agent timer.
**/
VOID
EFIAPI
DebugAgentTimerSetPeriod (
IN UINT32 TimerPeriodMilliseconds
);
/**
Perform End Of Interrupt for the debug agent timer. This is called in the
interrupt handler after the interrupt has been processed.
**/
VOID
EFIAPI
DebugAgentTimerEndOfInterrupt (
VOID
);
#endif
|
/** @file
Platform specific Debug Agent abstraction for timer used by the agent.
The timer is used by the debugger to break into a running program.
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __GDB_TIMER_LIB__
#define __GDB_TIMER_LIB__
/**
Setup all the hardware needed for the debug agents timer.
This function is used to set up debug enviroment. It may enable interrupts.
**/
VOID
EFIAPI
DebugAgentTimerIntialize (
VOID
);
/**
Set the period for the debug agent timer. Zero means disable the timer.
@param[in] TimerPeriodMilliseconds Frequency of the debug agent timer.
**/
VOID
EFIAPI
DebugAgentTimerSetPeriod (
IN UINT32 TimerPeriodMilliseconds
);
/**
Perform End Of Interrupt for the debug agent timer. This is called in the
interrupt handler after the interrupt has been processed.
**/
VOID
EFIAPI
DebugAgentTimerEndOfInterrupt (
VOID
);
#endif
|
Fix newline at end of file issue.
|
Fix newline at end of file issue.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@10508 6f19259b-4bc3-4df7-8a09-765794883524
|
C
|
bsd-2-clause
|
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
|
f69cd49a44ad37edd7d3c7dcab82ab07633da72a
|
src/software_rasterizer/rasterizer.h
|
src/software_rasterizer/rasterizer.h
|
#ifndef RPLNN_RASTERIZER_H
#define RPLNN_RASTERIZER_H
/* Currently wants the points in pixel coordinates, (0, 0) at screen center increasing towards top-right. Tri wanted as CCW
* Depth buffer stores the depth in the first 24bits and the rest 8 are reserved for future use (stencil). */
void rasterizer_rasterize(uint32_t *render_target, uint32_t *depth_buf, const struct vec2_int *target_size, const struct vec4_float *vert_buf, const struct vec2_float *uv_buf, const unsigned int *ind_buf, const unsigned int index_count, uint32_t *texture, struct vec2_int *texture_size);
void rasterizer_clear_depth_buffer(uint32_t *depth_buf, const struct vec2_int *buf_size);
#endif /* RPLNN_RASTERIZER_H */
|
#ifndef RPLNN_RASTERIZER_H
#define RPLNN_RASTERIZER_H
/* Currently wants the points in pixel coordinates, (0, 0) at screen center increasing towards top-right. Tri wanted as CCW
* Depth buffer stores the depth in the first 24bits and the rest 8 are reserved for future use (stencil). */
void rasterizer_rasterize(uint32_t *render_target, uint32_t *depth_buf, const struct vec2_int *target_size,
const struct vec4_float *vert_buf, const struct vec2_float *uv_buf, const unsigned int *ind_buf, const unsigned int index_count,
uint32_t *texture, struct vec2_int *texture_size);
void rasterizer_clear_depth_buffer(uint32_t *depth_buf, const struct vec2_int *buf_size);
#endif /* RPLNN_RASTERIZER_H */
|
Clean up 7: Split function parameter list to multiple lines.
|
Clean up 7: Split function parameter list to multiple lines.
|
C
|
mit
|
ropelinen/rasterizer,ropelinen/rasterizer
|
70e0426892b6df38ce023b41ea86526e55a43c11
|
tests/regression/02-base/79-unknown-spawn.c
|
tests/regression/02-base/79-unknown-spawn.c
|
// PARAM: --enable sem.unknown_function.spawn
#include <goblint.h>
#include <stddef.h>
int magic(void* (f (void *)));
void *t_fun(void *arg) {
// __goblint_check(1); // reachable
return NULL;
}
int main() {
magic(t_fun); // unknown function
return 0;
}
|
// PARAM: --enable sem.unknown_function.spawn
#include <goblint.h>
#include <stddef.h>
int magic(void* (f (void *)));
void *t_fun(void *arg) {
__goblint_check(1); // reachable
return NULL;
}
int main() {
magic(t_fun); // unknown function
return 0;
}
|
Undo commenting out of __goblint_check
|
Undo commenting out of __goblint_check
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
9a2c64d71dfd174fb9dcc7f6411e325a54fc64b4
|
include/config/SkUserConfigManual.h
|
include/config/SkUserConfigManual.h
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
#define SK_DISABLE_RENDER_TARGET_SORTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_DRAWLOOPER
#define SK_IGNORE_LINEAR_METRICS_FIX
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_EXPLICIT_GPU_RESOURCE_ALLOCATION
#define SK_DISABLE_RENDER_TARGET_SORTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_DRAWLOOPER
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
|
Remove SK_IGNORE_LINEAR_METRICS_FIX flag from Skia
|
Remove SK_IGNORE_LINEAR_METRICS_FIX flag from Skia
Test: refactoring change, will land once all existing tests pass.
Change-Id: I2cdb41023689e458990a71c5dbcc35844a22bbfa
|
C
|
bsd-3-clause
|
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia
|
5616dc9ea64d8fcc7f366f6c11b050817d7ec227
|
include/Support/ThreadSupport.h
|
include/Support/ThreadSupport.h
|
//===-- Support/ThreadSupport.h - Generic threading support -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines platform-agnostic interfaces that can be used to write
// multi-threaded programs. Autoconf is used to chose the correct
// implementation of these interfaces, or default to a non-thread-capable system
// if no matching system support is available.
//
//===----------------------------------------------------------------------===//
#ifndef SUPPORT_THREADSUPPORT_H
#define SUPPORT_THREADSUPPORT_H
// FIXME: We need autoconf support to detect pthreads!
#if 0
#include "Support/ThreadSupport-PThreads.h"
#else
#include "Support/ThreadSupport-NoSupport.h"
#endif // If no system support is available
namespace llvm {
/// MutexLocker - Instances of this class acquire a given Lock when
/// constructed and hold that lock until destruction.
///
class MutexLocker {
Mutex &M;
MutexLocker(const LockHolder &); // DO NOT IMPLEMENT
void operator=(const MutexLocker&); // DO NOT IMPLEMENT
public:
MutexLocker(Mutex &m) : M(m) { M.acquire(); }
~MutexLocker() { M.release(); }
};
}
#endif // SUPPORT_THREADSUPPORT_H
|
//===-- Support/ThreadSupport.h - Generic threading support -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines platform-agnostic interfaces that can be used to write
// multi-threaded programs. Autoconf is used to chose the correct
// implementation of these interfaces, or default to a non-thread-capable system
// if no matching system support is available.
//
//===----------------------------------------------------------------------===//
#ifndef SUPPORT_THREADSUPPORT_H
#define SUPPORT_THREADSUPPORT_H
// FIXME: Eventually don't #include config.h here
#include "Config/config.h"
#if defined(HAVE_PTHREAD_MUTEX_LOCK) && HAVE_PTHREAD_MUTEX_LOCK
#include "Support/ThreadSupport-PThreads.h"
#else
#include "Support/ThreadSupport-NoSupport.h"
#endif // If no system support is available
namespace llvm {
/// MutexLocker - Instances of this class acquire a given Lock when
/// constructed and hold that lock until destruction.
///
class MutexLocker {
Mutex &M;
MutexLocker(const MutexLocker &); // DO NOT IMPLEMENT
void operator=(const MutexLocker &); // DO NOT IMPLEMENT
public:
MutexLocker(Mutex &m) : M(m) { M.acquire(); }
~MutexLocker() { M.release(); }
};
}
#endif // SUPPORT_THREADSUPPORT_H
|
Use autoconf answers from config.h (FIXME, should autoconf this file directly instead).
|
Use autoconf answers from config.h (FIXME, should autoconf this file
directly instead).
Fix LockHolder/MutexLocker typo.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@11156 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm
|
6b614879e21596184fc0af246243d1cce880e1f7
|
test/Sema/carbon.c
|
test/Sema/carbon.c
|
// RUN: clang %s -fsyntax-only -print-stats
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
|
// RUN: clang %s -fsyntax-only -print-stats &&
// RUN: clang -x c-header -o %t %s && clang -token-cache %t %s
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
|
Enhance -fsyntax-only test of Carbon.h to also include testing for PTH.
|
Enhance -fsyntax-only test of Carbon.h to also include testing for PTH.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@61958 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-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
|
26f5dea4e721592f0e64183b9d0a325174487231
|
libs/ac_memset/srcs/ac_memset.c
|
libs/ac_memset/srcs/ac_memset.c
|
/*
* Copyright 2015 Wink Saville
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <ac_stop.h>
#include <ac_printf.h>
/**
* Set memory to the given byte value
*
* @param s points to the array
* @param val is a byte used to fill the array
* @param count is an integer the size of a pointer
*
* @return = s
*/
void* ac_memset(void *s, ac_u8 val, ac_uptr count) {
// TODO: Optimize
ac_u8* pU8 = s;
for(ac_uptr i = 0; i < count; i++) {
*pU8++ = val;
}
return s;
}
|
/*
* Copyright 2015 Wink Saville
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <ac_stop.h>
#include <ac_printf.h>
/**
* Set memory to the given byte value
*
* @param s points to the array
* @param val is a byte used to fill the array
* @param count is an integer the size of a pointer
*
* @return = s
*/
void* ac_memset(void *s, ac_u8 val, ac_uptr count) {
// TODO: Optimize
ac_u8* pU8 = s;
for(ac_uptr i = 0; i < count; i++) {
*pU8++ = val;
}
return s;
}
/**
* Set memory, compiler needs this for initializing structs and such.
*/
void* memset(void *s, int val, ac_size_t count) {
return ac_memset(s, val, count);
}
|
Add memset, needed by compiler for initializing structs and such
|
Add memset, needed by compiler for initializing structs and such
|
C
|
apache-2.0
|
winksaville/sadie,winksaville/sadie
|
497063382b921183790a3ab78a12d7ee3e9943d2
|
isHUD/ISHAppDelegate.h
|
isHUD/ISHAppDelegate.h
|
//
// ISHAppDelegate.h
// isHUD
//
// Created by ghawkgu on 11/15/11.
// Copyright (c) 2011 ghawkgu. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#define HUD_FADE_IN_DURATION (0.25)
#define HUD_FADE_OUT_DURATION (0.5)
#define HUD_DISPLAY_DURATION (2.0)
#define HUD_ALPHA_VALUE (0.6)
#define HUD_CORNER_RADIUS (18.0)
#define HUD_HORIZONTAL_MARGIN (30)
#define HUD_HEIGHT (100)
#define MENUITEM_TAG_TOGGLE_LOGIN_ITEM 1
#define STATUS_MENU_ICON @"icon-18x18.png"
@interface ISHAppDelegate : NSObject <NSApplicationDelegate> {
@private
BOOL fadingOut;
}
@property (unsafe_unretained) IBOutlet NSWindow *window;
@property (unsafe_unretained) IBOutlet NSTextField *isName;
@property (unsafe_unretained) IBOutlet NSMenu *statusMenu;
@property (unsafe_unretained) IBOutlet NSView *panelView;
@property (unsafe_unretained) IBOutlet NSImageView *isImage;
@property (strong) NSStatusItem * myStatusMenu;
- (IBAction)quit:(id)sender;
- (IBAction)toggleLoginItem:(id)sender;
@end
|
//
// ISHAppDelegate.h
// isHUD
//
// Created by ghawkgu on 11/15/11.
// Copyright (c) 2011 ghawkgu. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#define HUD_FADE_IN_DURATION (0.25)
#define HUD_FADE_OUT_DURATION (0.5)
#define HUD_DISPLAY_DURATION (2.0)
#define HUD_ALPHA_VALUE (0.6)
#define HUD_CORNER_RADIUS (18.0)
#define HUD_HORIZONTAL_MARGIN (30)
#define HUD_HEIGHT (90)
#define MENUITEM_TAG_TOGGLE_LOGIN_ITEM 1
#define STATUS_MENU_ICON @"icon-18x18.png"
@interface ISHAppDelegate : NSObject <NSApplicationDelegate> {
@private
BOOL fadingOut;
}
@property (unsafe_unretained) IBOutlet NSWindow *window;
@property (unsafe_unretained) IBOutlet NSTextField *isName;
@property (unsafe_unretained) IBOutlet NSMenu *statusMenu;
@property (unsafe_unretained) IBOutlet NSView *panelView;
@property (unsafe_unretained) IBOutlet NSImageView *isImage;
@property (strong) NSStatusItem * myStatusMenu;
- (IBAction)quit:(id)sender;
- (IBAction)toggleLoginItem:(id)sender;
@end
|
Set the height of the HUD to 90.
|
Set the height of the HUD to 90.
|
C
|
mit
|
ghawkgu/isHUD
|
8dd185b184d006b2e646eb4beeaffa1f9d9d930a
|
include/Genes/Freedom_To_Move_Gene.h
|
include/Genes/Freedom_To_Move_Gene.h
|
#ifndef FREEDOM_TO_MOVE_GENE_H
#define FREEDOM_TO_MOVE_GENE_H
#include <fstream>
#include "Gene.h"
// Total number of legal moves
class Freedom_To_Move_Gene : public Gene
{
public:
Freedom_To_Move_Gene();
explicit Freedom_To_Move_Gene(std::ifstream& ifs);
~Freedom_To_Move_Gene() override;
Freedom_To_Move_Gene* duplicate() const override;
std::string name() const override;
private:
size_t maximum_number_of_moves;
double score_board(const Board& board, Color perspective) const override;
};
#endif // FREEDOM_TO_MOVE_GENE_H
|
#ifndef FREEDOM_TO_MOVE_GENE_H
#define FREEDOM_TO_MOVE_GENE_H
#include <fstream>
#include "Gene.h"
// Total number of legal moves
class Freedom_To_Move_Gene : public Gene
{
public:
Freedom_To_Move_Gene();
~Freedom_To_Move_Gene() override;
Freedom_To_Move_Gene* duplicate() const override;
std::string name() const override;
private:
size_t maximum_number_of_moves;
double score_board(const Board& board, Color perspective) const override;
};
#endif // FREEDOM_TO_MOVE_GENE_H
|
Remove unneeded method override declaration from Freedom to Move
|
Remove unneeded method override declaration from Freedom to Move
|
C
|
mit
|
MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess
|
7278a74da3454fff7eb439ef4e1c6a2049c1be9c
|
Firmware/main.c
|
Firmware/main.c
|
#include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
};
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &GPIO_InitStruct);
}
int main()
{
init_GPIO();
return 0;
}
|
#include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_DOWN
};
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &GPIO_InitStruct);
}
int main()
{
init_GPIO();
GPIO_SetBits(GPIOD, GPIO_Pin_12);
return 0;
}
|
Adjust GPIO settings and add some test code
|
Adjust GPIO settings and add some test code
|
C
|
mit
|
PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples
|
c46835cc42db06a1fcf12a11726614b66b6763a4
|
project_config/lmic_project_config.h
|
project_config/lmic_project_config.h
|
// project-specific definitions for otaa sensor
//#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
|
// project-specific definitions for otaa sensor
//#define CFG_eu868 1
#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
|
Change default region back to US
|
Change default region back to US
|
C
|
mit
|
mcci-catena/arduino-lmic,mcci-catena/arduino-lmic,mcci-catena/arduino-lmic
|
25ac856508aa714758781513c41ceaf214e42d94
|
GSXCBuildDelegate.h
|
GSXCBuildDelegate.h
|
/* Definition of protocol GSXCBuildDelegate
Copyright (C) 2022 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 25-01-2022
This file is part of GNUstep.
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 Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _GSXCBuildDelegate_h_INCLUDE
#define _GSXCBuildDelegate_h_INCLUDE
#import <Foundation/NSObject.h>
#if defined(__cplusplus)
extern "C" {
#endif
@protocol GSXCBuildDelegate
@optional
- (void) project: (PBXProject *)project publishMessage: (NSString *)message;
@end
#if defined(__cplusplus)
}
#endif
#endif /* _GSXCBuildDelegate_h_INCLUDE */
|
/* Definition of protocol GSXCBuildDelegate
Copyright (C) 2022 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 25-01-2022
This file is part of GNUstep.
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 Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _GSXCBuildDelegate_h_INCLUDE
#define _GSXCBuildDelegate_h_INCLUDE
#import <Foundation/NSObject.h>
#import "PBXProject.h"
#if defined(__cplusplus)
extern "C" {
#endif
@protocol GSXCBuildDelegate
@optional
- (void) project: (PBXProject *)project publishMessage: (NSString *)message;
@end
#if defined(__cplusplus)
}
#endif
#endif /* _GSXCBuildDelegate_h_INCLUDE */
|
Build delegate change so reporting back updates shows correctly
|
Build delegate change so reporting back updates shows correctly
|
C
|
lgpl-2.1
|
gnustep/xcode
|
a08fb84be93610ecd7851e16daeaeb1d175df74c
|
Sources/HTMLRange.h
|
Sources/HTMLRange.h
|
//
// HTMLRange.h
// HTMLKit
//
// Created by Iska on 20/11/16.
// Copyright © 2016 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HTMLRange : NSObject
@end
|
//
// HTMLRange.h
// HTMLKit
//
// Created by Iska on 20/11/16.
// Copyright © 2016 BrainCookie. All rights reserved.
//
#import "HTMLNode.h"
/**
A HTML Range, represents a sequence of content within a node tree.
Each range has a start and an end which are boundary points.
A boundary point is a tuple consisting of a node and a non-negative numeric offset.
https://dom.spec.whatwg.org/#ranges
*/
@interface HTMLRange : NSObject
/**
The node of the start boundary point.
*/
@property (nonatomic, readonly, strong) HTMLNode *startContainer;
/**
The offset of the start boundary point.
*/
@property (nonatomic, readonly, assign) NSUInteger startOffset;
/**
The node of the end boundary point.
*/
@property (nonatomic, readonly, strong) HTMLNode *endContainer;
/**
The offset of the end boundary point.
*/
@property (nonatomic, readonly, assign) NSUInteger endOffset;
/**
Checks whether the range is collapsed, i.e. if start is the same as end.
@return `YES` if the range is collapsed, `NO` otherwise.
*/
@property (nonatomic, readonly, assign, getter=isCollapsed) BOOL collapsed;
/**
The common container node that contains both start and end nodes.
*/
@property (nonatomic, readonly, weak) HTMLNode *commonAncestorContainer;
@end
|
Add properties to HTML Range interface
|
Add properties to HTML Range interface
See:
https://dom.spec.whatwg.org/#range
|
C
|
mit
|
iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit
|
45ebbc31924b8bda38d9141407bd46581ad8a6a9
|
SQLite3/Statement.h
|
SQLite3/Statement.h
|
#pragma once
#include "sqlite3.h"
#include "Common.h"
namespace SQLite3 {
class Statement {
friend void notifyUnlock(void* args[], int nArgs);
public:
static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql);
~Statement();
void Bind(const SafeParameterVector& params);
void Bind(ParameterMap^ params);
void Run();
Platform::String^ One();
Platform::String^ All();
void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher);
bool ReadOnly() const;
private:
Statement(sqlite3_stmt* statement);
void BindParameter(int index, Platform::Object^ value);
int BindParameterCount();
std::wstring BindParameterName(int index);
int BindText(int index, Platform::String^ val);
int BindInt(int index, int64 val);
int BindDouble(int index, double val);
int BindNull(int index);
int Step();
void GetRow(std::wostringstream& row);
Platform::Object^ GetColumn(int index);
int ColumnCount();
int ColumnType(int index);
Platform::String^ ColumnName(int index);
Platform::String^ ColumnText(int index);
int64 ColumnInt(int index);
double ColumnDouble(int index);
private:
HANDLE dbLockMutex;
sqlite3_stmt* statement;
};
}
|
#pragma once
#include "sqlite3.h"
#include "Common.h"
namespace SQLite3 {
class Statement {
public:
static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql);
~Statement();
void Bind(const SafeParameterVector& params);
void Bind(ParameterMap^ params);
void Run();
Platform::String^ One();
Platform::String^ All();
void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher);
bool ReadOnly() const;
private:
Statement(sqlite3_stmt* statement);
void BindParameter(int index, Platform::Object^ value);
int BindParameterCount();
std::wstring BindParameterName(int index);
int BindText(int index, Platform::String^ val);
int BindInt(int index, int64 val);
int BindDouble(int index, double val);
int BindNull(int index);
int Step();
void GetRow(std::wostringstream& row);
Platform::Object^ GetColumn(int index);
int ColumnCount();
int ColumnType(int index);
Platform::String^ ColumnName(int index);
Platform::String^ ColumnText(int index);
int64 ColumnInt(int index);
double ColumnDouble(int index);
private:
HANDLE dbLockMutex;
sqlite3_stmt* statement;
};
}
|
Remove orphaned notifyUnlock friend function
|
Remove orphaned notifyUnlock friend function
|
C
|
mit
|
doo/SQLite3-WinRT,roryok/SQLite3-WinRT,roryok/SQLite3-WinRT,doo/SQLite3-WinRT,roryok/SQLite3-WinRT,doo/SQLite3-WinRT,roryok/SQLite3-WinRT
|
ac9f436e0c8256abd7dd62024325494746702964
|
src/BotAssert.h
|
src/BotAssert.h
|
#pragma once
#include <cstdio>
#include <cstdarg>
#include <sstream>
#include <stdarg.h>
#include <ctime>
#include <iomanip>
#define BOT_BREAK __debugbreak();
#if true
#define BOT_ASSERT(cond, msg, ...) \
do \
{ \
if (!(cond)) \
{ \
Assert::ReportFailure(#cond, __FILE__, __LINE__, (msg), ##__VA_ARGS__); \
BOT_BREAK \
} \
} while(0)
#else
#define BOT_ASSERT(cond, msg, ...)
#endif
namespace Assert
{
extern std::string lastErrorMessage;
const std::string CurrentDateTime();
void ReportFailure(const char * condition, const char * file, int line, const char * msg, ...);
}
|
#pragma once
#include <cstdio>
#include <cstdarg>
#include <sstream>
#include <stdarg.h>
#include <ctime>
#include <iomanip>
#ifdef WIN32
#define BOT_BREAK __debugbreak();
#else
#define BOT_BREAK ;
#endif
#if true
#define BOT_ASSERT(cond, msg, ...) \
do \
{ \
if (!(cond)) \
{ \
Assert::ReportFailure(#cond, __FILE__, __LINE__, (msg), ##__VA_ARGS__); \
BOT_BREAK \
} \
} while(0)
#else
#define BOT_ASSERT(cond, msg, ...)
#endif
namespace Assert
{
extern std::string lastErrorMessage;
const std::string CurrentDateTime();
void ReportFailure(const char * condition, const char * file, int line, const char * msg, ...);
}
|
Put dummy BOT_ASSERT in case of non-Windows build
|
Put dummy BOT_ASSERT in case of non-Windows build
Unfortunately non-Windows platforms don't have good analogue
for Winodws DebugBrake(). There are several alternatives that
depend heavily on debugger time.
Since we have lldb, gdb and probably something else but still
need to compile the code this commit replaces BOT_ASSERT with a dummy
until it will be decided how to handle such cases in a portable way.
|
C
|
mit
|
davechurchill/commandcenter
|
236a881c46f7930f74ed656d85c18a93e2fb9e25
|
CMSIS/DSP/Platforms/IPSS/ipss_bench.h
|
CMSIS/DSP/Platforms/IPSS/ipss_bench.h
|
#ifndef IPSS_BENCH_H
#define IPSS_BENCH_H
extern void start_ipss_measurement();
extern void stop_ipss_measurement();
#endif
|
#ifndef IPSS_BENCH_H
#define IPSS_BENCH_H
#ifdef __cplusplus
extern "C"
{
#endif
void start_ipss_measurement();
void stop_ipss_measurement();
#ifdef __cplusplus
}
#endif
#endif
|
Update header for use from C++
|
CMSIS-DSP: Update header for use from C++
|
C
|
apache-2.0
|
JonatanAntoni/CMSIS_5,JonatanAntoni/CMSIS_5,ARM-software/CMSIS_5,JonatanAntoni/CMSIS_5,JonatanAntoni/CMSIS_5,JonatanAntoni/CMSIS_5,ARM-software/CMSIS_5,ARM-software/CMSIS_5,ARM-software/CMSIS_5,JonatanAntoni/CMSIS_5,ARM-software/CMSIS_5,ARM-software/CMSIS_5
|
dc0beb416b6f4033c0fade3ffe719b1dd65bc30b
|
ObjectiveRocks/ObjectiveRocks.h
|
ObjectiveRocks/ObjectiveRocks.h
|
//
// ObjectiveRocks.h
// ObjectiveRocks
//
// Created by Iska on 20/11/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import "RocksDB.h"
#import "RocksDBOptions.h"
#import "RocksDBReadOptions.h"
#import "RocksDBWriteOptions.h"
#import "RocksDBWriteBatch.h"
#import "RocksDBIterator.h"
#import "RocksDBSnapshot.h"
|
//
// ObjectiveRocks.h
// ObjectiveRocks
//
// Created by Iska on 20/11/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import "RocksDB.h"
#import "RocksDBOptions.h"
#import "RocksDBReadOptions.h"
#import "RocksDBWriteOptions.h"
#import "RocksDBWriteBatch.h"
#import "RocksDBIterator.h"
#import "RocksDBSnapshot.h"
#import "RocksDBComparator.h"
|
Add RocksDB comparator import to the main public header
|
Add RocksDB comparator import to the main public header
|
C
|
mit
|
iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks
|
83641b5afb00ef76a2b397a2591a705dd1488c7f
|
cc1/tests/test003.c
|
cc1/tests/test003.c
|
/*
name: TEST003
description: Select function to call inside ternary operator
output:
*/
int
foo(void)
{
return 42;
}
int
bar(void)
{
return 24;
}
int
main(void)
{
return (1 ? foo : bar)();
}
|
/*
name: TEST003
description: Select function to call inside ternary operator
output:
F1
X1 F1 foo
G1 F1 foo {
-
yI #I2A
}
X2 F1 bar
G2 F1 bar {
-
yI #I18
}
X3 F1 main
G3 F1 main {
-
yI G1 cI
}
*/
int
foo(void)
{
return 42;
}
int
bar(void)
{
return 24;
}
int
main(void)
{
return (1 ? foo : bar)();
}
|
Add correct output for TEST003
|
Add correct output for TEST003
stateless take a look that it even optimize out
the ternary operator.
|
C
|
isc
|
k0gaMSX/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,8l/scc,k0gaMSX/scc,8l/scc,k0gaMSX/kcc
|
2abc9a8a44d9920d20c30eb639596a8726580381
|
markdown_lib.h
|
markdown_lib.h
|
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
enum markdown_extensions {
EXT_SMART = 1,
EXT_NOTES = 2,
EXT_FILTER_HTML = 3,
EXT_FILTER_STYLES = 4
};
enum markdown_formats {
HTML_FORMAT,
LATEX_FORMAT,
GROFF_MM_FORMAT
};
GString * markdown_to_g_string(char *text, int extensions, int output_format);
char * markdown_to_string(char *text, int extensions, int output_format);
/* vim: set ts=4 sw=4 : */
|
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
enum markdown_extensions {
EXT_SMART = 0x01,
EXT_NOTES = 0x02,
EXT_FILTER_HTML = 0x04,
EXT_FILTER_STYLES = 0x08
};
enum markdown_formats {
HTML_FORMAT,
LATEX_FORMAT,
GROFF_MM_FORMAT
};
GString * markdown_to_g_string(char *text, int extensions, int output_format);
char * markdown_to_string(char *text, int extensions, int output_format);
/* vim: set ts=4 sw=4 : */
|
Fix extensions flags bit collision.
|
Fix extensions flags bit collision.
Setting EXT_FILTER_HTML was the same as setting
(EXT_SMART | EXT_NOTES); setting EXT_FILTER_STYLES would
also set EXT_NOTES.
The switch to hex notation is purely to hint that the
values are meant to be used as bit flags directly.
|
C
|
mit
|
sftrabbit/MarkdownParse,sftrabbit/MarkdownParse,sftrabbit/MarkdownParse
|
68a44741998e5a769a9b952ddb422e993dc5b6a9
|
base/scoped_value.h
|
base/scoped_value.h
|
// LAF Base Library
// Copyright (c) 2014-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SCOPED_VALUE_H_INCLUDED
#define BASE_SCOPED_VALUE_H_INCLUDED
#pragma once
namespace base {
template<typename T>
class ScopedValue {
public:
ScopedValue(T& instance, const T& inScopeValue, const T& outScopeValue)
: m_instance(instance)
, m_outScopeValue(outScopeValue) {
m_instance = inScopeValue;
}
~ScopedValue() {
m_instance = m_outScopeValue;
}
private:
T& m_instance;
T m_outScopeValue;
};
} // namespace base
#endif
|
// LAF Base Library
// Copyright (c) 2022 Igara Studio S.A.
// Copyright (c) 2014-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SCOPED_VALUE_H_INCLUDED
#define BASE_SCOPED_VALUE_H_INCLUDED
#pragma once
namespace base {
template<typename T,
typename U = T>
class ScopedValue {
public:
ScopedValue(T& instance, const U& inScopeValue, const U& outScopeValue)
: m_instance(instance)
, m_outScopeValue(outScopeValue) {
m_instance = inScopeValue;
}
~ScopedValue() {
m_instance = m_outScopeValue;
}
private:
T& m_instance;
U m_outScopeValue;
};
} // namespace base
#endif
|
Add new U param to ScopedValue<T, U>
|
Add new U param to ScopedValue<T, U>
In this way we can use it for std::atomics, e.g.
base::ScopedValue<std::atomic<bool>, bool>
|
C
|
mit
|
aseprite/laf,aseprite/laf
|
0c641db27c8ef9501990544b093c0bbbe6244776
|
media/rx/audio-rx.h
|
media/rx/audio-rx.h
|
#ifndef __AUDIO_RX_H__
#define __AUDIO_RX_H__
#include <stdint.h>
typedef void (*put_audio_samples_rx)(uint8_t*, int, int);
int start_audio_rx(const char* sdp, int maxDelay, put_audio_samples_rx callback);
int stop_audio_rx();
#endif /* __AUDIO_RX_H__ */
|
#ifndef __AUDIO_RX_H__
#define __AUDIO_RX_H__
#include <stdint.h>
typedef void (*put_audio_samples_rx)(uint8_t *samples, int size, int nframe);
int start_audio_rx(const char* sdp, int maxDelay, put_audio_samples_rx callback);
int stop_audio_rx();
#endif /* __AUDIO_RX_H__ */
|
Add params name in put_audio_samples_rx pointer function definition.
|
Add params name in put_audio_samples_rx pointer function definition.
|
C
|
lgpl-2.1
|
shelsonjava/kc-media-native,Kurento/kc-media-native,Kurento/kc-media-native,shelsonjava/kc-media-native
|
43c48cdbc5cf5793ad6f0f46cde5ca91ad2b8756
|
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: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@38659 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT
|
fb3e3283c4503f80fc73b4ef68d68e68c00bd1be
|
chip/lm4/mock_pwm.c
|
chip/lm4/mock_pwm.c
|
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Mock PWM control module for Chrome EC */
#include "pwm.h"
#include "timer.h"
#include "uart.h"
static int fan_target_rpm;
static int kblight;
int pwm_set_fan_target_rpm(int rpm)
{
uart_printf("Fan RPM: %d\n", rpm);
fan_target_rpm = rpm;
return EC_SUCCESS;
}
int pwm_get_fan_target_rpm(void)
{
return fan_target_rpm;
}
int pwm_set_keyboard_backlight(int percent)
{
uart_printf("KBLight: %d\n", percent);
kblight = percent;
return EC_SUCCESS;
}
int pwm_get_keyboard_backlight(void)
{
return kblight;
}
int pwm_get_keyboard_backlight_enabled(void)
{
/* Always enabled */
return 1;
}
int pwm_enable_keyboard_backlight(int enable)
{
/* Not implemented */
return EC_SUCCESS;
}
void pwm_task(void)
{
/* Do nothing */
while (1)
usleep(5000000);
}
|
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Mock PWM control module for Chrome EC */
#include "pwm.h"
#include "timer.h"
#include "uart.h"
static int fan_target_rpm;
static int kblight;
int pwm_set_fan_target_rpm(int rpm)
{
uart_printf("Fan RPM: %d\n", rpm);
fan_target_rpm = rpm;
return EC_SUCCESS;
}
int pwm_get_fan_target_rpm(void)
{
return fan_target_rpm;
}
int pwm_set_keyboard_backlight(int percent)
{
uart_printf("KBLight: %d\n", percent);
kblight = percent;
return EC_SUCCESS;
}
int pwm_get_keyboard_backlight(void)
{
return kblight;
}
int pwm_get_keyboard_backlight_enabled(void)
{
/* Always enabled */
return 1;
}
int pwm_enable_keyboard_backlight(int enable)
{
/* Not implemented */
return EC_SUCCESS;
}
int pwm_set_fan_duty(int percent)
{
/* Not implemented */
return EC_SUCCESS;
}
void pwm_task(void)
{
/* Do nothing */
while (1)
usleep(5000000);
}
|
Fix unit test compilation error
|
Fix unit test compilation error
A host command to set fan duty cycle is recently added and mock PWM
module doesn't provide the implementation. This breaks our unit test.
Let's fix this.
BUG=chrome-os-partner:10820
TEST='thermal' unit test passed.
Change-Id: I8644742cfec7d2112d7ff1e266b5ac3429c46945
Reviewed-on: https://gerrit.chromium.org/gerrit/26019
Reviewed-by: Vincent Palatin <70a9964ec8fd10b0b08fcc8623c2add25ddf99ac@chromium.org>
Commit-Ready: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@chromium.org>
Tested-by: Vic Yang <5fd92abeee651458f98e2856f4f200ee971cee4d@chromium.org>
|
C
|
bsd-3-clause
|
md5555/ec,mtk09422/chromiumos-platform-ec,md5555/ec,fourier49/BIZ_EC,longsleep/ec,gelraen/cros-ec,coreboot/chrome-ec,longsleep/ec,md5555/ec,eatbyte/chromium-ec,fourier49/BZ_DEV_EC,mtk09422/chromiumos-platform-ec,longsleep/ec,gelraen/cros-ec,akappy7/ChromeOS_EC_LED_Diagnostics,akappy7/ChromeOS_EC_LED_Diagnostics,alterapraxisptyltd/chromium-ec,alterapraxisptyltd/chromium-ec,eatbyte/chromium-ec,fourier49/BZ_DEV_EC,coreboot/chrome-ec,fourier49/BZ_DEV_EC,akappy7/ChromeOS_EC_LED_Diagnostics,fourier49/BIZ_EC,coreboot/chrome-ec,coreboot/chrome-ec,alterapraxisptyltd/chromium-ec,eatbyte/chromium-ec,thehobn/ec,md5555/ec,thehobn/ec,thehobn/ec,akappy7/ChromeOS_EC_LED_Diagnostics,eatbyte/chromium-ec,fourier49/BIZ_EC,gelraen/cros-ec,alterapraxisptyltd/chromium-ec,gelraen/cros-ec,thehobn/ec,mtk09422/chromiumos-platform-ec,mtk09422/chromiumos-platform-ec,coreboot/chrome-ec,fourier49/BIZ_EC,coreboot/chrome-ec,longsleep/ec,akappy7/ChromeOS_EC_LED_Diagnostics,fourier49/BZ_DEV_EC
|
ecde2fd66a94951c3a438e411259d2da830ce2a6
|
thingshub/CDZThingsHubConfiguration.h
|
thingshub/CDZThingsHubConfiguration.h
|
//
// CDZThingsHubConfiguration.h
// thingshub
//
// Created by Chris Dzombak on 1/13/14.
// Copyright (c) 2014 Chris Dzombak. All rights reserved.
//
@interface CDZThingsHubConfiguration : NSObject
/**
Asynchronously returns the app's current `CZDThingsHubConfiguration` as the next value in the signal, then completes.
Walks from ~ down to the current directory, merging in .thingshubconfig files as they are found.
Command-line parameters override any parameters set in the merged config file.
If there's a validation error, the signal will complete with an error.
*/
+ (RACSignal *)currentConfiguration;
/// Global (typically); configured by "tagNamespace = ". Default is "github".
@property (nonatomic, copy, readonly) NSString *tagNamespace;
/// Global (typically); configured by "reviewTag = ". Default is "review".
@property (nonatomic, copy, readonly) NSString *reviewTagName;
/// Global (typically); configured by "githubLogin = "
@property (nonatomic, copy, readonly) NSString *githubLogin;
/// Per-project (typically); configured by "githubOrg = "
@property (nonatomic, copy, readonly) NSString *githubOrgName;
/// Per-project; configured by "githubRepo = "
@property (nonatomic, copy, readonly) NSString *githubRepoName;
/// Per-project; configured by "thingsArea = ". May be missing; default is nil.
@property (nonatomic, copy, readonly) NSString *thingsAreaName;
@end
|
//
// CDZThingsHubConfiguration.h
// thingshub
//
// Created by Chris Dzombak on 1/13/14.
// Copyright (c) 2014 Chris Dzombak. All rights reserved.
//
@class RACSignal;
@interface CDZThingsHubConfiguration : NSObject
/**
Asynchronously returns the app's current `CZDThingsHubConfiguration` as the next value in the signal, then completes.
Walks from ~ down to the current directory, merging in .thingshubconfig files as they are found.
Command-line parameters override any parameters set in the merged config file.
If there's a validation error, the signal will complete with an error.
*/
+ (RACSignal *)currentConfiguration;
/// Global (typically); configured by "tagNamespace = ". Default is "github".
@property (nonatomic, copy, readonly) NSString *tagNamespace;
/// Global (typically); configured by "reviewTag = ". Default is "review".
@property (nonatomic, copy, readonly) NSString *reviewTagName;
/// Global (typically); configured by "githubLogin = "
@property (nonatomic, copy, readonly) NSString *githubLogin;
/// Per-project (typically); configured by "githubOrg = "
@property (nonatomic, copy, readonly) NSString *githubOrgName;
/// Per-project; configured by "githubRepo = "
@property (nonatomic, copy, readonly) NSString *githubRepoName;
/// Per-project; configured by "thingsArea = ". May be missing; default is nil.
@property (nonatomic, copy, readonly) NSString *thingsAreaName;
@end
|
Add missing forward class declaration to ThingsHubConfiguration
|
Add missing forward class declaration to ThingsHubConfiguration
|
C
|
mit
|
cdzombak/thingshub,cdzombak/thingshub,cdzombak/thingshub
|
f7bae4b98f7bacc29addb1b85e5aecee0054c04d
|
c/arrays.c
|
c/arrays.c
|
#include <stdio.h>
int my_array[] = {1,2,3,4,5,6};
void f()
{
printf("called f\n");
}
void (*f_pointer())(void)
{
return &f;
}
int hundredth(int a[])
{
return a[100];
}
int head(int a[])
{
return a[0];
}
int (*f2())(int*)
{
return &head;
}
int previous(int a[])
{
return a[-1];
}
int main(void)
{
int one = head(my_array);
int prev = previous(&my_array[1]);
int two = f2()(my_array);
f();
f_pointer()();
printf("Head of array => %d\n", one);
printf("Head of array => %d\n", prev);
printf("Head of array => %d\n", two);
return 0;
}
|
#include <stdio.h>
int my_array[] = {1,2,3,4,5,6};
void f()
{
printf("called f\n");
}
void (*f_pointer())(void)
{
return &f;
}
int hundredth(int a[])
{
return a[100];
}
int head(int a[])
{
return a[0];
}
int (*f2())(int*)
{
return &head;
}
int previous(int a[])
{
return a[-1];
}
int main(void)
{
int one = head(my_array);
int prev = previous(&my_array[1]);
int two = f2()(my_array);
f();
f_pointer()();
printf("Head of array => %d\n", one);
printf("Head of array => %d\n", prev);
printf("Head of array => %d\n", two);
return 0;
}
|
Test taking address of C array
|
Test taking address of C array
|
C
|
bsd-3-clause
|
dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps,dterei/Scraps
|
fce01fde1fc4ce33ef25cf1af9773474abefa736
|
primitiv/c/status.h
|
primitiv/c/status.h
|
/* Copyright 2017 The primitiv Authors. All Rights Reserved. */
#ifndef PRIMITIV_C_STATUS_H_
#define PRIMITIV_C_STATUS_H_
#include <primitiv/c/define.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum primitiv_Status {
PRIMITIV_OK = 0,
PRIMITIV_ERROR = 1,
} primitiv_Status;
extern PRIMITIV_C_API const char *primitiv_Status_get_message();
extern PRIMITIV_C_API void primitiv_Status_reset();
#ifdef __cplusplus
} // end extern "C"
#endif
#endif // PRIMITIV_C_STATUS_H_
|
/* Copyright 2017 The primitiv Authors. All Rights Reserved. */
#ifndef PRIMITIV_C_STATUS_H_
#define PRIMITIV_C_STATUS_H_
#include <primitiv/c/define.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum primitiv_Status {
PRIMITIV_OK = 0,
PRIMITIV_ERROR = -1,
} primitiv_Status;
extern PRIMITIV_C_API const char *primitiv_Status_get_message();
extern PRIMITIV_C_API void primitiv_Status_reset();
#ifdef __cplusplus
} // end extern "C"
#endif
#endif // PRIMITIV_C_STATUS_H_
|
Change the PRIMITIV_ERROR value from 1 to -1 so that MSB can imply errors.
|
Change the PRIMITIV_ERROR value from 1 to -1 so that MSB can imply errors.
|
C
|
apache-2.0
|
odashi/primitiv,odashi/primitiv,odashi/primitiv
|
f7d5d48f3d78dc9d8f82aa5af23a23807fa0d6be
|
ui/views/examples/multiline_example.h
|
ui/views/examples/multiline_example.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 UI_VIEWS_EXAMPLES_MULTILINE_EXAMPLE_H_
#define UI_VIEWS_EXAMPLES_MULTILINE_EXAMPLE_H_
#include "base/compiler_specific.h"
#include "base/string16.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/examples/example_base.h"
namespace views {
class Label;
namespace examples {
// An example that compares the multi-line rendering of different controls.
class MultilineExample : public ExampleBase,
public TextfieldController {
public:
MultilineExample();
virtual ~MultilineExample();
// ExampleBase:
virtual void CreateExampleView(View* container) OVERRIDE;
private:
class RenderTextView;
// TextfieldController:
virtual void ContentsChanged(Textfield* sender,
const string16& new_contents) OVERRIDE;
virtual bool HandleKeyEvent(Textfield* sender,
const ui::KeyEvent& key_event) OVERRIDE;
RenderTextView* render_text_view_;
Label* label_;
Textfield* textfield_;
DISALLOW_COPY_AND_ASSIGN(MultilineExample);
};
} // namespace examples
} // namespace views
#endif // UI_VIEWS_EXAMPLES_MULTILINE_EXAMPLE_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 UI_VIEWS_EXAMPLES_MULTILINE_EXAMPLE_H_
#define UI_VIEWS_EXAMPLES_MULTILINE_EXAMPLE_H_
#include "base/compiler_specific.h"
#include "base/strings/string16.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/examples/example_base.h"
namespace views {
class Label;
namespace examples {
// An example that compares the multi-line rendering of different controls.
class MultilineExample : public ExampleBase,
public TextfieldController {
public:
MultilineExample();
virtual ~MultilineExample();
// ExampleBase:
virtual void CreateExampleView(View* container) OVERRIDE;
private:
class RenderTextView;
// TextfieldController:
virtual void ContentsChanged(Textfield* sender,
const string16& new_contents) OVERRIDE;
virtual bool HandleKeyEvent(Textfield* sender,
const ui::KeyEvent& key_event) OVERRIDE;
RenderTextView* render_text_view_;
Label* label_;
Textfield* textfield_;
DISALLOW_COPY_AND_ASSIGN(MultilineExample);
};
} // namespace examples
} // namespace views
#endif // UI_VIEWS_EXAMPLES_MULTILINE_EXAMPLE_H_
|
Update the include of string16.h to point to its new location.
|
views/examples: Update the include of string16.h to point to its new location.
string16.h now lives in base/strings/ directory.
BUG=247723
TBR=ben@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/17193002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@206667 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,jaruba/chromium.src,M4sse/chromium.src,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,Just-D/chromium-1,anirudhSK/chromium,markYoungH/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,anirudhSK/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,littlstar/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,ltilve/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,patrickm/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,Jonekee/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,dednal/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,Chilledheart/chromium,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,ltilve/chromium,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,ChromiumWebApps/chromium,Jonekee/chromium.src,anirudhSK/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,dednal/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,littlstar/chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,Jonekee/chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,jaruba/chromium.src,ltilve/chromium,dushu1203/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,ondra-novak/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,dushu1203/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium
|
9b4a41296ef6979aa4622c509d301d8e5fd7f275
|
ext/binary_search.c
|
ext/binary_search.c
|
#include <ruby.h>
static ID id_cmp;
static VALUE rb_array_binary_index(VALUE self, VALUE value) {
int lower = 0;
int upper = RARRAY(self)->len - 1;
int i, comp;
while(lower <= upper) {
i = lower + (upper - lower) / 2;
comp = FIX2INT(rb_funcall(value, id_cmp, 1, RARRAY(self)->ptr[i]));
if(comp == 0) {
return LONG2NUM(i);
} else if(comp == 1) {
lower = i + 1;
} else {
upper = i - 1;
};
}
return Qnil;
}
void Init_binary_search() {
id_cmp = rb_intern("<=>");
rb_define_method(rb_cArray, "binary_index", rb_array_binary_index, 1);
}
|
#include <ruby.h>
#ifndef RARRAY_PTR
#define RARRAY_PTR(ary) RARRAY(ary)->ptr
#endif
#ifndef RARRAY_LEN
#define RARRAY_LEN(ary) RARRAY(ary)->len
#endif
static ID id_cmp;
static VALUE rb_array_binary_index(VALUE self, VALUE value) {
int lower = 0;
int upper = RARRAY_LEN(self) - 1;
int i, comp;
while(lower <= upper) {
i = lower + (upper - lower) / 2;
comp = FIX2INT(rb_funcall(value, id_cmp, 1, RARRAY_PTR(self)[i]));
if(comp == 0) {
return LONG2NUM(i);
} else if(comp == 1) {
lower = i + 1;
} else {
upper = i - 1;
};
}
return Qnil;
}
void Init_binary_search() {
id_cmp = rb_intern("<=>");
rb_define_method(rb_cArray, "binary_index", rb_array_binary_index, 1);
}
|
Use RARRAY_LEN and RARRAY_PTR on ruby 1.9
|
Use RARRAY_LEN and RARRAY_PTR on ruby 1.9
|
C
|
mit
|
tyler/binary_search,tyler/binary_search
|
af0802bae6f1dfc7323d540c479a79c98944e3d4
|
src/RelativeLink/RelativeLink.c
|
src/RelativeLink/RelativeLink.c
|
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
//
// RelativeLink.c
// by Jacob Appelbaum <jacob@appelbaum.net>
//
// This is a very small program to work around the lack of relative links
// in any of the most recent builds of Windows.
//
// To build this, you need Cygwin or MSYS.
//
// You need to build the icon resource first:
// windres RelativeLink-res.rc RelativeLink-res.o
//
// Then you'll compile the program and include the icon object file:
// gcc -mwindows -o StartTorBrowserBundle RelativeLink.c RelativeLink-res.o
//
// End users will be able to use StartTorBrowserBundle.exe
//
//int _tmain( int argc, TCHAR *argv[])
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory ( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory ( &pi, sizeof(pi) );
TCHAR *ProgramToStart;
ProgramToStart = TEXT ("App/vidalia.exe --datadir .\\Data\\Vidalia\\");
if( !CreateProcess(
NULL, ProgramToStart, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ))
{
MessageBox ( NULL, TEXT ("Unable to start Vidalia"), NULL, NULL );
return -1;
}
return 0;
}
|
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
//
// RelativeLink.c
// by Jacob Appelbaum <jacob@appelbaum.net>
//
// This is a very small program to work around the lack of relative links
// in any of the most recent builds of Windows.
//
// To build this, you need Cygwin or MSYS.
//
// You need to build the icon resource first:
// windres RelativeLink-res.rc RelativeLink-res.o
//
// Then you'll compile the program and include the icon object file:
// gcc -mwindows -o StartTorBrowserBundle RelativeLink.c RelativeLink-res.o
//
// End users will be able to use StartTorBrowserBundle.exe
//
//int _tmain( int argc, TCHAR *argv[])
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory ( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory ( &pi, sizeof(pi) );
TCHAR *ProgramToStart;
ProgramToStart = TEXT ("App/vidalia.exe --datadir .\\Data\\Vidalia\\");
if( !CreateProcess(
NULL, ProgramToStart, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ))
{
MessageBox ( NULL, TEXT ("Unable to start Vidalia"), NULL, MB_OK);
return -1;
}
return 0;
}
|
Fix pointer without cast issue.
|
Fix pointer without cast issue.
svn:r14724
|
C
|
bsd-3-clause
|
Shondoit/torbrowser,Shondoit/torbrowser,Shondoit/torbrowser,Shondoit/torbrowser
|
01b357ec14e0d8ef60bf12e297c347230fb8da63
|
src/UIViewController+IDPExtensions.h
|
src/UIViewController+IDPExtensions.h
|
//
// UIViewController+IDPExtensions.h
// ClipIt
//
// Created by Vadim Lavrov Viktorovich on 2/20/13.
// Copyright (c) 2013 IDAP Group. All rights reserved.
//
#import <UIKit/UIKit.h>
#define IDPViewControllerViewOfClassGetterSynthesize(theClass, getterName) \
- (theClass *)getterName { \
if ([self.view isKindOfClass:[theClass class]]) { \
return (theClass *)self.view; \
} \
return nil; \
}
@interface UIViewController (IDPExtensions)
@property (nonatomic, retain, readonly) UITableView *tableView;
@end
|
//
// UIViewController+IDPExtensions.h
// ClipIt
//
// Created by Vadim Lavrov Viktorovich on 2/20/13.
// Copyright (c) 2013 IDAP Group. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (IDPExtensions)
@property (nonatomic, retain, readonly) UITableView *tableView;
@end
|
Move IDPViewControllerViewOfClassGetterSynthesize to CommonKit -> IDPPropertyMacros.h
|
Move IDPViewControllerViewOfClassGetterSynthesize to CommonKit -> IDPPropertyMacros.h
|
C
|
bsd-3-clause
|
idapgroup/UIKit,idapgroup/UIKit,idapgroup/UIKit,idapgroup/UIKit
|
598924ef6499c736f9ba63da255c37bdfebfe213
|
includes/linux/goblint_preconf.h
|
includes/linux/goblint_preconf.h
|
#define KBUILD_MODNAME "SomeModule"
#define CONFIG_DEBUG_SPINLOCK 1
|
#define KBUILD_MODNAME "SomeModule"
#define CONFIG_DEBUG_SPINLOCK 1
#undef __GNUC_MINOR__
#define __GNUC_MINOR__ 4
|
Redefine version macro to avoid gcc 4.5 features not supported by CIL
|
Redefine version macro to avoid gcc 4.5 features not supported by CIL
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
231ba5dc3b5833fb64177f6ebb0bd372c7f026ae
|
test/Driver/XRay/xray-instrument-os.c
|
test/Driver/XRay/xray-instrument-os.c
|
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: -linux-
// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
typedef int a;
|
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: -linux-
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
typedef int a;
|
Revert "[test] Replace `REQUIRES-ANY: a, b, c` with `REQUIRES: a || b || c`."
|
Revert "[test] Replace `REQUIRES-ANY: a, b, c` with `REQUIRES: a || b || c`."
The underlying `lit` change needs to be better-coordinated with libc++.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@292898 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
|
8337ff531d1611dad7bac73a2751b9f7a44242e5
|
src/rtcmix/rtdefs.h
|
src/rtcmix/rtdefs.h
|
/* To avoid recursion in certain includes */
#ifndef _RTDEFS_H_
#define _RTDEFS_H_ 1
#define MAXCHANS 4
#define MAX_INPUT_FDS 128
#define AUDIO_DEVICE 9999999
/* definition of input file desc struct used by rtinput */
typedef struct inputdesc {
char filename[1024];
int fd;
int refcount;
#ifdef USE_SNDLIB
short header_type; /* e.g., AIFF_sound_file (in sndlib.h) */
short data_format; /* e.g., snd_16_linear (in sndlib.h) */
short chans;
#else
#ifdef sgi
void *handle;
#endif
#endif
int data_location; /* offset of sound data start in file */
float dur;
} InputDesc;
/* for insts - so they don't have to include globals.h */
extern int MAXBUF;
extern int NCHANS;
extern int RTBUFSAMPS;
extern float SR;
#endif /* _RTDEFS_H_ */
|
/* To avoid recursion in certain includes */
#ifndef _RTDEFS_H_
#define _RTDEFS_H_ 1
#define MAXCHANS 4
#define MAX_INPUT_FDS 128
#define AUDIO_DEVICE 9999999
/* definition of input file desc struct used by rtinput */
typedef struct inputdesc {
char filename[1024];
int fd;
int refcount;
#ifdef USE_SNDLIB
short header_type; /* e.g., AIFF_sound_file (in sndlib.h) */
short data_format; /* e.g., snd_16_linear (in sndlib.h) */
short chans;
float srate;
#else
#ifdef sgi
void *handle;
#endif
#endif
int data_location; /* offset of sound data start in file */
float dur;
} InputDesc;
/* for insts - so they don't have to include globals.h */
extern int MAXBUF;
extern int NCHANS;
extern int RTBUFSAMPS;
extern float SR;
#endif /* _RTDEFS_H_ */
|
Add srate field to InputDesc.
|
Add srate field to InputDesc.
|
C
|
apache-2.0
|
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
|
92b435334e50b9918e62f8eb6a1cbe8acc4b3321
|
tests/performance.c
|
tests/performance.c
|
#include <stdlib.h>
#include <stdio.h>
#include "bomalloc.h"
#include "dummy.h"
#define NUM_ROUNDS 500000
size_t class_for_rnd(int rnd) {
return ALIGN(CLASS_TO_SIZE(rnd % NUM_CLASSES) - sizeof(block_t));
}
typedef struct {
int * space;
size_t size;
} record_t;
int main() {
int rnd;
size_t alloc_size;
srand(0);
for (rnd = 0; rnd < NUM_ROUNDS; rnd++) {
alloc_size = class_for_rnd(rnd);
bomalloc_malloc(alloc_size);
}
printf("Performance test complete\n");
print_bomalloc_stats();
}
|
#include <stdlib.h>
#include <stdio.h>
#include "bomalloc.h"
#include "dummy.h"
#define NUM_ROUNDS 500
size_t class_for_rnd(int rnd) {
return ALIGN(CLASS_TO_SIZE(rnd % NUM_CLASSES) - sizeof(block_t));
}
typedef struct {
int * space;
size_t size;
} record_t;
int main() {
int rnd;
size_t alloc_size;
srand(0);
for (rnd = 0; rnd < NUM_ROUNDS; rnd++) {
alloc_size = class_for_rnd(rnd);
bomalloc_malloc(alloc_size);
}
printf("Performance test complete\n");
print_bomalloc_stats();
}
|
Change perf. test to reasonable number
|
[test] Change perf. test to reasonable number
|
C
|
mit
|
benohalloran/noomr,benohalloran/noomr,benohalloran/ipa,benohalloran/bomalloc,benohalloran/ipa,benohalloran/bomalloc
|
c6a82feaaf54cc0888af0266ec1c6113dbd350c6
|
inc/libutils/io/ostream_log_strategy.h
|
inc/libutils/io/ostream_log_strategy.h
|
/*
* ostream_log_strategy.h
*
* Author: Ming Tsang
* Copyright (c) 2014 Ming Tsang
* Refer to LICENSE for details
*/
#pragma once
#include <ostream>
#include "libutils/io/log_strategy.h"
namespace utils
{
namespace io
{
template<typename CharT_>
class OstreamLogStrategy : public LogStrategy<CharT_>
{
public:
void Flush()
{
GetStream().flush();
}
protected:
explicit OstreamLogStrategy(std::basic_ostream<CharT_> *stream)
: OstreamLogStrategy(stream, true)
{}
OstreamLogStrategy(std::basic_ostream<CharT_> *stream, const bool is_owner);
virtual ~OstreamLogStrategy();
std::basic_ostream<CharT_>& GetStream()
{
return *m_stream;
}
private:
std::basic_ostream<CharT_> *m_stream;
bool m_is_owner;
};
}
}
#include "ostream_log_strategy.tcc"
|
/*
* ostream_log_strategy.h
*
* Author: Ming Tsang
* Copyright (c) 2014 Ming Tsang
* Refer to LICENSE for details
*/
#pragma once
#include <ostream>
#include "libutils/io/log_strategy.h"
namespace utils
{
namespace io
{
template<typename CharT_>
class OstreamLogStrategy : public LogStrategy<CharT_>
{
public:
void Flush()
{
GetStream().flush();
}
protected:
explicit OstreamLogStrategy(std::basic_ostream<CharT_> *stream)
: OstreamLogStrategy(stream, true)
{}
OstreamLogStrategy(std::basic_ostream<CharT_> *stream, const bool is_owner);
OstreamLogStrategy(const OstreamLogStrategy&) = delete;
OstreamLogStrategy(OstreamLogStrategy&&) = delete;
virtual ~OstreamLogStrategy();
std::basic_ostream<CharT_>& GetStream()
{
return *m_stream;
}
private:
std::basic_ostream<CharT_> *m_stream;
bool m_is_owner;
};
}
}
#include "ostream_log_strategy.tcc"
|
Delete copy and move constructor
|
Delete copy and move constructor
|
C
|
mit
|
nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils
|
6a4e3316af783cd36cb96a7dd81597cc272801e8
|
main.c
|
main.c
|
#include "config_parse.h"
#include <stdio.h>
#include <stdlib.h>
extern char **environ;
/******************************************************************************/
int main(
int argc,
char *argv[]
)
{
FILE * conf_fd;
config_parse_res_t res;
if(argc != 2)
{
printf("usage: config_parse file\n");
return EXIT_FAILURE;
}
conf_fd = fopen(argv[1], "r");
if(NULL != conf_fd)
{
res = config_parse(conf_fd, 1);
if(CONFIG_PARSE_OK == res)
{
char **env;
for (env = environ; *env; ++env)
printf("%s\n", *env);
}
else
{
printf("Error no. %d while processing file \n", res);
}
fclose(conf_fd);
}
else
{
printf("Could not open the specified file.\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
|
#include "config_parse.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
extern char **environ;
/******************************************************************************/
int main(
int argc,
char *argv[]
)
{
FILE * conf_fd;
config_parse_res_t res;
if(argc != 2)
{
printf("usage: config_parse file ('-' for stdin)\n");
return EXIT_FAILURE;
}
if(0 == strcmp("-", argv[1]))
{
conf_fd = stdin;
}
else
{
conf_fd = fopen(argv[1], "r");
}
if(NULL != conf_fd)
{
res = config_parse(conf_fd, 1);
if(CONFIG_PARSE_OK == res)
{
char **env;
for (env = environ; *env; ++env)
printf("%s\n", *env);
}
else
{
printf("Error no. %d while processing file \n", res);
}
fclose(conf_fd);
}
else
{
printf("Could not open the specified file.\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
|
Add option to read from stdin
|
Add option to read from stdin
|
C
|
mit
|
stefan-misik/config-parse
|
bd6796b0bde2d9ccdc55fdaf7747f1846ecd459d
|
src/unix/unix_c/unix_mcast_utils.h
|
src/unix/unix_c/unix_mcast_utils.h
|
/* OCaml promise library
* http://www.ocsigen.org/lwt
* Copyright (C) 2009-2010 Jérémie Dimino
* 2009 Mauricio Fernandez
* 2010 Pierre Chambart
*
* This program 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, with linking exceptions;
* either version 2.1 of the License, or (at your option) any later
* version. See COPYING file for details.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#pragma once
#include "lwt_config.h"
#if !defined(LWT_ON_WINDOWS)
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
int socket_domain(int fd);
#endif
|
/* OCaml promise library
* http://www.ocsigen.org/lwt
* Copyright (C) 2009-2010 Jérémie Dimino
* 2009 Mauricio Fernandez
* 2010 Pierre Chambart
*
* This program 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, with linking exceptions;
* either version 2.1 of the License, or (at your option) any later
* version. See COPYING file for details.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#pragma once
#include "lwt_config.h"
/*
* Included in:
* - unix_mcast_modify_membership.c
* - unix_mcast_set_loop.c
* - unix_mcast_set_ttl.c
* - unix_mcast_utils.c
*/
#if !defined(LWT_ON_WINDOWS)
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
int socket_domain(int fd);
#endif
|
Add in comments the files that uses this header
|
Add in comments the files that uses this header
|
C
|
mit
|
c-cube/lwt,ocsigen/lwt,rneswold/lwt,ocsigen/lwt,ocsigen/lwt,rneswold/lwt,c-cube/lwt,rneswold/lwt,c-cube/lwt
|
e5c078e0f278adfbe685df2d8e141a9f71ea7cc8
|
queue/linkedListImplementation/queue.h
|
queue/linkedListImplementation/queue.h
|
#include <stdio.h>
#include <stdlib.h>
#include "utility.h"
/*
* MAW 3.25.a Write the routines to implement queues using: Linked Lists
*
* We use a header node at the very beginning of the linked list.
*
* Front: | header node | -> | data node | -> | data node | :Rear
*/
#ifndef _QUEUE_H
#define _QUEUE_H
typedef int ET;
struct QueueRecord;
struct QueueCDT;
typedef struct QueueRecord* PtrToNode;
typedef struct QueueCDT* QueueADT; // naming convention: https://www.cs.bu.edu/teaching/c/queue/linked-list/types.html
int isEmpty(QueueADT Q);
QueueADT createQueue();
void disposeQueue(QueueADT Q);
void makeEmpty(QueueADT Q);
void enqueue(ET elem, QueueADT Q);
ET front(QueueADT Q);
void dequeue(QueueADT Q);
ET frontAndDequeue(QueueADT Q);
QueueADT initializeQueue(ET array[], int lengthArray);
void printQueue(QueueADT Q);
#endif
|
#include <stdio.h>
#include <stdlib.h>
#include "utility.h"
/*
* MAW 3.25.a Write the routines to implement queues using: Linked Lists
*
* We use a header node at the very beginning of the linked list.
*
* Front: | header node | -> | data node | -> | data node | :Rear
*/
#ifndef _QUEUE_H
#define _QUEUE_H
typedef int ET;
struct QueueRecord;
struct QueueCDT;
typedef struct QueueRecord* PtrToNode;
// CDT: concrete-type-of-a-queue
// ADT: abstract-type-of-a-queue
typedef struct QueueCDT* QueueADT; // naming convention: https://www.cs.bu.edu/teaching/c/queue/linked-list/types.html
int isEmpty(QueueADT Q);
QueueADT createQueue();
void disposeQueue(QueueADT Q);
void makeEmpty(QueueADT Q);
void enqueue(ET elem, QueueADT Q);
ET front(QueueADT Q);
void dequeue(QueueADT Q);
ET frontAndDequeue(QueueADT Q);
QueueADT initializeQueue(ET array[], int lengthArray);
void printQueue(QueueADT Q);
#endif
|
Add comment remarks to CDT & ADT
|
Add comment remarks to CDT & ADT
|
C
|
mit
|
xxks-kkk/algo,xxks-kkk/algo
|
fee691d90d9df4376b6ffffb6516d8a817025c93
|
StarEngine/jni/Input/GestureManager.h
|
StarEngine/jni/Input/GestureManager.h
|
#pragma once
#ifdef _WIN32
#else
#include <android_native_app_glue.h>
#endif
#include <vector>
#include "BaseGesture.h"
namespace star
{
struct WinInputState;
class GestureManager {
public:
GestureManager();
~GestureManager();
void Update(const Context& context);
void AddGesture(BaseGesture* gesture);
void RemoveGesture(BaseGesture* gesture);
#ifdef _WIN32
void OnUpdateWinInputState();
#else
void OnTouchEvent(AInputEvent* pEvent);
#endif
private:
std::vector<BaseGesture*> m_GestureVec;
double m_dTime;
double m_TotalTime;
GestureManager(const GestureManager& t);
GestureManager(GestureManager&& t);
GestureManager& operator=(const GestureManager& t);
};
}
|
#pragma once
#ifdef _WIN32
#else
#include <android_native_app_glue.h>
#endif
#include <vector>
#include "BaseGesture.h"
namespace star
{
struct WinInputState
// [COMMENT] Gesture-Tags
// Gestures should also be given a user-defined tag
// when added to the the manager.
// this way the user can look them up by tag, rather then
// on pointer ( for adding one, or removing one, or getting one )
// Part of the beauty of this kind of managing concept is
// that the user doesn't have to bother about the pointers
// as that's all managed inside the manager.
// On a side note... It's probably a good practice that the user defines
// these gestures in the Game class, as scenes get created
// and deleted everytime the screen rotates on android.
class GestureManager {
public:
GestureManager();
~GestureManager();
void Update(const Context& context);
void AddGesture(BaseGesture* gesture);
void RemoveGesture(BaseGesture* gesture);
#ifdef _WIN32
void OnUpdateWinInputState();
#else
void OnTouchEvent(AInputEvent* pEvent);
#endif
private:
std::vector<BaseGesture*> m_GestureVec;
double m_dTime;
double m_TotalTime;
GestureManager(const GestureManager& t);
GestureManager(GestureManager&& t);
GestureManager& operator=(const GestureManager& t);
};
}
|
Comment for pieter in Gesture manager. Read && fix
|
Comment for pieter in Gesture manager. Read && fix
|
C
|
mit
|
gh054/engine,gh054/engine,GlenDC/StarEngine,GlenDC/StarEngine,hcxyzlm/engine,StarEngine/engine,GlenDC/StarEngine,StarEngine/engine,hcxyzlm/engine,GlenDC/StarEngine,GlenDC/StarEngine
|
1f9749452f0d1c50eb920c5df7b026542d07eab8
|
TARGET_STM/TARGET_STM32F4XX/cmsis_nvic.c
|
TARGET_STM/TARGET_STM32F4XX/cmsis_nvic.c
|
/* mbed Microcontroller Library - cmsis_nvic for STM32F4
* Copyright (c) 2009-2011 ARM Limited. All rights reserved.
*
* CMSIS-style functionality to support dynamic vectors
*/
#include "cmsis_nvic.h"
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Location of vectors in RAM
#define NVIC_FLASH_VECTOR_ADDRESS (0x0) // Initial vector position in flash
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
uint32_t *vectors = (uint32_t*)SCB->VTOR;
uint32_t i;
// Copy and switch to dynamic vectors if the first time called
if (SCB->VTOR == NVIC_FLASH_VECTOR_ADDRESS) {
uint32_t *old_vectors = vectors;
vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
for (i=0; i<NVIC_NUM_VECTORS; i++) {
vectors[i] = old_vectors[i];
}
SCB->VTOR = (uint32_t)NVIC_RAM_VECTOR_ADDRESS;
}
vectors[IRQn + 16] = vector;
}
uint32_t NVIC_GetVector(IRQn_Type IRQn) {
uint32_t *vectors = (uint32_t*)SCB->VTOR;
return vectors[IRQn + 16];
}
|
/* mbed Microcontroller Library - cmsis_nvic for STM32F4
* Copyright (c) 2009-2011 ARM Limited. All rights reserved.
*
* CMSIS-style functionality to support dynamic vectors
*/
#include "cmsis_nvic.h"
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Location of vectors in RAM
static unsigned char vtor_relocated;
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
uint32_t *vectors = (uint32_t*)SCB->VTOR;
uint32_t i;
// Copy and switch to dynamic vectors if the first time called
if (!vtor_relocated) {
uint32_t *old_vectors = vectors;
vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
for (i=0; i<NVIC_NUM_VECTORS; i++) {
vectors[i] = old_vectors[i];
}
SCB->VTOR = (uint32_t)NVIC_RAM_VECTOR_ADDRESS;
vtor_relocated = 1;
}
vectors[IRQn + 16] = vector;
}
uint32_t NVIC_GetVector(IRQn_Type IRQn) {
uint32_t *vectors = (uint32_t*)SCB->VTOR;
return vectors[IRQn + 16];
}
|
Fix relocation of vector on STM32.
|
Fix relocation of vector on STM32.
|
C
|
apache-2.0
|
Psykar/kubos,Psykar/kubos,Psykar/kubos,kubostech/KubOS,Psykar/kubos,Psykar/kubos,Psykar/kubos,Psykar/kubos,kubostech/KubOS
|
ddc2419c090b0af65edc9eb07ac0a736eb351b69
|
build_msvc/libsecp256k1_config.h
|
build_msvc/libsecp256k1_config.h
|
/**********************************************************************
* Copyright (c) 2013, 2014 Pieter Wuille *
* Distributed under the MIT software license, see the accompanying *
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
**********************************************************************/
#ifndef BITCOIN_LIBSECP256K1_CONFIG_H
#define BITCOIN_LIBSECP256K1_CONFIG_H
#undef USE_ASM_X86_64
#undef USE_ENDOMORPHISM
#undef USE_FIELD_10X26
#undef USE_FIELD_5X52
#undef USE_FIELD_INV_BUILTIN
#undef USE_FIELD_INV_NUM
#undef USE_NUM_GMP
#undef USE_NUM_NONE
#undef USE_SCALAR_4X64
#undef USE_SCALAR_8X32
#undef USE_SCALAR_INV_BUILTIN
#undef USE_SCALAR_INV_NUM
#define USE_NUM_NONE 1
#define USE_FIELD_INV_BUILTIN 1
#define USE_SCALAR_INV_BUILTIN 1
#define USE_FIELD_10X26 1
#define USE_SCALAR_8X32 1
#endif /* BITCOIN_LIBSECP256K1_CONFIG_H */
|
/**********************************************************************
* Copyright (c) 2013, 2014 Pieter Wuille *
* Distributed under the MIT software license, see the accompanying *
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
**********************************************************************/
#ifndef BITCOIN_LIBSECP256K1_CONFIG_H
#define BITCOIN_LIBSECP256K1_CONFIG_H
#undef USE_ASM_X86_64
#undef USE_ENDOMORPHISM
#undef USE_FIELD_10X26
#undef USE_FIELD_5X52
#undef USE_FIELD_INV_BUILTIN
#undef USE_FIELD_INV_NUM
#undef USE_NUM_GMP
#undef USE_NUM_NONE
#undef USE_SCALAR_4X64
#undef USE_SCALAR_8X32
#undef USE_SCALAR_INV_BUILTIN
#undef USE_SCALAR_INV_NUM
#define USE_NUM_NONE 1
#define USE_FIELD_INV_BUILTIN 1
#define USE_SCALAR_INV_BUILTIN 1
#define USE_FIELD_10X26 1
#define USE_SCALAR_8X32 1
#define ECMULT_GEN_PREC_BITS 4
#define ECMULT_WINDOW_SIZE 15
#endif /* BITCOIN_LIBSECP256K1_CONFIG_H */
|
Update MSVC build config for libsecp256k1
|
Update MSVC build config for libsecp256k1
|
C
|
mit
|
namecoin/namecore,MeshCollider/bitcoin,apoelstra/bitcoin,instagibbs/bitcoin,JeremyRubin/bitcoin,jambolo/bitcoin,jambolo/bitcoin,lateminer/bitcoin,pataquets/namecoin-core,bitcoin/bitcoin,bitcoin/bitcoin,practicalswift/bitcoin,apoelstra/bitcoin,mruddy/bitcoin,mm-s/bitcoin,MeshCollider/bitcoin,prusnak/bitcoin,ElementsProject/elements,n1bor/bitcoin,AkioNak/bitcoin,yenliangl/bitcoin,fujicoin/fujicoin,kallewoof/bitcoin,jnewbery/bitcoin,practicalswift/bitcoin,lateminer/bitcoin,sipsorcery/bitcoin,MeshCollider/bitcoin,jnewbery/bitcoin,fanquake/bitcoin,tecnovert/particl-core,MarcoFalke/bitcoin,EthanHeilman/bitcoin,jamesob/bitcoin,JeremyRubin/bitcoin,GroestlCoin/bitcoin,domob1812/namecore,litecoin-project/litecoin,jlopp/statoshi,domob1812/namecore,particl/particl-core,instagibbs/bitcoin,bitcoinsSG/bitcoin,ajtowns/bitcoin,sstone/bitcoin,rnicoll/bitcoin,kallewoof/bitcoin,mm-s/bitcoin,MarcoFalke/bitcoin,lateminer/bitcoin,sstone/bitcoin,namecoin/namecoin-core,EthanHeilman/bitcoin,sipsorcery/bitcoin,prusnak/bitcoin,domob1812/namecore,pataquets/namecoin-core,JeremyRubin/bitcoin,domob1812/bitcoin,MarcoFalke/bitcoin,AkioNak/bitcoin,anditto/bitcoin,rnicoll/bitcoin,sstone/bitcoin,MeshCollider/bitcoin,bitcoin/bitcoin,namecoin/namecore,fanquake/bitcoin,jnewbery/bitcoin,alecalve/bitcoin,litecoin-project/litecoin,fujicoin/fujicoin,anditto/bitcoin,n1bor/bitcoin,Sjors/bitcoin,jambolo/bitcoin,namecoin/namecoin-core,qtumproject/qtum,domob1812/bitcoin,ElementsProject/elements,instagibbs/bitcoin,domob1812/bitcoin,namecoin/namecoin-core,rnicoll/bitcoin,ajtowns/bitcoin,fujicoin/fujicoin,Xekyo/bitcoin,Sjors/bitcoin,pstratem/bitcoin,cdecker/bitcoin,anditto/bitcoin,bitcoinknots/bitcoin,EthanHeilman/bitcoin,andreaskern/bitcoin,AkioNak/bitcoin,rnicoll/dogecoin,EthanHeilman/bitcoin,MarcoFalke/bitcoin,bitcoinsSG/bitcoin,achow101/bitcoin,andreaskern/bitcoin,bitcoinsSG/bitcoin,fanquake/bitcoin,sipsorcery/bitcoin,namecoin/namecoin-core,Sjors/bitcoin,n1bor/bitcoin,mm-s/bitcoin,Xekyo/bitcoin,sipsorcery/bitcoin,particl/particl-core,Xekyo/bitcoin,tecnovert/particl-core,jnewbery/bitcoin,fujicoin/fujicoin,kallewoof/bitcoin,alecalve/bitcoin,tecnovert/particl-core,apoelstra/bitcoin,prusnak/bitcoin,bitcoin/bitcoin,litecoin-project/litecoin,practicalswift/bitcoin,midnightmagic/bitcoin,achow101/bitcoin,yenliangl/bitcoin,practicalswift/bitcoin,bitcoinsSG/bitcoin,rnicoll/dogecoin,achow101/bitcoin,lateminer/bitcoin,GroestlCoin/bitcoin,MarcoFalke/bitcoin,AkioNak/bitcoin,namecoin/namecore,anditto/bitcoin,cdecker/bitcoin,domob1812/bitcoin,domob1812/namecore,particl/particl-core,yenliangl/bitcoin,Sjors/bitcoin,mruddy/bitcoin,bitcoinsSG/bitcoin,mruddy/bitcoin,dscotese/bitcoin,mruddy/bitcoin,GroestlCoin/GroestlCoin,midnightmagic/bitcoin,cdecker/bitcoin,dscotese/bitcoin,instagibbs/bitcoin,bitcoinknots/bitcoin,bitcoinknots/bitcoin,fanquake/bitcoin,Xekyo/bitcoin,bitcoin/bitcoin,bitcoinknots/bitcoin,rnicoll/bitcoin,jonasschnelli/bitcoin,GroestlCoin/GroestlCoin,JeremyRubin/bitcoin,n1bor/bitcoin,MarcoFalke/bitcoin,sipsorcery/bitcoin,jlopp/statoshi,particl/particl-core,alecalve/bitcoin,GroestlCoin/bitcoin,pataquets/namecoin-core,prusnak/bitcoin,anditto/bitcoin,jnewbery/bitcoin,cdecker/bitcoin,achow101/bitcoin,andreaskern/bitcoin,practicalswift/bitcoin,anditto/bitcoin,jambolo/bitcoin,bitcoin/bitcoin,dscotese/bitcoin,jlopp/statoshi,JeremyRubin/bitcoin,qtumproject/qtum,apoelstra/bitcoin,midnightmagic/bitcoin,litecoin-project/litecoin,mruddy/bitcoin,achow101/bitcoin,MeshCollider/bitcoin,pataquets/namecoin-core,tecnovert/particl-core,andreaskern/bitcoin,fanquake/bitcoin,pataquets/namecoin-core,qtumproject/qtum,andreaskern/bitcoin,jlopp/statoshi,alecalve/bitcoin,jambolo/bitcoin,fujicoin/fujicoin,EthanHeilman/bitcoin,GroestlCoin/GroestlCoin,pataquets/namecoin-core,qtumproject/qtum,GroestlCoin/bitcoin,Xekyo/bitcoin,ElementsProject/elements,ElementsProject/elements,jonasschnelli/bitcoin,sipsorcery/bitcoin,pstratem/bitcoin,qtumproject/qtum,namecoin/namecoin-core,dscotese/bitcoin,kallewoof/bitcoin,litecoin-project/litecoin,EthanHeilman/bitcoin,particl/particl-core,ajtowns/bitcoin,jamesob/bitcoin,n1bor/bitcoin,alecalve/bitcoin,jonasschnelli/bitcoin,midnightmagic/bitcoin,jlopp/statoshi,kallewoof/bitcoin,midnightmagic/bitcoin,achow101/bitcoin,pstratem/bitcoin,dscotese/bitcoin,mruddy/bitcoin,fanquake/bitcoin,cdecker/bitcoin,yenliangl/bitcoin,prusnak/bitcoin,GroestlCoin/bitcoin,tecnovert/particl-core,pstratem/bitcoin,jonasschnelli/bitcoin,cdecker/bitcoin,AkioNak/bitcoin,GroestlCoin/GroestlCoin,pstratem/bitcoin,namecoin/namecoin-core,jamesob/bitcoin,apoelstra/bitcoin,dscotese/bitcoin,mm-s/bitcoin,GroestlCoin/GroestlCoin,bitcoinsSG/bitcoin,yenliangl/bitcoin,litecoin-project/litecoin,yenliangl/bitcoin,rnicoll/bitcoin,Xekyo/bitcoin,practicalswift/bitcoin,namecoin/namecore,instagibbs/bitcoin,fujicoin/fujicoin,qtumproject/qtum,namecoin/namecore,sstone/bitcoin,JeremyRubin/bitcoin,rnicoll/dogecoin,qtumproject/qtum,rnicoll/dogecoin,Sjors/bitcoin,tecnovert/particl-core,jamesob/bitcoin,instagibbs/bitcoin,bitcoinknots/bitcoin,ajtowns/bitcoin,mm-s/bitcoin,andreaskern/bitcoin,rnicoll/bitcoin,jamesob/bitcoin,lateminer/bitcoin,alecalve/bitcoin,midnightmagic/bitcoin,MeshCollider/bitcoin,pstratem/bitcoin,prusnak/bitcoin,rnicoll/dogecoin,particl/particl-core,ElementsProject/elements,ElementsProject/elements,kallewoof/bitcoin,jambolo/bitcoin,ajtowns/bitcoin,sstone/bitcoin,GroestlCoin/bitcoin,ajtowns/bitcoin,domob1812/bitcoin,namecoin/namecore,mm-s/bitcoin,jamesob/bitcoin,GroestlCoin/GroestlCoin,sstone/bitcoin,domob1812/namecore,n1bor/bitcoin,jonasschnelli/bitcoin,jlopp/statoshi,domob1812/namecore,lateminer/bitcoin,apoelstra/bitcoin,AkioNak/bitcoin,domob1812/bitcoin
|
447a5d8024b547e4b008268f128456ca3b764b6b
|
src/test.c
|
src/test.c
|
#include <stdio.h>
int main() {
int a = 0;
while(1) {
printf("%d\t",a);
printf("a = 0x%x\n",a);
int temp;
scanf("%d",&temp);
if(temp == 0) {
continue;
}
else {
a = temp;
}
printf("%d\t",a);
printf("a changed 0x%x\n",a);
}
return 0;
}
|
#include <stdio.h>
int main() {
int a = 0;
while(1) {
printf("%d\t",a);
printf("a = 0x%x\n",a);
int temp;
scanf("%d",&temp);
if(temp == 0) {
continue;
}
else {
a = temp;
}
printf("%d\t",a);
printf("a changed 0x%x\n",a);
}
return 0;
}
|
Test file tab to space
|
Test file tab to space
|
C
|
bsd-3-clause
|
allencch/med,allencch/med,allencch/med
|
25caea025ae66c815cc85599e51b0b07d9957321
|
RectConfinementForce.h
|
RectConfinementForce.h
|
/*===- RectConfinementForce.h - libSimulation -=================================
*
* DEMON
*
* This file is distributed under the BSD Open Source License. See LICENSE.TXT
* for details.
*
*===-----------------------------------------------------------------------===*/
#ifndef RECTCONFINEMENTFORCE_H
#define RECTCONFINEMENTFORCE_H
#include "Force.h"
#include "VectorCompatibility.h"
class RectConfinementForce : public Force
{
public:
RectConfinementForce(Cloud * const myCloud, double confineConstX, double confineConstY); // confinement consts must be positive!
~RectConfinementForce() {} // destructor
// public functions:
// Note: currentTime parameter is necessary (due to parent class) but unused
void force1(const double currentTime); // rk substep 1
void force2(const double currentTime); // rk substep 2
void force3(const double currentTime); // rk substep 3
void force4(const double currentTime); // rk substep 4
void writeForce(fitsfile * const file, int * const error) const;
void readForce(fitsfile * const file, int * const error);
private:
// private variables:
double confineX;
double confineY;
// private functions:
void force(const unsigned int currentParticle, const __m128d currentPositionX, const __m128d currentPositionY);
};
#endif // RECTCONFINEMENTFORCE_H
|
/*===- RectConfinementForce.h - libSimulation -=================================
*
* DEMON
*
* This file is distributed under the BSD Open Source License. See LICENSE.TXT
* for details.
*
*===-----------------------------------------------------------------------===*/
#ifndef RECTCONFINEMENTFORCE_H
#define RECTCONFINEMENTFORCE_H
#include "Force.h"
#include "VectorCompatibility.h"
class RectConfinementForce : public Force
{
public:
RectConfinementForce(Cloud * const myCloud, double confineConstX, double confineConstY);
// IMPORTANT: In the above constructor, confineConst_'s must be positive!
~RectConfinementForce() {} // destructor
// public functions:
// Note: currentTime parameter is necessary (due to parent class) but unused
void force1(const double currentTime); // rk substep 1
void force2(const double currentTime); // rk substep 2
void force3(const double currentTime); // rk substep 3
void force4(const double currentTime); // rk substep 4
void writeForce(fitsfile * const file, int * const error) const;
void readForce(fitsfile * const file, int * const error);
private:
// private variables:
double confineX;
double confineY;
// private functions:
void force(const unsigned int currentParticle, const __m128d currentPositionX, const __m128d currentPositionY);
};
#endif // RECTCONFINEMENTFORCE_H
|
Reword comment to be consistent with comment in ConfinementForce.
|
Reword comment to be consistent with comment in ConfinementForce.
|
C
|
bsd-3-clause
|
leios/demonsimulationcode,leios/demonsimulationcode
|
ffc3e8a32700194477d5d576c8bd3f7df853a6b1
|
common/macros.h
|
common/macros.h
|
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
Copyright (C) 2009 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MACROS_H
#define __MACROS_H
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#define SPICE_ATTR_PRINTF(a,b) \
__attribute__((format(printf,a,b)))
#else
#define SPICE_ATTR_PRINTF(a,b)
#endif /* __GNUC__ */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
#define SPICE_ATTR_NORETURN \
__attribute__((noreturn))
#else
#define SPICE_ATTR_NORETURN
#endif /* __GNUC__ */
#endif /* __MACROS_H */
|
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
Copyright (C) 2009 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MACROS_H
#define __MACROS_H
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)
#define SPICE_ATTR_NORETURN \
__attribute__((noreturn))
#define SPICE_ATTR_PRINTF(a,b) \
__attribute__((format(printf,a,b)))
#else
#define SPICE_ATTR_NORETURN
#define SPICE_ATTR_PRINTF
#endif /* __GNUC__ */
#endif /* __MACROS_H */
|
Fix min gcc version for __attribute__(format)
|
Fix min gcc version for __attribute__(format)
We currently use it only on gcc 4.5 or newer, but it was actually
introduced much earlier than that. It's documented in gcc 2.95.3
manual:
http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC84
and glib uses starting from gcc 2.2.5.
This commit uses the same minimum version as glib.
This was causing warnings on RHEL6 systems which have gcc 4.4.7
|
C
|
lgpl-2.1
|
fgouget/spice-common,fgouget/spice-common,elmarco/spice-common,fgouget/spice-common,SPICE/spice-common,freedesktop-unofficial-mirror/spice__spice-common,elmarco/spice-common,fgouget/spice-common,freedesktop-unofficial-mirror/spice__spice-common,freedesktop-unofficial-mirror/spice__spice-common,elmarco/spice-common,freedesktop-unofficial-mirror/spice__spice-common,Fantu/spice-common,SPICE/spice-common,Fantu/spice-common,Fantu/spice-common,Fantu/spice-common,SPICE/spice-common,elmarco/spice-common
|
f363bf4d9d27601fb67e4a2e5bc2c730cf2eb156
|
Pukli/src/Menu_state.h
|
Pukli/src/Menu_state.h
|
#ifndef __MENU_STATE_H__
#define __MENU_STATE_H__
#include <vector>
#include "Game_state.h"
#include "Game_object.h"
class Menu_state : public Game_state {
public:
void update();
void render();
bool on_enter();
bool on_exit();
const std::string get_state_id() const { return s_menu_id; };
private:
static const std::string s_menu_id;
std::vector<Game_object*> m_game_objects;
static void menu_to_play();
static void menu_to_exit();
};
#endif
|
#ifndef __MENU_STATE_H__
#define __MENU_STATE_H__
#include <vector>
#include "Game_state.h"
#include "Game_object.h"
class Menu_state : public Game_state {
public:
void update();
void render();
bool on_enter();
bool on_exit();
const std::string get_state_id() const { return s_menu_id; };
private:
static const std::string s_menu_id;
std::vector<Game_object*> m_game_objects;
};
#endif
|
Revert "added button callback functions"
|
Revert "added button callback functions"
This reverts commit 8962b70fe01cbbd0bd4a82a8c68208ab276add31.
|
C
|
mit
|
AdjustmentBeaver/pukli,AdjustmentBeaver/pukli
|
7fa5884b0122ecaaee5a4a872a6a8b6b73012b58
|
webkit/glue/form_data.h
|
webkit/glue/form_data.h
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_H__
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
FormData() : user_submitted(false) {}
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_H__
|
Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site.
|
AutoFill: Add a default constructor for FormData. There are too many places
that create FormDatas, and we shouldn't need to initialize user_submitted for
each call site.
BUG=50423
TEST=none
Review URL: http://codereview.chromium.org/3074023
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@54641 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
gavinp/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,adobe/chromium,ropik/chromium
|
b4aa51bece92b29c40af44290210e1abdfcc2078
|
3rdparty/GLKit/GLKMath.h
|
3rdparty/GLKit/GLKMath.h
|
//
// GLKMath.h
// GLKit
//
// Copyright (c) 2011, Apple Inc. All rights reserved.
//
#include <GLKit/GLKMathTypes.h>
#include <GLKit/GLKMatrix3.h>
#include <GLKit/GLKMatrix4.h>
#include <GLKit/GLKVector2.h>
#include <GLKit/GLKVector3.h>
#include <GLKit/GLKVector4.h>
#include <GLKit/GLKQuaternion.h>
#include <GLKit/GLKMatrixStack.h>
#include <GLKit/GLKMathUtils.h>
|
//
// GLKMath.h
// GLKit
//
// Copyright (c) 2011, Apple Inc. All rights reserved.
//
#include <GLKit/GLKMathTypes.h>
#include <GLKit/GLKMatrix3.h>
#include <GLKit/GLKMatrix4.h>
#include <GLKit/GLKVector2.h>
#include <GLKit/GLKVector3.h>
#include <GLKit/GLKVector4.h>
#include <GLKit/GLKQuaternion.h>
//#include <GLKit/GLKMatrixStack.h>
#include <GLKit/GLKMathUtils.h>
|
Remove GLKMatrixStack ... thanks Twilight! :D
|
Remove GLKMatrixStack ... thanks Twilight! :D
|
C
|
bsd-3-clause
|
MiJyn/nightmare,MiJyn/nightmare
|
8f40a8f6eafed187bc8d5ed38b1d080c9dc2af98
|
src/torcontrol.h
|
src/torcontrol.h
|
// Copyright (c) 2015 The BitCoin Core developers
// Copyright (c) 2016 The Silk Network developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
/**
* Functionality for communicating with Tor.
*/
#ifndef SILK_TORCONTROL_H
#define SILK_TORCONTROL_H
#include "scheduler.h"
extern const std::string DEFAULT_TOR_CONTROL;
static const bool DEFAULT_LISTEN_ONION = true;
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler);
void InterruptTorControl();
void StopTorControl();
#endif /* SILK_TORCONTROL_H */
|
// Copyright (c) 2015 The BitCoin Core developers
// Copyright (c) 2016 The Silk Network developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
/**
* Functionality for communicating with Tor.
*/
#ifndef SILK_TORCONTROL_H
#define SILK_TORCONTROL_H
#include "scheduler.h"
extern const std::string DEFAULT_TOR_CONTROL;
static const bool DEFAULT_LISTEN_ONION = false;
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler);
void InterruptTorControl();
void StopTorControl();
#endif /* SILK_TORCONTROL_H */
|
Set Tor Default Monitoring to False
|
Set Tor Default Monitoring to False
|
C
|
mit
|
SilkNetwork/Silk-Core,duality-solutions/Sequence,SilkNetwork/Silk-Core,SilkNetwork/Silk-Core,duality-solutions/Sequence,duality-solutions/Sequence,SilkNetwork/Silk-Core,duality-solutions/Sequence,SilkNetwork/Silk-Core,duality-solutions/Sequence,SilkNetwork/Silk-Core,duality-solutions/Sequence
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.