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
|
|---|---|---|---|---|---|---|---|---|---|
3790101271d3fb24db76257b9ac491e7b6d4c4e4
|
CPDAcknowledgements/CPDStyle.h
|
CPDAcknowledgements/CPDStyle.h
|
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// This is the current default:
/// <html><head>{{STYLESHEET}}<meta name='viewport' content='width=device-width'></head><body>{{HEADER}}<p>{{BODY}}</p></body></html>
@property (nonatomic, copy) NSString * _Nullable libraryHTML;
/// CSS for styling your library
///
/// This is the current default:
/// <style> body{ font-family:HelveticaNeue; font-size: 14px; padding:12px; -webkit-user-select:none; }
// #summary{ font-size: 18px; }
// #version{ float: left; padding: 6px; }
// #license{ float: right; padding: 6px; } .clear-fix { clear:both };
// </style>
@property (nonatomic, copy) NSString * _Nullable libraryCSS;
/// HTML specifically for showing the header information about a library
///
/// This is the current default
/// <p id='summary'>{{SUMMARY}}</p><p id='version'>{{VERSION}}</p><p id='license'>{{SHORT_LICENSE}}</p> <br class='clear-fix' />
@property (nonatomic, copy) NSString * _Nullable libraryHeaderHTML;
@end
NS_ASSUME_NONNULL_END
|
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// This is the current default:
/// <html><head>{{STYLESHEET}}<meta name='viewport' content='width=device-width'></head><body>{{HEADER}}<p>{{BODY}}</p></body></html>
@property (nonatomic, copy) NSString * _Nullable libraryHTML;
/// CSS for styling your library
///
/// This is the current default:
/// <style> body{ font-family:HelveticaNeue; font-size: 14px; padding:12px; -webkit-user-select:none; }
// #summary{ font-size: 18px; }
// #version{ float: left; padding: 6px; }
// #license{ float: right; padding: 6px; } .clear-fix { clear:both };
// </style>
@property (nonatomic, copy) NSString * _Nullable libraryCSS;
/// HTML specifically for showing the header information about a library
///
/// This is the current default
/// <p id='summary'>{{SUMMARY}}</p><p id='version'>{{VERSION}}</p><p id='license'>{{SHORT_LICENSE}}</p> <br class='clear-fix'>
@property (nonatomic, copy) NSString * _Nullable libraryHeaderHTML;
@end
NS_ASSUME_NONNULL_END
|
Fix 'HTML start tag prematurely ended' warning
|
Fix 'HTML start tag prematurely ended' warning
|
C
|
mit
|
CocoaPods/CPDAcknowledgements
|
6bd246f7dc75101536a89c6b4ff776a05d8efb50
|
ST_HW_HC_SR04.h
|
ST_HW_HC_SR04.h
|
/*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# 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 ST_HW_HC_SR04
#define ST_HW_HC_SR04
#include "Arduino.h"
class ST_HW_HC_SR04 {
public:
ST_HW_HC_SR04(byte triggerPin, byte echoPin);
ST_HW_HC_SR04(byte triggerPin, byte echoPin, unsigned long timeout);
void setTimeout(unsigned long timeout);
void setTimeoutToDefaultValue();
unsigned long getTimeout();
int getHitTime();
private:
byte triggerPin;
byte echoPin;
unsigned long timeout;
void triggerPulse();
};
#endif
|
/*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# 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 ST_HW_HC_SR04_H
#define ST_HW_HC_SR04_H
#include "Arduino.h"
class ST_HW_HC_SR04 {
public:
ST_HW_HC_SR04(byte triggerPin, byte echoPin);
ST_HW_HC_SR04(byte triggerPin, byte echoPin, unsigned long timeout);
void setTimeout(unsigned long timeout);
void setTimeoutToDefaultValue();
unsigned long getTimeout();
int getHitTime();
private:
byte triggerPin;
byte echoPin;
unsigned long timeout;
void triggerPulse();
};
#endif
|
Fix include guard conflicting with the class name
|
Fix include guard conflicting with the class name
|
C
|
mit
|
Spaguetron/ST_HW_HC_SR04
|
6be828419968fa1f105f7362832b4eafb2157ab6
|
proctor/include/pcl/proctor/proposer.h
|
proctor/include/pcl/proctor/proposer.h
|
#ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
float votes;
};
class Proposer {
public:
typedef boost::shared_ptr<Proposer> Ptr;
typedef boost::shared_ptr<const Proposer> ConstPtr;
typedef boost::shared_ptr<std::map<std::string, Entry> > DatabasePtr;
typedef boost::shared_ptr<const std::map<std::string, Entry> > ConstDatabasePtr;
Proposer()
{}
void
setDatabase(const DatabasePtr database)
{
database_ = database;
}
virtual void
getProposed(int max_num, Entry &query, std::vector<std::string> &input, std::vector<std::string> &output) = 0;
virtual void
selectBestCandidates(int max_num, vector<Candidate> &ballot, std::vector<std::string> &output);
protected:
DatabasePtr database_;
};
}
}
#endif
|
#ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
double votes;
};
class Proposer {
public:
typedef boost::shared_ptr<Proposer> Ptr;
typedef boost::shared_ptr<const Proposer> ConstPtr;
typedef boost::shared_ptr<std::map<std::string, Entry> > DatabasePtr;
typedef boost::shared_ptr<const std::map<std::string, Entry> > ConstDatabasePtr;
Proposer()
{}
void
setDatabase(const DatabasePtr database)
{
database_ = database;
}
virtual void
getProposed(int max_num, Entry &query, std::vector<std::string> &input, std::vector<std::string> &output) = 0;
virtual void
selectBestCandidates(int max_num, vector<Candidate> &ballot, std::vector<std::string> &output);
protected:
DatabasePtr database_;
};
}
}
#endif
|
Change votes to use double.
|
Change votes to use double.
git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@4320 a9d63959-f2ad-4865-b262-bf0e56cfafb6
|
C
|
bsd-3-clause
|
psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn
|
59ea31827fd5fde1f5a5899a186e6fa18c65d83e
|
Firmware/GPIO/main.c
|
Firmware/GPIO/main.c
|
#include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_DOWN
};
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &GPIO_InitStruct);
}
int main()
{
init_GPIO();
GPIO_SetBits(GPIOD, GPIO_Pin_12);
return 0;
}
|
#include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_DOWN
};
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &GPIO_InitStruct);
}
int main()
{
init_GPIO();
int digitStatus = 1;
while(1) {
GPIO_WriteBit(GPIOD, GPIO_Pin_12, digitStatus);
delay(1000000L);
GPIO_WriteBit(GPIOD, GPIO_Pin_13, digitStatus);
delay(1000000L);
GPIO_WriteBit(GPIOD, GPIO_Pin_14, digitStatus);
delay(1000000L);
GPIO_WriteBit(GPIOD, GPIO_Pin_15, digitStatus);
delay(1000000L);
digitStatus = (digitStatus + 1) % 2;
}
return 0;
}
|
Add the blink effect to the GPIO demo
|
Add the blink effect to the GPIO demo
|
C
|
mit
|
PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice
|
7b6feece93869c598a44f03470e2a1d7c5eac9b9
|
PHPHub/Constants/APIConstant.h
|
PHPHub/Constants/APIConstant.h
|
//
// APIConstant.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"]
#define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier"
#if DEBUG
#define APIBaseURL @"https://staging_api.phphub.org"
#else
#define APIBaseURL @"https://api.phphub.org"
#endif
#define PHPHubHost @"phphub.org"
#define PHPHubUrl @"https://phphub.org/"
#define GitHubURL @"https://github.com/"
#define TwitterURL @"https://twitter.com/"
#define ProjectURL @"https://github.com/phphub/phphub-ios"
#define AboutPageURL @"https://phphub.org/about"
#define ESTGroupURL @"http://est-group.org"
#define PHPHubGuide @"https://phphub.org/guide"
#define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback"
|
//
// APIConstant.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"]
#define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier"
#if DEBUG
#define APIBaseURL @"https://staging_api.phphub.org"
#else
#define APIBaseURL @"https://api.phphub.org"
#endif
#define PHPHubHost @"phphub.org"
#define PHPHubUrl @"https://phphub.org/"
#define GitHubURL @"https://github.com/"
#define TwitterURL @"https://twitter.com/"
#define ProjectURL @"https://github.com/phphub/phphub-ios"
#define AboutPageURL @"https://phphub.org/about"
#define ESTGroupURL @"http://est-group.org"
#define PHPHubGuide @"https://phphub.org/helps/qr-login-guide"
#define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback"
|
Change QR login guide url
|
Change QR login guide url
|
C
|
mit
|
Aufree/phphub-ios
|
92165a2024a4285f9df8a92fbfe19c91d77e74b4
|
Inc/project_config.h
|
Inc/project_config.h
|
#ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
#define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values from LEP_PCOLOR_LUT_E in Middlewares/lepton_sdk/Inc/LEPTON_VID.h
#define PSUEDOCOLOR_LUT LEP_VID_FUSION_LUT
#endif
#ifndef USART_DEBUG_SPEED
#define USART_DEBUG_SPEED (921600)
#endif
#define WHITE_LED_TOGGLE (HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_6))
#endif
|
#ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
// #define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values from LEP_PCOLOR_LUT_E in Middlewares/lepton_sdk/Inc/LEPTON_VID.h
#define PSUEDOCOLOR_LUT LEP_VID_FUSION_LUT
#endif
#ifndef USART_DEBUG_SPEED
#define USART_DEBUG_SPEED (921600)
#endif
#define WHITE_LED_TOGGLE (HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_6))
#endif
|
Disable THERMAL_DATA_UART by default. This is a big CPU sink, and is a pretty non-standard config.
|
Disable THERMAL_DATA_UART by default. This is a big CPU sink, and is a pretty non-standard config.
|
C
|
mit
|
groupgets/purethermal1-firmware,groupgets/purethermal1-firmware,groupgets/purethermal1-firmware,groupgets/purethermal1-firmware
|
e8938694357e4048322aae1819bea29c8ba59223
|
drivers/timer/sys_clock_init.c
|
drivers/timer/sys_clock_init.c
|
/*
* Copyright (c) 2015 Wind River Systems, 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.
*/
/**
* @file
* @brief Initialize system clock driver
*
* Initializing the timer driver is done in this module to reduce code
* duplication. Although both nanokernel and microkernel systems initialize
* the timer driver at the same point, the two systems differ in when the system
* can begin to process system clock ticks. A nanokernel system can process
* system clock ticks once the driver has initialized. However, in a
* microkernel system all system clock ticks are deferred (and stored on the
* kernel server command stack) until the kernel server fiber starts and begins
* processing any queued ticks.
*/
#include <nanokernel.h>
#include <init.h>
#include <drivers/system_timer.h>
SYS_INIT(_sys_clock_driver_init,
#ifdef CONFIG_MICROKERNEL
MICROKERNEL,
#else
NANOKERNEL,
#endif
CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
|
/*
* Copyright (c) 2015 Wind River Systems, 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.
*/
/**
* @file
* @brief Initialize system clock driver
*
* Initializing the timer driver is done in this module to reduce code
* duplication. Although both nanokernel and microkernel systems initialize
* the timer driver at the same point, the two systems differ in when the system
* can begin to process system clock ticks. A nanokernel system can process
* system clock ticks once the driver has initialized. However, in a
* microkernel system all system clock ticks are deferred (and stored on the
* kernel server command stack) until the kernel server fiber starts and begins
* processing any queued ticks.
*/
#include <nanokernel.h>
#include <init.h>
#include <drivers/system_timer.h>
SYS_INIT(_sys_clock_driver_init, NANOKERNEL, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
|
Revert "sys_clock: start the microkernel ticker in the MICROKERNEL init level"
|
Revert "sys_clock: start the microkernel ticker in the MICROKERNEL init level"
This reverts commit 3c66686a43ffa78932aaa6b1e2338c2f3d347a13.
That commit fixed announcing ticks before the microkernel was up, but
prevented devices initializing before the MICROKERNEL level from having
access to the hi-res part of the system clock, which they could not poll
anymore.
Change-Id: Ia1c55d482e63d295160942f97ebc8e8afd1e8315
Signed-off-by: Benjamin Walsh <578db18f23ec223e50c404886c947386478a464e@windriver.com>
|
C
|
apache-2.0
|
runchip/zephyr-cc3220,holtmann/zephyr,kraj/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyriot/zephyr,fractalclone/zephyr-riscv,bigdinotech/zephyr,pklazy/zephyr,erwango/zephyr,mirzak/zephyr-os,mbolivar/zephyr,runchip/zephyr-cc3200,aceofall/zephyr-iotos,galak/zephyr,explora26/zephyr,nashif/zephyr,punitvara/zephyr,galak/zephyr,rsalveti/zephyr,finikorg/zephyr,mbolivar/zephyr,mbolivar/zephyr,pklazy/zephyr,rsalveti/zephyr,mbolivar/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,coldnew/zephyr-project-fork,kraj/zephyr,mirzak/zephyr-os,coldnew/zephyr-project-fork,bboozzoo/zephyr,punitvara/zephyr,zephyriot/zephyr,erwango/zephyr,punitvara/zephyr,nashif/zephyr,tidyjiang8/zephyr-doc,runchip/zephyr-cc3200,kraj/zephyr,bigdinotech/zephyr,runchip/zephyr-cc3200,bboozzoo/zephyr,bboozzoo/zephyr,runchip/zephyr-cc3200,ldts/zephyr,runchip/zephyr-cc3220,tidyjiang8/zephyr-doc,punitvara/zephyr,galak/zephyr,finikorg/zephyr,tidyjiang8/zephyr-doc,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,aceofall/zephyr-iotos,Vudentz/zephyr,finikorg/zephyr,bboozzoo/zephyr,sharronliu/zephyr,32bitmicro/zephyr,erwango/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,bboozzoo/zephyr,runchip/zephyr-cc3220,punitvara/zephyr,runchip/zephyr-cc3220,sharronliu/zephyr,holtmann/zephyr,Vudentz/zephyr,bigdinotech/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,erwango/zephyr,mirzak/zephyr-os,runchip/zephyr-cc3200,sharronliu/zephyr,Vudentz/zephyr,sharronliu/zephyr,pklazy/zephyr,zephyriot/zephyr,coldnew/zephyr-project-fork,fbsder/zephyr,pklazy/zephyr,tidyjiang8/zephyr-doc,ldts/zephyr,32bitmicro/zephyr,mirzak/zephyr-os,zephyrproject-rtos/zephyr,fractalclone/zephyr-riscv,bigdinotech/zephyr,holtmann/zephyr,rsalveti/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,fbsder/zephyr,rsalveti/zephyr,mirzak/zephyr-os,kraj/zephyr,fbsder/zephyr,fractalclone/zephyr-riscv,fbsder/zephyr,32bitmicro/zephyr,explora26/zephyr,runchip/zephyr-cc3220,Vudentz/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,coldnew/zephyr-project-fork,32bitmicro/zephyr,explora26/zephyr,kraj/zephyr,Vudentz/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,mbolivar/zephyr,galak/zephyr,coldnew/zephyr-project-fork,zephyriot/zephyr,tidyjiang8/zephyr-doc,GiulianoFranchetto/zephyr,bigdinotech/zephyr,aceofall/zephyr-iotos,32bitmicro/zephyr,erwango/zephyr,rsalveti/zephyr,ldts/zephyr,fractalclone/zephyr-riscv,zephyriot/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,fbsder/zephyr,nashif/zephyr,pklazy/zephyr,finikorg/zephyr
|
978e851a0ea6e8c54d072f745bbd8d1cd0451e54
|
include/swift/Basic/Algorithm.h
|
include/swift/Basic/Algorithm.h
|
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines helper algorithms, some of which are ported from C++14,
// which may not be available on all platforms yet.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_ALGORITHM_H
#define SWIFT_BASIC_ALGORITHM_H
namespace swift {
/// Returns the minimum of `a` and `b`, or `a` if they are equivalent.
template <typename T>
constexpr const T& min(const T &a, const T &b) {
return !(b < a) ? a : b;
}
} // end namespace swift
#endif /* SWIFT_BASIC_ALGORITHM_H */
|
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines helper algorithms, some of which are ported from C++14,
// which may not be available on all platforms yet.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_ALGORITHM_H
#define SWIFT_BASIC_ALGORITHM_H
namespace swift {
/// Returns the minimum of `a` and `b`, or `a` if they are equivalent.
template <typename T>
constexpr const T& min(const T &a, const T &b) {
return !(b < a) ? a : b;
}
/// Returns the maximum of `a` and `b`, or `a` if they are equivalent.
template <typename T>
constexpr const T& max(const T &a, const T &b) {
return (a < b) ? b : a;
}
} // end namespace swift
#endif /* SWIFT_BASIC_ALGORITHM_H */
|
Add constexpr version of maximum to algorithm
|
Add constexpr version of maximum to algorithm
Add the constexpr version of max which is only available in std since c++14.
Besides being a logical addition next to the already implemented constexpr version of min, there are actually other files, even in Swift/Basic itself, which re-implement this functionality, such as PrefixMap.h. Once this is implemented here, the functionality can be re-used in those other locations, instead of re-implemented each time.
|
C
|
apache-2.0
|
jmgc/swift,lorentey/swift,aschwaighofer/swift,tinysun212/swift-windows,ken0nek/swift,xwu/swift,benlangmuir/swift,djwbrown/swift,nathawes/swift,natecook1000/swift,ahoppen/swift,huonw/swift,apple/swift,jckarter/swift,benlangmuir/swift,karwa/swift,russbishop/swift,apple/swift,devincoughlin/swift,jopamer/swift,felix91gr/swift,kperryua/swift,karwa/swift,jmgc/swift,gribozavr/swift,stephentyrone/swift,amraboelela/swift,devincoughlin/swift,gmilos/swift,djwbrown/swift,Jnosh/swift,tkremenek/swift,johnno1962d/swift,shahmishal/swift,uasys/swift,brentdax/swift,gribozavr/swift,jopamer/swift,huonw/swift,kperryua/swift,amraboelela/swift,airspeedswift/swift,gottesmm/swift,zisko/swift,russbishop/swift,hughbe/swift,allevato/swift,alblue/swift,gottesmm/swift,glessard/swift,xedin/swift,austinzheng/swift,manavgabhawala/swift,JGiola/swift,hooman/swift,jtbandes/swift,tardieu/swift,frootloops/swift,jopamer/swift,rudkx/swift,ben-ng/swift,parkera/swift,johnno1962d/swift,modocache/swift,jckarter/swift,practicalswift/swift,stephentyrone/swift,practicalswift/swift,parkera/swift,ken0nek/swift,gmilos/swift,SwiftAndroid/swift,deyton/swift,aschwaighofer/swift,natecook1000/swift,gregomni/swift,JaSpa/swift,frootloops/swift,atrick/swift,stephentyrone/swift,sschiau/swift,KrishMunot/swift,djwbrown/swift,huonw/swift,arvedviehweger/swift,swiftix/swift,return/swift,lorentey/swift,stephentyrone/swift,swiftix/swift,IngmarStein/swift,brentdax/swift,KrishMunot/swift,lorentey/swift,practicalswift/swift,OscarSwanros/swift,russbishop/swift,harlanhaskins/swift,return/swift,kperryua/swift,xwu/swift,russbishop/swift,SwiftAndroid/swift,tinysun212/swift-windows,jmgc/swift,parkera/swift,ahoppen/swift,arvedviehweger/swift,tardieu/swift,harlanhaskins/swift,parkera/swift,roambotics/swift,ahoppen/swift,rudkx/swift,ben-ng/swift,tkremenek/swift,roambotics/swift,rudkx/swift,jopamer/swift,felix91gr/swift,hooman/swift,practicalswift/swift,devincoughlin/swift,calebd/swift,hooman/swift,ken0nek/swift,uasys/swift,hooman/swift,ahoppen/swift,hughbe/swift,codestergit/swift,kstaring/swift,harlanhaskins/swift,gribozavr/swift,dreamsxin/swift,calebd/swift,zisko/swift,frootloops/swift,gmilos/swift,jopamer/swift,roambotics/swift,frootloops/swift,IngmarStein/swift,deyton/swift,bitjammer/swift,glessard/swift,karwa/swift,stephentyrone/swift,benlangmuir/swift,codestergit/swift,CodaFi/swift,deyton/swift,sschiau/swift,swiftix/swift,kperryua/swift,amraboelela/swift,modocache/swift,nathawes/swift,manavgabhawala/swift,gribozavr/swift,xwu/swift,xedin/swift,shahmishal/swift,modocache/swift,danielmartin/swift,hooman/swift,kperryua/swift,kstaring/swift,shahmishal/swift,JaSpa/swift,CodaFi/swift,felix91gr/swift,parkera/swift,stephentyrone/swift,lorentey/swift,russbishop/swift,lorentey/swift,lorentey/swift,gregomni/swift,felix91gr/swift,bitjammer/swift,return/swift,parkera/swift,djwbrown/swift,SwiftAndroid/swift,bitjammer/swift,JGiola/swift,amraboelela/swift,sschiau/swift,OscarSwanros/swift,ken0nek/swift,stephentyrone/swift,devincoughlin/swift,airspeedswift/swift,tkremenek/swift,devincoughlin/swift,harlanhaskins/swift,deyton/swift,JGiola/swift,danielmartin/swift,ahoppen/swift,atrick/swift,xedin/swift,tjw/swift,gottesmm/swift,aschwaighofer/swift,shajrawi/swift,zisko/swift,Jnosh/swift,russbishop/swift,tkremenek/swift,gottesmm/swift,gregomni/swift,JaSpa/swift,parkera/swift,harlanhaskins/swift,Jnosh/swift,jckarter/swift,huonw/swift,alblue/swift,OscarSwanros/swift,johnno1962d/swift,ben-ng/swift,arvedviehweger/swift,gmilos/swift,gmilos/swift,gribozavr/swift,natecook1000/swift,amraboelela/swift,SwiftAndroid/swift,brentdax/swift,tjw/swift,jtbandes/swift,xwu/swift,dreamsxin/swift,gmilos/swift,kstaring/swift,airspeedswift/swift,zisko/swift,KrishMunot/swift,austinzheng/swift,nathawes/swift,tinysun212/swift-windows,manavgabhawala/swift,KrishMunot/swift,arvedviehweger/swift,brentdax/swift,alblue/swift,amraboelela/swift,devincoughlin/swift,brentdax/swift,return/swift,karwa/swift,modocache/swift,shahmishal/swift,aschwaighofer/swift,allevato/swift,IngmarStein/swift,hughbe/swift,benlangmuir/swift,Jnosh/swift,CodaFi/swift,manavgabhawala/swift,jtbandes/swift,Jnosh/swift,xwu/swift,ken0nek/swift,return/swift,KrishMunot/swift,codestergit/swift,shajrawi/swift,codestergit/swift,SwiftAndroid/swift,felix91gr/swift,therealbnut/swift,swiftix/swift,tjw/swift,austinzheng/swift,gregomni/swift,shajrawi/swift,hooman/swift,jckarter/swift,shajrawi/swift,xwu/swift,jopamer/swift,glessard/swift,uasys/swift,felix91gr/swift,shajrawi/swift,swiftix/swift,IngmarStein/swift,therealbnut/swift,karwa/swift,OscarSwanros/swift,harlanhaskins/swift,kstaring/swift,rudkx/swift,KrishMunot/swift,therealbnut/swift,uasys/swift,ken0nek/swift,tinysun212/swift-windows,xedin/swift,JaSpa/swift,JGiola/swift,danielmartin/swift,tardieu/swift,calebd/swift,JGiola/swift,djwbrown/swift,shajrawi/swift,tinysun212/swift-windows,deyton/swift,CodaFi/swift,alblue/swift,rudkx/swift,danielmartin/swift,bitjammer/swift,sschiau/swift,modocache/swift,benlangmuir/swift,practicalswift/swift,aschwaighofer/swift,jmgc/swift,roambotics/swift,milseman/swift,swiftix/swift,zisko/swift,shahmishal/swift,johnno1962d/swift,frootloops/swift,atrick/swift,modocache/swift,tinysun212/swift-windows,kstaring/swift,shajrawi/swift,xwu/swift,therealbnut/swift,hughbe/swift,karwa/swift,gottesmm/swift,huonw/swift,OscarSwanros/swift,ben-ng/swift,jckarter/swift,tjw/swift,zisko/swift,calebd/swift,jmgc/swift,arvedviehweger/swift,therealbnut/swift,practicalswift/swift,milseman/swift,manavgabhawala/swift,arvedviehweger/swift,swiftix/swift,devincoughlin/swift,natecook1000/swift,ahoppen/swift,ben-ng/swift,SwiftAndroid/swift,huonw/swift,sschiau/swift,airspeedswift/swift,uasys/swift,sschiau/swift,OscarSwanros/swift,hooman/swift,JGiola/swift,benlangmuir/swift,ben-ng/swift,rudkx/swift,lorentey/swift,brentdax/swift,deyton/swift,apple/swift,xedin/swift,austinzheng/swift,gottesmm/swift,milseman/swift,ben-ng/swift,kperryua/swift,OscarSwanros/swift,tardieu/swift,devincoughlin/swift,tinysun212/swift-windows,gmilos/swift,allevato/swift,codestergit/swift,jtbandes/swift,kstaring/swift,danielmartin/swift,atrick/swift,bitjammer/swift,xedin/swift,shajrawi/swift,nathawes/swift,aschwaighofer/swift,austinzheng/swift,jtbandes/swift,manavgabhawala/swift,codestergit/swift,zisko/swift,JaSpa/swift,atrick/swift,bitjammer/swift,return/swift,alblue/swift,danielmartin/swift,felix91gr/swift,sschiau/swift,nathawes/swift,gribozavr/swift,tkremenek/swift,jmgc/swift,hughbe/swift,allevato/swift,djwbrown/swift,glessard/swift,IngmarStein/swift,gottesmm/swift,kperryua/swift,frootloops/swift,JaSpa/swift,natecook1000/swift,huonw/swift,natecook1000/swift,therealbnut/swift,gribozavr/swift,jckarter/swift,karwa/swift,tjw/swift,glessard/swift,Jnosh/swift,allevato/swift,tardieu/swift,natecook1000/swift,frootloops/swift,milseman/swift,arvedviehweger/swift,tardieu/swift,gregomni/swift,xedin/swift,harlanhaskins/swift,practicalswift/swift,SwiftAndroid/swift,airspeedswift/swift,shahmishal/swift,jtbandes/swift,therealbnut/swift,kstaring/swift,apple/swift,codestergit/swift,parkera/swift,airspeedswift/swift,practicalswift/swift,deyton/swift,apple/swift,nathawes/swift,hughbe/swift,hughbe/swift,manavgabhawala/swift,shahmishal/swift,alblue/swift,brentdax/swift,jopamer/swift,Jnosh/swift,IngmarStein/swift,JaSpa/swift,jmgc/swift,roambotics/swift,djwbrown/swift,uasys/swift,uasys/swift,austinzheng/swift,johnno1962d/swift,bitjammer/swift,jtbandes/swift,milseman/swift,KrishMunot/swift,allevato/swift,sschiau/swift,IngmarStein/swift,johnno1962d/swift,amraboelela/swift,calebd/swift,atrick/swift,alblue/swift,tardieu/swift,apple/swift,CodaFi/swift,karwa/swift,calebd/swift,glessard/swift,return/swift,gregomni/swift,nathawes/swift,CodaFi/swift,gribozavr/swift,roambotics/swift,CodaFi/swift,johnno1962d/swift,tjw/swift,calebd/swift,austinzheng/swift,shahmishal/swift,tkremenek/swift,ken0nek/swift,airspeedswift/swift,tjw/swift,danielmartin/swift,tkremenek/swift,modocache/swift,lorentey/swift,aschwaighofer/swift,russbishop/swift,milseman/swift,allevato/swift,milseman/swift,jckarter/swift,xedin/swift
|
dbab7e6e9385e42426ecfe79c4679b05cd4438d4
|
bgc/DIC_ATMOS.h
|
bgc/DIC_ATMOS.h
|
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $
C $Name: $
COMMON /INTERACT_ATMOS_NEEDS/
& co2atmos,
& total_atmos_carbon, total_ocean_carbon,
& total_atmos_carbon_year,
& total_ocean_carbon_year,
& total_atmos_carbon_start,
& total_ocean_carbon_start,
& atpco2,total_atmos_moles
_RL co2atmos(1000)
_RL total_atmos_carbon
_RL total_ocean_carbon
_RL total_atmos_carbon_year
_RL total_atmos_carbon_start
_RL total_ocean_carbon_year
_RL total_ocean_carbon_start
_RL atpco2
_RL total_atmos_moles
|
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $
C $Name: $
COMMON /INTERACT_ATMOS_NEEDS/
& co2atmos,
& total_atmos_carbon, total_ocean_carbon,
& total_atmos_carbon_year,
& total_ocean_carbon_year,
& total_atmos_carbon_start,
& total_ocean_carbon_start,
& atpco2,total_atmos_moles
_RL co2atmos(1002)
_RL total_atmos_carbon
_RL total_ocean_carbon
_RL total_atmos_carbon_year
_RL total_atmos_carbon_start
_RL total_ocean_carbon_year
_RL total_ocean_carbon_start
_RL atpco2
_RL total_atmos_moles
|
Update length of co2atmos variable
|
Update length of co2atmos variable
|
C
|
mit
|
seamanticscience/mitgcm_mods,seamanticscience/mitgcm_mods
|
246d5ce439738b24d9881ddcd03ea8e53f20609f
|
VPUQuickTimePlayback/VPUSupport.h
|
VPUQuickTimePlayback/VPUSupport.h
|
//
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#define kVPUSPixelFormatTypeRGB_DXT1 'DXt1'
#define kVPUSPixelFormatTypeRGBA_DXT1 'DXT1'
#define kVPUSPixelFormatTypeRGBA_DXT5 'DXT5'
#define kVPUSPixelFormatTypeYCoCg_DXT5 'DYT5'
BOOL VPUSMovieHasVPUTrack(QTMovie *movie);
CFDictionaryRef VPUCreateCVPixelBufferOptionsDictionary();
#endif
|
//
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#define kVPUSPixelFormatTypeRGB_DXT1 'DXt1'
#define kVPUSPixelFormatTypeRGBA_DXT1 'DXT1'
#define kVPUSPixelFormatTypeRGBA_DXT5 'DXT5'
#define kVPUSPixelFormatTypeYCoCg_DXT5 'DYt5'
BOOL VPUSMovieHasVPUTrack(QTMovie *movie);
CFDictionaryRef VPUCreateCVPixelBufferOptionsDictionary();
#endif
|
Update pixel format type for CoreVideo Scaled YCoCg DXT5 to match change in codec
|
Update pixel format type for CoreVideo Scaled YCoCg DXT5 to match change in codec
|
C
|
bsd-2-clause
|
Vidvox/hap-quicktime-playback-demo
|
f1360fc78e8b536000bb4abd5146d0394a7d2e3c
|
cpp11-migrate/LoopConvert/LoopConvert.h
|
cpp11-migrate/LoopConvert/LoopConvert.h
|
//===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief This file provides the definition of the LoopConvertTransform
/// class which is the main interface to the loop-convert transform
/// that tries to make use of range-based for loops where possible.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#include "Transform.h"
#include "llvm/Support/Compiler.h" // For LLVM_OVERRIDE
/// \brief Subclass of Transform that transforms for-loops into range-based
/// for-loops where possible.
class LoopConvertTransform : public Transform {
public:
/// \brief \see Transform::run().
virtual int apply(const FileContentsByPath &InputStates,
RiskLevel MaxRiskLevel,
const clang::tooling::CompilationDatabase &Database,
const std::vector<std::string> &SourcePaths,
FileContentsByPath &ResultStates) LLVM_OVERRIDE;
};
#endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
|
//===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief This file provides the definition of the LoopConvertTransform
/// class which is the main interface to the loop-convert transform
/// that tries to make use of range-based for loops where possible.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#include "Transform.h"
#include "llvm/Support/Compiler.h" // For LLVM_OVERRIDE
/// \brief Subclass of Transform that transforms for-loops into range-based
/// for-loops where possible.
class LoopConvertTransform : public Transform {
public:
/// \see Transform::run().
virtual int apply(const FileContentsByPath &InputStates,
RiskLevel MaxRiskLevel,
const clang::tooling::CompilationDatabase &Database,
const std::vector<std::string> &SourcePaths,
FileContentsByPath &ResultStates) LLVM_OVERRIDE;
};
#endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
|
Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command)
|
Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command)
git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@172661 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
|
029422ddadc251b23cc2441bd42c46f8172a44b0
|
src/core/SkEdgeBuilder.h
|
src/core/SkEdgeBuilder.h
|
#ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
class SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** edgeList() { return fList.begin(); }
private:
SkChunkAlloc fAlloc;
SkTDArray<SkEdge*> fList;
int fShiftUp;
void addLine(const SkPoint pts[]);
void addQuad(const SkPoint pts[]);
void addCubic(const SkPoint pts[]);
void addClipper(SkEdgeClipper*);
};
#endif
|
#ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
struct SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** edgeList() { return fList.begin(); }
private:
SkChunkAlloc fAlloc;
SkTDArray<SkEdge*> fList;
int fShiftUp;
void addLine(const SkPoint pts[]);
void addQuad(const SkPoint pts[]);
void addCubic(const SkPoint pts[]);
void addClipper(SkEdgeClipper*);
};
#endif
|
Fix warning (struct forward-declared as class).
|
Fix warning (struct forward-declared as class).
Review URL: http://codereview.appspot.com/164061
|
C
|
bsd-3-clause
|
csulmone/skia,csulmone/skia,csulmone/skia,csulmone/skia
|
3c7cc7cad858aaf4b656863f6ab405ef05a2d42e
|
src/qt/clicklabel.h
|
src/qt/clicklabel.h
|
#ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseReleaseEvent(QMouseEvent *event);
};
#endif // CLICKLABEL_H
|
#ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseReleaseEvent(QMouseEvent *event);
};
#endif // CLICKLABEL_H
|
Use nullptr to stay Qt4 compatible.
|
Use nullptr to stay Qt4 compatible.
|
C
|
mit
|
Git-Jiro/Gridcoin-Research,caraka/gridcoinresearch,theMarix/Gridcoin-Research,theMarix/Gridcoin-Research,TheCharlatan/Gridcoin-Research,TheCharlatan/Gridcoin-Research,TheCharlatan/Gridcoin-Research,caraka/gridcoinresearch,tomasbrod/Gridcoin-Research,theMarix/Gridcoin-Research,TheCharlatan/Gridcoin-Research,Git-Jiro/Gridcoin-Research,gridcoin/Gridcoin-Research,tomasbrod/Gridcoin-Research,theMarix/Gridcoin-Research,caraka/gridcoinresearch,caraka/gridcoinresearch,Git-Jiro/Gridcoin-Research,theMarix/Gridcoin-Research,gridcoin/Gridcoin-Research,caraka/gridcoinresearch,gridcoin/Gridcoin-Research,theMarix/Gridcoin-Research,tomasbrod/Gridcoin-Research,gridcoin/Gridcoin-Research,Git-Jiro/Gridcoin-Research,gridcoin/Gridcoin-Research,Git-Jiro/Gridcoin-Research,gridcoin/Gridcoin-Research,tomasbrod/Gridcoin-Research,tomasbrod/Gridcoin-Research,TheCharlatan/Gridcoin-Research,caraka/gridcoinresearch
|
139936b34a895520e9ee8b9a6d3f774754cdcc48
|
lib/libF77/d_lg10.c
|
lib/libF77/d_lg10.c
|
#include "f2c.h"
#define log10e 0.43429448190325182765
#ifdef KR_headers
double log();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10e * log(*x) );
}
|
#include "f2c.h"
#ifdef KR_headers
double log10();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10(*x) );
}
|
Use the C library version of log10() instead of the inaccurate formula log10(x) = log10e * log(x). This fixes some small (one or two ULP) inaccuracies.
|
Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x). This fixes some small (one or two ULP)
inaccuracies.
Found by: ucbtest
|
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
|
cfdaffb8cf65ab0a934de2efb513e66989b4bad6
|
src/lib/elm_map_legacy.h
|
src/lib/elm_map_legacy.h
|
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
#include "elm_map.eo.legacy.h"
|
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
/**
* @internal
*
* @brief Requests a list of addresses corresponding to a given name.
*
* @since 1.8
*
* @remarks This is used if you want to search the address from a name.
*
* @param obj The map object
* @param address The address
* @param name_cb The callback function
* @param data The user callback data
*
* @ingroup Map
*/
EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
#include "elm_map.eo.legacy.h"
|
Add missing legacy API into legacy header
|
map: Add missing legacy API into legacy header
Summary: @fix
Reviewers: raster
Reviewed By: raster
Differential Revision: https://phab.enlightenment.org/D1164
|
C
|
lgpl-2.1
|
FlorentRevest/Elementary,tasn/elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,rvandegrift/elementary
|
bc7ac5431ddd2dd96f0b7b25a3e7c94b40a6bbe1
|
src/lib/abstracthighlighter_p.h
|
src/lib/abstracthighlighter_p.h
|
/*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_P_H
#define KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_P_H
#include "definition.h"
#include "theme.h"
class QStringList;
namespace KSyntaxHighlighting {
class ContextSwitch;
class StateData;
class AbstractHighlighterPrivate
{
public:
AbstractHighlighterPrivate();
virtual ~AbstractHighlighterPrivate();
void ensureDefinitionLoaded();
bool switchContext(StateData* data, const ContextSwitch &contextSwitch, const QStringList &captures);
Definition m_definition;
Theme m_theme;
};
}
#endif
|
/*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTER_P_H
#define KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTER_P_H
#include "definition.h"
#include "theme.h"
class QStringList;
namespace KSyntaxHighlighting {
class ContextSwitch;
class StateData;
class AbstractHighlighterPrivate
{
public:
AbstractHighlighterPrivate();
virtual ~AbstractHighlighterPrivate();
void ensureDefinitionLoaded();
bool switchContext(StateData* data, const ContextSwitch &contextSwitch, const QStringList &captures);
Definition m_definition;
Theme m_theme;
};
}
#endif
|
Fix typo in include guard
|
Fix typo in include guard
Found by krazy.
|
C
|
lgpl-2.1
|
janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting
|
4fa4c1d56adc1005ce856580848a11bc11598e09
|
src/configuration.h
|
src/configuration.h
|
#ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "APM Planner"
#define QGC_APPLICATION_VERSION "v2.0.0 (beta)"
namespace QGC
{
const QString APPNAME = "APMPLANNER2";
const QString COMPANYNAME = "DIYDRONES";
const int APPLICATIONVERSION = 200; // 1.0.9
}
#endif // QGC_CONFIGURATION_H
|
#ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "APM Planner"
#define QGC_APPLICATION_VERSION "v2.0.0 (alpha-RC1)"
namespace QGC
{
const QString APPNAME = "APMPLANNER2";
const QString COMPANYNAME = "DIYDRONES";
const int APPLICATIONVERSION = 200; // 1.0.9
}
#endif // QGC_CONFIGURATION_H
|
Change for alpha-RC1 version name
|
Change for alpha-RC1 version name
|
C
|
agpl-3.0
|
xros/apm_planner,sutherlandm/apm_planner,xros/apm_planner,LittleBun/apm_planner,labtoast/apm_planner,duststorm/apm_planner,hejunbok/apm_planner,mrpilot2/apm_planner,diydrones/apm_planner,LIKAIMO/apm_planner,mirkix/apm_planner,Icenowy/apm_planner,hejunbok/apm_planner,abcdelf/apm_planner,xros/apm_planner,LIKAIMO/apm_planner,gpaes/apm_planner,kellyschrock/apm_planner,dcarpy/apm_planner,duststorm/apm_planner,chen0510566/apm_planner,381426068/apm_planner,mrpilot2/apm_planner,gpaes/apm_planner,dcarpy/apm_planner,mirkix/apm_planner,mrpilot2/apm_planner,LIKAIMO/apm_planner,kellyschrock/apm_planner,mrpilot2/apm_planner,dcarpy/apm_planner,Icenowy/apm_planner,LittleBun/apm_planner,dcarpy/apm_planner,381426068/apm_planner,xros/apm_planner,381426068/apm_planner,kellyschrock/apm_planner,sutherlandm/apm_planner,mirkix/apm_planner,duststorm/apm_planner,xros/apm_planner,gpaes/apm_planner,Icenowy/apm_planner,mrpilot2/apm_planner,duststorm/apm_planner,chen0510566/apm_planner,WorkerBees/apm_planner,labtoast/apm_planner,mrpilot2/apm_planner,diydrones/apm_planner,Icenowy/apm_planner,kellyschrock/apm_planner,labtoast/apm_planner,abcdelf/apm_planner,abcdelf/apm_planner,LittleBun/apm_planner,kellyschrock/apm_planner,chen0510566/apm_planner,381426068/apm_planner,abcdelf/apm_planner,mirkix/apm_planner,Icenowy/apm_planner,WorkerBees/apm_planner,hejunbok/apm_planner,dcarpy/apm_planner,sutherlandm/apm_planner,dcarpy/apm_planner,LittleBun/apm_planner,diydrones/apm_planner,duststorm/apm_planner,diydrones/apm_planner,labtoast/apm_planner,WorkerBees/apm_planner,sutherlandm/apm_planner,labtoast/apm_planner,gpaes/apm_planner,xros/apm_planner,diydrones/apm_planner,diydrones/apm_planner,labtoast/apm_planner,sutherlandm/apm_planner,LIKAIMO/apm_planner,LittleBun/apm_planner,hejunbok/apm_planner,381426068/apm_planner,LIKAIMO/apm_planner,381426068/apm_planner,Icenowy/apm_planner,mirkix/apm_planner,kellyschrock/apm_planner,chen0510566/apm_planner,chen0510566/apm_planner,hejunbok/apm_planner,WorkerBees/apm_planner,gpaes/apm_planner,sutherlandm/apm_planner,gpaes/apm_planner,LIKAIMO/apm_planner,LittleBun/apm_planner,abcdelf/apm_planner,hejunbok/apm_planner,duststorm/apm_planner,abcdelf/apm_planner,mirkix/apm_planner,chen0510566/apm_planner
|
5475567b7f05fbc245cedb1b3ecdbc63ac671685
|
src/atoin.c
|
src/atoin.c
|
/*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.4 2004-12-13 14:21:55 heikki Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
/**
* atoi_n: like atoi but reads at most len characters.
*/
int atoi_n (const char *buf, int len)
{
int val = 0;
while (--len >= 0)
{
if (isdigit (*(const unsigned char *) buf))
val = val*10 + (*buf - '0');
buf++;
}
return val;
}
|
/*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.5 2004-12-16 08:59:56 adam Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
#include <yaz/marcdisp.h>
/**
* atoi_n: like atoi but reads at most len characters.
*/
int atoi_n (const char *buf, int len)
{
int val = 0;
while (--len >= 0)
{
if (isdigit (*(const unsigned char *) buf))
val = val*10 + (*buf - '0');
buf++;
}
return val;
}
|
Include marcdisp.h so that atoi_n gets public on WIN32
|
Include marcdisp.h so that atoi_n gets public on WIN32
|
C
|
bsd-3-clause
|
nla/yaz,nla/yaz,nla/yaz,dcrossleyau/yaz,nla/yaz,dcrossleyau/yaz,dcrossleyau/yaz
|
ead111a8e26f98570cfdb9b3b849e5fac3ca7e7b
|
ext/rbuv/rbuv.c
|
ext/rbuv/rbuv.c
|
#include "rbuv.h"
ID id_call;
VALUE mRbuv;
void Init_rbuv() {
id_call = rb_intern("call");
mRbuv = rb_define_module("Rbuv");
Init_rbuv_error();
Init_rbuv_handle();
Init_rbuv_loop();
Init_rbuv_timer();
Init_rbuv_stream();
Init_rbuv_tcp();
Init_rbuv_signal();
}
|
#include "rbuv.h"
ID id_call;
VALUE mRbuv;
VALUE rbuv_version(VALUE self);
VALUE rbuv_version_string(VALUE self);
void Init_rbuv() {
id_call = rb_intern("call");
mRbuv = rb_define_module("Rbuv");
rb_define_singleton_method(mRbuv, "version", rbuv_version, 0);
rb_define_singleton_method(mRbuv, "version_string", rbuv_version_string, 0);
Init_rbuv_error();
Init_rbuv_handle();
Init_rbuv_loop();
Init_rbuv_timer();
Init_rbuv_stream();
Init_rbuv_tcp();
Init_rbuv_signal();
}
VALUE rbuv_version(VALUE self) {
return UINT2NUM(uv_version());
}
VALUE rbuv_version_string(VALUE self) {
return rb_str_new2(uv_version_string());
}
|
Add singleton methods to access libuv version
|
Add singleton methods to access libuv version
|
C
|
mit
|
arthurdandrea/rbuv,arthurdandrea/rbuv
|
eb70a569253926f60eab5a9c6d693908b3dd11b9
|
src/jcon/json_rpc_result.h
|
src/jcon/json_rpc_result.h
|
#pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toString() const = 0;
};
}
|
#pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
operator bool() const { return isSuccess(); }
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toString() const = 0;
};
}
|
Add conversion-to-bool operator to JsonRpcResult class
|
Add conversion-to-bool operator to JsonRpcResult class
|
C
|
mit
|
zeromem88/jcon-cpp,zeromem88/jcon-cpp,joncol/jcon,joncol/jcon-cpp,joncol/jcon,joncol/jcon-cpp,joncol/jcon-cpp,zeromem88/jcon-cpp,joncol/jcon
|
4f172d10cffb59af5b7ef99bf18978462320cf6b
|
src/parse/stmt/parameter.c
|
src/parse/stmt/parameter.c
|
#include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
if (ptr[i++] != '(')
{
parse_debug_rewind(debug, dpos);
return 0;
}
unsigned l;
stmt->parameter.list = parse_assign_list(
src, &ptr[i], debug, &l);
if (!stmt->parameter.list)
{
parse_debug_rewind(debug, dpos);
return 0;
}
i += l;
if (ptr[i++] != ')')
{
parse_assign_list_delete(
stmt->parameter.list);
parse_debug_rewind(debug, dpos);
return 0;
}
stmt->type = PARSE_STMT_PARAMETER;
return i;
}
bool parse_stmt_parameter_print(
int fd, const parse_stmt_t* stmt)
{
if (!stmt)
return false;
return (dprintf_bool(fd, "PARAMETER ")
&& parse_assign_list_print(
fd, stmt->parameter.list));
}
|
#include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
bool has_brackets = (ptr[i] == '(');
if (has_brackets) i += 1;
unsigned l;
stmt->parameter.list = parse_assign_list(
src, &ptr[i], debug, &l);
if (!stmt->parameter.list)
{
parse_debug_rewind(debug, dpos);
return 0;
}
i += l;
if (has_brackets)
{
if (ptr[i++] != ')')
{
parse_assign_list_delete(
stmt->parameter.list);
parse_debug_rewind(debug, dpos);
return 0;
}
}
stmt->type = PARSE_STMT_PARAMETER;
return i;
}
bool parse_stmt_parameter_print(
int fd, const parse_stmt_t* stmt)
{
if (!stmt)
return false;
return (dprintf_bool(fd, "PARAMETER ")
&& parse_assign_list_print(
fd, stmt->parameter.list));
}
|
Support DEC style PARAMETER statements
|
Support DEC style PARAMETER statements
This is a non-standard feature, but it's easy to support.
http://fortranwiki.org/fortran/show/Modernizing+Old+Fortran
|
C
|
apache-2.0
|
CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc
|
708004157299c728b304385f3f4255ffbd587f60
|
kernel/core/test.c
|
kernel/core/test.c
|
#include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
//__asm__("movb $0x0, %al; outb %al, $0xf4");
__asm__("movb $0xf4, %al; outb %al, $0x0");
__asm__("movb $0x0, %al; outb %al, $0xf4");
halt();
//write_port(2, TEST_RESULT_PORT_NUMBER);
assert(Not_Reached);
}
|
#include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
halt();
assert(Not_Reached);
}
|
Remove debug messages and duplicate code
|
Remove debug messages and duplicate code
|
C
|
mit
|
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
|
7f16d7067e11d2684b644c8af7c21cdc77b32723
|
lib/Headers/cpuid.h
|
lib/Headers/cpuid.h
|
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
static inline int __get_cpuid (unsigned int level, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
unsigned int *edx) {
asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level));
return 1;
}
|
/*===---- cpuid.h - Basic type definitions ---------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
static inline int __get_cpuid (unsigned int level, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
unsigned int *edx) {
asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level));
return 1;
}
|
Fix file name in comments.
|
Fix file name in comments.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@145184 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
446affcc0b9fb45d67969d6f91d9adf221e055c5
|
libyaul/cons/vdp1.c
|
libyaul/cons/vdp1.c
|
/*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <mrko@eecs.berkeley.edu>
*/
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static struct cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t);
void
cons_vdp1_init(struct cons *cons)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons_vdp1_new();
cons->driver = cons_vdp1;
cons->write = cons_vdp1_write;
cons_reset(cons);
}
static struct cons_vdp1_t *
cons_vdp1_new(void)
{
static struct cons_vdp1_t cons_vdp1;
return &cons_vdp1;
}
static void
cons_vdp1_write(struct cons *cons, int c, uint8_t fg, uint8_t bg)
{
}
|
/*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <mrko@eecs.berkeley.edu>
*/
#include <inttypes.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_reset(struct cons *);
static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t);
void
cons_vdp1_init(struct cons *cons)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons_vdp1_new();
cons->driver = cons_vdp1;
cons->write = cons_vdp1_write;
cons->reset = cons_vdp1_reset;
cons_reset(cons);
}
static cons_vdp1_t *
cons_vdp1_new(void)
{
/* XXX Replace with TLSF */
static cons_vdp1_t cons_vdp1;
return &cons_vdp1;
}
static void
cons_vdp1_reset(struct cons *cons)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons->driver;
/* Reset */
}
static void
cons_vdp1_write(struct cons *cons, int c, uint8_t fg, uint8_t bg)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons->driver;
}
|
Change stubs for VDP1 cons driver
|
Change stubs for VDP1 cons driver
|
C
|
mit
|
ChillyWillyGuru/libyaul,ChillyWillyGuru/libyaul
|
a014838c02b0abb209e0a182c46574455ea5cd0b
|
kernel/kernel.c
|
kernel/kernel.c
|
#include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Install descriptor tables
install_gdt();
install_idt();
install_isrs();
install_irq();
install_keyboard();
asm volatile ("sti");
//Set up VGA text mode, and print a welcome message
initialize_screen();
set_text_colors(VGA_COLOR_LIGHT_GRAY, VGA_COLOR_BLACK);
clear_screen();
printf("NorbyOS v%s\n", NORBY_VERSION);
char* buffer;
while(1) {
printf("==> ");
gets_s(buffer, 100);
if(strcmp(buffer, "colortest") == 0) {
colortest();
}
}
//Enter an endless loop. If you disable this, another loop in boot.asm will
//start, but interrupts will be disabled.
while (1) {}
}
|
#include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Install descriptor tables
install_gdt();
install_idt();
install_isrs();
install_irq();
install_keyboard();
asm volatile ("sti");
//Set up VGA text mode, and print a welcome message
initialize_screen();
set_text_colors(VGA_COLOR_LIGHT_GRAY, VGA_COLOR_BLACK);
clear_screen();
printf("NorbyOS v%s\n", NORBY_VERSION);
char* buffer;
while(1) {
printf("==> ");
gets_s(buffer, 100);
if(strcmp(buffer, "colortest") == 0) {
colortest();
}
else if(strcmp(buffer, "clear") == 0) {
clear_screen();
}
}
//Enter an endless loop. If you disable this, another loop in boot.asm will
//start, but interrupts will be disabled.
while (1) {}
}
|
Add "clear" command for clearing screen
|
Add "clear" command for clearing screen
|
C
|
mit
|
simon-andrews/norby,simon-andrews/norby,simon-andrews/norby
|
a9dbb6171167387492343a681a87558d047fb5b8
|
test/CodeGen/unwind-attr.c
|
test/CodeGen/unwind-attr.c
|
// RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
|
// RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 &&
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
|
Fix test case RUN: line (thanks Argiris)
|
Fix test case RUN: line (thanks Argiris)
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@54922 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
|
df16cf042b6085f68b4263e24f29ad61be71cea8
|
nsswitch-internal.h
|
nsswitch-internal.h
|
/*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include "config.h"
/* glibc/config.h.in */
#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute__ ((regparm (3), stdcall))
#else
# define internal_function
#endif
/* glibc/nss/nsswitch.h */
typedef struct service_user service_user;
extern int __nss_next (service_user **ni, const char *fct_name, void **fctp,
int status, int all_values);
extern int __nss_database_lookup (const char *database,
const char *alternative_name,
const char *defconfig, service_user **ni);
extern void *__nss_lookup_function (service_user *ni, const char *fct_name);
/* glibc/nss/XXX-lookup.c */
extern int __nss_passwd_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
extern int __nss_group_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
#endif /* NSSWITCH_INTERNAL_H */
|
/*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include <features.h>
#include "config.h"
/* glibc/config.h.in */
#if __GLIBC_PREREQ(2, 27)
# define internal_function
#elif defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute__ ((regparm (3), stdcall))
#else
# define internal_function
#endif
/* glibc/nss/nsswitch.h */
typedef struct service_user service_user;
extern int __nss_next (service_user **ni, const char *fct_name, void **fctp,
int status, int all_values);
extern int __nss_database_lookup (const char *database,
const char *alternative_name,
const char *defconfig, service_user **ni);
extern void *__nss_lookup_function (service_user *ni, const char *fct_name);
/* glibc/nss/XXX-lookup.c */
extern int __nss_passwd_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
extern int __nss_group_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
#endif /* NSSWITCH_INTERNAL_H */
|
Update internal glibc functions ABI for glibc 2.27
|
Update internal glibc functions ABI for glibc 2.27
Signed-off-by: Anders Kaseorg <087231934ba8fcf78bc142ce37d193b895ac03c4@mit.edu>
|
C
|
lgpl-2.1
|
andersk/nss_nonlocal,andersk/nss_nonlocal
|
9d9b91c4dfe47ef3d32ecc241461955d3c26b3bc
|
src/clientversion.h
|
src/clientversion.h
|
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 5
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
|
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 6
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
|
Increase version to 1.0.2.6 r6
|
Increase version to 1.0.2.6 r6
|
C
|
mit
|
memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core
|
bf0d3c50784e0f7a1bb590a3979eba7c50726b1c
|
chap1/ftoc.c
|
chap1/ftoc.c
|
#include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
int fahr;
int cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
fahr = lower;
while (fahr <= upper) {
cel = 5 * (fahr - 32) / 9;
printf("%3d\t%6d\n", fahr, cel);
fahr += step;
}
}
|
#include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
float fahr;
float cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
fahr = lower;
while (fahr <= upper) {
cel = (5.0 / 9.0) * (fahr - 32.0);
printf("%3.0f\t%6.1f\n", fahr, cel);
fahr += step;
}
}
|
Change from `int` to `float`
|
Change from `int` to `float`
|
C
|
mit
|
jabocg/theclang
|
3d9b68a94760fa90e3d380525f5547fa8a945538
|
os/gl/gl_context.h
|
os/gl/gl_context.h
|
// LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext {
public:
virtual ~GLContext() { }
virtual bool isValid() = 0;
virtual bool createGLContext() = 0;
virtual void destroyGLContext() = 0;
virtual void makeCurrent() = 0;
virtual void swapBuffers() = 0;
};
} // namespace os
#endif
|
// LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext {
public:
virtual ~GLContext() { }
virtual bool isValid() { return false; }
virtual bool createGLContext() { }
virtual void destroyGLContext() { }
virtual void makeCurrent() { }
virtual void swapBuffers() { }
};
} // namespace os
#endif
|
Make os::GLContext instantiable (isValid() returns false by default)
|
Make os::GLContext instantiable (isValid() returns false by default)
|
C
|
mit
|
aseprite/laf,aseprite/laf
|
5d4c2bb7b6f10ed33ea32ea97f070766a5ec6f2b
|
src/vistk/scoring/score_mask.h
|
src/vistk/scoring/score_mask.h
|
/*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring-config.h"
#include "scoring_result.h"
#include <vil/vil_image_view.h>
/**
* \file mask_scoring.h
*
* \brief A function for scoring a mask.
*/
namespace vistk
{
/// A typedef for a mask image.
typedef vil_image_view<bool> mask_t;
/**
* \brief Scores a computed mask against a truth mask.
*
* \note The input images are expected to be the same size.
*
* \todo Add error handling to the function (invalid sizes, etc.).
*
* \param truth The truth mask.
* \param computed The computed mask.
*
* \returns The results of the scoring.
*/
scoring_result_t VISTK_SCORING_EXPORT score_mask(mask_t const& truth_mask, mask_t const& computed_mask);
}
#endif // VISTK_SCORING_SCORE_MASK_H
|
/*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring-config.h"
#include "scoring_result.h"
#include <vil/vil_image_view.h>
#include <boost/cstdint.hpp>
/**
* \file mask_scoring.h
*
* \brief A function for scoring a mask.
*/
namespace vistk
{
/// A typedef for a mask image.
typedef vil_image_view<uint8_t> mask_t;
/**
* \brief Scores a computed mask against a truth mask.
*
* \note The input images are expected to be the same size.
*
* \todo Add error handling to the function (invalid sizes, etc.).
*
* \param truth The truth mask.
* \param computed The computed mask.
*
* \returns The results of the scoring.
*/
scoring_result_t VISTK_SCORING_EXPORT score_mask(mask_t const& truth_mask, mask_t const& computed_mask);
}
#endif // VISTK_SCORING_SCORE_MASK_H
|
Use bytes for mask images
|
Use bytes for mask images
|
C
|
bsd-3-clause
|
linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,Kitware/sprokit,Kitware/sprokit,mathstuf/sprokit,mathstuf/sprokit,Kitware/sprokit,linus-sherrill/sprokit
|
8ebc25895f4832b73950ca32522dcb51e8ea8f5d
|
src/kernel/kernel.h
|
src/kernel/kernel.h
|
#ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
#endif
|
#ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
enum STATUS_CODE
{
// General
GENERAL_SUCCESS,
GENERAL_FAILURE
}
#endif
|
Create an enum for all posible function return status codes
|
Create an enum for all posible function return status codes
|
C
|
bsd-3-clause
|
TwoUnderscorez/DuckOS,TwoUnderscorez/DuckOS,TwoUnderscorez/DuckOS
|
68b56a8eb5f6b950fcd11b089f726bf7aaf7a311
|
tools/qb_blackbox.c
|
tools/qb_blackbox.c
|
/*
* Copyright (C) 2012 Andrew Beekhof <andrew@beekhof.net>
*
* libqb is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* libqb 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 libqb. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qb/qblog.h>
int
main(int argc, char **argv)
{
int lpc = 0;
for(lpc = 1; lpc < argc && argv[lpc] != NULL; lpc++) {
printf("Dumping the contents of %s\n", argv[lpc]);
qb_log_blackbox_print_from_file(argv[lpc]);
}
return 0;
}
|
/*
* Copyright (C) 2012 Andrew Beekhof <andrew@beekhof.net>
*
* libqb is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* libqb 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 libqb. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qb/qblog.h>
int
main(int argc, char **argv)
{
int lpc = 0;
qb_log_init("qb_blackbox", LOG_USER, LOG_TRACE);
qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_TRUE);
qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "*", LOG_TRACE);
for(lpc = 1; lpc < argc && argv[lpc] != NULL; lpc++) {
printf("Dumping the contents of %s\n", argv[lpc]);
qb_log_blackbox_print_from_file(argv[lpc]);
}
return 0;
}
|
Enable error logging for the blackbox reader
|
Enable error logging for the blackbox reader
|
C
|
lgpl-2.1
|
davidvossel/libqb,davidvossel/libqb,rubenk/libqb,ClusterLabs/libqb,kgaillot/libqb,kgaillot/libqb,kgaillot/libqb,gao-yan/libqb,ClusterLabs/libqb,ClusterLabs/libqb,gao-yan/libqb,rubenk/libqb
|
b17dbf109de8dae1f917302c383093485beefa10
|
ios/RNCallKit/RNCallKit.h
|
ios/RNCallKit/RNCallKit.h
|
//
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import "RCTEventEmitter.h"
@interface RNCallKit : RCTEventEmitter <CXProviderDelegate>
@property (nonatomic, strong) CXCallController *callKitCallController;
@property (nonatomic, strong) CXProvider *callKitProvider;
+ (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options NS_AVAILABLE_IOS(9_0);
+ (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler;
@end
|
//
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import <React/RCTEventEmitter.h>
@interface RNCallKit : RCTEventEmitter <CXProviderDelegate>
@property (nonatomic, strong) CXCallController *callKitCallController;
@property (nonatomic, strong) CXProvider *callKitProvider;
+ (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options NS_AVAILABLE_IOS(9_0);
+ (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler;
@end
|
Fix incorrect import on React-Native >=0.40
|
Fix incorrect import on React-Native >=0.40
For reference, see here:
https://github.com/facebook/react-native/commit/e1577df1fd70049ce7f288f91f6e2b18d512ff4d
|
C
|
isc
|
ianlin/react-native-callkit,ianlin/react-native-callkit,killian90/react-native-callkit
|
e7c1ac5d6e80b5def95a61fdb7eb79f4da9e45cb
|
Runtime/Rendering/ResourceDX11.h
|
Runtime/Rendering/ResourceDX11.h
|
#pragma once
#include "Rendering/RendererDX11.h"
namespace Mile
{
enum class ERenderResourceType
{
VertexBuffer,
IndexBuffer,
ConstantBuffer,
StructuredBuffer,
ByteAddressBuffer,
IndirectArgumentsBuffer,
Texture1D,
Texture2D,
Texture3D,
RenderTarget,
DepthStencilBuffer,
Cubemap
};
class RendererDX11;
class MEAPI ResourceDX11
{
public:
ResourceDX11(RendererDX11* renderer) :
m_bIsInitialized(false),
m_renderer(renderer)
{
}
virtual ~ResourceDX11()
{
}
virtual ID3D11Resource* GetResource() const = 0;
virtual ERenderResourceType GetResourceType() const = 0;
FORCEINLINE bool IsInitialized() const { return m_bIsInitialized; }
FORCEINLINE bool HasAvailableRenderer() const { return (m_renderer != nullptr); }
FORCEINLINE RendererDX11* GetRenderer() const { return m_renderer; }
protected:
FORCEINLINE void ConfirmInitialize() { m_bIsInitialized = true; }
private:
RendererDX11* m_renderer;
bool m_bIsInitialized;
};
}
|
#pragma once
#include "Rendering/RendererDX11.h"
#include "Core/Engine.h"
namespace Mile
{
enum class ERenderResourceType
{
VertexBuffer,
IndexBuffer,
ConstantBuffer,
StructuredBuffer,
ByteAddressBuffer,
IndirectArgumentsBuffer,
Texture1D,
Texture2D,
Texture3D,
RenderTarget,
DepthStencilBuffer,
DynamicCubemap
};
class RendererDX11;
class MEAPI ResourceDX11
{
public:
ResourceDX11(RendererDX11* renderer) :
m_bIsInitialized(false),
m_renderer(renderer)
{
}
virtual ~ResourceDX11()
{
m_renderer = nullptr;
}
virtual ID3D11Resource* GetResource() const = 0;
virtual ERenderResourceType GetResourceType() const = 0;
FORCEINLINE bool IsInitialized() const { return m_bIsInitialized; }
FORCEINLINE bool HasAvailableRenderer() const
{
return (m_renderer != nullptr) && (Engine::GetRenderer() == m_renderer);
}
FORCEINLINE RendererDX11* GetRenderer() const { return m_renderer; }
protected:
FORCEINLINE void ConfirmInitialize() { m_bIsInitialized = true; }
private:
RendererDX11* m_renderer;
bool m_bIsInitialized;
};
}
|
Modify HasAvailableRenderer method to check actually matched with Engine owned renderer
|
Modify HasAvailableRenderer method to check actually matched with Engine owned renderer
|
C
|
mit
|
HoRangDev/MileEngine,HoRangDev/MileEngine
|
7efded33d1a46f193690b9efb70e033a43984e66
|
util/malloccache.h
|
util/malloccache.h
|
#ifndef MALLOCCACHE_H
#define MALLOCCACHE_H
template <size_t blockSize, size_t blockCount>
class MallocCache
{
public:
MallocCache()
: m_blocksCached(0)
{
}
~MallocCache()
{
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
for (size_t i = 0; i < m_blocksCached; i++) {
::free(m_blocks[i]);
}
}
void *allocate()
{
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
if (m_blocksCached) {
return m_blocks[--m_blocksCached];
} else {
return ::malloc(blockSize);
}
}
void free(void *allocation)
{
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
if (m_blocksCached < blockCount) {
m_blocks[m_blocksCached++] = allocation;
} else {
::free(allocation);
}
}
private:
void *m_blocks[blockCount];
size_t m_blocksCached;
};
#endif // MALLOCCACHE_H
|
#ifndef MALLOCCACHE_H
#define MALLOCCACHE_H
// no-op the cache, sometimes useful for debugging memory issues
//#define MALLOCCACHE_PASSTHROUGH
template <size_t blockSize, size_t blockCount>
class MallocCache
{
public:
MallocCache()
: m_blocksCached(0)
{
}
~MallocCache()
{
#ifndef MALLOCCACHE_PASSTHROUGH
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
for (size_t i = 0; i < m_blocksCached; i++) {
::free(m_blocks[i]);
}
#endif
}
void *allocate()
{
#ifndef MALLOCCACHE_PASSTHROUGH
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
if (m_blocksCached) {
return m_blocks[--m_blocksCached];
} else {
return ::malloc(blockSize);
}
#else
return ::malloc(blockSize);
#endif
}
void free(void *allocation)
{
#ifndef MALLOCCACHE_PASSTHROUGH
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
if (m_blocksCached < blockCount) {
m_blocks[m_blocksCached++] = allocation;
} else {
::free(allocation);
}
#else
::free(allocation);
#endif
}
private:
void *m_blocks[blockCount];
size_t m_blocksCached;
};
#endif // MALLOCCACHE_H
|
Add an ifdef to disable MallocCache for debugging.
|
Add an ifdef to disable MallocCache for debugging.
|
C
|
lgpl-2.1
|
KDE/dferry,KDE/dferry
|
9b4360b6b8e1ba4234f5b11b8217379faafcb3b7
|
app/src/adb_parser.h
|
app/src/adb_parser.h
|
#ifndef SC_ADB_PARSER_H
#define SC_ADB_PARSER_H
#include "common.h"
#include "stddef.h"
/**
* Parse the ip from the output of `adb shell ip route`
*/
char *
sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len);
#endif
|
#ifndef SC_ADB_PARSER_H
#define SC_ADB_PARSER_H
#include "common.h"
#include "stddef.h"
/**
* Parse the ip from the output of `adb shell ip route`
*
* Warning: this function modifies the buffer for optimization purposes.
*/
char *
sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len);
#endif
|
Add warning in function documentation
|
Add warning in function documentation
The function parsing "ip route" output modifies the input buffer to
tokenize in place. This must be mentioned in the function documentation.
|
C
|
apache-2.0
|
Genymobile/scrcpy,Genymobile/scrcpy,Genymobile/scrcpy
|
d1ad3c1bfafd23a8e97f58de84cb609ded486c62
|
scripts/startclose/moreInfo.c
|
scripts/startclose/moreInfo.c
|
startclose: moreInfo
New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ]
Go to Layout [ “about” (tempSetup) ]
Adjust Window
[ Resize to Fit ]
Pause/Resume Script [ Indefinitely ]
January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1-
|
startclose: moreInfo
New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ]
Go to Layout [ “moreinfo” (tempSetup) ]
Adjust Window
[ Resize to Fit ]
Pause/Resume Script [ Indefinitely ]
January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1-
|
Change more info window layout name
|
Change more info window layout name
|
C
|
apache-2.0
|
HelpGiveThanks/Library,HelpGiveThanks/Library
|
9dfa879c1264d0f10fb96915b04e2cc106abce3b
|
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
|
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
|
709e6f102189171dfd6b6e9349a741f29bc00660
|
xs/APR/OS/APR__OS.h
|
xs/APR/OS/APR__OS.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.
*/
static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX)
{
#if APR_HAS_THREADS
return (U32)apr_os_thread_current();
#else
return 0;
#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.
*/
static MP_INLINE unsigned long mpxs_APR__OS_current_thread_id(pTHX)
{
#if APR_HAS_THREADS
return (unsigned long)apr_os_thread_current();
#else
return 0;
#endif
}
|
Fix on fbsd amd64 where U32 is 4 bytes and pthread_t is 8.
|
Fix on fbsd amd64 where U32 is 4 bytes and pthread_t is 8.
xs/APR/OS/APR__OS.h: In function 'mpxs_APR__OS_current_thread_id':
xs/APR/OS/APR__OS.h:20: warning: cast from pointer to integer of different size
Consistently cast this to an unsigned long.
git-svn-id: b4be4a41b2a3352907de631eb6da1671a2f7b614@983068 13f79535-47bb-0310-9956-ffa450edef68
|
C
|
apache-2.0
|
Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl
|
6ad9eb749dcae5a1b2e3d5a3b4cd783c9c8c7224
|
cqrs/artifact_view.h
|
cqrs/artifact_view.h
|
#pragma once
#include "cqrs/artifact.h"
namespace cddd {
namespace cqrs {
template<class> class basic_artifact_view;
template<class DomainEventDispatcher, class DomainEventContainer>
class basic_artifact_view<basic_artifact<DomainEventDispatcher, DomainEventContainer>> {
public:
using id_type = typename basic_artifact<DomainEventDispatcher, DomainEventContainer>::id_type;
using size_type = typename basic_artifact<DomainEventDispatcher, DomainEventContainer>::size_type;
const id_type &id() const {
return artifact_.id();
}
size_type revision() const {
return artifact_.revision();
}
template<class Evt>
inline void apply_change(Evt &&e) {
using std::forward;
artifact_.apply_change(forward<Evt>(e));
}
protected:
explicit inline basic_artifact_view(basic_artifact<DomainEventDispatcher, DomainEventContainer> &a) :
artifact_{a}
{
}
template<class Fun>
void add_handler(Fun f) {
using std::move;
artifact_.add_handler(move(f));
}
private:
basic_artifact<DomainEventDispatcher, DomainEventContainer> &artifact_;
};
typedef basic_artifact_view<artifact> artifact_view;
}
}
|
#pragma once
#include "cqrs/artifact.h"
namespace cddd {
namespace cqrs {
template<class> class basic_artifact_view;
template<class DomainEventDispatcher, class DomainEventContainer>
class basic_artifact_view<basic_artifact<DomainEventDispatcher, DomainEventContainer>> {
public:
using id_type = typename basic_artifact<DomainEventDispatcher, DomainEventContainer>::id_type;
using size_type = typename basic_artifact<DomainEventDispatcher, DomainEventContainer>::size_type;
const id_type &id() const {
return artifact_.id();
}
size_type revision() const {
return artifact_.revision();
}
template<class Evt>
inline auto apply_change(Evt &&e) {
using std::forward;
return artifact_.apply_change(forward<Evt>(e));
}
protected:
explicit inline basic_artifact_view(basic_artifact<DomainEventDispatcher, DomainEventContainer> &a) :
artifact_{a}
{
}
template<class Fun>
void add_handler(Fun f) {
using std::move;
artifact_.add_handler(move(f));
}
private:
basic_artifact<DomainEventDispatcher, DomainEventContainer> &artifact_;
};
typedef basic_artifact_view<artifact> artifact_view;
}
}
|
Refactor artifact view to provide event pointer created by the artifact after applying a change
|
Refactor artifact view to provide event pointer created by the artifact after applying a change
|
C
|
mit
|
skizzay/cddd,skizzay/cddd
|
4cfc6fe9ed05af1bfc371bd78ad6945b62419e37
|
test/Sema/i-c-e3.c
|
test/Sema/i-c-e3.c
|
// RUN: clang %s -fsyntax-only -verify -pedantic-errors
int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;} // expected-error {{null pointer expression is not an integer constant expression (but is allowed as an extension)}} // expected-note{{C does not permit evaluated commas in an integer constant expression}}
|
// RUN: clang %s -fsyntax-only -verify
int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;}
|
Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.
|
Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@60331 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
fa99782c1eb60ffd73915fdd8a3f801a01b79a9d
|
src/bin/e_error.h
|
src/bin/e_error.h
|
#ifdef E_TYPEDEFS
#define e_error_message_show(args...) \
{ \
char __tmpbuf[PATH_MAX]; \
\
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
e_error_message_show_internal(__tmpbuf); \
}
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
#endif
#endif
|
#ifdef E_TYPEDEFS
#define e_error_message_show(args...) do \
{ \
char __tmpbuf[PATH_MAX]; \
\
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
e_error_message_show_internal(__tmpbuf); \
} while (0)
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
#endif
#endif
|
Fix macro so it can be used as a statement
|
e: Fix macro so it can be used as a statement
Should fix devilhorn's compile error.
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>
git-svn-id: 6ac5796aeae0cef97fb47bcc287d4ce899c6fa6e@61783 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
|
C
|
bsd-2-clause
|
jordemort/e17,jordemort/e17,jordemort/e17
|
938c9e965d14e6867f165b3be3391b0c15484bf5
|
src/util/string.h
|
src/util/string.h
|
#ifndef UTIL_STRING_H
#define UTIL_STRING_H
#include "util/common.h"
char* strndup(const char* start, size_t len);
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
|
#ifndef UTIL_STRING_H
#define UTIL_STRING_H
#include "util/common.h"
#ifndef strndup
// This is sometimes a macro
char* strndup(const char* start, size_t len);
#endif
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
|
Fix build with strndup on some platforms
|
Util: Fix build with strndup on some platforms
|
C
|
mpl-2.0
|
mgba-emu/mgba,mgba-emu/mgba,libretro/mgba,nattthebear/mgba,MerryMage/mgba,AdmiralCurtiss/mgba,Iniquitatis/mgba,fr500/mgba,libretro/mgba,Anty-Lemon/mgba,matthewbauer/mgba,iracigt/mgba,cassos/mgba,askotx/mgba,nattthebear/mgba,fr500/mgba,sergiobenrocha2/mgba,sergiobenrocha2/mgba,Anty-Lemon/mgba,jeremyherbert/mgba,MerryMage/mgba,Touched/mgba,fr500/mgba,cassos/mgba,Touched/mgba,Iniquitatis/mgba,AdmiralCurtiss/mgba,iracigt/mgba,Touched/mgba,libretro/mgba,zerofalcon/mgba,sergiobenrocha2/mgba,jeremyherbert/mgba,Iniquitatis/mgba,mgba-emu/mgba,iracigt/mgba,cassos/mgba,fr500/mgba,askotx/mgba,sergiobenrocha2/mgba,askotx/mgba,Anty-Lemon/mgba,sergiobenrocha2/mgba,libretro/mgba,jeremyherbert/mgba,Anty-Lemon/mgba,zerofalcon/mgba,askotx/mgba,Iniquitatis/mgba,iracigt/mgba,libretro/mgba,bentley/mgba,AdmiralCurtiss/mgba,matthewbauer/mgba,bentley/mgba,zerofalcon/mgba,mgba-emu/mgba,jeremyherbert/mgba,MerryMage/mgba
|
980869bb3c0d627e6190ee90eef18b3d60d109ab
|
Sources/Ello-Bridging-Header.h
|
Sources/Ello-Bridging-Header.h
|
#import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "JTSImageViewController.h"
#import "JTSImageInfo.h"
#import "UITabBarController+NBUAdditions.h"
#import "KINWebBrowserViewController.h"
#import <SSPullToRefresh/SSPullToRefresh.h>
#import "SVGKit/SVGKit.h"
|
#import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "JTSImageViewController.h"
#import "JTSImageInfo.h"
#import "UITabBarController+NBUAdditions.h"
#import "KINWebBrowserViewController.h"
#import <SSPullToRefresh/SSPullToRefresh.h>
#import <SVGKit/SVGKit.h>
|
Update import statement for consistency.
|
Update import statement for consistency.
|
C
|
mit
|
ello/ello-ios,ello/ello-ios,ello/ello-ios,ello/ello-ios
|
b743e26e288da913ce62e96f74f73079c2f37299
|
fuzz/main.c
|
fuzz/main.c
|
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result res = cgltf_parse(&options, Data, Size, &data);
if (res == cgltf_result_success) cgltf_free(data);
return 0;
}
|
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result res = cgltf_parse(&options, Data, Size, &data);
if (res == cgltf_result_success)
{
cgltf_validate(data);
cgltf_free(data);
}
return 0;
}
|
Add validation to fuzz target
|
Add validation to fuzz target
This make sure new validation code is robust by itself.
|
C
|
mit
|
jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf
|
707924f97fc31d1e25e80e3e6df566dd1f7d4b02
|
src/common.h
|
src/common.h
|
/** \file common.h
* \brief Project-wide definitions and macros.
*
*
* SCL; 2012-2015
*/
#ifndef COMMON_H
#define COMMON_H
#define GR1C_VERSION "0.10.2"
#define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \
"California Institute of Technology\n\n" \
"This is free, open source software, released under a BSD license\n" \
"and without warranty."
#define GR1C_INTERACTIVE_PROMPT ">>> "
typedef int vartype;
typedef char bool;
#define True 1
#define False 0
typedef unsigned char byte;
#include "util.h"
#include "cudd.h"
#endif
|
/** \file common.h
* \brief Project-wide definitions and macros.
*
*
* SCL; 2012-2015
*/
#ifndef COMMON_H
#define COMMON_H
#define GR1C_VERSION "0.10.3"
#define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \
"California Institute of Technology\n\n" \
"This is free, open source software, released under a BSD license\n" \
"and without warranty."
#define GR1C_INTERACTIVE_PROMPT ">>> "
typedef int vartype;
typedef char bool;
#define True 1
#define False 0
typedef unsigned char byte;
#include "util.h"
#include "cudd.h"
#endif
|
Bump version in preparation for next release.
|
Bump version in preparation for next release.
|
C
|
bsd-3-clause
|
slivingston/gr1c,slivingston/gr1c,slivingston/gr1c
|
18ef03a558c8f1786f18ee5be9f8a2648e73d608
|
OctoKit/OCTEntity.h
|
OctoKit/OCTEntity.h
|
//
// OCTEntity.h
// OctoKit
//
// Created by Josh Abernathy on 1/21/11.
// Copyright 2011 GitHub. All rights reserved.
//
#import "OCTObject.h"
@class OCTPlan;
@class GHImageRequestOperation;
// Represents any GitHub object which is capable of owning repositories.
@interface OCTEntity : OCTObject
// Returns `login` if no name is explicitly set.
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSArray *repositories;
@property (nonatomic, copy) NSString *email;
@property (nonatomic, copy) NSURL *avatarURL;
@property (nonatomic, copy) NSString *login;
@property (nonatomic, copy) NSString *blog;
@property (nonatomic, copy) NSString *company;
@property (nonatomic, assign) NSUInteger collaborators;
@property (nonatomic, assign) NSUInteger publicRepoCount;
@property (nonatomic, assign) NSUInteger privateRepoCount;
@property (nonatomic, assign) NSUInteger diskUsage;
@property (nonatomic, readonly, strong) OCTPlan *plan;
// TODO: Fix this to "RemoteCounterparts".
- (void)mergeRepositoriesWithRemoteCountparts:(NSArray *)remoteRepositories;
@end
|
//
// OCTEntity.h
// OctoKit
//
// Created by Josh Abernathy on 1/21/11.
// Copyright 2011 GitHub. All rights reserved.
//
#import "OCTObject.h"
@class OCTPlan;
// Represents any GitHub object which is capable of owning repositories.
@interface OCTEntity : OCTObject
// Returns `login` if no name is explicitly set.
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSArray *repositories;
@property (nonatomic, copy) NSString *email;
@property (nonatomic, copy) NSURL *avatarURL;
@property (nonatomic, copy) NSString *login;
@property (nonatomic, copy) NSString *blog;
@property (nonatomic, copy) NSString *company;
@property (nonatomic, assign) NSUInteger collaborators;
@property (nonatomic, assign) NSUInteger publicRepoCount;
@property (nonatomic, assign) NSUInteger privateRepoCount;
@property (nonatomic, assign) NSUInteger diskUsage;
@property (nonatomic, readonly, strong) OCTPlan *plan;
// TODO: Fix this to "RemoteCounterparts".
- (void)mergeRepositoriesWithRemoteCountparts:(NSArray *)remoteRepositories;
@end
|
Remove old class forward declaration
|
Remove old class forward declaration
|
C
|
mit
|
daukantas/octokit.objc,jonesgithub/octokit.objc,Palleas/octokit.objc,CleanShavenApps/octokit.objc,GroundControl-Solutions/octokit.objc,CHNLiPeng/octokit.objc,daemonchen/octokit.objc,Acidburn0zzz/octokit.objc,wrcj12138aaa/octokit.objc,daukantas/octokit.objc,jonesgithub/octokit.objc,xantage/octokit.objc,yeahdongcn/octokit.objc,1234-/octokit.objc,leichunfeng/octokit.objc,cnbin/octokit.objc,daemonchen/octokit.objc,Acidburn0zzz/octokit.objc,CHNLiPeng/octokit.objc,1234-/octokit.objc,wrcj12138aaa/octokit.objc,xantage/octokit.objc,cnbin/octokit.objc,leichunfeng/octokit.objc,Palleas/octokit.objc,phatblat/octokit.objc,GroundControl-Solutions/octokit.objc,phatblat/octokit.objc
|
50d862bf9bdb359d71c0a13bb7dcb1cf2cd6016f
|
3/src/e/options.c
|
3/src/e/options.c
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "options.h"
static Options *
_new() {
Options *opts = (Options *)malloc(sizeof(Options));
if(opts) {
memset(opts, 0, sizeof(Options));
}
return opts;
}
static Options *
make(int argc, char *argv[]) {
Options *opts = _new();
int i = 1;
for(;;) {
if(i >= (argc - 1)) break;
if(!strcmp(argv[i], "sdbfile")) {
opts->sdbFilename = argv[i+1];
i = i + 2;
} else if(!strcmp(argv[i], "romfile")) {
opts->romFilename = argv[i+1];
i = i + 2;
} else {
fprintf(stderr, "Warning: unknown option %s\n", argv[i]);
i++;
}
}
if (!opts->romFilename) {
opts->romFilename = "roms/forth";
}
return opts;
}
const struct interface_Options module_Options = {
.make = &make,
};
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "options.h"
static Options *
_new() {
Options *opts = (Options *)malloc(sizeof(Options));
if(opts) {
memset(opts, 0, sizeof(Options));
}
return opts;
}
static Options *
make(int argc, char *argv[]) {
Options *opts = _new();
int i = 1;
/* Defaults */
opts->romFilename = "roms/forth";
/* Parse the command line */
for(;;) {
if(i >= (argc - 1)) break;
if(!strcmp(argv[i], "sdbfile")) {
opts->sdbFilename = argv[i+1];
i = i + 2;
} else if(!strcmp(argv[i], "romfile")) {
opts->romFilename = argv[i+1];
i = i + 2;
} else {
fprintf(stderr, "Warning: unknown option %s\n", argv[i]);
i++;
}
}
return opts;
}
const struct interface_Options module_Options = {
.make = &make,
};
|
Rework the command line option defaults mechanism
|
e: Rework the command line option defaults mechanism
|
C
|
mpl-2.0
|
KestrelComputer/kestrel,sam-falvo/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel,sam-falvo/kestrel,KestrelComputer/kestrel,KestrelComputer/kestrel,sam-falvo/kestrel
|
8c561b7c431ca247ef15f2dd59bc0f6efb963ef6
|
hello.c
|
hello.c
|
#include <stdio.h>
int main()
{
puts("Hello, people!");
return 0;
}
|
#include <stdio.h>
int main()
{
puts("Hello, people!"); /* Preferred over printf */
return 0;
}
|
Comment the main .c file
|
Comment the main .c file
|
C
|
bsd-3-clause
|
riuri/first,riuri/first
|
387ec6864a25317ff45f9001809c4752047e2637
|
src/os/Linux/findself.c
|
src/os/Linux/findself.c
|
#define _XOPEN_SOURCE 500
#include <unistd.h>
#include <stdlib.h>
char *os_find_self(void)
{
// PATH_MAX (used by readlink(2)) is not necessarily available
size_t size = 2048, used = 0;
char *path = NULL;
do {
size *= 2;
path = realloc(path, size);
used = readlink("/proc/self/exe", path, size);
} while (used > size && path != NULL);
return path;
}
|
#define _XOPEN_SOURCE 500
#include <unistd.h>
#include <stdlib.h>
char *os_find_self(void)
{
// PATH_MAX (used by readlink(2)) is not necessarily available
size_t size = 2048, used = 0;
char *path = NULL;
do {
size *= 2;
path = realloc(path, size);
used = readlink("/proc/self/exe", path, size);
path[used - 1] = '\0';
} while (used >= size && path != NULL);
return path;
}
|
Mend loop condition from 344aae0
|
Mend loop condition from 344aae0
|
C
|
mit
|
kulp/tenyr,kulp/tenyr,kulp/tenyr
|
855718c59f77594a0911f80592875daff05d8b8c
|
t_gc.h
|
t_gc.h
|
/* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */
#ifndef __T_GC__
#define __T_GC__
#ifdef PROF
# define GC_INIT() 0
# define GC_MALLOC(s) malloc(s)
# define GC_MALLOC_ATOMIC(s) malloc(s)
#else
# include <gc.h>
#endif /* PROF */
#endif /* __T_GC__ */
|
/* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */
#ifndef __T_GC__
#define __T_GC__
#ifdef PROF
# define GC_INIT() 0
# define GC_MALLOC(s) malloc(s)
# define GC_MALLOC_ATOMIC(s) malloc(s)
# define GC_register_finalizer_ignore_self(o,f,c,x,y) 0
# define GC_add_roots(s,e) 0
#else
# include <gc.h>
#endif /* PROF */
#endif /* __T_GC__ */
|
Add dummy macro GC_register_finalizer_ignore_self and GC_add_roots.
|
Add dummy macro GC_register_finalizer_ignore_self and GC_add_roots.
|
C
|
mit
|
mitchan0321/perfume,mitchan0321/perfume,mitchan0321/perfume,mitchan0321/perfume,mitchan0321/perfume
|
f8f7140dcb8c109ad0571b0c6c0f46c464c2ddad
|
mParticle-Apple-SDK/Kits/MPKitAPI.h
|
mParticle-Apple-SDK/Kits/MPKitAPI.h
|
#import <Foundation/Foundation.h>
@class MPAttributionResult;
@class FilteredMParticleUser;
@protocol MPKitProtocol;
@interface MPKitAPI : NSObject
- (void)logError:(NSString *_Nullable)format, ...;
- (void)logWarning:(NSString *_Nullable)format, ...;
- (void)logDebug:(NSString *_Nullable)format, ...;
- (void)logVerbose:(NSString *_Nullable)format, ...;
- (NSDictionary<NSString *, NSString *> *_Nullable)integrationAttributes;
- (void)onAttributionCompleteWithResult:(MPAttributionResult *_Nonnull)result error:(NSError *_Nullable)error;
- (FilteredMParticleUser *_Nonnull)getCurrentUserWithKit:(id<MPKitProtocol> _Nonnull)kit;
- (nullable NSNumber *)incrementUserAttribute:(NSString *_Nonnull)key byValue:(NSNumber *_Nonnull)value forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)setUserAttribute:(NSString *_Nonnull)key value:(id _Nonnull)value forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)setUserAttributeList:(NSString *_Nonnull)key values:(NSArray<NSString *> * _Nonnull)values forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)setUserTag:(NSString *_Nonnull)tag forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)removeUserAttribute:(NSString *_Nonnull)key forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
@end
|
#import <Foundation/Foundation.h>
@class MPAttributionResult;
@class FilteredMParticleUser;
@protocol MPKitProtocol;
@interface MPKitAPI : NSObject
- (void)logError:(NSString *_Nullable)format, ...;
- (void)logWarning:(NSString *_Nullable)format, ...;
- (void)logDebug:(NSString *_Nullable)format, ...;
- (void)logVerbose:(NSString *_Nullable)format, ...;
- (NSDictionary<NSString *, NSString *> *_Nullable)integrationAttributes;
- (void)onAttributionCompleteWithResult:(MPAttributionResult *_Nullable)result error:(NSError *_Nullable)error;
- (FilteredMParticleUser *_Nonnull)getCurrentUserWithKit:(id<MPKitProtocol> _Nonnull)kit;
- (nullable NSNumber *)incrementUserAttribute:(NSString *_Nonnull)key byValue:(NSNumber *_Nonnull)value forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)setUserAttribute:(NSString *_Nonnull)key value:(id _Nonnull)value forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)setUserAttributeList:(NSString *_Nonnull)key values:(NSArray<NSString *> * _Nonnull)values forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)setUserTag:(NSString *_Nonnull)tag forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
- (void)removeUserAttribute:(NSString *_Nonnull)key forUser:(FilteredMParticleUser *_Nonnull)filteredUser;
@end
|
Allow nil result in kit api attribution method
|
Allow nil result in kit api attribution method
Closes #66.
|
C
|
apache-2.0
|
mParticle/mParticle-iOS-SDK,mParticle/mParticle-iOS-SDK,mParticle/mparticle-apple-sdk,mParticle/mparticle-apple-sdk,mParticle/mparticle-apple-sdk,mParticle/mparticle-apple-sdk,mParticle/mparticle-apple-sdk,mParticle/mParticle-iOS-SDK,mParticle/mparticle-apple-sdk
|
ac6d2c574d393bfbf1dcc1250c730550cd8c4150
|
src/augs/misc/time_utils.h
|
src/augs/misc/time_utils.h
|
#pragma once
#include <ctime>
#include <string>
#include <chrono>
#include "augs/filesystem/file_time_type.h"
namespace augs {
struct date_time {
// GEN INTROSPECTOR struct augs::timestamp
std::time_t t;
// END GEN INTROSPECTOR
date_time();
date_time(const std::time_t& t) : t(t) {}
date_time(const std::chrono::system_clock::time_point&);
#if !PLATFORM_WINDOWS
date_time(const file_time_type&);
#endif
operator std::time_t() const {
return t;
}
std::string get_stamp() const;
std::string get_readable() const;
unsigned long long seconds_ago() const;
std::string how_long_ago() const;
std::string how_long_ago_tell_seconds() const;
private:
std::string how_long_ago(bool) const;
};
}
|
#pragma once
#include <ctime>
#include <string>
#include <chrono>
#include "augs/filesystem/file_time_type.h"
namespace augs {
struct date_time {
// GEN INTROSPECTOR struct augs::timestamp
std::time_t t;
// END GEN INTROSPECTOR
date_time();
date_time(const std::time_t& t) : t(t) {}
date_time(const std::chrono::system_clock::time_point&);
date_time(const file_time_type&);
operator std::time_t() const {
return t;
}
std::string get_stamp() const;
std::string get_readable() const;
unsigned long long seconds_ago() const;
std::string how_long_ago() const;
std::string how_long_ago_tell_seconds() const;
private:
std::string how_long_ago(bool) const;
};
}
|
Build error fix for Windows
|
Build error fix for Windows
|
C
|
agpl-3.0
|
TeamHypersomnia/Hypersomnia,TeamHypersomnia/Augmentations,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Augmentations,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia
|
76df39bdfbc3eaa67abde2a413b0610a29502520
|
USART.h
|
USART.h
|
/*
* USART.h
*
* Created: 2016/9/10 16:30:30
* Author: dusch
*/
#ifndef USART_H_
#define USART_H_
#define BAUD 9600
#define F_CPU 12000000UL
#include <avr/interrupt.h>
void USART_Init(void);
void USART_Transmit(unsigned char data);
unsigned char USART_Receive(void);
#endif /* USART_H_ */
|
/*
* USART.h
*
* Created: 2016/9/10 16:30:30
* Author: dusch
*/
#ifndef USART_H_
#define USART_H_
#define BAUD 9600
#define F_CPU 8000000UL
#include <avr/interrupt.h>
void USART_Init(void);
void USART_Transmit(unsigned char data);
unsigned char USART_Receive(void);
#endif /* USART_H_ */
|
Change default F_CPU from 12000000 to 8000000
|
Change default F_CPU from 12000000 to 8000000
|
C
|
bsd-3-clause
|
Schummacher/AVR_SCLib,Schummacher/AVR_SCLib
|
c894081a7f7ac467d6282b8955e32dd3ac040ef1
|
base/float_util.h
|
base/float_util.h
|
// Copyright (c) 2006-2008 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 BASE_FLOAT_UTIL_H_
#define BASE_FLOAT_UTIL_H_
#pragma once
#include "build/build_config.h"
#include <float.h>
#include <math.h>
#if defined(OS_SOLARIS)
#include <ieeefp.h>
#endif
namespace base {
inline bool IsFinite(const double& number) {
#if defined(OS_POSIX)
return finite(number) != 0;
#elif defined(OS_WIN)
return _finite(number) != 0;
#endif
}
} // namespace base
#endif // BASE_FLOAT_UTIL_H_
|
// Copyright (c) 2012 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 BASE_FLOAT_UTIL_H_
#define BASE_FLOAT_UTIL_H_
#pragma once
#include "build/build_config.h"
#include <float.h>
#include <math.h>
#if defined(OS_SOLARIS)
#include <ieeefp.h>
#endif
namespace base {
inline bool IsFinite(const double& number) {
#if defined(OS_MACOSX)
// C99 says isfinite() replaced finite(), and iOS does not provide the
// older call.
return isfinite(number) != 0;
#elif defined(OS_POSIX)
return finite(number) != 0;
#elif defined(OS_WIN)
return _finite(number) != 0;
#endif
}
} // namespace base
#endif // BASE_FLOAT_UTIL_H_
|
Use isfinite instead of finite on Mac
|
Use isfinite instead of finite on Mac
According to math.h in the 10.6 SDK, finite is deprecated in favor of isfinite, and finite isn't available on iOS.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10704126
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@145876 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
dushu1203/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,dednal/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,patrickm/chromium.src,patrickm/chromium.src,keishi/chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,ltilve/chromium,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,keishi/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,patrickm/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,ltilve/chromium,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,anirudhSK/chromium,Just-D/chromium-1,markYoungH/chromium.src,anirudhSK/chromium,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,jaruba/chromium.src,zcbenz/cefode-chromium,dednal/chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,keishi/chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,Just-D/chromium-1,M4sse/chromium.src,jaruba/chromium.src,Chilledheart/chromium,Chilledheart/chromium,keishi/chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,nacl-webkit/chrome_deps,patrickm/chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,anirudhSK/chromium,markYoungH/chromium.src,fujunwei/chromium-crosswalk,keishi/chromium,dushu1203/chromium.src,keishi/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,markYoungH/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,dednal/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,ltilve/chromium,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,Chilledheart/chromium,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,M4sse/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,dednal/chromium.src,jaruba/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,anirudhSK/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,patrickm/chromium.src,anirudhSK/chromium,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,Chilledheart/chromium,hujiajie/pa-chromium,keishi/chromium,ondra-novak/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,ltilve/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,keishi/chromium,timopulkkinen/BubbleFish,Jonekee/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium
|
0d3b50ec8667ef96e6aa774e2617eb5a8c5f8034
|
test/CodeGen/writable-strings.c
|
test/CodeGen/writable-strings.c
|
// RUN: clang -emit-llvm -fwritable-string %s
int main() {
char *str = "abc";
str[0] = '1';
printf("%s", str);
}
|
// RUN: clang -emit-llvm -fwritable-strings %s
int main() {
char *str = "abc";
str[0] = '1';
printf("%s", str);
}
|
Fix typo in writable string test
|
Fix typo in writable string test
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@44398 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
7d9656b13d1425481e2af8656f7009ad1056e484
|
trace.h
|
trace.h
|
#ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#ifdef DEBUG
#define TRACE ERROR
#else
#define TRACE(fmt,arg...) ((void) 0)
#endif
#ifdef DEBUG
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s:%d: "fmt, __func__, __LINE__, ##arg)
#else
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg)
#endif
#define FATAL(fmt,arg...) do { \
ERROR(fmt, ##arg); \
exit(1); \
} while (0)
#endif
|
#ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#ifdef DEBUG
#define TRACE ERROR
#else
static inline void TRACE(const char *fmt, ...) { }
#endif
#ifdef DEBUG
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s:%d: "fmt, __func__, __LINE__, ##arg)
#else
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg)
#endif
#define FATAL(fmt,arg...) do { \
ERROR(fmt, ##arg); \
exit(1); \
} while (0)
#endif
|
Make TRACE() safe when DEBUG is disabled.
|
Make TRACE() safe when DEBUG is disabled.
|
C
|
lgpl-2.1
|
dimm0/tacc_stats,aaichsmn/tacc_stats,dimm0/tacc_stats,sdsc/xsede_stats,dimm0/tacc_stats,TACC/tacc_stats,sdsc/xsede_stats,ubccr/tacc_stats,TACCProjects/tacc_stats,dimm0/tacc_stats,TACCProjects/tacc_stats,dimm0/tacc_stats,TACCProjects/tacc_stats,sdsc/xsede_stats,TACCProjects/tacc_stats,ubccr/tacc_stats,rtevans/tacc_stats_old,aaichsmn/tacc_stats,aaichsmn/tacc_stats,rtevans/tacc_stats_old,ubccr/tacc_stats,aaichsmn/tacc_stats,ubccr/tacc_stats,sdsc/xsede_stats,ubccr/tacc_stats,TACC/tacc_stats,TACC/tacc_stats,rtevans/tacc_stats_old,TACC/tacc_stats,TACC/tacc_stats
|
754fbe3028dff6448a4d50ead35911578f91c7d8
|
test/test_encode_atom.c
|
test/test_encode_atom.c
|
#include <bert/encoder.h>
#include <bert/magic.h>
#include <bert/errno.h>
#include "test.h"
#include <string.h>
unsigned char output[6];
void test_output()
{
if (output[0] != BERT_MAGIC)
{
test_fail("bert_encoder_push did not add the magic byte");
}
if (output[1] != BERT_ATOM)
{
test_fail("bert_encoder_push did not add the SMALL_INT magic byte");
}
size_t expected_length = 2;
if (output[3] != expected_length)
{
test_fail("bert_encoder_push encoded %u as the atom length, expected %u",output[3],expected_length);
}
const char *expected = "id";
test_strings((const char *)(output+4),expected,expected_length);
}
int main()
{
bert_encoder_t *encoder = test_encoder(output,6);
bert_data_t *data;
if (!(data = bert_data_create_atom("id")))
{
test_fail("malloc failed");
}
test_encoder_push(encoder,data);
bert_data_destroy(data);
bert_encoder_destroy(encoder);
test_output();
return 0;
}
|
#include <bert/encoder.h>
#include <bert/magic.h>
#include <bert/errno.h>
#include "test.h"
#include <string.h>
#define EXPECTED_LENGTH 2
#define EXPECTED "id"
#define OUTPUT_SIZE (1 + 1 + 2 + EXPECTED_LENGTH)
unsigned char output[OUTPUT_SIZE];
void test_output()
{
if (output[0] != BERT_MAGIC)
{
test_fail("bert_encoder_push did not add the magic byte");
}
if (output[1] != BERT_ATOM)
{
test_fail("bert_encoder_push did not add the SMALL_INT magic byte");
}
if (output[3] != EXPECTED_LENGTH)
{
test_fail("bert_encoder_push encoded %u as the atom length, expected %u",output[3],expected_length);
}
test_strings((const char *)(output+4),EXPECTED,expected_length);
}
int main()
{
bert_encoder_t *encoder = test_encoder(output,OUTPUT_SIZE);
bert_data_t *data;
if (!(data = bert_data_create_atom(EXPECTED)))
{
test_fail("malloc failed");
}
test_encoder_push(encoder,data);
bert_data_destroy(data);
bert_encoder_destroy(encoder);
test_output();
return 0;
}
|
Use EXPECTED/EXPECTED_LENGTH/OUTPUT_SIZE macros in the atom encoding test.
|
Use EXPECTED/EXPECTED_LENGTH/OUTPUT_SIZE macros in the atom encoding test.
|
C
|
mit
|
postmodern/libBERT
|
9ab39d421665c1420afae6d8e006b01e7d0e6c61
|
modules/acct_csv/rtpp_csv_acct.c
|
modules/acct_csv/rtpp_csv_acct.c
|
#include <stdint.h>
#include <stdlib.h>
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
struct moduleinfo rtpp_module = {
.name = "csv_acct",
.ver = MI_VER_INIT(struct moduleinfo)
};
|
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "rtpp_types.h"
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
struct rtpp_module_priv {
int foo;
};
static struct rtpp_module_priv *rtpp_csv_acct_ctor(struct rtpp_cfg_stable *);
static void rtpp_csv_acct_dtor(struct rtpp_module_priv *);
struct moduleinfo rtpp_module = {
.name = "csv_acct",
.ver = MI_VER_INIT(struct moduleinfo),
.ctor = rtpp_csv_acct_ctor,
.dtor = rtpp_csv_acct_dtor
};
static struct rtpp_module_priv bar;
static struct rtpp_module_priv *
rtpp_csv_acct_ctor(struct rtpp_cfg_stable *cfsp)
{
bar.foo = 123456;
return (&bar);
}
static void
rtpp_csv_acct_dtor(struct rtpp_module_priv *pvt)
{
assert(pvt->foo == 123456);
return;
}
|
Add simple constructor and destructor.
|
Add simple constructor and destructor.
|
C
|
bsd-2-clause
|
synety-jdebp/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,sippy/rtpproxy
|
94693767f1b911afa9b11b4b1fa5ffd1b2eaaac2
|
include/xiot/XIOTConfig.h
|
include/xiot/XIOTConfig.h
|
/*=========================================================================
This file is part of the XIOT library.
Copyright (C) 2008-2009 EDF R&D
Author: Kristian Sons (xiot@actor3d.com)
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
The XIOT 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 Public License for more details.
You should have received a copy of the GNU Lesser Public License
along with XIOT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301 USA
=========================================================================*/
#ifndef __XIOTConfigure_h
#define __XIOTConfigure_h
#include "xiot_export.h"
#if defined(_MSC_VER)
#pragma warning(disable : 4275) /* non-DLL-interface base class used */
#pragma warning(disable : 4251) /* needs to have dll-interface to be used by clients */
/* No warning for safe windows only functions */
#define _CRT_SECURE_NO_WARNINGS
#endif
#endif // __x3dexporterConfigure_h
|
/*=========================================================================
This file is part of the XIOT library.
Copyright (C) 2008-2009 EDF R&D
Author: Kristian Sons (xiot@actor3d.com)
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
The XIOT 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 Public License for more details.
You should have received a copy of the GNU Lesser Public License
along with XIOT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301 USA
=========================================================================*/
#ifndef __XIOTConfigure_h
#define __XIOTConfigure_h
#include "xiot_export.h"
#if defined(_MSC_VER)
#pragma warning(disable : 4275) /* non-DLL-interface base class used */
#pragma warning(disable : 4251) /* needs to have dll-interface to be used by clients */
#pragma warning(disable : 4996) /* */
#endif
#endif // __x3dexporterConfigure_h
|
Disable secure function warnings via pragma
|
MSVC: Disable secure function warnings via pragma
|
C
|
lgpl-2.1
|
Supporting/xiot,Supporting/xiot,Supporting/xiot
|
66c950522a3563c96cb7d4aca0ba4e940b769462
|
includes/StackAllocator.h
|
includes/StackAllocator.h
|
#include "LinearAllocator.h"
#ifndef STACKALLOCATOR_H
#define STACKALLOCATOR_H
class StackAllocator : public LinearAllocator {
public:
/* Allocation of real memory */
StackAllocator(const long totalSize);
/* Frees all memory */
virtual ~StackAllocator();
/* Allocate virtual memory */
virtual void* Allocate(const std::size_t size, const std::size_t alignment) override;
/* Frees virtual memory */
virtual void Free(void* ptr) override;
};
#endif /* STACKALLOCATOR_H */
|
#include "Allocator.h"
#ifndef STACKALLOCATOR_H
#define STACKALLOCATOR_H
class StackAllocator : public Allocator {
protected:
/* Offset from the start of the memory block */
std::size_t m_offset;
public:
/* Allocation of real memory */
StackAllocator(const long totalSize);
/* Frees all memory */
virtual ~StackAllocator();
/* Allocate virtual memory */
virtual void* Allocate(const std::size_t size, const std::size_t alignment) override;
/* Frees virtual memory */
virtual void Free(void* ptr) override;
/* Frees all virtual memory */
virtual void Reset() override;
};
#endif /* STACKALLOCATOR_H */
|
Change parent class from LinearAllocator to Allocator.
|
Change parent class from LinearAllocator to Allocator.
|
C
|
mit
|
mtrebi/memory-allocators
|
e5410c25e5287699260ba3d3ecd188faaf30e499
|
cmd/lefty/display.h
|
cmd/lefty/display.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
/* Lefteris Koutsofios - AT&T Bell Laboratories */
#ifndef _DISPLAY_H
#define _DISPLAY_H
void Dinit(void);
void Dterm(void);
void Dtrace(Tobj, int);
#endif /* _DISPLAY_H */
#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
/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _DISPLAY_H
#define _DISPLAY_H
void Dinit (void);
void Dterm (void);
void Dtrace (Tobj, int);
#endif /* _DISPLAY_H */
#ifdef __cplusplus
}
#endif
|
Update with new lefty, fixing many bugs and supporting new features
|
Update with new lefty, fixing many bugs and supporting new features
|
C
|
epl-1.0
|
MjAbuz/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,pixelglow/graphviz,ellson/graphviz,MjAbuz/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,pixelglow/graphviz,pixelglow/graphviz,MjAbuz/graphviz,kbrock/graphviz,jho1965us/graphviz,kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,tkelman/graphviz,tkelman/graphviz,BMJHayward/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,tkelman/graphviz,ellson/graphviz,tkelman/graphviz,BMJHayward/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz
|
05c6f77912696091da5bda1c47ca9b92d6b4aff7
|
AVOS/AVOSCloudLiveQuery/AVSubscription.h
|
AVOS/AVOSCloudLiveQuery/AVSubscription.h
|
//
// AVSubscription.h
// AVOS
//
// Created by Tang Tianyong on 15/05/2017.
// Copyright © 2017 LeanCloud Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AVQuery.h"
#import "AVDynamicObject.h"
NS_ASSUME_NONNULL_BEGIN
@protocol AVSubscriptionDelegate <NSObject>
@end
@interface AVSubscriptionOptions : AVDynamicObject
@end
@interface AVSubscription : NSObject
@property (nonatomic, weak, nullable) id<AVSubscriptionDelegate> delegate;
@property (nonatomic, strong, readonly) AVQuery *query;
@property (nonatomic, strong, readonly, nullable) AVSubscriptionOptions *options;
- (instancetype)initWithQuery:(AVQuery *)query
options:(nullable AVSubscriptionOptions *)options;
@end
NS_ASSUME_NONNULL_END
|
//
// AVSubscription.h
// AVOS
//
// Created by Tang Tianyong on 15/05/2017.
// Copyright © 2017 LeanCloud Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AVQuery.h"
#import "AVDynamicObject.h"
@class AVSubscription;
NS_ASSUME_NONNULL_BEGIN
@protocol AVSubscriptionDelegate <NSObject>
- (void)subscription:(AVSubscription *)subscription objectDidEnter:(id)object;
- (void)subscription:(AVSubscription *)subscription objectDidLeave:(id)object;
- (void)subscription:(AVSubscription *)subscription objectDidCreate:(id)object;
- (void)subscription:(AVSubscription *)subscription objectDidUpdate:(id)object;
- (void)subscription:(AVSubscription *)subscription objectDidDelete:(id)object;
- (void)subscription:(AVSubscription *)subscription userDidLogin:(AVUser *)user;
@end
@interface AVSubscriptionOptions : AVDynamicObject
@end
@interface AVSubscription : NSObject
@property (nonatomic, weak, nullable) id<AVSubscriptionDelegate> delegate;
@property (nonatomic, strong, readonly) AVQuery *query;
@property (nonatomic, strong, readonly, nullable) AVSubscriptionOptions *options;
- (instancetype)initWithQuery:(AVQuery *)query
options:(nullable AVSubscriptionOptions *)options;
@end
NS_ASSUME_NONNULL_END
|
Add callbacks for live query
|
Add callbacks for live query
|
C
|
apache-2.0
|
leancloud/objc-sdk,leancloud/objc-sdk,leancloud/objc-sdk,leancloud/objc-sdk
|
e949472d78298e2a2e5e6e47edfca99ffa6e6a17
|
quickpather/passabilityagent.h
|
quickpather/passabilityagent.h
|
#ifndef PASSABILITYAGENT_H
#define PASSABILITYAGENT_H
#include <QPointF>
#include <QObject>
#include "quickpather_global.h"
class AbstractEntity;
// Not pure abstract, because we want it to be usable in the Q_PROPERTY macro
// and not force derived classes to multiply derive from it and QObject.
class QUICKPATHERSHARED_EXPORT PassabilityAgent : public QObject
{
public:
virtual bool isPassable(const QPointF &pos, AbstractEntity *entity);
};
#endif // PASSABILITYAGENT_H
|
#ifndef PASSABILITYAGENT_H
#define PASSABILITYAGENT_H
#include <QPointF>
#include <QObject>
#include "quickpather_global.h"
class AbstractEntity;
// Not pure abstract, because we want it to be usable in the Q_PROPERTY macro
// and not force derived classes to multiply derive from it and QObject.
class QUICKPATHERSHARED_EXPORT PassabilityAgent : public QObject
{
Q_OBJECT
public:
virtual bool isPassable(const QPointF &pos, AbstractEntity *entity);
};
#endif // PASSABILITYAGENT_H
|
Add missing Q_OBJECT to PassabilityAgent
|
Add missing Q_OBJECT to PassabilityAgent
|
C
|
unlicense
|
mitchcurtis/quickpather,mitchcurtis/quickpather
|
8ee124176690ed611c8851e3dd50a823c498a08b
|
ndb/src/common/portlib/NdbSleep.c
|
ndb/src/common/portlib/NdbSleep.c
|
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <NdbSleep.h>
int
NdbSleep_MilliSleep(int milliseconds){
int result = 0;
struct timespec sleeptime;
sleeptime.tv_sec = milliseconds / 1000;
sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
result = nanosleep(&sleeptime, NULL);
return result;
}
int
NdbSleep_SecSleep(int seconds){
int result = 0;
result = sleep(seconds);
return result;
}
|
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <my_sys.h>
#include <NdbSleep.h>
int
NdbSleep_MilliSleep(int milliseconds){
my_sleep(milliseconds*1000);
return 0;
#if 0
int result = 0;
struct timespec sleeptime;
sleeptime.tv_sec = milliseconds / 1000;
sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
result = nanosleep(&sleeptime, NULL);
return result;
#endif
}
int
NdbSleep_SecSleep(int seconds){
int result = 0;
result = sleep(seconds);
return result;
}
|
Use my_sleep instead of nanosleep for portability
|
Use my_sleep instead of nanosleep for portability
|
C
|
lgpl-2.1
|
natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,ollie314/server,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,slanterns/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,ollie314/server
|
b9e62a6c98648d2c0b722c0bdd1e77f6fe4a1604
|
cuser/acpica/acenv_header.h
|
cuser/acpica/acenv_header.h
|
#define ACPI_MACHINE_WIDTH 64
#define ACPI_SINGLE_THREADED
#define ACPI_USE_LOCAL_CACHE
#define ACPI_INLINE inline
#define ACPI_USE_NATIVE_DIVIDE
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#ifdef ACPI_FULL_DEBUG
#define ACPI_DEBUG_OUTPUT
#define ACPI_DISASSEMBLER
// Depends on threading support
#define ACPI_DEBUGGER
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#else
#define ACPI_GET_FUNCTION_NAME ""
#endif
#define ACPI_PHYS_BASE 0x100000000
#include <stdint.h>
#include <stdarg.h>
#define AcpiOsPrintf printf
#define AcpiOsVprintf vprintf
struct acpi_table_facs;
uint32_t AcpiOsReleaseGlobalLock(struct acpi_table_facs* facs);
uint32_t AcpiOsAcquireGlobalLock(struct acpi_table_facs* facs);
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acquired) Acquired = AcpiOsAcquireGlobalLock(GLptr)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pending) Pending = AcpiOsReleaseGlobalLock(GLptr)
|
#define ACPI_MACHINE_WIDTH 64
#define ACPI_SINGLE_THREADED
#define ACPI_USE_LOCAL_CACHE
#define ACPI_INLINE inline
#define ACPI_USE_NATIVE_DIVIDE
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#ifdef ACPI_FULL_DEBUG
#define ACPI_DEBUG_OUTPUT
#define ACPI_DISASSEMBLER
// Depends on threading support
#define ACPI_DEBUGGER
//#define ACPI_DBG_TRACK_ALLOCATIONS
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
#else
#define ACPI_GET_FUNCTION_NAME ""
#endif
#define ACPI_PHYS_BASE 0x100000000
#include <stdint.h>
#include <stdarg.h>
#define AcpiOsPrintf printf
#define AcpiOsVprintf vprintf
struct acpi_table_facs;
uint32_t AcpiOsReleaseGlobalLock(struct acpi_table_facs* facs);
uint32_t AcpiOsAcquireGlobalLock(struct acpi_table_facs* facs);
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acquired) Acquired = AcpiOsAcquireGlobalLock(GLptr)
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pending) Pending = AcpiOsReleaseGlobalLock(GLptr)
#define COMPILER_DEPENDENT_UINT64 uint64_t
#define COMPILER_DEPENDENT_UINT32 uint32_t
|
Fix ACPICA word-size types - u64 didn't match UINT64
|
Fix ACPICA word-size types - u64 didn't match UINT64
|
C
|
mit
|
olsner/os,olsner/os,olsner/os,olsner/os
|
8ea9653b3dccad78a2bb9b91adf0589828bff327
|
src/core/matcher.h
|
src/core/matcher.h
|
#ifndef HAMCREST_MATCHER_H
#define HAMCREST_MATCHER_H
#include "selfdescribing.h"
namespace Hamcrest {
class Description;
/**
* A matcher over acceptable values.
* A matcher is able to describe itself to give feedback when it fails.
*
* @see BaseMatcher
*/
template <typename T>
class Matcher : public SelfDescribing
{
public:
virtual ~Matcher() {}
/**
* Evaluates the matcher for argument <var>item</var>.
*
* @param item the object against which the matcher is evaluated.
* @return <code>true</code> if <var>item</var> matches, otherwise <code>false</code>.
*
* @see BaseMatcher
*/
virtual bool matches(const T &item) const = 0;
/**
* Generate a description of why the matcher has not accepted the item.
* The description will be part of a larger description of why a matching
* failed, so it should be concise.
* This method assumes that <code>matches(item)</code> is false, but
* will not check this.
*
* @param item The item that the Matcher has rejected.
* @param mismatchDescription
* The description to be built or appended to.
*/
virtual void describeMismatch(const T &item, Description &mismatchDescription) const = 0;
};
} // namespace Hamcrest
#endif // HAMCREST_MATCHER_H
|
#ifndef HAMCREST_MATCHER_H
#define HAMCREST_MATCHER_H
#include "selfdescribing.h"
namespace Hamcrest {
class Description;
/**
* A matcher over acceptable values.
* A matcher is able to describe itself to give feedback when it fails.
*
* @see BaseMatcher
*/
template <typename T>
class Matcher : public SelfDescribing
{
public:
virtual ~Matcher() {}
/**
* Evaluates the matcher for argument <var>item</var>.
*
* @param item the object against which the matcher is evaluated.
* @return <code>true</code> if <var>item</var> matches, otherwise <code>false</code>.
*
* @see BaseMatcher
*/
virtual bool matches(const T &item) const = 0;
/**
* Generate a description of why the matcher has not accepted the item.
* The description will be part of a larger description of why a matching
* failed, so it should be concise.
* This method assumes that <code>matches(item)</code> is false, but
* will not check this.
*
* @param item The item that the Matcher has rejected.
* @param mismatchDescription
* The description to be built or appended to.
*/
virtual void describeMismatch(const T &item, Description &mismatchDescription) const = 0;
virtual QString toString() const = 0;
};
} // namespace Hamcrest
#endif // HAMCREST_MATCHER_H
|
Add virtual toString() to Matcher
|
Add virtual toString() to Matcher
|
C
|
bsd-3-clause
|
cloose/Hamcrest-Qt
|
37c5e9705435e2f23b6949047036504dcd215747
|
src/lib/blockdev.h
|
src/lib/blockdev.h
|
#include <glib.h>
#ifndef BD_LIB
#define BD_LIB
#include "plugins.h"
#include "plugin_apis/lvm.h"
gboolean bd_init (BDPluginSpec *force_plugins);
gboolean bd_reinit (BDPluginSpec *force_plugins, gboolean replace);
gchar** bd_get_available_plugin_names ();
gboolean bd_is_plugin_available (BDPlugin);
#endif /* BD_LIB */
|
#include <glib.h>
#ifndef BD_LIB
#define BD_LIB
#include "plugins.h"
#include "plugin_apis/lvm.h"
gboolean bd_init (BDPluginSpec *force_plugins);
gboolean bd_reinit (BDPluginSpec *force_plugins, gboolean replace);
gchar** bd_get_available_plugin_names ();
gboolean bd_is_plugin_available (BDPlugin plugin);
#endif /* BD_LIB */
|
Add missing parameter name in bd_is_plugin_available protype
|
Add missing parameter name in bd_is_plugin_available protype
|
C
|
lgpl-2.1
|
atodorov/libblockdev,rhinstaller/libblockdev,snbueno/libblockdev,dashea/libblockdev,rhinstaller/libblockdev,rhinstaller/libblockdev,vpodzime/libblockdev,vpodzime/libblockdev,snbueno/libblockdev,atodorov/libblockdev,dashea/libblockdev,vpodzime/libblockdev,atodorov/libblockdev
|
88b6b07d8542216690a211419c148fda8ba1a4d7
|
tests/homebrew-acceptance-test.c
|
tests/homebrew-acceptance-test.c
|
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2013 Couchbase, 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.
*/
#include <internal.h> /* getenv, sytem, snprintf */
int main(void)
{
#ifndef WIN32
char *srcdir = getenv("srcdir");
char command[FILENAME_MAX];
int status;
snprintf(command, FILENAME_MAX, "%s/tools/cbc version 2>&1", srcdir);
status = system(command);
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
snprintf(command, FILENAME_MAX, "%s/tools/cbc help 2>&1", srcdir);
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
#endif
return 0;
}
|
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2013 Couchbase, 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.
*/
#include <internal.h> /* getenv, system, snprintf */
int main(void)
{
#ifndef WIN32
int status;
status = system("./tools/cbc version 2>&1");
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
status = system("./tools/cbc help 2>&1");
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
#endif
return 0;
}
|
Fix 'make distcheck' (homebrew acceptance test)
|
Fix 'make distcheck' (homebrew acceptance test)
Change-Id: Ie61efb963f30a4548c97dfe63e261db36c2b66e2
Reviewed-on: http://review.couchbase.org/27533
Tested-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
|
C
|
apache-2.0
|
couchbase/libcouchbase,signmotion/libcouchbase,uvenum/libcouchbase,mody/libcouchbase,trondn/libcouchbase,avsej/libcouchbase,mody/libcouchbase,mnunberg/libcouchbase,kojiromike/libcouchbase,couchbase/libcouchbase,signmotion/libcouchbase,avsej/libcouchbase,avsej/libcouchbase,avsej/libcouchbase,couchbase/libcouchbase,trondn/libcouchbase,mnunberg/libcouchbase,PureSwift/libcouchbase,maxim-ky/libcouchbase,uvenum/libcouchbase,mody/libcouchbase,couchbase/libcouchbase,couchbase/libcouchbase,mody/libcouchbase,trondn/libcouchbase,PureSwift/libcouchbase,senthilkumaranb/libcouchbase,senthilkumaranb/libcouchbase,signmotion/libcouchbase,kojiromike/libcouchbase,avsej/libcouchbase,maxim-ky/libcouchbase,PureSwift/libcouchbase,senthilkumaranb/libcouchbase,senthilkumaranb/libcouchbase,kojiromike/libcouchbase,maxim-ky/libcouchbase,couchbase/libcouchbase,mnunberg/libcouchbase,avsej/libcouchbase,uvenum/libcouchbase,couchbase/libcouchbase,trondn/libcouchbase,kojiromike/libcouchbase,mnunberg/libcouchbase,uvenum/libcouchbase,PureSwift/libcouchbase,avsej/libcouchbase,mnunberg/libcouchbase,trondn/libcouchbase,maxim-ky/libcouchbase,uvenum/libcouchbase,signmotion/libcouchbase
|
c11130f26d609b78e88866c87275794c463171b8
|
net/quic/quic_utils.h
|
net/quic/quic_utils.h
|
// Copyright (c) 2012 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.
//
// Some helpers for quic
#ifndef NET_QUIC_QUIC_UTILS_H_
#define NET_QUIC_QUIC_UTILS_H_
#include "net/base/int128.h"
#include "net/base/net_export.h"
#include "net/quic/quic_protocol.h"
namespace gfe2 {
class BalsaHeaders;
}
namespace net {
class NET_EXPORT_PRIVATE QuicUtils {
public:
// The overhead the quic framing will add for a packet with num_frames
// frames.
static size_t StreamFramePacketOverhead(int num_frames);
// returns the 128 bit FNV1a hash of the data. See
// http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
static uint128 FNV1a_128_Hash(const char* data, int len);
// Returns the name of the quic error code as a char*
static const char* ErrorToString(QuicErrorCode error);
};
} // namespace net
#endif // NET_QUIC_QUIC_UTILS_H_
|
// Copyright (c) 2012 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.
//
// Some helpers for quic
#ifndef NET_QUIC_QUIC_UTILS_H_
#define NET_QUIC_QUIC_UTILS_H_
#include "net/base/int128.h"
#include "net/base/net_export.h"
#include "net/quic/quic_protocol.h"
namespace net {
class NET_EXPORT_PRIVATE QuicUtils {
public:
// The overhead the quic framing will add for a packet with num_frames
// frames.
static size_t StreamFramePacketOverhead(int num_frames);
// returns the 128 bit FNV1a hash of the data. See
// http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
static uint128 FNV1a_128_Hash(const char* data, int len);
// Returns the name of the quic error code as a char*
static const char* ErrorToString(QuicErrorCode error);
};
} // namespace net
#endif // NET_QUIC_QUIC_UTILS_H_
|
Remove an unused forward declaration.
|
Remove an unused forward declaration.
R=rch@chromium.org
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11877024
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@176837 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,jaruba/chromium.src,hujiajie/pa-chromium,Jonekee/chromium.src,dednal/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Jonekee/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,littlstar/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,patrickm/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,M4sse/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Chilledheart/chromium,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,anirudhSK/chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,Just-D/chromium-1,littlstar/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,Just-D/chromium-1,M4sse/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,Just-D/chromium-1,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,jaruba/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,patrickm/chromium.src,ltilve/chromium,dushu1203/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,dednal/chromium.src,jaruba/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,jaruba/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,patrickm/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,ondra-novak/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,M4sse/chromium.src,ltilve/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,jaruba/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,patrickm/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,Just-D/chromium-1,anirudhSK/chromium,markYoungH/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,ondra-novak/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,ChromiumWebApps/chromium,ltilve/chromium,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,ltilve/chromium,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,dushu1203/chromium.src,jaruba/chromium.src,Jonekee/chromium.src
|
6f805776fca1835477b730ced60fe72d9905f874
|
src/tests/marquise_init_test.c
|
src/tests/marquise_init_test.c
|
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "../marquise.h"
void test_init() {
marquise_ctx *ctx = marquise_init("test");
g_assert_nonnull(ctx);
}
int main(int argc, char **argv) {
g_test_init(&argc, &argv, NULL);
g_test_add_func("/marquise_init/init", test_init);
return g_test_run();
}
|
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "../marquise.h"
void test_init() {
setenv("MARQUISE_SPOOL_DIR", "/tmp", 1);
mkdir("/tmp/marquisetest", 0700);
marquise_ctx *ctx = marquise_init("marquisetest");
g_assert_nonnull(ctx);
}
int main(int argc, char **argv) {
g_test_init(&argc, &argv, NULL);
g_test_add_func("/marquise_init/init", test_init);
return g_test_run();
}
|
Use a spool directory under /tmp for testing purposes
|
Use a spool directory under /tmp for testing purposes
|
C
|
bsd-3-clause
|
anchor/libmarquise,anchor/libmarquise
|
07a1f80eae2c8169f789da92ab6c17f829615d1a
|
ghighlighter/main.c
|
ghighlighter/main.c
|
#include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include "gh-datastore.h"
#include "gh-main-window.h"
char *
data_dir_path ()
{
uid_t uid = getuid ();
struct passwd *pw = getpwuid (uid);
char *home_dir = pw->pw_dir;
char *data_dir = "/.ghighlighter-c";
int length = strlen (home_dir);
length = length + strlen (data_dir);
char *result = malloc (length + sizeof (char));
strcat (result, home_dir);
strcat (result, data_dir);
return result;
}
void
setup_environment (char *data_dir)
{
mkdir (data_dir, 0755);
}
int
main (int argc, char *argv[])
{
char *data_dir = data_dir_path ();
setup_environment (data_dir);
sqlite3 *db = gh_datastore_open_db (data_dir);
free (data_dir);
GtkWidget *window;
gtk_init (&argc, &argv);
window = gh_main_window_create ();
gtk_widget_show_all (window);
gtk_main ();
sqlite3_close (db);
return 0;
}
|
#include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include "gh-datastore.h"
#include "gh-main-window.h"
char *
data_dir_path ()
{
uid_t uid = getuid ();
struct passwd *pw = getpwuid (uid);
char *home_dir = pw->pw_dir;
char *data_dir = "/.ghighlighter-c";
int length = strlen (home_dir);
length = length + strlen (data_dir);
char *result = malloc (length + sizeof (char));
result[0] = '\0';
strcat (result, home_dir);
strcat (result, data_dir);
return result;
}
void
setup_environment (char *data_dir)
{
mkdir (data_dir, 0755);
}
int
main (int argc, char *argv[])
{
char *data_dir = data_dir_path ();
setup_environment (data_dir);
sqlite3 *db = gh_datastore_open_db (data_dir);
free (data_dir);
GtkWidget *window;
gtk_init (&argc, &argv);
window = gh_main_window_create ();
gtk_widget_show_all (window);
gtk_main ();
sqlite3_close (db);
return 0;
}
|
Set null byte in allocated data dir path
|
Set null byte in allocated data dir path
|
C
|
mit
|
chdorner/ghighlighter-c
|
1af425ed1e08d00fd953d7e905f48610cc350b28
|
tests/cframework/tests_plugin.h
|
tests/cframework/tests_plugin.h
|
/**
* @file
*
* @brief Some common functions operating on plugins.
*
* If you include this file you have full access to elektra's internals
* and your test might not be ABI compatible with the next release.
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#include <tests_internal.h>
#define PLUGIN_OPEN(NAME) \
KeySet * modules = ksNew (0, KS_END); \
elektraModulesInit (modules, 0); \
Key * errorKey = keyNew ("", KEY_END); \
Plugin * plugin = elektraPluginOpen (NAME, modules, conf, errorKey); \
succeed_if (output_warnings (errorKey), "warnings in kdbOpen for plugin " NAME); \
succeed_if (output_error (errorKey), "error in kdbOpen for plugin " NAME); \
keyDel (errorKey); \
exit_if_fail (plugin != 0, "could not open " NAME " plugin");
#define PLUGIN_CLOSE() \
elektraPluginClose (plugin, 0); \
elektraModulesClose (modules, 0); \
ksDel (modules);
|
/**
* @file
*
* @brief Some common functions operating on plugins.
*
* If you include this file you have full access to elektra's internals
* and your test might not be ABI compatible with the next release.
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#include <tests_internal.h>
#define PLUGIN_OPEN(NAME) \
KeySet * modules = ksNew (0, KS_END); \
elektraModulesInit (modules, 0); \
Key * errorKey = keyNew ("", KEY_END); \
Plugin * plugin = elektraPluginOpen (NAME, modules, conf, errorKey); \
succeed_if (output_warnings (errorKey), "warnings in kdbOpen for plugin " NAME); \
succeed_if (output_error (errorKey), "error in kdbOpen for plugin " NAME); \
keyDel (errorKey); \
exit_if_fail (plugin != 0, "could not open " NAME " plugin")
#define PLUGIN_CLOSE() \
elektraPluginClose (plugin, 0); \
elektraModulesClose (modules, 0); \
ksDel (modules)
|
Remove trailing semicolons from macros
|
Test: Remove trailing semicolons from macros
|
C
|
bsd-3-clause
|
mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,mpranj/libelektra
|
2794f6e44bac8a1b560d8894b1403ad874a0cd6c
|
viterbi/viterbi.h
|
viterbi/viterbi.h
|
#include <link-grammar/link-features.h>
LINK_BEGIN_DECLS
void viterbi_parse(const char * sentence, Dictionary dict);
LINK_END_DECLS
|
#include "../link-grammar/link-features.h"
LINK_BEGIN_DECLS
void viterbi_parse(const char * sentence, Dictionary dict);
LINK_END_DECLS
|
Fix include path so that make install doesn't screw it.
|
Fix include path so that make install doesn't screw it.
git-svn-id: fc35eccb03ccef1c432fd0fcf5295fcceaca86a6@32171 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
|
C
|
lgpl-2.1
|
ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,linas/link-grammar,MadBomber/link-grammar,MadBomber/link-grammar,linas/link-grammar,ampli/link-grammar,MadBomber/link-grammar,linas/link-grammar,MadBomber/link-grammar,ampli/link-grammar,opencog/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,linas/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,MadBomber/link-grammar,linas/link-grammar,MadBomber/link-grammar,MadBomber/link-grammar,linas/link-grammar,linas/link-grammar
|
2bc82f8ae834a09beda89ae236b1c5e9646f186d
|
igor/parser/DEIgorParserException.h
|
igor/parser/DEIgorParserException.h
|
@interface DEIgorParserException : NSObject
+ (NSException *)exceptionWithReason:(NSString *)reason scanner:(NSScanner *)scanner;
@end
|
@interface DEIgorParserException : NSException
+ (NSException *)exceptionWithReason:(NSString *)reason scanner:(NSScanner *)scanner;
@end
|
Make Igor parser exception extend NSException
|
Make Igor parser exception extend NSException
|
C
|
mit
|
dhemery/igor,dhemery/igor,dhemery/igor
|
e32f03922712ef3516cb7c2a346b3a2ab0ebda36
|
tests/chez/chez022/mkalloc.c
|
tests/chez/chez022/mkalloc.c
|
#include <malloc.h>
#include <string.h>
typedef struct {
int val;
char* str;
} Stuff;
Stuff* mkThing() {
static int num = 0;
Stuff* x = malloc(sizeof(Stuff));
x->val = num++;
x->str = malloc(20);
strcpy(x->str,"Hello");
return x;
}
char* getStr(Stuff* x) {
return x->str;
}
void freeThing(Stuff* x) {
printf("Freeing %d %s\n", x->val, x->str);
free(x->str);
free(x);
}
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct {
int val;
char* str;
} Stuff;
Stuff* mkThing() {
static int num = 0;
Stuff* x = malloc(sizeof(Stuff));
x->val = num++;
x->str = malloc(20);
strcpy(x->str,"Hello");
return x;
}
char* getStr(Stuff* x) {
return x->str;
}
void freeThing(Stuff* x) {
printf("Freeing %d %s\n", x->val, x->str);
free(x->str);
free(x);
}
|
Fix includes in chez022 test
|
Fix includes in chez022 test
|
C
|
bsd-3-clause
|
mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm
|
8c18581110925ebe9e2b3530d4d5fc4afefbc8b0
|
numpy/core/src/private/npy_import.h
|
numpy/core/src/private/npy_import.h
|
#ifndef NPY_IMPORT_H
#define NPY_IMPORT_H
#include <Python.h>
#include <assert.h>
/*! \brief Fetch and cache Python function.
*
* Import a Python function and cache it for use. The function checks if
* cache is NULL, and if not NULL imports the Python function specified by
* \a module and \a function, increments its reference count, and stores
* the result in \a cache. Usually \a cache will be a static variable and
* should be initialized to NULL. On error \a cache will contain NULL on
* exit,
*
* @param module Absolute module name.
* @param function Function name.
* @param cache Storage location for imported function.
*/
NPY_INLINE void
npy_cache_pyfunc(const char *module, const char *function, PyObject **cache)
{
if (*cache == NULL) {
PyObject *mod = PyImport_ImportModule(module);
if (mod != NULL) {
*cache = PyObject_GetAttrString(mod, function);
Py_DECREF(mod);
}
}
}
#endif
|
#ifndef NPY_IMPORT_H
#define NPY_IMPORT_H
#include <Python.h>
/*! \brief Fetch and cache Python function.
*
* Import a Python function and cache it for use. The function checks if
* cache is NULL, and if not NULL imports the Python function specified by
* \a module and \a function, increments its reference count, and stores
* the result in \a cache. Usually \a cache will be a static variable and
* should be initialized to NULL. On error \a cache will contain NULL on
* exit,
*
* @param module Absolute module name.
* @param function Function name.
* @param cache Storage location for imported function.
*/
NPY_INLINE static void
npy_cache_pyfunc(const char *module, const char *function, PyObject **cache)
{
if (*cache == NULL) {
PyObject *mod = PyImport_ImportModule(module);
if (mod != NULL) {
*cache = PyObject_GetAttrString(mod, function);
Py_DECREF(mod);
}
}
}
#endif
|
Fix npy_cache_pyfunc to properly implement inline.
|
BUG: Fix npy_cache_pyfunc to properly implement inline.
The function was not static, which led to multiple definition
errors.
|
C
|
bsd-3-clause
|
leifdenby/numpy,charris/numpy,sonnyhu/numpy,charris/numpy,has2k1/numpy,sinhrks/numpy,rhythmsosad/numpy,pdebuyl/numpy,jorisvandenbossche/numpy,mattip/numpy,stuarteberg/numpy,MaPePeR/numpy,Eric89GXL/numpy,MichaelAquilina/numpy,SiccarPoint/numpy,gmcastil/numpy,nguyentu1602/numpy,MSeifert04/numpy,maniteja123/numpy,mingwpy/numpy,pdebuyl/numpy,Anwesh43/numpy,gfyoung/numpy,seberg/numpy,jschueller/numpy,empeeu/numpy,GaZ3ll3/numpy,pbrod/numpy,anntzer/numpy,sinhrks/numpy,jakirkham/numpy,trankmichael/numpy,Yusa95/numpy,mwiebe/numpy,nbeaver/numpy,rgommers/numpy,shoyer/numpy,rherault-insa/numpy,ahaldane/numpy,jonathanunderwood/numpy,GrimDerp/numpy,joferkington/numpy,kirillzhuravlev/numpy,kirillzhuravlev/numpy,nbeaver/numpy,rudimeier/numpy,ekalosak/numpy,nguyentu1602/numpy,ahaldane/numpy,ahaldane/numpy,sinhrks/numpy,ddasilva/numpy,pbrod/numpy,AustereCuriosity/numpy,simongibbons/numpy,Eric89GXL/numpy,skwbc/numpy,pyparallel/numpy,dwillmer/numpy,kirillzhuravlev/numpy,gmcastil/numpy,empeeu/numpy,pdebuyl/numpy,GaZ3ll3/numpy,MichaelAquilina/numpy,shoyer/numpy,dwillmer/numpy,GrimDerp/numpy,mattip/numpy,jankoslavic/numpy,mattip/numpy,abalkin/numpy,Srisai85/numpy,ssanderson/numpy,KaelChen/numpy,endolith/numpy,cjermain/numpy,skymanaditya1/numpy,joferkington/numpy,shoyer/numpy,mathdd/numpy,gfyoung/numpy,GaZ3ll3/numpy,madphysicist/numpy,ChanderG/numpy,MSeifert04/numpy,has2k1/numpy,pdebuyl/numpy,jonathanunderwood/numpy,dimasad/numpy,musically-ut/numpy,skymanaditya1/numpy,madphysicist/numpy,githubmlai/numpy,mingwpy/numpy,CMartelLML/numpy,Dapid/numpy,grlee77/numpy,b-carter/numpy,bringingheavendown/numpy,has2k1/numpy,ContinuumIO/numpy,mingwpy/numpy,simongibbons/numpy,solarjoe/numpy,kiwifb/numpy,ChanderG/numpy,rajathkumarmp/numpy,madphysicist/numpy,stuarteberg/numpy,leifdenby/numpy,argriffing/numpy,grlee77/numpy,solarjoe/numpy,ESSS/numpy,sonnyhu/numpy,ahaldane/numpy,pbrod/numpy,bertrand-l/numpy,WarrenWeckesser/numpy,WarrenWeckesser/numpy,githubmlai/numpy,endolith/numpy,sonnyhu/numpy,mhvk/numpy,mhvk/numpy,b-carter/numpy,abalkin/numpy,jorisvandenbossche/numpy,groutr/numpy,numpy/numpy,Yusa95/numpy,maniteja123/numpy,utke1/numpy,ChanderG/numpy,jorisvandenbossche/numpy,skwbc/numpy,rajathkumarmp/numpy,trankmichael/numpy,AustereCuriosity/numpy,rhythmsosad/numpy,ekalosak/numpy,seberg/numpy,kirillzhuravlev/numpy,mwiebe/numpy,mingwpy/numpy,rhythmsosad/numpy,njase/numpy,chiffa/numpy,madphysicist/numpy,rudimeier/numpy,musically-ut/numpy,joferkington/numpy,jankoslavic/numpy,CMartelLML/numpy,ChristopherHogan/numpy,rudimeier/numpy,endolith/numpy,BabeNovelty/numpy,pizzathief/numpy,musically-ut/numpy,behzadnouri/numpy,moreati/numpy,mathdd/numpy,gfyoung/numpy,Anwesh43/numpy,KaelChen/numpy,seberg/numpy,solarjoe/numpy,tacaswell/numpy,skymanaditya1/numpy,Linkid/numpy,WarrenWeckesser/numpy,numpy/numpy,pbrod/numpy,ChristopherHogan/numpy,trankmichael/numpy,Linkid/numpy,mhvk/numpy,hainm/numpy,SiccarPoint/numpy,BabeNovelty/numpy,shoyer/numpy,CMartelLML/numpy,tacaswell/numpy,dimasad/numpy,tynn/numpy,empeeu/numpy,seberg/numpy,jakirkham/numpy,grlee77/numpy,dimasad/numpy,hainm/numpy,trankmichael/numpy,bringingheavendown/numpy,Anwesh43/numpy,kiwifb/numpy,numpy/numpy,nguyentu1602/numpy,Eric89GXL/numpy,felipebetancur/numpy,behzadnouri/numpy,WillieMaddox/numpy,MaPePeR/numpy,GrimDerp/numpy,rajathkumarmp/numpy,grlee77/numpy,BMJHayward/numpy,stuarteberg/numpy,dwillmer/numpy,MaPePeR/numpy,jakirkham/numpy,bmorris3/numpy,dwillmer/numpy,pizzathief/numpy,pizzathief/numpy,jakirkham/numpy,Srisai85/numpy,chatcannon/numpy,anntzer/numpy,ahaldane/numpy,WillieMaddox/numpy,grlee77/numpy,musically-ut/numpy,groutr/numpy,jschueller/numpy,mwiebe/numpy,charris/numpy,moreati/numpy,SiccarPoint/numpy,charris/numpy,jorisvandenbossche/numpy,GrimDerp/numpy,chatcannon/numpy,Srisai85/numpy,Anwesh43/numpy,stuarteberg/numpy,rgommers/numpy,cjermain/numpy,tynn/numpy,b-carter/numpy,abalkin/numpy,empeeu/numpy,nguyentu1602/numpy,drasmuss/numpy,ESSS/numpy,MSeifert04/numpy,pbrod/numpy,MSeifert04/numpy,jschueller/numpy,MichaelAquilina/numpy,mathdd/numpy,Dapid/numpy,cjermain/numpy,tacaswell/numpy,Srisai85/numpy,felipebetancur/numpy,BMJHayward/numpy,joferkington/numpy,MichaelAquilina/numpy,bertrand-l/numpy,hainm/numpy,mathdd/numpy,argriffing/numpy,skwbc/numpy,njase/numpy,ViralLeadership/numpy,maniteja123/numpy,SunghanKim/numpy,BMJHayward/numpy,BabeNovelty/numpy,pyparallel/numpy,ssanderson/numpy,bmorris3/numpy,pyparallel/numpy,KaelChen/numpy,ViralLeadership/numpy,SunghanKim/numpy,mhvk/numpy,sonnyhu/numpy,BMJHayward/numpy,rherault-insa/numpy,chiffa/numpy,anntzer/numpy,numpy/numpy,Yusa95/numpy,jorisvandenbossche/numpy,drasmuss/numpy,simongibbons/numpy,bmorris3/numpy,leifdenby/numpy,githubmlai/numpy,ddasilva/numpy,SunghanKim/numpy,ViralLeadership/numpy,ChristopherHogan/numpy,WarrenWeckesser/numpy,nbeaver/numpy,endolith/numpy,MSeifert04/numpy,njase/numpy,Dapid/numpy,SiccarPoint/numpy,moreati/numpy,Linkid/numpy,AustereCuriosity/numpy,madphysicist/numpy,ContinuumIO/numpy,rajathkumarmp/numpy,ChanderG/numpy,cjermain/numpy,KaelChen/numpy,behzadnouri/numpy,WillieMaddox/numpy,CMartelLML/numpy,jankoslavic/numpy,MaPePeR/numpy,rherault-insa/numpy,BabeNovelty/numpy,ddasilva/numpy,simongibbons/numpy,rgommers/numpy,mhvk/numpy,bringingheavendown/numpy,pizzathief/numpy,hainm/numpy,WarrenWeckesser/numpy,rudimeier/numpy,Linkid/numpy,SunghanKim/numpy,utke1/numpy,GaZ3ll3/numpy,drasmuss/numpy,ChristopherHogan/numpy,utke1/numpy,rgommers/numpy,jschueller/numpy,githubmlai/numpy,jakirkham/numpy,dimasad/numpy,anntzer/numpy,chiffa/numpy,Yusa95/numpy,bmorris3/numpy,jonathanunderwood/numpy,has2k1/numpy,gmcastil/numpy,kiwifb/numpy,tynn/numpy,chatcannon/numpy,argriffing/numpy,groutr/numpy,ContinuumIO/numpy,pizzathief/numpy,ESSS/numpy,ekalosak/numpy,felipebetancur/numpy,shoyer/numpy,Eric89GXL/numpy,ssanderson/numpy,jankoslavic/numpy,skymanaditya1/numpy,mattip/numpy,felipebetancur/numpy,rhythmsosad/numpy,simongibbons/numpy,bertrand-l/numpy,ekalosak/numpy,sinhrks/numpy
|
d5b629639feb01dc7f7d15cc5393612acff8f01a
|
tests/test-driver-decode.c
|
tests/test-driver-decode.c
|
//!compile = {cc} {ccflags} -c -o {ofile} {infile} && {cc} {ccflags} -o {outfile} {ofile} {driver} ../libdbrew.a -I../include
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include "dbrew.h"
int f1(int);
// possible jump target
int f2(int x) { return x; }
int main()
{
// Decode the function.
Rewriter* r = dbrew_new();
// to get rid of changing addresses, assume gen code to be 200 bytes max
dbrew_config_function_setname(r, (uintptr_t) f1, "f1");
dbrew_config_function_setsize(r, (uintptr_t) f1, 200);
dbrew_decode_print(r, (uintptr_t) f1, 1);
return 0;
}
|
//!compile = as -c -o {ofile} {infile} && {cc} {ccflags} -o {outfile} {ofile} {driver} ../libdbrew.a -I../include
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include "dbrew.h"
int f1(int);
// possible jump target
int f2(int x) { return x; }
int main()
{
// Decode the function.
Rewriter* r = dbrew_new();
// to get rid of changing addresses, assume gen code to be 200 bytes max
dbrew_config_function_setname(r, (uintptr_t) f1, "f1");
dbrew_config_function_setsize(r, (uintptr_t) f1, 200);
dbrew_decode_print(r, (uintptr_t) f1, 1);
return 0;
}
|
Fix Travis for decoder tests
|
Fix Travis for decoder tests
The assembler of clang-3.5 in the images used by Travis seems to have
a bug with assembling the "test" instruction, resulting in machine
code with reversed operands (this does not happen e.g. with clang-3.8).
As decoder tests all use assembly files as input, we force use of the
GNU assembler "as" via setting the compile line accordingly for this
test class.
|
C
|
lgpl-2.1
|
lrr-tum/dbrew,lrr-tum/dbrew,lrr-tum/dbrew,lrr-tum/dbrew,lrr-tum/dbrew
|
f9b6386e1f69a8f5b4d69b0f1af75d242bcd71e9
|
src/game/detail/view_input/sound_effect_modifier.h
|
src/game/detail/view_input/sound_effect_modifier.h
|
#pragma once
#include "augs/math/declare_math.h"
#include "augs/audio/distance_model.h"
struct sound_effect_modifier {
// GEN INTROSPECTOR struct sound_effect_modifier
real32 gain = 1.f;
real32 pitch = 1.f;
real32 max_distance = -1.f;
real32 reference_distance = -1.f;
real32 doppler_factor = 1.f;
augs::distance_model distance_model = augs::distance_model::NONE;
int repetitions = 1;
bool fade_on_exit = true;
bool disable_velocity = false;
bool always_direct_listener = false;
pad_bytes<1> pad;
// END GEN INTROSPECTOR
};
|
#pragma once
#include "augs/math/declare_math.h"
#include "augs/audio/distance_model.h"
struct sound_effect_modifier {
// GEN INTROSPECTOR struct sound_effect_modifier
real32 gain = 1.f;
real32 pitch = 1.f;
real32 max_distance = -1.f;
real32 reference_distance = -1.f;
real32 doppler_factor = 1.f;
char repetitions = 1;
bool fade_on_exit = true;
bool disable_velocity = false;
bool always_direct_listener = false;
augs::distance_model distance_model = augs::distance_model::NONE;
// END GEN INTROSPECTOR
};
|
FIx sound(..)modifier compaibility with old maps
|
FIx sound(..)modifier compaibility with old maps
|
C
|
agpl-3.0
|
TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia
|
7a5b85dacdc86ec8cf5d32aeea2312189a0a5587
|
src/forces/labeller_frame_data.h
|
src/forces/labeller_frame_data.h
|
#ifndef SRC_FORCES_LABELLER_FRAME_DATA_H_
#define SRC_FORCES_LABELLER_FRAME_DATA_H_
#include <Eigen/Core>
#include <iostream>
namespace Forces
{
/**
* \brief
*
*
*/
class LabellerFrameData
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
LabellerFrameData(double frameTime, Eigen::Matrix4f projection,
Eigen::Matrix4f view)
: frameTime(frameTime), projection(projection), view(view),
viewProjection(projection * view)
{
}
const double frameTime;
const Eigen::Matrix4f projection;
const Eigen::Matrix4f view;
const Eigen::Matrix4f viewProjection;
Eigen::Vector3f project(Eigen::Vector3f vector) const
{
Eigen::Vector4f projected =
viewProjection * Eigen::Vector4f(vector.x(), vector.y(), vector.z(), 1);
std::cout << "projected" << projected / projected.w() << std::endl;
return projected.head<3>() / projected.w();
}
};
} // namespace Forces
#endif // SRC_FORCES_LABELLER_FRAME_DATA_H_
|
#ifndef SRC_FORCES_LABELLER_FRAME_DATA_H_
#define SRC_FORCES_LABELLER_FRAME_DATA_H_
#include "../eigen.h"
#include <iostream>
namespace Forces
{
/**
* \brief
*
*
*/
class LabellerFrameData
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
LabellerFrameData(double frameTime, Eigen::Matrix4f projection,
Eigen::Matrix4f view)
: frameTime(frameTime), projection(projection), view(view),
viewProjection(projection * view)
{
}
const double frameTime;
const Eigen::Matrix4f projection;
const Eigen::Matrix4f view;
const Eigen::Matrix4f viewProjection;
Eigen::Vector3f project(Eigen::Vector3f vector) const
{
Eigen::Vector4f projected = mul(viewProjection, vector);
return projected.head<3>() / projected.w();
}
};
} // namespace Forces
#endif // SRC_FORCES_LABELLER_FRAME_DATA_H_
|
Use new mul function in LabellerFrameData::project.
|
Use new mul function in LabellerFrameData::project.
|
C
|
mit
|
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
|
58022a61d6882902b9dc22060638f1ac9a6b95bf
|
src/fs/driver/devfs/devfs_dvfs.c
|
src/fs/driver/devfs/devfs_dvfs.c
|
/**
* @file devfs_dvfs.c
* @brief
* @author Denis Deryugin <deryugin.denis@gmail.com>
* @version 0.1
* @date 2015-09-28
*/
/* This is stub */
|
/**
* @file devfs_dvfs.c
* @brief
* @author Denis Deryugin <deryugin.denis@gmail.com>
* @version 0.1
* @date 2015-09-28
*/
#include <fs/dvfs.h>
#include <util/array.h>
static int devfs_destroy_inode(struct inode *inode) {
return 0;
}
static int devfs_iterate(struct inode *next, struct inode *parent, struct dir_ctx *ctx) {
return 0;
}
static struct inode *devfs_lookup(char const *name, struct dentry const *dir) {
return NULL;
}
static int devfs_pathname(struct inode *inode, char *buf, int flags) {
return 0;
}
static int devfs_mount_end(struct super_block *sb) {
return 0;
}
static int devfs_open(struct inode *node, struct file *file) {
return 0;
}
static size_t devfs_read(struct file *desc, void *buf, size_t size) {
return 0;
}
static int devfs_ioctl(struct file *desc, int request, ...) {
return 0;
}
struct super_block_operations devfs_sbops = {
.destroy_inode = devfs_destroy_inode,
};
struct inode_operations devfs_iops = {
.lookup = devfs_lookup,
.iterate = devfs_iterate,
.pathname = devfs_pathname,
};
struct file_operations devfs_fops = {
.open = devfs_open,
.read = devfs_read,
.ioctl = devfs_ioctl,
};
static int devfs_fill_sb(struct super_block *sb, struct block_dev *dev) {
sb->sb_iops = &devfs_iops;
sb->sb_fops = &devfs_fops;
sb->sb_ops = &devfs_sbops;
return 0;
}
static struct dumb_fs_driver devfs_dumb_driver = {
.name = "devfs",
.fill_sb = devfs_fill_sb,
.mount_end = devfs_mount_end,
};
ARRAY_SPREAD_DECLARE(struct dumb_fs_driver *, dumb_drv_tab);
ARRAY_SPREAD_ADD(dumb_drv_tab, &devfs_dumb_driver);
|
Add fs-related structures and stub functions
|
devfs: Add fs-related structures and stub functions
|
C
|
bsd-2-clause
|
Kakadu/embox,Kakadu/embox,mike2390/embox,embox/embox,gzoom13/embox,mike2390/embox,embox/embox,gzoom13/embox,mike2390/embox,mike2390/embox,Kakadu/embox,gzoom13/embox,Kakadu/embox,gzoom13/embox,gzoom13/embox,Kakadu/embox,Kakadu/embox,mike2390/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,embox/embox,embox/embox,Kakadu/embox,mike2390/embox,embox/embox,embox/embox
|
e5c5c31ef382af0620d4b9f8177e287e00a09fa0
|
src/tokenizer/gru_tokenizer_factory_trainer.h
|
src/tokenizer/gru_tokenizer_factory_trainer.h
|
// This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
#include "common.h"
#include "tokenizer.h"
namespace ufal {
namespace morphodita {
class tokenized_sentence {
u32string sentence;
vector<token_range> tokens;
};
class gru_tokenizer_factory_trainer {
public:
static bool train(unsigned version, const vector<tokenized_sentence>& data, ostream& os, string& error);
};
} // namespace morphodita
} // namespace ufal
|
// This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
#include "common.h"
#include "tokenizer.h"
namespace ufal {
namespace morphodita {
struct tokenized_sentence {
u32string sentence;
vector<token_range> tokens;
};
class gru_tokenizer_factory_trainer {
public:
static bool train(unsigned version, const vector<tokenized_sentence>& data, ostream& os, string& error);
};
} // namespace morphodita
} // namespace ufal
|
Make tokenized_sentence a structure (i.e., all fields public).
|
Make tokenized_sentence a structure (i.e., all fields public).
|
C
|
mpl-2.0
|
ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita
|
64cc62d502eca5728de8d9aa431d7e76ce438467
|
test/Analysis/stack-addr-ps.c
|
test/Analysis/stack-addr-ps.c
|
// RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}}
}
int* f3(int x, int *y) {
int w = 0;
if (x)
y = &w;
return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}}
}
void* compound_literal(int x) {
if (x)
return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}}
struct s { int z; double y; int w; };
return &((struct s){ 2, 0.4, 5 * 8 });
}
|
// RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}}
}
int* f3(int x, int *y) {
int w = 0;
if (x)
y = &w;
return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}}
}
void* compound_literal(int x) {
if (x)
return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}}
int* array[] = {};
struct s { int z; double y; int w; };
return &((struct s){ 2, 0.4, 5 * 8 }); // expected-warning{{Address of stack memory}}
}
|
Add missing "expected warning". Add compound literal with empty initializer (just to test the analyzer handles it).
|
Add missing "expected warning".
Add compound literal with empty initializer (just to test the analyzer handles it).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58470 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
bade646d8e40457662c195d5b25ae41822c5f35b
|
safe.h
|
safe.h
|
#ifndef SAFE_H
#define SAFE_H
#include "debug.h"
#ifndef DISABLE_SAFE
#define SAFE_STRINGIFY(x) #x
#define SAFE_TOSTRING(x) SAFE_STRINGIFY(x)
#define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": "
#define SAFE_ASSERT(cond) do { \
if (!(cond)) { \
DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \
DEBUG_BREAK(!(cond)); \
} \
} while (0)
#else
#define SAFE_ASSERT(...)
#endif
#include <stdint.h>
#define SAFE_NNCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret >= 0); \
} while (0)
#define SAFE_NZCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret != 0); \
} while (0)
#endif /* end of include guard: SAFE_H */
|
#ifndef SAFE_H
#define SAFE_H
#include "debug.h"
#ifndef DISABLE_SAFE
#define SAFE_STRINGIFY(x) #x
#define SAFE_TOSTRING(x) SAFE_STRINGIFY(x)
#define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": "
#define SAFE_ASSERT(cond) do { \
if (!(cond)) { \
DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \
DEBUG_BREAK(!(cond)); \
} \
} while (0)
#else
#define SAFE_ASSERT(...)
#endif
#include <stdint.h>
#define SAFE_NNCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret >= 0); \
} while (0)
#define SAFE_NZCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret != 0); \
} while (0)
#define SAFE_RZCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret == 0); \
} while (0)
#endif /* end of include guard: SAFE_H */
|
Add SAFE_RZCALL to wrap calls that returns zero.
|
Add SAFE_RZCALL to wrap calls that returns zero.
|
C
|
mit
|
chaoran/fibril,chaoran/fibril,chaoran/fibril
|
fa0a3d781ea01c0f790c3af40cc7429ad73af132
|
include/ParseNode.h
|
include/ParseNode.h
|
//=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#ifndef PARSE_NODE_H
#define PARSE_NODE_H
#include <list>
#include "ByteCodeFileWriter.h"
#include "Variables.h"
#include "CompilerException.h"
class ParseNode;
typedef std::list<ParseNode*>::const_iterator NodeIterator;
class StringPool;
class ParseNode {
private:
ParseNode* parent;
std::list<ParseNode*> childs;
public:
ParseNode() : parent(NULL){};
virtual ~ParseNode();
virtual void write(ByteCodeFileWriter& writer);
virtual void checkVariables(Variables& variables) throw (CompilerException);
virtual void checkStrings(StringPool& pool);
virtual void optimize();
void addFirst(ParseNode* node);
void addLast(ParseNode* node);
void replace(ParseNode* old, ParseNode* node);
void remove(ParseNode* node);
NodeIterator begin();
NodeIterator end();
};
#endif
|
//=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#ifndef PARSE_NODE_H
#define PARSE_NODE_H
#include <list>
#include "ByteCodeFileWriter.h"
#include "Variables.h"
#include "CompilerException.h"
class ParseNode;
typedef std::list<ParseNode*>::const_iterator NodeIterator;
class StringPool;
class ParseNode {
private:
std::list<ParseNode*> childs;
protected:
ParseNode* parent;
public:
ParseNode() : parent(NULL){};
virtual ~ParseNode();
virtual void write(ByteCodeFileWriter& writer);
virtual void checkVariables(Variables& variables) throw (CompilerException);
virtual void checkStrings(StringPool& pool);
virtual void optimize();
void addFirst(ParseNode* node);
void addLast(ParseNode* node);
void replace(ParseNode* old, ParseNode* node);
void remove(ParseNode* node);
NodeIterator begin();
NodeIterator end();
};
#endif
|
Make parent protected so that the child can know their parents
|
Make parent protected so that the child can know their parents
|
C
|
mit
|
vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic
|
894133a4b116abcde29ae9a92e5f823af6713083
|
include/libk/kmem.h
|
include/libk/kmem.h
|
#ifndef KMEM_H
#define KMEM_H
#include <stdbool.h>
#include <stdint.h>
#include <arch/x86/paging.h>
#include <libk/kabort.h>
#define KHEAP_PHYS_ROOT ((void*)0x100000)
//#define KHEAP_PHYS_END ((void*)0xc1000000)
#define KHEAP_END_SENTINEL (NULL)
// 1 GB
#define PHYS_MEMORY_SIZE (1*1024*1024*1024)
#define KHEAP_BLOCK_SLOP 32
#define PAGE_ALIGN(x) ((uint32_t)x >> 12)
struct kheap_metadata {
size_t size;
struct kheap_metadata *next;
bool is_free;
};
struct kheap_metadata *root;
struct kheap_metadata *kheap_init();
int kheap_extend();
void kheap_install(struct kheap_metadata *root, size_t initial_heap_size);
void *kmalloc(size_t bytes);
void kfree(void *mem);
void kheap_defragment();
#endif
|
#ifndef KMEM_H
#define KMEM_H
#include <stdbool.h>
#include <stdint.h>
#include <arch/x86/paging.h>
#include <libk/kabort.h>
#define KHEAP_PHYS_ROOT ((void*)0x100000)
//#define KHEAP_PHYS_END ((void*)0xc1000000)
#define KHEAP_END_SENTINEL (NULL)
#define KHEAP_BLOCK_SLOP 32
struct kheap_metadata {
size_t size;
struct kheap_metadata *next;
bool is_free;
};
struct kheap_metadata *root;
struct kheap_metadata *kheap_init();
int kheap_extend();
void kheap_install(struct kheap_metadata *root, size_t initial_heap_size);
void *kmalloc(size_t bytes);
void kfree(void *mem);
void kheap_defragment();
#endif
|
Remove macros which now live in paging.h
|
Remove macros which now live in paging.h
|
C
|
mit
|
iankronquist/kernel-of-truth,Herbstein/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,Herbstein/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,Herbstein/kernel-of-truth,awensaunders/kernel-of-truth
|
adf0978b3ac91823bf105e78aabb805aaa11e17a
|
src/gamemodel/Terrain.h
|
src/gamemodel/Terrain.h
|
#ifndef TERRAIN_H
#define TERRAIN_H
#include <util/Math.h>
#include <util/Random.h>
#include <vector>
#include "Constants.h"
class Terrain {
public:
Terrain(
const float stepLength = constants::TERRAIN_STEP_LENGTH,
const float amplitude = constants::TERRAIN_HEIGHT_VARIATION_AMPLITUDE,
const float worldInitLength = constants::WORLD_INIT_LENGTH);
virtual ~Terrain();
void ensureHasTerrainTo(const float end);
glm::vec2 vertexAtX(const float x) const;
// Inlining these as performance examples
float stepLength() const { return _stepLength; }
float length() const { return float(_vertices.size()) * stepLength() - stepLength(); }
const std::vector<glm::vec2>& Terrain::vertices() const { return _vertices; }
bool isAboveGround(const glm::vec2& pos) const;
bool isBelowGround(const glm::vec2& pos) const { return !isAboveGround(pos); }
private:
Random _randomizer;
const float _stepLength;
const float _amplitude;
std::vector<glm::vec2> _vertices;
};
#endif
|
#ifndef TERRAIN_H
#define TERRAIN_H
#include <util/Math.h>
#include <util/Random.h>
#include <vector>
#include "Constants.h"
class Terrain {
public:
Terrain(
const float stepLength = constants::TERRAIN_STEP_LENGTH,
const float amplitude = constants::TERRAIN_HEIGHT_VARIATION_AMPLITUDE,
const float worldInitLength = constants::WORLD_INIT_LENGTH);
virtual ~Terrain();
void ensureHasTerrainTo(const float end);
glm::vec2 vertexAtX(const float x) const;
// Inlining these as performance examples
float stepLength() const { return _stepLength; }
float length() const { return float(_vertices.size()) * stepLength() - stepLength(); }
const std::vector<glm::vec2>& vertices() const { return _vertices; }
bool isAboveGround(const glm::vec2& pos) const;
bool isBelowGround(const glm::vec2& pos) const { return !isAboveGround(pos); }
private:
Random _randomizer;
const float _stepLength;
const float _amplitude;
std::vector<glm::vec2> _vertices;
};
#endif
|
Fix compilation bug on linux
|
Fix compilation bug on linux
|
C
|
mit
|
GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker
|
6d5fabbdb3b2f9e81ad75c93c0b238fa0a6e14fa
|
MWEditorAddOns/MTextAddOn.h
|
MWEditorAddOns/MTextAddOn.h
|
//==================================================================
// MTextAddOn.h
// Copyright 1996 Metrowerks Corporation, All Rights Reserved.
//==================================================================
// This is a proxy class used by Editor add_ons. It does not inherit from BView
// but provides an abstract interface to a text engine.
#ifndef _MTEXTADDON_H
#define _MTEXTADDON_H
#include <SupportKit.h>
class MIDETextView;
class BWindow;
struct entry_ref;
class MTextAddOn
{
public:
MTextAddOn(
MIDETextView& inTextView);
virtual ~MTextAddOn();
virtual const char* Text();
virtual int32 TextLength() const;
virtual void GetSelection(
int32 *start,
int32 *end) const;
virtual void Select(
int32 newStart,
int32 newEnd);
virtual void Delete();
virtual void Insert(
const char* inText);
virtual void Insert(
const char* text,
int32 length);
virtual BWindow* Window();
virtual status_t GetRef(
entry_ref& outRef);
virtual bool IsEditable();
private:
MIDETextView& fText;
};
#endif
|
// [zooey, 2005]: made MTextAddon really an abstract class
//==================================================================
// MTextAddOn.h
// Copyright 1996 Metrowerks Corporation, All Rights Reserved.
//==================================================================
// This is a proxy class used by Editor add_ons. It does not inherit from BView
// but provides an abstract interface to a text engine.
#ifndef MTEXTADDON_H
#define MTEXTADDON_H
//#include "HLibHekkel.h"
class BWindow;
struct entry_ref;
class /*IMPEXP_LIBHEKKEL*/ MTextAddOn
{
public:
virtual ~MTextAddOn();
virtual const char* Text() = 0;
virtual int32 TextLength() const = 0;
virtual void GetSelection(int32 *start, int32 *end) const = 0;
virtual void Select(int32 newStart, int32 newEnd) = 0;
virtual void Delete() = 0;
virtual void Insert(const char* inText) = 0;
virtual void Insert(const char* text, int32 length) = 0;
virtual BWindow* Window() = 0;
virtual status_t GetRef(entry_ref& outRef) = 0;
};
#if !__INTEL__
#pragma export on
#endif
extern "C" {
long perform_edit(MTextAddOn *addon);
}
#if !__INTEL__
#pragma export reset
#endif
typedef long (*perform_edit_func)(MTextAddOn *addon);
#endif
|
Replace BeIDE header by the Pe version
|
Replace BeIDE header by the Pe version
We won't be building for BeIDE anyway...
|
C
|
mit
|
mmuman/dontworry,mmuman/dontworry
|
ed753c358e9b27571f6be5f33b25cbe0738f0e36
|
src/libc/utils/efopen.c
|
src/libc/utils/efopen.c
|
#include "system.h"
FILE *
efopen(char *env)
{
char *t, *p;
int port, sock;
unless (t = getenv(env)) return (0);
if (IsFullPath(t)) return (fopen(t, "a"));
if ((p = strchr(t, ':')) && ((port = atoi(p+1)) > 0)) {
*p = 0;
sock = tcp_connect(t, port);
return (fdopen(sock, "w"));
}
return (fopen(DEV_TTY, "w"));
}
|
#include "system.h"
FILE *
efopen(char *env)
{
char *t, *p;
int port, sock;
unless (t = getenv(env)) return (0);
if (IsFullPath(t)) return (fopen(t, "a"));
if ((p = strchr(t, ':')) && ((port = atoi(p+1)) > 0)) {
*p = 0;
sock = tcp_connect(t, port);
*p = ':';
if (sock >= 0) return (fdopen(sock, "w"));
}
return (fopen(DEV_TTY, "w"));
}
|
Fix a bug where we stomp on the : in a host:port in BK_SHOWPROC Also don't assume the socket connected.
|
Fix a bug where we stomp on the : in a host:port in BK_SHOWPROC
Also don't assume the socket connected.
bk: 44b822c06FCnb1Sd2dJJIybq98XuEw
|
C
|
apache-2.0
|
bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper
|
4471aecefd4d31d1507968300b978c6a6237e157
|
src/config.h
|
src/config.h
|
#ifndef _CONFIG_H
#define _CONFIG_H
#define ENABLE_FUTILITY_DEPTH 1 // TODO: switch to at least 2
#define ENABLE_HISTORY 1
#define ENABLE_KILLERS 1
#define ENABLE_LMR 1
#define ENABLE_NNUE 0
#define ENABLE_NULL_MOVE_PRUNING 1
#define ENABLE_REVERSE_FUTILITY_DEPTH 1 // TODO: switch to at least 2
#define ENABLE_SEE_Q_PRUNE_LOSING_CAPTURES 0
#define ENABLE_SEE_SORTING 0
#define ENABLE_TIMER_STOP_DEEPENING 1
#define ENABLE_TT_CUTOFFS 1
#define ENABLE_TT_MOVES 1
#endif
|
#ifndef _CONFIG_H
#define _CONFIG_H
#define ENABLE_FUTILITY_DEPTH 1 // TODO: switch to at least 2
#define ENABLE_HISTORY 1
#define ENABLE_KILLERS 1
#define ENABLE_LMR 1
#define ENABLE_NNUE 0
#define ENABLE_NULL_MOVE_PRUNING 1
#define ENABLE_REVERSE_FUTILITY_DEPTH 1 // TODO: switch to at least 2
#define ENABLE_SEE_Q_PRUNE_LOSING_CAPTURES 1
#define ENABLE_SEE_SORTING 1
#define ENABLE_TIMER_STOP_DEEPENING 1
#define ENABLE_TT_CUTOFFS 1
#define ENABLE_TT_MOVES 1
#endif
|
Enable pruning losing captures in qsearch
|
Enable pruning losing captures in qsearch
|
C
|
bsd-3-clause
|
jwatzman/nameless-chessbot,jwatzman/nameless-chessbot
|
f1b1720769e346cc2a619f80191e380619421669
|
stdlib/public/SwiftShims/UIKitOverlayShims.h
|
stdlib/public/SwiftShims/UIKitOverlayShims.h
|
//===--- UIKitOverlayShims.h ---===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===--------------------===//
#ifndef SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
#define SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
@import UIKit;
#if __has_feature(nullability)
#pragma clang assume_nonnull begin
#endif
#if TARGET_OS_TV || TARGET_OS_IOS
static inline BOOL _swift_UIKit_UIFocusEnvironmentContainsEnvironment(id<UIFocusEnvironment> environment, id<UIFocusEnvironment> otherEnvironment) {
return [UIFocusSystem environment:environment containsEnvironment:otherEnvironment];
}
#endif // TARGET_OS_TV || TARGET_OS_IOS
#if __has_feature(nullability)
#pragma clang assume_nonnull end
#endif
#endif // SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
|
//===--- UIKitOverlayShims.h ---===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===--------------------===//
#ifndef SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
#define SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
@import UIKit;
#if __has_feature(nullability)
#pragma clang assume_nonnull begin
#endif
#if TARGET_OS_TV || TARGET_OS_IOS
static inline BOOL _swift_UIKit_UIFocusEnvironmentContainsEnvironment(
id<UIFocusEnvironment> environment,
id<UIFocusEnvironment> otherEnvironment
) API_AVAILABLE(ios(11.0), tvos(11.0)) {
return [UIFocusSystem environment:environment containsEnvironment:otherEnvironment];
}
#endif // TARGET_OS_TV || TARGET_OS_IOS
#if __has_feature(nullability)
#pragma clang assume_nonnull end
#endif
#endif // SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H
|
Make the UIKit shim function properly available
|
[overlay] Make the UIKit shim function properly available
<rdar://problem/33789760>
|
C
|
apache-2.0
|
xwu/swift,lorentey/swift,swiftix/swift,practicalswift/swift,jckarter/swift,apple/swift,parkera/swift,shajrawi/swift,allevato/swift,harlanhaskins/swift,aschwaighofer/swift,gregomni/swift,shajrawi/swift,CodaFi/swift,lorentey/swift,xedin/swift,gregomni/swift,gregomni/swift,airspeedswift/swift,shajrawi/swift,practicalswift/swift,devincoughlin/swift,gregomni/swift,uasys/swift,apple/swift,roambotics/swift,xwu/swift,brentdax/swift,lorentey/swift,airspeedswift/swift,atrick/swift,aschwaighofer/swift,uasys/swift,frootloops/swift,allevato/swift,huonw/swift,swiftix/swift,ahoppen/swift,glessard/swift,tjw/swift,zisko/swift,natecook1000/swift,JGiola/swift,tjw/swift,danielmartin/swift,austinzheng/swift,practicalswift/swift,glessard/swift,austinzheng/swift,alblue/swift,gregomni/swift,xedin/swift,shajrawi/swift,benlangmuir/swift,devincoughlin/swift,zisko/swift,rudkx/swift,ahoppen/swift,JGiola/swift,CodaFi/swift,huonw/swift,gribozavr/swift,karwa/swift,aschwaighofer/swift,sschiau/swift,parkera/swift,rudkx/swift,jopamer/swift,gribozavr/swift,nathawes/swift,stephentyrone/swift,hooman/swift,alblue/swift,gregomni/swift,karwa/swift,stephentyrone/swift,amraboelela/swift,CodaFi/swift,alblue/swift,devincoughlin/swift,rudkx/swift,zisko/swift,aschwaighofer/swift,roambotics/swift,stephentyrone/swift,roambotics/swift,JGiola/swift,apple/swift,jopamer/swift,shahmishal/swift,lorentey/swift,frootloops/swift,devincoughlin/swift,airspeedswift/swift,uasys/swift,jckarter/swift,hooman/swift,frootloops/swift,danielmartin/swift,nathawes/swift,jmgc/swift,brentdax/swift,tkremenek/swift,amraboelela/swift,OscarSwanros/swift,swiftix/swift,uasys/swift,benlangmuir/swift,glessard/swift,danielmartin/swift,shahmishal/swift,harlanhaskins/swift,frootloops/swift,OscarSwanros/swift,gribozavr/swift,rudkx/swift,nathawes/swift,jopamer/swift,gribozavr/swift,frootloops/swift,huonw/swift,OscarSwanros/swift,sschiau/swift,rudkx/swift,harlanhaskins/swift,stephentyrone/swift,roambotics/swift,ahoppen/swift,alblue/swift,tkremenek/swift,aschwaighofer/swift,austinzheng/swift,danielmartin/swift,sschiau/swift,harlanhaskins/swift,xedin/swift,stephentyrone/swift,ahoppen/swift,lorentey/swift,airspeedswift/swift,allevato/swift,brentdax/swift,shajrawi/swift,CodaFi/swift,ahoppen/swift,austinzheng/swift,shajrawi/swift,sschiau/swift,JGiola/swift,airspeedswift/swift,xwu/swift,nathawes/swift,xedin/swift,practicalswift/swift,xedin/swift,stephentyrone/swift,tkremenek/swift,shahmishal/swift,practicalswift/swift,jopamer/swift,sschiau/swift,jmgc/swift,airspeedswift/swift,rudkx/swift,karwa/swift,gribozavr/swift,jmgc/swift,natecook1000/swift,lorentey/swift,parkera/swift,allevato/swift,shahmishal/swift,jckarter/swift,alblue/swift,uasys/swift,tjw/swift,tkremenek/swift,hooman/swift,gribozavr/swift,benlangmuir/swift,apple/swift,uasys/swift,huonw/swift,apple/swift,tkremenek/swift,jmgc/swift,CodaFi/swift,stephentyrone/swift,atrick/swift,amraboelela/swift,lorentey/swift,tjw/swift,huonw/swift,zisko/swift,tkremenek/swift,practicalswift/swift,shahmishal/swift,jckarter/swift,huonw/swift,practicalswift/swift,jckarter/swift,devincoughlin/swift,natecook1000/swift,xwu/swift,atrick/swift,swiftix/swift,hooman/swift,zisko/swift,nathawes/swift,brentdax/swift,alblue/swift,huonw/swift,benlangmuir/swift,roambotics/swift,hooman/swift,amraboelela/swift,OscarSwanros/swift,benlangmuir/swift,gribozavr/swift,glessard/swift,xwu/swift,hooman/swift,xedin/swift,brentdax/swift,harlanhaskins/swift,atrick/swift,jmgc/swift,allevato/swift,lorentey/swift,parkera/swift,danielmartin/swift,devincoughlin/swift,CodaFi/swift,tkremenek/swift,jmgc/swift,karwa/swift,parkera/swift,alblue/swift,roambotics/swift,natecook1000/swift,zisko/swift,amraboelela/swift,tjw/swift,uasys/swift,parkera/swift,shahmishal/swift,austinzheng/swift,danielmartin/swift,swiftix/swift,apple/swift,swiftix/swift,frootloops/swift,gribozavr/swift,karwa/swift,nathawes/swift,benlangmuir/swift,ahoppen/swift,shahmishal/swift,karwa/swift,atrick/swift,sschiau/swift,jopamer/swift,natecook1000/swift,nathawes/swift,OscarSwanros/swift,airspeedswift/swift,xedin/swift,xwu/swift,JGiola/swift,glessard/swift,allevato/swift,JGiola/swift,brentdax/swift,jckarter/swift,austinzheng/swift,xwu/swift,tjw/swift,xedin/swift,harlanhaskins/swift,harlanhaskins/swift,parkera/swift,atrick/swift,natecook1000/swift,jopamer/swift,jckarter/swift,jopamer/swift,OscarSwanros/swift,sschiau/swift,aschwaighofer/swift,danielmartin/swift,parkera/swift,devincoughlin/swift,devincoughlin/swift,shajrawi/swift,tjw/swift,jmgc/swift,aschwaighofer/swift,allevato/swift,sschiau/swift,OscarSwanros/swift,glessard/swift,karwa/swift,swiftix/swift,brentdax/swift,shahmishal/swift,zisko/swift,frootloops/swift,shajrawi/swift,amraboelela/swift,natecook1000/swift,austinzheng/swift,CodaFi/swift,hooman/swift,amraboelela/swift,karwa/swift,practicalswift/swift
|
f1c1d7f0c28424d218fdff65705118b19d3681d8
|
src/Square.h
|
src/Square.h
|
#ifndef SQUARE_H_
#define SQUARE_H_
namespace flat2d
{
class Square
{
protected:
int x, y, w, h;
public:
Square(int px, int py, int dim) : x(px), y(py), w(dim), h(dim) { }
Square(int px, int py, int pw, int ph) : x(px), y(py), w(pw), h(ph) { }
bool containsPoint(int, int) const;
bool operator<(const Square&) const;
bool operator==(const Square&) const;
bool operator!=(const Square&) const;
};
} // namespace flat2d
#endif // SQUARE_H_
|
#ifndef SQUARE_H_
#define SQUARE_H_
namespace flat2d
{
class Square
{
protected:
int x, y, w, h;
public:
Square(int px, int py, int dim) : x(px), y(py), w(dim), h(dim) { }
Square(int px, int py, int pw, int ph) : x(px), y(py), w(pw), h(ph) { }
bool containsPoint(int, int) const;
bool operator<(const Square&) const;
bool operator==(const Square&) const;
bool operator!=(const Square&) const;
int getXpos() { return x; }
int getYpos() { return y; }
int getWidth() { return w; }
int getHeight() { return h; }
};
} // namespace flat2d
#endif // SQUARE_H_
|
Make square position and dimension accessible
|
Make square position and dimension accessible
|
C
|
mit
|
LiquidityC/flat
|
d582802aaf0400c4ca4a5832e63492860d8daa70
|
boards/wizzimote/include/periph_conf.h
|
boards/wizzimote/include/periph_conf.h
|
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Real Time Clock configuration
*/
#define RTC_NUMOF (1)
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
|
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Real Time Clock configuration
* @{
*/
#define RTC_NUMOF (1)
/** @} */
/**
* @brief Timer configuration
* @{
*/
#define TIMER_NUMOF (2U)
#define TIMER_0_EN 1
#define TIMER_1_EN 1
/* Timer 0 configuration */
#define TIMER_0_CHANNELS 5
#define TIMER_0_MAX_VALUE (0xffff)
/* TODO(ximus): Finalize this, current setup is not provide 1Mhz */
#define TIMER_0_CLK_TASSEL TASSEL_2 /* SMLCK @ Mhz */
#define TIMER_0_DIV_ID ID__1 /* /1 */
#define TIMER_0_DIV_TAIDEX TAIDEX_4 /* /5 */
/* Timer 1 configuration */
#define TIMER_1_CHANNELS 3
#define TIMER_1_MAX_VALUE (0xffff)
#define TIMER_1_CLK_TASSEL TASSEL_2 /* SMLCK @ Mhz */
#define TIMER_1_DIV_ID ID__1 /* /1 */
#define TIMER_1_DIV_TAIDEX TAIDEX_4 /* /5 */
/** @} */
/**
* @brief wtimer configuration
* @{
*/
/* NOTE(ximus): all msp430's are 16-bit, should be defined in cpu */
#define WTIMER_MASK 0xffff0000 /* 16-bit timers */
/* TODO(ximus): set these correctly. default values for now */
#define WTIMER_USLEEP_UNTIL_OVERHEAD 3
#define WTIMER_OVERHEAD 24
#define WTIMER_BACKOFF 30
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
|
Update wizzimote timer periph config
|
Update wizzimote timer periph config
|
C
|
lgpl-2.1
|
ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT
|
64df4991a93471c2862c2371c33cf30e55769f06
|
test/Misc/win32-macho.c
|
test/Misc/win32-macho.c
|
// Check that basic use of win32-macho targets works.
// REQUIRES: x86-registered-target
// RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho %s -o /dev/null
|
// Check that basic use of win32-macho targets works.
// RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho %s
|
Remove dev/null redirect and x86 backend requirement from new test.
|
Remove dev/null redirect and x86 backend requirement from new test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@210699 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
65b68f641e684cedbd25bc7bceb33af21d534b87
|
pipbench/server/load_simulator.c
|
pipbench/server/load_simulator.c
|
#include <Python.h>
static PyObject *
simulate_install(PyObject *self, PyObject *args) {
long cpu_units;
long mem_bytes;
if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) {
return NULL;
}
char *p;
p = (char *) malloc(mem_bytes);
int j = 0;
for (long i = 0; i < cpu_units; i++) {
j++;
}
free(p);
return Py_BuildValue("i", 0);
}
static PyObject *
simulate_import(PyObject *self, PyObject *args) {
long cpu_units;
long mem_bytes;
if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) {
return NULL;
}
int j = 0;
for (long i = 0; i < cpu_units; i++) {
j++;
}
PyObject * p = (PyObject *) PyMem_Malloc(mem_bytes);
return p;
}
static PyMethodDef LoadSimulatorMethods[] =
{
{"simulate_install", simulate_install, METH_VARARGS, "simulate install"},
{"simulate_import", simulate_import, METH_VARARGS, "simulate import"},
{ NULL, NULL, 0, NULL }
};
PyMODINIT_FUNC
initload_simulator(void)
{
(void) Py_InitModule("load_simulator", LoadSimulatorMethods);
}
|
#include <Python.h>
static PyObject *
simulate_install(PyObject *self, PyObject *args) {
long cpu_units;
long mem_bytes;
if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) {
return NULL;
}
char *p;
p = (char *) malloc(mem_bytes);
int j = 0;
for (long i = 0; i < cpu_units; i++) {
j++;
}
free(p);
return Py_BuildValue("i", 0);
}
static PyObject *
simulate_import(PyObject *self, PyObject *args) {
long cpu_units;
long mem_bytes;
if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) {
return NULL;
}
int j = 0;
for (long i = 0; i < cpu_units; i++) {
j++;
}
char * p = malloc(mem_bytes);
return Py_BuildValue("s#", p, mem_bytes);
}
static PyMethodDef LoadSimulatorMethods[] =
{
{"simulate_install", simulate_install, METH_VARARGS, "simulate install"},
{"simulate_import", simulate_import, METH_VARARGS, "simulate import"},
{ NULL, NULL, 0, NULL }
};
PyMODINIT_FUNC
initload_simulator(void)
{
(void) Py_InitModule("load_simulator", LoadSimulatorMethods);
}
|
Fix invalid heap issues with load simulator
|
Fix invalid heap issues with load simulator
|
C
|
apache-2.0
|
open-lambda/open-lambda,open-lambda/open-lambda,open-lambda/open-lambda,open-lambda/open-lambda,open-lambda/open-lambda
|
6871d2950ed49360b01aa83960689fc85e82ee24
|
LYCategory/_Foundation/_Work/NSString+Input.h
|
LYCategory/_Foundation/_Work/NSString+Input.h
|
//
// NSString+Input.h
// LYCategory
//
// Created by Rick Luo on 11/25/13.
// Copyright (c) 2013 Luo Yu. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Input)
#pragma mark EMPTY
- (BOOL)isEmpty;
#pragma mark EMAIL
- (BOOL)isEmail;
#pragma mark SPACE
- (NSString *)trimStartSpace;
- (NSString *)trimSpace;
#pragma mark PHONE NUMBER
- (NSString *)phoneNumber;
- (BOOL)isPhoneNumber;
#pragma mark EMOJI
- (NSString *)replaceEmojiTextWithUnicode;
- (NSString *)replaceEmojiUnicodeWithText;
@end
|
//
// NSString+Input.h
// LYCategory
//
// Created by Rick Luo on 11/25/13.
// Copyright (c) 2013 Luo Yu. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Input)
#pragma mark EMPTY
- (BOOL)isEmpty;
#pragma mark EMAIL
- (BOOL)isEmail;
#pragma mark ID
- (BOOL)isIDNumber;
#pragma mark SPACE
- (NSString *)trimStartSpace;
- (NSString *)trimSpace;
#pragma mark PHONE NUMBER
- (NSString *)phoneNumber;
- (BOOL)isPhoneNumber;
#pragma mark EMOJI
- (NSString *)replaceEmojiTextWithUnicode;
- (NSString *)replaceEmojiUnicodeWithText;
@end
|
Add : id number validation
|
Add : id number validation
|
C
|
mit
|
blodely/LYCategory,blodely/LYCategory,blodely/LYCategory,blodely/LYCategory
|
eb4808438d0feb7a25fc393da69dd8132ebed48c
|
You-DataStore/datastore.h
|
You-DataStore/datastore.h
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class Transaction;
class DataStore {
friend class Transaction;
public:
static bool begin();
// Modifying methods
static bool post(TaskId, SerializedTask&);
static bool put(TaskId, SerializedTask&);
static bool erase(TaskId);
static boost::variant<bool, SerializedTask> get(TaskId);
static std::vector<SerializedTask>
filter(const std::function<bool(SerializedTask)>&);
private:
static DataStore& getInstance();
bool isServing = false;
std::deque<IOperation> operationsQueue;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class Transaction;
class DataStore {
friend class Transaction;
public:
static bool begin();
// Modifying methods
static bool post(TaskId, SerializedTask&);
static bool put(TaskId, SerializedTask&);
static bool erase(TaskId);
static boost::variant<bool, SerializedTask> get(TaskId);
static std::vector<SerializedTask>
filter(const std::function<bool(SerializedTask)>&);
private:
static DataStore& getInstance();
bool isServing = false;
std::deque<Internal::IOperation> operationsQueue;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
Update reference to IOperation to include Internal namespace
|
Update reference to IOperation to include Internal namespace
|
C
|
mit
|
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
|
bab54887404e9f7d4fc68ce2e41ad6bae8035f55
|
parser_tests.c
|
parser_tests.c
|
#include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
tk->value.number = number;
} else {
tk->value.string = string;
}
return tk;
}
void test_parse_number() {
struct token_list *tkl = make_token_list();
tkl.append(make_token(tok_number, NULL, 0.0, 42);
struct ast_node *result = parse_number(tkl);
EXPECT_EQ(result->val, tkl->head);
EXPECT_EQ(result->num_children, 0);
destroy_token_list(tkl);
}
|
#include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
tk->value.num = number;
} else {
tk->value.string = str;
}
return tk;
}
void test_parse_number() {
struct token_list *tkl = make_token_list();
tkl.append(make_token(tok_number, NULL, 0.0, 42);
struct ast_node *result = parse_number(tkl);
EXPECT_EQ(result->val, tkl->head);
EXPECT_EQ(result->num_children, 0);
destroy_token_list(tkl);
}
|
Fix typo in parser tests
|
Fix typo in parser tests
|
C
|
mit
|
iankronquist/yaz,iankronquist/yaz
|
244047b32d720d65be0b5ef0c832ae16acf8c26c
|
src/effect_layer.h
|
src/effect_layer.h
|
#pragma once
#include <pebble.h>
#include "effects.h"
//number of supported effects on a single effect_layer (must be <= 255)
#define MAX_EFFECTS 4
// structure of effect layer
typedef struct {
Layer* layer;
effect_cb* effects[MAX_EFFECTS];
void* params[MAX_EFFECTS];
uint8_t next_effect;
} EffectLayer;
//creates effect layer
EffectLayer* effect_layer_create(GRect frame);
//destroys effect layer
void effect_layer_destroy(EffectLayer *effect_layer);
//sets effect for the layer
void effect_layer_add_effect(EffectLayer *effect_layer, effect_cb* effect, void* param);
//gets layer
Layer* effect_layer_get_layer(EffectLayer *effect_layer);
|
#pragma once
#include <pebble.h>
#include "effects.h"
//number of supported effects on a single effect_layer (must be <= 255)
#define MAX_EFFECTS 4
// structure of effect layer
typedef struct {
Layer* layer;
effect_cb* effects[MAX_EFFECTS];
void* params[MAX_EFFECTS];
uint8_t next_effect;
} EffectLayer;
//creates effect layer
EffectLayer* effect_layer_create(GRect frame);
//destroys effect layer
void effect_layer_destroy(EffectLayer *effect_layer);
//sets effect for the layer
void effect_layer_add_effect(EffectLayer *effect_layer, effect_cb* effect, void* param);
//gets layer
Layer* effect_layer_get_layer(EffectLayer *effect_layer);
// Recreate inverter_layer for BASALT
#ifndef PBL_PLATFORM_APLITE
#define InverterLayer EffectLayer
#define inverter_layer_create(frame)({ EffectLayer* _el=effect_layer_create(frame); effect_layer_add_effect(_el,effect_invert,NULL);_el; })
#define inverter_layer_get_layer effect_layer_get_layer
#define inverter_layer_destroy effect_layer_destroy
#endif
|
Add a few macros to support InverterLayer on BASALT
|
Add a few macros to support InverterLayer on BASALT
Re-add support for InverterLayer in SDK3.0.
Just include effect_layer.h in files using InverterLayer and it should
work out of the box.
Warning: This InverterLayer actually invert all colors, unlike the
original InverterLayer that had a weird behavior on Basalt.
|
C
|
mit
|
n4ru/EffectLayer,clach04/EffectLayer,clach04/EffectLayer,gregoiresage/EffectLayer,n4ru/EffectLayer,clach04/EffectLayer,nevraw/EffectLayer,nevraw/EffectLayer,ron064/EffectLayer,ron064/EffectLayer,nevraw/EffectLayer,gregoiresage/EffectLayer,n4ru/EffectLayer,gregoiresage/EffectLayer,ron064/EffectLayer
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.