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
|
|---|---|---|---|---|---|---|---|---|---|
297029a7e14db8fd6f30c578e1c1860dadc04096
|
frame_tools.c
|
frame_tools.c
|
#include <clib/alib_stdio_protos.h>
#include <clib/graphics_protos.h>
#include <inline/graphics_protos.h>
#include <proto/graphics.h>
#include "frame_tools.h"
void RenderFrameNumber(int frameNumber) {
struct RastPort *rastPort = GetCurrentRastPort();
SetDrMd(rastPort, JAM1);
char number[4];
sprintf(number, "%04d", frameNumber);
Move(rastPort, 2, 8);
Text(rastPort, number, 4);
}
|
#include <clib/alib_stdio_protos.h>
#include <clib/graphics_protos.h>
#include <inline/graphics_protos.h>
#include <proto/graphics.h>
#include "frame_tools.h"
void RenderFrameNumber(int frameNumber) {
struct RastPort *rastPort = GetCurrentRastPort();
SetDrMd(rastPort, JAM1);
char number[5];
sprintf(number, "%04d", frameNumber);
Move(rastPort, 2, 8);
Text(rastPort, number, 4);
}
|
Fix a nasty crash on Z3 Fast RAM enabled WinUAE.
|
Fix a nasty crash on Z3 Fast RAM enabled WinUAE.
|
C
|
artistic-2.0
|
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
|
ef0a815082ee32b1bb661cc0b91a6eae53a7e2c3
|
inc/setting.h
|
inc/setting.h
|
#ifndef __SETTING_H__
#define __SETTING_H__
#define DITHERING_AMP 768;
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 45 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PERIOD (1.0f / SAMPLING_RATE)
#define Q_1 1048576
#define Q_MULT_SHIFT 11
#define BLOCK_PERIOD ((float)SAMPLE_NUM / SAMPLING_RATE)
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
|
#ifndef __SETTING_H__
#define __SETTING_H__
#define DITHERING_AMP 768;
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 44.1 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PERIOD (1.0f / SAMPLING_RATE)
#define Q_1 1048576
#define Q_MULT_SHIFT 11
#define BLOCK_PERIOD ((float)SAMPLE_NUM / SAMPLING_RATE)
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
|
Change SAMpling Rate to 44.1K, ready for wav playing
|
Change SAMpling Rate to 44.1K, ready for wav playing
|
C
|
mit
|
sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,BeyondCloud/uRock,BeyondCloud/uRock
|
ac5bfbbc8e46369f49816d8400d10dceceaa8b5a
|
treeplayer/inc/LinkDef.h
|
treeplayer/inc/LinkDef.h
|
/* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.1.1.1 2000/05/16 17:00:44 rdm Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TTreePlayer;
#pragma link C++ class TPacketGenerator;
#pragma link C++ class TTreeFormula-;
#endif
|
/* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.2 2000/07/06 17:20:52 brun Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TTreePlayer+;
#pragma link C++ class TPacketGenerator;
#pragma link C++ class TTreeFormula-;
#endif
|
Declare option "+" for TTreePlayer
|
Declare option "+" for TTreePlayer
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@986 27541ba8-7e3a-0410-8455-c3a389f83636
|
C
|
lgpl-2.1
|
bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT
|
dd8141b9f910bda6a1f423dcdda0ca48fac8cdcf
|
src/capwap/dtls_gnutls.c
|
src/capwap/dtls_gnutls.c
|
/*
This file is part of libcapwap.
libcapwap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcapwap 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gnutls/gnutls.h>
int dtls_gnutls_init()
{
gnutls_global_init();
return 1;
}
|
/*
This file is part of libcapwap.
libcapwap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcapwap 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gnutls/gnutls.h>
#include "cw_log.h"
int dtls_gnutls_init()
{
cw_dbg(DBG_CW_INFO,"Init SSL library - using GnuTLS");
gnutls_global_init();
return 1;
}
|
Debug info for init dunction.
|
Debug info for init dunction.
FossilOrigin-Name: 7127f1670bedbfa09f000dcd4eff557f448184d0450b373e888856979877ccbe
|
C
|
bsd-2-clause
|
7u83/actube,7u83/actube,7u83/actube,7u83/actube,7u83/actube
|
43d18db47ade75c53db4fce9b521a96b01c75cec
|
inc/setting.h
|
inc/setting.h
|
#ifndef __SETTING_H__
#define __SETTING_H__
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 100 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PREIOD 1 / SAMPLE_RATE
#define BLOCK_PREIOD SAMPLE_NUM / SAMPLING_RATE
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
|
#ifndef __SETTING_H__
#define __SETTING_H__
#define BUFFER_NUM 4
#define STAGE_NUM 4
#define SAMPLE_NUM 256
#define SAMPLE_MAX 2047
#define SAMPLING_RATE 200 /* In Kilo Hz, Make Sure it can divide 45000*/
#define SAMPLE_PREIOD 1 / SAMPLE_RATE
#define BLOCK_PREIOD SAMPLE_NUM / SAMPLING_RATE
#define DELAY_BANK(x) DELAY_BANK_##x
#define DELAY_BANK_0 0xD0200000
#define DELAY_BANK_1 0xD0300000
#define DELAY_BANK_2 0xD0400000
#define DELAY_BANK_3 0xD0500000
#define DELAY_BANK_4 0xD0600000
#endif //__SETTING_H__
|
Increase the sampling rate to 200khz
|
Increase the sampling rate to 200khz
|
C
|
mit
|
sonicyang/uRock,BeyondCloud/uRock,BeyondCloud/uRock,sonicyang/uRock,sonicyang/uRock,BeyondCloud/uRock,sonicyang/uRock,BeyondCloud/uRock
|
f8cbdcc43038a1acb26f6643aa06c082b14c15ef
|
src/Game/Player.h
|
src/Game/Player.h
|
//
// WulfGame/Game/Player.h
// Copyright (C) 2012 Lexi Robinson
// This code is freely available under the MIT licence.
//
#pragma once
#include <glm/glm.hpp>
#include "WulfConstants.h"
#include "Game/InputManager.h"
#include "Game/Constants.h"
#include "Game/Entity.h"
#include "Map/Map.h"
namespace Wulf {
class Player : public Entity {
public:
Player();
~Player() {};
void ProcessUserInput(const Input::Data& input, const double dtime);
void ProcessMapInput(const Map::Map& map);
#ifdef FREE_VIEW
glm::vec3 GetUp() const { return mUp; }
#endif
Difficulty GetDifficulty() const { return mDifficulty; }
void SetDifficulty(Difficulty nDiff) { mDifficulty = nDiff; }
private:
Difficulty mDifficulty;
#ifdef FREE_VIEW
float fhViewAngle;
float fvViewAngle;
glm::vec3 mUp;
#else
float fViewAngle;
#endif
Player(Player& other);
Player& operator=(Player& other);
};
}
|
//
// WulfGame/Game/Player.h
// Copyright (C) 2012 Lexi Robinson
// This code is freely available under the MIT licence.
//
#pragma once
#include <glm/glm.hpp>
#include "WulfConstants.h"
#include "Game/InputManager.h"
#include "Game/Constants.h"
#include "Game/Entity.h"
#include "Map/Map.h"
namespace Wulf {
class Player : public Entity {
public:
Player();
~Player() {};
void ProcessUserInput(const Input::Data& input, const double dtime);
void ProcessMapInput(const Map::Map& map);
#ifdef FREE_VIEW
glm::vec3 GetUp() const { return mUp; }
#endif
byte Ammo;
word Score;
Difficulty GetDifficulty() const { return mDifficulty; }
void SetDifficulty(Difficulty nDiff) { mDifficulty = nDiff; }
private:
Difficulty mDifficulty;
#ifdef FREE_VIEW
float fhViewAngle;
float fvViewAngle;
glm::vec3 mUp;
#else
float fViewAngle;
#endif
Player(Player& other);
Player& operator=(Player& other);
};
}
|
Add ammo and score fields to the player object
|
Add ammo and score fields to the player object
|
C
|
mit
|
Lexicality/Wulf2012,Lexicality/Wulf2012
|
c4e291a94360b117fcdd4ea141599de0c670e70a
|
src/core/server.h
|
src/core/server.h
|
#ifndef APIMOCK_SERVER_H
#define APIMOCK_SERVER_H
#include <string>
#include <memory>
#include <functional>
#include "http/requestdata.h"
#include "http/responsedata.h"
namespace ApiMock {
class Server {
typedef std::function<ResponseData(RequestData)> CreateResponse;
struct ServerImpl;
std::unique_ptr<ServerImpl> _impl;
Server& operator=(const Server&);
Server(const Server&);
public:
Server();
~Server();
void startServer(const std::string& address, int port, int bufferSize, CreateResponse createResponse);
};
}
#endif
|
#ifndef APIMOCK_SERVER_H
#define APIMOCK_SERVER_H
#include <string>
#include <memory>
#include <functional>
#include "http/requestdata.h"
#include "http/responsedata.h"
namespace ApiMock {
class Server {
struct ServerImpl;
std::unique_ptr<ServerImpl> _impl;
Server& operator=(const Server&);
Server(const Server&);
public:
typedef std::function<ResponseData(RequestData)> CreateResponse;
Server();
~Server();
void startServer(const std::string& address, int port, int bufferSize, CreateResponse createResponse);
};
}
#endif
|
Make the CreateResponse typedef public
|
Make the CreateResponse typedef public
|
C
|
mit
|
Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock
|
74163dc02b192de5b4286d5cc7bd0377a7d06a74
|
CKTextField/CKTextField.h
|
CKTextField/CKTextField.h
|
//
// CKTextField.h
// CKTextField
//
// Created by Christian Klaproth on 12.09.14.
// Copyright (c) 2014 Christian Klaproth. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CKExternalKeyboardSupportedTextField.h"
@class CKTextField;
enum CKTextFieldValidationResult {
CKTextFieldValidationUnknown,
CKTextFieldValidationPassed,
CKTextFieldValidationFailed
};
/**
* Adds optional methods that are sent to the UITextFieldDelegate.
*/
@protocol CKTextFieldValidationDelegate <NSObject>
@optional
- (void)textField:(CKTextField*)aTextField validationResult:(enum CKTextFieldValidationResult)aResult forText:(NSString*)aText;
@end
@interface CKTextField : CKExternalKeyboardSupportedTextField
//
// User Defined Runtime Attributes (--> Storyboard!)
//
// *******************************************************
// *
// *
@property (nonatomic) NSString* validationType;
@property (nonatomic) NSString* minLength;
@property (nonatomic) NSString* maxLength;
@property (nonatomic) NSString* minValue;
@property (nonatomic) NSString* maxValue;
@property (nonatomic) NSString* pattern;
// *
// *
// *******************************************************
@property (nonatomic, weak) id<CKTextFieldValidationDelegate> validationDelegate;
- (void)shake;
- (void)showAcceptButton;
- (void)hideAcceptButton;
@end
|
//
// CKTextField.h
// CKTextField
//
// Created by Christian Klaproth on 12.09.14.
// Copyright (c) 2014 Christian Klaproth. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CKExternalKeyboardSupportedTextField.h"
@class CKTextField;
enum CKTextFieldValidationResult {
CKTextFieldValidationUnknown,
CKTextFieldValidationPassed,
CKTextFieldValidationFailed
};
/**
* Adds optional methods that are sent to the UITextFieldDelegate.
*/
@protocol CKTextFieldValidationDelegate <NSObject>
@optional
- (void)textField:(CKTextField*)aTextField validationResult:(enum CKTextFieldValidationResult)aResult forText:(NSString*)aText;
@end
@interface CKTextField : CKExternalKeyboardSupportedTextField
//
// User Defined Runtime Attributes (--> Storyboard!)
//
// *******************************************************
// *
// *
@property (nonatomic) IBInspectable NSString* validationType;
@property (nonatomic) IBInspectable NSString* minLength;
@property (nonatomic) IBInspectable NSString* maxLength;
@property (nonatomic) IBInspectable NSString* minValue;
@property (nonatomic) IBInspectable NSString* maxValue;
@property (nonatomic) IBInspectable NSString* pattern;
// *
// *
// *******************************************************
@property (nonatomic, weak) id<CKTextFieldValidationDelegate> validationDelegate;
- (void)shake;
- (void)showAcceptButton;
- (void)hideAcceptButton;
@end
|
Use of IBInspectable for user defined attributes.
|
Use of IBInspectable for user defined attributes.
Validation type and ranges can be specified using the attribute
inspector. #5
|
C
|
mit
|
JaNd3r/CKTextField,JaNd3r/CKTextField
|
545aa5b0f40ba9967a60a53a0d802e1aac4bbc52
|
include/ieeefp.h
|
include/ieeefp.h
|
/* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef i386
#include <machine/floatingpoint.h>
#else
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* i386 */
#endif /* _IEEEFP_H_ */
|
/* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
|
Use __i386__ instead of i386 in an ifdef.
|
Use __i386__ instead of i386 in an ifdef.
|
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
|
204cd8ac785d45c5fd3a45b019a489ffc408398e
|
kernel/cwos.c
|
kernel/cwos.c
|
#include <uart.h>
#include <irq.h>
void cwos_boot()
{
uart_init();
uart0_send("Hello CWOS World\n");
irq_enable();
trigger_swi();
while (1) {
}
}
|
#include <uart.h>
#include <irq.h>
void cwos_boot()
{
uart_init();
uart0_send("Hello CWOS World\n");
uart0_send("Press any key to see echo:\n");
irq_enable();
while (1) {
}
}
|
Update CWOS boot welcome messages
|
Update CWOS boot welcome messages
|
C
|
mit
|
waynecw/cwos,waynecw/cwos
|
fb1702cc9197a0a0c2792a86a3cdaa774ec03455
|
chrome/browser/chromeos/login/mock_user_manager.h
|
chrome/browser/chromeos/login/mock_user_manager.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_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#pragma once
#include <string>
#include <vector>
#include "chrome/browser/chromeos/login/user_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockUserManager : public UserManager {
public:
MockUserManager() {}
virtual ~MockUserManager() {}
MOCK_CONST_METHOD0(GetUsers, std::vector<User>());
MOCK_METHOD0(OffTheRecordUserLoggedIn, void());
MOCK_METHOD1(UserLoggedIn, void(const std::string&));
MOCK_METHOD1(RemoveUser, void(const std::string&));
MOCK_METHOD1(IsKnownUser, bool(const std::string&));
MOCK_CONST_METHOD0(logged_in_user, const User&());
MOCK_METHOD0(current_user_is_owner, bool());
MOCK_METHOD1(set_current_user_is_owner, void(bool));
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_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_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#pragma once
#include <string>
#include <vector>
#include "chrome/browser/chromeos/login/user_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockUserManager : public UserManager {
public:
MockUserManager() {}
virtual ~MockUserManager() {}
MOCK_CONST_METHOD0(GetUsers, std::vector<User>());
MOCK_METHOD0(OffTheRecordUserLoggedIn, void());
MOCK_METHOD1(UserLoggedIn, void(const std::string&));
MOCK_METHOD2(RemoveUser, void(const std::string&, RemoveUserDelegate*));
MOCK_METHOD1(IsKnownUser, bool(const std::string&));
MOCK_CONST_METHOD0(logged_in_user, const User&());
MOCK_CONST_METHOD0(current_user_is_owner, bool());
MOCK_METHOD1(set_current_user_is_owner, void(bool));
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
|
Fix clang warning in tests for Chrome OS
|
Fix clang warning in tests for Chrome OS
BUG=none
TEST=build with clang and gcc
Review URL: http://codereview.chromium.org/7002028
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@84970 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
gavinp/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium
|
37f3968096b6f326b3d6f54e8d805677665602aa
|
src/main.h
|
src/main.h
|
/**
*
* Copyright (C) Tyler Hackett 2016
*
* CUDA Triangle Counter
*
* A quickly-written program to determine all possible combinations of
* valid triangles from a grid, allowing for certain coordinates of the
* grid to be marked as unusable.
*
* main.h
*
* */
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
const uint2 h_invalidPoints[] = { { 0, 0 } };
__global__ void countTriangles(uint2 *validPoints, int *count);
bool isInvalidPoint(uint2 p);
|
/**
*
* Copyright (C) Tyler Hackett 2016
*
* CUDA Triangle Counter
*
* A quickly-written program to determine all possible combinations of
* valid triangles from a grid, allowing for certain coordinates of the
* grid to be marked as unusable.
*
* main.h
*
* */
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
const uint2 h_invalidPoints[] = { { 0, 0 }, { 0, 3 }, { 3, 0 }, { 3, 3 } };
__global__ void countTriangles(uint2 *validPoints, int *count);
bool isInvalidPoint(uint2 p);
|
Set up parameters to coincide with Java counterpart
|
Set up parameters to coincide with Java counterpart
|
C
|
mit
|
ByteSyze/CudaTriangleCounter
|
35f852e50e1556fc79175dcaa62360c97981f038
|
src/io/network/socketBase.h
|
src/io/network/socketBase.h
|
#ifndef SP2_IO_NETWORK_SOCKET_BASE_H
#define SP2_IO_NETWORK_SOCKET_BASE_H
#include <io/network/socketBase.h>
#include <SFML/System/NonCopyable.hpp>
namespace sp {
namespace io {
namespace network {
class SocketBase : sf::NonCopyable
{
public:
void setBlocking(bool blocking);
void setNoDelay(bool no_delay);
void setTimeout(int milliseconds);
protected:
bool isLastErrorNonBlocking();
int handle = -1;
bool blocking = true;
friend class Selector;
};
}//namespace network
}//namespace io
}//namespace sp
#endif//SP2_IO_NETWORK_SOCKET_BASE_H
|
#ifndef SP2_IO_NETWORK_SOCKET_BASE_H
#define SP2_IO_NETWORK_SOCKET_BASE_H
#include <io/network/socketBase.h>
#include <SFML/System/NonCopyable.hpp>
namespace sp {
namespace io {
namespace network {
class SocketBase : sf::NonCopyable
{
public:
void setBlocking(bool blocking);
void setTimeout(int milliseconds);
protected:
bool isLastErrorNonBlocking();
int handle = -1;
bool blocking = true;
friend class Selector;
};
}//namespace network
}//namespace io
}//namespace sp
#endif//SP2_IO_NETWORK_SOCKET_BASE_H
|
Reduce jitter on network communication by enabling NO_DELAY, but still make large packets within a update cycle.
|
Reduce jitter on network communication by enabling NO_DELAY, but still make large packets within a update cycle.
|
C
|
mit
|
daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton,daid/SeriousProton
|
c878414354902f7800675ee0bf31d10892400a81
|
sys/kern/stack_protector.c
|
sys/kern/stack_protector.c
|
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/libkern.h>
#if defined(__SSP__) || defined(__SSP_ALL__)
long __stack_chk_guard[8] = {};
void __stack_chk_fail(void);
void
__stack_chk_fail(void)
{
panic("stack overflow detected; backtrace may be corrupted");
}
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
static void
__stack_chk_init(void *dummy __unused)
{
size_t i;
long guard[__arraycount(__stack_chk_guard)];
arc4rand(guard, sizeof(guard), 0);
for (i = 0; i < __arraycount(guard); i++)
__stack_chk_guard[i] = guard[i];
}
/* SI_SUB_EVENTHANDLER is right after SI_SUB_LOCK used by arc4rand() init. */
SYSINIT(stack_chk, SI_SUB_EVENTHANDLER, SI_ORDER_ANY, __stack_chk_init, NULL);
#endif
|
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/libkern.h>
long __stack_chk_guard[8] = {};
void __stack_chk_fail(void);
void
__stack_chk_fail(void)
{
panic("stack overflow detected; backtrace may be corrupted");
}
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
static void
__stack_chk_init(void *dummy __unused)
{
size_t i;
long guard[__arraycount(__stack_chk_guard)];
arc4rand(guard, sizeof(guard), 0);
for (i = 0; i < __arraycount(guard); i++)
__stack_chk_guard[i] = guard[i];
}
/* SI_SUB_EVENTHANDLER is right after SI_SUB_LOCK used by arc4rand() init. */
SYSINIT(stack_chk, SI_SUB_EVENTHANDLER, SI_ORDER_ANY, __stack_chk_init, NULL);
|
Fix a chicken-and-egg problem: this files implements SSP support, so we cannot compile it with -fstack-protector[-all] flags (or it will self-recurse); this is ensured in sys/conf/files. This OTOH means that checking for defines __SSP__ and __SSP_ALL__ to determine if we should be compiling the support is impossible (which it was trying, resulting in an empty object file). Fix this by always compiling the symbols in this files. It's good because it allows us to always have SSP support, and then compile with SSP selectively.
|
Fix a chicken-and-egg problem: this files implements SSP support,
so we cannot compile it with -fstack-protector[-all] flags (or
it will self-recurse); this is ensured in sys/conf/files. This
OTOH means that checking for defines __SSP__ and __SSP_ALL__ to
determine if we should be compiling the support is impossible
(which it was trying, resulting in an empty object file). Fix
this by always compiling the symbols in this files. It's good
because it allows us to always have SSP support, and then compile
with SSP selectively.
Repoted by: tinderbox
|
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
|
71bddbf5bdb5c90bd041e8e126d75e15001a62a7
|
OrbitCore/Profiling.h
|
OrbitCore/Profiling.h
|
//-----------------------------------
// Copyright Pierric Gimmig 2013-2017
//-----------------------------------
#pragma once
#include "BaseTypes.h"
#include "Platform.h"
#include "Utils.h"
//-----------------------------------------------------------------------------
typedef uint64_t TickType;
//-----------------------------------------------------------------------------
#ifdef _WIN32
inline void clock_gettime(uint32_t, struct timespec* spec) {
__int64 time;
GetSystemTimeAsFileTime((FILETIME*)&time);
spec->tv_sec = time / 10000000i64;
spec->tv_nsec = time % 10000000i64 * 100;
}
#endif
//-----------------------------------------------------------------------------
inline TickType OrbitTicks(uint32_t a_Clock = 0 /*CLOCK_REALTIME*/) {
timespec ts;
clock_gettime(a_Clock, &ts);
return 1000000000ll * ts.tv_sec + ts.tv_nsec;
}
//-----------------------------------------------------------------------------
inline double MicroSecondsFromTicks(TickType a_Start, TickType a_End) {
return double((a_End - a_Start)) * 0.001;
}
//-----------------------------------------------------------------------------
inline TickType TicksFromMicroseconds(double a_Micros) {
return (TickType)(a_Micros * 1000);
}
|
//-----------------------------------
// Copyright Pierric Gimmig 2013-2017
//-----------------------------------
#pragma once
#include "BaseTypes.h"
#include "Platform.h"
#include "Utils.h"
//-----------------------------------------------------------------------------
typedef uint64_t TickType;
//-----------------------------------------------------------------------------
#ifdef _WIN32
inline void clock_gettime(uint32_t, struct timespec* spec) {
__int64 time;
GetSystemTimeAsFileTime((FILETIME*)&time);
spec->tv_sec = time / 10000000i64;
spec->tv_nsec = time % 10000000i64 * 100;
}
#endif
//-----------------------------------------------------------------------------
inline TickType OrbitTicks(uint32_t a_Clock = 1 /*CLOCK_MONOTONIC*/) {
timespec ts;
clock_gettime(a_Clock, &ts);
return 1000000000ll * ts.tv_sec + ts.tv_nsec;
}
//-----------------------------------------------------------------------------
inline double MicroSecondsFromTicks(TickType a_Start, TickType a_End) {
return double((a_End - a_Start)) * 0.001;
}
//-----------------------------------------------------------------------------
inline TickType TicksFromMicroseconds(double a_Micros) {
return (TickType)(a_Micros * 1000);
}
|
Use CLOCK_MONOTONIC as default timer clock to align with kenel events.
|
Use CLOCK_MONOTONIC as default timer clock to align with kenel events.
|
C
|
bsd-2-clause
|
pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,pierricgimmig/orbitprofiler,google/orbit,google/orbit,google/orbit,google/orbit
|
3c9e03bda57d33097b19eef1dbb06bc5b2876551
|
test/Sema/format-string-percentm.c
|
test/Sema/format-string-percentm.c
|
// RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-pc-linux-gnu
int printf(char const*,...);
void percentm(void) {
printf("%m");
}
|
// RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-pc-linux-gnu
// PR 4142 - support glibc extension to printf: '%m' (which prints strerror(errno)).
int printf(char const*,...);
void percentm(void) {
printf("%m");
}
|
Add comment to test linking it back to the original Bugzilla PR.
|
Add comment to test linking it back to the original Bugzilla PR.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@94816 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
532059d32b79e5c560142e4d1de67330361cc5f2
|
examples/ffi-struct/struct.c
|
examples/ffi-struct/struct.c
|
struct Inner
{
int x;
};
struct Outer
{
struct Inner inner_embed;
struct Inner* inner_var;
};
void modify_via_outer(struct Outer* s)
{
s->inner_embed.x = 10;
s->inner_var->x = 15;
}
void modify_inner(struct Inner* s)
{
s->x = 5;
}
|
typedef struct Inner
{
int x;
} Inner;
typedef struct Outer
{
struct Inner inner_embed;
struct Inner* inner_var;
} Outer;
void modify_via_outer(Outer* s)
{
s->inner_embed.x = 10;
s->inner_var->x = 15;
}
void modify_inner(Inner* s)
{
s->x = 5;
}
|
Fix C file coding style
|
Fix C file coding style
|
C
|
bsd-2-clause
|
jupvfranco/ponyc,cquinn/ponyc,Theodus/ponyc,jupvfranco/ponyc,mkfifo/ponyc,Praetonus/ponyc,Theodus/ponyc,Praetonus/ponyc,mkfifo/ponyc,ryanai3/ponyc,Perelandric/ponyc,lukecheeseman/ponyta,kulibali/ponyc,ryanai3/ponyc,jupvfranco/ponyc,malthe/ponyc,Theodus/ponyc,ponylang/ponyc,jupvfranco/ponyc,dipinhora/ponyc,mkfifo/ponyc,Praetonus/ponyc,sgebbie/ponyc,dipinhora/ponyc,sgebbie/ponyc,Perelandric/ponyc,CausalityLtd/ponyc,boemmels/ponyc,malthe/ponyc,cquinn/ponyc,Perelandric/ponyc,jemc/ponyc,boemmels/ponyc,boemmels/ponyc,boemmels/ponyc,boemmels/ponyc,lukecheeseman/ponyta,Perelandric/ponyc,jemc/ponyc,CausalityLtd/ponyc,mkfifo/ponyc,ponylang/ponyc,mkfifo/ponyc,cquinn/ponyc,dipinhora/ponyc,jemc/ponyc,kulibali/ponyc,ponylang/ponyc,Theodus/ponyc,sgebbie/ponyc,Theodus/ponyc,kulibali/ponyc,doublec/ponyc,doublec/ponyc,CausalityLtd/ponyc,doublec/ponyc,sgebbie/ponyc,Praetonus/ponyc,Perelandric/ponyc,cquinn/ponyc,malthe/ponyc,malthe/ponyc,lukecheeseman/ponyta,kulibali/ponyc,ryanai3/ponyc,sgebbie/ponyc,jupvfranco/ponyc
|
f0337c2d1afb2774e6e58b2084f769d3436e5b1e
|
unittest/include_gunit.h
|
unittest/include_gunit.h
|
// (C) Copyright 2017, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Portability include to match the Google test environment.
#ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#include "gtest/gtest.h"
#endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
|
// (C) Copyright 2017, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Portability include to match the Google test environment.
#ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#include "gtest/gtest.h"
#include "errcode.h" // for ASSERT_HOST
#include "fileio.h" // for tesseract::File
const char* FLAGS_test_tmpdir = ".";
class file: public tesseract::File {
};
#define CHECK(test) ASSERT_HOST(test)
#endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
|
Add more portability hacks for Google test environment
|
Add more portability hacks for Google test environment
Signed-off-by: Stefan Weil <8d4c780fcfdc41841e5070f4c43da8958ba6aec0@weilnetz.de>
|
C
|
apache-2.0
|
UB-Mannheim/tesseract,stweil/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,amitdo/tesseract,stweil/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,amitdo/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,jbarlow83/tesseract,stweil/tesseract,amitdo/tesseract,amitdo/tesseract,stweil/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,stweil/tesseract
|
5b61dafd1ba7e44f39cf73344f2a0b2b8e66064c
|
src/imap/cmd-logout.c
|
src/imap/cmd-logout.c
|
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_logout(struct client *client)
{
client_send_line(client, "* BYE Logging out");
if (client->mailbox != NULL) {
/* this could be done at client_disconnect() as well,
but eg. mbox rewrite takes a while so the waiting is
better to happen before "OK" message. */
mailbox_close(client->mailbox);
client->mailbox = NULL;
}
client_send_tagline(client, "OK Logout completed.");
client_disconnect(client);
return TRUE;
}
|
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_logout(struct client *client)
{
client_send_line(client, "* BYE Logging out");
o_stream_uncork(client->output);
if (client->mailbox != NULL) {
/* this could be done at client_disconnect() as well,
but eg. mbox rewrite takes a while so the waiting is
better to happen before "OK" message. */
mailbox_close(client->mailbox);
client->mailbox = NULL;
}
client_send_tagline(client, "OK Logout completed.");
client_disconnect(client);
return TRUE;
}
|
Send the "* BYE Logging out" before closing mailbox.
|
Send the "* BYE Logging out" before closing mailbox.
|
C
|
mit
|
Distrotech/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot
|
193aa373d84ba155eb0307afa6cd4fecf710d007
|
src/untrusted/irt/irt_tls.c
|
src/untrusted/irt/irt_tls.c
|
/*
* Copyright (c) 2012 The Native Client 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 <errno.h>
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
static int nacl_irt_tls_init(void *thread_ptr) {
return -NACL_SYSCALL(tls_init)(thread_ptr);
}
static void *nacl_irt_tls_get(void) {
return NACL_SYSCALL(tls_get)();
}
const struct nacl_irt_tls nacl_irt_tls = {
nacl_irt_tls_init,
nacl_irt_tls_get,
};
|
/*
* Copyright (c) 2012 The Native Client 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 <errno.h>
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/nacl/syscall_bindings_trampoline.h"
static int nacl_irt_tls_init(void *thread_ptr) {
return -NACL_SYSCALL(tls_init)(thread_ptr);
}
const struct nacl_irt_tls nacl_irt_tls = {
nacl_irt_tls_init,
NACL_SYSCALL(tls_get),
};
|
Reduce the cost of getting the thread pointer by one jump on x86-64
|
TLS: Reduce the cost of getting the thread pointer by one jump on x86-64
BUG=none
TEST=run_hello_world_test_irt on x86-64
R=mcgrathr@chromium.org
Review URL: https://codereview.chromium.org/226643010
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@13045 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
|
C
|
bsd-3-clause
|
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client
|
6d0cd228d5ea5ff734f3bc1754d0dfbb93e6d1b4
|
src/defines.h
|
src/defines.h
|
#ifndef XORGGTEST_DEFINES
#define XORGGTEST_DEFINES
#define DEFAULT_XORG_LOGFILE "/tmp/Xorg.GTest.log"
#define DEFAULT_XORG_SERVER "Xorg"
#define DEFAULT_DISPLAY 133
#endif
|
#ifndef XORGGTEST_DEFINES
#define XORGGTEST_DEFINES
#define DEFAULT_XORG_LOGFILE "/tmp/Xorg.GTest.log"
#define DEFAULT_DISPLAY 133
/* Allow user to override default Xorg server*/
#ifndef DEFAULT_XORG_SERVER
#define DEFAULT_XORG_SERVER "Xorg"
#endif
#endif
|
Allow user to override default Xorg server binary
|
Allow user to override default Xorg server binary
This can be accomplished by compiling xorg-gtest with
-DDEFAULT_XORG_SERVER=path/to/Xorg.
Signed-off-by: Chase Douglas <69e02ec421aa70a149511825d897f2549ceee9a2@canonical.com>
Reviewed-By: Christopher Halse Rogers <f4edbc39080c6cd998e1a8e915acbce7f6e0704a@canonical.com>
|
C
|
mit
|
freedesktop-unofficial-mirror/xorg__test__xorg-gtest,freedesktop-unofficial-mirror/xorg__test__xorg-gtest,freedesktop-unofficial-mirror/xorg__test__xorg-gtest
|
1ff679378c9fe819fe813c25c657e459a87044a9
|
src/parse.h
|
src/parse.h
|
// Copyright 2016 Mitchell Kember. Subject to the MIT License.
#ifndef PARSE_H
#define PARSE_H
#include "error.h"
#include "expr.h"
// ParseResult contains the result of parsing text. The 'expr' field has a
// meaningful value if and only if 'err_type' is -1.
struct ParseResult {
size_t chars_read;
struct Expression expr;
enum ParseErrorType err_type;
};
// Parses a string as an s-expression of pairs, symbols, and numbers. On
// success, returns the parse result with 'err_type' set to -1. Otherwise,
// returns the error type in the parse result.
struct ParseResult parse(const char *text);
#endif
|
// Copyright 2016 Mitchell Kember. Subject to the MIT License.
#ifndef PARSE_H
#define PARSE_H
#include "error.h"
#include "expr.h"
// ParseResult contains the result of parsing text. The 'expr' field has a
// meaningful value if and only if 'err_type' is -1.
struct ParseResult {
size_t chars_read; // number of characters read
struct Expression expr; // parsed expression
int err_type; // -1 or a ParseErrorType value
};
// Parses a string as an s-expression of pairs, symbols, and numbers. On
// success, returns the parse result with 'err_type' set to -1. Otherwise,
// returns a ParseErrorType in the result.
struct ParseResult parse(const char *text);
#endif
|
Use int, not ParseErrorType, to allow -1
|
Use int, not ParseErrorType, to allow -1
|
C
|
mit
|
mk12/eva,mk12/eva
|
f43a8742653c7bbd4f05440152b05f19a9300d17
|
src/globals.h
|
src/globals.h
|
#pragma once
#include <fstream>
#include <string>
#include <cerrno>
#include <clocale>
#include <vector>
#include <iostream>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cairo.h>
#include <gtkmm.h>
#include <gtkmm/application.h>
#include <gtkmm/window.h>
#include "../litehtml/include/litehtml.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include <fontconfig/fontconfig.h>
#include <cairo-ft.h>
#include <gdk/gdk.h>
#include <cairomm/context.h>
#include <curl/curl.h>
#include <Poco/URI.h>
extern std::string urljoin(const std::string &base, const std::string &relative);
|
#pragma once
#include <fstream>
#include <string>
#include <cerrno>
#include <clocale>
#include <vector>
#include <iostream>
#include <stdlib.h>
#ifdef __APPLE__
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <memory.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cairo.h>
#include <gtkmm.h>
#include <gtkmm/application.h>
#include <gtkmm/window.h>
#include "../litehtml/include/litehtml.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include <fontconfig/fontconfig.h>
#include <cairo-ft.h>
#include <gdk/gdk.h>
#include <cairomm/context.h>
#include <curl/curl.h>
#include <Poco/URI.h>
extern std::string urljoin(const std::string &base, const std::string &relative);
|
Make including malloc on MacOS compatible
|
Make including malloc on MacOS compatible
|
C
|
bsd-3-clause
|
litehtml/litebrowser-linux
|
621af6e0e6a48c8a8c5b4804de1bdc91c3436f5b
|
third_party/stub-strtok_r.c
|
third_party/stub-strtok_r.c
|
/*
* public domain strtok_r() by Charlie Gordon
*
* from comp.lang.c 9/14/2007
*
* http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684
*
* (Declaration that it's public domain):
* http://groups.google.com/group/comp.lang.c/msg/7c7b39328fefab9c
*/
#include <string.h>
#ifdef __MINGW32__
# ifndef strtok_r
char* strtok_r(char *str, const char *delim, char **nextp)
{
char *ret;
if (str == NULL)
str = *nextp;
str += strspn(str, delim);
if (*str == '\0')
return NULL;
ret = str;
str += strcspn(str, delim);
if (*str)
*str++ = '\0';
*nextp = str;
return ret;
}
# endif /* !strtok_r */
#endif /* __MINGW32__ */
|
/*
* public domain strtok_r() by Charlie Gordon
*
* from comp.lang.c 9/14/2007
*
* http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684
*
* (Declaration that it's public domain):
* http://groups.google.com/group/comp.lang.c/msg/7c7b39328fefab9c
*/
#include <string.h>
#ifdef __MINGW32__
# ifndef strtok_r
char* strtok_r(char *str, const char *delim, char **nextp)
{
char *ret;
if (str == NULL)
str = *nextp;
str += strspn(str, delim);
if (*str == '\0')
{
*nextp = str;
return NULL;
}
ret = str;
str += strcspn(str, delim);
if (*str)
*str++ = '\0';
*nextp = str;
return ret;
}
# endif /* !strtok_r */
#endif /* __MINGW32__ */
|
Fix possible invalid write on Windows-specific `strtok_r` stub
|
Fix possible invalid write on Windows-specific `strtok_r` stub
|
C
|
agpl-3.0
|
Levak/warfacebot,Levak/warfacebot,Levak/warfacebot
|
e319b2ded9ca34aec90385905077a61f86586eff
|
EdkCompatibilityPkg/Compatibility/SmmBaseHelper/PageFaultHandler.c
|
EdkCompatibilityPkg/Compatibility/SmmBaseHelper/PageFaultHandler.c
|
/** @file
Page fault handler that does nothing.
Copyright (c) 2010, Intel Corporation
All rights reserved. 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.
**/
/**
The dummy handler that does nothing.
The function is only used by systems that don't use paging but need
build pass.
**/
VOID
PageFaultHandlerHook (
VOID
)
{
}
|
/** @file
Page fault handler that does nothing.
Copyright (c) 2010, Intel Corporation
All rights reserved. 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.
**/
/**
The dummy handler that does nothing.
The function is only used by systems that don't use paging but need
build pass.
**/
VOID
PageFaultHandlerHook (
VOID
)
{
}
|
Add the blank line at the end of file to pass ICC compiler.
|
Add the blank line at the end of file to pass ICC compiler.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@10357 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
|
07a6d3c5a9b5006fec34bab289c421a097961be4
|
kernel/device/pit.c
|
kernel/device/pit.c
|
#include <arch/x64/interrupts.h>
#include <arch/x64/pic.h>
#include <arch/x64/port.h>
#include <truth/interrupts.h>
#include <truth/log.h>
#include <truth/scheduler.h>
#define Timer_IRQ_Number 0x20
#define Timer_Magic_Number 1193180
#define Timer_Chan_0 0x40
#define Timer_Chan_1 0x41
#define Timer_Chan_2 0x42
#define Timer_Command_Reg 0x43
#define RW_Oneshot_Square 0x36
static void timer_interrupt_handler(struct interrupt_cpu_state *unused(r)) {
log(Log_Error, "tick");
scheduler_yield();
}
void timer_init(void) {
interrupt_register_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
void timer_set_phase(uint8_t hertz) {
uint8_t divisor = Timer_Magic_Number / hertz;
write_port(Timer_Command_Reg, RW_Oneshot_Square);
write_port(Timer_Chan_0, divisor & 0xff);
write_port(Timer_Chan_0, divisor >> 8);
pic_enable(Timer_IRQ_Number);
}
void timer_fini(void) {
interrupt_unregister_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
|
#include <arch/x64/interrupts.h>
#include <arch/x64/pic.h>
#include <arch/x64/port.h>
#include <truth/interrupts.h>
#include <truth/log.h>
#include <truth/scheduler.h>
#define Timer_IRQ_Number 0x20
#define Timer_Magic_Number 1193180
#define Timer_Chan_0 0x40
#define Timer_Chan_1 0x41
#define Timer_Chan_2 0x42
#define Timer_Command_Reg 0x43
#define RW_Oneshot_Square 0x36
static void timer_interrupt_handler(struct interrupt_cpu_state *unused(r)) {
scheduler_yield();
}
void timer_init(void) {
interrupt_register_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
void timer_set_phase(uint8_t hertz) {
uint8_t divisor = Timer_Magic_Number / hertz;
write_port(Timer_Command_Reg, RW_Oneshot_Square);
write_port(Timer_Chan_0, divisor & 0xff);
write_port(Timer_Chan_0, divisor >> 8);
pic_enable(Timer_IRQ_Number);
}
void timer_fini(void) {
interrupt_unregister_handler(Timer_IRQ_Number, timer_interrupt_handler);
}
|
Remove annoying debug log message
|
Remove annoying debug log message
|
C
|
mit
|
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
|
ed51fe4a5dcdc3ed34b3af9fd7bf03b7cf5da30a
|
daemon.c
|
daemon.c
|
#include <errno.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
FILE* logfile;
void init() {
// Change the umask so we can write to log files
umask(0);
// We should initialize and open log files here
logfile = fopen("./creddit.log", "a");
if (logfile == NULL) {
printf("Failed to create file with error: %d\n", errno);
exit(errno);
}
}
void run() {
}
int main() {
pid_t pid = fork();
// Check to see if there was an error with the fork
if (pid < 0) exit(1);
// If we are the child, then we do the heavy lifting
if (pid == 0) {
init();
run();
}
// Elsewise, we are the parent and we want to exit gracefully
exit(0);
}
|
#include <errno.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
FILE* logfile;
void init() {
// Change the umask so we can write to log files
umask(0);
// We should initialize and open log files here
logfile = fopen("./creddit.log", "a");
if (logfile == NULL) {
printf("Failed to create file with error: %d\n", errno);
exit(errno);
}
// Now we need to get a new unique SID so we aren't an orphan
// Remember our parent has died.
if (setsid() < 0) {
fprintf(logfile, "Could not set our SID: %d\n", errno);
exit(errno);
}
}
void run() {
}
int main() {
pid_t pid = fork();
// Check to see if there was an error with the fork
if (pid < 0) exit(1);
// If we are the child, then we do the heavy lifting
if (pid == 0) {
init();
run();
}
// Elsewise, we are the parent and we want to exit gracefully
exit(0);
}
|
Modify session id and first test of logger
|
Modify session id and first test of logger
|
C
|
mit
|
nguyenmp/creddit
|
a64bbe186f064ccb5791d538fae3572c8e33df4b
|
src/lang-english.c
|
src/lang-english.c
|
#include "num2words.h"
const Language LANG_ENGLISH = {
.hours = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve"
},
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten past *$1 ",
"quarter past *$1 ",
"twenty past *$1 ",
"twenty five past *$1 ",
"half past *$1 ",
"twenty five to *$2 ",
"twenty to *$2 ",
"quarter to *$2 ",
"ten to *$2 ",
"five to *$2 "
},
#ifdef PBL_PLATFORM_CHALK
.greetings = {
"Good morning ",
"Good day ",
"Good evening ",
"Good night "
},
#else
.greetings = {
"Good mor- ning ",
"Good day ",
"Good even- ing ",
"Good night "
},
#endif
.connection_lost = "Where is your phone? "
};
|
#include "num2words.h"
const Language LANG_ENGLISH = {
.hours = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve"
},
#ifdef PBL_PLATFORM_CHALK
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten past *$1 ",
"quarter past *$1 ",
"twenty past *$1 ",
"twenty five past *$1 ",
"half past *$1 ",
"twenty five to *$2 ",
"twenty to *$2 ",
"quarter to *$2 ",
"ten to *$2 ",
"five to *$2 "
},
.greetings = {
"Good morning ",
"Good day ",
"Good evening ",
"Good night "
},
#else
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten past *$1 ",
"quarter past *$1 ",
"twenty past *$1 ",
"twenty five past *$1 ",
"half past *$1 ",
"twenty five to *$2 ",
"twenty to *$2 ",
"quarter to *$2 ",
"ten to *$2 ",
"five to *$2 "
},
.greetings = {
"Good mor- ning ",
"Good day ",
"Good even- ing ",
"Good night "
},
#endif
.connection_lost = "Where is your phone? "
};
|
Fix english language for new line length
|
Fix english language for new line length
|
C
|
mit
|
Sarastro72/Fuzzy-Text-Watch-Plus,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Fuzzy-Text-Watch-Plus,Sarastro72/Fuzzy-Text-Watch-Plus,Sarastro72/Swedish-Fuzzy-Text-watch,Sarastro72/Fuzzy-Text-Watch-Plus
|
893e821a0bdd9807f243465301e9360e909e2ad0
|
lib/log.h
|
lib/log.h
|
/* $Id$ */
#ifndef __log_h__
#define __log_h__
#include "internal.h"
#define UNSHIELD_LOG_LEVEL_LOWEST 0
#define UNSHIELD_LOG_LEVEL_ERROR 1
#define UNSHIELD_LOG_LEVEL_WARNING 2
#define UNSHIELD_LOG_LEVEL_TRACE 3
#define UNSHIELD_LOG_LEVEL_HIGHEST 4
#ifdef __cplusplus
extern "C"
{
#endif
void _unshield_log(int level, const char* file, int line, const char* format, ...);
#define unshield_trace(format, args...) \
_unshield_log(UNSHIELD_LOG_LEVEL_TRACE,__FUNCTION__, __LINE__, format, ##args)
#define unshield_warning(format, args...) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##args)
#define unshield_warning_unless(cond, format, args...) \
if (!(cond)) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##args)
#define unshield_error(format, args...) \
_unshield_log(UNSHIELD_LOG_LEVEL_ERROR,__FUNCTION__, __LINE__, format, ##args)
#ifdef __cplusplus
}
#endif
#endif
|
/* $Id$ */
#ifndef __log_h__
#define __log_h__
#include "internal.h"
#define UNSHIELD_LOG_LEVEL_LOWEST 0
#define UNSHIELD_LOG_LEVEL_ERROR 1
#define UNSHIELD_LOG_LEVEL_WARNING 2
#define UNSHIELD_LOG_LEVEL_TRACE 3
#define UNSHIELD_LOG_LEVEL_HIGHEST 4
#ifdef __cplusplus
extern "C"
{
#endif
void _unshield_log(int level, const char* file, int line, const char* format, ...);
#define unshield_trace(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_TRACE,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
#define unshield_warning(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_WARNING,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
#define unshield_error(format, ...) \
_unshield_log(UNSHIELD_LOG_LEVEL_ERROR,__FUNCTION__, __LINE__, format, ##__VA_ARGS__)
#ifdef __cplusplus
}
#endif
#endif
|
Use __VA_ARGS__ for better portability
|
Use __VA_ARGS__ for better portability
|
C
|
mit
|
twogood/unshield,twogood/unshield
|
ba6f0d85b45a08112bafe9a92c7174a46bc18bfd
|
lib/dns/rdata/rdatastructpre.h
|
lib/dns/rdata/rdatastructpre.h
|
/*
* Copyright (C) 1999, 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef DNS_RDATASTRUCT_H
#define DNS_RDATASTRUCT_H 1
#include <isc/lang.h>
#include <isc/sockaddr.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
typedef struct dns_rdatacommon {
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
ISC_LINK(struct dns_rdatacommon) link;
} dns_rdatacommon_t;
|
/*
* Copyright (C) 1999, 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef DNS_RDATASTRUCT_H
#define DNS_RDATASTRUCT_H 1
#include <isc/lang.h>
#include <isc/sockaddr.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
typedef struct dns_rdatacommon {
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
ISC_LINK(struct dns_rdatacommon) link;
} dns_rdatacommon_t;
#define DNS_RDATACOMMON_INIT(DATA, RDTYPE, RDCLASS) \
do { \
(DATA)->common.rdtype = (RDTYPE); \
(DATA)->common.rdclass = (RDCLASS); \
ISC_LINK_INIT(&(DATA)->common, link); \
} while (0)
|
Add macro to initalise the common part of a rdata struct.
|
Add macro to initalise the common part of a rdata struct.
|
C
|
mpl-2.0
|
pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab,each/bind9-collab,each/bind9-collab,pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab
|
e25c3d3df50e6bbd6ee4bea906ca184952d3eb4a
|
simulator/infra/target.h
|
simulator/infra/target.h
|
/*
* target.h - input interface for Fetch module
* @author Pavel Kryukov pavel.kryukov@phystech.edu
* Copyright 2018 MIPT-MIPS
*/
#ifndef TARGET_H
#define TARGET_H
#include <infra/types.h>
/*
* Target is an input interface for Fetch module
* It contains
* * address where instruction should be fetched
* * sequence_id of fetched instruction for instrumentation purposes
* * validity bit
*/
struct Target {
Addr address = NO_VAL32;
uint64 sequence_id = NO_VAL64;
bool valid = false;
Target() = default;
Target(Addr a, uint64 id)
: address(a)
, sequence_id(id)
, valid(true)
{ }
};
#endif
|
/*
* target.h - input interface for Fetch module
* @author Pavel Kryukov pavel.kryukov@phystech.edu
* Copyright 2018 MIPT-MIPS
*/
#ifndef TARGET_H
#define TARGET_H
#include <infra/types.h>
/*
* Target is an input interface for Fetch module
* It contains
* * address where instruction should be fetched
* * sequence_id of fetched instruction for instrumentation purposes
* * validity bit
*/
class Target {
public:
Addr address = NO_VAL32;
uint64 sequence_id = NO_VAL64;
bool valid = false;
Target() = default;
Target( Addr a, uint64 id)
: address( a)
, sequence_id( id)
, valid( true)
{ }
};
#endif
|
Use 'class' keyword for Target to treat file as C++
|
Use 'class' keyword for Target to treat file as C++
|
C
|
mit
|
MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015
|
a757407ea2a4709594251e0c149883163e00af84
|
extensions/common/xwalk_extension_messages.h
|
extensions/common/xwalk_extension_messages.h
|
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "ipc/ipc_message_macros.h"
#define IPC_MESSAGE_START ExtensionMsgStart
IPC_MESSAGE_ROUTED2(XWalkViewHostMsg_PostMessage, // NOLINT(*)
std::string /* target extension */,
std::string /* contents */)
IPC_MESSAGE_ROUTED2(XWalkViewMsg_PostMessage, // NOLINT(*)
std::string /* source extension */,
std::string /* contents */)
IPC_MESSAGE_CONTROL2(XWalkViewMsg_RegisterExtension, // NOLINT(*)
std::string /* extension */,
std::string /* JS API code for extension */)
|
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "ipc/ipc_message_macros.h"
// Note: it is safe to use numbers after LastIPCMsgStart since that limit
// is not relevant for embedders. It is used only by a tool inside chrome/
// that we currently don't use.
// See also https://code.google.com/p/chromium/issues/detail?id=110911.
const int XWalkExtensionMsgStart = LastIPCMsgStart + 1;
#define IPC_MESSAGE_START XWalkExtensionMsgStart
IPC_MESSAGE_ROUTED2(XWalkViewHostMsg_PostMessage, // NOLINT(*)
std::string /* target extension */,
std::string /* contents */)
IPC_MESSAGE_ROUTED2(XWalkViewMsg_PostMessage, // NOLINT(*)
std::string /* source extension */,
std::string /* contents */)
IPC_MESSAGE_CONTROL2(XWalkViewMsg_RegisterExtension, // NOLINT(*)
std::string /* extension */,
std::string /* JS API code for extension */)
|
Use an unique ID for Crosswalk Extension IPC messages
|
Use an unique ID for Crosswalk Extension IPC messages
We were reusing ExtensionMsgStart, but it is not needed, we can simply
take a number after the existing ones. The LastIPCMsgStart is
currently used only by certain Chrome tools, so we won't miss anything
for being a number larger than the last.
|
C
|
bsd-3-clause
|
crosswalk-project/crosswalk-efl,alex-zhang/crosswalk,xzhan96/crosswalk,lincsoon/crosswalk,DonnaWuDongxia/crosswalk,weiyirong/crosswalk-1,stonegithubs/crosswalk,baleboy/crosswalk,XiaosongWei/crosswalk,amaniak/crosswalk,mrunalk/crosswalk,crosswalk-project/crosswalk,PeterWangIntel/crosswalk,axinging/crosswalk,xzhan96/crosswalk,Pluto-tv/crosswalk,shaochangbin/crosswalk,mrunalk/crosswalk,kurli/crosswalk,leonhsl/crosswalk,zliang7/crosswalk,darktears/crosswalk,bestwpw/crosswalk,qjia7/crosswalk,TheDirtyCalvinist/spacewalk,myroot/crosswalk,rakuco/crosswalk,bestwpw/crosswalk,axinging/crosswalk,wuhengzhi/crosswalk,weiyirong/crosswalk-1,Shouqun/crosswalk,dreamsxin/crosswalk,fujunwei/crosswalk,huningxin/crosswalk,chuan9/crosswalk,huningxin/crosswalk,weiyirong/crosswalk-1,Pluto-tv/crosswalk,siovene/crosswalk,chinakids/crosswalk,amaniak/crosswalk,Bysmyyr/crosswalk,fujunwei/crosswalk,Pluto-tv/crosswalk,chuan9/crosswalk,xzhan96/crosswalk,amaniak/crosswalk,heke123/crosswalk,fujunwei/crosswalk,heke123/crosswalk,myroot/crosswalk,minggangw/crosswalk,rakuco/crosswalk,zliang7/crosswalk,bestwpw/crosswalk,jondwillis/crosswalk,Pluto-tv/crosswalk,jpike88/crosswalk,myroot/crosswalk,kurli/crosswalk,wuhengzhi/crosswalk,kurli/crosswalk,PeterWangIntel/crosswalk,marcuspridham/crosswalk,kurli/crosswalk,amaniak/crosswalk,RafuCater/crosswalk,alex-zhang/crosswalk,DonnaWuDongxia/crosswalk,siovene/crosswalk,baleboy/crosswalk,heke123/crosswalk,ZhengXinCN/crosswalk,chuan9/crosswalk,ZhengXinCN/crosswalk,stonegithubs/crosswalk,jondong/crosswalk,crosswalk-project/crosswalk-efl,RafuCater/crosswalk,jpike88/crosswalk,tomatell/crosswalk,pk-sam/crosswalk,seanlong/crosswalk,zliang7/crosswalk,pozdnyakov/crosswalk,crosswalk-project/crosswalk-efl,pk-sam/crosswalk,PeterWangIntel/crosswalk,shaochangbin/crosswalk,zliang7/crosswalk,PeterWangIntel/crosswalk,dreamsxin/crosswalk,zliang7/crosswalk,jondwillis/crosswalk,kurli/crosswalk,Bysmyyr/crosswalk,hgl888/crosswalk,hgl888/crosswalk-efl,myroot/crosswalk,qjia7/crosswalk,leonhsl/crosswalk,xzhan96/crosswalk,darktears/crosswalk,jpike88/crosswalk,crosswalk-project/crosswalk-efl,Bysmyyr/crosswalk,darktears/crosswalk,shaochangbin/crosswalk,pozdnyakov/crosswalk,baleboy/crosswalk,baleboy/crosswalk,xzhan96/crosswalk,chinakids/crosswalk,amaniak/crosswalk,marcuspridham/crosswalk,Bysmyyr/crosswalk,jondong/crosswalk,rakuco/crosswalk,xzhan96/crosswalk,heke123/crosswalk,pk-sam/crosswalk,leonhsl/crosswalk,DonnaWuDongxia/crosswalk,fujunwei/crosswalk,lincsoon/crosswalk,hgl888/crosswalk,fujunwei/crosswalk,jondong/crosswalk,jondong/crosswalk,alex-zhang/crosswalk,chinakids/crosswalk,RafuCater/crosswalk,seanlong/crosswalk,minggangw/crosswalk,Bysmyyr/crosswalk,weiyirong/crosswalk-1,rakuco/crosswalk,zeropool/crosswalk,ZhengXinCN/crosswalk,hgl888/crosswalk-efl,amaniak/crosswalk,Shouqun/crosswalk,alex-zhang/crosswalk,seanlong/crosswalk,jpike88/crosswalk,tedshroyer/crosswalk,crosswalk-project/crosswalk-efl,hgl888/crosswalk-efl,zeropool/crosswalk,TheDirtyCalvinist/spacewalk,dreamsxin/crosswalk,wuhengzhi/crosswalk,DonnaWuDongxia/crosswalk,zeropool/crosswalk,jondong/crosswalk,jondwillis/crosswalk,pk-sam/crosswalk,crosswalk-project/crosswalk,baleboy/crosswalk,dreamsxin/crosswalk,pozdnyakov/crosswalk,alex-zhang/crosswalk,Pluto-tv/crosswalk,crosswalk-project/crosswalk,lincsoon/crosswalk,stonegithubs/crosswalk,rakuco/crosswalk,seanlong/crosswalk,zeropool/crosswalk,siovene/crosswalk,shaochangbin/crosswalk,bestwpw/crosswalk,crosswalk-project/crosswalk-efl,jondwillis/crosswalk,chuan9/crosswalk,crosswalk-project/crosswalk,qjia7/crosswalk,leonhsl/crosswalk,tomatell/crosswalk,jpike88/crosswalk,TheDirtyCalvinist/spacewalk,rakuco/crosswalk,tedshroyer/crosswalk,XiaosongWei/crosswalk,chinakids/crosswalk,huningxin/crosswalk,jondong/crosswalk,marcuspridham/crosswalk,amaniak/crosswalk,heke123/crosswalk,shaochangbin/crosswalk,tomatell/crosswalk,Bysmyyr/crosswalk,RafuCater/crosswalk,stonegithubs/crosswalk,Pluto-tv/crosswalk,tedshroyer/crosswalk,myroot/crosswalk,xzhan96/crosswalk,zliang7/crosswalk,darktears/crosswalk,PeterWangIntel/crosswalk,pozdnyakov/crosswalk,pk-sam/crosswalk,XiaosongWei/crosswalk,RafuCater/crosswalk,darktears/crosswalk,marcuspridham/crosswalk,crosswalk-project/crosswalk,zeropool/crosswalk,seanlong/crosswalk,alex-zhang/crosswalk,minggangw/crosswalk,tomatell/crosswalk,dreamsxin/crosswalk,myroot/crosswalk,chuan9/crosswalk,wuhengzhi/crosswalk,seanlong/crosswalk,mrunalk/crosswalk,zliang7/crosswalk,minggangw/crosswalk,shaochangbin/crosswalk,xzhan96/crosswalk,hgl888/crosswalk-efl,hgl888/crosswalk-efl,stonegithubs/crosswalk,zliang7/crosswalk,lincsoon/crosswalk,leonhsl/crosswalk,chuan9/crosswalk,PeterWangIntel/crosswalk,bestwpw/crosswalk,minggangw/crosswalk,marcuspridham/crosswalk,zeropool/crosswalk,darktears/crosswalk,hgl888/crosswalk,alex-zhang/crosswalk,huningxin/crosswalk,leonhsl/crosswalk,minggangw/crosswalk,chuan9/crosswalk,PeterWangIntel/crosswalk,marcuspridham/crosswalk,Shouqun/crosswalk,crosswalk-project/crosswalk,rakuco/crosswalk,axinging/crosswalk,crosswalk-project/crosswalk-efl,axinging/crosswalk,DonnaWuDongxia/crosswalk,jondong/crosswalk,stonegithubs/crosswalk,heke123/crosswalk,tedshroyer/crosswalk,pk-sam/crosswalk,TheDirtyCalvinist/spacewalk,TheDirtyCalvinist/spacewalk,baleboy/crosswalk,lincsoon/crosswalk,chinakids/crosswalk,dreamsxin/crosswalk,darktears/crosswalk,tedshroyer/crosswalk,axinging/crosswalk,heke123/crosswalk,DonnaWuDongxia/crosswalk,jondong/crosswalk,axinging/crosswalk,bestwpw/crosswalk,ZhengXinCN/crosswalk,marcuspridham/crosswalk,crosswalk-project/crosswalk,mrunalk/crosswalk,weiyirong/crosswalk-1,siovene/crosswalk,qjia7/crosswalk,tedshroyer/crosswalk,wuhengzhi/crosswalk,tedshroyer/crosswalk,lincsoon/crosswalk,qjia7/crosswalk,Shouqun/crosswalk,stonegithubs/crosswalk,hgl888/crosswalk-efl,ZhengXinCN/crosswalk,pk-sam/crosswalk,hgl888/crosswalk,jpike88/crosswalk,hgl888/crosswalk,siovene/crosswalk,axinging/crosswalk,XiaosongWei/crosswalk,Shouqun/crosswalk,qjia7/crosswalk,rakuco/crosswalk,chinakids/crosswalk,RafuCater/crosswalk,hgl888/crosswalk,Bysmyyr/crosswalk,jondwillis/crosswalk,tomatell/crosswalk,leonhsl/crosswalk,fujunwei/crosswalk,weiyirong/crosswalk-1,jondwillis/crosswalk,lincsoon/crosswalk,XiaosongWei/crosswalk,crosswalk-project/crosswalk,zeropool/crosswalk,jondwillis/crosswalk,XiaosongWei/crosswalk,pozdnyakov/crosswalk,Shouqun/crosswalk,XiaosongWei/crosswalk,hgl888/crosswalk-efl,marcuspridham/crosswalk,bestwpw/crosswalk,DonnaWuDongxia/crosswalk,ZhengXinCN/crosswalk,fujunwei/crosswalk,Pluto-tv/crosswalk,baleboy/crosswalk,huningxin/crosswalk,pozdnyakov/crosswalk,heke123/crosswalk,minggangw/crosswalk,TheDirtyCalvinist/spacewalk,RafuCater/crosswalk,mrunalk/crosswalk,mrunalk/crosswalk,Bysmyyr/crosswalk,kurli/crosswalk,huningxin/crosswalk,darktears/crosswalk,lincsoon/crosswalk,jpike88/crosswalk,baleboy/crosswalk,ZhengXinCN/crosswalk,siovene/crosswalk,hgl888/crosswalk,hgl888/crosswalk,wuhengzhi/crosswalk,tomatell/crosswalk,weiyirong/crosswalk-1,dreamsxin/crosswalk,minggangw/crosswalk,tomatell/crosswalk,siovene/crosswalk
|
f36a7bf58c305a14b50902cbf763211f6ef5e52f
|
MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
|
MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
|
/** @file
UEFI Runtime Services Table Library.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. 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.
**/
#include <Uefi.h>
#include <Library/DebugLib.h>
EFI_RUNTIME_SERVICES *gRT = NULL;
/**
The constructor function caches the pointer of Runtime Services Table.
The constructor function caches the pointer of Runtime Services Table.
It will ASSERT() if the pointer of Runtime Services Table is NULL.
It will always return EFI_SUCCESS.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
UefiRuntimeServicesTableLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
// Cache pointer to the EFI Runtime Services Table
//
gRT = SystemTable->RuntimeServices;
ASSERT (gRT != NULL);
return EFI_SUCCESS;
}
|
/** @file
UEFI Runtime Services Table Library.
This library instance retrieve EFI_RUNTIME_SERVICES pointer from EFI system table
in library's constructor.
Copyright (c) 2006, Intel Corporation<BR>
All rights reserved. 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.
**/
#include <Uefi.h>
#include <Library/DebugLib.h>
EFI_RUNTIME_SERVICES *gRT = NULL;
/**
The constructor function caches the pointer of Runtime Services Table.
The constructor function caches the pointer of Runtime Services Table.
It will ASSERT() if the pointer of Runtime Services Table is NULL.
It will always return EFI_SUCCESS.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
UefiRuntimeServicesTableLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
// Cache pointer to the EFI Runtime Services Table
//
gRT = SystemTable->RuntimeServices;
ASSERT (gRT != NULL);
return EFI_SUCCESS;
}
|
Add more comment for library instance and remove unused internal header file.
|
Add more comment for library instance and remove unused internal header file.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@5799 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
|
bb1eba50d7b6e81e24ddc918afda45a334d011de
|
src/MenuRenderer.h
|
src/MenuRenderer.h
|
/*
* MenuRenderer.h
*
* Created on: Nov 18, 2016
* Author: msaun
*/
#ifndef MICKRENDERER_H_
#define MICKRENDERER_H_
#include <string>
#include "RuntimeException.h"
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include <Rocket/Core.h>
#include <Rocket/Core/Input.h>
#include <Rocket/Debugger/Debugger.h>
#include "rocket/glue/SystemInterfaceSDL2.h"
#include "rocket/glue/RenderInterfaceSDL2.h"
#include "rocket/glue/ShellFileInterface.h"
#include "rocket/MickRocketElementUtil.h"
#include "GameSettings.h"
#include "rocket/events/EventInstancer.h"
#include "rocket/events/EventManager.h"
#include "rocket/events/EventHandlerOptions.h"
class MenuRenderer
{
public:
MenuRenderer(SDL_Renderer *renderer, SDL_Window *screen);
bool showMenu();
virtual ~MenuRenderer();
private:
void init(SDL_Renderer* renderer, SDL_Window *screen);
int getTabIndex(Rocket::Core::Element* node);
Rocket::Core::Element* getChildElementWithTabIndex(Rocket::Core::Element* parentNode, int tabIndex);
Rocket::Core::Context* m_context = NULL;
};
#endif /* MICKRENDERER_H_ */
|
/*
* MenuRenderer.h
*
* Created on: Nov 18, 2016
* Author: msaun
*/
#ifndef MICKRENDERER_H_
#define MICKRENDERER_H_
#include <stdexcept>
#include <string>
#include "RuntimeException.h"
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include <Rocket/Core.h>
#include <Rocket/Core/Input.h>
#include <Rocket/Debugger/Debugger.h>
#include "rocket/glue/SystemInterfaceSDL2.h"
#include "rocket/glue/RenderInterfaceSDL2.h"
#include "rocket/glue/ShellFileInterface.h"
#include "rocket/MickRocketElementUtil.h"
#include "GameSettings.h"
#include "rocket/events/EventInstancer.h"
#include "rocket/events/EventManager.h"
#include "rocket/events/EventHandlerOptions.h"
class MenuRenderer
{
public:
MenuRenderer(SDL_Renderer *renderer, SDL_Window *screen);
bool showMenu();
virtual ~MenuRenderer();
private:
void init(SDL_Renderer* renderer, SDL_Window *screen);
int getTabIndex(Rocket::Core::Element* node);
Rocket::Core::Element* getChildElementWithTabIndex(Rocket::Core::Element* parentNode, int tabIndex);
Rocket::Core::Context* m_context = NULL;
};
#endif /* MICKRENDERER_H_ */
|
Fix runtime_error is not a member of std
|
Fix runtime_error is not a member of std
|
C
|
apache-2.0
|
VenKamikaze/BitRiot,VenKamikaze/BitRiot,VenKamikaze/BitRiot
|
86258141b55c3fffb3489f76fc1cf70d2dcd4bb2
|
libmorton/include/morton_common.h
|
libmorton/include/morton_common.h
|
#ifndef MORTON_COMMON_H_
#define MORTON_COMMON_H_
#include <stdint.h>
#if _MSC_VER
#include <intrin.h>
#endif
inline bool findFirstSetBit32(const uint_fast32_t x, unsigned long* firstbit_location){
#if _MSC_VER
return _BitScanReverse(firstbit_location, x);
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
firstbit_location = pos +1 ;
return pos;
#endif
return true;
}
inline bool findFirstSetBit64(const uint_fast64_t x, unsigned long* firstbit_location){
#if _MSC_VER && _WIN64
return _BitScanReverse64(firstbit_location, x);
#elif _MSC_VER && _WIN32
firstbit_location = 0;
if (_BitScanReverse(&firstbit_location, (x >> 32))){ // check first part
firstbit_location += 32;
} else if ( ! _BitScanReverse(&firstbit_location, (x & 0xFFFFFFFF))){ // also test last part
return 0;
}
return true;
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
first_bit_location = pos + 1;
return pos;
#endif
return true;
}
#endif
|
#ifndef MORTON_COMMON_H_
#define MORTON_COMMON_H_
#include <stdint.h>
#if _MSC_VER
#include <intrin.h>
#endif
inline bool findFirstSetBit32(const uint_fast32_t x, unsigned long* firstbit_location){
#if _MSC_VER
return _BitScanReverse(firstbit_location, x);
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
firstbit_location = pos +1 ;
return pos;
#endif
return true;
}
inline bool findFirstSetBit64(const uint_fast64_t x, unsigned long* firstbit_location){
#if _MSC_VER && _WIN64
return _BitScanReverse64(firstbit_location, x);
#elif _MSC_VER && _WIN32
firstbit_location = 0;
if (_BitScanReverse(firstbit_location, (x >> 32))){ // check first part
firstbit_location += 32;
} else if ( ! _BitScanReverse(firstbit_location, (x & 0xFFFFFFFF))){ // also test last part
return 0;
}
return true;
#elif __GNUC__
unsigned int pos = __builtin_ffs(x);
first_bit_location = pos + 1;
return pos;
#endif
return true;
}
#endif
|
Fix compil on MSVC + WIN32
|
Fix compil on MSVC + WIN32
|
C
|
mit
|
Forceflow/libmorton
|
c1e1523fed7ad8b621425b2931c8ce89389a6f7c
|
libyaul/scu/bus/b/vdp1/vdp1/map.h
|
libyaul/scu/bus/b/vdp1/vdp1/map.h
|
/*
* Copyright (c) 2012-2016 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_ */
|
/*
* Copyright (c) 2012-2016 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_ */
|
Remove hard tabs in .h file
|
Remove hard tabs in .h file
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
37500dc24511e9ea1d16982befdb6beb17bfeea5
|
test/CodeGen/thinlto_backend.c
|
test/CodeGen/thinlto_backend.c
|
// RUN: %clang -target x86_64-unknown-linux -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// Ensure clang -cc1 give expected error for incorrect input type
// RUN: not %clang_cc1 -target x86_64-unknown-linux -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
// CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'
// Ensure we get expected error for missing index file
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR
// CHECK-ERROR: Error loading index file 'bad.thinlto.bc': No such file or directory
// Ensure Function Importing pass added
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -mllvm -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=CHECK-PASS
// CHECK-PASS: Function Importing
|
// RUN: %clang -target x86_64-unknown-linux -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// Ensure clang -cc1 give expected error for incorrect input type
// RUN: not %clang_cc1 -target x86_64-unknown-linux -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
// CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'
// Ensure we get expected error for missing index file
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR
// CHECK-ERROR: Error loading index file 'bad.thinlto.bc'
// Ensure Function Importing pass added
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -mllvm -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=CHECK-PASS
// CHECK-PASS: Function Importing
|
Adjust test to fix bot error from r254927.
|
Adjust test to fix bot error from r254927.
Remove the part of the error message that may vary across systems.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@254938 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
bc49e006724135994717b71920f1376161f28190
|
include/ecdaa.h
|
include/ecdaa.h
|
/******************************************************************************
*
* Copyright 2017 Xaptum, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*
*****************************************************************************/
#ifndef ECDAA_ECDAA_H
#define ECDAA_ECDAA_H
#pragma once
#include <ecdaa/credential_ZZZ.h>
#include <ecdaa/group_public_key_ZZZ.h>
#include <ecdaa/issuer_keypair_ZZZ.h>
#include <ecdaa/member_keypair_ZZZ.h>
#include <ecdaa/prng.h>
#include <ecdaa/revocations_ZZZ.h>
#include <ecdaa/signature_ZZZ.h>
#include <ecdaa/signature_TPM.h>
#include <ecdaa/tpm_context.h>
#endif
|
/******************************************************************************
*
* Copyright 2017 Xaptum, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*
*****************************************************************************/
#ifndef ECDAA_ECDAA_H
#define ECDAA_ECDAA_H
#pragma once
#include <ecdaa/credential_ZZZ.h>
#include <ecdaa/group_public_key_ZZZ.h>
#include <ecdaa/issuer_keypair_ZZZ.h>
#include <ecdaa/member_keypair_ZZZ.h>
#include <ecdaa/prng.h>
#include <ecdaa/revocations_ZZZ.h>
#include <ecdaa/signature_ZZZ.h>
#include <ecdaa/member_keypair_TPM.h>
#include <ecdaa/signature_TPM.h>
#include <ecdaa/tpm_context.h>
#endif
|
Include member_keypair_TPM.h in omnibus include file.
|
FIX: Include member_keypair_TPM.h in omnibus include file.
|
C
|
apache-2.0
|
xaptum/ecdaa,xaptum/ecdaa,xaptum/ecdaa
|
111ea9fc3f1daf1fdcbdacfdcc830873e03b6cb7
|
Examples/src/main.c
|
Examples/src/main.c
|
#include <ConsoleControl.h>
#include <ConsoleControlUtility.h>
#include <ConsoleControlUI.h>
#include <BasicExamples.h>
int main() {
const char* choices[] = {
"Basic features",
"UI features",
"Exit",
};
const cc_MenuColors colors = {
BLACK,
CYAN,
BLACK,
WHITE,
BLACK,
CYAN,
BLACK
};
cc_Menu menu;
menu.title = "ConsoleControl Examples";
menu.choices = choices;
menu.choicesNumber = 3;
menu.choiceOnEscape = 2;
menu.currentChoice = 0;
bool loop = true;
while(loop) {
cc_displayColorMenu(&menu, &colors);
cc_setColors(BLACK, WHITE);
switch(menu.currentChoice) {
case 0:
basicExamples();
break;
case 1:
//TODO
break;
case 2:
loop = false;
break;
default:
break;
}
}
return EXIT_SUCCESS;
}
|
#include <ConsoleControl.h>
#include <ConsoleControlUtility.h>
#include <ConsoleControlUI.h>
#include <BasicExamples.h>
int main() {
const char* choices[] = {
"Basic features",
"UI features",
"Exit",
};
const cc_MenuColors colors = {
BLACK,
CYAN,
BLACK,
WHITE,
BLACK,
CYAN,
BLACK
};
cc_Menu menu;
menu.title = "ConsoleControl Examples";
menu.choices = choices;
menu.choicesNumber = 3;
menu.choiceOnEscape = 2;
menu.currentChoice = 0;
bool loop = true;
while(loop) {
cc_displayColorMenu(&menu, &colors);
cc_setColors(BLACK, WHITE);
switch(menu.currentChoice) {
case 0:
basicExamples();
break;
case 1:
//TODO
break;
case 2:
loop = false;
break;
default:
break;
}
}
cc_setCursorVisibility(true);
cc_displayInputs(true);
return EXIT_SUCCESS;
}
|
Set back the cursor and inputs visibility in the examples
|
Set back the cursor and inputs visibility in the examples
|
C
|
mit
|
pinam45/ConsoleControl,pinam45/ConsoleControl
|
c13d9c1fb787982bd791975f9f7f6cc8f793d1e6
|
tests/testrender.c
|
tests/testrender.c
|
/* $Id$ */
#include "GL/glc.h"
#include <stdio.h>
extern void my_init(void);
extern void my_fini(void);
void testQueso(void)
{
int ctx = 0;
int font = 0;
my_init();
ctx = glcGenContext();
glcContext(ctx);
glcAppendCatalog("/usr/lib/X11/fonts/Type1");
glcFontFace(glcNewFontFromFamily(1, "Utopia"), "Bold");
font = glcNewFontFromFamily(2, "Courier");
glcFont(font);
glcFontFace(font, "Italic");
glcRenderStyle(GLC_LINE);
glScalef(24., 24., 0.);
glTranslatef(100., 100., 0.);
glColor3f(1., 1., 0.);
glcRenderChar('A');
my_fini();
}
|
/* $Id$ */
#include "GL/glc.h"
#include <stdio.h>
extern void my_init(void);
extern void my_fini(void);
void testQueso(void)
{
int ctx = 0;
int font = 0;
my_init();
ctx = glcGenContext();
glcContext(ctx);
glcAppendCatalog("/usr/lib/X11/fonts/Type1");
glcFontFace(glcNewFontFromFamily(1, "Utopia"), "Bold");
font = glcNewFontFromFamily(2, "Courier");
glcFont(font);
glcFontFace(font, "Italic");
glcRenderStyle(GLC_TRIANGLE);
glTranslatef(100., 100., 0.);
glScalef(10., 10., 0.);
glColor3f(1., 1., 0.);
glcRenderChar('A');
glcRenderChar('l');
glTranslatef(-50., 100., 0.);
glcRenderString("QuesoGLC");
my_fini();
}
|
Test of rendering commands is now a bit more complex
|
Test of rendering commands is now a bit more complex
|
C
|
lgpl-2.1
|
Safety0ff/QuesoGLC,Safety0ff/QuesoGLC,Safety0ff/QuesoGLC
|
ef39b128e18a557777c1223531f63e3da9fc8e48
|
Settings/Tabs/OSD.h
|
Settings/Tabs/OSD.h
|
#pragma once
#include "../Controls/Controls.h"
#include "SettingsTab.h"
class OSD : public SettingsTab {
public:
OSD(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L"");
virtual void SaveSettings();
protected:
virtual void Initialize();
virtual void LoadSettings();
private:
/* Controls: */
ListView *_osdList;
GroupBox *_volumeGroup;
Checkbox *_monitorVolEvents;
ComboBox *_audioDevice;
ComboBox *_audioTaper;
//Slider
Label *_limitValue;
Checkbox *_forceLimit;
GroupBox *_ejectGroup;
Checkbox *_monitorEjectEvents;
GroupBox *_keyboardGroup;
Checkbox *_caps;
Checkbox *_scroll;
Checkbox *_num;
Checkbox *_media;
};
|
#pragma once
#include "SettingsTab.h"
class OSD : public SettingsTab {
public:
OSD(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L"");
virtual void SaveSettings();
protected:
virtual void Initialize();
virtual void LoadSettings();
private:
/* Controls: */
ListView *_osdList;
GroupBox *_volumeGroup;
Checkbox *_monitorVolEvents;
ComboBox *_audioDevice;
ComboBox *_audioTaper;
//Slider
Label *_limitValue;
Checkbox *_forceLimit;
GroupBox *_ejectGroup;
Checkbox *_monitorEjectEvents;
GroupBox *_keyboardGroup;
Checkbox *_caps;
Checkbox *_scroll;
Checkbox *_num;
Checkbox *_media;
};
|
Remove controls header (moved to SettingsTab)
|
Remove controls header (moved to SettingsTab)
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
889d50ff21e47e3c33ea4ab7178a9680ac49f520
|
vsprojects/dummy.c
|
vsprojects/dummy.c
|
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
|
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
|
Fix newline at end of file
|
Fix newline at end of file
|
C
|
bsd-3-clause
|
grani/grpc,a11r/grpc,nicolasnoble/grpc,thunderboltsid/grpc,ppietrasa/grpc,kumaralokgithub/grpc,adelez/grpc,apolcyn/grpc,greasypizza/grpc,carl-mastrangelo/grpc,donnadionne/grpc,sreecha/grpc,infinit/grpc,jboeuf/grpc,miselin/grpc,jboeuf/grpc,vsco/grpc,msiedlarek/grpc,jboeuf/grpc,apolcyn/grpc,murgatroid99/grpc,makdharma/grpc,zhimingxie/grpc,a-veitch/grpc,malexzx/grpc,stanley-cheung/grpc,geffzhang/grpc,pmarks-net/grpc,dgquintas/grpc,tengyifei/grpc,thinkerou/grpc,thunderboltsid/grpc,murgatroid99/grpc,muxi/grpc,7anner/grpc,geffzhang/grpc,deepaklukose/grpc,Crevil/grpc,matt-kwong/grpc,yongni/grpc,wcevans/grpc,tamihiro/grpc,yang-g/grpc,baylabs/grpc,grani/grpc,kumaralokgithub/grpc,a-veitch/grpc,goldenbull/grpc,Vizerai/grpc,philcleveland/grpc,carl-mastrangelo/grpc,carl-mastrangelo/grpc,PeterFaiman/ruby-grpc-minimal,ipylypiv/grpc,zhimingxie/grpc,7anner/grpc,dklempner/grpc,donnadionne/grpc,ipylypiv/grpc,chrisdunelm/grpc,stanley-cheung/grpc,philcleveland/grpc,yang-g/grpc,malexzx/grpc,LuminateWireless/grpc,baylabs/grpc,andrewpollock/grpc,zhimingxie/grpc,jtattermusch/grpc,perumaalgoog/grpc,LuminateWireless/grpc,a11r/grpc,geffzhang/grpc,daniel-j-born/grpc,soltanmm/grpc,apolcyn/grpc,carl-mastrangelo/grpc,Crevil/grpc,jtattermusch/grpc,pmarks-net/grpc,ejona86/grpc,muxi/grpc,daniel-j-born/grpc,apolcyn/grpc,y-zeng/grpc,carl-mastrangelo/grpc,stanley-cheung/grpc,baylabs/grpc,jtattermusch/grpc,murgatroid99/grpc,bogdandrutu/grpc,sreecha/grpc,zhimingxie/grpc,thinkerou/grpc,ipylypiv/grpc,ipylypiv/grpc,rjshade/grpc,muxi/grpc,adelez/grpc,carl-mastrangelo/grpc,malexzx/grpc,grani/grpc,mehrdada/grpc,nicolasnoble/grpc,LuminateWireless/grpc,chrisdunelm/grpc,arkmaxim/grpc,VcamX/grpc,wcevans/grpc,miselin/grpc,hstefan/grpc,donnadionne/grpc,geffzhang/grpc,miselin/grpc,perumaalgoog/grpc,goldenbull/grpc,fuchsia-mirror/third_party-grpc,infinit/grpc,firebase/grpc,yongni/grpc,apolcyn/grpc,7anner/grpc,dgquintas/grpc,podsvirov/grpc,perumaalgoog/grpc,chrisdunelm/grpc,adelez/grpc,leifurhauks/grpc,philcleveland/grpc,arkmaxim/grpc,kskalski/grpc,philcleveland/grpc,muxi/grpc,MakMukhi/grpc,LuminateWireless/grpc,PeterFaiman/ruby-grpc-minimal,vsco/grpc,jboeuf/grpc,nicolasnoble/grpc,kumaralokgithub/grpc,Crevil/grpc,kriswuollett/grpc,yugui/grpc,bogdandrutu/grpc,jboeuf/grpc,soltanmm/grpc,kskalski/grpc,zhimingxie/grpc,PeterFaiman/ruby-grpc-minimal,rjshade/grpc,a11r/grpc,greasypizza/grpc,philcleveland/grpc,infinit/grpc,msiedlarek/grpc,chrisdunelm/grpc,pszemus/grpc,y-zeng/grpc,kskalski/grpc,kskalski/grpc,VcamX/grpc,Vizerai/grpc,chrisdunelm/grpc,stanley-cheung/grpc,dgquintas/grpc,7anner/grpc,jtattermusch/grpc,chrisdunelm/grpc,MakMukhi/grpc,kpayson64/grpc,sreecha/grpc,kumaralokgithub/grpc,geffzhang/grpc,vjpai/grpc,simonkuang/grpc,kpayson64/grpc,tengyifei/grpc,yongni/grpc,ppietrasa/grpc,LuminateWireless/grpc,tamihiro/grpc,dklempner/grpc,ctiller/grpc,jtattermusch/grpc,greasypizza/grpc,miselin/grpc,kskalski/grpc,andrewpollock/grpc,ppietrasa/grpc,sreecha/grpc,zhimingxie/grpc,tamihiro/grpc,firebase/grpc,tengyifei/grpc,firebase/grpc,wcevans/grpc,soltanmm/grpc,hstefan/grpc,grpc/grpc,muxi/grpc,kumaralokgithub/grpc,rjshade/grpc,leifurhauks/grpc,tamihiro/grpc,soltanmm-google/grpc,jtattermusch/grpc,msiedlarek/grpc,yongni/grpc,kriswuollett/grpc,soltanmm-google/grpc,murgatroid99/grpc,soltanmm-google/grpc,rjshade/grpc,yang-g/grpc,msmania/grpc,grpc/grpc,ananthonline/grpc,fuchsia-mirror/third_party-grpc,quizlet/grpc,Vizerai/grpc,a-veitch/grpc,dgquintas/grpc,thinkerou/grpc,kriswuollett/grpc,greasypizza/grpc,Vizerai/grpc,soltanmm-google/grpc,ejona86/grpc,quizlet/grpc,stanley-cheung/grpc,kpayson64/grpc,makdharma/grpc,hstefan/grpc,jcanizales/grpc,podsvirov/grpc,donnadionne/grpc,zhimingxie/grpc,matt-kwong/grpc,leifurhauks/grpc,makdharma/grpc,jboeuf/grpc,bogdandrutu/grpc,firebase/grpc,pmarks-net/grpc,PeterFaiman/ruby-grpc-minimal,matt-kwong/grpc,msiedlarek/grpc,ejona86/grpc,stanley-cheung/grpc,yang-g/grpc,quizlet/grpc,philcleveland/grpc,Crevil/grpc,a11r/grpc,hstefan/grpc,PeterFaiman/ruby-grpc-minimal,kumaralokgithub/grpc,goldenbull/grpc,adelez/grpc,royalharsh/grpc,vsco/grpc,greasypizza/grpc,podsvirov/grpc,daniel-j-born/grpc,tengyifei/grpc,podsvirov/grpc,pszemus/grpc,adelez/grpc,pszemus/grpc,yang-g/grpc,carl-mastrangelo/grpc,thinkerou/grpc,thunderboltsid/grpc,ejona86/grpc,a-veitch/grpc,carl-mastrangelo/grpc,infinit/grpc,pszemus/grpc,7anner/grpc,ctiller/grpc,wcevans/grpc,ncteisen/grpc,ncteisen/grpc,grpc/grpc,ipylypiv/grpc,grani/grpc,soltanmm-google/grpc,ejona86/grpc,vjpai/grpc,ctiller/grpc,murgatroid99/grpc,mehrdada/grpc,royalharsh/grpc,matt-kwong/grpc,bogdandrutu/grpc,mehrdada/grpc,dklempner/grpc,quizlet/grpc,ananthonline/grpc,arkmaxim/grpc,thunderboltsid/grpc,ncteisen/grpc,wcevans/grpc,murgatroid99/grpc,geffzhang/grpc,thinkerou/grpc,a-veitch/grpc,daniel-j-born/grpc,matt-kwong/grpc,msmania/grpc,MakMukhi/grpc,simonkuang/grpc,firebase/grpc,dgquintas/grpc,thinkerou/grpc,philcleveland/grpc,andrewpollock/grpc,donnadionne/grpc,muxi/grpc,quizlet/grpc,baylabs/grpc,a11r/grpc,wcevans/grpc,goldenbull/grpc,VcamX/grpc,stanley-cheung/grpc,Vizerai/grpc,royalharsh/grpc,makdharma/grpc,ejona86/grpc,malexzx/grpc,apolcyn/grpc,jboeuf/grpc,vjpai/grpc,greasypizza/grpc,soltanmm/grpc,grani/grpc,ananthonline/grpc,carl-mastrangelo/grpc,grpc/grpc,kpayson64/grpc,goldenbull/grpc,muxi/grpc,jtattermusch/grpc,MakMukhi/grpc,dklempner/grpc,LuminateWireless/grpc,sreecha/grpc,yongni/grpc,pmarks-net/grpc,msmania/grpc,grpc/grpc,kpayson64/grpc,infinit/grpc,kriswuollett/grpc,firebase/grpc,rjshade/grpc,stanley-cheung/grpc,royalharsh/grpc,Vizerai/grpc,tamihiro/grpc,pszemus/grpc,MakMukhi/grpc,daniel-j-born/grpc,yang-g/grpc,bogdandrutu/grpc,daniel-j-born/grpc,hstefan/grpc,perumaalgoog/grpc,MakMukhi/grpc,a-veitch/grpc,kriswuollett/grpc,andrewpollock/grpc,7anner/grpc,thinkerou/grpc,a-veitch/grpc,pmarks-net/grpc,Crevil/grpc,kskalski/grpc,vjpai/grpc,nicolasnoble/grpc,deepaklukose/grpc,jcanizales/grpc,a-veitch/grpc,vjpai/grpc,kskalski/grpc,makdharma/grpc,PeterFaiman/ruby-grpc-minimal,pmarks-net/grpc,makdharma/grpc,pszemus/grpc,goldenbull/grpc,rjshade/grpc,ppietrasa/grpc,donnadionne/grpc,kumaralokgithub/grpc,yugui/grpc,perumaalgoog/grpc,greasypizza/grpc,matt-kwong/grpc,stanley-cheung/grpc,leifurhauks/grpc,msmania/grpc,thinkerou/grpc,VcamX/grpc,stanley-cheung/grpc,perumaalgoog/grpc,jcanizales/grpc,bogdandrutu/grpc,mehrdada/grpc,y-zeng/grpc,ananthonline/grpc,arkmaxim/grpc,carl-mastrangelo/grpc,simonkuang/grpc,muxi/grpc,grpc/grpc,yang-g/grpc,wcevans/grpc,thunderboltsid/grpc,tengyifei/grpc,miselin/grpc,pmarks-net/grpc,makdharma/grpc,Crevil/grpc,vjpai/grpc,thinkerou/grpc,sreecha/grpc,dgquintas/grpc,nicolasnoble/grpc,jcanizales/grpc,jcanizales/grpc,MakMukhi/grpc,jcanizales/grpc,yugui/grpc,wcevans/grpc,perumaalgoog/grpc,jboeuf/grpc,y-zeng/grpc,jboeuf/grpc,miselin/grpc,murgatroid99/grpc,nicolasnoble/grpc,simonkuang/grpc,malexzx/grpc,hstefan/grpc,fuchsia-mirror/third_party-grpc,kriswuollett/grpc,ctiller/grpc,andrewpollock/grpc,kumaralokgithub/grpc,pszemus/grpc,jtattermusch/grpc,mehrdada/grpc,fuchsia-mirror/third_party-grpc,Crevil/grpc,podsvirov/grpc,pszemus/grpc,donnadionne/grpc,tengyifei/grpc,podsvirov/grpc,miselin/grpc,PeterFaiman/ruby-grpc-minimal,grpc/grpc,nicolasnoble/grpc,ctiller/grpc,mehrdada/grpc,makdharma/grpc,leifurhauks/grpc,geffzhang/grpc,ananthonline/grpc,firebase/grpc,vjpai/grpc,podsvirov/grpc,deepaklukose/grpc,LuminateWireless/grpc,yugui/grpc,baylabs/grpc,dgquintas/grpc,fuchsia-mirror/third_party-grpc,royalharsh/grpc,dgquintas/grpc,arkmaxim/grpc,vjpai/grpc,ejona86/grpc,podsvirov/grpc,rjshade/grpc,MakMukhi/grpc,malexzx/grpc,ejona86/grpc,chrisdunelm/grpc,carl-mastrangelo/grpc,mehrdada/grpc,chrisdunelm/grpc,infinit/grpc,mehrdada/grpc,kriswuollett/grpc,arkmaxim/grpc,donnadionne/grpc,dklempner/grpc,msmania/grpc,VcamX/grpc,vsco/grpc,matt-kwong/grpc,7anner/grpc,msmania/grpc,ctiller/grpc,apolcyn/grpc,wcevans/grpc,murgatroid99/grpc,kriswuollett/grpc,vjpai/grpc,miselin/grpc,vsco/grpc,Crevil/grpc,ananthonline/grpc,apolcyn/grpc,yugui/grpc,soltanmm/grpc,fuchsia-mirror/third_party-grpc,kskalski/grpc,grpc/grpc,ncteisen/grpc,ctiller/grpc,quizlet/grpc,pszemus/grpc,pszemus/grpc,VcamX/grpc,matt-kwong/grpc,7anner/grpc,vsco/grpc,infinit/grpc,a11r/grpc,mehrdada/grpc,msiedlarek/grpc,thinkerou/grpc,pszemus/grpc,muxi/grpc,a11r/grpc,grpc/grpc,PeterFaiman/ruby-grpc-minimal,stanley-cheung/grpc,rjshade/grpc,yongni/grpc,tamihiro/grpc,murgatroid99/grpc,LuminateWireless/grpc,Vizerai/grpc,bogdandrutu/grpc,thunderboltsid/grpc,adelez/grpc,ejona86/grpc,leifurhauks/grpc,dgquintas/grpc,dklempner/grpc,yang-g/grpc,pmarks-net/grpc,andrewpollock/grpc,ananthonline/grpc,kpayson64/grpc,yugui/grpc,andrewpollock/grpc,tengyifei/grpc,jtattermusch/grpc,nicolasnoble/grpc,soltanmm-google/grpc,jboeuf/grpc,ananthonline/grpc,soltanmm/grpc,LuminateWireless/grpc,ncteisen/grpc,sreecha/grpc,makdharma/grpc,quizlet/grpc,baylabs/grpc,royalharsh/grpc,tengyifei/grpc,dklempner/grpc,thinkerou/grpc,donnadionne/grpc,Vizerai/grpc,nicolasnoble/grpc,vsco/grpc,tengyifei/grpc,leifurhauks/grpc,sreecha/grpc,soltanmm/grpc,grani/grpc,adelez/grpc,PeterFaiman/ruby-grpc-minimal,simonkuang/grpc,philcleveland/grpc,donnadionne/grpc,jboeuf/grpc,ncteisen/grpc,ctiller/grpc,ananthonline/grpc,Vizerai/grpc,y-zeng/grpc,vsco/grpc,baylabs/grpc,sreecha/grpc,adelez/grpc,perumaalgoog/grpc,geffzhang/grpc,grpc/grpc,ejona86/grpc,pmarks-net/grpc,simonkuang/grpc,y-zeng/grpc,zhimingxie/grpc,y-zeng/grpc,a-veitch/grpc,firebase/grpc,ppietrasa/grpc,infinit/grpc,soltanmm-google/grpc,a11r/grpc,podsvirov/grpc,philcleveland/grpc,leifurhauks/grpc,arkmaxim/grpc,carl-mastrangelo/grpc,ejona86/grpc,yugui/grpc,jcanizales/grpc,quizlet/grpc,PeterFaiman/ruby-grpc-minimal,donnadionne/grpc,jcanizales/grpc,yugui/grpc,ctiller/grpc,bogdandrutu/grpc,kpayson64/grpc,andrewpollock/grpc,chrisdunelm/grpc,infinit/grpc,ncteisen/grpc,msiedlarek/grpc,deepaklukose/grpc,7anner/grpc,malexzx/grpc,VcamX/grpc,firebase/grpc,yongni/grpc,ncteisen/grpc,y-zeng/grpc,nicolasnoble/grpc,dklempner/grpc,kpayson64/grpc,mehrdada/grpc,msiedlarek/grpc,dgquintas/grpc,ipylypiv/grpc,sreecha/grpc,grpc/grpc,kriswuollett/grpc,sreecha/grpc,ncteisen/grpc,ncteisen/grpc,VcamX/grpc,daniel-j-born/grpc,malexzx/grpc,perumaalgoog/grpc,kskalski/grpc,ctiller/grpc,jcanizales/grpc,thunderboltsid/grpc,sreecha/grpc,kpayson64/grpc,nicolasnoble/grpc,royalharsh/grpc,hstefan/grpc,tamihiro/grpc,msiedlarek/grpc,dklempner/grpc,Crevil/grpc,ctiller/grpc,soltanmm/grpc,jtattermusch/grpc,mehrdada/grpc,rjshade/grpc,chrisdunelm/grpc,arkmaxim/grpc,soltanmm/grpc,soltanmm-google/grpc,kumaralokgithub/grpc,vjpai/grpc,zhimingxie/grpc,andrewpollock/grpc,quizlet/grpc,thunderboltsid/grpc,leifurhauks/grpc,yang-g/grpc,simonkuang/grpc,matt-kwong/grpc,goldenbull/grpc,kpayson64/grpc,nicolasnoble/grpc,pszemus/grpc,jtattermusch/grpc,muxi/grpc,msmania/grpc,simonkuang/grpc,fuchsia-mirror/third_party-grpc,royalharsh/grpc,deepaklukose/grpc,muxi/grpc,goldenbull/grpc,fuchsia-mirror/third_party-grpc,chrisdunelm/grpc,hstefan/grpc,deepaklukose/grpc,yongni/grpc,grani/grpc,greasypizza/grpc,arkmaxim/grpc,thunderboltsid/grpc,dgquintas/grpc,vsco/grpc,goldenbull/grpc,ncteisen/grpc,grani/grpc,firebase/grpc,deepaklukose/grpc,ppietrasa/grpc,soltanmm-google/grpc,firebase/grpc,ipylypiv/grpc,vjpai/grpc,Vizerai/grpc,firebase/grpc,baylabs/grpc,kpayson64/grpc,tamihiro/grpc,muxi/grpc,yugui/grpc,bogdandrutu/grpc,stanley-cheung/grpc,ppietrasa/grpc,greasypizza/grpc,VcamX/grpc,deepaklukose/grpc,Vizerai/grpc,royalharsh/grpc,msiedlarek/grpc,jtattermusch/grpc,fuchsia-mirror/third_party-grpc,msmania/grpc,donnadionne/grpc,ipylypiv/grpc,ctiller/grpc,fuchsia-mirror/third_party-grpc,thinkerou/grpc,deepaklukose/grpc,malexzx/grpc,y-zeng/grpc,tamihiro/grpc,ppietrasa/grpc,ejona86/grpc,a11r/grpc,hstefan/grpc,ipylypiv/grpc,baylabs/grpc,apolcyn/grpc,jboeuf/grpc,yongni/grpc,vjpai/grpc,murgatroid99/grpc,grpc/grpc,mehrdada/grpc,MakMukhi/grpc,daniel-j-born/grpc,grani/grpc,geffzhang/grpc,msmania/grpc,ppietrasa/grpc,miselin/grpc,simonkuang/grpc,daniel-j-born/grpc,ncteisen/grpc,adelez/grpc
|
363f031f11c3b704a77e65535915297fdcf3d669
|
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
#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
void flsp_draw_circle(cairo_t *context,
gint x, gint y, gint radius,
GdkRGBA circle, GdkRGBA border);
#endif
|
Add function to draw primitive circle
|
Add function to draw primitive circle
|
C
|
mit
|
kenhys/fake-lock-screen-pattern,kenhys/fake-lock-screen-pattern
|
855bb402a5e8492e2ffdee1d5c402f23bfe53687
|
include/HubFramework/HubFramework.h
|
include/HubFramework/HubFramework.h
|
/// Umbrella header for the Hub Framework
#import "HUBManager.h"
#import "HUBConnectivityStateResolver.h"
// JSON
#import "HUBJSONSchema.h"
#import "HUBViewModelJSONSchema.h"
#import "HUBComponentModelJSONSchema.h"
#import "HUBComponentImageDataJSONSchema.h"
#import "HUBJSONSchemaRegistry.h"
#import "HUBJSONPath.h"
#import "HUBMutableJSONPath.h"
// Feature
#import "HUBFeatureConfiguration.h"
#import "HUBFeatureRegistry.h"
// Content
#import "HUBContentProviderFactory.h"
#import "HUBRemoteContentProvider.h"
#import "HUBLocalContentProvider.h"
// View
#import "HUBViewModel.h"
#import "HUBViewModelLoader.h"
#import "HUBViewModelLoaderFactory.h"
#import "HUBViewModelBuilder.h"
#import "HUBViewURIQualifier.h"
#import "HUBViewControllerFactory.h"
// Components
#import "HUBComponent.h"
#import "HUBComponentFactory.h"
#import "HUBComponentIdentifier.h"
#import "HUBComponentModel.h"
#import "HUBComponentModelBuilder.h"
#import "HUBComponentImageData.h"
#import "HUBComponentImageDataBuilder.h"
#import "HUBComponentRegistry.h"
|
/// Umbrella header for the Hub Framework
#import "HUBManager.h"
#import "HUBConnectivityStateResolver.h"
// JSON
#import "HUBJSONSchema.h"
#import "HUBViewModelJSONSchema.h"
#import "HUBComponentModelJSONSchema.h"
#import "HUBComponentImageDataJSONSchema.h"
#import "HUBJSONSchemaRegistry.h"
#import "HUBJSONPath.h"
#import "HUBMutableJSONPath.h"
// Feature
#import "HUBFeatureConfiguration.h"
#import "HUBFeatureRegistry.h"
// Content
#import "HUBContentProviderFactory.h"
#import "HUBRemoteContentProvider.h"
#import "HUBLocalContentProvider.h"
// View
#import "HUBViewModel.h"
#import "HUBViewModelLoader.h"
#import "HUBViewModelLoaderFactory.h"
#import "HUBViewModelBuilder.h"
#import "HUBViewURIQualifier.h"
#import "HUBViewControllerFactory.h"
// Components
#import "HUBComponent.h"
#import "HUBComponentFactory.h"
#import "HUBComponentModel.h"
#import "HUBComponentModelBuilder.h"
#import "HUBComponentImageData.h"
#import "HUBComponentImageDataBuilder.h"
#import "HUBComponentRegistry.h"
|
Remove `HUBComponentIdentifier` import from umbrella header
|
Remove `HUBComponentIdentifier` import from umbrella header
|
C
|
apache-2.0
|
spotify/HubFramework,spotify/HubFramework,spotify/HubFramework,spotify/HubFramework
|
3730accd147663026f892a707166c0c001cabed0
|
snippets/TMAX.c
|
snippets/TMAX.c
|
#! /usr/bin/tcc -run
// demonstate testmin testmax consistency with malloc
#include <string.h> // memcpy
#include <stdio.h> // printf
#include <stdlib.h> // malloc
#include <assert.h> // assert
typedef struct {ssize_t size; char *row; int count;} slot;
slot line;
slot *text;
int main(void)
{
leng = 10; int numb;
text = malloc(leng*sizeof(slot));
int textmax = (int) (text + leng - 1);
int textmin = (int) (text + 0);
line.row = NULL;
line.size = 0;
int i; for(i = 0; i < leng+1; i++) //deliberate overrun
{
printf("%d text = %p\n",i,text+i);
numb = (int) (text+i);
printf("%d numb = %x\n",i,numb);
assert(textmin <= numb); assert(textmax >= numb);
*(text+i) = line;
}
printf("test run ending\n");
return 0;
}
|
#! /usr/bin/tcc -run
#include <string.h> // memcpy
#include <stdio.h> // printf
#include <stdlib.h> // malloc
#include <assert.h> // assert
#define textbound texndx = (int) (text + iy); \
assert(textmin <= texndx); \
assert(textmax >= texndx);
typedef struct {ssize_t size; char *row; int count;} slot;
slot line;
slot *text;
int main(void)
{
int leng = 10;
text = malloc(leng*sizeof(slot));
int textmax = (int) (text + leng - 1);
int textmin = (int) (text + 0);
line.row = NULL;
line.size = 0;
int iy; for(iy = 0; iy < leng+1; iy++) //deliberate iy overrun
{
printf("%d text = %p\n",iy,text+iy);
int texndx; textbound;
text[iy] = line;
}
printf("test run ending\n");
return 0;
}
|
Add definition for testing bounds on array text
|
Add definition for testing bounds on array text
|
C
|
bsd-2-clause
|
eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood
|
ac21a316a0e0179d2d2b52d81d417430a82992ca
|
dependencies/stdafx/stdafx.h
|
dependencies/stdafx/stdafx.h
|
#include <Ogre.h>
#include <OgreMeshFileFormat.h>
#include <OgreOptimisedUtil.h>
#include <OgrePredefinedControllers.h>
#ifdef WIN32
#include <OgreD3D9RenderSystem.h>
#include <OgreD3D9HLSLProgram.h>
#endif
#include <OgreOctreePlugin.h>
#include <OgreOctreeSceneManager.h>
#include <OgreCgPlugin.h>
#include <OgreCgProgram.h>
|
#include <Ogre.h>
#include <OgreDepthBuffer.h>
#include <OgreMeshFileFormat.h>
#include <OgreOptimisedUtil.h>
#include <OgrePredefinedControllers.h>
#ifdef WIN32
#include <OgreD3D9RenderSystem.h>
#include <OgreD3D9HLSLProgram.h>
#endif
#include <OgreOctreePlugin.h>
#include <OgreOctreeSceneManager.h>
#include <OgreCgPlugin.h>
#include <OgreCgProgram.h>
|
Add Depthbuffer to precompiled header
|
Add Depthbuffer to precompiled header
|
C
|
mit
|
grit-engine/grit-engine,sparkprime/grit-engine,sparkprime/grit-engine,sparkprime/grit-engine,grit-engine/grit-engine,grit-engine/grit-engine,sparkprime/grit-engine,grit-engine/grit-engine
|
cd15a3b8e5975c8ddc5928022fce4696adce5e8c
|
Pods/Expecta/src/matchers/EXPMatchers+equal.h
|
Pods/Expecta/src/matchers/EXPMatchers+equal.h
|
#import "Expecta.h"
EXPMatcherInterface(_equal, (id expected));
EXPMatcherInterface(equal, (id expected)); // to aid code completion
#define equal(expected) _equal(EXPObjectify((expected)))
|
#import "Expecta.h"
EXPMatcherInterface(_equal, (id expected));
EXPMatcherInterface(equal, (id expected)); // to aid code completion
#define equal(...) _equal(EXPObjectify((__VA_ARGS__)))
|
Change expecta equal() to accept any amount of argument
|
Change expecta equal() to accept any amount of argument
This helps with array literals
|
C
|
mit
|
frenetisch-applaudierend/mocka,frenetisch-applaudierend/mocka
|
6a8cbb53dad28508f0fbb893ce37defbbec11a49
|
src/bin/e_log.c
|
src/bin/e_log.c
|
#include "e.h"
EINTERN int e_log_dom = -1;
EINTERN int
e_log_init(void)
{
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
return e_log_dom != -1;
}
EINTERN int
e_log_shutdown(void)
{
eina_log_domain_unregister(e_log_dom);
e_log_dom = -1;
return 0;
}
|
#include "e.h"
EINTERN int e_log_dom = -1;
static const char *_names[] = {
"CRI",
"ERR",
"WRN",
"INF",
"DBG",
};
static void
_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
{
const char *color;
color = eina_log_level_color_get(level);
fprintf(stdout,
"%s%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%s:%d" EINA_COLOR_RESET " ",
color, _names[level > EINA_LOG_LEVEL_DBG ? EINA_LOG_LEVEL_DBG : level],
d->domain_str, color, file, line);
vfprintf(stdout, fmt, args);
putc('\n', stdout);
}
EINTERN int
e_log_init(void)
{
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
eina_log_print_cb_set(_e_log_cb, NULL);
return e_log_dom != -1;
}
EINTERN int
e_log_shutdown(void)
{
eina_log_domain_unregister(e_log_dom);
e_log_dom = -1;
return 0;
}
|
Revert "e logs - the custom e log func breaks eina backtraces, so don't use it"
|
Revert "e logs - the custom e log func breaks eina backtraces, so don't use it"
This reverts commit 2df04042269f3b5604c719844eac372fa5fcddd2.
let's not do this in all cases
|
C
|
bsd-2-clause
|
tasn/enlightenment,rvandegrift/e,rvandegrift/e,rvandegrift/e,tasn/enlightenment,tasn/enlightenment
|
ae0b6ad71ed495ac6fba25c8b8feb25828e756a0
|
rest/rest-main.c
|
rest/rest-main.c
|
#include "rest-private.h"
guint rest_debug_flags = 0;
/*
* "Private" function used to set debugging flags based on environment
* variables. Called upon entry into all public functions.
*/
void
_rest_setup_debugging (void)
{
const gchar *tmp;
gchar **parts;
gint i = 0;
static gboolean setup_done = FALSE;
if (setup_done)
return;
tmp = g_getenv ("REST_DEBUG");
if (tmp)
{
parts = g_strsplit (tmp, ",", -1);
for (i = 0; parts[i] != NULL; i++)
{
if (g_str_equal (tmp, "xml-parser"))
{
rest_debug_flags |= REST_DEBUG_XML_PARSER;
} else if (g_str_equal (tmp, "proxy")) {
rest_debug_flags |= REST_DEBUG_PROXY;
} else if (g_str_equal (tmp, "all")) {
rest_debug_flags |= REST_DEBUG_ALL;
}
}
g_strfreev (parts);
}
setup_done = TRUE;
}
|
#include "rest-private.h"
guint rest_debug_flags = 0;
/*
* "Private" function used to set debugging flags based on environment
* variables. Called upon entry into all public functions.
*/
void
_rest_setup_debugging (void)
{
static gboolean setup_done = FALSE;
static const GDebugKey keys[] = {
{ "xml-parser", REST_DEBUG_XML_PARSER },
{ "proxy", REST_DEBUG_PROXY }
};
if (G_LIKELY (setup_done))
return;
rest_debug_flags = g_parse_debug_string (g_getenv ("REST_DEBUG"),
keys, G_N_ELEMENTS (keys));
setup_done = TRUE;
}
|
Use g_parse_debug_string instead of manually parsing
|
Use g_parse_debug_string instead of manually parsing
|
C
|
lgpl-2.1
|
GNOME/librest,Distrotech/librest,ThomasBollmeier/librest-oauth-proxy,GNOME/librest,Distrotech/librest,GNOME/librest,ThomasBollmeier/librest-oauth-proxy
|
4026b3ed5ed0c6af1312ac58a2ec578637d9175a
|
test/Driver/mno-global-merge.c
|
test/Driver/mno-global-merge.c
|
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// CHECK-NGM: "-mno-global-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// CHECK-GM-NOT: "-mglobal-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mno-global-merge -c %s
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -c %s
|
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
// CHECK-NGM: "-mno-global-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// RUN: %clang -target arm64-apple-ios7 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
// CHECK-GM-NOT: "-mglobal-merge"
|
Revert new test from 213993.
|
Revert new test from 213993.
It requires an arm backend and also writes output in the test directory.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@213998 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
009aeab78a78eb666321eea22fb515f718142165
|
Sub-Terra/include/World.h
|
Sub-Terra/include/World.h
|
#pragma once
#include <boost/unordered_map.hpp>
#include "System.h"
#include "OpenSimplexNoise.h"
enum class ChunkStatus {
Generating,
Alive,
Dying,
Dead
};
typedef std::tuple<int64_t, int64_t, int64_t> ChunkKeyType;
typedef std::tuple<ChunkStatus, IDType> ChunkContainerType;
typedef boost::unordered_map<ChunkKeyType, ChunkContainerType> ChunksType;
class World : public System {
private:
const uint8_t viewDistance = 5;
const Point3 blockSize = Point3(1.0f);
const glm::ivec3 chunkSize;
OpenSimplexNoise noise = OpenSimplexNoise(std::random_device()());
Atomic<ChunksType> chunks;
protected:
void Init() override final;
void Update(DeltaTicks &) override final;
public:
static bool IsSupported() { return true; }
World(Polar *engine, const unsigned char chunkWidth, const unsigned char chunkHeight, const unsigned char chunkDepth)
: System(engine), chunkSize(chunkWidth, chunkHeight, chunkDepth) {}
~World();
std::vector<bool> GenerateChunk(const Point3 &&) const;
bool GenerateBlock(const Point3 &&) const;
};
|
#pragma once
#include <boost/unordered_map.hpp>
#include "System.h"
#include "OpenSimplexNoise.h"
enum class ChunkStatus {
Generating,
Alive,
Dying,
Dead
};
typedef std::tuple<int64_t, int64_t, int64_t> ChunkKeyType;
typedef std::tuple<ChunkStatus, IDType> ChunkContainerType;
typedef boost::unordered_map<ChunkKeyType, ChunkContainerType> ChunksType;
class World : public System {
private:
const uint8_t viewDistance = 3;
const Point3 blockSize = Point3(1.0f);
const glm::ivec3 chunkSize;
OpenSimplexNoise noise = OpenSimplexNoise(std::random_device()());
Atomic<ChunksType> chunks;
protected:
void Init() override final;
void Update(DeltaTicks &) override final;
public:
static bool IsSupported() { return true; }
World(Polar *engine, const unsigned char chunkWidth, const unsigned char chunkHeight, const unsigned char chunkDepth)
: System(engine), chunkSize(chunkWidth, chunkHeight, chunkDepth) {}
~World();
std::vector<bool> GenerateChunk(const Point3 &&) const;
bool GenerateBlock(const Point3 &&) const;
};
|
Change world view distance to 3
|
Change world view distance to 3
|
C
|
mpl-2.0
|
shockkolate/polar4,shockkolate/polar4,shockkolate/polar4,polar-engine/polar,shockkolate/polar4,polar-engine/polar
|
e66fb4cb5e5c3ed80e5e874cc06c110482a57ab3
|
ionCore/ionStandardLibrary.h
|
ionCore/ionStandardLibrary.h
|
#pragma once
#include "ionTypes.h"
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
using std::move;
using std::ifstream;
template <typename T, typename U>
U * ConditionalMapAccess(map<T, U *> & Map, T const Key)
{
auto Iterator = Map.find(Key);
if (Iterator != Map.end())
return Iterator->second;
return 0;
}
|
#pragma once
#include "ionTypes.h"
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
using std::move;
using std::ifstream;
template <typename T, typename U>
U * ConditionalMapAccess(map<T, U *> & Map, T const Key)
{
auto Iterator = Map.find(Key);
if (Iterator != Map.end())
return Iterator->second;
return 0;
}
class File
{
public:
static bool Exists(string const & FileName)
{
ifstream ifile(FileName);
return ifile.good();
}
static string && ReadAsString(string const & FileName)
{
std::ifstream t(FileName);
std::string str;
t.seekg(0, std::ios::end);
str.reserve((uint) t.tellg());
t.seekg(0, std::ios::beg);
str.assign((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());
return move(str);
}
};
|
Add some file utility functions
|
Add some file utility functions
--HG--
branch : SceneOverhaul
|
C
|
mit
|
iondune/ionEngine,iondune/ionEngine
|
ad74ebb3ae7f3dee129f0ccce11100e3fcef1d4c
|
bin/check_it.c
|
bin/check_it.c
|
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
int main(int argc, char** argv) {
struct passwd *passwd = getpwuid(getuid());
int errno = setreuid(geteuid(), geteuid());
// errno = execle("/usr/bin/id", (char *) 0, envp);
if (errno == 0 && passwd != 0) {
// CHECKIT_USER will contain the name of the user that invoked us.
char user_evar[100];
snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name);
// Use a nice clean PATH.
char * envp[] = { "PATH=/bin:/usr/bin", user_evar, (char *) 0 };
// Do it!
errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp);
}
printf("An error occured %d\n", errno);
return errno;
}
|
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
int main(int argc, char** argv) {
struct passwd *passwd = getpwuid(getuid());
int errno = setreuid(geteuid(), geteuid());
// errno = execle("/usr/bin/id", (char *) 0, envp);
if (errno == 0 && passwd != 0) {
// CHECKIT_USER will contain the name of the user that invoked us.
char user_evar[100];
snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name);
// Use a nice clean PATH.
char * envp[] = {
"PATH=/bin:/usr/bin"
, "HOME=/home2/ling572_00"
, "JAVA_HOME=/usr/java/latest"
, "JAVA_OPTS=-Xmx300m -Xms140m"
, user_evar
, (char *) 0 };
// Do it!
errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp);
}
printf("An error occured %d\n", errno);
return errno;
}
|
Reduce Java VM max heap space.
|
Reduce Java VM max heap space.
|
C
|
agpl-3.0
|
jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt
|
1edbd62cac51376384ca2786be85fbbe0cbe7dbb
|
src/interfaces/odbc/md5.h
|
src/interfaces/odbc/md5.h
|
/* File: connection.h
*
* Description: See "connection.c"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
#ifndef __BEOS__ /* this shouldn't be required, but is is! */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* __BEOS__ */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
|
/* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
#ifndef __BEOS__ /* this shouldn't be required, but is is! */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* __BEOS__ */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
|
Fix comment at top of file to match file name.
|
Fix comment at top of file to match file name.
|
C
|
apache-2.0
|
lisakowen/gpdb,janebeckman/gpdb,xuegang/gpdb,Quikling/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,rubikloud/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,arcivanov/postgres-xl,tangp3/gpdb,greenplum-db/gpdb,rubikloud/gpdb,oberstet/postgres-xl,ahachete/gpdb,Quikling/gpdb,Postgres-XL/Postgres-XL,tangp3/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,royc1/gpdb,CraigHarris/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,rubikloud/gpdb,tangp3/gpdb,yuanzhao/gpdb,arcivanov/postgres-xl,greenplum-db/gpdb,CraigHarris/gpdb,oberstet/postgres-xl,adam8157/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,CraigHarris/gpdb,tangp3/gpdb,ovr/postgres-xl,postmind-net/postgres-xl,ahachete/gpdb,zaksoup/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,lisakowen/gpdb,tangp3/gpdb,chrishajas/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,yazun/postgres-xl,foyzur/gpdb,rvs/gpdb,ahachete/gpdb,ovr/postgres-xl,lintzc/gpdb,yuanzhao/gpdb,janebeckman/gpdb,snaga/postgres-xl,lintzc/gpdb,ashwinstar/gpdb,chrishajas/gpdb,xinzweb/gpdb,xinzweb/gpdb,edespino/gpdb,0x0FFF/gpdb,rubikloud/gpdb,xuegang/gpdb,Postgres-XL/Postgres-XL,kaknikhil/gpdb,yuanzhao/gpdb,yazun/postgres-xl,oberstet/postgres-xl,rvs/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,xuegang/gpdb,tangp3/gpdb,techdragon/Postgres-XL,adam8157/gpdb,chrishajas/gpdb,ovr/postgres-xl,randomtask1155/gpdb,ashwinstar/gpdb,Chibin/gpdb,rubikloud/gpdb,xinzweb/gpdb,xinzweb/gpdb,atris/gpdb,yazun/postgres-xl,zeroae/postgres-xl,zeroae/postgres-xl,50wu/gpdb,0x0FFF/gpdb,adam8157/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,royc1/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,janebeckman/gpdb,royc1/gpdb,foyzur/gpdb,foyzur/gpdb,zeroae/postgres-xl,yuanzhao/gpdb,techdragon/Postgres-XL,arcivanov/postgres-xl,xinzweb/gpdb,ashwinstar/gpdb,Quikling/gpdb,greenplum-db/gpdb,Chibin/gpdb,lintzc/gpdb,randomtask1155/gpdb,zaksoup/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,randomtask1155/gpdb,randomtask1155/gpdb,Quikling/gpdb,zaksoup/gpdb,50wu/gpdb,lintzc/gpdb,kaknikhil/gpdb,adam8157/gpdb,ahachete/gpdb,50wu/gpdb,xuegang/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,greenplum-db/gpdb,postmind-net/postgres-xl,edespino/gpdb,snaga/postgres-xl,ashwinstar/gpdb,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,lisakowen/gpdb,arcivanov/postgres-xl,adam8157/gpdb,kmjungersen/PostgresXL,zeroae/postgres-xl,50wu/gpdb,kmjungersen/PostgresXL,cjcjameson/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,chrishajas/gpdb,janebeckman/gpdb,cjcjameson/gpdb,50wu/gpdb,royc1/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,janebeckman/gpdb,Chibin/gpdb,jmcatamney/gpdb,edespino/gpdb,oberstet/postgres-xl,atris/gpdb,atris/gpdb,jmcatamney/gpdb,Quikling/gpdb,Quikling/gpdb,edespino/gpdb,0x0FFF/gpdb,lintzc/gpdb,greenplum-db/gpdb,janebeckman/gpdb,kaknikhil/gpdb,rvs/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,ahachete/gpdb,lpetrov-pivotal/gpdb,cjcjameson/gpdb,rvs/gpdb,zeroae/postgres-xl,foyzur/gpdb,Chibin/gpdb,adam8157/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,foyzur/gpdb,kaknikhil/gpdb,zaksoup/gpdb,ovr/postgres-xl,edespino/gpdb,royc1/gpdb,randomtask1155/gpdb,edespino/gpdb,lintzc/gpdb,foyzur/gpdb,tpostgres-projects/tPostgres,kmjungersen/PostgresXL,Chibin/gpdb,xuegang/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,rvs/gpdb,edespino/gpdb,Chibin/gpdb,xuegang/gpdb,rvs/gpdb,tangp3/gpdb,lisakowen/gpdb,janebeckman/gpdb,Quikling/gpdb,50wu/gpdb,cjcjameson/gpdb,edespino/gpdb,ovr/postgres-xl,janebeckman/gpdb,snaga/postgres-xl,pavanvd/postgres-xl,pavanvd/postgres-xl,CraigHarris/gpdb,CraigHarris/gpdb,janebeckman/gpdb,lisakowen/gpdb,lintzc/gpdb,chrishajas/gpdb,chrishajas/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,ahachete/gpdb,CraigHarris/gpdb,tpostgres-projects/tPostgres,jmcatamney/gpdb,zaksoup/gpdb,postmind-net/postgres-xl,yazun/postgres-xl,0x0FFF/gpdb,lpetrov-pivotal/gpdb,rubikloud/gpdb,xinzweb/gpdb,0x0FFF/gpdb,atris/gpdb,foyzur/gpdb,tangp3/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,royc1/gpdb,rvs/gpdb,Quikling/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,edespino/gpdb,yuanzhao/gpdb,xinzweb/gpdb,ahachete/gpdb,rubikloud/gpdb,adam8157/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,rvs/gpdb,chrishajas/gpdb,lisakowen/gpdb,rubikloud/gpdb,lintzc/gpdb,atris/gpdb,rvs/gpdb,zaksoup/gpdb,xuegang/gpdb,foyzur/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,cjcjameson/gpdb,Chibin/gpdb,yazun/postgres-xl,lintzc/gpdb,Postgres-XL/Postgres-XL,xuegang/gpdb,adam8157/gpdb,royc1/gpdb,ahachete/gpdb,lisakowen/gpdb,janebeckman/gpdb,yuanzhao/gpdb,Quikling/gpdb,Chibin/gpdb,jmcatamney/gpdb,atris/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,pavanvd/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,kmjungersen/PostgresXL,pavanvd/postgres-xl,atris/gpdb,zaksoup/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,Quikling/gpdb,edespino/gpdb,0x0FFF/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,CraigHarris/gpdb
|
acce10551c7483b3fc03ec70ad4982c8d975b729
|
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 "RocksDBColumnFamily.h"
#import "RocksDBOptions.h"
#import "RocksDBReadOptions.h"
#import "RocksDBWriteOptions.h"
#import "RocksDBWriteBatch.h"
#import "RocksDBIterator.h"
#import "RocksDBSnapshot.h"
#import "RocksDBComparator.h"
#import "RocksDBMergeOperator.h"
#import "RocksDBBackupEngine.h"
#import "RocksDBTypes.h"
#import "RocksDBError.h"
|
//
// ObjectiveRocks.h
// ObjectiveRocks
//
// Created by Iska on 20/11/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import "RocksDB.h"
#import "RocksDBColumnFamily.h"
#import "RocksDBOptions.h"
#import "RocksDBReadOptions.h"
#import "RocksDBWriteOptions.h"
#import "RocksDBWriteBatch.h"
#import "RocksDBIterator.h"
#import "RocksDBSnapshot.h"
#import "RocksDBComparator.h"
#import "RocksDBMergeOperator.h"
#import "RocksDBBackupEngine.h"
#import "RocksDBBackupInfo.h"
#import "RocksDBTypes.h"
#import "RocksDBError.h"
|
Add BackupInfo class to public include header
|
Add BackupInfo class to public include header
|
C
|
mit
|
iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks
|
fae9876b444ebf71c67626d2d3d5f9a11ab7b664
|
common-block.h
|
common-block.h
|
// See copyright notice in Copying.
#ifndef COMMON_BLOCK_H
#define COMMON_BLOCK_H
enum {
FLAG_DEFAULT = 0,
FLAG_IS_FRAGMENT = 1 << 0,
FLAG_ADMIN = 1 << 1,
FLAG_NO_FRAGMENT = 1 << 2,
FLAG_CUSTODY = 1 << 3,
FLAG_SINGLETON = 1 << 4,
FLAG_ACK = 1 << 5,
PRIO_RESET = ~(0x3 << 7),
PRIO_BULK = 0x0 << 7,
PRIO_NORMAL = 0x1 << 7,
PRIO_EXPEDITED = 0x2 << 7,
REPORT_RECEPTION = 1 << 14,
REPORT_CUSTODY = 1 << 15,
REPORT_FORWARDING = 1 << 16,
REPORT_DELIVERY = 1 << 17,
REPORT_DELETION = 1 << 18,
FLAG_REPLICATE = 1 << 0,
FLAG_TRANSMIT_STATUS = 1 << 1,
FLAG_DELETE_BUNDLE = 1 << 2,
FLAG_LAST_BLOCK = 1 << 3,
FLAG_DISCARD_BLOCK = 1 << 4,
FLAG_FORWARDED = 1 << 5,
FLAG_CONTAINS_REF = 1 << 6,
FLAG_INVALID = 1 << 31,
};
#endif
|
// See copyright notice in Copying.
#ifndef COMMON_BLOCK_H
#define COMMON_BLOCK_H
#define FLAG_DEFAULT 0u
#define FLAG_IS_FRAGMENT (1u << 0)
#define FLAG_ADMIN (1u << 1)
#define FLAG_NO_FRAGMENT (1u << 2)
#define FLAG_CUSTODY (1u << 3)
#define FLAG_SINGLETON (1u << 4)
#define FLAG_ACK (1u << 5)
#define PRIO_RESET ~(0x3u << 7)
#define PRIO_BULK (0x0u << 7)
#define PRIO_NORMAL (0x1u << 7)
#define PRIO_EXPEDITED (0x2u << 7)
#define REPORT_RECEPTION (1u << 14)
#define REPORT_CUSTODY (1u << 15)
#define REPORT_FORWARDING (1u << 16)
#define REPORT_DELIVERY (1u << 17)
#define REPORT_DELETION (1u << 18)
#define FLAG_REPLICATE (1u << 0)
#define FLAG_TRANSMIT_STATUS (1u << 1)
#define FLAG_DELETE_BUNDLE (1u << 2)
#define FLAG_LAST_BLOCK (1u << 3)
#define FLAG_DISCARD_BLOCK (1u << 4)
#define FLAG_FORWARDED (1u << 5)
#define FLAG_CONTAINS_REF (1u << 6)
#define FLAG_INVALID (1u << 31)
#endif
|
Convert flag constants from enum to defines
|
Convert flag constants from enum to defines
This fixes signedness errors
|
C
|
mit
|
kchmck/mkbundle
|
2b708e4b50326969e78877fdf144624d79815b8d
|
src/unionfs.h
|
src/unionfs.h
|
/*
* License: BSD-style license
* Copyright: Radek Podgorny <radek@podgorny.cz>,
* Bernd Schubert <bernd-schubert@gmx.de>
*/
#ifndef UNIONFS_H
#define UNIONFS_H
#define PATHLEN_MAX 1024
#define HIDETAG "_HIDDEN~"
#define METADIR ".unionfs/"
typedef struct {
char *path;
int fd; // used to prevent accidental umounts of path
unsigned char rw; // the writable flag
} branch_entry_t;
/**
* structure to have information about the current union
*/
typedef struct {
// read-writable branches
struct rw_branches {
int n_rw; // number of rw-branches
unsigned *rw_br; // integer array of rw-branches
} rw_branches;
// branches used for statfs
struct statvfs {
int nbranches; // number of statvfs branches
int *branches; // array of integers with the branch numbers
} statvfs;
} ufeatures_t;
extern ufeatures_t ufeatures;
#endif
|
/*
* License: BSD-style license
* Copyright: Radek Podgorny <radek@podgorny.cz>,
* Bernd Schubert <bernd-schubert@gmx.de>
*/
#ifndef UNIONFS_H
#define UNIONFS_H
#define PATHLEN_MAX 1024
#define HIDETAG "_HIDDEN~"
#define METADIR ".unionfs/"
typedef struct {
char *path;
int fd; // used to prevent accidental umounts of path
unsigned char rw; // the writable flag
} branch_entry_t;
/**
* structure to have information about the current union
*/
typedef struct {
// read-writable branches
struct rw_branches {
int n_rw; // number of rw-branches
unsigned *rw_br; // integer array of rw-branches
} rw_branches;
// branches used for statfs
struct ustatvfs {
int nbranches; // number of statvfs branches
int *branches; // array of integers with the branch numbers
} statvfs;
} ufeatures_t;
extern ufeatures_t ufeatures;
#endif
|
Rename our struct statvfs to struct ustatvfs to prevent libc name collision.
|
Rename our struct statvfs to struct ustatvfs to prevent libc name collision.
|
C
|
bsd-3-clause
|
evnu/unionfs-fuse,evnu/unionfs-fuse,kissthink/unionfs-fuse-1,jrk/unionfs-fuse,yogoloth/unionfs-fuse,kissthink/unionfs-fuse-1,yogoloth/unionfs-fuse,jrk/unionfs-fuse,jrk/unionfs-fuse,yogoloth/unionfs-fuse,jrk/unionfs-fuse,kissthink/unionfs-fuse-1,evnu/unionfs-fuse
|
9cea98e320bfc37a6df373245f916b15c68a7f01
|
src/consensus/consensus.h
|
src/consensus/consensus.h
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_CONSENSUS_H
#define BITCOIN_CONSENSUS_CONSENSUS_H
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 100;
/** Flags for nSequence and nLockTime locks */
enum {
/* Interpret sequence numbers as relative lock-time constraints. */
LOCKTIME_VERIFY_SEQUENCE = (1 << 0),
/* Use GetMedianTimePast() instead of nTime for end point timestamp. */
LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
};
#endif // BITCOIN_CONSENSUS_CONSENSUS_H
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2016 The Bitcoin Ocho developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_CONSENSUS_H
#define BITCOIN_CONSENSUS_CONSENSUS_H
/** The maximum allowed size for a serialized block, in bytes (network rule) */
/** Bitcoin Ocho, we multiply by 8 for Ocho */
static const unsigned int MAX_BLOCK_SIZE = 1000000*8;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 100;
/** Flags for nSequence and nLockTime locks */
enum {
/* Interpret sequence numbers as relative lock-time constraints. */
LOCKTIME_VERIFY_SEQUENCE = (1 << 0),
/* Use GetMedianTimePast() instead of nTime for end point timestamp. */
LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
};
#endif // BITCOIN_CONSENSUS_CONSENSUS_H
|
Add more Ochoness to Bitcoin.
|
Add more Ochoness to Bitcoin.
|
C
|
mit
|
goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin,goku1997/bitcoin
|
ab5acba34782d735f759c709e74d957c9d7418ba
|
test/FrontendC/2009-03-09-WeakDeclarations-1.c
|
test/FrontendC/2009-03-09-WeakDeclarations-1.c
|
// RUN: $llvmgcc $test -c -o /dev/null |& \
// RUN: egrep {(14|15|22): warning:} | \
// RUN: wc -l | grep --quiet 3
// TARGET: *-*-darwin
// XFAIL: alpha|ia64|sparc
// END.
// Insist upon warnings for inappropriate weak attributes.
// Note the line numbers (14|15|22) embedded in the check.
// O.K.
extern int ext_weak_import __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int decl_weak_import __attribute__ ((__weak_import__));
int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13;
// O.K.
extern int ext_f(void) __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int def_f(void) __attribute__ ((__weak_import__));
int __attribute__ ((__weak_import__)) decl_f(void) {return 0;};
|
// RUN: $llvmgcc $test -c -o /dev/null |& \
// RUN: egrep {(14|15|22): warning:} | \
// RUN: wc -l | grep --quiet 3
// XTARGET: darwin
// XFAIL: *
// END.
// Insist upon warnings for inappropriate weak attributes.
// Note the line numbers (14|15|22) embedded in the check.
// O.K.
extern int ext_weak_import __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int decl_weak_import __attribute__ ((__weak_import__));
int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13;
// O.K.
extern int ext_f(void) __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
int def_f(void) __attribute__ ((__weak_import__));
int __attribute__ ((__weak_import__)) decl_f(void) {return 0;};
|
Tweak the DejaGNU voodoo to match Bill's advice.
|
Tweak the DejaGNU voodoo to match Bill's advice.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@66547 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm
|
974eb1d090aece41e72c31772ea7266b1e31f6e7
|
test/Modules/Inputs/submodules/import-self-b.h
|
test/Modules/Inputs/submodules/import-self-b.h
|
@import import_self.c;
#include "import-self-d.h"
// FIXME: This should not work; names from 'a' should not be visible here.
MyTypeA import_self_test_a;
// FIXME: This should work but does not; names from 'b' are not actually visible here.
//MyTypeC import_self_test_c;
MyTypeD import_self_test_d;
|
// FIXME: This import has no effect, because the submodule isn't built yet, and
// we don't map an @import to a #include in this case.
@import import_self.c;
#include "import-self-d.h"
// FIXME: This should not work; names from 'a' should not be visible here.
MyTypeA import_self_test_a;
// FIXME: This should work but does not; names from 'c' are not actually visible here.
//MyTypeC import_self_test_c;
MyTypeD import_self_test_d;
|
Fix comment typo in test.
|
Fix comment typo in test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@200584 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
d9eb347432f247879ba10da2a64f810657a09c84
|
source/core/recommend-manager/RandGenerator.h
|
source/core/recommend-manager/RandGenerator.h
|
/**
* @file RandGenerator.h
* @brief generate random item ids
* @author Jun Jiang
* @date 2011-11-30
*/
#ifndef RAND_GENERATOR_H
#define RAND_GENERATOR_H
#include <util/ThreadModel.h>
#include <boost/random.hpp>
namespace sf1r
{
template<typename ValueType = int,
typename Distribution = boost::uniform_int<ValueType>,
typename Engine = boost::mt19937,
typename LockType = izenelib::util::ReadWriteLock>
class RandGenerator
{
public:
RandGenerator()
: generator_(Engine(), Distribution())
{}
void seed(int value)
{
ScopedWriteLock lock(lock_);
generator_.engine().seed(value);
}
ValueType generate(ValueType min, ValueType max)
{
ScopedWriteLock lock(lock_);
Distribution& dist = generator_.distribution();
if (dist.min() != min || dist.max() != max)
{
dist = Distribution(min, max);
}
return generator_();
}
private:
typedef boost::variate_generator<Engine, Distribution> Generator;
Generator generator_;
typedef izenelib::util::ScopedWriteLock<LockType> ScopedWriteLock;
LockType lock_;
};
} // namespace sf1r
#endif // RAND_GENERATOR_H
|
/**
* @file RandGenerator.h
* @brief generate random item ids
* @author Jun Jiang
* @date 2011-11-30
*/
#ifndef RAND_GENERATOR_H
#define RAND_GENERATOR_H
#include <util/ThreadModel.h>
#include <boost/random.hpp>
namespace sf1r
{
template<typename ValueType = int,
typename Distribution = boost::uniform_int<ValueType>,
typename Engine = boost::mt19937,
typename LockType = izenelib::util::ReadWriteLock>
class RandGenerator
{
public:
RandGenerator()
: generator_(Engine(), Distribution())
{}
void seed(unsigned int value)
{
ScopedWriteLock lock(lock_);
Engine& engine = generator_.engine();
engine.seed(value);
}
ValueType generate(ValueType min, ValueType max)
{
ScopedWriteLock lock(lock_);
Distribution& dist = generator_.distribution();
if (dist.min() != min || dist.max() != max)
{
dist = Distribution(min, max);
}
return generator_();
}
private:
typedef boost::variate_generator<Engine, Distribution> Generator;
Generator generator_;
typedef izenelib::util::ScopedWriteLock<LockType> ScopedWriteLock;
LockType lock_;
};
} // namespace sf1r
#endif // RAND_GENERATOR_H
|
Fix compile error under boost 1.38, caused by boost/random.hpp seed()
|
Fix compile error under boost 1.38, caused by boost/random.hpp seed()
|
C
|
apache-2.0
|
pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,izenecloud/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,pombredanne/sf1r-lite,izenecloud/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-ad-delivery
|
f5e8daa70a39edf01a823aaee724c3d930064a53
|
include/TaskBase.h
|
include/TaskBase.h
|
#ifndef _TPOOL_TASK_BASE_H_
#define _TPOOL_TASK_BASE_H_
#include <boost/shared_ptr.hpp>
namespace tpool {
class TaskBase {
public:
typedef boost::shared_ptr<TaskBase> Ptr;
~TaskBase() {}
virtual void Do() = 0;
};
}
#endif
|
#ifndef _TPOOL_TASK_BASE_H_
#define _TPOOL_TASK_BASE_H_
#include <boost/shared_ptr.hpp>
namespace tpool {
class TaskBase {
public:
typedef boost::shared_ptr<TaskBase> Ptr;
enum State {
INIT,
RUNNING,
FINISHED,
CANCELED,
};
~TaskBase() {}
virtual void Do() = 0;
virtual State GetState() const;
};
}
#endif
|
Add the state definitions for Task.
|
Add the state definitions for Task.
|
C
|
mit
|
airekans/Tpool,airekans/Tpool,airekans/Tpool
|
38b20649403f2cbffc4581211f1b61868e3b358f
|
include/features.h
|
include/features.h
|
#ifndef __FEATURES_H
#define __FEATURES_H
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almost ansi */
#if __STDC__ != 1
#define const
#define volatile
#endif
#else /* K&R */
#define __P(x) ()
#define __const
#define const
#define volatile
#endif
/* No C++ */
#define __BEGIN_DECLS
#define __END_DECLS
/* GNUish things */
#define __CONSTVALUE
#define __CONSTVALUE2
#define _POSIX_THREAD_SAFE_FUNCTIONS
#include <sys/cdefs.h>
#endif
|
#ifndef __FEATURES_H
#define __FEATURES_H
/* Major and minor version number of the uCLibc library package. Use
these macros to test for features in specific releases. */
#define __UCLIBC__ 0
#define __UCLIBC_MAJOR__ 9
#define __UCLIBC_MINOR__ 1
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almost ansi */
#if __STDC__ != 1
#define const
#define volatile
#endif
#else /* K&R */
#define __P(x) ()
#define __const
#define const
#define volatile
#endif
/* No C++ */
#define __BEGIN_DECLS
#define __END_DECLS
/* GNUish things */
#define __CONSTVALUE
#define __CONSTVALUE2
#define _POSIX_THREAD_SAFE_FUNCTIONS
#include <sys/cdefs.h>
#endif
|
Add in a version number so apps can tell uclib is being used. -Erik
|
Add in a version number so apps can tell uclib is being used.
-Erik
|
C
|
lgpl-2.1
|
wbx-github/uclibc-ng,atgreen/uClibc-moxie,ysat0/uClibc,skristiansson/uClibc-or1k,skristiansson/uClibc-or1k,wbx-github/uclibc-ng,klee/klee-uclibc,atgreen/uClibc-moxie,hjl-tools/uClibc,kraj/uClibc,ffainelli/uClibc,groundwater/uClibc,m-labs/uclibc-lm32,groundwater/uClibc,majek/uclibc-vx32,groundwater/uClibc,foss-xtensa/uClibc,ysat0/uClibc,klee/klee-uclibc,ffainelli/uClibc,m-labs/uclibc-lm32,OpenInkpot-archive/iplinux-uclibc,hjl-tools/uClibc,kraj/uClibc,ChickenRunjyd/klee-uclibc,skristiansson/uClibc-or1k,mephi42/uClibc,groundwater/uClibc,foss-xtensa/uClibc,groundwater/uClibc,hjl-tools/uClibc,ddcc/klee-uclibc-0.9.33.2,brgl/uclibc-ng,waweber/uclibc-clang,kraj/uClibc,klee/klee-uclibc,hwoarang/uClibc,hwoarang/uClibc,ddcc/klee-uclibc-0.9.33.2,klee/klee-uclibc,OpenInkpot-archive/iplinux-uclibc,waweber/uclibc-clang,m-labs/uclibc-lm32,czankel/xtensa-uclibc,kraj/uclibc-ng,brgl/uclibc-ng,majek/uclibc-vx32,mephi42/uClibc,hjl-tools/uClibc,kraj/uclibc-ng,m-labs/uclibc-lm32,ChickenRunjyd/klee-uclibc,kraj/uclibc-ng,atgreen/uClibc-moxie,czankel/xtensa-uclibc,ndmsystems/uClibc,gittup/uClibc,gittup/uClibc,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,czankel/xtensa-uclibc,hjl-tools/uClibc,ffainelli/uClibc,wbx-github/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,wbx-github/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,skristiansson/uClibc-or1k,foss-for-synopsys-dwc-arc-processors/uClibc,ndmsystems/uClibc,OpenInkpot-archive/iplinux-uclibc,ysat0/uClibc,czankel/xtensa-uclibc,gittup/uClibc,ChickenRunjyd/klee-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,gittup/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,atgreen/uClibc-moxie,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,ndmsystems/uClibc,hwoarang/uClibc,ndmsystems/uClibc,kraj/uclibc-ng,brgl/uclibc-ng,ysat0/uClibc,mephi42/uClibc,majek/uclibc-vx32,foss-xtensa/uClibc,majek/uclibc-vx32,mephi42/uClibc,hwoarang/uClibc,ChickenRunjyd/klee-uclibc,kraj/uClibc,waweber/uclibc-clang,ffainelli/uClibc,waweber/uclibc-clang
|
c35746580036ca9b6fc9ec172634dfab12237abb
|
include/odp_sync.h
|
include/odp_sync.h
|
/* Copyright (c) 2013, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP synchronisation
*/
#ifndef ODP_SYNC_H_
#define ODP_SYNC_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* Synchronise stores
*
* Ensures that all CPU store operations that precede the odp_sync_stores()
* call are globally visible before any store operation that follows it.
*/
static inline void odp_sync_stores(void)
{
#if defined __x86_64__ || defined __i386__
__asm__ __volatile__ ("sfence\n" : : : "memory");
#elif defined __arm__
__asm__ __volatile__ ("dmb st" : : : "memory");
#elif defined __OCTEON__
__asm__ __volatile__ ("syncws\n" : : : "memory");
#else
__sync_synchronize();
#endif
}
#ifdef __cplusplus
}
#endif
#endif
|
/* Copyright (c) 2013, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP synchronisation
*/
#ifndef ODP_SYNC_H_
#define ODP_SYNC_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* Synchronise stores
*
* Ensures that all CPU store operations that precede the odp_sync_stores()
* call are globally visible before any store operation that follows it.
*/
static inline void odp_sync_stores(void)
{
#if defined __x86_64__ || defined __i386__
__asm__ __volatile__ ("sfence\n" : : : "memory");
#elif defined __arm__ || defined __aarch64__
__asm__ __volatile__ ("dmb st" : : : "memory");
#elif defined __OCTEON__
__asm__ __volatile__ ("syncws\n" : : : "memory");
#else
__sync_synchronize();
#endif
}
#ifdef __cplusplus
}
#endif
#endif
|
Add write memory barrier for aarch64
|
Add write memory barrier for aarch64
This patch updates odp_sync_stores routine to add write memory barrier for
aarch64.
Signed-off-by: Ankit Jindal <0920ec6e02c95b572519373847b995b0763a0743@linaro.org>
Signed-off-by: Tushar Jagad <3604ae1aed16529df1f2280ecebda0599cb1687d@linaro.org>
Reviewed-by: Anders Roxell <b4e8e89057bc64bc4f9625a4a821c9ac177a7ed2@linaro.org>
|
C
|
bsd-3-clause
|
ravineet-singh/odp,kalray/odp-mppa,dkrot/odp,mike-holmes-linaro/odp,nmorey/odp,rsalveti/odp,dkrot/odp,kalray/odp-mppa,erachmi/odp,erachmi/odp,rsalveti/odp,kalray/odp-mppa,dkrot/odp,mike-holmes-linaro/odp,kalray/odp-mppa,ravineet-singh/odp,kalray/odp-mppa,nmorey/odp,mike-holmes-linaro/odp,rsalveti/odp,rsalveti/odp,ravineet-singh/odp,erachmi/odp,ravineet-singh/odp,erachmi/odp,nmorey/odp,rsalveti/odp,kalray/odp-mppa,dkrot/odp,kalray/odp-mppa,nmorey/odp,mike-holmes-linaro/odp
|
fb0da0b3b4ece34207375ecddd022f2e2d5b7c52
|
include/libk/kputs.h
|
include/libk/kputs.h
|
#ifndef KPUTS_H
#define KPUTS_H
#include "drivers/terminal.h"
void kputs(char* string);
void kprint_int(char* string, int i);
#endif
|
#ifndef KPUTS_H
#define KPUTS_H
#include <stdarg.h>
#include "drivers/terminal.h"
void kputs(char* string);
void kprintf(char* string, ...);
#endif
|
Update headers to match new printf
|
Update headers to match new printf
|
C
|
mit
|
Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,Herbstein/kernel-of-truth,Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
|
afd6a6dcac92c604ff97892e3c95f845dd479bc5
|
includes/grid_cell.h
|
includes/grid_cell.h
|
#ifndef GRIDCELL_H
#define GRIDCELL_H
#include <gsl/gsl_rng.h>
/*
DATA STRUCTURES
*/
#define GC_NUM_STATES 4
typedef enum { DECIDUOUS,CONIFEROUS,TRANSITIONAL,MIXED} State;
typedef double StateData [GC_NUM_STATES];
typedef enum { MOORE, VONNE} NeighType;
extern State GC_POSSIBLE_STATES [GC_NUM_STATES]; // this is an array giving all possible states
typedef struct {
double meanTemp;
/*Task: list all variables need to be used*/
// Fill later
} Climate;
typedef struct {
State* currentState;
State* stateHistory;
Climate climate;
StateData prevalence;
StateData transitionProbs;
size_t historySize;
} GridCell;
/*.
FUNCTION PROTOTYPES
*/
GridCell* gc_make_cell (size_t numTimeSteps); // allocate memory and null initialize cell, initialize pointers
void gc_get_trans_prob (GridCell* cell);
void gc_select_new_state (GridCell* cell, gsl_rng* rng);
void gc_destroy_cell(GridCell *cell);
#endif
|
#ifndef GRIDCELL_H
#define GRIDCELL_H
#include <gsl/gsl_rng.h>
/*
DATA STRUCTURES
*/
#define GC_NUM_STATES 4
typedef enum { DECIDUOUS,CONIFEROUS,TRANSITIONAL,MIXED} State;
typedef double StateData [GC_NUM_STATES];
typedef enum { MOORE, VONNE} NeighType;
typedef struct {
double meanTemp;
/*Task: list all variables need to be used*/
// Fill later
} Climate;
typedef struct {
State* currentState;
State* stateHistory;
Climate climate;
StateData prevalence;
StateData transitionProbs;
size_t historySize;
} GridCell;
/*.
FUNCTION PROTOTYPES
*/
GridCell* gc_make_cell (size_t numTimeSteps); // allocate memory and null initialize cell, initialize pointers
void gc_get_trans_prob (GridCell* cell);
void gc_select_new_state (GridCell* cell, gsl_rng* rng);
void gc_destroy_cell(GridCell *cell);
#endif
|
Delete unused extern variable declared
|
Delete unused extern variable declared
|
C
|
mit
|
QUICC-FOR/STModel-Simulation,QUICC-FOR/STModel-Simulation
|
cac419e1c61a882875bcf0ea494ead7b476998ce
|
src/qt/guiconstants.h
|
src/qt/guiconstants.h
|
#ifndef GUICONSTANTS_H
#define GUICONSTANTS_H
/* Milliseconds between model updates */
static const int MODEL_UPDATE_DELAY = 500;
/* AskPassphraseDialog -- Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024;
/* CubitsGUI -- Size of icons in status bar */
static const int STATUSBAR_ICONSIZE = 16;
/* Invalid field background style */
#define STYLE_INVALID "background:#FF8080"
/* Transaction list -- unconfirmed transaction */
#define COLOR_UNCONFIRMED QColor(128, 128, 128)
/* Transaction list -- negative amount */
#define COLOR_NEGATIVE QColor(255, 0, 0)
/* Transaction list -- bare address (without label) */
#define COLOR_BAREADDRESS QColor(140, 140, 140)
/* Tooltips longer than this (in characters) are converted into rich text,
so that they can be word-wrapped.
*/
static const int TOOLTIP_WRAP_THRESHOLD = 80;
/* Maximum allowed URI length */
static const int MAX_URI_LENGTH = 255;
/* QRCodeDialog -- size of exported QR Code image */
#define EXPORT_IMAGE_SIZE 256
#endif // GUICONSTANTS_H
|
#ifndef GUICONSTANTS_H
#define GUICONSTANTS_H
/* Milliseconds between model updates */
static const int MODEL_UPDATE_DELAY = 5000;
/* AskPassphraseDialog -- Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024;
/* CubitsGUI -- Size of icons in status bar */
static const int STATUSBAR_ICONSIZE = 16;
/* Invalid field background style */
#define STYLE_INVALID "background:#FF8080"
/* Transaction list -- unconfirmed transaction */
#define COLOR_UNCONFIRMED QColor(128, 128, 128)
/* Transaction list -- negative amount */
#define COLOR_NEGATIVE QColor(255, 0, 0)
/* Transaction list -- bare address (without label) */
#define COLOR_BAREADDRESS QColor(140, 140, 140)
/* Tooltips longer than this (in characters) are converted into rich text,
so that they can be word-wrapped.
*/
static const int TOOLTIP_WRAP_THRESHOLD = 80;
/* Maximum allowed URI length */
static const int MAX_URI_LENGTH = 255;
/* QRCodeDialog -- size of exported QR Code image */
#define EXPORT_IMAGE_SIZE 256
#endif // GUICONSTANTS_H
|
Set more rare GUI update
|
Set more rare GUI update
|
C
|
mit
|
scificrypto/CubitsV3,scificrypto/CubitsV3,scificrypto/CubitsV3,scificrypto/CubitsV3
|
bff8460f062b896473f4ef4d0baf5ad1c35c40e5
|
include/teraranger_hub/serial_port.h
|
include/teraranger_hub/serial_port.h
|
#ifndef TR_HUB_SERIAL_PORT_H
#define TR_HUB_SERIAL_PORT_H
#include <stdio.h> // Standard input/output definitions
#include <string.h> // String function definitions
#include <unistd.h> // UNIX standard function definitions
#include <fcntl.h> // File control definitions
#include <errno.h> // Error number definitions
#include <termios.h> // POSIX terminal control definitions
#include <sys/ioctl.h>
#include <boost/thread.hpp>
#include <boost/function.hpp>
#include <string>
namespace tr_hub_parser
{
class SerialPort
{
public:
SerialPort();
virtual ~SerialPort();
bool connect(const std::string port);
void disconnect();
bool sendChar(const char c[]);
void setSerialCallbackFunction(boost::function<void(uint8_t)> *f);
void serialThread();
int serial_port_fd_;
boost::thread serial_thread_;
bool serial_thread_should_exit_;
boost::function<void(uint8_t)> * serial_callback_function;
};
} // namespace tr_hub_parser
#endif // TR_HUB_SERIAL_PORT_H
|
#ifndef TERARANGER_HUB_SERIAL_PORT_H
#define TERARANGER_HUB_SERIAL_PORT_H
#include <stdio.h> // Standard input/output definitions
#include <string.h> // String function definitions
#include <unistd.h> // UNIX standard function definitions
#include <fcntl.h> // File control definitions
#include <errno.h> // Error number definitions
#include <termios.h> // POSIX terminal control definitions
#include <sys/ioctl.h>
#include <boost/thread.hpp>
#include <boost/function.hpp>
#include <string>
namespace tr_hub_parser
{
class SerialPort
{
public:
SerialPort();
virtual ~SerialPort();
bool connect(const std::string port);
void disconnect();
bool sendChar(const char c[]);
void setSerialCallbackFunction(boost::function<void(uint8_t)> *f);
void serialThread();
int serial_port_fd_;
boost::thread serial_thread_;
bool serial_thread_should_exit_;
boost::function<void(uint8_t)> * serial_callback_function;
};
} // namespace tr_hub_parser
#endif // TERARANGER_HUB_SERIAL_PORT_H
|
Fix ifdef for serial port header file
|
Fix ifdef for serial port header file
|
C
|
mit
|
Terabee/teraranger_array,Terabee/teraranger_array
|
f9167849b8c24cd4689aedd6c9a1c43719091d8f
|
tests/sv-comp/observer/path_nofun_true-unreach-call.c
|
tests/sv-comp/observer/path_nofun_true-unreach-call.c
|
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
extern int __VERIFIER_nondet_int();
void __VERIFIER_assert(int cond) {
if (!(cond)) {
ERROR: __VERIFIER_error();
}
return;
}
int main()
{
int x, y;
if (__VERIFIER_nondet_int())
{
x = 0;
y = 1;
}
else
{
x = 1;
y = 0;
}
// if (!(x + y == 1))
if (x + y != 1)
__VERIFIER_error();
return 0;
}
|
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
extern int __VERIFIER_nondet_int();
int main()
{
int x, y;
if (__VERIFIER_nondet_int())
{
x = 0;
y = 1;
}
else
{
x = 1;
y = 0;
}
// if (!(x + y == 1))
if (x + y != 1)
__VERIFIER_error();
return 0;
}
|
Remove unused __VERIFIER_assert definition from nofun test
|
Remove unused __VERIFIER_assert definition from nofun test
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
c34ed4e5cb60bfbb707118f69f3bb9fea48ce890
|
src/qtyaml_global.h
|
src/qtyaml_global.h
|
#ifndef QTYAML_GLOBAL_H
#define QTYAML_GLOBAL_H
#include <QtCore/QtGlobal>
#if defined(QTYAML_LIBRARY)
# define QTYAMLSHARED_EXPORT Q_DECL_EXPORT
#else
# define QTYAMLSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // QTYAML_GLOBAL_H
|
#ifndef QTYAML_GLOBAL_H
#define QTYAML_GLOBAL_H
#include <QtCore/QtGlobal>
#ifdef YAML_DECLARE_STATIC
# define QTYAMLSHARED_EXPORT
#else
# ifdef QTYAML_LIBRARY
# define QTYAMLSHARED_EXPORT Q_DECL_EXPORT
# else
# define QTYAMLSHARED_EXPORT Q_DECL_IMPORT
# endif
#endif
#endif // QTYAML_GLOBAL_H
|
Add support for static lib
|
Add support for static lib
|
C
|
mit
|
uranusjr/qtyaml,uranusjr/qtyaml
|
ccac208ec5892857a5847a12b098d2358e023f7c
|
lib/common/htmllex.h
|
lib/common/htmllex.h
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HTMLLEX_H
#define HTMLLEX_H
#include <agxbuf.h>
extern int initHTMLlexer(char *, agxbuf *);
extern int htmllex(void);
extern int htmllineno(void);
extern int clearHTMLlexer(void);
void htmlerror(const char *);
#endif
#ifdef __cplusplus
}
#endif
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HTMLLEX_H
#define HTMLLEX_H
#include <agxbuf.h>
extern int initHTMLlexer(char *, agxbuf *, int);
extern int htmllex(void);
extern int htmllineno(void);
extern int clearHTMLlexer(void);
void htmlerror(const char *);
#endif
#ifdef __cplusplus
}
#endif
|
Add support for charset attribute and Latin1 encoding.
|
Add support for charset attribute and Latin1 encoding.
|
C
|
epl-1.0
|
kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,jho1965us/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,ellson/graphviz,jho1965us/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,ellson/graphviz,ellson/graphviz,BMJHayward/graphviz,kbrock/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,tkelman/graphviz,tkelman/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,pixelglow/graphviz,tkelman/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,tkelman/graphviz,pixelglow/graphviz
|
03888f30421578b58039eec720ed31061f9d0205
|
libyaul/scu/bus/cpu/cpu_slave.c
|
libyaul/scu/bus/cpu/cpu_slave.c
|
/*
* Copyright (c) 2012-2016
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com
*/
#include <sys/cdefs.h>
#include <smpc/smc.h>
#include <cpu/instructions.h>
#include <cpu/frt.h>
#include <cpu/intc.h>
#include <cpu/map.h>
#include <cpu/slave.h>
static void _slave_entry(void);
static void _default_entry(void);
static void (*_entry)(void) = _default_entry;
void
cpu_slave_init(void)
{
smpc_smc_sshoff_call();
cpu_slave_entry_clear();
cpu_intc_ihr_set(INTC_INTERRUPT_SLAVE_ENTRY, _slave_entry);
smpc_smc_sshon_call();
}
void
cpu_slave_entry_set(void (*entry)(void))
{
_entry = (entry != NULL) ? entry : _default_entry;
}
static void
_slave_entry(void)
{
while (true) {
while (((cpu_frt_status_get()) & FRTCS_ICF) == 0x00);
cpu_frt_control_chg((uint8_t)~FRTCS_ICF);
_entry();
}
}
static void
_default_entry(void)
{
}
|
/*
* Copyright (c) 2012-2016
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com
*/
#include <sys/cdefs.h>
#include <smpc/smc.h>
#include <cpu/instructions.h>
#include <cpu/frt.h>
#include <cpu/intc.h>
#include <cpu/map.h>
#include <cpu/slave.h>
static void _slave_entry(void);
static void _default_entry(void);
static void (*_entry)(void) = _default_entry;
void
cpu_slave_init(void)
{
smpc_smc_sshoff_call();
cpu_slave_entry_clear();
cpu_intc_ihr_set(INTC_INTERRUPT_SLAVE_ENTRY, _slave_entry);
smpc_smc_sshon_call();
}
void
cpu_slave_entry_set(void (*entry)(void))
{
_entry = (entry != NULL) ? entry : _default_entry;
}
static void __noreturn
_slave_entry(void)
{
while (true) {
while (((cpu_frt_status_get()) & FRTCS_ICF) == 0x00);
cpu_frt_control_chg((uint8_t)~FRTCS_ICF);
_entry();
}
}
static void
_default_entry(void)
{
}
|
Mark _slave_entry to never return
|
Mark _slave_entry to never return
|
C
|
mit
|
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
|
f24d87c7337579bf4234af5bf89b1f9b17363afc
|
test/CFrontend/2007-04-17-ZeroSizeBitFields.c
|
test/CFrontend/2007-04-17-ZeroSizeBitFields.c
|
; PR 1332
; RUN: %llvmgcc %s -S -o /dev/null
struct Z { int a:1; int :0; int c:1; } z;
|
// PR 1332
// RUN: %llvmgcc %s -S -o /dev/null
struct Z { int a:1; int :0; int c:1; } z;
|
Use // not ; since this is C.
|
Use // not ; since this is C.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@36219 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm
|
1e7780610468211cceb4483beea45aa7c850834e
|
chrome/browser/ui/views/toolbar/wrench_menu_observer.h
|
chrome/browser/ui/views/toolbar/wrench_menu_observer.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 CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_MENU_OBSERVER_H_
#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_MENU_OBSERVER_H_
// TODO(gbillock): Make this an inner class of WrenchMenu. (even needed?)
class WrenchMenuObserver {
public:
// Invoked when the WrenchMenu is about to be destroyed (from its destructor).
virtual void WrenchMenuDestroyed() = 0;
protected:
virtual ~WrenchMenuObserver() {}
};
#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_MENU_OBSERVER_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 CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_MENU_OBSERVER_H_
#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_MENU_OBSERVER_H_
class WrenchMenuObserver {
public:
// Invoked when the WrenchMenu is about to be destroyed (from its destructor).
virtual void WrenchMenuDestroyed() = 0;
protected:
virtual ~WrenchMenuObserver() {}
};
#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_WRENCH_MENU_OBSERVER_H_
|
Remove TODO about making WrenchMenuObserver an inner class of WrenchMenu.
|
Remove TODO about making WrenchMenuObserver an inner class of WrenchMenu.
Chromium code style says:
"Prefer putting delegate classes in their own header files. Implementors
of the
delegate interface will often be included elsewhere, which will often
cause more
coupling with the header of the main class."
http://www.chromium.org/developers/coding-style - Code formatting
section
BUG=None
R=sky@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/118623003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@244848 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,jaruba/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,patrickm/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,axinging/chromium-crosswalk,Just-D/chromium-1,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,anirudhSK/chromium,Just-D/chromium-1,Jonekee/chromium.src,markYoungH/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,dushu1203/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,anirudhSK/chromium,ondra-novak/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,Just-D/chromium-1,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,jaruba/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium
|
02a90edb5163e2f6cc07573812b10a0c35ac9e1a
|
lib/node_modules/@stdlib/strided/common/include/stdlib/strided_typedefs.h
|
lib/node_modules/@stdlib/strided/common/include/stdlib/strided_typedefs.h
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Header file containing strided array type definitions.
*/
#ifndef STDLIB_STRIDED_TYPEDEFS_H
#define STDLIB_STRIDED_TYPEDEFS_H
#include "strided_nullary_typedefs.h"
#include "strided_unary_typedefs.h"
#include "strided_binary_typedefs.h"
#include "strided_ternary_typedefs.h"
#include "strided_quaternary_typedefs.h"
#include "strided_quinary_typedefs.h"
#endif // !STDLIB_STRIDED_TYPEDEFS_H
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Header file containing strided array type definitions.
*/
#ifndef STDLIB_STRIDED_TYPEDEFS_H
#define STDLIB_STRIDED_TYPEDEFS_H
// Note: keep in alphabetical order...
#include "strided_binary_typedefs.h"
#include "strided_nullary_typedefs.h"
#include "strided_quaternary_typedefs.h"
#include "strided_quinary_typedefs.h"
#include "strided_ternary_typedefs.h"
#include "strided_unary_typedefs.h"
#endif // !STDLIB_STRIDED_TYPEDEFS_H
|
Sort includes in alphabetical order
|
Sort includes in alphabetical order
|
C
|
apache-2.0
|
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
|
4373f87d58c5761ff0a9199741f0d8de4aa2b7a3
|
Chapter1/temperatures.c
|
Chapter1/temperatures.c
|
#include <stdio.h>
/* print Fahrenheit-Celsius table
for fahr = 0, 20, ..., 300
*/
int main(void)
{
float fahr, celsius;
int lower, upper, step;
lower = 0; // lower limit of temperature table
upper = 300; // upper limit
step = 20; // step size
printf("Fahrenheit-Celsius Table\n\n");
fahr = lower;
while (fahr <= upper) {
celsius = (5.0/9.0) * (fahr-32.0);
printf("%3.0f %6.1f\n", fahr, celsius);
fahr = fahr + step;
}
}
|
#include <stdio.h>
/* print Fahrenheit-Celsius table
for fahr = 0, 20, ..., 300
*/
// int main(void)
// {
// float fahr, celsius;
// int lower, upper, step;
// lower = 0; // lower limit of temperature table
// upper = 300; // upper limit
// step = 20; // step size
// printf("Fahrenheit-Celsius Table\n\n");
// fahr = lower;
// while (fahr <= upper) {
// celsius = (5.0/9.0) * (fahr-32.0);
// printf("%3.0f %6.1f\n", fahr, celsius);
// fahr = fahr + step;
// }
// }
int main(void)
{
for(int fahr = 0; fahr <= 300; fahr = fahr + 20)
{
printf("%3d %6.1f\n", fahr, (5.0/9.0) * (fahr-32));
}
}
|
Implement temperature program with a for loop
|
Implement temperature program with a for loop
|
C
|
mit
|
Kunal57/C_Problems,Kunal57/C_Problems
|
a1ec514adc224359043f267df88bf3dc07acb6b3
|
lcm-lua/init.c
|
lcm-lua/init.c
|
#ifdef __cplusplus
extern "C" {
#endif
#include "lua.h"
#ifdef __cplusplus
}
#endif
#include "lualcm_lcm.h"
#include "lualcm_hash.h"
#include "lualcm_pack.h"
int luaopen_lcm_lcm(lua_State* L) {
ll_lcm_makemetatable(L);
ll_lcm_register_new(L);
return 1;
}
int luaopen_lcm__hash(lua_State* L) {
ll_hash_makemetatable(L);
ll_hash_register_new(L);
return 1;
}
int luaopen_lcm__pack(lua_State* L) {
ll_pack_register(L);
return 1;
}
int luaopen_lcm(lua_State* L) {
lua_newtable(L);
lua_pushstring(L, "lcm");
luaopen_lcm_lcm(L);
lua_rawset(L, -3);
lua_pushstring(L, "_hash");
luaopen_lcm__hash(L);
lua_rawset(L, -3);
lua_pushstring(L, "_pack");
luaopen_lcm__pack(L);
lua_rawset(L, -3);
return 1;
}
|
#ifdef __cplusplus
extern "C" {
#endif
#include "lua.h"
#ifdef __cplusplus
}
#endif
#include "lualcm_lcm.h"
#include "lualcm_hash.h"
#include "lualcm_pack.h"
int luaopen_lcm_lcm(lua_State* L) {
ll_lcm_makemetatable(L);
ll_lcm_register_new(L);
return 1;
}
int luaopen_lcm__hash(lua_State* L) {
ll_hash_makemetatable(L);
ll_hash_register_new(L);
return 1;
}
int luaopen_lcm__pack(lua_State* L) {
ll_pack_register(L);
return 1;
}
#if defined(_WIN32)
__declspec(dllexport)
#elif __GNUC__ >= 4 || defined(__clang__)
__attribute__((visibility ("default")))
#endif
int luaopen_lcm(lua_State* L) {
lua_newtable(L);
lua_pushstring(L, "lcm");
luaopen_lcm_lcm(L);
lua_rawset(L, -3);
lua_pushstring(L, "_hash");
luaopen_lcm__hash(L);
lua_rawset(L, -3);
lua_pushstring(L, "_pack");
luaopen_lcm__pack(L);
lua_rawset(L, -3);
return 1;
}
|
Fix export decoration of Lua module
|
Fix export decoration of Lua module
Add missing export decoration for Lua module entry point. This fixes the
Lua module that stopped working when ELF hidden visibility was enabled.
(I'm not sure about Windows, as I don't have Lua on Windows, but I
suspect it never worked on Windows.)
|
C
|
lgpl-2.1
|
lcm-proj/lcm,adeschamps/lcm,adeschamps/lcm,bluesquall/lcm,lcm-proj/lcm,adeschamps/lcm,bluesquall/lcm,lcm-proj/lcm,adeschamps/lcm,adeschamps/lcm,lcm-proj/lcm,bluesquall/lcm,adeschamps/lcm,lcm-proj/lcm,adeschamps/lcm,lcm-proj/lcm,lcm-proj/lcm,bluesquall/lcm,adeschamps/lcm,bluesquall/lcm,lcm-proj/lcm,bluesquall/lcm,bluesquall/lcm
|
a34e8ff7a88128234c647074f588ea87435a9fd9
|
PhotoWheel/SendEmailController.h
|
PhotoWheel/SendEmailController.h
|
//
// SendEmailController.h
// PhotoWheel
//
// Created by Kirby Turner on 12/11/12.
// Copyright (c) 2012 White Peak Software Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>
@protocol SendEmailControllerDelegate;
@interface SendEmailController : NSObject <MFMailComposeViewControllerDelegate>
@property (nonatomic, strong) UIViewController<SendEmailControllerDelegate> *viewController;
@property (nonatomic, strong) NSSet *photos;
- (id)initWithViewController:(UIViewController<SendEmailControllerDelegate> *)viewController;
- (void)sendEmail;
+ (BOOL)canSendMail;
@end
@protocol SendEmailControllerDelegate <NSObject>
@required
- (void)sendEmailControllerDidFinish:(SendEmailController *)controller;
@end
|
//
// SendEmailController.h
// PhotoWheel
//
// Created by Kirby Turner on 12/11/12.
// Copyright (c) 2012 White Peak Software Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>
@protocol SendEmailControllerDelegate;
@interface SendEmailController : NSObject <MFMailComposeViewControllerDelegate>
@property (nonatomic, weak) UIViewController<SendEmailControllerDelegate> *viewController;
@property (nonatomic, strong) NSSet *photos;
- (id)initWithViewController:(UIViewController<SendEmailControllerDelegate> *)viewController;
- (void)sendEmail;
+ (BOOL)canSendMail;
@end
@protocol SendEmailControllerDelegate <NSObject>
@required
- (void)sendEmailControllerDidFinish:(SendEmailController *)controller;
@end
|
Change from strong to weak.
|
Change from strong to weak.
|
C
|
mit
|
kirbyt/PhotoWheel,kirbyt/PhotoWheel
|
48690020234cdbfc29eeff7c466540cdb81ac4ea
|
SRC/GEP/TestData.h
|
SRC/GEP/TestData.h
|
#ifndef TESTDATA_H
#define TESTDATA_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include "Node.h"
#include <vector>
namespace GEP
{
////////////////////////////////////////////////////////////
/// \brief TestData is data to test expression and calculate fitness.
///
////////////////////////////////////////////////////////////
struct TestData
{
std::vector<float> variable;
int result;
};
float CalculFitnessFrom(TestData & testData,PtrNode root);
} // namespace GEP
#endif // TESTDATA_H
|
#ifndef TESTDATA_H
#define TESTDATA_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include "Node.h"
#include <vector>
namespace GEP
{
////////////////////////////////////////////////////////////
/// \brief TestData is data to test expression and calculate fitness.
///
////////////////////////////////////////////////////////////
struct TestData
{
std::vector<float> variable;
float result;
};
float CalculFitnessFrom(TestData & testData,PtrNode root);
} // namespace GEP
#endif // TESTDATA_H
|
Correct bug : result is float, not integer
|
Correct bug : result is float, not integer
|
C
|
mit
|
Orwel/GeneExpressionProgramming,Orwel/GeneExpressionProgramming
|
772e45ac76879b551a219c3d13c72cb2fcdd030a
|
Pod/Classes/Clappr.h
|
Pod/Classes/Clappr.h
|
#ifndef Pods_Clappr_h
#define Pods_Clappr_h
#import <Foundation/Foundation.h>
#import <Clappr/Player.h>
#import <Clappr/CLPBaseObject.h>
#import <Clappr/CLPUIObject.h>
#import <Clappr/CLPContainer.h>
#import <Clappr/CLPPlayback.h>
#import <Clappr/CLPMediaControl.h>
#import <Clappr/CLPCore.h>
#import <Clappr/CLPPlayer.h>
#import <Clappr/CLPScrubberView.h>
#endif
|
#ifndef Pods_Clappr_h
#define Pods_Clappr_h
// System
#import <Foundation/Foundation.h>
//TODO To be excluded
#import <Clappr/Player.h>
// Core
#import <Clappr/CLPBaseObject.h>
#import <Clappr/CLPUIObject.h>
#import <Clappr/CLPContainer.h>
#import <Clappr/CLPPlayback.h>
#import <Clappr/CLPMediaControl.h>
#import <Clappr/CLPCore.h>
#import <Clappr/CLPPlayer.h>
// Components
#import <Clappr/CLPLoader.h>
// Plugins
#import <Clappr/CLPAVFoundationPlayback.h>
// Views
#import <Clappr/CLPScrubberView.h>
#endif
|
Add Loader and AVFoundation playback to clappr base header.
|
Add Loader and AVFoundation playback to clappr base header.
|
C
|
bsd-3-clause
|
barbosa/clappr-ios,barbosa/clappr-ios,clappr/clappr-ios,clappr/clappr-ios,clappr/clappr-ios
|
08dc34df72898761e2da9c3ccdf6a7592eb8c7bf
|
src/exercise210.c
|
src/exercise210.c
|
/*
* A solution to Exercise 2-3 in The C Programming Language (Second Edition).
*
* This file was written by Damien Dart, <damiendart@pobox.com>. This is free
* and unencumbered software released into the public domain. For more
* information, please refer to the accompanying "UNLICENCE" file.
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int16_t lower(int16_t);
int main(void)
{
int16_t character;
while((character = getchar()) != EOF) {
putchar(lower(character));
}
return EXIT_SUCCESS;
}
int16_t lower(int16_t character)
{
return (character >= 'A' && character <= 'Z') ? character + 'a' - 'A' : character;
}
|
/*
* A solution to Exercise 2-10 in The C Programming Language (Second Edition).
*
* This file was written by Damien Dart, <damiendart@pobox.com>. This is free
* and unencumbered software released into the public domain. For more
* information, please refer to the accompanying "UNLICENCE" file.
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int16_t lower(int16_t);
int main(void)
{
int16_t character;
while((character = getchar()) != EOF) {
putchar(lower(character));
}
return EXIT_SUCCESS;
}
int16_t lower(int16_t character)
{
return (character >= 'A' && character <= 'Z') ? character + 'a' - 'A' : character;
}
|
Purge tabs and fix a comment.
|
Purge tabs and fix a comment.
|
C
|
unlicense
|
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
|
62e18306de090b7bd20f6aa561be1f47406a2414
|
qrenderdoc/Code/RenderManager.h
|
qrenderdoc/Code/RenderManager.h
|
#ifndef RENDERMANAGER_H
#define RENDERMANAGER_H
#include <QMutex>
#include <QQueue>
#include <QString>
#include <QThread>
#include <QWaitCondition>
#include <functional>
#include "renderdoc_replay.h"
struct IReplayRenderer;
class LambdaThread;
class RenderManager
{
public:
typedef std::function<void(IReplayRenderer *)> InvokeMethod;
RenderManager();
~RenderManager();
void Init(int proxyRenderer, QString replayHost, QString logfile, float *progress);
bool IsRunning();
ReplayCreateStatus GetCreateStatus() { return m_CreateStatus; }
void AsyncInvoke(InvokeMethod m);
void BlockInvoke(InvokeMethod m);
void CloseThread();
private:
struct InvokeHandle
{
InvokeHandle(InvokeMethod m)
{
method = m;
processed = false;
selfdelete = true;
}
InvokeMethod method;
bool processed;
bool selfdelete;
};
void run();
QMutex m_RenderLock;
QQueue<InvokeHandle *> m_RenderQueue;
QWaitCondition m_RenderCondition;
void PushInvoke(InvokeHandle *cmd);
int m_ProxyRenderer;
QString m_ReplayHost;
QString m_Logfile;
float *m_Progress;
volatile bool m_Running;
LambdaThread *m_Thread;
ReplayCreateStatus m_CreateStatus;
};
#endif // RENDERMANAGER_H
|
#ifndef RENDERMANAGER_H
#define RENDERMANAGER_H
#include <QMutex>
#include <QQueue>
#include <QString>
#include <QThread>
#include <QWaitCondition>
#include <functional>
#include "renderdoc_replay.h"
struct IReplayRenderer;
class LambdaThread;
// simple helper for the common case of 'we just need to run this on the render thread
#define INVOKE_MEMFN(function) \
m_Core->Renderer()->AsyncInvoke([this](IReplayRenderer *) { function(); });
class RenderManager
{
public:
typedef std::function<void(IReplayRenderer *)> InvokeMethod;
RenderManager();
~RenderManager();
void Init(int proxyRenderer, QString replayHost, QString logfile, float *progress);
bool IsRunning();
ReplayCreateStatus GetCreateStatus() { return m_CreateStatus; }
void AsyncInvoke(InvokeMethod m);
void BlockInvoke(InvokeMethod m);
void CloseThread();
private:
struct InvokeHandle
{
InvokeHandle(InvokeMethod m)
{
method = m;
processed = false;
selfdelete = true;
}
InvokeMethod method;
bool processed;
bool selfdelete;
};
void run();
QMutex m_RenderLock;
QQueue<InvokeHandle *> m_RenderQueue;
QWaitCondition m_RenderCondition;
void PushInvoke(InvokeHandle *cmd);
int m_ProxyRenderer;
QString m_ReplayHost;
QString m_Logfile;
float *m_Progress;
volatile bool m_Running;
LambdaThread *m_Thread;
ReplayCreateStatus m_CreateStatus;
};
#endif // RENDERMANAGER_H
|
Add a helper macro for simple async render thread invokes
|
Add a helper macro for simple async render thread invokes
|
C
|
mit
|
victor-moya/renderdoc,TurtleRockStudios/renderdoc_public,etnlGD/renderdoc,googlestadia/renderdoc,Anteru/renderdoc,etnlGD/renderdoc,TurtleRockStudios/renderdoc_public,Anteru/renderdoc,Velro/renderdoc,Velro/renderdoc,etnlGD/renderdoc,Zorro666/renderdoc,Yours3lf/renderdoc,Yours3lf/renderdoc,cgmb/renderdoc,googlestadia/renderdoc,victor-moya/renderdoc,cgmb/renderdoc,michaelrgb/renderdoc,etnlGD/renderdoc,googlestadia/renderdoc,Anteru/renderdoc,victor-moya/renderdoc,Velro/renderdoc,baldurk/renderdoc,Yours3lf/renderdoc,moradin/renderdoc,Velro/renderdoc,michaelrgb/renderdoc,TurtleRockStudios/renderdoc_public,Lssikkes/renderdoc,moradin/renderdoc,Velro/renderdoc,googlestadia/renderdoc,cgmb/renderdoc,moradin/renderdoc,michaelrgb/renderdoc,victor-moya/renderdoc,Yours3lf/renderdoc,Lssikkes/renderdoc,Zorro666/renderdoc,Lssikkes/renderdoc,baldurk/renderdoc,googlestadia/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,victor-moya/renderdoc,Anteru/renderdoc,victor-moya/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,etnlGD/renderdoc,moradin/renderdoc,baldurk/renderdoc,Yours3lf/renderdoc,Velro/renderdoc,Lssikkes/renderdoc,googlestadia/renderdoc,cgmb/renderdoc,Zorro666/renderdoc,Anteru/renderdoc,Yours3lf/renderdoc,Lssikkes/renderdoc,Anteru/renderdoc,Zorro666/renderdoc,etnlGD/renderdoc,TurtleRockStudios/renderdoc_public,TurtleRockStudios/renderdoc_public,Lssikkes/renderdoc,Anteru/renderdoc,TurtleRockStudios/renderdoc_public,michaelrgb/renderdoc,cgmb/renderdoc,moradin/renderdoc,michaelrgb/renderdoc,moradin/renderdoc,baldurk/renderdoc
|
3555739656f0eec99f4f6edb1cedf032c5d1754a
|
libgo/runtime/go-rec-nb-big.c
|
libgo/runtime/go-rec-nb-big.c
|
/* go-rec-nb-big.c -- nonblocking receive of something big on a channel.
Copyright 2009 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 <stdint.h>
#include <assert.h>
#include "channel.h"
_Bool
__go_receive_nonblocking_big (struct __go_channel* channel, void *val)
{
size_t alloc_size;
size_t offset;
alloc_size = ((channel->element_size + sizeof (uint64_t) - 1)
/ sizeof (uint64_t));
int data = __go_receive_nonblocking_acquire (channel);
if (data != RECEIVE_NONBLOCKING_ACQUIRE_DATA)
{
__builtin_memset (val, 0, channel->element_size);
if (data == RECEIVE_NONBLOCKING_ACQUIRE_NODATA)
return 0;
else
{
/* Channel is closed. */
return 1;
}
}
offset = channel->next_store * alloc_size;
__builtin_memcpy (val, &channel->data[offset], channel->element_size);
__go_receive_release (channel);
return 1;
}
|
/* go-rec-nb-big.c -- nonblocking receive of something big on a channel.
Copyright 2009 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 <stdint.h>
#include <assert.h>
#include "channel.h"
_Bool
__go_receive_nonblocking_big (struct __go_channel* channel, void *val)
{
size_t alloc_size;
size_t offset;
alloc_size = ((channel->element_size + sizeof (uint64_t) - 1)
/ sizeof (uint64_t));
int data = __go_receive_nonblocking_acquire (channel);
if (data != RECEIVE_NONBLOCKING_ACQUIRE_DATA)
{
__builtin_memset (val, 0, channel->element_size);
if (data == RECEIVE_NONBLOCKING_ACQUIRE_NODATA)
return 0;
else
{
/* Channel is closed. */
return 1;
}
}
offset = channel->next_fetch * alloc_size;
__builtin_memcpy (val, &channel->data[offset], channel->element_size);
__go_receive_release (channel);
return 1;
}
|
Correct nonblocking receive of a value larger than 8 bytes.
|
Correct nonblocking receive of a value larger than 8 bytes.
R=iant
https://golang.org/cl/1743042
|
C
|
bsd-3-clause
|
qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend
|
8aedf8e81a300dbab13689632b1518826d681529
|
src/scoreboard/circular_buffer.h
|
src/scoreboard/circular_buffer.h
|
template<class T, size_t S>
class CircularBuffer {
public:
CircularBuffer() : index(0), count(0) {}
void push_item(T item) {
array[index + 1] = item;
index = (index + 1) % S;
count++;
}
T pop_item() {
if (count > 0) {
int old_index = index;
index = index == 0 ? S - 1 : index - 1;
count--;
return array[old_index];
}
}
T peak_item() {
if (count > 0) {
return array[index];
}
}
private:
int index;
int count;
T array[S];
};
|
template<class T, size_t S>
class CircularBuffer {
public:
CircularBuffer() : index(0), count(0) {}
void push_item(T item) {
index = (index + 1) % S;
array[index] = item;
if (count < S) count++;
}
T pop_item() {
int old_index = index;
if (count > 0) {
index = index == 0 ? S - 1 : index - 1;
count--;
}
return array[old_index];
}
T peek_item() {
return array[index];
}
private:
int index;
int count;
T array[S];
};
|
Fix issues with circular buffer
|
Fix issues with circular buffer
|
C
|
mit
|
jvsalo/leditaulu,jvsalo/leditaulu,jvsalo/leditaulu,jvsalo/leditaulu
|
397948c76e8c43819702459269451493a2449e4e
|
PolyMapGenerator/ConvexHull.h
|
PolyMapGenerator/ConvexHull.h
|
#ifndef CONVEX_HULL_H
#define CONVEX_HULL_H
#endif
|
#ifndef CONVEX_HULL_H
#define CONVEX_HULL_H
#include <algorithm>
#include "Structure.h"
#include "Math/Vector2.h"
namespace ConvexHull
{
inline double Cross(const Vector2& O, const Vector2& A, const Vector2& B)
{
return (A.x - O.x) * (B.y - O.y) - (A.y - O.y) * (B.x - O.x);
}
inline std::vector<Corner*> CalculateConvexHull(std::vector<Corner*> P)
{
int n = P.size(), k = 0;
std::vector<Corner*> H(2 * n);
// Sort points lexicographically
sort(P.begin(), P.end(), [](Corner* c1, Corner* c2)
{
return c1->m_position.x < c2->m_position.x || (c1->m_position.x == c2->m_position.x && c1->m_position.y < c2->m_position.y);
});
// Build lower hull
for (int i = 0; i < n; ++i) {
while (k >= 2 && cross(H[k - 2]->m_position, H[k - 1]->m_position, P[i]->m_position) <= 0) k--;
H[k++] = P[i];
}
// Build upper hull
for (int i = n - 2, t = k + 1; i >= 0; i--) {
while (k >= t && cross(H[k - 2]->m_position, H[k - 1]->m_position, P[i]->m_position) <= 0) k--;
H[k++] = P[i];
}
H.resize(k - 1);
return P;
}
};
#endif
|
Implement some part of convex hull
|
Implement some part of convex hull
|
C
|
mit
|
utilForever/PolyMapGenerator
|
d5700e91d3254fb3db6a56bc4b243a3e4e1e86a8
|
src/ms-error.h
|
src/ms-error.h
|
/*
* Copyright (C) 2010 Igalia S.L.
*
* Contact: Iago Toral Quiroga <itoral@igalia.com>
*
* 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; version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef _MS_ERROR_H_
#define _MS_ERROR_H_
#define MS_ERROR g_quark_from_static_string("media-store.error.general")
enum {
MS_ERROR_BROWSE_FAILED = 1,
MS_ERROR_SEARCH_FAILED,
MS_ERROR_METADATA_FAILED,
MS_ERROR_MEDIA_NOT_FOUND
};
#endif
|
/*
* Copyright (C) 2010 Igalia S.L.
*
* Contact: Iago Toral Quiroga <itoral@igalia.com>
*
* 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; version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef _MS_ERROR_H_
#define _MS_ERROR_H_
#define MS_ERROR g_quark_from_static_string("media-store.error.general")
enum {
MS_ERROR_BROWSE_FAILED = 1,
MS_ERROR_SEARCH_FAILED,
MS_ERROR_QUERY_FAILED,
MS_ERROR_METADATA_FAILED,
MS_ERROR_MEDIA_NOT_FOUND
};
#endif
|
Add error code for failing query.
|
Add error code for failing query.
|
C
|
lgpl-2.1
|
kyoushuu/grilo,GNOME/grilo,kyoushuu/grilo,kyoushuu/grilo,grilofw/grilo,grilofw/grilo,grilofw/grilo,jasuarez/grilo,kyoushuu/grilo,MathieuDuponchelle/grilo,MathieuDuponchelle/grilo,jasuarez/grilo,MathieuDuponchelle/grilo,GNOME/grilo,jasuarez/grilo
|
28273b949da7a786df9f61af51279cf0122de3cc
|
test/Driver/qa_override.c
|
test/Driver/qa_override.c
|
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " %clang x -O2 b -O3 2>&1 | FileCheck %s
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -Werror %s -c 2>&1 | FileCheck %s -check-prefix=RM-WERROR
// FIXME: It seems doesn't work with gcc-driver.
// REQUIRES: clang-driver
// CHECK-NOT: ###
// CHECK: Option 0 - Name: "-ccc-print-options", Values: {}
// CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"}
// CHECK-NEXT: Option 2 - Name: "-O", Values: {"ignore"}
// CHECK-NEXT: Option 3 - Name: "-O", Values: {"magic"}
// RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-mfoo
// RM-WERROR-NEXT: ### Deleting argument -Werror
// RM-WERROR-NEXT: ### Adding argument -mfoo at end
// RM-WERROR-NEXT: warning: argument unused during compilation: '-mfoo'
|
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " %clang x -O2 b -O3 2>&1 | FileCheck %s
// RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
// CHECK-NOT: ###
// CHECK: Option 0 - Name: "-ccc-print-options", Values: {}
// CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"}
// CHECK-NEXT: Option 2 - Name: "-O", Values: {"ignore"}
// CHECK-NEXT: Option 3 - Name: "-O", Values: {"magic"}
// RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-mfoo
// RM-WERROR-NEXT: ### Deleting argument -Werror
// RM-WERROR-NEXT: ### Adding argument -mfoo at end
// RM-WERROR: warning: argument unused during compilation: '-mfoo'
// RM-WERROR-NOT: "-Werror"
|
Make this test not try to write on object file and test all of the output rather than just part of it.
|
Make this test not try to write on object file and test all of the
output rather than just part of it.
Also, remove the frighteningly ancient comment about not working with
the gcc-driver. (!!!)
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@187376 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/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,llvm-mirror/clang
|
f8ff178831e639a2d91e0eb03840ee60f3dda1d3
|
libgnomeui/gnome-properties.h
|
libgnomeui/gnome-properties.h
|
#ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
END_GNOME_DECLS
#endif
|
/* This file is currently empty; I'm going to add new code here soon.
Oct 27 1998. Martin
*/
|
Make this an empty file just with a comment in it.
|
Make this an empty file just with a comment in it.
|
C
|
lgpl-2.1
|
Distrotech/libgnomeui,Distrotech/libgnomeui,Distrotech/libgnomeui
|
0a32f8a771dac86fe30ac2ee8cce171b4f9ee004
|
third-party/lib/openlibm/impl.h
|
third-party/lib/openlibm/impl.h
|
#ifndef _OPENLIB_FINITE_H
#define _OPENLIB_FINITE_H
#include <sys/cdefs.h>
#define __BSD_VISIBLE 1
#include <../../build/extbld/third_party/lib/OpenLibm/install/openlibm_math.h>
static inline int finite(double x) {
return isfinite(x);
}
static inline int finitef(float x) {
return isfinite(x);
}
static inline int finitel(long double x) {
return isfinite(x);
}
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
__BEGIN_DECLS
extern long long int llabs(long long int j);
__END_DECLS
#endif
#endif /* _OPENLIB_FINITE_H */
|
#ifndef _OPENLIB_FINITE_H
#define _OPENLIB_FINITE_H
#include <sys/cdefs.h>
#define __BSD_VISIBLE 1
#include <../../build/extbld/third_party/lib/OpenLibm/install/openlibm_math.h>
static inline int finite(double x) {
return isfinite(x);
}
static inline int finitef(float x) {
return isfinite(x);
}
static inline int finitel(long double x) {
return isfinite(x);
}
#endif /* _OPENLIB_FINITE_H */
|
Remove llabs declaration from openlibm port
|
Remove llabs declaration from openlibm port
|
C
|
bsd-2-clause
|
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
|
a35eb2fedb0ea565c766f4dd55bab2ca866f5cb2
|
be/src/util/scope-exit-trigger.h
|
be/src/util/scope-exit-trigger.h
|
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#ifndef IMPALA_UTIL_SCOPE_EXIT_TRIGGER_H
#define IMPALA_UTIL_SCOPE_EXIT_TRIGGER_H
#include <functional>
namespace impala {
/// Utility class that calls a client-supplied function when it is destroyed.
///
/// Use judiciously - scope exits can be hard to reason about, and this class should not
/// act as proxy for work-performing d'tors, which we try to avoid.
class ScopeExitTrigger {
public:
ScopeExitTrigger(const auto& trigger) : trigger_(trigger) {}
~ScopeExitTrigger() { trigger_(); }
private:
std::function<void()> trigger_;
};
}
#endif
|
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#ifndef IMPALA_UTIL_SCOPE_EXIT_TRIGGER_H
#define IMPALA_UTIL_SCOPE_EXIT_TRIGGER_H
#include <functional>
namespace impala {
/// Utility class that calls a client-supplied function when it is destroyed.
///
/// Use judiciously - scope exits can be hard to reason about, and this class should not
/// act as proxy for work-performing d'tors, which we try to avoid.
class ScopeExitTrigger {
public:
ScopeExitTrigger(const std::function<void()>& trigger) : trigger_(trigger) {}
~ScopeExitTrigger() { trigger_(); }
private:
std::function<void()> trigger_;
};
}
#endif
|
Remove 'auto' from parameter list
|
IMPALA-4535: Remove 'auto' from parameter list
Although GCC supports void f(auto arg) { }, this isn't part of C++14.
Testing: Local ASAN build passed.
Change-Id: I838aa2c1081f7ed21cc2faa209a9eaa4fd0512a4
Reviewed-on: http://gerrit.cloudera.org:8080/5214
Reviewed-by: Tim Armstrong <2f8e34250f03a653da3dc27f7ec203eafdde80fc@cloudera.com>
Tested-by: Internal Jenkins
|
C
|
apache-2.0
|
cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala
|
fe57f0a345dd24d56455755beb72f95c8194d3d9
|
src/main/entity/components/SkillComponent.h
|
src/main/entity/components/SkillComponent.h
|
#ifndef SKILLCOMPONENT_H_
#define SKILLCOMPONENT_H_
#include "entity/components/AttributeComponent.h"
/**
* Data structure to represent an Entity's skill.
*/
typedef struct
{
int ranks; ///< Current ranks in the skill
int xp; ///< Amount of XP earned towards next rank
} SkillComponent;
/**
* Enumeration for identifying different skills.
*/
enum skill_t {
Melee,
Swords,
BastardSword,
Maces,
SpikedMace,
FirstAid
};
/**
* This array defines our parent skill relationships.
*
* If a skill's parent is itself, it has no parent.
*/
const skill_t PARENT_SKILLS[] = { Melee, Melee, Swords, Melee, Maces, FirstAid };
/**
* This array defines our skill-attribute relationships.
*/
const attrtype_t SKILL_ATTRIBUTES[] = { Str, Str, Str, Str, Str, Int };
#endif
|
#ifndef SKILLCOMPONENT_H_
#define SKILLCOMPONENT_H_
#include "entity/components/AttributeComponent.h"
/**
* Data structure to represent an Entity's skill.
*/
typedef struct
{
int ranks; ///< Current ranks in the skill
int xp; ///< Amount of XP earned towards next rank
} SkillComponent;
/**
* Enumeration for identifying different skills.
* @todo: Dodge is actually a "meta" skill, one calculated from other attributes
*/
enum skill_t {
Melee,
Swords,
BastardSword,
Maces,
SpikedMace,
FirstAid,
Dodge
};
/**
* This array defines our parent skill relationships.
*
* If a skill's parent is itself, it has no parent.
*/
const skill_t PARENT_SKILLS[] = { Melee, Melee, Swords, Melee, Maces, FirstAid, Dodge };
/**
* This array defines our skill-attribute relationships.
*/
const attrtype_t SKILL_ATTRIBUTES[] = { Str, Str, Str, Str, Str, Int, Dex };
#endif
|
Add Dodge skill as temporary hack
|
Add Dodge skill as temporary hack
I think I will implement an actual DefenseManager to handle calculating defenses on the fly; for now this works as a skill.
|
C
|
mit
|
Kromey/roglick
|
ce7258fa61fb2e04090ecbcaa402ecc55ff0ec62
|
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_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
#define GR_TEST_UTILS 1
#define SKIA_DLL
#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
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS
#define SK_LEGACY_SWEEP_GRADIENT
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_BILERP_IGNORING_HACK
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_DRAWFILTER
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_GRADIENT_DITHERING
#define SK_SUPPORT_LEGACY_SHADER_ISABITMAP
#define SK_SUPPORT_LEGACY_TILED_BITMAPS
#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_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
#define GR_TEST_UTILS 1
#define SKIA_DLL
#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
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS
#define SK_SUPPORT_DEPRECATED_CLIPOPS
#define SK_SUPPORT_LEGACY_BILERP_IGNORING_HACK
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_DRAWFILTER
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_GRADIENT_DITHERING
#define SK_SUPPORT_LEGACY_SHADER_ISABITMAP
#define SK_SUPPORT_LEGACY_TILED_BITMAPS
#endif // SkUserConfigManual_DEFINED
|
Switch Skia to the new sweep gradient impl
|
Switch Skia to the new sweep gradient impl
(remove SK_LEGACY_SWEEP_GRADIENT)
Change-Id: I967272af11b86223c92eea61288c6f2c5d27474f
|
C
|
bsd-3-clause
|
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_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,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia
|
2a1aad729e09761ce45b9b283e2fb65da191d38c
|
SDKs/linux/usr/include/sys/mman.h
|
SDKs/linux/usr/include/sys/mman.h
|
/* ===-- limits.h - stub SDK header for compiler-rt -------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===-----------------------------------------------------------------------===
*
* This is a stub SDK header file. This file is not part of the interface of
* this library nor an official version of the appropriate SDK header. It is
* intended only to stub the features of this header required by compiler-rt.
*
* ===-----------------------------------------------------------------------===
*/
#ifndef __SYS_MMAN_H__
#define __SYS_MMAN_H__
typedef __SIZE_TYPE__ size_t;
#define PROT_READ 0x1
#define PROT_WRITE 0x1
#define PROT_EXEC 0x4
extern int mprotect (void *__addr, size_t __len, int __prot)
__attribute__((__nothrow__));
#endif /* __SYS_MMAN_H__ */
|
/* ===-- limits.h - stub SDK header for compiler-rt -------------------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===-----------------------------------------------------------------------===
*
* This is a stub SDK header file. This file is not part of the interface of
* this library nor an official version of the appropriate SDK header. It is
* intended only to stub the features of this header required by compiler-rt.
*
* ===-----------------------------------------------------------------------===
*/
#ifndef __SYS_MMAN_H__
#define __SYS_MMAN_H__
typedef __SIZE_TYPE__ size_t;
#define PROT_READ 0x1
#define PROT_WRITE 0x2
#define PROT_EXEC 0x4
extern int mprotect (void *__addr, size_t __len, int __prot)
__attribute__((__nothrow__));
#endif /* __SYS_MMAN_H__ */
|
Fix braindead pasto, caught by Matt Beaumont-Gay.
|
SDK/linux: Fix braindead pasto, caught by Matt Beaumont-Gay.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@146188 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
|
e8476178c71c887199a486746c0ea1694feb1bf6
|
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.
constexpr float kCurrentVersion = 1.54f;
// 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.
constexpr float kCurrentVersion = 1.55f;
// 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'
|
Update version number to 1.55
|
Update version number to 1.55
|
C
|
apache-2.0
|
google/UIforETW,google/UIforETW,google/UIforETW,google/UIforETW
|
37ffe379713c08899981532bad1a9df96c7fd3e2
|
src/lib/PMDPage.h
|
src/lib/PMDPage.h
|
#pragma once
#include "geometry.h"
#include "yaml_utils.h"
#include <vector>
#include <boost/shared_ptr.hpp>
#include <librevenge/librevenge.h>
namespace libpagemaker
{
class PMDPage
{
std::vector<boost::shared_ptr<PMDLineSet> > m_shapes;
public:
PMDPage() : m_shapes()
{ }
void addShape(boost::shared_ptr<PMDLineSet> shape)
{
m_shapes.push_back(shape);
}
unsigned numShapes() const
{
return m_shapes.size();
}
boost::shared_ptr<const PMDLineSet> getShape(unsigned i) const
{
return m_shapes.at(i);
}
void emitYaml(yaml_emitter_t *emitter) const
{
yamlIndirectForeach(emitter, "shapes", m_shapes);
}
};
}
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
|
#pragma once
#include "geometry.h"
#include "yaml_utils.h"
#include <vector>
#include <boost/shared_ptr.hpp>
#include <librevenge/librevenge.h>
namespace libpagemaker
{
class PMDPage
{
std::vector<boost::shared_ptr<PMDLineSet> > m_shapes;
public:
PMDPage() : m_shapes()
{ }
void addShape(boost::shared_ptr<PMDLineSet> shape)
{
m_shapes.push_back(shape);
}
unsigned numShapes() const
{
return m_shapes.size();
}
boost::shared_ptr<const PMDLineSet> getShape(unsigned i) const
{
return m_shapes.at(i);
}
void emitYaml(yaml_emitter_t *emitter) const
{
yamlBeginMap(emitter);
yamlIndirectForeach(emitter, "shapes", m_shapes);
yamlEndMap(emitter);
}
};
}
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
|
Fix bug in shape yaml emit
|
Fix bug in shape yaml emit
|
C
|
mpl-2.0
|
umanwizard/libpagemaker,umanwizard/libpagemaker,umanwizard/libpagemaker,anuragkanungo/libpagemaker,anuragkanungo/libpagemaker,umanwizard/libpagemaker,anuragkanungo/libpagemaker,umanwizard/libpagemaker,anuragkanungo/libpagemaker
|
a8122088474be0b8b2479e52a75ebf25a5a386f1
|
lib/libz/zopenbsd.c
|
lib/libz/zopenbsd.c
|
/* $OpenBSD: zopenbsd.c,v 1.4 2015/01/20 04:41:01 krw Exp $ */
#include <sys/types.h>
#include <sys/malloc.h>
#include <lib/libz/zutil.h>
/*
* Space allocation and freeing routines for use by zlib routines.
*/
void *
zcalloc(notused, items, size)
void *notused;
u_int items, size;
{
return mallocarray(items, size, M_DEVBUF, M_NOWAIT);
}
void
zcfree(notused, ptr)
void *notused;
void *ptr;
{
free(ptr, M_DEVBUF, 0);
}
|
#include <sys/types.h>
#include <sys/malloc.h>
#include <lib/libz/zutil.h>
/*
* Space allocation and freeing routines for use by zlib routines.
*/
void *
zcalloc(notused, items, size)
void *notused;
u_int items, size;
{
return mallocarray(items, size, M_DEVBUF, M_NOWAIT);
}
void
zcfree(notused, ptr)
void *notused;
void *ptr;
{
free(ptr, M_DEVBUF, 0);
}
|
Revert some $OpenBSD$ additions about which there are doubts.
|
Revert some $OpenBSD$ additions about which there are doubts.
Suggested by deraadt@
|
C
|
isc
|
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
|
14ca78ef6e4f09ca085f0d19c9029895d5c57376
|
inc/WalkerException.h
|
inc/WalkerException.h
|
//! \file WalkerException.h
#ifndef WALKEREXCEPTION_H
#define WALKEREXCEPTION_H
#include <stdexcept>
#include <string>
namespace WikiWalker
{
//! (base) class for exceptions in WikiWalker
class WalkerException : public std::runtime_error
{
public:
/*! Create a Walker exception with a message.
*
* Message might be shown on exception occurring, depending on
* the compiler.
*
* \param exmessage The exception message.
*/
explicit WalkerException(std::string exmessage) : runtime_error(exmessage)
{
}
};
} // namespace WikiWalker
#endif // WALKEREXCEPTION_H
|
//! \file WalkerException.h
#ifndef WALKEREXCEPTION_H
#define WALKEREXCEPTION_H
#include <stdexcept>
#include <string>
namespace WikiWalker
{
//! (base) class for exceptions in WikiWalker
class WalkerException : public std::runtime_error
{
public:
/*! Create a Walker exception with a message.
*
* Message might be shown on exception occurring, depending on
* the compiler.
*
* \param exmessage The exception message.
*/
explicit WalkerException(const std::string& exmessage) : runtime_error(exmessage)
{
}
};
} // namespace WikiWalker
#endif // WALKEREXCEPTION_H
|
Use const reference for exception
|
Use const reference for exception
|
C
|
mit
|
dueringa/WikiWalker
|
42602d2256e80bd1805a4d8970773be48d6e00f5
|
searchlib/src/vespa/searchlib/tensor/hnsw_index_loader.h
|
searchlib/src/vespa/searchlib/tensor/hnsw_index_loader.h
|
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstdint>
namespace search::fileutil { class LoadedBuffer; }
namespace search::tensor {
class HnswGraph;
/**
* Implements loading of HNSW graph structure from binary format.
**/
class HnswIndexLoader {
public:
HnswIndexLoader(HnswGraph &graph);
~HnswIndexLoader();
bool load(const fileutil::LoadedBuffer& buf);
private:
HnswGraph &_graph;
const uint32_t *_ptr;
const uint32_t *_end;
bool _failed;
uint32_t next_int() {
if (__builtin_expect((_ptr == _end), false)) {
_failed = true;
return 0;
}
return *_ptr++;
}
};
}
|
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstdint>
namespace search::fileutil { class LoadedBuffer; }
namespace search::tensor {
struct HnswGraph;
/**
* Implements loading of HNSW graph structure from binary format.
**/
class HnswIndexLoader {
public:
HnswIndexLoader(HnswGraph &graph);
~HnswIndexLoader();
bool load(const fileutil::LoadedBuffer& buf);
private:
HnswGraph &_graph;
const uint32_t *_ptr;
const uint32_t *_end;
bool _failed;
uint32_t next_int() {
if (__builtin_expect((_ptr == _end), false)) {
_failed = true;
return 0;
}
return *_ptr++;
}
};
}
|
Fix forward declaration of HnswGraph.
|
Fix forward declaration of HnswGraph.
|
C
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
9cd078f86a3f80bf532f348e1f4722937f91c0b6
|
lib/libstand/assert.c
|
lib/libstand/assert.c
|
/*-
* Copyright (c) 1998 Michael Smith.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <stand.h>
#include <assert.h>
void
__assert(const char *file, int line, const char *expression)
{
printf("assertion \"%s\" failed: file \"%s\", line %d\n", expression, file, line);
exit();
}
|
/*-
* Copyright (c) 1998 Michael Smith.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <assert.h>
#include "stand.h"
void
__assert(const char *file, int line, const char *expression)
{
printf("assertion \"%s\" failed: file \"%s\", line %d\n", expression, file, line);
exit();
}
|
Make include file consistent with the rest of libstand.
|
Make include file consistent with the rest of libstand.
|
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
|
939d3a1e74e0d1ecf1d24e3368fdf4cf56301ae1
|
Amplitude/Amplitude+SSLPinning.h
|
Amplitude/Amplitude+SSLPinning.h
|
#ifdef AMPLITUDE_SSL_PINNING
//
// Amplitude+SSLPinning
// Amplitude
//
// Created by Allan on 3/11/15.
// Copyright (c) 2015 Amplitude. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Amplitude (SSLPinning)
@property (nonatomic, assign) BOOL sslPinningEnabled;
@end
#endif
|
//
// Amplitude+SSLPinning
// Amplitude
//
// Created by Allan on 3/11/15.
// Copyright (c) 2015 Amplitude. All rights reserved.
//
@import Foundation;
#import "Amplitude.h"
@interface Amplitude (SSLPinning)
#ifdef AMPLITUDE_SSL_PINNING
@property (nonatomic, assign) BOOL sslPinningEnabled;
#endif
@end
|
Fix import so it doesn't corrupt debug console
|
[Debug] Fix import so it doesn't corrupt debug console
|
C
|
mit
|
amplitude/Amplitude-iOS,amplitude/Amplitude-iOS,amplitude/Amplitude-iOS,amplitude/Amplitude-iOS
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.