commit
stringlengths 40
40
| old_file
stringlengths 4
112
| new_file
stringlengths 4
112
| old_contents
stringlengths 0
2.05k
| new_contents
stringlengths 28
3.9k
| subject
stringlengths 17
736
| message
stringlengths 18
4.78k
| lang
stringclasses 1
value | license
stringclasses 13
values | repos
stringlengths 7
111k
|
---|---|---|---|---|---|---|---|---|---|
f48d179fc86c5fc1883738a9559bfb2f3c9995ac | ZDetailKit/ZDetailKit.h | ZDetailKit/ZDetailKit.h | //
// ZDetailKit.h
//
// Created by Lukas Zeller on 15.02.13.
// Copyright (c) 2013 plan44.ch. All rights reserved.
//
// common
#import "ZDetailEditing.h"
#import "ZDBGMacros.h"
// ZUtils
#import "ZCustomI8n.h"
// controllers
#import "ZDetailTableViewController.h"
// cells
#import "ZButtonCell.h"
#import "ZSwitchCell.h"
#import "ZSegmentChoicesCell.h"
#import "ZSliderCell.h"
#import "ZTextFieldCell.h"
#import "ZTextViewCell.h"
#import "ZDateTimeCell.h"
#import "ZColorChooserCell.h"
#import "ZChoiceListCell.h"
// Note: ZLocationCell requires MapKit and CoreLocation frameworks to be included in the app
#import "ZLocationCell.h"
// EOF | //
// ZDetailKit.h
//
// Created by Lukas Zeller on 15.02.13.
// Copyright (c) 2013 plan44.ch. All rights reserved.
//
// common
#import "ZDetailEditing.h"
#import "ZDBGMacros.h"
// ZUtils
#import "ZCustomI8n.h"
// controllers
#import "ZDetailTableViewController.h"
// cells
#import "ZButtonCell.h"
#import "ZSwitchCell.h"
#import "ZSegmentChoicesCell.h"
#import "ZSliderCell.h"
#import "ZTextFieldCell.h"
#import "ZTextViewCell.h"
#import "ZDateTimeCell.h"
#import "ZColorChooserCell.h"
#import "ZChoiceListCell.h"
// Note: ZLocationCell requires MapKit and CoreLocation frameworks to be included in the app,
// which in turn requires that the app declares usage of location in NSLocationAlwaysUsageDescription,
// NSLocationWhenInUseUsageDescription, and NSLocationAlwaysAndWhenInUseUsageDescription in info.plist
#import "ZLocationCell.h"
// EOF
| Comment improvement: explain consequences of using ZLocationCell | Comment improvement: explain consequences of using ZLocationCell | C | mit | plan44/zdetailkit |
1aafca50ae3f5050c05567b76d028e30711b2ba7 | project_config/lmic_project_config.h | project_config/lmic_project_config.h | // project-specific definitions for otaa sensor
//#define CFG_eu868 1
#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
| // project-specific definitions
//#define CFG_eu868 1
#define CFG_us915 1
//#define CFG_au921 1
//#define CFG_as923 1
// #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP /* for as923-JP */
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS
| Add example of how to select Japan country | Add example of how to select Japan country
| C | mit | mcci-catena/arduino-lmic,mcci-catena/arduino-lmic,mcci-catena/arduino-lmic |
892c39d588e9a16609b67177e912ac1564317838 | libk/UVSE/screenTest.c | libk/UVSE/screenTest.c | #include "../libk.h"
void screenTest(void)
{
int rows, cols; rows = glob.rows; cols = glob.cols;
printf("%s", CursorToTopLeft ClearScreen );fflush(stdout);
printf("Top of Screen: rows = %d cols = %d\n\r", rows,cols);fflush(stdout);
int count;
for (count = 2; count < rows; count ++)
{printf("%s", TildeReturnNewline); fflush(stdout);}
printf("%s","Bottom of Screen "); fflush(stdout);
// Force Cursor Position with <ESC>[{ROW};{COLUMN}f
printf ("\x1b[%d;%df%s", 5,5,"Hello World"); fflush(stdout);
//
printf("\x1b[%d;%df",2,1); fflush(stdout);
return;
}
| #include "../libk.h"
// function screenTest
void screenTest(void)
{
// retrieve Screen rows and columns from struct glob
int rows, cols; rows = glob.rows; cols = glob.cols;
// Move Screen Cursor to Top Left, Then Clear Screen
printf("%s", CursorToTopLeft ClearScreen );fflush(stdout);
// Print the Screen Header
printf("Top of Screen: rows = %d cols = %d\n\r", rows,cols);fflush(stdout);
int count;
// Print Left Column Tildes to Screen, leaving screen last line clear
for (count = 2; count < rows; count ++)
{printf("%s", TildeReturnNewline); fflush(stdout);}
// Prnt Screen Last Line
printf("%s","Bottom of Screen "); fflush(stdout);
// Place Cursor Position with <ESC>[{ROW};{COLUMN}f
printf ("\x1b[%d;%df%s", 5,5,"Hello World"); fflush(stdout);
// Move Screen Cursor to Second Line, First Column
printf("\x1b[%d;%df",2,1); fflush(stdout);
return;
}
| Add comments suit for formatting with idiom | Add comments suit for formatting with idiom
| C | bsd-2-clause | eingaeph/pip.imbue.hood,eingaeph/pip.imbue.hood |
0b062eb9d2908410674c2751bbcee5b9df464732 | src/sensors/lmsensor.h | src/sensors/lmsensor.h |
#ifndef LMSENSOR_H
#define LMSENSOR_H
#include <K3Process>
#include <K3ProcIO>
#include "sensor.h"
/**
*
* Hans Karlsson
**/
class SensorSensor : public Sensor
{
Q_OBJECT
public:
SensorSensor(int interval, char tempUnit);
~SensorSensor();
void update();
private:
K3ShellProcess ksp;
QString extraParams;
QMap<QString, QString> sensorMap;
#ifdef __FreeBSD__
QMap<QString, QString> sensorMapBSD;
#endif
QString sensorResult;
private slots:
void receivedStdout(K3Process *, char *buffer, int);
void processExited(K3Process *);
};
#endif // LMSENSOR_H
|
#ifndef LMSENSOR_H
#define LMSENSOR_H
#include <K3Process>
#include <K3ProcIO>
#include "sensor.h"
/**
*
* Hans Karlsson
**/
class SensorSensor : public Sensor
{
Q_OBJECT
public:
SensorSensor(int interval, char tempUnit);
~SensorSensor();
void update();
private:
K3ShellProcess ksp;
QString extraParams;
QMap<QString, QString> sensorMap;
#if defined(__FreeBSD__) || defined(Q_OS_NETBSD)
QMap<QString, QString> sensorMapBSD;
#endif
QString sensorResult;
private slots:
void receivedStdout(K3Process *, char *buffer, int);
void processExited(K3Process *);
};
#endif // LMSENSOR_H
| Fix knode superkaramba compilation on NetBSD. Patch by Mark Davies. BUG: 154730 | Fix knode superkaramba compilation on NetBSD.
Patch by Mark Davies.
BUG: 154730
svn path=/trunk/KDE/kdeutils/superkaramba/; revision=753733
| C | lgpl-2.1 | KDE/superkaramba,KDE/superkaramba,KDE/superkaramba |
bdb2ac5ba922fe59c0aa5326b2a667ee9be2a8f0 | ir/be/test/fehler111.c | ir/be/test/fehler111.c | int x = 0;
int main(int argc, char *argv[]) {
int y;
char *p = &x;
*p = 23;
y = x;
x = 35;
return y;
}
| int x = 0;
int main(int argc, char *argv[]) {
int y;
char *p = &x;
*p = 23;
y = x;
x = 35;
return y != 23;
}
| Fix return value of main(). | Fix return value of main().
[r19359]
| C | lgpl-2.1 | killbug2004/libfirm,davidgiven/libfirm,8l/libfirm,8l/libfirm,davidgiven/libfirm,libfirm/libfirm,MatzeB/libfirm,killbug2004/libfirm,davidgiven/libfirm,jonashaag/libfirm,libfirm/libfirm,jonashaag/libfirm,jonashaag/libfirm,jonashaag/libfirm,killbug2004/libfirm,8l/libfirm,8l/libfirm,MatzeB/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,davidgiven/libfirm,davidgiven/libfirm,8l/libfirm,davidgiven/libfirm,libfirm/libfirm,libfirm/libfirm,killbug2004/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,killbug2004/libfirm,8l/libfirm,davidgiven/libfirm,MatzeB/libfirm,killbug2004/libfirm,8l/libfirm,jonashaag/libfirm,killbug2004/libfirm |
9aadb4378eb007d7116ffea50848f18f0b06a6da | test/TestPrologue.h | test/TestPrologue.h | #pragma once
#include <TestFramework/TestFramework.h>
#include <cal3d/streamops.h>
#include <cal3d/vector4.h>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/scoped_array.hpp>
using boost::scoped_ptr;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::scoped_array;
inline bool AreClose(
const CalPoint4& p1,
const CalPoint4& p2,
float tolerance
) {
return (p1.asCalVector4() - p2.asCalVector4()).length() < tolerance;
}
| #pragma once
// The old version of clang currently used on the Mac builder requires some
// operator<<() declarations to precede their use in the UnitTest++
// templates/macros. -- jlee - 2014-11-21
#include <cal3d/streamops.h>
#include <TestFramework/TestFramework.h>
#include <cal3d/vector4.h>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/scoped_array.hpp>
using boost::scoped_ptr;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::scoped_array;
inline bool AreClose(
const CalPoint4& p1,
const CalPoint4& p2,
float tolerance
) {
return (p1.asCalVector4() - p2.asCalVector4()).length() < tolerance;
}
| Rearrange output operator declarations in tests to make old OSX clang happy | cal3d: Rearrange output operator declarations in tests to make old OSX clang happy
Maybe fixing Mac buildbot.
git-svn-id: febc42a3fd39fb08e5ae2b2182bc5ab0a583559c@207440 07c76cb3-cb09-0410-85de-c24d39f1912e
| C | lgpl-2.1 | imvu/cal3d,imvu/cal3d,imvu/cal3d,imvu/cal3d |
b837d1dfefc4ec78d94ae211cc2c29efb67e18e6 | Kirin/core/ios/KirinKit/KirinKit/Services/NetworkingBackend.h | Kirin/core/ios/KirinKit/KirinKit/Services/NetworkingBackend.h | /*
Copyright 2011 Future Platforms
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import <KirinKit/KirinKit.h>
#import "Networking.h"
@interface NetworkingBackend : KirinServiceStub <Networking> {
}
@end
| /*
Copyright 2011 Future Platforms
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import <KirinKit/KirinKit.h>
#import "Networking.h"
@interface NetworkingBackend : KirinServiceStub <Networking, KirinServiceOnMainThread> {
}
@end
| Make Networking run on the main thread. | Make Networking run on the main thread.
| C | apache-2.0 | futureplatforms/Kirin,KirinJS/Kirin,futureplatforms/Kirin,KirinJS/Kirin,futureplatforms/Kirin,futureplatforms/Kirin,KirinJS/Kirin,futureplatforms/Kirin |
a1e0a43a37dd80462bbfe054629e88958506e8cb | EYMaskedTextField/EYMaskedTextField.h | EYMaskedTextField/EYMaskedTextField.h | //
// EYMaskedTextField.h
//
//
// Created by Evgeniy Yurtaev on 10/09/15.
// Copyright (c) 2015 Evgeniy Yurtaev. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol EYMaskedTextFieldDelegate <UITextFieldDelegate>
@optional
- (BOOL)textField:(UITextField *)textField shouldChangeUnformattedText:(NSString *)unformattedText inRange:(NSRange)range replacementString:(NSString *)string;
@end
@interface EYMaskedTextField : UITextField
@property (copy, nonatomic) IBInspectable NSString *mask;
@property (copy, nonatomic) IBInspectable NSString *unformattedText;
@property (assign, nonatomic) id<EYMaskedTextFieldDelegate> delegate;
@end
| //
// EYMaskedTextField.h
//
//
// Created by Evgeniy Yurtaev on 10/09/15.
// Copyright (c) 2015 Evgeniy Yurtaev. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol EYMaskedTextFieldDelegate <UITextFieldDelegate>
@optional
- (BOOL)textField:(nonnull UITextField *)textField shouldChangeUnformattedText:(nullable NSString *)unformattedText inRange:(NSRange)range replacementString:(nullable NSString *)string;
@end
@interface EYMaskedTextField : UITextField
@property (copy, nonatomic, nullable) IBInspectable NSString *mask;
@property (copy, nonatomic, nullable) IBInspectable NSString *unformattedText;
@property (assign, nonatomic, nullable) id<EYMaskedTextFieldDelegate> delegate;
@end
NS_ASSUME_NONNULL_END
| Add `nonnull` and `nullable` attributes | Add `nonnull` and `nullable` attributes
| C | mit | seaburg/EYMaskedTextField |
ce2aa429b587714faaec43f13b345a8be80765d5 | dev/multiple_renderer_separate_schema/renderman/RendermanTypes.h | dev/multiple_renderer_separate_schema/renderman/RendermanTypes.h | #pragma once
#include <ri.h>
#include <vector>
#include "Types.h"
typedef std::vector<RtInt> RtIntContainer;
typedef std::vector<RtFloat> RtFloatContainer;
/*!
* \remark Alembic does not support "holes" but to be safe, we are targeting
* RiPointsGeneralPolygons to future proof our code
*
* RtVoid RiPointsGeneralPolygons(RtInt npolys, RtInt nloops[],
* RtInt nvertices[],
* RtInt vertices[], ...);
*
*/
struct RendermanMeshData
{
V3fSamplingArray2D _P_data_array;
// Assumes topological stability
RtInt _npolys;
RtIntContainer _nloops_data;
RtIntContainer _nvertices_data;
RtIntContainer _vertices_data;
};
struct RendermanPointsData
{
V3fSamplingArray2D _P_data_array;
// Assumes topological stability
RtFloat _constantwidth;
RtIntContainer _ids_data;
RtFloatContainer _width_data;
};
// == Emacs ================
// -------------------------
// Local variables:
// tab-width: 4
// indent-tabs-mode: t
// c-basic-offset: 4
// end:
//
// == vi ===================
// -------------------------
// Format block
// ex:ts=4:sw=4:expandtab
// -------------------------
| #pragma once
#include <ri.h>
#include <vector>
#include "Types.h"
typedef std::vector<RtInt> RtIntContainer;
typedef std::vector<RtFloat> RtFloatContainer;
/*!
* \remark Alembic does not support "holes" but to be safe, we are targeting
* RiPointsGeneralPolygons to future proof our code
*
* RtVoid RiPointsGeneralPolygons(RtInt npolys, RtInt nloops[],
* RtInt nvertices[],
* RtInt vertices[], ...);
*
*/
struct RendermanMeshData
{
V3fSamplingArray2D _P_data_array;
// Assumes topological stability
RtInt _npolys;
RtIntContainer _nloops_data;
RtIntContainer _nvertices_data;
RtIntContainer _vertices_data;
};
struct RendermanPointsData
{
V3fSamplingArray2D _P_data_array;
// Assumes topological stability
RtIntContainer _ids_data;
RtFloatContainer _width_data;
};
// == Emacs ================
// -------------------------
// Local variables:
// tab-width: 4
// indent-tabs-mode: t
// c-basic-offset: 4
// end:
//
// == vi ===================
// -------------------------
// Format block
// ex:ts=4:sw=4:expandtab
// -------------------------
| Remove _constantwidth as there are other was to determine that via the length of the _width_data vector | Remove _constantwidth as there are other was to determine that via
the length of the _width_data vector
| C | apache-2.0 | nyue/SegmentedInterpolativeMotionBlurAlembic,nyue/SegmentedInterpolativeMotionBlurAlembic |
fc75c4c360b754efbe202c8f73327a2ddf7676f5 | src/plugins/crypto/compile_gcrypt.c | src/plugins/crypto/compile_gcrypt.c | /**
* @file
*
* @brief tests if compilation works (include and build paths set correct, etc...)
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#include <gcrypt.h>
int main (void)
{
gcry_cipher_hd_t elektraCryptoHandle;
return 0;
}
| /**
* @file
*
* @brief tests if compilation works (include and build paths set correct, etc...)
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#include <gcrypt.h>
gcry_cipher_hd_t nothing ()
{
gcry_cipher_hd_t elektraCryptoHandle = NULL;
return elektraCryptoHandle;
}
int main (void)
{
nothing ();
return 0;
}
| Fix detection of lib if we use `-Werror` | Gcrypt: Fix detection of lib if we use `-Werror`
Before this update detecting Libgcrypt would fail, if we treated
warnings as errors (`-Werror`). The cause of this problem was that
compiling `compile_gcrypt.cpp` produced a warning about an unused
variable.
| C | bsd-3-clause | mpranj/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,e1528532/libelektra,mpranj/libelektra,e1528532/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,e1528532/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,petermax2/libelektra,BernhardDenner/libelektra,mpranj/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,BernhardDenner/libelektra,e1528532/libelektra,e1528532/libelektra,petermax2/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra |
2f2e68df8c5655a47efad28f180070e8e87760b7 | jre_emul/Classes/java_lang_Thread.h | jre_emul/Classes/java_lang_Thread.h | /*
* 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 java_lang_Thread_H
#define java_lang_Thread_H
#import <pthread.h>
@class JavaLangThread;
CF_EXTERN_C_BEGIN
pthread_key_t java_thread_key;
pthread_once_t java_thread_key_init_once;
void initJavaThreadKeyOnce();
JavaLangThread *getCurrentJavaThreadOrNull();
CF_EXTERN_C_END
#endif // java_lang_Thread_H
| /*
* 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 java_lang_Thread_H
#define java_lang_Thread_H
#import <pthread.h>
@class JavaLangThread;
CF_EXTERN_C_BEGIN
extern pthread_key_t java_thread_key;
extern pthread_once_t java_thread_key_init_once;
void initJavaThreadKeyOnce();
JavaLangThread *getCurrentJavaThreadOrNull();
CF_EXTERN_C_END
#endif // java_lang_Thread_H
| Fix unintentional tentative definitions that result in duplicate symbol definitions when building with -fno-common | Fix unintentional tentative definitions that result in duplicate symbol definitions when building with -fno-common
This primarily consists of adding missing `extern`s in front of declarations of global variables, and `typedef` in front of some `NS_ENUM`s.
-fno-common is being turned on by default with Clang 11. This fix is a preemptive measure to ensure code will compile when Clang 11 is shipped in a future Xcode update.
In C, global variables that are defined without an initializer are known as tentative definitions. These are distinct from declarations of global variables, which are preceeded by the `extern` keyword.
For performance and correctness reasons, Clang is changing their handling of tentative definitions. Almost all tentative definitions are unintentional omissions of `extern`, rather than an intentional decision by the code author, which can result in subtle bugs that are hard to pin down.
Historically, Clang has placed tentative definitions in the __DATA,__common section. The linker then allows non-tentative definitions to override any tentative definitions, and coalesces all tentative definitions of a single symbol into a single tentative definition. This meant that having multiple tentative definitions would not produce a linker error about duplicate symbol definitions, nor would having both a normal and tentative definition.
With the -fno-common flag, Clang will instead place both tentative and normal definitions in the __DATA,__bss section, which will result in duplicate symbol definition errors from the linker if multiple tentative definitions and/or normal definitions are present in different object files.
PiperOrigin-RevId: 305885508
| C | apache-2.0 | lukhnos/j2objc,google/j2objc,lukhnos/j2objc,mirego/j2objc,groschovskiy/j2objc,lukhnos/j2objc,lukhnos/j2objc,mirego/j2objc,groschovskiy/j2objc,google/j2objc,groschovskiy/j2objc,mirego/j2objc,mirego/j2objc,groschovskiy/j2objc,lukhnos/j2objc,mirego/j2objc,google/j2objc,mirego/j2objc,lukhnos/j2objc,groschovskiy/j2objc,groschovskiy/j2objc,google/j2objc,google/j2objc,google/j2objc |
7217135f6a8777fbdeb0ffe08abf5ccbd5b13efc | WebApiClient/Code/WebApiClient-Core.h | WebApiClient/Code/WebApiClient-Core.h | //
// WebApiClient-Core.h
// WebApiClient
//
// Created by Matt on 21/07/15.
// Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0.
//
#import <WebApiClient/FileWebApiResource.h>
#import <WebApiClient/NSDictionary+WebApiClient.h>
#import <WebApiClient/WebApiAuthorizationProvider.h>
#import <WebApiClient/WebApiClient.h>
#import <WebApiClient/WebApiClientEnvironment.h>
#import <WebApiClient/WebApiClientSupport.h>
#import <WebApiClient/WebApiDataMapper.h>
#import <WebApiClient/WebApiResource.h>
#import <WebApiClient/WebApiResponse.h>
#import <WebApiClient/WebApiRoute.h>
| //
// WebApiClient-Core.h
// WebApiClient
//
// Created by Matt on 21/07/15.
// Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0.
//
#import <WebApiClient/FileWebApiResource.h>
#import <WebApiClient/NSDictionary+WebApiClient.h>
#import <WebApiClient/WebApiAuthorizationProvider.h>
#import <WebApiClient/WebApiClient.h>
#import <WebApiClient/WebApiClientDigestUtils.h>
#import <WebApiClient/WebApiClientEnvironment.h>
#import <WebApiClient/WebApiClientSupport.h>
#import <WebApiClient/WebApiDataMapper.h>
#import <WebApiClient/WebApiResource.h>
#import <WebApiClient/WebApiResponse.h>
#import <WebApiClient/WebApiRoute.h>
| Add new file to umbrella import. | Add new file to umbrella import.
| C | apache-2.0 | Blue-Rocket/WebApiClient,Blue-Rocket/WebApiClient |
d9f5620b549466c9f4f5eff5b99265174f0fcc42 | include/portable/pprintfp.h | include/portable/pprintfp.h | #ifndef PPRINTFP_H
#define PPRINTFP_H
/*
* Grisu3 is not part of the portable lib per se, it must be in the
* include path. Grisu3 provides much faster printing and parsing in the
* typical case with fallback to sprintf for printing and strod for
* parsing.
*
* Either define PORTABLE_USE_GRISU3, or include the grisu3 header first.
*
* Without grisu3, this file still ensures that a float or a double is
* printed without loss of precision.
*/
#if PORTABLE_USE_GRISU3
#include "grisu3/grisu3_print.h"
#endif
#ifdef grisu3_print_double_is_defined
/* Currently there is not special support for floats. */
#define print_float(n, p) grisu3_print_double((float)(n), (p))
#define print_double(n, p) grisu3_print_double((double)(n), (p))
#else
#include <stdio.h>
#define print_float(n, p) sprintf(p, "%.9g", (float)(n))
#define print_double(n, p) sprintf(p, "%.17g", (double)(n))
#endif
#define print_hex_float(n, p) sprintf(p, "%a", (float)(n))
#define print_hex_double(n, p) sprintf(p, "%a", (double)(n))
#endif /* PPRINTFP_H */
| Add portable floating point printing with optional grisu3 support | Add portable floating point printing with optional grisu3 support
| C | apache-2.0 | dvidelabs/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc,skhoroshavin/flatcc,skhoroshavin/flatcc,dvidelabs/flatcc |
|
59764c6d3621423c9d4e136e99a69078a79ca6f5 | numpy/distutils/checks/cpu_popcnt.c | numpy/distutils/checks/cpu_popcnt.c | #ifdef _MSC_VER
#include <nmmintrin.h>
#else
#include <popcntintrin.h>
#endif
int main(void)
{
long long a = 0;
int b;
#ifdef _MSC_VER
#ifdef _M_X64
a = _mm_popcnt_u64(1);
#endif
b = _mm_popcnt_u32(1);
#else
#ifdef __x86_64__
a = __builtin_popcountll(1);
#endif
b = __builtin_popcount(1);
#endif
return (int)a + b;
}
| #ifdef _MSC_VER
#include <nmmintrin.h>
#else
#include <popcntintrin.h>
#endif
#include <stdlib.h>
int main(void)
{
long long a = 0;
int b;
a = random();
b = random();
#ifdef _MSC_VER
#ifdef _M_X64
a = _mm_popcnt_u64(a);
#endif
b = _mm_popcnt_u32(b);
#else
#ifdef __x86_64__
a = __builtin_popcountll(a);
#endif
b = __builtin_popcount(b);
#endif
return (int)a + b;
}
| Fix compile-time test of POPCNT | Fix compile-time test of POPCNT
The compile-time test of POPCNT, cpu_popcnt.c produced code that would
execute without error even if the machine didn't support the popcnt
instruction. This patch attempts to use popcnt on random numbers so the
compiler can't substitute the answer at compile time.
| C | bsd-3-clause | seberg/numpy,anntzer/numpy,simongibbons/numpy,charris/numpy,mattip/numpy,mattip/numpy,mhvk/numpy,jakirkham/numpy,anntzer/numpy,numpy/numpy,rgommers/numpy,mhvk/numpy,seberg/numpy,pdebuyl/numpy,pdebuyl/numpy,endolith/numpy,mhvk/numpy,rgommers/numpy,mhvk/numpy,endolith/numpy,charris/numpy,anntzer/numpy,jakirkham/numpy,rgommers/numpy,rgommers/numpy,jakirkham/numpy,charris/numpy,anntzer/numpy,endolith/numpy,mattip/numpy,numpy/numpy,charris/numpy,jakirkham/numpy,mhvk/numpy,mattip/numpy,simongibbons/numpy,pdebuyl/numpy,simongibbons/numpy,seberg/numpy,pdebuyl/numpy,simongibbons/numpy,numpy/numpy,simongibbons/numpy,seberg/numpy,numpy/numpy,endolith/numpy,jakirkham/numpy |
da5a68aff87e0152a5058c070b634eecaddf1a27 | 3RVX/3RVX.h | 3RVX/3RVX.h | #pragma once
#define CLASS_3RVX L"3RVXv3"
static const UINT WM_3RVX_CONTROL
= RegisterWindowMessage(L"WM_3RVX_CONTROL");
static const UINT WM_3RVX_SETTINGSCTRL
= RegisterWindowMessage(L"WM_3RVX_SETTINGSCTRL");
#define MSG_LOAD WM_APP + 100
#define MSG_SETTINGS WM_APP + 101
#define MSG_EXIT WM_APP + 102
#define MSG_HIDEOSD WM_APP + 103 | #pragma once
#define CLASS_3RVX L"3RVXv3"
#define CLASS_3RVX_SETTINGS L"3RVX-Settings"
static const UINT WM_3RVX_CONTROL
= RegisterWindowMessage(L"WM_3RVX_CONTROL");
static const UINT WM_3RVX_SETTINGSCTRL
= RegisterWindowMessage(L"WM_3RVX_SETTINGSCTRL");
#define MSG_LOAD WM_APP + 100
#define MSG_SETTINGS WM_APP + 101
#define MSG_EXIT WM_APP + 102
#define MSG_HIDEOSD WM_APP + 103
#define MSG_ACTIVATE WM_APP + 104 | Add a class for the settings dialog | Add a class for the settings dialog
| C | bsd-2-clause | Soulflare3/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,malensek/3RVX |
18a924e2f2c783dd18c1f8a47d8be7a4dbc7eae4 | modules/audio_coding/codecs/ilbc/nearest_neighbor.c | modules/audio_coding/codecs/ilbc/nearest_neighbor.c | /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/******************************************************************
iLBC Speech Coder ANSI-C Source Code
WebRtcIlbcfix_NearestNeighbor.c
******************************************************************/
#include "defines.h"
void WebRtcIlbcfix_NearestNeighbor(size_t* index,
const size_t* array,
size_t value,
size_t arlength) {
size_t min_diff = (size_t)-1;
for (size_t i = 0; i < arlength; i++) {
const size_t diff =
(array[i] < value) ? (value - array[i]) : (array[i] - value);
if (diff < min_diff) {
*index = i;
min_diff = diff;
}
}
}
| /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/******************************************************************
iLBC Speech Coder ANSI-C Source Code
WebRtcIlbcfix_NearestNeighbor.c
******************************************************************/
#include "defines.h"
void WebRtcIlbcfix_NearestNeighbor(size_t* index,
const size_t* array,
size_t value,
size_t arlength) {
size_t i;
size_t min_diff = (size_t)-1;
for (i = 0; i < arlength; i++) {
const size_t diff =
(array[i] < value) ? (value - array[i]) : (array[i] - value);
if (diff < min_diff) {
*index = i;
min_diff = diff;
}
}
}
| Fix ChromeOS build (C99 break) | Fix ChromeOS build (C99 break)
BUG=5016
[email protected]
Review URL: https://codereview.webrtc.org/1354163002
Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#9992}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 2803a40fe335a29f9584911d1a52856bdb302df7
| C | bsd-3-clause | jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,jchavanton/webrtc,jchavanton/webrtc,aleonliao/webrtc-trunk,Alkalyne/webrtctrunk,jchavanton/webrtc,sippet/webrtc,sippet/webrtc,aleonliao/webrtc-trunk,sippet/webrtc,jchavanton/webrtc,aleonliao/webrtc-trunk,aleonliao/webrtc-trunk,sippet/webrtc,Alkalyne/webrtctrunk,sippet/webrtc,jchavanton/webrtc,sippet/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk |
4ae50e81b9a7c35f26a10bb103b8d46bfb6cf290 | test/Frontend/remove-file-on-signal.c | test/Frontend/remove-file-on-signal.c | // RUN: rm -rf %t && mkdir -p %t && cd %t
// RUN: not --crash %clang_cc1 %s -emit-llvm -o foo.ll
// RUN: ls . | FileCheck %s --allow-empty
// CHECK-NOT: foo.ll
#pragma clang __debug crash
FOO
| Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows | [Support] Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows
Summary:
Tools like clang that use RemoveFileOnSignal on their output files
weren't actually able to clean up their outputs before this change. Now
the call to llvm::sys::fs::remove succeeds and the temporary file is
deleted. This is a stop-gap to fix clang before implementing the
solution outlined in PR34070.
Reviewers: davide
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D36337
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@310137 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | 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,apple/swift-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,llvm-mirror/clang |
|
1a05b79f5f21097de4d3d587cca3aed790c0e434 | Include/KAI/Platform/GameController.h | Include/KAI/Platform/GameController.h |
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif // SHATTER_PLATFORM_GAME_CONTROLLER_H
//EOF
|
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif
//EOF
| Add some color for console output | Add some color for console output
| C | mit | cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI |
ee0cae69a5f65af3ccd5011f0430c087175e9869 | cpu/msp430_common/mspgcc-supplement.c | cpu/msp430_common/mspgcc-supplement.c | /*
* Copyright (C) 2016 Eistec AB
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup cpu
* @{
*
* @file
* @brief MSPGCC supplemental functions
*
* @author Joakim Nohlgård <[email protected]
*
* @}
*/
#ifdef __MSPGCC__
/* internal GCC type for "half integer" (16 bit) */
/* See also:
* http://stackoverflow.com/questions/4559025/what-does-gcc-attribute-modexx-actually-do
* http://www.delorie.com/gnu/docs/gcc/gccint_53.html
*/
typedef unsigned int UHItype __attribute__ ((mode (HI)));
/**
* @brief Count leading zeros
*
* Naive implementation
*/
int __clzhi2(UHItype x)
{
int i = 0;
for (UHItype mask = (1 << 15); mask != 0; mask >>= 1) {
if (x & mask) {
return i;
}
++i;
}
return i; /* returns 16 if x == 0 */
}
/**
* @brief Count trailing zeros
*
* Naive implementation
*/
int __ctzhi2(UHItype x)
{
int i = 0;
for (UHItype mask = 1; mask != 0; mask <<= 1) {
if (x & mask) {
return i;
}
++i;
}
return i; /* returns 16 if x == 0 */
}
#endif /* __MSPGCC__ */
| Add supplemental __clzhi2, __ctzhi2, for old MSPGCC | msp430_common: Add supplemental __clzhi2, __ctzhi2, for old MSPGCC
| C | lgpl-2.1 | gebart/RIOT,jasonatran/RIOT,toonst/RIOT,ant9000/RIOT,jfischer-phytec-iot/RIOT,OTAkeys/RIOT,syin2/RIOT,x3ro/RIOT,immesys/RiSyn,kaspar030/RIOT,BytesGalore/RIOT,ks156/RIOT,kerneltask/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,rfuentess/RIOT,authmillenon/RIOT,adjih/RIOT,aeneby/RIOT,Hyungsin/RIOT-OS,miri64/RIOT,syin2/RIOT,mtausig/RIOT,LudwigKnuepfer/RIOT,thomaseichinger/RIOT,gebart/RIOT,plushvoxel/RIOT,x3ro/RIOT,kYc0o/RIOT,authmillenon/RIOT,aeneby/RIOT,miri64/RIOT,hamilton-mote/RIOT-OS,plushvoxel/RIOT,dailab/RIOT,roberthartung/RIOT,plushvoxel/RIOT,mfrey/RIOT,OTAkeys/RIOT,toonst/RIOT,LudwigKnuepfer/RIOT,kaspar030/RIOT,gautric/RIOT,Josar/RIOT,adrianghc/RIOT,Ell-i/RIOT,kbumsik/RIOT,x3ro/RIOT,RIOT-OS/RIOT,A-Paul/RIOT,OlegHahm/RIOT,RIOT-OS/RIOT,RIOT-OS/RIOT,lazytech-org/RIOT,dkm/RIOT,Ell-i/RIOT,rfuentess/RIOT,TobiasFredersdorf/RIOT,roberthartung/RIOT,kaspar030/RIOT,gautric/RIOT,LudwigOrtmann/RIOT,yogo1212/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,neiljay/RIOT,basilfx/RIOT,x3ro/RIOT,syin2/RIOT,Hyungsin/RIOT-OS,Josar/RIOT,BytesGalore/RIOT,Ell-i/RIOT,rfuentess/RIOT,hamilton-mote/RIOT-OS,adjih/RIOT,beurdouche/RIOT,adjih/RIOT,thomaseichinger/RIOT,A-Paul/RIOT,ant9000/RIOT,smlng/RIOT,neumodisch/RIOT,biboc/RIOT,ks156/RIOT,LudwigOrtmann/RIOT,dailab/RIOT,jasonatran/RIOT,TobiasFredersdorf/RIOT,LudwigOrtmann/RIOT,kaspar030/RIOT,BytesGalore/RIOT,jfischer-phytec-iot/RIOT,aeneby/RIOT,TobiasFredersdorf/RIOT,yogo1212/RIOT,kerneltask/RIOT,x3ro/RIOT,hamilton-mote/RIOT-OS,kbumsik/RIOT,beurdouche/RIOT,neumodisch/RIOT,roberthartung/RIOT,miri64/RIOT,gebart/RIOT,immesys/RiSyn,hamilton-mote/RIOT-OS,dailab/RIOT,kbumsik/RIOT,neumodisch/RIOT,biboc/RIOT,aeneby/RIOT,smlng/RIOT,rfuentess/RIOT,avmelnikoff/RIOT,yogo1212/RIOT,miri64/RIOT,ant9000/RIOT,kYc0o/RIOT,mfrey/RIOT,LudwigKnuepfer/RIOT,Josar/RIOT,kYc0o/RIOT,mtausig/RIOT,hamilton-mote/RIOT-OS,yogo1212/RIOT,mtausig/RIOT,toonst/RIOT,kaleb-himes/RIOT,basilfx/RIOT,jbeyerstedt/RIOT-OTA-update,plushvoxel/RIOT,Ell-i/RIOT,avmelnikoff/RIOT,jfischer-phytec-iot/RIOT,OlegHahm/RIOT,LudwigOrtmann/RIOT,beurdouche/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,Hyungsin/RIOT-OS,foss-for-synopsys-dwc-arc-processors/RIOT,kaleb-himes/RIOT,jasonatran/RIOT,adrianghc/RIOT,mfrey/RIOT,dkm/RIOT,kaleb-himes/RIOT,kerneltask/RIOT,A-Paul/RIOT,thomaseichinger/RIOT,jbeyerstedt/RIOT-OTA-update,adjih/RIOT,josephnoir/RIOT,LudwigKnuepfer/RIOT,Ell-i/RIOT,cladmi/RIOT,roberthartung/RIOT,plushvoxel/RIOT,kaspar030/RIOT,kYc0o/RIOT,neiljay/RIOT,A-Paul/RIOT,jbeyerstedt/RIOT-OTA-update,jbeyerstedt/RIOT-OTA-update,neumodisch/RIOT,basilfx/RIOT,mtausig/RIOT,adrianghc/RIOT,authmillenon/RIOT,ks156/RIOT,OlegHahm/RIOT,adrianghc/RIOT,immesys/RiSyn,jfischer-phytec-iot/RIOT,gautric/RIOT,smlng/RIOT,beurdouche/RIOT,avmelnikoff/RIOT,authmillenon/RIOT,syin2/RIOT,Josar/RIOT,adrianghc/RIOT,OlegHahm/RIOT,josephnoir/RIOT,biboc/RIOT,kaleb-himes/RIOT,cladmi/RIOT,lazytech-org/RIOT,neumodisch/RIOT,jasonatran/RIOT,smlng/RIOT,avmelnikoff/RIOT,A-Paul/RIOT,yogo1212/RIOT,kaleb-himes/RIOT,aeneby/RIOT,adjih/RIOT,mfrey/RIOT,toonst/RIOT,kbumsik/RIOT,neiljay/RIOT,basilfx/RIOT,dkm/RIOT,TobiasFredersdorf/RIOT,kYc0o/RIOT,mfrey/RIOT,immesys/RiSyn,RIOT-OS/RIOT,ant9000/RIOT,ant9000/RIOT,LudwigOrtmann/RIOT,dkm/RIOT,biboc/RIOT,neiljay/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,kerneltask/RIOT,immesys/RiSyn,yogo1212/RIOT,thomaseichinger/RIOT,neiljay/RIOT,biboc/RIOT,dailab/RIOT,kerneltask/RIOT,miri64/RIOT,thomaseichinger/RIOT,authmillenon/RIOT,OlegHahm/RIOT,gebart/RIOT,gebart/RIOT,avmelnikoff/RIOT,cladmi/RIOT,RIOT-OS/RIOT,lazytech-org/RIOT,mtausig/RIOT,cladmi/RIOT,lazytech-org/RIOT,cladmi/RIOT,lazytech-org/RIOT,roberthartung/RIOT,dkm/RIOT,OTAkeys/RIOT,Josar/RIOT,jfischer-phytec-iot/RIOT,gautric/RIOT,immesys/RiSyn,smlng/RIOT,toonst/RIOT,kbumsik/RIOT,basilfx/RIOT,BytesGalore/RIOT,authmillenon/RIOT,gautric/RIOT,BytesGalore/RIOT,rfuentess/RIOT,beurdouche/RIOT,syin2/RIOT,jbeyerstedt/RIOT-OTA-update,ks156/RIOT,ks156/RIOT,josephnoir/RIOT,OTAkeys/RIOT,LudwigKnuepfer/RIOT,TobiasFredersdorf/RIOT,Hyungsin/RIOT-OS,Hyungsin/RIOT-OS,josephnoir/RIOT,jasonatran/RIOT,OTAkeys/RIOT,neumodisch/RIOT,josephnoir/RIOT,dailab/RIOT,LudwigOrtmann/RIOT |
|
7a276551f8349db28f32c36a68ab96c46c90517c | storage/src/vespa/storage/common/bucket_utils.h | storage/src/vespa/storage/common/bucket_utils.h | // Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/document/bucket/bucketid.h>
#include <vespa/persistence/spi/bucket_limits.h>
#include <cassert>
namespace storage {
/**
* Returns the super bucket key of the given bucket id key based on the minimum used bits allowed.
*/
uint64_t get_super_bucket_key(const document::BucketId& bucket_id) {
assert(bucket_id.getUsedBits() >= spi::BucketLimits::MinUsedBits);
// Since bucket keys have count-bits at the LSB positions, we want to look at the MSBs instead.
return (bucket_id.toKey() >> (64 - spi::BucketLimits::MinUsedBits));
}
}
| // Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/document/bucket/bucketid.h>
#include <vespa/persistence/spi/bucket_limits.h>
#include <cassert>
namespace storage {
/**
* Returns the super bucket key of the given bucket id key based on the minimum used bits allowed.
*/
inline uint64_t get_super_bucket_key(const document::BucketId& bucket_id) noexcept {
assert(bucket_id.getUsedBits() >= spi::BucketLimits::MinUsedBits);
// Since bucket keys have count-bits at the LSB positions, we want to look at the MSBs instead.
return (bucket_id.toKey() >> (64 - spi::BucketLimits::MinUsedBits));
}
}
| Make function inline and noexcept. | Make function inline and noexcept.
| C | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
62e0107e65fbdb86a13d1db04aca85a08caf3bd1 | keyphrase.c | keyphrase.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "constants.h"
#include "funcs.h"
int main(int argc, char **argv) {
if (argc != 2) {
return printf("usage: %s [hex key] [key phrase]\n", argv[0]);
}
char *wordlist[NUMWORDS];
FILE *fp = fopen(WORDFILE, "r");
if (!fp) {
printf("Could not find wordlist: '%s' is missing!", WORDFILE);
return 1;
}
for(int i=0; i < NUMWORDS; i++) {
wordlist[i] = malloc(WORDLENGTH + 1);
fgets(wordlist[i], WORDLENGTH + 1, fp);
for (int j=strlen(wordlist[i])-1; j>=0 && (wordlist[i][j] == '\n' || wordlist[i][j]=='\r'); j--) {
wordlist[i][j]='\0';
}
}
if (is_hex(argv[1])) {
char hex[normalized_hex_string_length(argv[1])];
normalize_hex_string(hex, argv[1]);
char phrase[max_phrase_length(hex)];
get_phrase(phrase, hex, wordlist);
printf("%s\n", phrase);
for (int i=0; i < NUMWORDS; i++) {
free(wordlist[i]);
}
} else {
printf("TBD\n");
}
}
| Implement the actual utility. Only does key to phrase conversion at the moment. | Implement the actual utility. Only does key to phrase conversion at the moment.
| C | agpl-3.0 | ryepdx/keyphrase,ryepdx/keyphrase |
|
313196ef0ded860cceb381d139857f77132ad17e | sw/device/lib/runtime/check.h | sw/device/lib/runtime/check.h | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0`
#ifndef OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
#define OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
#include <stdbool.h>
#include "sw/device/lib/base/log.h"
#include "sw/device/lib/runtime/abort.h"
/**
* Runtime assertion macros with log.h integration.
*/
/**
* Checks that the given condition is true. If the condition is false, this
* function logs and then aborts.
*
* @param condition an expression to check.
* @param ... arguments to a LOG_* macro, which are evaluated if the check
* fails.
*/
#define CHECK(condition, ...) \
do { \
if (!(condition)) { \
LOG_ERROR("CHECK-fail: " __VA_ARGS__); \
abort(); \
} \
} while (false)
/**
* Shorthand for CHECK(value == 0).
*
* @param condition a value to check.
* @param ... arguments to a LOG_* macro, which are evaluated if the check
* fails.
*/
#define CHECKZ(value, ...) CHECK((value) == 0, ...)
#endif // OPENTITAN_SW_DEVICE_LIB_RUNTIME_CHECK_H_
| Add a library to provide CHECK and friends. | [sw] Add a library to provide CHECK and friends.
Signed-off-by: Miguel Young de la Sota <[email protected]>
| C | apache-2.0 | lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan |
|
9bdcb393aedcd718b49926663bbcd22229af7090 | test/CFrontend/2007-11-27-SExtZExt.c | test/CFrontend/2007-11-27-SExtZExt.c | // RUN: %llvmgcc -S %s -emit-llvm -o - | grep "signext" | count 4
signed char foo1() { return 1; }
void foo2(signed short a) { }
signed char foo3(void) { return 1; }
void foo4(a) signed short a; { }
| Add testcase for last llvm-gcc tweaks | Add testcase for last llvm-gcc tweaks
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@44368 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap |
|
ea0ceed76722247d83ec5ec1e6ae4b65a83a96b1 | tests/chardata.h | tests/chardata.h | /* chardata.h
*
*
*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1
#ifndef XML_VERSION
#include "expat.h" /* need XML_Char */
#endif
typedef struct {
int count; /* # of chars, < 0 if not set */
XML_Char data[1024];
} CharData;
void CharData_Init(CharData *storage);
void CharData_AppendString(CharData *storage, const char *s);
void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len);
int CharData_CheckString(CharData *storage, const char *s);
int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
#endif /* XML_CHARDATA_H */
| /* chardata.h
Interface to some helper routines used to accumulate and check text
and attribute content.
*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1
#ifndef XML_VERSION
#include "expat.h" /* need XML_Char */
#endif
typedef struct {
int count; /* # of chars, < 0 if not set */
XML_Char data[1024];
} CharData;
void CharData_Init(CharData *storage);
void CharData_AppendString(CharData *storage, const char *s);
void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len);
int CharData_CheckString(CharData *storage, const char *s);
int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
#endif /* XML_CHARDATA_H */
| Add a small comment to tell what this is. | Add a small comment to tell what this is.
| C | mit | cgwalters/expat-git-mirror,cgwalters/expat-git-mirror,cgwalters/expat-git-mirror |
3f987b530fb7c6ef773d382bfa25e02064405f19 | direct/src/plugin/p3dReferenceCount.h | direct/src/plugin/p3dReferenceCount.h | // Filename: p3dReferenceCount.h
// Created by: drose (09Jul09)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef P3DREFERENCECOUNT_H
#define P3DREFERENCECOUNT_H
#include "p3d_plugin_common.h"
////////////////////////////////////////////////////////////////////
// Class : P3DReferenceCount
// Description : A base class for reference-counted objects in this
// module. We follow the Panda convention, rather than
// the Pythong convention: the reference count of a new
// object is initially 0.
////////////////////////////////////////////////////////////////////
class P3DReferenceCount {
public:
inline P3DReferenceCount();
inline ~P3DReferenceCount();
inline void ref() const;
inline bool unref() const;
private:
int _ref_count;
};
template<class RefCountType>
inline void unref_delete(RefCountType *ptr);
#include "p3dReferenceCount.I"
#endif
| // Filename: p3dReferenceCount.h
// Created by: drose (09Jul09)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef P3DREFERENCECOUNT_H
#define P3DREFERENCECOUNT_H
#include "p3d_plugin_common.h"
////////////////////////////////////////////////////////////////////
// Class : P3DReferenceCount
// Description : A base class for reference-counted objects in this
// module. We follow the Panda convention, rather than
// the Python convention: the reference count of a new
// object is initially 0.
////////////////////////////////////////////////////////////////////
class P3DReferenceCount {
public:
inline P3DReferenceCount();
inline ~P3DReferenceCount();
inline void ref() const;
inline bool unref() const;
private:
int _ref_count;
};
template<class RefCountType>
inline void unref_delete(RefCountType *ptr);
#include "p3dReferenceCount.I"
#endif
| Fix typo: "Pythong" -> "Python" ;-) | Fix typo: "Pythong" -> "Python" ;-)
| C | bsd-3-clause | brakhane/panda3d,hj3938/panda3d,ee08b397/panda3d,tobspr/panda3d,tobspr/panda3d,jjkoletar/panda3d,jjkoletar/panda3d,tobspr/panda3d,Wilee999/panda3d,hj3938/panda3d,Wilee999/panda3d,cc272309126/panda3d,brakhane/panda3d,cc272309126/panda3d,hj3938/panda3d,matthiascy/panda3d,cc272309126/panda3d,jjkoletar/panda3d,hj3938/panda3d,ee08b397/panda3d,Wilee999/panda3d,mgracer48/panda3d,grimfang/panda3d,mgracer48/panda3d,ee08b397/panda3d,brakhane/panda3d,cc272309126/panda3d,chandler14362/panda3d,Wilee999/panda3d,ee08b397/panda3d,chandler14362/panda3d,hj3938/panda3d,grimfang/panda3d,jjkoletar/panda3d,chandler14362/panda3d,tobspr/panda3d,grimfang/panda3d,tobspr/panda3d,grimfang/panda3d,tobspr/panda3d,grimfang/panda3d,ee08b397/panda3d,grimfang/panda3d,mgracer48/panda3d,ee08b397/panda3d,mgracer48/panda3d,mgracer48/panda3d,matthiascy/panda3d,mgracer48/panda3d,tobspr/panda3d,jjkoletar/panda3d,matthiascy/panda3d,mgracer48/panda3d,cc272309126/panda3d,brakhane/panda3d,brakhane/panda3d,matthiascy/panda3d,chandler14362/panda3d,cc272309126/panda3d,grimfang/panda3d,jjkoletar/panda3d,tobspr/panda3d,grimfang/panda3d,Wilee999/panda3d,tobspr/panda3d,matthiascy/panda3d,tobspr/panda3d,mgracer48/panda3d,grimfang/panda3d,cc272309126/panda3d,chandler14362/panda3d,matthiascy/panda3d,matthiascy/panda3d,hj3938/panda3d,Wilee999/panda3d,ee08b397/panda3d,brakhane/panda3d,mgracer48/panda3d,chandler14362/panda3d,grimfang/panda3d,hj3938/panda3d,chandler14362/panda3d,jjkoletar/panda3d,Wilee999/panda3d,matthiascy/panda3d,brakhane/panda3d,Wilee999/panda3d,cc272309126/panda3d,jjkoletar/panda3d,chandler14362/panda3d,hj3938/panda3d,jjkoletar/panda3d,ee08b397/panda3d,ee08b397/panda3d,cc272309126/panda3d,Wilee999/panda3d,matthiascy/panda3d,chandler14362/panda3d,brakhane/panda3d,hj3938/panda3d,chandler14362/panda3d,brakhane/panda3d |
253ce6fd38f982fae6b0cf7f7bc4bf6fa36b8e9f | src/ast/node_counter.h | src/ast/node_counter.h | #pragma once
#include "bpftrace.h"
#include "log.h"
#include "pass_manager.h"
#include "visitors.h"
namespace bpftrace {
namespace ast {
class NodeCounter : public Visitor
{
public:
void Visit(Node &node)
{
count_++;
Visitor::Visit(node);
}
size_t get_count()
{
return count_;
};
private:
size_t count_ = 0;
};
Pass CreateCounterPass()
{
auto fn = [](Node &n, PassContext &ctx) {
NodeCounter c;
c.Visit(n);
auto node_count = c.get_count();
auto max = ctx.b.ast_max_nodes_;
if (bt_verbose)
{
LOG(INFO) << "node count: " << max;
}
if (node_count >= max)
{
LOG(ERROR) << "node count (" << node_count << ") exceeds the limit ("
<< max << ")";
return PassResult::Error("node count exceeded");
}
return PassResult::Success();
};
return Pass("NodeCounter", fn);
}
} // namespace ast
} // namespace bpftrace
| #pragma once
#include "bpftrace.h"
#include "log.h"
#include "pass_manager.h"
#include "visitors.h"
namespace bpftrace {
namespace ast {
class NodeCounter : public Visitor
{
public:
void Visit(Node &node)
{
count_++;
Visitor::Visit(node);
}
size_t get_count()
{
return count_;
};
private:
size_t count_ = 0;
};
Pass CreateCounterPass()
{
auto fn = [](Node &n, PassContext &ctx) {
NodeCounter c;
c.Visit(n);
auto node_count = c.get_count();
auto max = ctx.b.ast_max_nodes_;
if (bt_verbose)
{
LOG(INFO) << "node count: " << node_count;
}
if (node_count >= max)
{
LOG(ERROR) << "node count (" << node_count << ") exceeds the limit ("
<< max << ")";
return PassResult::Error("node count exceeded");
}
return PassResult::Success();
};
return Pass("NodeCounter", fn);
}
} // namespace ast
} // namespace bpftrace
| Fix printing bug in node-counter pass | Fix printing bug in node-counter pass
| C | apache-2.0 | iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace |
b4f4ec34d4632864e9b5738d2b47c272d22dd6e7 | You-Controller-Tests/exclusions.h | You-Controller-Tests/exclusions.h | #pragma once
#ifndef YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
#define YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
// A local define since there is no way to test whether a header file exists.
// If you have VS Premium, then add it to the project definition (user
// properties) file
#ifdef MS_CPP_CODECOVERAGE
/// \file Exclusions from code coverage analysis.
/// See http://msdn.microsoft.com/en-sg/library/dd537628.aspx
#include <CodeCoverage/CodeCoverage.h>
#pragma managed(push, off)
ExcludeFromCodeCoverage(boost, L"boost::*");
ExcludeFromCodeCoverage(boost_meta, L"??@*@");
ExcludeFromCodeCoverage(You_NLP, L"You::NLP::*");
ExcludeFromCodeCoverage(You_QueryEngine, L"You::QueryEngine::*");
ExcludeFromCodeCoverage(You_Utils, L"You::Utils::*");
#pragma managed(pop)
#endif // MS_CPP_CODECOVERAGE
#endif // YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
| #pragma once
#ifndef YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
#define YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
// A local define since there is no way to test whether a header file exists.
// If you have VS Premium, then add it to the project definition (user
// properties) file
#ifdef MS_CPP_CODECOVERAGE
/// \file Exclusions from code coverage analysis.
/// See http://msdn.microsoft.com/en-sg/library/dd537628.aspx
#include <CodeCoverage/CodeCoverage.h>
#pragma managed(push, off)
ExcludeFromCodeCoverage(boost, L"boost::*");
ExcludeFromCodeCoverage(boost_meta, L"??@*@");
ExcludeFromCodeCoverage(You_NLP, L"You::NLP::*");
ExcludeFromCodeCoverage(You_QueryEngine, L"You::QueryEngine::*");
ExcludeFromCodeCoverage(You_DataStore, L"You::DataStore::*");
ExcludeFromCodeCoverage(You_Utils, L"You::Utils::*");
#pragma managed(pop)
#endif // MS_CPP_CODECOVERAGE
#endif // YOU_CONTROLLER_TESTS_EXCLUSIONS_H_
| Exclude data store from controller code coverage. | Exclude data store from controller code coverage.
| C | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
fcb446e33c75960e3db85f718b77e4bb8db996d0 | include/libhdhomerun.h | include/libhdhomerun.h | // Wrapper to prevent multiple imports
#ifndef LIBHDHOMERUN_H
#define LIBHDHOMERUN_H
#import "hdhomerun_os.h"
#import "hdhomerun_discover.h"
#import "hdhomerun_pkt.h"
#endif
| Add wrapper to stop reinclude of library headers | Add wrapper to stop reinclude of library headers
| C | mit | robbieduncan/hdpirun,robbieduncan/hdpirun |
|
ff862f1dea771feb087f9eade8534efa67f106f9 | SDLWrapper/__Plugin.h | SDLWrapper/__Plugin.h | #pragma once
#include "begin_code.h"
namespace _internal
{
/// This is just an empty class.
/// Most wrapper class regard this class as a friend class.
/// You can get/set raw pointers through this class.
class Plugin
{
public:
template<typename T>
decltype(auto) get(const T& obj)
{
return obj._get();
}
template<typename T,typename U>
void set(T& obj,U&& value)
{
obj._set(value);
}
template<typename T>
void clear(T& obj)
{
obj._clear();
}
template<typename T,typename U>
void set_no_delete(T& obj,U&& value)
{
obj._set_no_delete(value);
}
};
}
#include "end_code.h"
| #pragma once
#include "begin_code.h"
namespace _internal
{
/// This is just an empty class.
/// Most wrapper class regard this class as a friend class.
/// You can get/set raw pointers through this class.
class Plugin
{
public:
template<typename T>
static decltype(auto) get(const T& obj)
{
return obj._get();
}
template<typename T,typename U>
static void set(T& obj,U&& value)
{
obj._set(value);
}
template<typename T>
static void clear(T& obj)
{
obj._clear();
}
template<typename T,typename U>
static void set_no_delete(T& obj,U&& value)
{
obj._set_no_delete(value);
}
};
}
#include "end_code.h"
| Change Plugin methods to static | Change Plugin methods to static
| C | mit | Kiritow/MiniEngine,Kiritow/MiniEngine |
7c9ca7333acca5dab1e01fa282758038cf62b843 | tools/cgfx2json/stdafx.h | tools/cgfx2json/stdafx.h | // Copyright (c) 2009-2011 Turbulenz Limited
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifdef _MSC_VER
#pragma once
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#ifndef BOOST_DISABLE_THREADS
#define BOOST_DISABLE_THREADS
#endif
#include <boost/xpressive/xpressive.hpp>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <list>
#include <map>
#include <set>
#include <Cg/cg.h>
#include <Cg/cgGL.h>
| // Copyright (c) 2009-2011 Turbulenz Limited
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifdef _MSC_VER
#pragma once
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#ifndef BOOST_DISABLE_THREADS
#define BOOST_DISABLE_THREADS
#endif
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4458)
# pragma warning(disable:4459)
# pragma warning(disable:4456)
#endif
#include <boost/xpressive/xpressive.hpp>
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <list>
#include <map>
#include <set>
#include <Cg/cg.h>
#include <Cg/cgGL.h>
| Disable some compiler warnings on the boost library. | Disable some compiler warnings on the boost library.
| C | mit | sanyaade-teachings/turbulenz_engine,turbulenz/turbulenz_engine,changemypath/turbulenz_engine,turbulenz/turbulenz_engine,supriyantomaftuh/turbulenz_engine,tianyutingxy/turbulenz_engine,supriyantomaftuh/turbulenz_engine,turbulenz/turbulenz_engine,tianyutingxy/turbulenz_engine,sanyaade-teachings/turbulenz_engine,supriyantomaftuh/turbulenz_engine,turbulenz/turbulenz_engine,turbulenz/turbulenz_engine,changemypath/turbulenz_engine,tianyutingxy/turbulenz_engine,changemypath/turbulenz_engine,tianyutingxy/turbulenz_engine,supriyantomaftuh/turbulenz_engine,sanyaade-teachings/turbulenz_engine,changemypath/turbulenz_engine,sanyaade-teachings/turbulenz_engine,tianyutingxy/turbulenz_engine,changemypath/turbulenz_engine,sanyaade-teachings/turbulenz_engine,supriyantomaftuh/turbulenz_engine |
27d40160f8b2ab19ff6114d4598ff21d972b2fb5 | Week9_VecAddition_With_OpenACC/main.c | Week9_VecAddition_With_OpenACC/main.c | #include <wb.h>
int main(int argc, char** argv) {
wbArg_t args;
int inputLength;
float* h_A;
float* h_B;
float* h_O;
args = wbArg_read(argc, argv);
wbTime_start(Generic, "Importing data and creating memory on host");
h_A = (float*)wbImport(wbArg_getInputFile(args, 0), &inputLength);
h_B = (float*)wbImport(wbArg_getInputFile(args, 1), &inputLength);
h_O = (float*)malloc(inputLength * sizeof(float));
wbTime_stop(Generic, "Importing data and creating memory on host");
wbLog(TRACE, "The input length is ", inputLength);
wbTime_start(GPU, "Computing data on the GPU");
int workers = 256;
#pragma acc parallel copyin(h_A[0 : inputLength], h_B[0 : inputLength]), copyout(h_O[0 : inputLength]), num_workers(workers)
{
#pragma acc loop worker
int i;
for (i = 0; i < inputLength; i++) {
h_O[i] = h_A[i] + h_B[i];
}
}
wbTime_stop(GPU, "Computing data on the GPU");
wbSolution(args, h_O, inputLength);
free(h_A);
free(h_B);
free(h_O);
return 0;
}
| Solve Vector Addition using OpenACC | Solve Vector Addition using OpenACC
| C | mit | NikolayGenov/Heterogeneous-Parallel-Programming-Coursera |
|
13bf01fe2ca0f9274e4cf166ae59a79e3b9b7af4 | HLT/PHOS/AliHLTPHOSDataHeaderStruct.h | HLT/PHOS/AliHLTPHOSDataHeaderStruct.h | #ifndef ALIHLTPHOSDATAHEADERSTRUCT_H
#define ALIHLTPHOSDATAHEADERSTRUCT_H
#include "AliHLTDataTypes.h"
struct AliHLTPHOSDataHeaderStruct
{
AliHLTUInt32_t fSize; /**<Total size of datablock in bytes, incuding the header*/
AliHLTComponentDataType fDataType; /**<Data type stored in this file */
AliHLTUInt32_t fEventID; /**<The HLT internal event ID for this event */
AliHLTUInt32_t fAlgorithm; /**<Wich algorithm was uses estimate cellenergies*/
AliHLTUInt32_t fFormatVersion; /**<Header format version, currently 1*/
AliHLTUInt32_t fFutureUse0;
AliHLTUInt32_t fFutureUse1;
AliHLTUInt32_t fFutureUse2;
};
#endif
| Structure to hold header information for dat that should be written to file. | Structure to hold header information for dat that should be written to file.
| C | bsd-3-clause | miranov25/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,shahor02/AliRoot,alisw/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,sebaleh/AliRoot,alisw/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,sebaleh/AliRoot,shahor02/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot |
|
c55c188e68975e57534a26cc75a823951169db08 | drivers/sensor/vl53l0x/vl53l0x_types.h | drivers/sensor/vl53l0x/vl53l0x_types.h | /* vl53l0x_types.h - Zephyr customization of ST vl53l0x library,
* basic type definition.
*/
/*
* Copyright (c) 2017 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_
#define ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_
/* Zephyr provides stdint.h and stddef.h, so this is enough to include it.
* If it was not the case, we would defined here all signed and unsigned
* basic types...
*/
#include <stdint.h>
#include <stddef.h>
#ifndef NULL
#error "Error NULL definition should be done. Please add required include "
#endif
#if !defined(STDINT_H) && !defined(_GCC_STDINT_H) && !defined(__STDINT_DECLS) \
&& !defined(_GCC_WRAP_STDINT_H) && !defined(_STDINT_H) \
&& !defined(__INC_stdint_h__)
#pragma message("Review type definition of STDINT define for your platform")
#endif /* _STDINT_H */
/** use where fractional values are expected
*
* Given a floating point value f it's .16 bit point is (int)(f*(1<<16))
*/
typedef uint32_t FixPoint1616_t;
#endif /* ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ */
| /* vl53l0x_types.h - Zephyr customization of ST vl53l0x library,
* basic type definition.
*/
/*
* Copyright (c) 2017 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_
#define ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_
/* Zephyr provides stdint.h and stddef.h, so this is enough to include it.
* If it was not the case, we would defined here all signed and unsigned
* basic types...
*/
#include <stdint.h>
#include <stddef.h>
#ifndef NULL
#error "Error NULL definition should be done. Please add required include "
#endif
/** use where fractional values are expected
*
* Given a floating point value f it's .16 bit point is (int)(f*(1<<16))
*/
typedef uint32_t FixPoint1616_t;
#endif /* ZEPHYR_DRIVERS_SENSOR_VL53L0X_VL53L0X_TYPES_H_ */
| Remove unnecessary lib include check | drivers/sensor/vl53l0x: Remove unnecessary lib include check
vl53l0x driver is using an external library to build, located under:
ext/hal/st/lib/sensor/vl53l0x.
This library is expecting stdint.h lib to be available and to
secure this for driver library inclusion work, a stdint.h file
header check was done. This check was based on assumptions on possible
header names for stdint.h.
Due to recent renaming of the zephyr header files, this check was
returning a false positive, generating warning at compilation.
Rather than updated with new header names, remove this check, since
driver porting is completed and stdint.h inclusion is actually
done.
Fixes #10134
Signed-off-by: Erwan Gouriou <[email protected]>
| C | apache-2.0 | galak/zephyr,ldts/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,Vudentz/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,galak/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,ldts/zephyr,ldts/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr |
0a5ffd4b837b57412f4943b9d62ce2d109315db3 | You-QueryEngine/api.h | You-QueryEngine/api.h | /// \file api.h
/// Defines the API for Query Engine.
/// \author A0112054Y
#pragma once
#ifndef YOU_QUERYENGINE_API_H_
#define YOU_QUERYENGINE_API_H_
#include <memory>
#include <boost/variant.hpp>
#include "task_model.h"
namespace You {
namespace QueryEngine {
/// A synthesized type for holding query responses
typedef boost::variant <
std::vector<Task>,
Task,
Task::ID,
Task::Time,
Task::Dependencies,
Task::Description
> Response;
/// Base class for all queries.
class Query {
friend Response executeQuery(std::unique_ptr<Query> query);
private:
/// Execute the query.
virtual Response execute() = 0;
};
/// \name Query Constructors
/// @{
/// Construct a query for adding a task
/// \note Please use Task::DEFAULT_xxx to replace incomplete fields.
std::unique_ptr<Query>
AddTask(Task::Description description, Task::Time deadline,
Task::Priority priority, Task::Dependencies dependencies);
/// @}
/// Execute a query and return a response
/// \return The result of the query as a response object.
Response executeQuery(std::unique_ptr<Query> query);
} // namespace QueryEngine
} // namespace You
#endif // YOU_QUERYENGINE_API_H_
| /// \file api.h
/// Defines the API for Query Engine.
/// \author A0112054Y
#pragma once
#ifndef YOU_QUERYENGINE_API_H_
#define YOU_QUERYENGINE_API_H_
#include <memory>
#include <boost/variant.hpp>
#include "task_model.h"
namespace You {
namespace QueryEngine {
/// A synthesized type for holding query responses
typedef boost::variant <
std::vector<Task>,
Task,
Task::ID,
Task::Time,
Task::Dependencies,
Task::Description
> Response;
/// Base class for all queries.
class Query {
friend Response executeQuery(std::unique_ptr<Query> query);
private:
/// Execute the query.
virtual Response execute() = 0;
};
/// \name Query Constructors
/// @{
/// Construct a query for adding a task
/// \note Please use Task::DEFAULT_xxx to replace incomplete fields.
std::unique_ptr<Query>
AddTask(Task::Description description, Task::Time deadline,
Task::Priority priority, Task::Dependencies dependencies);
std::unique_ptr<Query>
FilterTask(const std::function<bool(Task)>& filter);
/// @}
/// Execute a query and return a response
/// \return The result of the query as a response object.
Response executeQuery(std::unique_ptr<Query> query);
} // namespace QueryEngine
} // namespace You
#endif // YOU_QUERYENGINE_API_H_
| Add filter stub in header | Add filter stub in header
| C | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
e6083cb7179c23930dc8aad4d05e05d410ed2dcd | alice4/software/libgl/event_service.h | alice4/software/libgl/event_service.h | #ifndef __EVENT_SERVICE_H__
#define __EVENT_SERVICE_H__
#include "basic_types.h"
int32_t events_winopen(char *title);
int32_t events_get_valuator(int32_t device);
void events_qdevice(int32_t device);
int32_t events_qread_start(int blocking);
int32_t events_qread_continue(int16_t *value);
void events_tie(int32_t button, int32_t val1, int32_t val2);
#endif /* __EVENT_SERVICE_H__ */:w
| #ifndef __EVENT_SERVICE_H__
#define __EVENT_SERVICE_H__
#include "basic_types.h"
int32_t events_winopen(char *title);
int32_t events_get_valuator(int32_t device);
void events_qdevice(int32_t device);
int32_t events_qread_start(int blocking);
int32_t events_qread_continue(int16_t *value);
void events_tie(int32_t button, int32_t val1, int32_t val2);
#endif /* __EVENT_SERVICE_H__ */
| Remove vi schmutz at EOF | Remove vi schmutz at EOF
| C | apache-2.0 | lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice |
dcdb76edb97d03a550f014c653c0cc1155fe9154 | src/runtime/encore/encore.c | src/runtime/encore/encore.c | #include <pony/pony.h>
#include "encore.h"
encore_actor_t *encore_create(encore_create_t *type)
{
return pony_create(type);
}
/// Allocate s bytes of memory, zeroed out
void *encore_alloc(size_t *s)
{
void *mem = pony_alloc(s);
memset(mem, 0, s);
return mem;
}
/// The starting point of all Encore programs
int encore_start(int argc, char** argv, encore_actor_t *type)
{
argc = pony_init(argc, argv);
pony_actor_t* actor = encore_create(type);
pony_sendargs(actor, _ENC__MSG_MAIN, argc, argv);
return pony_start(PONY_DONT_WAIT);
}
| #include <pony/pony.h>
#include "encore.h"
encore_actor_t *encore_create(encore_actor_t *type)
{
return pony_create(type);
}
/// Allocate s bytes of memory, zeroed out
void *encore_alloc(size_t *s)
{
void *mem = pony_alloc(s);
memset(mem, 0, s);
return mem;
}
/// The starting point of all Encore programs
int encore_start(int argc, char** argv, encore_actor_t *type)
{
argc = pony_init(argc, argv);
pony_actor_t* actor = encore_create(type);
pony_sendargs(actor, _ENC__MSG_MAIN, argc, argv);
return pony_start(PONY_DONT_WAIT);
}
| Fix also applied to corresponding C file | Fix also applied to corresponding C file
| C | bsd-3-clause | parapluu/encore,parapluu/encore,parapluu/encore |
dc0793d87ef92e645f8414d12cbdb56b759126a2 | tests/regression/27-inv_invariants/10-invariant-worsen-global.c | tests/regression/27-inv_invariants/10-invariant-worsen-global.c | // modified from 27/09
#include <assert.h>
#include <pthread.h>
int a = 1;
int b = 1;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
void* t_fun(void *arg) {
return NULL;
}
int main() {
int *x;
int rnd;
if (rnd)
x = &a;
else
x = &b;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL); // go multithreaded
pthread_mutex_lock(&A); // continue with protected (privatized) values
assert(*x == 1);
b = 2;
assert(a == 1);
if (*x != 0) { // TODO: invariant makes less precise!
assert(a == 1); // TODO
}
return 0;
} | Add invariant precision worsening test for globals | Add invariant precision worsening test for globals
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
d782e8b30435413a9f0eeffc6eb38980e4c03bda | src/rx5808-pro-diversity/receiver.h | src/rx5808-pro-diversity/receiver.h | #ifndef RECEIVER_H
#define RECEIVER_H
#include <stdint.h>
#include "settings.h"
#define RECEIVER_A 0
#ifdef USE_DIVERSITY
#define RECEIVER_B 1
#define RECEIVER_AUTO 2
#define DIVERSITY_AUTO 0
#define DIVERSITY_FORCE_A 1
#define DIVERSITY_FORCE_B 2
#endif
#define RECEIVER_LAST_DELAY 100
#define RECEIVER_LAST_DATA_SIZE 16
namespace Receiver {
extern uint8_t activeReceiver;
extern uint8_t activeChannel;
extern uint8_t rssiA;
extern uint16_t rssiARaw;
extern uint8_t rssiALast[RECEIVER_LAST_DATA_SIZE];
#ifdef USE_DIVERSITY
extern uint8_t rssiB;
extern uint16_t rssiBRaw;
extern uint8_t rssiBLast[RECEIVER_LAST_DATA_SIZE];
#endif
void setChannel(uint8_t channel);
void waitForStableRssi();
uint16_t updateRssi();
void setActiveReceiver(uint8_t receiver = RECEIVER_A);
#ifdef USE_DIVERSITY
void setDiversityMode(uint8_t mode);
void switchDiversity();
#endif
void setup();
void update();
}
#endif
| #ifndef RECEIVER_H
#define RECEIVER_H
#include <stdint.h>
#include "settings.h"
#define RECEIVER_A 0
#ifdef USE_DIVERSITY
#define RECEIVER_B 1
#define RECEIVER_AUTO 2
#define DIVERSITY_AUTO 0
#define DIVERSITY_FORCE_A 1
#define DIVERSITY_FORCE_B 2
#endif
#define RECEIVER_LAST_DELAY 50
#define RECEIVER_LAST_DATA_SIZE 24
namespace Receiver {
extern uint8_t activeReceiver;
extern uint8_t activeChannel;
extern uint8_t rssiA;
extern uint16_t rssiARaw;
extern uint8_t rssiALast[RECEIVER_LAST_DATA_SIZE];
#ifdef USE_DIVERSITY
extern uint8_t rssiB;
extern uint16_t rssiBRaw;
extern uint8_t rssiBLast[RECEIVER_LAST_DATA_SIZE];
#endif
void setChannel(uint8_t channel);
void waitForStableRssi();
uint16_t updateRssi();
void setActiveReceiver(uint8_t receiver = RECEIVER_A);
#ifdef USE_DIVERSITY
void setDiversityMode(uint8_t mode);
void switchDiversity();
#endif
void setup();
void update();
}
#endif
| Tweak RSSI tracking speed/count for better graphs | Tweak RSSI tracking speed/count for better graphs
| C | mit | RCDaddy/rx5808-pro-diversity,sheaivey/rx5808-pro-diversity,RCDaddy/rx5808-pro-diversity,sheaivey/rx5808-pro-diversity |
f11eea1a4cf69c94a0995d2912b934f8d214557b | serialization_unique_ptr.h | serialization_unique_ptr.h | #include <boost/serialization/version.hpp>
#include <memory>
namespace boost {
namespace serialization {
template<class Archive, class T>
inline void save(Archive& ar, const std::unique_ptr<T>& t, const unsigned int){
// only the raw pointer has to be saved
const T* const tx = t.get();
ar << tx;
}
template<class Archive, class T>
inline void load(Archive& ar, std::unique_ptr<T>& t, const unsigned int){
T* pTarget;
ar >> pTarget;
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
t.release();
t = std::unique_ptr< T >(pTarget);
#else
t.reset(pTarget);
#endif
}
template<class Archive, class T>
inline void serialize(Archive& ar, std::unique_ptr<T>& t,
const unsigned int file_version){
boost::serialization::split_free(ar, t, file_version);
}
} // namespace serialization
} // namespace boost
| Add function for serialize std::unique_ptr | Add function for serialize std::unique_ptr
| C | agpl-3.0 | CanalTP/utils,pbougue/utils,xlqian/utils,CanalTP/utils |
|
3494e5de3a03d021845666f55340d35af44e3bfc | tests/asm-c-connect-1.c | tests/asm-c-connect-1.c | #include <stdio.h>
#if defined _WIN32 && !defined __TINYC__
# define U "_"
#else
# define U
#endif
const char str[] = "x1\n";
#ifdef __x86_64__
asm(U"x1: push %rbp; mov $"U"str, %rdi; call "U"printf; pop %rbp; ret");
#elif defined (__i386__)
asm(U"x1: push $"U"str; call "U"printf; pop %eax; ret");
#endif
int main(int argc, char *argv[])
{
asm("call "U"x1");
asm("call "U"x2");
asm("call "U"x3");
return 0;
}
static
int x2(void)
{
printf("x2\n");
return 2;
}
extern int x3(void);
| #include <stdio.h>
#if defined _WIN32 && !defined __TINYC__
# define _ "_"
#else
# define _
#endif
static int x1_c(void)
{
printf("x1\n");
return 1;
}
asm(".text;"_"x1: call "_"x1_c; ret");
int main(int argc, char *argv[])
{
asm("call "_"x1");
asm("call "_"x2");
asm("call "_"x3");
return 0;
}
static
int x2(void)
{
printf("x2\n");
return 2;
}
extern int x3(void);
| Adjust asm-c-connect testcase for Windows | Adjust asm-c-connect testcase for Windows
Calling conventions are different, let's use functions without
any arguments.
| C | lgpl-2.1 | mirror/tinycc,mirror/tinycc,avih/tinycc,mirror/tinycc,mingodad/tinycc,mingodad/tinycc,mingodad/tinycc,mirror/tinycc,avih/tinycc,avih/tinycc,avih/tinycc,mingodad/tinycc |
96430402b3226b71bcec689eb917ac1ec4bf49da | test/include/auxkernels/RadialAverageAux.h | test/include/auxkernels/RadialAverageAux.h | #pragma once
#include "AuxKernel.h"
#include "RadialAverage.h"
/**
* Auxkernel to output the averaged material value from RadialAverage
*/
class RadialAverageAux : public AuxKernel
{
public:
static InputParameters validParams();
RadialAverageAux(const InputParameters & parameters);
protected:
virtual Real computeValue() override;
const RadialAverage::Result & _average;
RadialAverage::Result::const_iterator _elem_avg;
}; | #pragma once
#include "AuxKernel.h"
#include "RadialAverage.h"
/**
* Auxkernel to output the averaged material value from RadialAverage
*/
class RadialAverageAux : public AuxKernel
{
public:
static InputParameters validParams();
RadialAverageAux(const InputParameters & parameters);
protected:
virtual Real computeValue() override;
const RadialAverage::Result & _average;
RadialAverage::Result::const_iterator _elem_avg;
};
| Update to add newline EOF | Update to add newline EOF | C | lgpl-2.1 | milljm/moose,milljm/moose,andrsd/moose,idaholab/moose,sapitts/moose,laagesen/moose,sapitts/moose,laagesen/moose,harterj/moose,idaholab/moose,milljm/moose,idaholab/moose,harterj/moose,sapitts/moose,andrsd/moose,sapitts/moose,dschwen/moose,laagesen/moose,milljm/moose,milljm/moose,dschwen/moose,harterj/moose,laagesen/moose,andrsd/moose,idaholab/moose,harterj/moose,harterj/moose,dschwen/moose,andrsd/moose,idaholab/moose,andrsd/moose,dschwen/moose,laagesen/moose,dschwen/moose,sapitts/moose |
650a24610c928965816dc0cb1c62f448582e4992 | tests/regression/34-congruence/01-simple.c | tests/regression/34-congruence/01-simple.c | //PARAM: --enable ana.int.congruence --disable ana.int.def_exc --disable ana.int.enums
int main() {
int a = 1;
int b = 2;
int c = 3;
int d = 4;
int e = 0;
while (d < 9) {
b = 2 * a;
d = d + 4;
e = e - 4 * a;
a = b - a;
c = e + d;
}
a = d / 2;
b = d % 2;
assert (c == 4); // UNKNOWN!
assert (d == 12); // UNKNOWN
assert (a == 6); // UNKNOWN
assert (b == 0);
return 0;
}
| Add simple regression test for congruence domain | Add simple regression test for congruence domain
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
9132701168fe6836e9e6f713823480c98c3a6d5b | RobotC/Headers/JoyMecanumDrive.h | RobotC/Headers/JoyMecanumDrive.h | #ifndef JOYMECANUMDRIVE_H
#define JOYMECANUMDRIVE_H
#pragma systemFile
#include "Joystick.h"
#include "Motor.h"
//This function interprets a TJoystick struct and sets desired motor powers.
//This uses mecanum drive in arcade style.
// Left joystick controls strafing and forwards/backwards
// Right joystick (x-axis only) controls rotation
void joymecdriveSetDesiredPowers(TJoystick *joyState) {
motorSetDesiredSafePower(Motor_Mec_FL, joyState->joy1_y1 + joyState->joy1_x2 + joyState->joy1_x1);
motorSetDesiredSafePower(Motor_Mec_BL, joyState->joy1_y1 + joyState->joy1_x2 - joyState->joy1_x1);
motorSetDesiredSafePower(Motor_Mec_BR, joyState->joy1_y1 - joyState->joy1_x2 + joyState->joy1_x1);
motorSetDesiredSafePower(Motor_Mec_FR, joyState->joy1_y1 - joyState->joy1_x2 - joyState->joy1_x2);
}
#endif
| Implement arcade drive in a new header file | Implement arcade drive in a new header file
| C | mit | RMRobotics/FTC_5421_2014-2015,RMRobotics/FTC_5421_2014-2015 |
|
41ba36ca7801c77f55da0f0180d3a844e4286d80 | Source/UnrealEnginePython/Public/UnrealEnginePython.h | Source/UnrealEnginePython/Public/UnrealEnginePython.h | // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ModuleManager.h"
DECLARE_LOG_CATEGORY_EXTERN(LogPython, Log, All);
class UNREALENGINEPYTHON_API FUnrealEnginePythonModule : public IModuleInterface
{
public:
bool PythonGILAcquire();
void PythonGILRelease();
virtual void StartupModule() override;
virtual void ShutdownModule() override;
void RunString(char *);
void RunFile(char *);
void RunFileSandboxed(char *);
private:
void *ue_python_gil;
// used by console
void *main_dict;
void *local_dict;
void *main_module;
};
struct FScopePythonGIL {
FScopePythonGIL()
{
#if defined(UEPY_THREADING)
UnrealEnginePythonModule = FModuleManager::LoadModuleChecked<FUnrealEnginePythonModule>("UnrealEnginePython");
safeForRelease = UnrealEnginePythonModule.PythonGILAcquire();
#endif
}
~FScopePythonGIL()
{
#if defined(UEPY_THREADING)
if (safeForRelease) {
UnrealEnginePythonModule.PythonGILRelease();
}
#endif
}
FUnrealEnginePythonModule UnrealEnginePythonModule;
bool safeForRelease;
};
| // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ModuleManager.h"
DECLARE_LOG_CATEGORY_EXTERN(LogPython, Log, All);
class UNREALENGINEPYTHON_API FUnrealEnginePythonModule : public IModuleInterface
{
public:
bool PythonGILAcquire();
void PythonGILRelease();
virtual void StartupModule() override;
virtual void ShutdownModule() override;
void RunString(char *);
void RunFile(char *);
void RunFileSandboxed(char *);
private:
void *ue_python_gil;
// used by console
void *main_dict;
void *local_dict;
};
struct FScopePythonGIL {
FScopePythonGIL()
{
#if defined(UEPY_THREADING)
UnrealEnginePythonModule = FModuleManager::LoadModuleChecked<FUnrealEnginePythonModule>("UnrealEnginePython");
safeForRelease = UnrealEnginePythonModule.PythonGILAcquire();
#endif
}
~FScopePythonGIL()
{
#if defined(UEPY_THREADING)
if (safeForRelease) {
UnrealEnginePythonModule.PythonGILRelease();
}
#endif
}
FUnrealEnginePythonModule UnrealEnginePythonModule;
bool safeForRelease;
};
| Revert "Add support for the Python Stdout Log" | Revert "Add support for the Python Stdout Log"
This reverts commit 6dd58324c052cc893f6ce8f009903805185a71d1.
| C | mit | Orav/UnrealEnginePython,20tab/UnrealEnginePython,20tab/UnrealEnginePython,getnamo/UnrealEnginePython,Orav/UnrealEnginePython,kitelightning/UnrealEnginePython,kitelightning/UnrealEnginePython,Orav/UnrealEnginePython,20tab/UnrealEnginePython,getnamo/UnrealEnginePython,getnamo/UnrealEnginePython,20tab/UnrealEnginePython,Orav/UnrealEnginePython,kitelightning/UnrealEnginePython,kitelightning/UnrealEnginePython,getnamo/UnrealEnginePython,kitelightning/UnrealEnginePython,20tab/UnrealEnginePython,getnamo/UnrealEnginePython |
778092838a341f1b508b4f1013c9418902200725 | unittest/include_gunit.h | unittest/include_gunit.h | // (C) Copyright 2017, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Portability include to match the Google test environment.
#ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#include "gtest/gtest.h"
#include "errcode.h" // for ASSERT_HOST
#include "fileio.h" // for tesseract::File
const char* FLAGS_test_tmpdir = ".";
class file: public tesseract::File {
};
#define CHECK(test) ASSERT_HOST(test)
#endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
| // (C) Copyright 2017, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Portability include to match the Google test environment.
#ifndef TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#define TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
#include "gtest/gtest.h"
#include "errcode.h" // for ASSERT_HOST
#include "fileio.h" // for tesseract::File
const char* FLAGS_test_tmpdir = ".";
class file: public tesseract::File {
};
#define ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#define CHECK(test) ASSERT_HOST(test)
#endif // TESSERACT_UNITTEST_INCLUDE_GUNIT_H_
| Add ARRAYSIZE macro for Google test environment | Add ARRAYSIZE macro for Google test environment
Signed-off-by: Stefan Weil <[email protected]>
| C | apache-2.0 | tesseract-ocr/tesseract,stweil/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,stweil/tesseract,amitdo/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,stweil/tesseract,UB-Mannheim/tesseract,stweil/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,stweil/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,jbarlow83/tesseract,amitdo/tesseract,UB-Mannheim/tesseract |
e22b221f8f12b2ec8348745d91836c236b206738 | lib/Target/PowerPC/PPCTargetStreamer.h | lib/Target/PowerPC/PPCTargetStreamer.h | //===-- PPCTargetStreamer.h - PPC Target Streamer --s-----------*- C++ -*--===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H
#define LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H
#include "llvm/MC/MCStreamer.h"
namespace llvm {
class PPCTargetStreamer : public MCTargetStreamer {
public:
PPCTargetStreamer(MCStreamer &S);
~PPCTargetStreamer() override;
virtual void emitTCEntry(const MCSymbol &S) = 0;
virtual void emitMachine(StringRef CPU) = 0;
virtual void emitAbiVersion(int AbiVersion) = 0;
virtual void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) = 0;
};
}
#endif
| //===- PPCTargetStreamer.h - PPC Target Streamer ----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H
#define LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCStreamer.h"
namespace llvm {
class MCExpr;
class MCSymbol;
class MCSymbolELF;
class PPCTargetStreamer : public MCTargetStreamer {
public:
PPCTargetStreamer(MCStreamer &S);
~PPCTargetStreamer() override;
virtual void emitTCEntry(const MCSymbol &S) = 0;
virtual void emitMachine(StringRef CPU) = 0;
virtual void emitAbiVersion(int AbiVersion) = 0;
virtual void emitLocalEntry(MCSymbolELF *S, const MCExpr *LocalOffset) = 0;
};
} // end namespace llvm
#endif // LLVM_LIB_TARGET_POWERPC_PPCTARGETSTREAMER_H
| Fix some Include What You Use warnings; other minor fixes (NFC). | [PowerPC] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MC headers dependencies.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@294368 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm |
39dbabe79a9f56fb068ce6e17f5b068eab4226ce | Source/YOChartImageKit/YOChartImageKit.h | Source/YOChartImageKit/YOChartImageKit.h | #import <UIKit/UIKit.h>
//! Project version number for YOChartImageKit.
FOUNDATION_EXPORT double YOChartImageKitVersionNumber;
//! Project version string for YOChartImageKit.
FOUNDATION_EXPORT const unsigned char YOChartImageKitVersionString[];
#import <YOChartImageKit/YODonutChartImage.h>
#import <YOChartImageKit/YOBarChartImage.h>
#import <YOChartImageKit/YOLineChartImage.h>
| #import <UIKit/UIKit.h>
//! Project version number for YOChartImageKit.
FOUNDATION_EXPORT double YOChartImageKitVersionNumber;
//! Project version string for YOChartImageKit.
FOUNDATION_EXPORT const unsigned char YOChartImageKitVersionString[];
#import "YODonutChartImage.h"
#import "YOBarChartImage.h"
#import "YOLineChartImage.h"
| Fix including framework headers' path | Fix including framework headers' path
| C | mit | yasuoza/YOChartImageKit,yasuoza/YOChartImageKit |
fe117be5cff526413fbf793081a3722528cc77c4 | tests/regression/46-apron2/11-names.c | tests/regression/46-apron2/11-names.c | // SKIP PARAM: --set solver td3 --set ana.activated "['base','threadid','threadflag','mallocWrapper','apron','escape']" --set ana.base.privatization none --set ana.apron.privatization dummy
extern int __VERIFIER_nondet_int();
void change(int *p) {
int a;
(*p)++;
a++;
assert(a == 7); //UNKNOWN!
}
int g;
int main() {
int c = __VERIFIER_nondet_int();
int a = 5;
int *p = &a;
change(p);
assert(a == 5); //FAIL
assert(a - 6 == 0); // Apron currently finds \bot here (!)
return 0;
}
| Add exmpale of confusion between locals of different procedures :/ | Add exmpale of confusion between locals of different procedures :/
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
2a6f1ae84ba32a6ee78eb386412254de98f85d04 | chapter1/1-10/external-longest.c | chapter1/1-10/external-longest.c | //
// Created by matti on 16.9.2015.
//
#include <stdio.h>
#define MAXLINE 1000
int max;
char line[MAXLINE];
char longest[MAXLINE];
int getline(void);
void copy(void);
int main() {
int len;
extern int max;
extern char longest[];
max = 0;
while((len = getline()) > 0) {
if (len > max) {
max = len;
copy();
}
if (max > 0) {
printf("%s", longest);
}
return 0;
}
}
int getline(void) {
int c, i;
extern char line[];
for(i = 0; i < MAXLINE - 1 && (c=getchar()) != EOF && c != '\n'; ++i) {
line[i] = c;
if (c == '\n') {
line[i] = c;
++i;
}
line[i] = '\0';
return i;
}
} | //
// Created by matti on 16.9.2015.
//
#include <stdio.h>
#define MAXLINE 1000
int max;
char line[MAXLINE];
char longest[MAXLINE];
int getnewline(void);
void copy(void);
int main() {
int len;
extern int max;
extern char longest[];
max = 0;
while((len = getnewline()) > 0) {
if (len > max) {
max = len;
copy();
}
if (max > 0) {
printf("%s", longest);
}
return 0;
}
}
int getnewline(void) {
int c, i;
extern char line[];
for(i = 0; i < MAXLINE - 1 && (c=getchar()) != EOF && c != '\n'; ++i) {
line[i] = c;
}
if (c == '\n') {
line[i] = c;
++i;
}
line[i] = '\0';
return i;
}
void copy(void) {
int i;
extern char line[], longest[];
i = 0;
while((longest[i] = line[i]) != '\0') {
++i;
}
} | Add 1-10 external variable example | Add 1-10 external variable example
| C | mit | melonmanchan/k-and-r |
d1e8b49ce3fcca4707a5971c5f6c693e7cf6dea2 | glib/mypaint-brush.h | glib/mypaint-brush.h | #ifndef MYPAINTBRUSHGLIB_H
#define MYPAINTBRUSHGLIB_H
#include <glib-object.h>
#include <mypaint-config.h>
#if MYPAINT_CONFIG_USE_GLIB
#define MYPAINT_TYPE_BRUSH (mypaint_brush_get_type ())
#define MYPAINT_VALUE_HOLDS_BRUSH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), MYPAINT_TYPE_BRUSH))
GType mypaint_brush_get_type(void);
#endif
#endif // MYPAINTBRUSHGLIB_H
| #ifndef MYPAINTBRUSHGLIB_H
#define MYPAINTBRUSHGLIB_H
#include <mypaint-config.h>
#if MYPAINT_CONFIG_USE_GLIB
#include <glib-object.h>
#define MYPAINT_TYPE_BRUSH (mypaint_brush_get_type ())
#define MYPAINT_VALUE_HOLDS_BRUSH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), MYPAINT_TYPE_BRUSH))
GType mypaint_brush_get_type(void);
#endif
#endif // MYPAINTBRUSHGLIB_H
| Move glib-object.h include inside USE_GLIB conditional | brushlib: Move glib-object.h include inside USE_GLIB conditional
| C | isc | achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint,b3sigma/libmypaint,b3sigma/libmypaint,b3sigma/libmypaint |
36aff6ec2ddeadbe06c7e52af8321a8bed2552d5 | include/llvm/Reoptimizer/InstLoops.h | include/llvm/Reoptimizer/InstLoops.h | //===-- InstLoops.h - interface to insert instrumentation --------*- C++ -*--=//
//
// Instrument every back edges with counters
//===----------------------------------------------------------------------===//
#ifndef LLVM_REOPTIMIZERINSTLOOPS_H
#define LLVM_REOPTIMIZERINSTLOOPS_H
class Pass;
// createInstLoopsPass - Create a new pass to add counters on back edges
//
Pass *createInstLoopsPass();
#endif
| Check in header file that was missing, thus broke the build | Check in header file that was missing, thus broke the build
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@4513 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap |
|
8ca7c103b616c4f773d9cf83ceb3c9a8098907b3 | src/math/float/cexpf.c | src/math/float/cexpf.c | #include "cisf.h"
#include "expf.h"
float _Complex cexpf(float _Complex z)
{
float x = z;
float y = cimagf(z);
if (y == 0)
return CMPLXF(expf_(x), y);
if (y - y) {
if (x == INFINITY)
return CMPLXF(x, y - y);
if (x == -INFINITY)
return 0;
}
return expf_(x) * cisf_(y);
}
| #include "cisf.h"
#include "expf.h"
float _Complex cexpf(float _Complex z)
{
float x = z;
float y = cimagf(z);
double r = expf_(x);
if (y == 0)
return CMPLXF(r, y);
if (y - y) {
if (x == INFINITY)
return CMPLXF(x, y - y);
if (x == -INFINITY)
return 0;
}
return r * cisf_(y);
}
| Reduce compiled code size by storing a result of a likely-used common expression | Reduce compiled code size by storing a result of a likely-used common expression
| C | mit | jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic |
0ecd818dddb5d8ea73ba6dc4e1f0d54b5313bea7 | source/common/console_progress_bar.h | source/common/console_progress_bar.h | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef CONSOLE_PROGRESS_BAR_H
#define CONSOLE_PROGRESS_BAR_H
#include "common/typedefs.h"
#include "rlutil.h"
#include <cassert>
namespace Common {
class ConsoleProgressBar {
public:
ConsoleProgressBar();
private:
uint m_numCols;
uint m_verticalOffset;
public:
void DrawProgress(uint progress);
void SetVerticalOffset(uint offset);
};
ConsoleProgressBar::ConsoleProgressBar()
: m_numCols(rlutil::tcols()),
m_verticalOffset(1) {
}
void ConsoleProgressBar::DrawProgress(uint progress) {
rlutil::locate(1, 3);
std::cout << progress << " %" << std::endl << std::endl;
rlutil::locate(7, m_verticalOffset);
uint numberOfTicks = progress * (m_numCols - 6) / 100;
for (uint i = 0; i < numberOfTicks; ++i) {
std::cout << (char)(219);
}
for (uint i = numberOfTicks; i < m_numCols - 6; ++i) {
std::cout << ' ';
}
}
void ConsoleProgressBar::SetVerticalOffset(uint offset) {
assert(offset <= rlutil::trows());
m_verticalOffset = offset;
}
}
#endif | Create a class for drawing progress bars on a console window | COMMON: Create a class for drawing progress bars on a console window
| C | apache-2.0 | RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject |
|
edce59e1c03fdebc18649bbbc1ffcda3b62f101c | lb_vector.h | lb_vector.h | #ifndef LB_VECTOR_INCLUDED
#include "lb_scalar.h"
// Assume Vector to be n rows by 1 column
typedef struct {
Scalar* data;
unsigned int length;
} Vector;
Vector lb_create_vector(Scalar* data, unsigned int length);
Vector lb_allocate_vector(unsigned int length);
void lbdp(Vector a, Vector b, Scalar* result);
void lbstv(Scalar s, Vector v, Vector result);
#define LB_VECTOR_INCLUDED
#endif
| #ifndef LB_VECTOR_INCLUDED
#include "lb_scalar.h"
// Assume Vector to be n rows by 1 column
typedef struct {
Scalar* data;
unsigned int length;
} Vector;
Vector lb_create_vector(Scalar* data, unsigned int length);
Vector lb_allocate_vector(unsigned int length);
void lbdp(Vector a, Vector b, Scalar* result);
void lbstv(Scalar s, Vector v, Vector result);
#define lbv_iterate(vec, iter, expr) do{\
unsigned int iter;\
for(iter=0; iter < vec.length; iter++) {\
expr;\
}\
} while(0);
#define LB_VECTOR_INCLUDED
#endif
| Make it easy to iterate a vector | Make it easy to iterate a vector
| C | apache-2.0 | frenchrd/laid-back-lapack,frenchrd/laid-back-lapack |
126ae8fc465f5077deb802e655c54cd2f253b623 | core/alsp_src/macos/mw_alspro_prefix.h | core/alsp_src/macos/mw_alspro_prefix.h | #include <MacHeaders.h>
#include <ansi_prefix.mac.h>
#pragma once off
#define HAVE_CONFIG_H
#define PORT 1
#define MACOS 1
#define CONFIGLESS 1
#include "prefix.h" | #include <MacHeaders.h>
//#include <ansi_prefix.mac.h>
#pragma once off
#define HAVE_CONFIG_H
#define PORT 1
#define MACOS 1
#define CONFIGLESS 1
#include "prefix.h" | Update prefix for CW Pro1 | Update prefix for CW Pro1
| C | mit | AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog |
e78f728e723f15b2423c7d5556e4bf9bc47c2c6f | searchlib/src/vespa/searchlib/queryeval/idiversifier.h | searchlib/src/vespa/searchlib/queryeval/idiversifier.h | // Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstdint>
namespace search::queryeval {
struct IDiversifier {
virtual ~IDiversifier() {}
/**
* Will tell if this document should be kept, and update state for further filtering.
*/
virtual bool accepted(uint32_t docId) = 0;
};
}
| Restructure for code reuse and hiding implementation. | Restructure for code reuse and hiding implementation.
| C | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
|
8fa7d5b367c2a24717d022242facced25ac381df | src/lib/c++/cxx_constructors_global.c | src/lib/c++/cxx_constructors_global.c | /*
* cxx_constructors_global.c
*
* Created on: 30 janv. 2013
* Author: fsulima
*/
#include <embox/unit.h>
EMBOX_UNIT_INIT(cxx_init);
EMBOX_UNIT_FINI(cxx_fini);
#include "cxx_invoke_constructors.h"
#include "cxx_invoke_destructors.h"
#include "cxx_app_startup_terminatioin.h"
static int cxx_init(void) {
cxx_invoke_constructors();
return 0;
}
static int cxx_fini(void) {
cxx_invoke_destructors();
return 0;
}
void cxx_app_startup(void) {
}
void cxx_app_termination(void) {
}
| /*
* cxx_constructors_global.c
*
* Created on: 30 janv. 2013
* Author: fsulima
*/
#include <embox/unit.h>
#include "cxx_invoke_constructors.h"
#include "cxx_invoke_destructors.h"
#include "cxx_app_startup_termination.h"
EMBOX_UNIT(cxx_init, cxx_fini);
static int cxx_init(void) {
cxx_invoke_constructors();
return 0;
}
static int cxx_fini(void) {
cxx_invoke_destructors();
return 0;
}
void cxx_app_startup(void) {
}
void cxx_app_termination(void) {
}
| Fix compilation of constructor_global module | qt-pro: Fix compilation of constructor_global module | C | bsd-2-clause | Kakadu/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,Kefir0192/embox,Kefir0192/embox,abusalimov/embox,gzoom13/embox,Kakadu/embox,embox/embox,gzoom13/embox,abusalimov/embox,mike2390/embox,abusalimov/embox,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,vrxfile/embox-trik,mike2390/embox,embox/embox,embox/embox,Kefir0192/embox,Kakadu/embox,embox/embox,vrxfile/embox-trik,abusalimov/embox,mike2390/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,abusalimov/embox,gzoom13/embox,gzoom13/embox,embox/embox,Kakadu/embox,Kefir0192/embox,vrxfile/embox-trik,abusalimov/embox,vrxfile/embox-trik,mike2390/embox,mike2390/embox,Kakadu/embox |
41b1fefc4ecf7317d4e8ca4529edde1d5fad6ac0 | Menu/Code/UI.h | Menu/Code/UI.h | //
// Mapping.h
// Menu
//
// Created by Matt on 21/07/15.
// Copyright (c) 2015 Blue Rocket. All rights reserved.
//
#import <BRMenu/UI/BRMenuPlusMinusButton.h>
#import <BRMenu/UI/BRMenuStepper.h>
#import <BRMenu/UI/BRMenuUIStyle.h>
| //
// Mapping.h
// Menu
//
// Created by Matt on 21/07/15.
// Copyright (c) 2015 Blue Rocket. All rights reserved.
//
#import <BRMenu/UI/BRMenuBackBarButtonItemView.h>
#import <BRMenu/UI/BRMenuBarButtonItemView.h>
#import <BRMenu/UI/BRMenuPlusMinusButton.h>
#import <BRMenu/UI/BRMenuStepper.h>
#import <BRMenu/UI/BRMenuUIStyle.h>
| Include latest class additions in umbrella include. | Include latest class additions in umbrella include.
| C | apache-2.0 | Blue-Rocket/BRMenu,Blue-Rocket/BRMenu,Blue-Rocket/BRMenu,Blue-Rocket/BRMenu,Blue-Rocket/BRMenu |
8de044c57cd709945db364a4ac403a6a8e017a8b | exercises/leap/src/example.h | exercises/leap/src/example.h | #ifndef _LEAP_H
#define _LEAP_H
#include <stdbool.h>
bool leap_year(int year);
#endif
| #ifndef _LEAP_H
#define _LEAP_H
#include <stdbool.h>
bool is_leap_year(int year);
#endif
| Fix compiler warning in Leap | Fix compiler warning in Leap
| C | mit | RealBarrettBrown/xc,RealBarrettBrown/xc,RealBarrettBrown/xc |
df574f0ac2acf774a874752f6421f1f6f85cb2cc | test/Preprocessor/warn-macro-unused.c | test/Preprocessor/warn-macro-unused.c | // RUN: %clang_cc1 %s -Wunused-macros -Dfoo -Dfoo -verify
#include "warn-macro-unused.h"
#define unused // expected-warning {{macro is not used}}
#define unused
unused
// rdar://9745065
#undef unused_from_header // no warning
| // RUN: %clang_cc1 %s -Wunused-macros -Dfoo -Dfoo -verify
// XFAIL: *
#include "warn-macro-unused.h"
#define unused // expected-warning {{macro is not used}}
#define unused
unused
// rdar://9745065
#undef unused_from_header // no warning
| Test is broken; XFAIL it until Argyrios gets a chance to look at it. | Test is broken; XFAIL it until Argyrios gets a chance to look at it.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@134925 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang |
ac62d9b1e647fa02437ea49336460e32988138b0 | HATransparentView/HATransparentView.h | HATransparentView/HATransparentView.h | //
// HATransparentView.h
// HATransparentView
//
// Created by Heberti Almeida on 13/09/13.
// Copyright (c) 2013 Heberti Almeida. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HATransparentView : UIView
@property (strong, nonatomic) UIColor *color;
@property (nonatomic) CGFloat *alpha;
- (void)open;
- (void)close;
@end
| //
// HATransparentView.h
// HATransparentView
//
// Created by Heberti Almeida on 13/09/13.
// Copyright (c) 2013 Heberti Almeida. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HATransparentView : UIView
- (void)open;
- (void)close;
@end
| Fix disabled interaction on device | Fix disabled interaction on device
| C | mit | ernestopino/HATransparentView,hebertialmeida/HATransparentView,amannayak0007/HATransparentView |
f2a5890d0133c8c7a9a5d7a21ffc9c038e838698 | ios/RNInstabug/InstabugReactBridge.h | ios/RNInstabug/InstabugReactBridge.h | //
// InstabugReactBridge.h
// instabugDemo
//
// Created by Yousef Hamza on 9/29/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
#import "RCTEventEmitter.h"
@interface InstabugReactBridge : RCTEventEmitter <RCTBridgeModule>
@end
| //
// InstabugReactBridge.h
// instabugDemo
//
// Created by Yousef Hamza on 9/29/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "RCTEventEmitter.h"
@interface InstabugReactBridge : RCTEventEmitter <RCTBridgeModule>
@end
| Fix the import in the bridge header file to account for changes in RN 0.48 | :pencil: Fix the import in the bridge header file to account for changes in RN 0.48
| C | mit | Instabug/instabug-reactnative,Instabug/instabug-reactnative,Instabug/instabug-reactnative,Instabug/instabug-reactnative,Instabug/instabug-reactnative |
8b32603f1492f8847ffecd683c1d666a528abbf2 | include/Athena-Physics/Prerequisites.h | include/Athena-Physics/Prerequisites.h | /** @file Prerequisites.h
@author Philip Abbet
Declaration of the types of the Athena-Physics module
*/
#ifndef _ATHENA_PHYSICS_PREREQUISITES_H_
#define _ATHENA_PHYSICS_PREREQUISITES_H_
#include <Athena-Core/Prerequisites.h>
#include <Athena-Physics/Config.h>
#include <Bullet/btConfig.h>
#include <btBulletDynamicsCommon.h>
//----------------------------------------------------------------------------------------
/// @brief Main namespace. All the components of the Athena engine belongs to this
/// namespace
//----------------------------------------------------------------------------------------
namespace Athena
{
//------------------------------------------------------------------------------------
/// @brief Contains all the physics-related classes
//------------------------------------------------------------------------------------
namespace Physics
{
class Body;
class CollisionShape;
class PhysicalComponent;
class World;
class BoxShape;
class CapsuleShape;
class ConeShape;
class CylinderShape;
class SphereShape;
class StaticTriMeshShape;
}
//------------------------------------------------------------------------------------
/// @brief Initialize the Physics module
//------------------------------------------------------------------------------------
extern void initialize();
}
#endif
| /** @file Prerequisites.h
@author Philip Abbet
Declaration of the types of the Athena-Physics module
*/
#ifndef _ATHENA_PHYSICS_PREREQUISITES_H_
#define _ATHENA_PHYSICS_PREREQUISITES_H_
#include <Athena-Core/Prerequisites.h>
#include <Athena-Physics/Config.h>
#include <Bullet/btConfig.h>
#include <btBulletDynamicsCommon.h>
//----------------------------------------------------------------------------------------
/// @brief Main namespace. All the components of the Athena engine belongs to this
/// namespace
//----------------------------------------------------------------------------------------
namespace Athena
{
//------------------------------------------------------------------------------------
/// @brief Contains all the physics-related classes
//------------------------------------------------------------------------------------
namespace Physics
{
class Body;
class CollisionShape;
class PhysicalComponent;
class World;
class BoxShape;
class CapsuleShape;
class ConeShape;
class CylinderShape;
class SphereShape;
class StaticTriMeshShape;
//------------------------------------------------------------------------------------
/// @brief Initialize the Physics module
//------------------------------------------------------------------------------------
extern void initialize();
}
}
#endif
| Fix the previous commit: the 'initialize()' function wasn't declared in the 'Athena::Physics' namespace | Fix the previous commit: the 'initialize()' function wasn't declared in the 'Athena::Physics' namespace
| C | mit | Kanma/Athena-Physics,Kanma/Athena-Physics |
d00dc21fdb784defab7376b8aa0c45db94be5c97 | src/gpu/vk/GrVkVulkan.h | src/gpu/vk/GrVkVulkan.h | /*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrVkVulkan_DEFINED
#define GrVkVulkan_DEFINED
#include "SkTypes.h"
#ifdef VULKAN_CORE_H_
#error "Skia's private vulkan header must be included before any other vulkan header."
#endif
#include "../../third_party/vulkan/vulkan/vulkan_core.h"
#ifdef SK_BUILD_FOR_ANDROID
#ifdef VULKAN_ANDROID_H_
#error "Skia's private vulkan android header must be included before any other vulkan header."
#endif
// This is needed to get android extensions for external memory
#include "../../third_party/vulkan/vulkan/vulkan_android.h"
#endif
#endif
| /*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrVkVulkan_DEFINED
#define GrVkVulkan_DEFINED
#include "SkTypes.h"
#ifdef VULKAN_CORE_H_
#error "Skia's private vulkan header must be included before any other vulkan header."
#endif
#include "../../../include/third_party/vulkan/vulkan/vulkan_core.h"
#ifdef SK_BUILD_FOR_ANDROID
#ifdef VULKAN_ANDROID_H_
#error "Skia's private vulkan android header must be included before any other vulkan header."
#endif
// This is needed to get android extensions for external memory
#include "../../../include/third_party/vulkan/vulkan/vulkan_android.h"
#endif
#endif
| Fix path to vulkan header. | Fix path to vulkan header.
Bug: skia:
Change-Id: I47cb8f67b378a51cefcb82864eda467ff6b48a7e
Reviewed-on: https://skia-review.googlesource.com/c/176969
Commit-Queue: Greg Daniel <[email protected]>
Commit-Queue: Mike Klein <[email protected]>
Auto-Submit: Greg Daniel <[email protected]>
Reviewed-by: Mike Klein <[email protected]>
| C | bsd-3-clause | HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia |
a97f2adb2fbfed37e1bf7706f57d22983936ba4d | src/kdf/pbkdf1/pbkdf1.h | src/kdf/pbkdf1/pbkdf1.h | /*************************************************
* PBKDF1 Header File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#ifndef BOTAN_PBKDF1_H__
#define BOTAN_PBKDF1_H__
#include <botan/s2k.h>
#include <botan/base.h>
namespace Botan {
/*************************************************
* PKCS #5 PBKDF1 *
*************************************************/
class BOTAN_DLL PKCS5_PBKDF1 : public S2K
{
public:
std::string name() const;
S2K* clone() const;
PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {}
PKCS5_PBKDF1(const PKCS5_PBKDF1& other) : hash(other.hash->clone()) {}
~PKCS5_PBKDF1() { delete hash; }
private:
OctetString derive(u32bit, const std::string&,
const byte[], u32bit, u32bit) const;
HashFunction* hash;
};
}
#endif
| /*************************************************
* PBKDF1 Header File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#ifndef BOTAN_PBKDF1_H__
#define BOTAN_PBKDF1_H__
#include <botan/s2k.h>
#include <botan/base.h>
namespace Botan {
/*************************************************
* PKCS #5 PBKDF1 *
*************************************************/
class BOTAN_DLL PKCS5_PBKDF1 : public S2K
{
public:
std::string name() const;
S2K* clone() const;
PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {}
PKCS5_PBKDF1(const PKCS5_PBKDF1& other) :
S2K(), hash(other.hash->clone()) {}
~PKCS5_PBKDF1() { delete hash; }
private:
OctetString derive(u32bit, const std::string&,
const byte[], u32bit, u32bit) const;
HashFunction* hash;
};
}
#endif
| Fix warning in PBKDF1 copy constructor | Fix warning in PBKDF1 copy constructor
| C | bsd-2-clause | Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan |
2f2b637ef0a89c0483ff1f26f42452dbc210d7d2 | AppIconOverlay/config.h | AppIconOverlay/config.h | #ifndef AppIconOverlay_config_h
#define AppIconOverlay_config_h
#define DEBUG 1
#define DEFAULT_MIN_FONT_SIZE 6.0
#define DEFAULT_MAX_FONT_SIZE 18.0
#define DEFAULT_FONT_TO_USE "Arial-BoldMT"
#endif
| #ifndef AppIconOverlay_config_h
#define AppIconOverlay_config_h
#define DEBUG 1
#define DEFAULT_MIN_FONT_SIZE 6.0
#define DEFAULT_MAX_FONT_SIZE 18.0
#define DEFAULT_FONT_TO_USE @"Arial-BoldMT"
#endif
| Convert default font name into an NSString | Convert default font name into an NSString
| C | mit | carsonmcdonald/AppIconOverlay |
d84b1b8c58237023cf007e92202d96716254b1f0 | vp8/decoder/opencl/opencl_systemdependent.c | vp8/decoder/opencl/opencl_systemdependent.c | /*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "vp8/decoder/onyxd_int.h"
#include "vp8/common/opencl/vp8_opencl.h"
#include "vp8_decode_cl.h"
extern void vp8_dequantize_b_cl(BLOCKD*);
extern void vp8_dequant_dc_idct_add_cl(short*, short*, unsigned char*,
unsigned char*, int, int, int Dc);
void vp8_arch_opencl_decode_init(VP8D_COMP *pbi)
{
if (cl_initialized == CL_SUCCESS){
cl_decode_init();
}
}
| /*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "vpx_ports/config.h"
#include "vp8/decoder/onyxd_int.h"
#include "vp8/common/opencl/vp8_opencl.h"
#include "vp8_decode_cl.h"
void vp8_arch_opencl_decode_init(VP8D_COMP *pbi)
{
if (cl_initialized == CL_SUCCESS){
cl_decode_init();
}
}
| Remove unused external function definitions. | Remove unused external function definitions.
| C | bsd-3-clause | awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl,awatry/libvpx.opencl |
f5098c051ddf16fd9adb2d53044975c2fc33ad10 | libpolyml/noreturn.h | libpolyml/noreturn.h | /*
Title: No return header.
Author: David C.J. Matthews
Copyright (c) 2006, 2015 David C.J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _NORETURN_H
#define _NORETURN_H
/* The exception functions don't return but instead raise exceptions. This macro
tells the compiler about this and prevents spurious errors. */
#if (defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
#define NORETURNFN(x) __declspec(noreturn) x
#elif defined(__GNUC__) || defined(__attribute__)
#define NORETURNFN(x) x __attribute__((noreturn))
#else
#define NORETURNFN(x)
#endif
#endif
| /*
Title: No return header.
Author: David C.J. Matthews
Copyright (c) 2006, 2015 David C.J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _NORETURN_H
#define _NORETURN_H
/* The exception functions don't return but instead raise exceptions. This macro
tells the compiler about this and prevents spurious errors. */
#if (defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
#define NORETURNFN(x) __declspec(noreturn) x
#elif defined(__GNUC__) || defined(__attribute__)
#define NORETURNFN(x) x __attribute__((noreturn))
#else
#define NORETURNFN(x) x
#endif
#endif
| Fix no-return for non-GCC and non-VS. | Fix no-return for non-GCC and non-VS.
| C | lgpl-2.1 | polyml/polyml,polyml/polyml,dcjm/polyml,polyml/polyml,dcjm/polyml,dcjm/polyml,polyml/polyml,dcjm/polyml |
a66b58cc03746c8b26d1f73c149eea03f9195c85 | packages/rview/fltk/Fl_Value_Slider2.h | packages/rview/fltk/Fl_Value_Slider2.h | #ifndef Fl_Value_Slider2_H
#define Fl_Value_Slider2_H
#include "Fl/Fl_Slider.H"
class Fl_Value_Slider2 : public Fl_Slider {
uchar textfont_, textsize_;
unsigned textcolor_;
public:
void draw();
int handle(int);
Fl_Value_Slider2(int x,int y,int w,int h, const char *l = 0);
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
| #ifndef Fl_Value_Slider2_H
#define Fl_Value_Slider2_H
#include <FL/Fl_Slider.H>
class Fl_Value_Slider2 : public Fl_Slider {
uchar textfont_, textsize_;
unsigned textcolor_;
public:
void draw();
int handle(int);
Fl_Value_Slider2(int x,int y,int w,int h, const char *l = 0);
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
| Fix include statement of FLTK header such that it compiles with FLTK 1.3 without requiring backwards compatible link creation. | Fix include statement of FLTK header such that it compiles with FLTK 1.3 without requiring backwards compatible link creation.
| C | unknown | BioMedIA/irtk-legacy,BioMedIA/IRTK,BioMedIA/IRTK,ghisvail/irtk-legacy,ghisvail/irtk-legacy,BioMedIA/IRTK,ghisvail/irtk-legacy,ghisvail/irtk-legacy,BioMedIA/IRTK,BioMedIA/irtk-legacy,BioMedIA/irtk-legacy,sk1712/IRTK,sk1712/IRTK,sk1712/IRTK,sk1712/IRTK,BioMedIA/irtk-legacy |
cc960ada72a4626bac4e12853c00a20282d246f7 | include/problems/0001-0050/Problem14.h | include/problems/0001-0050/Problem14.h | //===-- problems/Problem14.h ------------------------------------*- C++ -*-===//
//
// ProjectEuler.net solutions by Will Mitchell
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Problem 14: Longest Collatz sequence
///
//===----------------------------------------------------------------------===//
#ifndef PROBLEMS_PROBLEM14_H
#define PROBLEMS_PROBLEM14_H
#include <string>
#include <vector>
#include "../Problem.h"
namespace problems {
class Problem14 : public Problem {
public:
Problem14() : start(0), length(0), solved(false) {}
~Problem14() = default;
std::string answer();
std::string description() const;
void solve();
// Simple brute force solution
unsigned long long bruteForce(const unsigned long long limit) const;
// Simple brute force solution with memoization
unsigned long long
faster(const unsigned long long limit,
const std::vector<unsigned long long>::size_type cacheSize) const;
private:
/// Cached answer
unsigned long long start;
/// Cached answer
mutable unsigned long long length;
/// If cached answer is valid
bool solved;
};
}
#endif
| //===-- problems/Problem14.h ------------------------------------*- C++ -*-===//
//
// ProjectEuler.net solutions by Will Mitchell
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Problem 14: Longest Collatz sequence
///
//===----------------------------------------------------------------------===//
#ifndef PROBLEMS_PROBLEM14_H
#define PROBLEMS_PROBLEM14_H
#include <string>
#include <vector>
#include "../Problem.h"
namespace problems {
class Problem14 : public Problem {
public:
Problem14() : start(0), length(0), solved(false) {}
~Problem14() = default;
std::string answer();
std::string description() const;
void solve();
/// Simple brute force solution
unsigned long long bruteForce(const unsigned long long limit) const;
/// Simple brute force solution with memoization
unsigned long long
faster(const unsigned long long limit,
const std::vector<unsigned long long>::size_type cacheSize) const;
private:
/// Cached answer
unsigned long long start;
/// Cached answer
mutable unsigned long long length;
/// If cached answer is valid
bool solved;
};
}
#endif
| Add another / to a couple comments in Problem 14 to make intended Doxygen comments visible as such. | Add another / to a couple comments in Problem 14 to make intended Doxygen comments visible as such.
| C | mit | wtmitchell/challenge_problems,wtmitchell/challenge_problems,wtmitchell/challenge_problems |
adebbe22c28891ccc25941d7679a9641972a7a25 | tests/regression/31-ikind-aware-ints/16-enums-compare.c | tests/regression/31-ikind-aware-ints/16-enums-compare.c | //PARAM: --enable ana.int.enums --disable ana.int.def_exc
int main(){
int top = rand();
int x,y;
if(top){
x = 1;
} else{
x = 0;
}
assert(x<2);
return 0;
}
| //PARAM: --enable ana.int.enums --disable ana.int.def_exc
int main(){
int top = rand();
int x,y;
if(top){
x = 1;
} else{
x = 0;
}
assert(x < 2);
assert(x < 1); // UNKNOWN!
assert(x < 0); // FAIL
assert(x <= 2);
assert(x <= 1);
assert(x <= 0); // UNKNOWN!
assert(x <= -1); //FAIL
assert(x > -1);
assert(x > 0); //UNKNOWN!
assert(x > 1); //FAIL
assert(x >= -1);
assert(x >= 0);
assert(x >= 1); //UNKNOWN!
assert(x >= 2); //FAIL
return 0;
}
| Add more assert statements to test case | Add more assert statements to test case
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
a8f44e52c36e7dee41d2e6a913e83e1d9bb9c1cc | sbr/folder_free.c | sbr/folder_free.c |
/*
* folder_free.c -- free a folder/message structure
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include <h/mh.h>
void
folder_free (struct msgs *mp)
{
size_t i;
bvector_t *v;
if (!mp)
return;
if (mp->foldpath)
free (mp->foldpath);
/* free the sequence names */
for (i = 0; i < svector_size (mp->msgattrs); i++)
free (svector_at (mp->msgattrs, i));
svector_free (mp->msgattrs);
for (i = 0, v = mp->msgstats; i < mp->num_msgstats; ++i, ++v) {
bvector_free (*v);
}
free (mp->msgstats);
/* Close/free the sequence file if it is open */
if (mp->seqhandle)
lkfclosedata (mp->seqhandle, mp->seqname);
if (mp->seqname)
free (mp->seqname);
bvector_free (mp->attrstats);
free (mp); /* free main folder structure */
}
|
/*
* folder_free.c -- free a folder/message structure
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include <h/mh.h>
#include <h/utils.h>
void
folder_free (struct msgs *mp)
{
size_t i;
bvector_t *v;
if (!mp)
return;
mh_xfree(mp->foldpath);
/* free the sequence names */
for (i = 0; i < svector_size (mp->msgattrs); i++)
free (svector_at (mp->msgattrs, i));
svector_free (mp->msgattrs);
for (i = 0, v = mp->msgstats; i < mp->num_msgstats; ++i, ++v) {
bvector_free (*v);
}
free (mp->msgstats);
/* Close/free the sequence file if it is open */
if (mp->seqhandle)
lkfclosedata (mp->seqhandle, mp->seqname);
mh_xfree(mp->seqname);
bvector_free (mp->attrstats);
free (mp); /* free main folder structure */
}
| Replace `if (p) free(p)' with `mh_xfree(p)'. | Replace `if (p) free(p)' with `mh_xfree(p)'.
| C | bsd-3-clause | mcr/nmh,mcr/nmh |
5055cdaf310f28beb0e84119dd4da1a6034cc0f2 | Programs/charset_grub.c | Programs/charset_grub.c | /*
* BRLTTY - A background process providing access to the console screen (when in
* text mode) for a blind person using a refreshable braille display.
*
* Copyright (C) 1995-2012 by The BRLTTY Developers.
*
* BRLTTY comes with ABSOLUTELY NO WARRANTY.
*
* This is free software, placed 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. Please see the file LICENSE-GPL for details.
*
* Web Page: http://mielke.cc/brltty/
*
* This software is maintained by Dave Mielke <[email protected]>.
*/
#include "prologue.h"
#include <locale.h>
#include <wchar.h>
#include "charset_internal.h"
wint_t
convertCharToWchar (char c) {
return (unsigned char)c;
}
int
convertWcharToChar (wchar_t wc) {
return wc & 0XFF;
}
const char *
getLocaleCharset (void) {
return nl_langinfo(CODESET);
}
int
registerCharacterSet (const char *charset) {
return grub_strcasecmp(charset, "UTF-8") == 0;
}
| Add the grub-specific charset functions. (dm) | Add the grub-specific charset functions. (dm)
git-svn-id: 30a5f035a20f1bc647618dbad7eea2a951b61b7c@6219 91a5dbb7-01b9-0310-9b5f-b28072856b6e
| C | lgpl-2.1 | brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty,brltty/brltty |
|
89eae96b2f739b5f0e7db4bee8bd517207d699c6 | src/include/port/qnx4.h | src/include/port/qnx4.h | #include <sys/types.h> /* for namser.h */
#include <arpa/nameser.h> /* for BYTE_ORDER */
#include <process.h> /* for execv */
#include <ioctl.h> /* for unix.h */
#include <unix.h>
#include <sys/select.h> /* for select */
#define HAS_TEST_AND_SET
#undef HAVE_GETRUSAGE
#define strncasecmp strnicmp
#ifndef NAN
#ifndef __nan_bytes
#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
#endif /* __nan_bytes */
extern unsigned char __nan[8];
#define NAN (*(const double *) __nan)
#endif /* NAN */
typedef u_short ushort;
typedef unsigned char slock_t;
extern int isnan(double dsrc);
extern double rint(double x);
extern char *crypt(const char *, const char *);
extern long random(void);
extern void srandom(unsigned int seed);
| #include <sys/types.h> /* for namser.h */
#include <arpa/nameser.h> /* for BYTE_ORDER */
#include <process.h> /* for execv */
#include <ioctl.h> /* for unix.h */
#include <unix.h>
#include <sys/select.h> /* for select */
#define HAS_TEST_AND_SET
#undef HAVE_GETRUSAGE
#define strncasecmp strnicmp
#ifndef NAN
#ifndef __nan_bytes
#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
#endif /* __nan_bytes */
extern unsigned char __nan[8];
#define NAN (*(const double *) __nan)
#endif /* NAN */
typedef u_short ushort;
typedef unsigned char slock_t;
extern int isnan(double dsrc);
extern char *crypt(const char *, const char *);
extern long random(void);
extern void srandom(unsigned int seed);
| Remove rint() prototype from QNX. | Remove rint() prototype from QNX.
| C | mpl-2.0 | postmind-net/postgres-xl,randomtask1155/gpdb,rvs/gpdb,janebeckman/gpdb,foyzur/gpdb,xuegang/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,Chibin/gpdb,zaksoup/gpdb,50wu/gpdb,snaga/postgres-xl,Quikling/gpdb,adam8157/gpdb,lintzc/gpdb,lisakowen/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,atris/gpdb,edespino/gpdb,pavanvd/postgres-xl,tangp3/gpdb,ashwinstar/gpdb,ahachete/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,yuanzhao/gpdb,xinzweb/gpdb,zeroae/postgres-xl,edespino/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,lpetrov-pivotal/gpdb,ahachete/gpdb,ovr/postgres-xl,edespino/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,lintzc/gpdb,rubikloud/gpdb,snaga/postgres-xl,foyzur/gpdb,royc1/gpdb,kmjungersen/PostgresXL,0x0FFF/gpdb,postmind-net/postgres-xl,ahachete/gpdb,atris/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,pavanvd/postgres-xl,edespino/gpdb,adam8157/gpdb,foyzur/gpdb,royc1/gpdb,janebeckman/gpdb,yuanzhao/gpdb,rubikloud/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,yazun/postgres-xl,ahachete/gpdb,0x0FFF/gpdb,janebeckman/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,xuegang/gpdb,tangp3/gpdb,kaknikhil/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,kaknikhil/gpdb,zaksoup/gpdb,oberstet/postgres-xl,randomtask1155/gpdb,janebeckman/gpdb,xinzweb/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,cjcjameson/gpdb,rvs/gpdb,rubikloud/gpdb,lintzc/gpdb,xuegang/gpdb,lintzc/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,tangp3/gpdb,yazun/postgres-xl,CraigHarris/gpdb,lintzc/gpdb,royc1/gpdb,snaga/postgres-xl,lisakowen/gpdb,Chibin/gpdb,foyzur/gpdb,cjcjameson/gpdb,techdragon/Postgres-XL,postmind-net/postgres-xl,lpetrov-pivotal/gpdb,yazun/postgres-xl,cjcjameson/gpdb,ahachete/gpdb,Postgres-XL/Postgres-XL,CraigHarris/gpdb,Chibin/gpdb,randomtask1155/gpdb,xinzweb/gpdb,zeroae/postgres-xl,lisakowen/gpdb,lpetrov-pivotal/gpdb,snaga/postgres-xl,adam8157/gpdb,xuegang/gpdb,tangp3/gpdb,kaknikhil/gpdb,arcivanov/postgres-xl,Chibin/gpdb,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,zaksoup/gpdb,atris/gpdb,tangp3/gpdb,zaksoup/gpdb,foyzur/gpdb,chrishajas/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,ovr/postgres-xl,edespino/gpdb,edespino/gpdb,Chibin/gpdb,Quikling/gpdb,foyzur/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,CraigHarris/gpdb,Quikling/gpdb,greenplum-db/gpdb,tangp3/gpdb,yazun/postgres-xl,ashwinstar/gpdb,techdragon/Postgres-XL,ovr/postgres-xl,lisakowen/gpdb,ahachete/gpdb,chrishajas/gpdb,zaksoup/gpdb,tpostgres-projects/tPostgres,atris/gpdb,rvs/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,lintzc/gpdb,janebeckman/gpdb,xuegang/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,Chibin/gpdb,0x0FFF/gpdb,lpetrov-pivotal/gpdb,xuegang/gpdb,tangp3/gpdb,edespino/gpdb,postmind-net/postgres-xl,Quikling/gpdb,edespino/gpdb,janebeckman/gpdb,randomtask1155/gpdb,lisakowen/gpdb,ovr/postgres-xl,kaknikhil/gpdb,Quikling/gpdb,xuegang/gpdb,randomtask1155/gpdb,xuegang/gpdb,cjcjameson/gpdb,atris/gpdb,royc1/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,yuanzhao/gpdb,chrishajas/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,yazun/postgres-xl,janebeckman/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,xinzweb/gpdb,chrishajas/gpdb,xinzweb/gpdb,lisakowen/gpdb,Chibin/gpdb,tangp3/gpdb,cjcjameson/gpdb,foyzur/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,oberstet/postgres-xl,lintzc/gpdb,techdragon/Postgres-XL,postmind-net/postgres-xl,xuegang/gpdb,ovr/postgres-xl,rvs/gpdb,0x0FFF/gpdb,rubikloud/gpdb,lisakowen/gpdb,rubikloud/gpdb,rubikloud/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,janebeckman/gpdb,50wu/gpdb,oberstet/postgres-xl,kaknikhil/gpdb,royc1/gpdb,chrishajas/gpdb,rubikloud/gpdb,randomtask1155/gpdb,janebeckman/gpdb,xinzweb/gpdb,ashwinstar/gpdb,atris/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,50wu/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,lintzc/gpdb,Chibin/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,adam8157/gpdb,atris/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,atris/gpdb,CraigHarris/gpdb,lintzc/gpdb,zaksoup/gpdb,Quikling/gpdb,0x0FFF/gpdb,royc1/gpdb,edespino/gpdb,yuanzhao/gpdb,edespino/gpdb,pavanvd/postgres-xl,rubikloud/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,Quikling/gpdb,Quikling/gpdb,randomtask1155/gpdb,50wu/gpdb,jmcatamney/gpdb,snaga/postgres-xl,rvs/gpdb,tpostgres-projects/tPostgres,greenplum-db/gpdb,rvs/gpdb,ahachete/gpdb,zaksoup/gpdb,50wu/gpdb,zaksoup/gpdb,yuanzhao/gpdb,zeroae/postgres-xl,arcivanov/postgres-xl,foyzur/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,adam8157/gpdb,techdragon/Postgres-XL,50wu/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,Quikling/gpdb,kaknikhil/gpdb,janebeckman/gpdb,jmcatamney/gpdb,rvs/gpdb,ahachete/gpdb,yuanzhao/gpdb,chrishajas/gpdb,adam8157/gpdb,chrishajas/gpdb,Quikling/gpdb,ashwinstar/gpdb,cjcjameson/gpdb,chrishajas/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,CraigHarris/gpdb,zeroae/postgres-xl,adam8157/gpdb,yuanzhao/gpdb,oberstet/postgres-xl |
80b30e1bfdef0904945b67b3add42458da72dcaa | packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c | packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c | int main(int argc, char **argv) {
lldb_enable_attach();
int to_complete = 0;
return to_complete;
}
| int main(int argc, char **argv) {
int to_complete = 0;
return to_complete;
}
| Remove unnecessary lldb_enable_attach in TestMultilineCompletion | [lldb][NFC] Remove unnecessary lldb_enable_attach in TestMultilineCompletion
We don't actually need to call this for this test.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@370623 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb |
4f4ada85e23ba03759aaf617c994bf2efc7e91c4 | net/proxy/proxy_resolver_mac.h | net/proxy/proxy_resolver_mac.h | // Copyright (c) 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 NET_PROXY_PROXY_RESOLVER_MAC_H_
#define NET_PROXY_PROXY_RESOLVER_MAC_H_
#pragma once
#include <string>
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
#include "net/proxy/proxy_resolver.h"
namespace net {
// Implementation of ProxyResolver that uses the Mac CFProxySupport to implement
// proxies.
class ProxyResolverMac : public ProxyResolver {
public:
ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {}
// ProxyResolver methods:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
CompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log);
virtual void CancelRequest(RequestHandle request) {
NOTREACHED();
}
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
CompletionCallback* /*callback*/) {
script_data_ = script_data_;
return OK;
}
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
};
} // namespace net
#endif // NET_PROXY_PROXY_RESOLVER_MAC_H_
| // Copyright (c) 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 NET_PROXY_PROXY_RESOLVER_MAC_H_
#define NET_PROXY_PROXY_RESOLVER_MAC_H_
#pragma once
#include <string>
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
#include "net/proxy/proxy_resolver.h"
namespace net {
// Implementation of ProxyResolver that uses the Mac CFProxySupport to implement
// proxies.
class ProxyResolverMac : public ProxyResolver {
public:
ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {}
// ProxyResolver methods:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
CompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log);
virtual void CancelRequest(RequestHandle request) {
NOTREACHED();
}
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
CompletionCallback* /*callback*/) {
script_data_ = script_data;
return OK;
}
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
};
} // namespace net
#endif // NET_PROXY_PROXY_RESOLVER_MAC_H_
| Fix a typo, that could cause a crash on mac. | Fix a typo, that could cause a crash on mac.
BUG=50717
TBR=rvargas
TEST=Set system proxy settings to use a custom PAC script, then launch TestShell.app -- should not crash.
Review URL: http://codereview.chromium.org/3023030
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@54279 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | nacl-webkit/chrome_deps,zcbenz/cefode-chromium,axinging/chromium-crosswalk,robclark/chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Just-D/chromium-1,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,markYoungH/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,keishi/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,Chilledheart/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,dushu1203/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,keishi/chromium,dednal/chromium.src,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,patrickm/chromium.src,ltilve/chromium,dednal/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,nacl-webkit/chrome_deps,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,zcbenz/cefode-chromium,robclark/chromium,rogerwang/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,M4sse/chromium.src,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,littlstar/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,ltilve/chromium,jaruba/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,M4sse/chromium.src,ondra-novak/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,robclark/chromium,jaruba/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,dushu1203/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,keishi/chromium,Chilledheart/chromium,robclark/chromium,robclark/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,M4sse/chromium.src,ltilve/chromium,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,ondra-novak/chromium.src,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,rogerwang/chromium,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,rogerwang/chromium,dednal/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,Just-D/chromium-1,fujunwei/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,keishi/chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,rogerwang/chromium,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,anirudhSK/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,fujunwei/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,anirudhSK/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,ltilve/chromium,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,anirudhSK/chromium,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,patrickm/chromium.src,M4sse/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,rogerwang/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,dushu1203/chromium.src,dednal/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,robclark/chromium,Jonekee/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,keishi/chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,ChromiumWebApps/chromium,rogerwang/chromium,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,ltilve/chromium,nacl-webkit/chrome_deps,hujiajie/pa-chromium,keishi/chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,rogerwang/chromium,littlstar/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,robclark/chromium |
9cc3c498b25f30ebe2da5b9d59df7a87ef7bc3d2 | src/libstddjb/absolutepath.c | src/libstddjb/absolutepath.c | /* ISC license. */
/* MT-unsafe */
#include <skalibs/stralloc.h>
#include <skalibs/skamisc.h>
#include <skalibs/djbunix.h>
int sarealpath (stralloc *sa, char const *path)
{
return sarealpath_tmp(sa, path, &satmp) ;
}
| /* ISC license. */
/* MT-unsafe */
#include <skalibs/stralloc.h>
#include <skalibs/skamisc.h>
#include <skalibs/djbunix.h>
BUG
int sarealpath (stralloc *sa, char const *path)
{
return sarealpath_tmp(sa, path, &satmp) ;
}
| Make build crash early on purpose (to test test suite...) | Make build crash early on purpose (to test test suite...)
| C | isc | skarnet/skalibs,skarnet/skalibs |
a9befa9f89a002dc2fa7696a44936055a98de413 | test_utils/mock_queue.h | test_utils/mock_queue.h | #ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include <stdint.h>
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const T &item));
MOCK_METHOD1_T(EnqueueBlocking, bool(const T &item));
MOCK_METHOD1_T(DequeueNext, bool(T *item));
MOCK_METHOD1_T(DequeueNextBlocking, void(T *item));
MOCK_CONST_METHOD0_T(GetOffset, int());
MOCK_METHOD0_T(FreeQueue, void());
MOCK_CONST_METHOD0_T(GetNumConsumers, uint32_t());
};
} // namespace testing
} // namespace tachyon
#endif // TACHYON_TEST_UTILS_MOCK_QUEUE_H_
| #ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include <stdint.h>
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const T &item));
MOCK_METHOD1_T(EnqueueBlocking, bool(const T &item));
MOCK_METHOD1_T(DequeueNext, bool(T *item));
MOCK_METHOD1_T(DequeueNextBlocking, void(T *item));
MOCK_METHOD1_T(PeekNext, bool(T *item));
MOCK_METHOD1_T(PeekNextBlocking, void(T *item));
MOCK_CONST_METHOD0_T(GetOffset, int());
MOCK_METHOD0_T(FreeQueue, void());
MOCK_CONST_METHOD0_T(GetNumConsumers, uint32_t());
};
} // namespace testing
} // namespace tachyon
#endif // TACHYON_TEST_UTILS_MOCK_QUEUE_H_
| Add peek methods to mock queue. | Add peek methods to mock queue.
| C | mit | djpetti/gaia,djpetti/gaia,djpetti/gaia |
388d30f266630975e30de38b987038859207d3bc | tests/glibc_syscall_wrappers/test_stat.c | tests/glibc_syscall_wrappers/test_stat.c | /*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can
* be found in the LICENSE file.
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <sys/stat.h>
#pragma GCC diagnostic ignored "-Wnonnull"
#define KNOWN_FILE_SIZE 30
int main(int argc, char** argv) {
struct stat st;
struct stat64 st64;
if (2 != argc) {
printf("Usage: sel_ldr test_stat.nexe test_stat_data\n");
return 1;
}
st.st_size = 0;
st64.st_size = 0;
assert(-1 == stat(NULL, &st));
assert(EFAULT == errno);
assert(-1 == stat(".", NULL));
assert(EFAULT == errno);
errno = 0;
assert(0 == stat(argv[1], &st));
assert(0 == errno);
assert(KNOWN_FILE_SIZE == st.st_size);
assert(-1 == stat64(NULL, &st64));
assert(EFAULT == errno);
assert(-1 == stat64(".", NULL));
assert(EFAULT == errno);
errno = 0;
assert(0 == stat64(argv[1], &st64));
assert(0 == errno);
assert(KNOWN_FILE_SIZE == st64.st_size);
return 0;
}
| /*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can
* be found in the LICENSE file.
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <sys/stat.h>
#pragma GCC diagnostic ignored "-Wnonnull"
#define KNOWN_FILE_SIZE 30
int main(int argc, char** argv) {
struct stat st;
if (2 != argc) {
printf("Usage: sel_ldr test_stat.nexe test_stat_data\n");
return 1;
}
st.st_size = 0;
assert(-1 == stat(NULL, &st));
assert(EFAULT == errno);
assert(-1 == stat(".", NULL));
assert(EFAULT == errno);
errno = 0;
assert(0 == stat(argv[1], &st));
assert(0 == errno);
assert(KNOWN_FILE_SIZE == st.st_size);
return 0;
}
| Remove test for obsolete function stat64. | Remove test for obsolete function stat64.
BUG=
TEST=run_stat_test
Review URL: http://codereview.chromium.org/6300006
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@4152 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
| C | bsd-3-clause | sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client |
06039e96e1098f3059e34ae836e8c66b55384402 | include/mart-common/experimental/tmp.h | include/mart-common/experimental/tmp.h | #ifndef LIB_MART_COMMON_GUARD_TMP_H
#define LIB_MART_COMMON_GUARD_TMP_H
/**
* tmp.h (mart-common)
*
* Copyright (C) 2015-2017: Michael Balszun <[email protected]>
*
* This software may be modified and distributed under the terms
* of the MIT license. See either the LICENSE file in the library's root
* directory or http://opensource.org/licenses/MIT for details.
*
* @author: Michael Balszun <[email protected]>
* @brief: template meta programming helpers
*
*/
/* ######## INCLUDES ######### */
/* Standard Library Includes */
/* Proprietary Library Includes */
#include "../cpp_std/type_traits.h"
#include "../cpp_std/utility.h"
/* Project Includes */
/* ~~~~~~~~ INCLUDES ~~~~~~~~~ */
namespace mart {
namespace tmp {
template<class T, std::size_t N>
struct c_array {
const T t[N];
constexpr T operator[](size_t i) const {
return t[i];
}
static constexpr size_t size() { return N; }
};
template<class T, T ... Is, template<class, T...> class sequence>
constexpr c_array<T, sizeof...(Is)> to_carray(sequence<T, Is...>) {
return { {Is...}};
}
// watch out: on gcc, you can't use parameters itself to generate the returntype, but have to create a new value of the type
namespace detail_cartesian_value_product {
template<
template<class ... > class Comb,
class V1, class V2,
template< V1, V2 > class T,
class List1,
class List2,
std::size_t ... Is
>
auto impl(List1, List2, mart::index_sequence<Is...>)
-> Comb < T <
to_carray(List1{})[Is / List2::size()],
to_carray(List2{})[Is % List2::size()]
> ...
>;
}
template<
template<class ... > class Comb,
class V1, class V2,
template< V1, V2 > class T,
class List1,
class List2
>
auto cartesian_value_product(List1 l1, List2 l2 )
-> decltype(detail_cartesian_value_product::impl<Comb,V1,V2,T>(l1, l2, mart::make_index_sequence<List1::size()*List2::size()>{}));
}
}
#endif
| Add cartesian_value_product template meta function | [Merge] Add cartesian_value_product template meta function
| C | mit | tum-ei-rcs/mart-common,tum-ei-rcs/mart-common |
|
28b5c302b8d65d935fb833d5a8a583866f2e5c60 | secure-notes-exporter/main.c | secure-notes-exporter/main.c | //
// main.c
// secure-notes-exporter
//
// Created by Greg Hurrell on 5/9/14.
// Copyright (c) 2014 Greg Hurrell. All rights reserved.
//
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
int main(int argc, const char * argv[])
{
// create query
CFStringRef keys[] = { kSecReturnAttributes, kSecMatchLimit, kSecClass };
CFTypeRef values[] = { kCFBooleanTrue, kSecMatchLimitAll, kSecClassGenericPassword };
CFDictionaryRef query = CFDictionaryCreate(
kCFAllocatorDefault,
(const void **)keys,
(const void **)values,
3,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks
);
// get search results
CFArrayRef items = nil;
OSStatus status = SecItemCopyMatching(query, (CFTypeRef *)&items);
CFRelease(query);
assert(status == 0);
CFShow(items);
CFRelease(items);
return 0;
}
| //
// main.c
// secure-notes-exporter
//
// Created by Greg Hurrell on 5/9/14.
// Copyright (c) 2014 Greg Hurrell. All rights reserved.
//
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
void printItem(const void *value, void *context) {
CFDictionaryRef dictionary = value;
CFNumberRef itemType = CFDictionaryGetValue(dictionary, kSecAttrType);
CFNumberRef noteType = (CFNumberRef)context;
if (!itemType || !CFEqual(itemType, noteType)) {
// not a note
return;
}
CFShow(noteType);
}
int main(int argc, const char * argv[])
{
// create query
CFStringRef keys[] = { kSecReturnAttributes, kSecMatchLimit, kSecClass };
CFTypeRef values[] = { kCFBooleanTrue, kSecMatchLimitAll, kSecClassGenericPassword };
CFDictionaryRef query = CFDictionaryCreate(
kCFAllocatorDefault,
(const void **)keys,
(const void **)values,
3,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks
);
// get search results
CFArrayRef items = nil;
OSStatus status = SecItemCopyMatching(query, (CFTypeRef *)&items);
CFRelease(query);
assert(status == 0);
// iterate over "Secure Note" items
CFRange range = CFRangeMake(0, CFArrayGetCount(items));
SInt32 note = 'note';
CFNumberRef noteRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, ¬e);
CFArrayApplyFunction(items, range, printItem, (void *)noteRef);
CFRelease(noteRef);
CFRelease(items);
return 0;
}
| Print something about "Secure Notes" while iterating | Print something about "Secure Notes" while iterating
I couldn't find a constant for 'note' and there are probably more
idiomatic ways to do this, but this is what I have.
Signed-off-by: Greg Hurrell <[email protected]>
| C | bsd-3-clause | wincent/secure-notes-exporter |
ce1a1091e2ca7826ec17d08d756105eb6cf654f4 | include/llvm/Transforms/Utils/Mem2Reg.h | include/llvm/Transforms/Utils/Mem2Reg.h | //===- Mem2Reg.h - The -mem2reg pass, a wrapper around the Utils lib ------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass is a simple pass wrapper around the PromoteMemToReg function call
// exposed by the Utils library.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_MEM2REG_H
#define LLVM_TRANSFORMS_UTILS_MEM2REG_H
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
class PromotePass : public PassInfoMixin<PromotePass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
}
#endif // LLVM_TRANSFORMS_UTILS_MEM2REG_H | //===- Mem2Reg.h - The -mem2reg pass, a wrapper around the Utils lib ------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass is a simple pass wrapper around the PromoteMemToReg function call
// exposed by the Utils library.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_MEM2REG_H
#define LLVM_TRANSFORMS_UTILS_MEM2REG_H
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
class PromotePass : public PassInfoMixin<PromotePass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
}
#endif // LLVM_TRANSFORMS_UTILS_MEM2REG_H
| Add EOL at EOF to appease source utils like unifdef | Add EOL at EOF to appease source utils like unifdef
<rdar://problem/32511256>
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@305225 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm |
7105c5953e128f3745bca196ddbc30ca7c3229fe | tests/api/test-bug-is-primitive-invalid-index-gh337.c | tests/api/test-bug-is-primitive-invalid-index-gh337.c | /*
* Bug in duk_is_primitive() prior to Duktape 1.3.0: returns 1 for invalid
* index.
*
* https://github.com/svaarala/duktape/issues/337
*/
/*===
*** test_1 (duk_safe_call)
0
final top: 0
==> rc=0, result='undefined'
*** test_2 (duk_safe_call)
0
final top: 0
==> rc=0, result='undefined'
*** test_3 (duk_safe_call)
1
0
final top: 1
==> rc=0, result='undefined'
===*/
static duk_ret_t test_1(duk_context *ctx) {
printf("%ld\n", (long) duk_is_primitive(ctx, -1));
printf("final top: %ld\n", (long) duk_get_top(ctx));
return 0;
}
static duk_ret_t test_2(duk_context *ctx) {
printf("%ld\n", (long) duk_is_primitive(ctx, DUK_INVALID_INDEX));
printf("final top: %ld\n", (long) duk_get_top(ctx));
return 0;
}
static duk_ret_t test_3(duk_context *ctx) {
duk_push_null(ctx);
printf("%ld\n", (long) duk_is_primitive(ctx, 0)); /* valid */
printf("%ld\n", (long) duk_is_primitive(ctx, 1)); /* invalid */
printf("final top: %ld\n", (long) duk_get_top(ctx));
return 0;
}
void test(duk_context *ctx) {
TEST_SAFE_CALL(test_1);
TEST_SAFE_CALL(test_2);
TEST_SAFE_CALL(test_3);
}
| Add bug testcase for GH-337 | Add bug testcase for GH-337
| C | mit | markand/duktape,jmptrader/duktape,nivertech/duktape,nivertech/duktape,jmptrader/duktape,nivertech/duktape,markand/duktape,chenyaqiuqiu/duktape,harold-b/duktape,svaarala/duktape,chenyaqiuqiu/duktape,tassmjau/duktape,svaarala/duktape,nivertech/duktape,nivertech/duktape,chenyaqiuqiu/duktape,chenyaqiuqiu/duktape,jmptrader/duktape,markand/duktape,zeropool/duktape,jmptrader/duktape,nivertech/duktape,markand/duktape,zeropool/duktape,zeropool/duktape,tassmjau/duktape,markand/duktape,zeropool/duktape,nivertech/duktape,svaarala/duktape,jmptrader/duktape,markand/duktape,chenyaqiuqiu/duktape,chenyaqiuqiu/duktape,tassmjau/duktape,chenyaqiuqiu/duktape,chenyaqiuqiu/duktape,tassmjau/duktape,jmptrader/duktape,svaarala/duktape,harold-b/duktape,nivertech/duktape,tassmjau/duktape,zeropool/duktape,svaarala/duktape,svaarala/duktape,markand/duktape,jmptrader/duktape,harold-b/duktape,zeropool/duktape,markand/duktape,chenyaqiuqiu/duktape,jmptrader/duktape,harold-b/duktape,chenyaqiuqiu/duktape,harold-b/duktape,zeropool/duktape,harold-b/duktape,markand/duktape,tassmjau/duktape,svaarala/duktape,markand/duktape,svaarala/duktape,nivertech/duktape,zeropool/duktape,tassmjau/duktape,zeropool/duktape,zeropool/duktape,jmptrader/duktape,svaarala/duktape,harold-b/duktape,harold-b/duktape,tassmjau/duktape,harold-b/duktape,nivertech/duktape,tassmjau/duktape,jmptrader/duktape,harold-b/duktape,tassmjau/duktape |
|
20a48bba8b21203919b25888f3ad75d27a2bbab0 | tests/regression/02-base/86-spurious.c | tests/regression/02-base/86-spurious.c | #include<pthread.h>
#include<assert.h>
int counter = 0;
pthread_mutex_t lock1;
void* producer(void* param) {
pthread_mutex_lock(&lock1);
counter = 0;
pthread_mutex_unlock(&lock1);
}
void* consumer(void* param) {
pthread_mutex_lock(&lock1);
int bla = counter >= 0;
// This should not produce a warning about the privatization being unsound
assert(counter >= 0);
pthread_mutex_unlock(&lock1);
}
int main() {
pthread_t thread;
pthread_t thread2;
pthread_create(&thread,NULL,producer,NULL);
pthread_create(&thread2,NULL,consumer,NULL);
}
| //PARAM: --disable warn.assert
#include<pthread.h>
#include<assert.h>
int counter = 0;
pthread_mutex_t lock1;
void* producer(void* param) {
pthread_mutex_lock(&lock1);
counter = 0;
pthread_mutex_unlock(&lock1);
}
void* consumer(void* param) {
pthread_mutex_lock(&lock1);
int bla = counter >= 0;
// This should not produce a warning about the privatization being unsound
assert(counter >= 0); //NOWARN
pthread_mutex_unlock(&lock1);
}
int main() {
pthread_t thread;
pthread_t thread2;
pthread_create(&thread,NULL,producer,NULL);
pthread_create(&thread2,NULL,consumer,NULL);
}
| Modify test 02/86 so it fails if spurious warning is produced | Modify test 02/86 so it fails if spurious warning is produced
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
87b2aa5ed903e8121969ae0f8dead4a7aaa88ea1 | boards/nrf52832-mdk/include/periph_conf.h | boards/nrf52832-mdk/include/periph_conf.h | /*
* Copyright (C) 2019 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_nrf52832-mdk
* @{
*
* @file
* @brief Peripheral configuration for the nRF52832-MDK
*
* @author Alexandre Abadie <[email protected]>
*
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include "periph_cpu.h"
#include "cfg_clock_32_1.h"
#include "cfg_i2c_default.h"
#include "cfg_rtt_default.h"
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name UART configuration
* @{
*/
#define UART_NUMOF (1U)
#define UART_PIN_RX GPIO_PIN(0,19)
#define UART_PIN_TX GPIO_PIN(0,20)
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
| /*
* Copyright (C) 2019 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_nrf52832-mdk
* @{
*
* @file
* @brief Peripheral configuration for the nRF52832-MDK
*
* @author Alexandre Abadie <[email protected]>
*
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include "periph_cpu.h"
#include "cfg_clock_32_1.h"
#include "cfg_i2c_default.h"
#include "cfg_rtt_default.h"
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name UART configuration
* @{
*/
#define UART_NUMOF (1U)
#define UART_PIN_RX GPIO_PIN(0,19)
#define UART_PIN_TX GPIO_PIN(0,20)
/** @} */
/**
* @brief Enable the internal DC/DC converter
*/
#define NRF5X_ENABLE_DCDC
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
| Enable the nRF52 built-in DC/DC converter | nrf52832-mdk: Enable the nRF52 built-in DC/DC converter
| C | lgpl-2.1 | OlegHahm/RIOT,RIOT-OS/RIOT,yogo1212/RIOT,OTAkeys/RIOT,ant9000/RIOT,authmillenon/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,ant9000/RIOT,kYc0o/RIOT,yogo1212/RIOT,basilfx/RIOT,authmillenon/RIOT,OTAkeys/RIOT,OlegHahm/RIOT,authmillenon/RIOT,yogo1212/RIOT,OTAkeys/RIOT,basilfx/RIOT,basilfx/RIOT,jasonatran/RIOT,miri64/RIOT,yogo1212/RIOT,miri64/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,OlegHahm/RIOT,kaspar030/RIOT,basilfx/RIOT,jasonatran/RIOT,ant9000/RIOT,RIOT-OS/RIOT,authmillenon/RIOT,RIOT-OS/RIOT,jasonatran/RIOT,miri64/RIOT,authmillenon/RIOT,yogo1212/RIOT,kYc0o/RIOT,kYc0o/RIOT,authmillenon/RIOT,jasonatran/RIOT,ant9000/RIOT,ant9000/RIOT,kaspar030/RIOT,kYc0o/RIOT,basilfx/RIOT,miri64/RIOT,kYc0o/RIOT,OlegHahm/RIOT,miri64/RIOT,OTAkeys/RIOT,OlegHahm/RIOT,kaspar030/RIOT,yogo1212/RIOT,OTAkeys/RIOT |
27291e96b8b5ac7472c782842a01fca8ac59b6b6 | src/vast/concept/parseable/vast/http.h | src/vast/concept/parseable/vast/http.h | #ifndef VAST_CONCEPT_PARSEABLE_VAST_HTTP_H
#define VAST_CONCEPT_PARSEABLE_VAST_HTTP_H
#include <algorithm>
#include <cctype>
#include <string>
#include "vast/concept/parseable/core.h"
#include "vast/concept/parseable/string.h"
#include "vast/concept/parseable/numeric/real.h"
#include "vast/concept/parseable/vast/uri.h"
#include "vast/http.h"
#include "vast/uri.h"
#include "vast/util/string.h"
namespace vast {
struct http_header_parser : parser<http_header_parser> {
using attribute = http::header;
static auto make() {
auto to_upper = [](std::string name) {
std::transform(name.begin(), name.end(), name.begin(), ::toupper);
return name;
};
using namespace parsers;
auto name = +(printable - ':') ->* to_upper;
auto value = +printable;
auto ws = *' '_p;
return name >> ':' >> ws >> value;
}
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, unused_type) const {
static auto p = make();
return p.parse(f, l, unused);
}
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, http::header& a) const {
static auto p = make();
a.name.clear();
a.value.clear();
auto t = std::tie(a.name, a.value);
return p.parse(f, l, t);
}
};
template <>
struct parser_registry<http::header> {
using type = http_header_parser;
};
struct http_request_parser : parser<http_request_parser> {
using attribute = http::request;
static auto make() {
using namespace parsers;
auto crlf = "\r\n";
auto word = +(printable - ' ');
auto method = word;
auto uri = make_parser<vast::uri>();
auto proto = +alpha;
auto version = parsers::real;
auto header = make_parser<http::header>() >> crlf;
auto body = *printable;
auto request
= method >> ' ' >> uri >> ' ' >> proto >> '/' >> version >> crlf
>> *header >> crlf
>> body;
;
return request;
}
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, unused_type) const {
static auto p = make();
return p.parse(f, l, unused);
}
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, http::request& a) const {
static auto p = make();
auto t =
std::tie(a.method, a.uri, a.protocol, a.version, a.headers, a.body);
return p.parse(f, l, t);
}
};
template <>
struct parser_registry<http::request> {
using type = http_request_parser;
};
} // namespace vast
#endif
| Add HTTP parsers which got lost during last merge | Add HTTP parsers which got lost during last merge
| C | bsd-3-clause | mavam/vast,vast-io/vast,vast-io/vast,mavam/vast,vast-io/vast,pmos69/vast,mavam/vast,vast-io/vast,pmos69/vast,pmos69/vast,mavam/vast,pmos69/vast,vast-io/vast |
|
e92636f39795ce15a5f11660803d0d0c9394ec23 | src/t3/Portability.h | src/t3/Portability.h | /****************************************************************************
* Simple definitions to aid platform portability
* Author: Bill Forster
* License: MIT license. Full text of license is in associated file LICENSE
* Copyright 2010-2014, Bill Forster <billforsternz at gmail dot com>
****************************************************************************/
#ifndef PORTABILITY_H
#define PORTABILITY_H
#include <stdint.h> // int32_t etc.
// Windows
#ifdef WIN32
#include <Windows.h>
#include <string.h>
#define strcmpi _strcmpi
#define THC_WINDOWS // Triple Happy Chess, Windows specific code
#define WINDOWS_FIX_LATER // Windows only fix later on Mac
// Mac
#else
unsigned long GetTickCount();
typedef unsigned char byte;
int strcmpi( const char *s, const char *t ); // return 0 if case insensitive match
#define THC_MAC // Triple Happy Chess, Mac specific code
#define MAC_FIX_LATER // Things not yet done on the Mac
#endif
//#define DebugPrintfInner printf //temp
#endif // PORTABILITY_H
| /****************************************************************************
* Simple definitions to aid platform portability
* Author: Bill Forster
* License: MIT license. Full text of license is in associated file LICENSE
* Copyright 2010-2014, Bill Forster <billforsternz at gmail dot com>
****************************************************************************/
#ifndef PORTABILITY_H
#define PORTABILITY_H
#include <stdint.h> // int32_t etc.
//CHOOSE ONE:
//#define TARRASCH_UNIX 1
//#define TARRASCH_WINDOWS 1
//#define TARRASCH_OSX 1
#ifdef WIN32
#define TARRASCH_WINDOWS 1
#else
#define TARRASCH_UNIX 1
#endif
#include <stdint.h> // int32_t etc.
#if TARRASCH_UNIX
#include <string.h>
typedef uint8_t byte;
#define THC_MAC
#define MAC_FIX_LATER
unsigned long GetTickCount();
int strcmpi(const char *s, const char *t);
#elif TARRASCH_WINDOWS
#include <Windows.h>
#include <string.h>
#define strcmpi _strcmpi
#define THC_WINDOWS // Triple Happy Chess, Windows specific code
#define WINDOWS_FIX_LATER // Windows only fix later on Mac
#elif TARRASCH_OSX
unsigned long GetTickCount();
typedef unsigned char byte;
int strcmpi( const char *s, const char *t ); // return 0 if case insensitive match
#define THC_MAC // Triple Happy Chess, Mac specific code
#define MAC_FIX_LATER // Things not yet done on the Mac
#else
#error Unknown Platform!
#endif
//#define DebugPrintfInner printf //temp
#endif // PORTABILITY_H
| Change over to KostaKow's version of this | Change over to KostaKow's version of this
| C | mit | billforsternz/tarrasch-chess-gui,billforsternz/tarrasch-chess-gui,billforsternz/tarrasch-chess-gui,billforsternz/tarrasch-chess-gui |
a0bd5722877d7144bbac6ab613ef3d9ea89e39cd | src/polling/polling_thread.h | src/polling/polling_thread.h | #ifndef POLLING_THREAD_H
#define POLLING_THREAD_H
#include <cstdint>
#include <chrono>
#include <map>
#include <uv.h>
#include "../thread.h"
#include "../status.h"
#include "../result.h"
#include "polled_root.h"
const std::chrono::milliseconds DEFAULT_POLL_INTERVAL = std::chrono::milliseconds(500);
const uint_fast64_t DEFAULT_POLL_THROTTLE = 1000;
class PollingThread : public Thread {
public:
PollingThread(uv_async_t *main_callback);
~PollingThread();
void collect_status(Status &status) override;
private:
Result<> body() override;
Result<> cycle();
Result<OfflineCommandOutcome> handle_offline_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_add_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_remove_command(const CommandPayload *payload) override;
std::chrono::milliseconds poll_interval;
uint_fast64_t poll_throttle;
std::map<ChannelID, PolledRoot> roots;
};
#endif
| #ifndef POLLING_THREAD_H
#define POLLING_THREAD_H
#include <cstdint>
#include <chrono>
#include <map>
#include <uv.h>
#include "../thread.h"
#include "../status.h"
#include "../result.h"
#include "polled_root.h"
const std::chrono::milliseconds DEFAULT_POLL_INTERVAL = std::chrono::milliseconds(100);
const uint_fast64_t DEFAULT_POLL_THROTTLE = 1000;
class PollingThread : public Thread {
public:
PollingThread(uv_async_t *main_callback);
~PollingThread();
void collect_status(Status &status) override;
private:
Result<> body() override;
Result<> cycle();
Result<OfflineCommandOutcome> handle_offline_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_add_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_remove_command(const CommandPayload *payload) override;
std::chrono::milliseconds poll_interval;
uint_fast64_t poll_throttle;
std::map<ChannelID, PolledRoot> roots;
};
#endif
| Drop the default polling interval to 100ms | Drop the default polling interval to 100ms
| C | mit | atom/watcher,atom/watcher,atom/watcher,atom/watcher,atom/watcher |
9447fa811b7ac3429f9fdbc8a34a7b6ac6dccca3 | core-set.h | core-set.h | #ifndef __CORE_SET__
#define __CORE_SET__
#include <set>
class CoreSet : public std::set<int>
{
public:
int getPrevCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr--;
// This was the first element, start over
if (curr == this->end())
curr--;
return *curr;
}
int getNextCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr++;
// This was the last element, start over
if (curr == this->end())
curr = this->begin();
return *curr;
}
};
#endif
| #ifndef __CORE_SET__
#define __CORE_SET__
#include "assert.h"
#include <set>
class CoreSet : public std::set<int>
{
public:
int getPrevCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr--;
// This was the first element, start over
if (curr == this->end())
curr--;
return *curr;
}
int getNextCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr++;
// This was the last element, start over
if (curr == this->end())
curr = this->begin();
return *curr;
}
};
#endif
| Add a missing header include for assert.h | Add a missing header include for assert.h
| C | bsd-3-clause | s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim |
4ede882f2c2b3a2409bddbbd6cee9bbbfdead905 | Lumina-DE/src/lumina-desktop/Globals.h | Lumina-DE/src/lumina-desktop/Globals.h | //===========================================
// Lumina-DE source code
// Copyright (c) 2012, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
class SYSTEM{
public:
//Current Username
static QString user(){ return QString(getlogin()); }
//Current Hostname
static QString hostname(){
char name[50];
gethostname(name,sizeof(name));
return QString(name);
}
//Shutdown the system
static void shutdown(){ system("(shutdown -p now) &"); }
//Restart the system
static void restart(){ system("(shutdown -r now) &"); }
};
/*
class LUMINA{
public:
static QIcon getIcon(QString iconname);
static QIcon getFileIcon(QString filename);
};
*/
#endif
| //===========================================
// Lumina-DE source code
// Copyright (c) 2012, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
#include <unistd.h>
class SYSTEM{
public:
//Current Username
static QString user(){ return QString(getlogin()); }
//Current Hostname
static QString hostname(){
char name[50];
gethostname(name,sizeof(name));
return QString(name);
}
//Shutdown the system
static void shutdown(){ system("(shutdown -p now) &"); }
//Restart the system
static void restart(){ system("(shutdown -r now) &"); }
};
/*
class LUMINA{
public:
static QIcon getIcon(QString iconname);
static QIcon getFileIcon(QString filename);
};
*/
#endif
| Fix up the Lumina compilation on 10.x | Fix up the Lumina compilation on 10.x
| C | bsd-2-clause | pcbsd/external-projects,pcbsd/external-projects,pcbsd/external-projects,pcbsd/external-projects |
441be63dc78aa784d22bdb6d07b8d3c35617df04 | test/small1/wchar1_freebsd.c | test/small1/wchar1_freebsd.c | # 1 "wchar1.c"
# 1 "testharness.h" 1
extern int printf(const char *, ...);
extern void exit(int);
# 1 "wchar1.c" 2
# 1 "/usr/include/stddef.h" 1 3
# 1 "/usr/include/machine/ansi.h" 1 3
typedef int __attribute__((__mode__(__DI__))) __int64_t;
typedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t;
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef int __intptr_t;
typedef unsigned int __uintptr_t;
typedef union {
char __mbstate8[128];
__int64_t _mbstateL;
} __mbstate_t;
# 41 "/usr/include/stddef.h" 2 3
typedef int ptrdiff_t;
typedef int rune_t;
typedef unsigned int size_t;
typedef int wchar_t;
# 2 "wchar1.c" 2
int main() {
wchar_t *wbase = L"Hello" L", world";
char * w = (char *)wbase;
char * s = "Hello" ", world";
int i;
for (i=0; i < 10; i++) {
if (w[i * sizeof(wchar_t)] != s[i]) {
{ printf("Error %d\n", 1 ); exit( 1 ); } ;
}
if (w[i * sizeof(wchar_t)+ 1] != 0) {
{ printf("Error %d\n", 2 ); exit( 2 ); } ;
}
}
{ printf("Success\n"); exit(0); } ;
}
| Test reported by Axel, our FreeBSD user. This file is the postprocessed result from a FreeBSD machine. This command fails: | Test reported by Axel, our FreeBSD user. This file is the postprocessed
result from a FreeBSD machine. This command fails:
../bin/cilly small1/wchar1_freebsd.c
IGNORE
| C | bsd-3-clause | samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c |
|
d09f9e3fd3ca978e0a20e63bdeb906c9592baf82 | include/fileurlreader.h | include/fileurlreader.h | #ifndef NEWSBOAT_FILEURLREADER_H_
#define NEWSBOAT_FILEURLREADER_H_
#include <string>
#include "urlreader.h"
namespace newsboat {
class FileUrlReader : public UrlReader {
public:
explicit FileUrlReader(const std::string& file = "");
nonstd::optional<std::string> reload() override;
std::string get_source() override;
/// \brief Write URLs back to the input file.
///
/// This method is used after importing feeds from OPML.
nonstd::optional<std::string> write_config();
private:
const std::string filename;
};
}
#endif /* NEWSBOAT_FILEURLREADER_H_ */
| #ifndef NEWSBOAT_FILEURLREADER_H_
#define NEWSBOAT_FILEURLREADER_H_
#include <string>
#include "urlreader.h"
namespace newsboat {
class FileUrlReader : public UrlReader {
public:
explicit FileUrlReader(const std::string& file = "");
/// \brief Load URLs from the urls file.
///
/// \return A non-value on success, an error message otherwise.
nonstd::optional<std::string> reload() override;
std::string get_source() override;
/// \brief Write URLs back to the urls file.
///
/// \return A non-value on success, an error message otherwise.
nonstd::optional<std::string> write_config();
private:
const std::string filename;
};
}
#endif /* NEWSBOAT_FILEURLREADER_H_ */
| Document return value of FileUrlReader's reload() and write_config() | Document return value of FileUrlReader's reload() and write_config()
| C | mit | der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat |
1cba0a11831e8920b4a958eee14d9785b034ad85 | include/oc_clock_util.h | include/oc_clock_util.h | /*
// Copyright (c) 2019 Intel Corporation
//
// 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 OC_CLOCK_UTIL_H
#define OC_CLOCK_UTIL_H
#include "oc_config.h"
size_t oc_clock_time_rfc3339(char *out_buf, size_t out_buf_len);
size_t oc_clock_encode_time_rfc3339(oc_clock_time_t time, char *out_buf,
size_t out_buf_len);
oc_clock_time_t oc_clock_parse_time_rfc3339(const char *in_buf,
size_t in_buf_len);
#endif /* OC_CLOCK_UTIL_H */
| /*
// Copyright (c) 2019 Intel Corporation
//
// 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 OC_CLOCK_UTIL_H
#define OC_CLOCK_UTIL_H
#include "oc_config.h"
#include <stddef.h>
size_t oc_clock_time_rfc3339(char *out_buf, size_t out_buf_len);
size_t oc_clock_encode_time_rfc3339(oc_clock_time_t time, char *out_buf,
size_t out_buf_len);
oc_clock_time_t oc_clock_parse_time_rfc3339(const char *in_buf,
size_t in_buf_len);
#endif /* OC_CLOCK_UTIL_H */
| Fix unknown type name 'size_t' error | Fix unknown type name 'size_t' error
freertos build fails complaining that size_t is an unknown type.
'size_t' is defined in stddef.h so is is included in the
oc_clock_util header file to resolve the error.
Change-Id: I9cfe5daa7850ca33f920be6b276609ee659584c1
Signed-off-by: George Nash <[email protected]>
Reviewed-on: https://gerrit.iotivity.org/gerrit/27890
Tested-by: IoTivity Jenkins <[email protected]>
Reviewed-by: Kishen Maloor <[email protected]>
| C | apache-2.0 | iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained |
0630e7a6a475b03e1ea1a04de82d495acc839373 | test/Driver/offloading-interoperability.c | test/Driver/offloading-interoperability.c | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: {{ld(.exe)?"}} {{.*}}"-m" "elf64lppc"
| // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary"{{( "--cuda")?}} "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: {{ld(.exe)?"}} {{.*}}"-m" "elf64lppc"
| Revise test case due to the change from CUDA 10+. | Revise test case due to the change from CUDA 10+.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@362232 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
74337bcad01fa0cdf02b4df8bedce9c23177ccbc | linuxffbeffectfactory.h | linuxffbeffectfactory.h | #ifndef LINUXFFBEFFECTFACTORY_H
#define LINUXFFBEFFECTFACTORY_H
#include "globals.h"
#include "linuxffbconditioneffect.h"
#include "linuxffbconstanteffect.h"
#include "ffbnulleffect.h"
#include "linuxffbperiodiceffect.h"
#include "linuxffbrampeffect.h"
#include "linuxffbrumbleeffect.h"
class LinuxFFBEffectFactory
{
public:
static std::shared_ptr<FFBEffect> createEffect(FFBEffectTypes type);
private:
LinuxFFBEffectFactory() {};
};
#endif // LINUXFFBEFFECTFACTORY_H
| #ifndef LINUXFFBEFFECTFACTORY_H
#define LINUXFFBEFFECTFACTORY_H
#include "globals.h"
#include "linuxffbconditioneffect.h"
#include "linuxffbconstanteffect.h"
#include "ffbnulleffect.h"
#include "linuxffbperiodiceffect.h"
#include "linuxffbrampeffect.h"
#include "linuxffbrumbleeffect.h"
class LinuxFFBEffectFactory
{
public:
static std::shared_ptr<FFBEffect> createEffect(FFBEffectTypes type);
LinuxFFBEffectFactory() = delete;
};
#endif // LINUXFFBEFFECTFACTORY_H
| Use deleted instead of private constructors | Use deleted instead of private constructors
| C | mit | MadCatX/FFBChecker,MadCatX/FFBChecker |
d2b61ae1f672f6b0c6495d6571df298047e858f2 | Tropos/Models/TRWeatherUpdate.h | Tropos/Models/TRWeatherUpdate.h | @class TRTemperature;
@interface TRWeatherUpdate : NSObject
@property (nonatomic, copy, readonly) NSString *city;
@property (nonatomic, copy, readonly) NSString *state;
@property (nonatomic, copy, readonly) NSString *conditionsDescription;
@property (nonatomic, readonly) TRTemperature *currentTemperature;
@property (nonatomic, readonly) TRTemperature *currentHigh;
@property (nonatomic, readonly) TRTemperature *currentLow;
@property (nonatomic, readonly) TRTemperature *yesterdaysTemperature;
@property (nonatomic, readonly) CGFloat windSpeed;
@property (nonatomic, readonly) CGFloat windBearing;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, copy, readonly) NSArray *dailyForecasts;
- (instancetype)initWithPlacemark:(CLPlacemark *)placemark currentConditionsJSON:(id)currentConditionsJSON yesterdaysConditionsJSON:(id)yesterdaysConditionsJSON;
@end
#import "TRAnalyticsEvent.h"
@interface TRWeatherUpdate (TRAnalytics) <TRAnalyticsEvent>
@end
| @class CLPlacemark;
@class TRTemperature;
@interface TRWeatherUpdate : NSObject
@property (nonatomic, copy, readonly) NSString *city;
@property (nonatomic, copy, readonly) NSString *state;
@property (nonatomic, copy, readonly) NSString *conditionsDescription;
@property (nonatomic, readonly) TRTemperature *currentTemperature;
@property (nonatomic, readonly) TRTemperature *currentHigh;
@property (nonatomic, readonly) TRTemperature *currentLow;
@property (nonatomic, readonly) TRTemperature *yesterdaysTemperature;
@property (nonatomic, readonly) CGFloat windSpeed;
@property (nonatomic, readonly) CGFloat windBearing;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, copy, readonly) NSArray *dailyForecasts;
- (instancetype)initWithPlacemark:(CLPlacemark *)placemark currentConditionsJSON:(id)currentConditionsJSON yesterdaysConditionsJSON:(id)yesterdaysConditionsJSON;
@end
#import "TRAnalyticsEvent.h"
@interface TRWeatherUpdate (TRAnalytics) <TRAnalyticsEvent>
@end
| Fix compiler error about undeclared type | Fix compiler error about undeclared type
| C | mit | hanpanpan200/Tropos,red3/Tropos,Ezimetzhan/Tropos,andreamazz/Tropos,red3/Tropos,hanpanpan200/Tropos,andreamazz/Tropos,thoughtbot/Tropos,tkafka/Tropos,kevinnguy/Tropos,coty/Tropos,ashfurrow/Tropos,Ezimetzhan/Tropos,tkafka/Tropos,ashfurrow/Tropos,lufeifan531/Tropos,thoughtbot/Tropos,kevinnguy/Tropos,lufeifan531/Tropos,andreamazz/Tropos,faimin/Tropos,iOSTestApps/Tropos,red3/Tropos,hanpanpan200/Tropos,faimin/Tropos,faimin/Tropos,iOSTestApps/Tropos,tkafka/Tropos,thoughtbot/Tropos,coty/Tropos,lufeifan531/Tropos,coty/Tropos,Ezimetzhan/Tropos,kevinnguy/Tropos |
145b28f1c040a2053547ba384e04492f2c130749 | tools/regression/pipe/pipe-reverse2.c | tools/regression/pipe/pipe-reverse2.c | /*-
* Copyright (c) 2010 Jilles Tjoelker
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/select.h>
#include <err.h>
#include <stdio.h>
#include <unistd.h>
/*
* Check that pipes can be selected for writing in the reverse direction.
*/
int
main(int argc, char *argv[])
{
int pip[2];
fd_set set;
int n;
if (pipe(pip) == -1)
err(1, "FAIL: pipe");
FD_ZERO(&set);
FD_SET(pip[0], &set);
n = select(pip[1] + 1, NULL, &set, NULL, &(struct timeval){ 0, 0 });
if (n != 1)
errx(1, "FAIL: select initial reverse direction");
n = write(pip[0], "x", 1);
if (n != 1)
err(1, "FAIL: write reverse direction");
FD_ZERO(&set);
FD_SET(pip[0], &set);
n = select(pip[1] + 1, NULL, &set, NULL, &(struct timeval){ 0, 0 });
if (n != 1)
errx(1, "FAIL: select reverse direction after write");
printf("PASS\n");
return (0);
}
| Add a test for r228510. | Add a test for r228510.
| 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 |
|
bc11202f53d082c559ff5d0ce1693c463b4777db | VisualPractice/auxiliary.h | VisualPractice/auxiliary.h | #ifndef TE_AUXILIARY_H
#define TE_AUXILIARY_H
struct SDL_Rect;
namespace te
{
struct Vector2i;
class Rectangle;
bool checkCollision(const SDL_Rect& a, const SDL_Rect& b);
bool checkCollision(const Rectangle& a, const Rectangle& b);
SDL_Rect getIntersection(const SDL_Rect& a, const SDL_Rect& b);
SDL_Rect getIntersection(const Rectangle& a, const Rectangle& b);
Vector2i getCenter(const SDL_Rect& rect);
Vector2i getCenter(const Rectangle& rect);
void handlePaddleCollision(Rectangle& ball, const Rectangle& paddle, float dt, float velocityScalar = 200.f);
void handleWallCollision(Rectangle& ball, const Rectangle& wall, float dt);
}
#endif
| #ifndef TE_AUXILIARY_H
#define TE_AUXILIARY_H
#include <map>
struct SDL_Rect;
namespace te
{
struct Vector2i;
class Rectangle;
bool checkCollision(const SDL_Rect& a, const SDL_Rect& b);
bool checkCollision(const Rectangle& a, const Rectangle& b);
SDL_Rect getIntersection(const SDL_Rect& a, const SDL_Rect& b);
SDL_Rect getIntersection(const Rectangle& a, const Rectangle& b);
Vector2i getCenter(const SDL_Rect& rect);
Vector2i getCenter(const Rectangle& rect);
void handlePaddleCollision(Rectangle& ball, const Rectangle& paddle, float dt, float velocityScalar = 200.f);
void handleWallCollision(Rectangle& ball, const Rectangle& wall, float dt);
template <class K, class V>
void insertOrAssign(std::map<K,V>& map, std::pair<K, V>&& kvPair)
{
auto it = map.find(kvPair.first);
if (it == map.end())
{
map.insert(std::move(kvPair));
}
else
{
it->second = std::move(kvPair.second);
}
}
template <class K, class V>
void insertOrAssign(std::map<K, V>& map, const std::pair<K, V>& kvPair)
{
auto it = map.find(kvPair.first);
if (it != map.end())
{
map.insert(kvPair);
}
else
{
it->second = kvPair.second;
}
}
}
#endif
| Add insertOrAssign helper for maps | Add insertOrAssign helper for maps
| C | mit | evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngine |
ee1c71c7abb67a59dd754a92989c9d18758b2eea | webkit/glue/form_data.h | webkit/glue/form_data.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_H__
| // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
FormData() : user_submitted(false) {}
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_H__
| Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site. | AutoFill: Add a default constructor for FormData. There are too many places
that create FormDatas, and we shouldn't need to initialize user_submitted for
each call site.
BUG=50423
TEST=none
Review URL: http://codereview.chromium.org/3074023
git-svn-id: http://src.chromium.org/svn/trunk/src@54641 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: a7f3d5712d54ae80ca6a2a747522f8ae65c0ed98 | C | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser |
b3676dfdad184acc12b768f5c82e3ec7ccecbaf5 | src/rtcmix/Instrument.h | src/rtcmix/Instrument.h | extern "C" {
#include <sys/types.h>
}
class Instrument {
public:
float start;
float dur;
int cursamp;
int chunksamps;
int endsamp;
int nsamps;
unsigned long chunkstart;
int sfile_on; // a soundfile is open (for closing later)
int fdIndex; // index into unix input file desc. table
int inputchans;
double inputsr;
off_t fileOffset; // current offset in file for this inst
int mytag; // for note tagging/rtupdate()
Instrument();
virtual ~Instrument();
virtual int init(float*, short);
virtual int run();
virtual float getstart();
virtual float getdur();
virtual int getendsamp();
virtual void setendsamp(int);
virtual void setchunk(int);
virtual void setchunkstart(int);
private:
void gone(); // decrements reference to input soundfile
};
extern void heapify(Instrument *Iptr);
extern void heapSched(Instrument *Iptr);
extern int rtsetoutput(float, float, Instrument*);
extern int rtsetinput(float, Instrument*);
extern int rtaddout(float*);
extern int rtbaddout(float*, int);
extern "C" int rtgetin(float*, Instrument*, int);
extern float rtupdate(int, int); // tag, p-field for return value
| #include <sys/types.h>
class Instrument {
public:
float start;
float dur;
int cursamp;
int chunksamps;
int endsamp;
int nsamps;
unsigned long chunkstart;
int sfile_on; // a soundfile is open (for closing later)
int fdIndex; // index into unix input file desc. table
int inputchans;
double inputsr;
off_t fileOffset; // current offset in file for this inst
int mytag; // for note tagging/rtupdate()
Instrument();
virtual ~Instrument();
virtual int init(float*, short);
virtual int run();
virtual float getstart();
virtual float getdur();
virtual int getendsamp();
virtual void setendsamp(int);
virtual void setchunk(int);
virtual void setchunkstart(int);
private:
void gone(); // decrements reference to input soundfile
};
extern void heapify(Instrument *Iptr);
extern void heapSched(Instrument *Iptr);
extern int rtsetoutput(float, float, Instrument*);
extern int rtsetinput(float, Instrument*);
extern int rtaddout(float*);
extern int rtbaddout(float*, int);
extern int rtgetin(float*, Instrument*, int);
extern float rtupdate(int, int); // tag, p-field for return value
| Remove apparently uneccessary extern C stuff | Remove apparently uneccessary extern C stuff
| C | apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.