commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 1 4.87k | subject stringlengths 15 778 | message stringlengths 15 8.75k | lang stringclasses 266
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
6fdc8bc13b4b71d9285009f996863aad8af046b2 | io/block_channel.h | io/block_channel.h | #ifndef BLOCK_CHANNEL_H
#define BLOCK_CHANNEL_H
class Action;
class Buffer;
class BlockChannel {
protected:
BlockChannel(void)
{ }
public:
virtual ~BlockChannel()
{ }
virtual Action *close(EventCallback *) = 0;
virtual Action *read(off_t, EventCallback *) = 0;
virtual Action *write(off_t, Buffer *, EventCall... | #ifndef BLOCK_CHANNEL_H
#define BLOCK_CHANNEL_H
class Action;
class Buffer;
class BlockChannel {
protected:
size_t bsize_;
BlockChannel(size_t bsize)
: bsize_(bsize)
{ }
public:
virtual ~BlockChannel()
{ }
virtual Action *close(EventCallback *) = 0;
virtual Action *read(off_t, EventCallback *) = 0;
virtua... | Make block size a protected member of a block channel. | Make block size a protected member of a block channel.
| C | bsd-2-clause | wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy |
31e81b47fe1982b5fe8bdf22c5820943317832f4 | src/util/std.c | src/util/std.c | #include <string.h>
#include "std.h"
int std_from_str(const char *std, enum c_std *penu, int *gnu)
{
if(!strcmp(std, "-ansi"))
goto std_c90;
if(strncmp(std, "-std=", 5))
return 1;
std += 5;
if(!strncmp(std, "gnu", 3)){
if(gnu)
*gnu = 1;
std += 3;
}else if(*std == 'c'){
if(gnu)
*gnu = 0;
std++... | #include <string.h>
#include "std.h"
int std_from_str(const char *std, enum c_std *penu, int *gnu)
{
if(!strcmp(std, "-ansi")){
if(gnu)
*gnu = 0;
goto std_c90;
}
if(strncmp(std, "-std=", 5))
return 1;
std += 5;
if(!strncmp(std, "gnu", 3)){
if(gnu)
*gnu = 1;
std += 3;
}else if(*std == 'c'){
i... | Fix uninitialised gnu output for "-ansi" flag | Fix uninitialised gnu output for "-ansi" flag
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
43e53ff9f64e521eafefecf79e8694231aa80021 | src/c++11/value.h | src/c++11/value.h | // -*- Mode: C++ -*-
#include "mapbox_variant/variant.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <unordered_map>
// Variant value types for span tags and log payloads.
#ifndef __LIGHTSTEP_VALUE_H__
#define __LIGHTSTEP_VALUE_H__
namespace lightstep {
class Value;
typedef std::unordered_... | // -*- Mode: C++ -*-
#include "mapbox_variant/variant.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include <unordered_map>
// Variant value types for span tags and log payloads.
#ifndef __LIGHTSTEP_VALUE_H__
#define __LIGHTSTEP_VALUE_H__
namespace lightstep {
class Value;
typedef std::unordered_... | Fix for recursive template (which somehow builds on Apple LLVM version 7.3.0 (clang-703.0.31) | Fix for recursive template (which somehow builds on Apple LLVM version 7.3.0 (clang-703.0.31)
| C | mit | lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp |
0b3b2c730aa260f1d060f5f70cf871174da28fc8 | src/pam_unshare.c | src/pam_unshare.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <security/pam_appl.h>
#include <security/pam_modules.h>
PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) {
return PAM_SUCCESS;
}
PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <security/pam_appl.h>
#include <security/pam_modules.h>
PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) {
printf("pam_unshare pam_sm_open_session\n");
return PAM_SUCCESS;
}
PAM_EXTERN int pam_sm... | Make it print something on session open/close | Make it print something on session open/close
| C | mit | gpjt/pam-unshare |
5ee374583520de994200ea3ddbaa05b4dab71e32 | bst.h | bst.h | #include <stdlib.h>
#ifndef __BST_H__
#define __BST_H__
struct BSTNode;
struct BST;
typedef struct BSTNode BSTNode;
typedef struct BST BST;
BST* BST_Create(void);
BSTNode* BSTNode_Create(void* k);
void BST_Inorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Preorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Postor... | #include <stdlib.h>
#ifndef __BST_H__
#define __BST_H__
struct BSTNode;
struct BST;
typedef struct BSTNode BSTNode;
typedef struct BST BST;
BST* BST_Create(void);
BSTNode* BSTNode_Create(void* k);
void BST_Inorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Preorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Postor... | Add BST Predecessor/Successor func declaration | Add BST Predecessor/Successor func declaration
| C | mit | MaxLikelihood/CADT |
cf4397b954e8a1cfe777708f26dee8ad43ece917 | src/core/map/block/SimpleBlock.h | src/core/map/block/SimpleBlock.h | //
// Created by dar on 11/25/15.
//
#ifndef C003_SIMPLEBLOCK_H
#define C003_SIMPLEBLOCK_H
#pragma once
#include "Block.h"
class SimpleBlock : public Block {
public:
SimpleBlock(Map *map, int texPos, int x, int y) : Block(map, x, y), texPos(texPos) {
shape.SetAsBox(0.5, 0.5);
b2FixtureDef fixDef... | //
// Created by dar on 11/25/15.
//
#ifndef C003_SIMPLEBLOCK_H
#define C003_SIMPLEBLOCK_H
#pragma once
#include "Block.h"
class SimpleBlock : public Block {
public:
SimpleBlock(Map *map, int texPos, int x, int y) : Block(map, x, y), texPos(texPos) {
shape.SetAsBox(0.5, 0.5);
b2FixtureDef fixDef... | Undo commit: "Made all blocks sensors" | Undo commit: "Made all blocks sensors"
| C | mit | darsto/spooky,darsto/spooky |
164fe0f58855721bd10abc4498e993443665b6fb | src/node.h | src/node.h | #ifndef SRC_NODE_H_
#define SRC_NODE_H_
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/access.hpp>
#include <boost/serialization/nvp.hpp>
#include <memory>
#include "./render_data.h"
#include "./math/obb.h"
class Gl;
/**
* \brief Base class for nodes which are managed by the
* Node... | #ifndef SRC_NODE_H_
#define SRC_NODE_H_
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/access.hpp>
#include <boost/serialization/nvp.hpp>
#include <memory>
#include "./render_data.h"
#include "./math/obb.h"
class Gl;
/**
* \brief Base class for nodes which are managed by the
* Node... | Add protected persistable property to Node base class. | Add protected persistable property to Node base class.
| C | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
9a9fe830340cd70d490325f70ef46c2736d953df | Engine/Entity.h | Engine/Entity.h | #ifndef __ENTITY_H__
#define __ENTITY_H__
#include "ModuleCollision.h"
class Entity
{
public:
Entity() : Parent(nullptr) {}
Entity(Entity* parent) : Parent(parent) {}
virtual ~Entity() {}
// Entity lifecycle methods
virtual bool Start()
{
return true;
}
virtual bool Start(bool active)
{
this->_acti... | #ifndef __ENTITY_H__
#define __ENTITY_H__
#include "ModuleCollision.h"
#include "Point3.h"
class Entity
{
public:
Entity() : Parent(nullptr) {}
Entity(Entity* parent) : Parent(parent) {}
virtual ~Entity() {}
// Entity lifecycle methods
virtual bool Start()
{
return true;
}
bool Enable()
{
if (!_act... | Fix calling by reference in entity | Fix calling by reference in entity
| C | mit | jowie94/The-Simpsons-Arcade,jowie94/The-Simpsons-Arcade |
af94158c6819f384f0f5b88dd00b0dc696a04d73 | src/util.h | src/util.h | #ifndef UTIL_H
#define UTIL_H
/*** Utility functions ***/
#define true 1
#define false 0
#define ALLOC(type) ALLOC_N(type, 1)
#define ALLOC_N(type, n) ((type*) xmalloc(sizeof(type) * (n)))
#define MEMCPY(dst, src, type) MEMCPY_N(dst, src, type, 1)
#define MEMCPY_N(dst, src, type, n) (memcpy((dst), (src), sizeof(type... | #ifndef UTIL_H
#define UTIL_H
/*** Utility functions ***/
#define true 1
#define false 0
#define ALLOC(type) ALLOC_N(type, 1)
#define ALLOC_N(type, n) ((type*) xmalloc(sizeof(type) * (n)))
#define MEMCPY(dst, src, type) MEMCPY_N(dst, src, type, 1)
#define MEMCPY_N(dst, src, type, n) (memcpy((dst), (src), sizeof(type... | Add DEFINE_X macros, for ref counters, readers and session readers | Add DEFINE_X macros, for ref counters, readers and session readers | C | apache-2.0 | mopidy/libmockspotify,mopidy/libmockspotify,mopidy/libmockspotify |
a4a5d761f9cee11c229b9a10189505ead3324bc5 | cmd/lefty/str.h | cmd/lefty/str.h | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... | Update with new lefty, fixing many bugs and supporting new features | Update with new lefty, fixing many bugs and supporting new features
| C | epl-1.0 | MjAbuz/graphviz,jho1965us/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,ellson/graphviz,MjAbuz/graphviz,jho1965us/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/grap... |
0a8dfb109eb3b3fd7a4efb9f39cca70ae44c31f8 | payload/Bmp180.h | payload/Bmp180.h | #ifndef RCR_LEVEL1PAYLOAD_BMP180_H_
#define RCR_LEVEL1PAYLOAD_BMP180_H_
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
namespace rcr {
namespace level1payload {
} // namespace level1_payload
} // namespace rcr
#endif // RCR_LEVEL1PAYLOAD_BMP180_H_
| #ifndef RCR_LEVEL1PAYLOAD_BMP180_H_
#define RCR_LEVEL1PAYLOAD_BMP180_H_
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
#include <Adafruit_BMP085_Library\Adafruit_BMP085.h>
namespace rcr {
namespace level1payload {
// Encapsulates a BMP180 sensor and providing select... | Define the BMP180 container class | Define the BMP180 container class
| C | mit | nolanholden/geovis,nolanholden/geovis,nolanholden/geovis,nolanholden/payload-level1-rocket |
1a09fbfebd6cf3361b29cf1386a402560c7c7b3b | registryd/event-source.h | registryd/event-source.h | /*
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
* Copyright 2009 Nokia.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published... | /*
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
* Copyright 2009 Nokia.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published... | Include config.h before checking HAVE_X11 | registryd: Include config.h before checking HAVE_X11
https://bugzilla.gnome.org/show_bug.cgi?id=773710
| C | lgpl-2.1 | GNOME/at-spi2-core,GNOME/at-spi2-core,GNOME/at-spi2-core |
1798b634514a8b35a47e3936cce7ce31ceb2e93e | shapes/map/map_6.c | shapes/map/map_6.c | int f(int);
int main(void) {
int *x, *y;
// CHECK: Found
// CHECK: line [[@LINE+1]]
for(int i = 0; i < 100; i++) {
x[9] = 45;
x[i] = f(y[i]);
}
}
| int f(int);
int main(void) {
int *x, *y;
// CHECK: Near miss
for(int i = 0; i < 100; i++) {
x[9] = 45;
x[i] = f(y[i]);
}
}
| Change filecheck line for map 6 | Change filecheck line for map 6
| C | mit | Baltoli/skeletons,Baltoli/skeletons,Baltoli/skeletons |
38fb8a117b47f4cf229ab15cfc5fdb1a27b09853 | snake.c | snake.c | #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
typedef enum Cell {
EMPTY
,SNAKE
,FOOD
} Cell;
int main() {
return EXIT_SUCCESS;
}
| #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
typedef enum Cell {
EMPTY
,SNAKE
,FOOD
} Cell;
typedef Cell Board[BOARD_HEIGHT][BOARD_WIDTH];
int main() {
return EXIT_SUCCESS;
}
| Define a type alias to represent boards. | Define a type alias to represent boards.
| C | mit | Hendrikto/Snake |
2b40e170deeb97055d4a1ffb27de0ec38c212712 | list.h | list.h | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void *);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)... | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void *);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)... | Add List Delete function declaration | Add List Delete function declaration
| C | mit | MaxLikelihood/CADT |
b45768b1321048d323fe762319a21e2da928142b | main.c | main.c | #include <stdio.h>
int main(void)
{
return 0;
}
| #include <stdio.h>
#include <stdlib.h>
#define SETUP_HANDLER 0
short int CURRENT_STATE = SETUP_HANDLER;
void setupHandler() {
// Hardware definitions
// Setup next state
}
void loop() {
while(1) {
switch(CURRENT_STATE) {
case SETUP_HANDLER: setupHandler(); break;
}
}
}
int... | Add base `state machine` from the scratch | feature: Add base `state machine` from the scratch
| C | mit | marceloboeira/miller-urey |
677be8e05b8fc5ccffa9035c0c39e4292a672803 | cbits/win32.c | cbits/win32.c | /* ----------------------------------------------------------------------------
(c) The University of Glasgow 2006
Useful Win32 bits
------------------------------------------------------------------------- */
#if defined(_WIN32)
#include "HsBase.h"
int get_unique_file_info(int fd, HsWord64 *dev, HsWord... | /* ----------------------------------------------------------------------------
(c) The University of Glasgow 2006
Useful Win32 bits
------------------------------------------------------------------------- */
#if defined(_WIN32)
#include "HsBase.h"
#endif
| Remove our customed `get_unique_file_info` on Windows platform. | Remove our customed `get_unique_file_info` on Windows platform.
The function `get_unique_file_info` was added into base 5 years ago,
https://github.com/ghc/ghc/blame/ba597c1dd1daf9643b72dc7aeace8d6b3fce84eb/libraries/base/cbits/Win32Utils.c#L128,
and first appeared in base-4.6.0.
Signed-off-by: Tao He <9e9d50aa3fb60f... | C | bsd-3-clause | winterland1989/stdio,winterland1989/stdio,winterland1989/stdio |
79b4591da81535d9820bda788e0acf15f07e9120 | src/main.h | src/main.h | #pragma once
#include "config.h"
#define BOOST_LOG_DYN_LINK
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/trivial.hpp>
int main(int argc, char **argv);
boost::log::sources::severity_logger<boost::log::trivial::severity_level> &get_global_logger(void); // TOOD: Make const
| #pragma once
#include "config.h"
#define BOOST_LOG_DYN_LINK
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/trivial.hpp>
int main(int argc, char **argv);
boost::log::sources::severity_logger<boost::log::trivial::severity_level> &get_global_logger(void);
| Remove comment which is impossible :( | Remove comment which is impossible :(
| C | mit | durandj/simplicity,durandj/simplicity |
1ca2092e54d1b1c06daf79eaf76710889a7eda2d | RobotC/MotorTest.c | RobotC/MotorTest.c | #pragma config(Hubs, S1, HTMotor, none, none, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Motor, mtr_S1_C1_1, leftMotor, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C1_2, rightMotor, tmotorTetrix, openLoop)
//*!!Code automatically g... | #pragma config(Hubs, S1, HTMotor, none, none, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Motor, mtr_S1_C1_1, Michelangelo_FR, tmotorTetrix, PIDControl, reversed, encoder)
#pragma config(Motor, mtr_S1_C1_2, Donatello_FL, tmotorTetrix, PIDControl, enco... | Add motor loop tester to see once and for all if possible | Add motor loop tester to see once and for all if possible
| C | mit | RMRobotics/FTC_5421_2014-2015,RMRobotics/FTC_5421_2014-2015 |
0201012a54285c9851dfe8b23045f0d99a8175cd | RMUniversalAlert.h | RMUniversalAlert.h | //
// RMUniversalAlert.h
// RMUniversalAlert
//
// Created by Ryan Maxwell on 19/11/14.
// Copyright (c) 2014 Ryan Maxwell. All rights reserved.
//
@class RMUniversalAlert;
typedef void(^RMUniversalAlertCompletionBlock)(RMUniversalAlert *alert, NSInteger buttonIndex);
@interface RMUniversalAlert : NSObject
+ (i... | //
// RMUniversalAlert.h
// RMUniversalAlert
//
// Created by Ryan Maxwell on 19/11/14.
// Copyright (c) 2014 Ryan Maxwell. All rights reserved.
//
#import <UIKit/UIKit.h>
@class RMUniversalAlert;
typedef void(^RMUniversalAlertCompletionBlock)(RMUniversalAlert *alert, NSInteger buttonIndex);
@interface RMUniver... | Add in UIKit import into header. | Add in UIKit import into header.
| C | mit | lijie121210/RMUniversalAlert,ranshon/RMUniversalAlert,RockyZ/RMUniversalAlert,ryanmaxwell/RMUniversalAlert |
4ea319b6ff2c1bf38adafdb8c9128ab48d3eb9ee | common/platform/api/quiche_export.h | common/platform/api/quiche_export.h | // Copyright 2019 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 THIRD_PARTY_QUICHE_PLATFORM_API_QUICHE_EXPORT_H_
#define THIRD_PARTY_QUICHE_PLATFORM_API_QUICHE_EXPORT_H_
#include "net/quiche/common/platform/im... | // Copyright 2019 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 THIRD_PARTY_QUICHE_PLATFORM_API_QUICHE_EXPORT_H_
#define THIRD_PARTY_QUICHE_PLATFORM_API_QUICHE_EXPORT_H_
#include "quiche_platform_impl/quiche_e... | Make QUICHE export use new-style default impl. | Make QUICHE export use new-style default impl.
PiperOrigin-RevId: 354510465
Change-Id: I3b55187e2a2e8af8e5870dc24b608ebb5a5ff865
| C | bsd-3-clause | google/quiche,google/quiche,google/quiche,google/quiche |
ffddc9d9b570116a0d0acc3c6309794cb68db085 | src/libbitcoind.h | src/libbitcoind.h | #include "main.h"
#include "addrman.h"
#include "alert.h"
#include "base58.h"
#include "init.h"
#include "noui.h"
#include "rpcserver.h"
#include "txdb.h"
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include "nan.h"
#include "scheduler.h"
#include "core_io.h"
#include "script/bitcoinconsensus.h"
#includ... | #include "main.h"
#include "addrman.h"
#include "alert.h"
#include "base58.h"
#include "init.h"
#include "noui.h"
#include "rpcserver.h"
#include "txdb.h"
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include "nan.h"
#include "scheduler.h"
#include "core_io.h"
#include "script/bitcoinconsensus.h"
#includ... | Fix declarations for IsSynced and SyncPercentage | Fix declarations for IsSynced and SyncPercentage
| C | mit | isghe/bitcore-node,braydonf/bitcore-node,CryptArc/bitcore-node,jameswalpole/bitcore-node,wzrdtales/bitcore-node,zcoinrocks/bitcore-node,wzrdtales/bitcore-node,jameswalpole/bitcore-node,snogcel/bitcore-node-dash,phplaboratory/psiacore-node,jameswalpole/bitcore-node,wzrdtales/bitcore-node,wzrdtales/bitcore-node,isghe/bit... |
acb99f7d6b709a7dc88344c36de7c4866e455035 | src/wrap.h | src/wrap.h | #ifndef BF_WRAP_H
#define BF_WRAP_H
#include <type_traits>
#include "object.h"
namespace bf {
template <
typename T,
typename std::enable_if<std::is_integral<T>::value>::type
>
object wrap(T const& x)
{
return {&x, sizeof(T)};
}
template <typename Sequence>
object wrap(Sequence const& s)
{
return {s.data(),... | #ifndef BF_WRAP_H
#define BF_WRAP_H
#include <type_traits>
#include <vector>
#include "object.h"
namespace bf {
template <
typename T,
typename = typename std::enable_if<std::is_arithmetic<T>::value>::type
>
object wrap(T const& x)
{
return {&x, sizeof(T)};
}
template <
typename T,
size_t N,
typename = ... | Fix SFINAE default arg and add array overload. | Fix SFINAE default arg and add array overload.
| C | bsd-3-clause | mavam/libbf,nicolacdnll/libbf,nicolacdnll/libbf |
6493bb2e8d68e7862a9841807073c5a507c9c8e3 | defs.c | defs.c | #include <stdio.h>
void putStr(const char *str) {
fputs(str, stdout);
}
| #include <stdio.h>
#include <gmp.h>
void putStr(const char *str) {
fputs(str, stdout);
}
void mpz_set_ull(mpz_t n, unsigned long long ull)
{
mpz_set_ui(n, (unsigned int)(ull >> 32)); /* n = (unsigned int)(ull >> 32) */
mpz_mul_2exp(n, n, 32); /* n <<= 32 */
mpz_add_ui(n, n, (unsigned i... | Fix comparison return values and implement Integer truncation | Fix comparison return values and implement Integer truncation
| C | bsd-3-clause | melted/idris-llvm,melted/idris-llvm,idris-hackers/idris-llvm,idris-hackers/idris-llvm |
5301e87a423ec2095955328c78b350e14b38a6bc | source/tid/enums.h | source/tid/enums.h | #pragma once
#include <string_view>
namespace tid {
enum level : int {
parent = -1,
normal = 0,
detail = 1,
pedant = 2,
};
constexpr std::string_view level2sv(level l) noexcept {
switch(l) {
case normal: return "normal";
case detail: return "... | #pragma once
#include <exception>
#include <string_view>
namespace tid {
enum level : int {
parent = -1,
normal = 0,
detail = 1,
pedant = 2,
};
constexpr std::string_view level2sv(level l) noexcept {
switch(l) {
case normal: return "normal";
... | Fix include headers after refactor | Fix include headers after refactor
Former-commit-id: 7570681cb07311ab05e4f039e6c023fb3fe5f5a5 | C | mit | DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG |
1432cf072b1fb914e514603ea5a65677a450d3fc | src/blobsBack.c | src/blobsBack.c | #include <stdlib.h>
#include "blobsBack.h"
int requestCmd(int player, typeCommand* command) {
command = NULL;
//if()
return 1;
}
| #include <stdlib.h>
#include "blobsBack.h"
int canMove(int player, typeBoard* board) {
int i, j;
for(i = 0; i < board->h; i++) {
for(j = 0; j < board->w; j++) {
if(board->get[i][j].owner == player && board->get[i][j].canMove) {
return 1;
}
}
}
return 0;
}
char* getCommand(typeComm... | Add canMove, isInside and validCommand | Add canMove, isInside and validCommand
| C | mit | lucas-emery/TPE |
bfb029f6ff779c828039be7f0d1eb061376d5006 | tests/testCaseSingleton.h | tests/testCaseSingleton.h | #ifndef TESTCASESINGLETON_H
#define TESTCASESINGLETON_H
#include "CppDiFactory.h"
class IEngine
{
public:
virtual double getVolume() const = 0;
virtual ~IEngine() = default;
};
class Engine : public IEngine
{
public:
virtual double getVolume() const override
{
return 10.5;
}
};
TEST_CASE( "Singleton Test", ... | #ifndef TESTCASESINGLETON_H
#define TESTCASESINGLETON_H
#include "CppDiFactory.h"
namespace testCaseSingleton
{
class IEngine
{
public:
virtual double getVolume() const = 0;
virtual ~IEngine() = default;
};
class Engine : public IEngine
{
private:
static bool _valid;
public:
Engine() { _valid = true; }
... | Add tests for singleton lifetime | Add tests for singleton lifetime
| C | apache-2.0 | bbvch/CppDiFactory |
7da86164962ae726ddb761f8b9486ab31f61656b | test/main.c | test/main.c | #include <stdio.h>
#include "bincookie.h"
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]);
printf("Example: %s Cookies.binarycookies\n", argv[0]);
return 1;
}
binarycookies_t *bc = binarycookies_init(argv... | #include <stdio.h>
#include "bincookie.h"
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]);
printf("Example: %s Cookies.binarycookies\n", argv[0]);
return 1;
}
binarycookies_t *bc = binarycookies_init(argv... | Use enum for flag check | Use enum for flag check
| C | mit | Tatsh/libbinarycookies,Tatsh/libbinarycookies |
648efe12f983c62f0ab9313ccb32a724e2d689cd | src/kernel/irq/static_irq/irq_static.c | src/kernel/irq/static_irq/irq_static.c | /**
* @file
* @brief
*
* @date Mar 12, 2014
* @author: Anton Bondarev
*/
#include <assert.h>
#include <kernel/irq.h>
extern char __static_irq_table_start;
extern char __static_irq_table_end;
#define STATIC_IRQ_TABLE_SIZE \
(((int) &__static_irq_table_end - (int) &__static_irq_table_start) / 4)
int irq_attach... | /**
* @file
* @brief
*
* @date Mar 12, 2014
* @author: Anton Bondarev
*/
#include <assert.h>
#include <kernel/irq.h>
extern char __static_irq_table_start;
extern char __static_irq_table_end;
#define STATIC_IRQ_TABLE_SIZE \
(((int) &__static_irq_table_end - (int) &__static_irq_table_start) / 4)
int irq_attach... | Print irq_num during assert in static irq_attach | minor: Print irq_num during assert in static irq_attach
| C | bsd-2-clause | embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox |
7aab6b61066940e0933fafed6b0c1ff9ea8d1472 | fibonacci_coding.c | fibonacci_coding.c | /*
* fibonacci_coding.c
* Author: Duc Thanh Tran
*/
#include <math.h>
/*
* Calculates i-th fibonacci-number (based on Moivre-Binet)
* where we start with 1 and ignore the duplicate 1 at the beginning, i.e.
* the fibonacci sequence is: 1, 2, 3, 5, 8, ...
*/
unsigned int fibonacciNumber(int n)
{
if(n <= 2)
... | /*
* fibonacci_coding.c
* Author: Duc Thanh Tran
*/
#include <math.h>
/*
* Calculates i-th fibonacci-number (based on Moivre-Binet)
* where we start with 1 and ignore the duplicate 1 at the beginning, i.e.
* the fibonacci sequence is: 1, 2, 3, 5, 8, ...
*/
unsigned int fibonacciNumber(int n)
{
if(n <= 2)
... | Add 1st part of encoding algorithm | Add 1st part of encoding algorithm
Zeckendorf-representation finished
| C | mit | ducthanhtran/fibonacci-compression-coding |
fa399229296ba75b2fb3f7b6891c28a3e369ae38 | test/Sema/attr-micromips.c | test/Sema/attr-micromips.c | // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s
__attribute__((nomicromips(0))) void foo1(); // expected-error {{'nomicromips' attribute takes no arguments}}
__attribute__((micromips(1))) void foo2(); // expected-error {{'micromips' attribute takes no arguments}}
__attribute((nomicromips)) int ... | // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s
__attribute__((nomicromips(0))) void foo1(); // expected-error {{'nomicromips' attribute takes no arguments}}
__attribute__((micromips(1))) void foo2(); // expected-error {{'micromips' attribute takes no arguments}}
__attribute((nomicromips)) int ... | Add one more check to the micromips attribute test case. NFC | [mips] Add one more check to the micromips attribute test case. NFC
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@303565 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
1632ad4fcb5be14705f63f61cda13cf50596b515 | creator/plugins/docks/propertiesdock/propertywidgetitems/qrealpropertywidgetitem.h | creator/plugins/docks/propertiesdock/propertywidgetitems/qrealpropertywidgetitem.h | #ifndef QREALPROPERTYWIDGETITEM_H
#define QREALPROPERTYWIDGETITEM_H
#include "widgets/propertywidgetitem.h"
class QDoubleSpinBox;
namespace GluonCreator
{
class QRealPropertyWidgetItem : public PropertyWidgetItem
{
Q_OBJECT
public:
explicit QRealPropertyWidgetItem(QWidget* parent = 0, Qt:... | #ifndef QREALPROPERTYWIDGETITEM_H
#define QREALPROPERTYWIDGETITEM_H
#include "widgets/propertywidgetitem.h"
class QDoubleSpinBox;
namespace GluonCreator
{
class QRealPropertyWidgetItem : public PropertyWidgetItem
{
Q_OBJECT
public:
explicit QRealPropertyWidgetItem(QWidget* parent = 0, Qt:... | Fix krzy issue for "endswithnewline" | Fix krzy issue for "endswithnewline"
| C | lgpl-2.1 | KDE/gluon,pranavrc/example-gluon,cgaebel/gluon,cgaebel/gluon,KDE/gluon,pranavrc/example-gluon,KDE/gluon,cgaebel/gluon,cgaebel/gluon,pranavrc/example-gluon,pranavrc/example-gluon,KDE/gluon |
18c0fdc7f6d21c9be2e91847c8441ce311a3af6a | bikepath/AddressGeocoderFactory.h | bikepath/AddressGeocoderFactory.h | //
// AddressGeocoderFactory.h
// bikepath
//
// Created by Farheen Malik on 8/19/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SPGooglePlacesAutocomplete.h"
#import <UIKit/UIKit.h>
#import "GeocodeItem.h"
@interface AddressGeocoderFactory : NSObject
//+ ... | //
// AddressGeocoderFactory.h
// bikepath
//
// Created by Farheen Malik on 8/19/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SPGooglePlacesAutocomplete.h"
#import <UIKit/UIKit.h>
#import "GeocodeItem.h"
@interface AddressGeocoderFactory : NSObject
//+ ... | Modify methods according to new names in implementation file | Modify methods according to new names in implementation file
| C | apache-2.0 | hushifei/bike-path,red-spotted-newts-2014/bike-path,red-spotted-newts-2014/bike-path |
36bb3b728bacb99ecf2f95734d3e5e97a070fa0e | test2/code_gen/deref_reg.c | test2/code_gen/deref_reg.c | // RUN: %ucc -DFIRST -S -o- %s | grep -F 'movl (%%rax), %%eax'
// RUN: %ucc -DSECOND -S -o- %s | grep -F 'movl 4(%%rbx), %%ebx'
#ifdef FIRST
f(int *p)
{
return *p;
// should see that p isn't used after/.retains==1 and not create a new reg,
// but re-use the current
}
#elif defined(SECOND)
struct A
{
int i, j;
... | // RUN: %ucc -DFIRST -S -o- %s | grep -F 'movl (%%rax), %%eax'
// RUN: %ucc -DSECOND -S -o- %s | grep -F 'movl 4(%%rcx), %%ecx'
#ifdef FIRST
f(int *p)
{
return *p;
// should see that p isn't used after/.retains==1 and not create a new reg,
// but re-use the current
}
#elif defined(SECOND)
struct A
{
int i, j;
... | Change test now %ebx is callee-save | Change test now %ebx is callee-save
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
d7ba0a9c6dad9db4a22d06c25646ae6df25ccd68 | AsyncDisplayKit/Layout/ASAbsoluteLayoutElement.h | AsyncDisplayKit/Layout/ASAbsoluteLayoutElement.h | //
// ASAbsoluteLayoutElement.h
// AsyncDisplayKit
//
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the ... | //
// ASAbsoluteLayoutElement.h
// AsyncDisplayKit
//
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the ... | Add imports that are necessary for clang to parse header files after compilation. | [Build] Add imports that are necessary for clang to parse header files after compilation.
This allows the objc-diff tool (which creates API diffs) to run successfully.
| C | bsd-3-clause | maicki/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,rmls/AsyncDisplayKit,romyilano/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,flovouin/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,harryworld/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,george-gw/AsyncDisplayK... |
6bc2c3564661acd3ebbd00843a8c09d5944a1da0 | fuzz/main.c | fuzz/main.c | /* How to fuzz:
clang main.c -O2 -g -fsanitize=address,fuzzer -o fuzz
cp -r data temp
./fuzz temp/ -dict=gltf.dict -jobs=12 -workers=12
*/
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_r... | /* How to fuzz:
clang main.c -O2 -g -fsanitize=address,fuzzer -o fuzz
cp -r data temp
./fuzz temp/ -dict=gltf.dict -jobs=12 -workers=12
*/
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {cgltf_file_type_invalid};
cgltf_data*... | Fix fuzzer to compile in C++ mode | fuzz: Fix fuzzer to compile in C++ mode
| C | mit | jkuhlmann/cgltf,jkuhlmann/cgltf,jkuhlmann/cgltf |
20d0fc327afebfe3be7e27725e3ed51bb54cbf42 | src/settings/types/LayerIndex.h | src/settings/types/LayerIndex.h | //Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#ifndef LAYERINDEX_H
#define LAYERINDEX_H
namespace cura
{
/*
* Struct behaving like a layer number.
*
* This is a facade. It behaves exactly like an integer but is used to indicate
* that it is a layer number.
... | //Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#ifndef LAYERINDEX_H
#define LAYERINDEX_H
namespace cura
{
/*
* Struct behaving like a layer number.
*
* This is a facade. It behaves exactly like an integer but is used to indicate
* that it is a layer number.
... | Add adding and subtracting operators | Add adding and subtracting operators
We want to be able to add indexes together, to increment them, etc.
Contributes to issue CURA-4410.
| C | agpl-3.0 | Ultimaker/CuraEngine,Ultimaker/CuraEngine |
cf6b39580ed78e9a8e5250e8d17a7b9eab2fbf8d | include/token.h | include/token.h | #ifndef TOKEN_H_
#define TOKEN_H_
#include <iostream>
#include <string>
#include <vector>
enum class TokenType {
NUMBER,
ADD,
SUBTRACT,
MULTIPLY,
DIVIDE,
EXPONENT,
};
enum class OperatorType {
NONE,
UNARY,
BINARY,
EITHER,
};
class Token {
public:
... | #ifndef TOKEN_H_
#define TOKEN_H_
#include <iostream>
#include <string>
#include <vector>
enum class TokenType {
NUMBER,
ADD,
SUBTRACT,
MULTIPLY,
DIVIDE,
EXPONENT,
};
enum class OperatorType {
NONE,
UNARY,
BINARY,
EITHER,
};
class Token {
public:
... | Fix invalid null precedence value | Fix invalid null precedence value
| C | mit | hkmix/zcalc |
525a09b103cec96ed831af5d6f133111db34d2fe | kmail/kmversion.h | kmail/kmversion.h | // KMail Version Information
//
#ifndef kmversion_h
#define kmversion_h
#define KMAIL_VERSION "1.9.52"
#endif /*kmversion_h*/
| // KMail Version Information
//
#ifndef kmversion_h
#define kmversion_h
#define KMAIL_VERSION "1.10.0"
#endif /*kmversion_h*/
| Increase version for the 4.1 release | Increase version for the 4.1 release
svn path=/trunk/KDE/kdepim/; revision=827634
| C | lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi |
bae6f14d27925dab378f31a41be98bf0436c0ee3 | core/thread/inc/TWin32Mutex.h | core/thread/inc/TWin32Mutex.h | // @(#)root/thread:$Id$
// Author: Bertrand Bellenot 20/10/2004
/*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* ... | // @(#)root/thread:$Id$
// Author: Bertrand Bellenot 20/10/2004
/*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* ... | Use a EStatusBits 'enum' instead of a 'constexpr static int' (allowing automatic checking for overlaps) | Use a EStatusBits 'enum' instead of a 'constexpr static int' (allowing automatic checking for overlaps)
| C | lgpl-2.1 | olifre/root,olifre/root,karies/root,karies/root,zzxuanyuan/root,olifre/root,karies/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,root-mirror/root,olifre/root,zzxuanyuan/root,root-mirror/root,zzxuanyuan/root,zzxuanyuan/root,zzxuanyuan/root,root-mirror/root,olifre/root,zzxuanyuan/root,karies/root,zzxuany... |
a53a81ca5adc6febb775d912e8d326c9e69f584e | soundex.c | soundex.c | #include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include "libspell.h"
#include "websters.c"
int
main(int argc, char **argv)
{
size_t i;
char *soundex_code;
FILE *out = fopen("dict/soundex.txt", "w");
if (out == NULL)
err(EXIT_FAILURE, "Failed to open soundex");
for (i = 0; i < sizeof(dict) / sizeof(di... | #include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include "libspell.h"
#include "websters.c"
int
main(int argc, char **argv)
{
size_t i;
char *soundex_code;
FILE *out = fopen("dict/soundex.txt", "w");
if (out == NULL)
err(EXIT_FAILURE, "Failed to open soundex");
for (i = 0; i < sizeof(dict) / sizeof(di... | Change the order of the strings | Change the order of the strings
First we should output the soundex code and then the string
(makes the parsing of the file easier)
| C | bsd-2-clause | abhinav-upadhyay/nbspell,abhinav-upadhyay/nbspell |
ffa8484eb0610048a0e8cc4f1594fd9607c5b555 | include/effects/SkXfermodeImageFilter.h | include/effects/SkXfermodeImageFilter.h | /*
* Copyright 2013 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkXfermodeImageFilter_DEFINED
#define SkXfermodeImageFilter_DEFINED
#include "SkArithmeticImageFilter.h"
#include "SkBlendMode.h"
#include "SkImag... | /*
* Copyright 2013 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkXfermodeImageFilter_DEFINED
#define SkXfermodeImageFilter_DEFINED
#include "SkArithmeticImageFilter.h"
#include "SkBlendMode.h"
#include "SkImag... | Revert "Revert "remove unused api on xfermodeimagefilter"" | Revert "Revert "remove unused api on xfermodeimagefilter""
This reverts commit 369f7eaeb06f21b1cb15e3dd3204ed883c5376f5.
Reason for revert: google3 updated
Original change's description:
> Revert "remove unused api on xfermodeimagefilter"
>
> This reverts commit fcc4a071d9dff4f3bac0bd55dab8f69a4436d15d.
>
> Reason... | C | bsd-3-clause | google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,rubenvb/skia,HalC... |
e72fab9520d4e809786ddd7d6e1b6da57d546bfa | dtool/src/dtoolutil/config_dtoolutil.h | dtool/src/dtoolutil/config_dtoolutil.h | /**
* 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."
*
* @file config_dtoolutil.h
* @... | /**
* 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."
*
* @file config_dtoolutil.h
* @... | Add missing declaration for init_libdtoolutil() | dtoolutil: Add missing declaration for init_libdtoolutil()
| C | bsd-3-clause | chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d,chandler14362/panda3d |
96b3dc4e1dbcc002e9d69ff6fb451909387d05e4 | libraries/clib/native/Throwable.c | libraries/clib/native/Throwable.c | /*
* java.lang.Throwable.c
*
* Copyright (c) 1996, 1997
* Transvirtual Technologies, Inc. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution
* of this file.
*/
#include "config.h"
#include "config-io.h"
#include <assert.h>
#include <native.h>
#include "java_io_... | /*
* java.lang.Throwable.c
*
* Copyright (c) 1996, 1997
* Transvirtual Technologies, Inc. All rights reserved.
*
* See the file "license.terms" for information on usage and redistribution
* of this file.
*/
#include "config.h"
#include "config-io.h"
#include <assert.h>
#include <native.h>
#include "java_io_... | Adjust for new paramter to printStackTrace(). | Adjust for new paramter to printStackTrace().
| C | lgpl-2.1 | kaffe/kaffe,kaffe/kaffe,kaffe/kaffe,kaffe/kaffe,kaffe/kaffe |
fed5b68b9fdf3a3196ae39609b7ae217999b094f | src/cc/common.h | src/cc/common.h | /*
* Copyright (c) 2015 PLUMgrid, 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 ... | /*
* Copyright (c) 2015 PLUMgrid, 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 ... | Use the STL's make_unique if available | Use the STL's make_unique if available
Fixes build errors with GCC7.3.1 + LLVM5.0.1 under Centos.
/bcc/src/cc/frontends/b/loader.cc: In member function 'int ebpf::BLoader::parse(llvm::Module*, const string&, const string&, ebpf::TableStorage&, const string&, const string&)':
/bcc/src/cc/frontends/b/loader.cc:39:63: e... | C | apache-2.0 | tuxology/bcc,brendangregg/bcc,iovisor/bcc,tuxology/bcc,brendangregg/bcc,brendangregg/bcc,iovisor/bcc,tuxology/bcc,iovisor/bcc,iovisor/bcc,brendangregg/bcc,tuxology/bcc,tuxology/bcc,iovisor/bcc,brendangregg/bcc |
db41cf2df6c16cec5bc7834b6932a276dc49324e | arch/sparc/include/asm/asmmacro.h | arch/sparc/include/asm/asmmacro.h | /* asmmacro.h: Assembler macros.
*
* Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
*/
#ifndef _SPARC_ASMMACRO_H
#define _SPARC_ASMMACRO_H
#include <asm/btfixup.h>
#include <asm/asi.h>
#define GET_PROCESSOR4M_ID(reg) \
rd %tbr, %reg; \
srl %reg, 12, %reg; \
and %reg, 3, %reg;
#define GET_PROCES... | /* asmmacro.h: Assembler macros.
*
* Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
*/
#ifndef _SPARC_ASMMACRO_H
#define _SPARC_ASMMACRO_H
#include <asm/btfixup.h>
#include <asm/asi.h>
#define GET_PROCESSOR4M_ID(reg) \
rd %tbr, %reg; \
srl %reg, 12, %reg; \
and %reg, 3, %reg;
#define GET_PROCES... | Remove ldXa and stXa defines, unused. | sparc32: Remove ldXa and stXa defines, unused.
These were for sharing some MMU code between sun4 and sun4c.
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>
| C | mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kana... |
1e8ee5c91c4f254e5247f1c50bc4eb5e0edb09a6 | ComponentKit/HostingView/CKComponentRootViewInternal.h | ComponentKit/HostingView/CKComponentRootViewInternal.h | /*
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#im... | /*
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#im... | Change type of view passed to hit test hooks | Change type of view passed to hit test hooks
If we want to support non-CKComponentRootViews that use these hooks, it has to be a generic UIView.
| C | bsd-3-clause | ezc/componentkit,dshahidehpour/componentkit,avnerbarr/componentkit,dstnbrkr/componentkit,SummerHanada/componentkit,mcohnen/componentkit,adamdahan/componentkit,pairyo/componentkit,mcohnen/componentkit,stevielu/componentkit,avnerbarr/componentkit,inbilin-inc/componentkit,lydonchandra/componentkit,liyong03/componentkit,ad... |
0605946badd1b4d71fa0568a189c2ff5be6fc660 | SurgSim/Framework/Component-inl.h | SurgSim/Framework/Component-inl.h | // This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions 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/LICE... | // This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions 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/LICE... | Fix check against nullptr in checkandconvert | Fix check against nullptr in checkandconvert
| C | apache-2.0 | simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim |
d387e1648e5f30d40d811ae6c5a89726b621cfdb | src/Layer.h | src/Layer.h | #ifndef LAYER_H_
#define LAYER_H_
class Layer
{
public:
virtual void render()=0;
virtual void update()=0;
protected:
virtual ~Layer();
};
#endif
| #ifndef LAYER_H_
#define LAYER_H_
//Abstract layer class
class Layer
{
public:
virtual void render()=0;
virtual void update()=0;
protected:
virtual ~Layer() {}
};
#endif
| Make sure layer class is destructed first | Make sure layer class is destructed first
| C | mit | metatrevor/mchezo-engine,metatrevor/mchezo-engine |
6dde82a036afb3d1a6e012f2f8273b401c8b47d1 | gnu/lib/libregex/gnuregex.h | gnu/lib/libregex/gnuregex.h | /* $FreeBSD$ */
#warning "<gnuregex.h> has been replaced by <gnu/regex.h>"
#include <gnu/regex.h>
| /*-
* Copyright (c) 2004 David E. O'Brien
* Copyright (c) 2004 Andrey A. Chernov
* 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... | Allow to compile with non-GCC compiler. | Allow to compile with non-GCC compiler.
| 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 |
5c31ae8d7724618d27315791605449d7693bde78 | ppu/include/sysutil/sysutil.h | ppu/include/sysutil/sysutil.h | #ifndef __LV2_SYSUTIL_H__
#define __LV2_SYSUTIL_H__
#include <ppu-types.h>
#define SYSUTIL_EVENT_SLOT0 0
#define SYSUTIL_EVENT_SLOT1 1
#define SYSUTIL_EVENT_SLOT2 2
#define SYSUTIL_EVENT_SLOT3 3
#define SYSUTIL_EXIT_GAME 0x0101
#define SYSUTIL_DRAW_BEGIN 0x0121
#define SYSUTIL_DRAW_END 0x0122
#define S... | #ifndef __LV2_SYSUTIL_H__
#define __LV2_SYSUTIL_H__
#include <ppu-types.h>
#define SYSUTIL_EVENT_SLOT0 0
#define SYSUTIL_EVENT_SLOT1 1
#define SYSUTIL_EVENT_SLOT2 2
#define SYSUTIL_EVENT_SLOT3 3
#define SYSUTIL_EXIT_GAME 0x0101
#define SYSUTIL_DRAW_BEGIN 0x0121
#define SYSUTIL_DRAW_END 0x0122
#define S... | Add defines for OSK event ids | Add defines for OSK event ids
| C | mit | ps3dev/PSL1GHT,ps3dev/PSL1GHT,ps3dev/PSL1GHT,ps3dev/PSL1GHT |
124b9d9f70d198fd7ad220e75ad5c7fded10474f | src/minunit.h | src/minunit.h | /* http://www.jera.com/techinfo/jtns/jtn002.html */
#define mu_assert(message, test) do { if (!(test)) return message; } while (0)
#define mu_run_test(testname, test) \
do { \
char *message = test(); tests_run++; \
if (message) return message; \
else printf("OK: %s\n", testname); \
} while (0)
extern int test... | /* http://www.jera.com/techinfo/jtns/jtn002.html */
#define mu_assert(message, test) \
do { \
if (!(test)) \
return message; \
} while (0)
#define mu_run_test(testname, test) \
do { \
char *message = test(); tests_run++; \
if (message) return message; \
else printf("OK: %s\n", testname); \
} while (0)
... | Split macro into multiple lines. | Split macro into multiple lines.
| C | mit | profan/yet-another-brainfuck-interpreter |
9246d17556bfb4e9e5ba05f90ca3983dd7ad28d3 | Preferences/PSSwitchTableCell.h | Preferences/PSSwitchTableCell.h | #import "PSControlTableCell.h"
@class UIActivityIndicatorView;
@interface PSSwitchTableCell : PSControlTableCell {
UIActivityIndicatorView *_activityIndicator;
}
@property BOOL loading;
- (BOOL)loading;
- (void)setLoading:(BOOL)loading;
- (id)controlValue;
- (id)newControl;
- (void)setCellEnabled:(BOOL)enabled... | #import "PSControlTableCell.h"
@class UIActivityIndicatorView;
@interface PSSwitchTableCell : PSControlTableCell {
UIActivityIndicatorView *_activityIndicator;
}
@property (nonatomic) BOOL loading;
@end
| Clean up what looks like a direct class-dump header. | [Preferences] Clean up what looks like a direct class-dump header.
| C | unlicense | hbang/headers,hbang/headers |
288f2d1cfa42f8b380ef6a3e3f175a8b474f8303 | thread_tree.h | thread_tree.h | /*
* Raphael Kubo da Costa - RA 072201
*
* MC514 - Lab2
*/
#ifndef __THREAD_TREE_H
#define __THREAD_TREE_H
typedef struct
{
size_t n_elem;
pthread_t *list;
} ThreadLevel;
typedef struct
{
size_t height;
ThreadLevel **tree;
} ThreadTree;
ThreadTree *thread_tree_new(size_t numthreads);
void thread_tree_f... | /*
* Raphael Kubo da Costa - RA 072201
*
* MC514 - Lab2
*/
#ifndef __THREAD_TREE_H
#define __THREAD_TREE_H
typedef struct
{
size_t *interested;
pthread_t *list;
size_t n_elem;
size_t turn;
} ThreadLevel;
typedef struct
{
size_t height;
ThreadLevel **tree;
} ThreadTree;
ThreadTree *thread_tree_new(si... | Add turn and interested fields per level | Add turn and interested fields per level
| C | bsd-2-clause | rakuco/peterson_futex |
d84323ce8cd37c5b88a84e8a8ca2e80dc2b51acc | WordPressCom-Stats-iOS/StatsSection.h | WordPressCom-Stats-iOS/StatsSection.h | typedef NS_ENUM(NSInteger, StatsSection) {
StatsSectionGraph,
StatsSectionPeriodHeader,
StatsSectionEvents,
StatsSectionPosts,
StatsSectionReferrers,
StatsSectionClicks,
StatsSectionCountry,
StatsSectionVideos,
StatsSectionAuthors,
StatsSectionSearchTerms,
StatsSectionComment... | typedef NS_ENUM(NSInteger, StatsSection) {
StatsSectionGraph,
StatsSectionPeriodHeader,
StatsSectionEvents,
StatsSectionPosts,
StatsSectionReferrers,
StatsSectionClicks,
StatsSectionCountry,
StatsSectionVideos,
StatsSectionAuthors,
StatsSectionSearchTerms,
StatsSectionComment... | Add new sections for post details | Add new sections for post details
| C | mit | wordpress-mobile/WordPressCom-Stats-iOS,wordpress-mobile/WordPressCom-Stats-iOS |
d81b288141955127e3752502433f674276cde50b | 3RVX/OSD/EjectOSD.h | 3RVX/OSD/EjectOSD.h | // Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <Windows.h>
#include "OSD.h"
class NotifyIcon;
class EjectOSD : public OSD {
public:
EjectOSD();
virtual void Hide();
virtual void ProcessHotkeys(HotkeyInfo &hki);... | // Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <Windows.h>
#include <thread>
#include "OSD.h"
class NotifyIcon;
class EjectOSD : public OSD {
public:
EjectOSD();
virtual void Hide();
virtual void ProcessHotkey... | Add thread member for offloading disk info ops | Add thread member for offloading disk info ops
| C | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
f891b7d3d09f152adf06bf8442d50f48f85650b8 | Source/CAFMatchedTextViewController.h | Source/CAFMatchedTextViewController.h | //
// CAFMatchedTextViewController.h
// Curiosity
//
// Created by Matthew Thomas on 8/26/12.
// Copyright (c) 2012 Matthew Thomas. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CAFMatchedTextViewController : UIViewController
@end
| //
// CAFMatchedTextViewController.h
// Curiosity
//
// Created by Matthew Thomas on 8/26/12.
// Copyright (c) 2012 Matthew Thomas. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CAFMatchedTextViewController : UIViewController
@property (copy, nonatomic) NSString *regexString;
@property (copy, nonatom... | Add regexString and inputText properties | Add regexString and inputText properties | C | mit | codecaffeine/Curiosity |
796459a7cee33cf44961193ad6751ac6edb5e94b | source/tid/enums.h | source/tid/enums.h | #pragma once
#include <exception>
#include <string_view>
namespace tid {
enum level : int {
parent = -1,
normal = 0,
detail = 1,
pedant = 2,
};
constexpr std::string_view level2sv(level l) noexcept {
switch(l) {
case normal: return "normal";
... | #pragma once
#include <stdexcept>
#include <string_view>
namespace tid {
enum level : int {
parent = -1,
normal = 0,
detail = 1,
pedant = 2,
};
constexpr std::string_view level2sv(level l) noexcept {
switch(l) {
case normal: return "normal";
... | Fix include headers after refactor | Fix include headers after refactor
Former-commit-id: f04e7d0471916735efc4fa7ea53c6a2db72fe8ab | C | mit | DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG,DavidAce/DMRG |
c239d6c8971bcba2a7875ace59936e258562934a | i2c.h | i2c.h | /*
* Copyright (c) 2013 by Kyle Isom <kyle@tyrfingr.is>.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ... | /*
* Copyright (c) 2013 by Kyle Isom <kyle@tyrfingr.is>.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ... | Add missing declaration to header. | Add missing declaration to header.
| C | isc | isrlabs/avr-tools,isrlabs/avr-tools |
b8a8116b485bca23f277240d459f3ba0f560b42b | AFToolkit/ObjectProvider/AFObjectModel.h | AFToolkit/ObjectProvider/AFObjectModel.h |
#pragma mark Class Interface
@interface AFObjectModel : NSObject
#pragma mark - Properties
@property (nonatomic, strong, readonly) NSArray *key;
@property (nonatomic, strong, readonly) NSDictionary *mappings;
@property (nonatomic, strong, readonly) NSDictionary *transformers;
#pragma mark - Constructors
- (id)... |
#pragma mark Class Interface
@interface AFObjectModel : NSObject
#pragma mark - Properties
@property (nonatomic, strong, readonly) NSArray *key;
@property (nonatomic, strong, readonly) NSDictionary *mappings;
@property (nonatomic, strong, readonly) NSDictionary *transformers;
#pragma mark - Constructors
- (id)... | Make objectModel protocol method static. | Make objectModel protocol method static.
| C | mit | mlatham/AFToolkit |
7e7ec2f533ee4ff14372f76f23701e726651f27d | src/cxa_finalize.c | src/cxa_finalize.c | void __cxa_finalize(void *d );
extern void __dso_handle;
__attribute((destructor))
static void cleanup(void) {
__cxa_finalize(&__dso_handle);
}
| /**
* Copyright (c) 2012 David Chisnall.
* This work was funded by TBricks.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* ri... | Add missing copyright in the other file. | Add missing copyright in the other file.
| C | bsd-2-clause | sudosurootdev/external_libcxxrt,xin3liang/platform_external_libcxxrt,vegard/libcxxrt,vegard/libcxxrt,cemeyer/libcxxrt,cemeyer/libcxxrt,sudosurootdev/external_libcxxrt,vegard/libcxxrt,sudosurootdev/external_libcxxrt,cemeyer/libcxxrt,xin3liang/platform_external_libcxxrt,xin3liang/platform_external_libcxxrt |
9e7a287e2d334dbfecd3b8ed1c07b2c84ad9a085 | Pinmark/PMPinboardService.h | Pinmark/PMPinboardService.h | //
// PMPinboardService.h
// Pinmarker
//
// Created by Kyle Stevens on 9/24/14.
// Copyright (c) 2014 kilovolt42. All rights reserved.
//
@class PMBookmark;
@interface PMPinboardService : NSObject
+ (void)requestAPITokenForAPIToken:(NSString *)token success:(void (^)(NSString *))success failure:(void (^)(NSErro... | //
// PMPinboardService.h
// Pinmarker
//
// Created by Kyle Stevens on 9/24/14.
// Copyright (c) 2014 kilovolt42. All rights reserved.
//
@interface PMPinboardService : NSObject
+ (void)requestAPITokenForAPIToken:(NSString *)token success:(void (^)(NSString *))success failure:(void (^)(NSError *))failure;
+ (voi... | Remove unnecessary forward class declaration | Remove unnecessary forward class declaration
| C | mit | kilovolt42/Pinmarker,kilovolt42/Pinmarker,kilovolt42/Pinmarker |
324384b631761fc034fafd80e8396e7d3d15203d | benchmarks/c/examples/simple_math/main.c | benchmarks/c/examples/simple_math/main.c | #ifdef KLEE
#include "klee/klee.h"
#endif
#include <assert.h>
#include <stdio.h>
#include "math.h"
int main() {
float a;
#ifdef KLEE
klee_make_symbolic(&a, sizeof(a), "a");
#endif
float b = a - a;
assert(sin(b) == 0.0f);
return 0;
}
| #ifdef KLEE
#include "klee/klee.h"
#endif
#include <assert.h>
#include <stdio.h>
#include "math.h"
int main() {
float a = 0.0f;
#ifdef KLEE
klee_make_symbolic(&a, sizeof(a), "a");
#endif
if (isnan(a) || isinf(a)) {
// assertion won't hold in these cases so exit early
return 0;
}
float b = a - a;
as... | Fix mistake in example benchmark that is supposed to be correct. The NaN and infinity cases were not considered. | Fix mistake in example benchmark that is supposed to be correct.
The NaN and infinity cases were not considered.
| C | bsd-3-clause | delcypher/fp-bench,delcypher/fp-bench,delcypher/fp-bench |
c627504b77b68b133ce2cde73d192e4c40f436a5 | TrailsKit/TrailsKit.h | TrailsKit/TrailsKit.h | //
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
#import "TKGPXPolylineMapper.h"
#import "TrailsKitUI.h"
#import "TrailsKitTypes.h"
#endif | //
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
#import "TrailsKitParsers.h"
#import "TrailsKitTypes.h"
#import "TrailsKitUI.h"
#endif | Add parsers header to root header | Add parsers header to root header
| C | mit | mmertsock/TrailsKit |
e0fa191cf75370ca96af601a029aa85e632a2ec3 | SSPSolution/SSPSolution/GameStateHandler.h | SSPSolution/SSPSolution/GameStateHandler.h | #ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<Game... | #ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
//#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<Ga... | REMOVE commented out START_WITHOUT_MENU so we start with a menu | REMOVE commented out START_WITHOUT_MENU so we start with a menu
| C | apache-2.0 | Chringo/SSP,Chringo/SSP |
32f23b462b3b1732abfcdde5af941e34bfeaba40 | Source/NSManagedObject+HYPPropertyMapper.h | Source/NSManagedObject+HYPPropertyMapper.h | @import CoreData;
static NSString * const HYPPropertyMapperCustomRemoteKey = @"mapper.remote.key";
@interface NSManagedObject (HYPPropertyMapper)
- (void)hyp_fillWithDictionary:(NSDictionary *)dictionary;
- (NSDictionary *)hyp_dictionary;
@end
| @import CoreData;
static NSString * const HYPPropertyMapperCustomRemoteKey = @"hyper.remoteKey";
@interface NSManagedObject (HYPPropertyMapper)
- (void)hyp_fillWithDictionary:(NSDictionary *)dictionary;
- (NSDictionary *)hyp_dictionary;
@end
| Improve user info name consistency | Improve user info name consistency | C | mit | hyperoslo/NSManagedObject-HYPPropertyMapper,hyperoslo/NSManagedObject-HYPPropertyMapper,isghe/NSManagedObject-HYPPropertyMapper,nbarnold01/NSManagedObject-HYPPropertyMapper,markosankovic/NSManagedObject-HYPPropertyMapper |
d53efb9d518fbc795f79c676649e0ba311838e3a | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k18"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k19"
| Update driver version to 5.02.00-k19 | [SCSI] qla4xxx: Update driver version to 5.02.00-k19
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,Krist... |
b132768bba645cf5008cbe3c5a12b9806d604480 | libavformat/avc.h | libavformat/avc.h | /*
* AVC helper functions for muxers
* Copyright (c) 2008 Aurelien Jacobs <aurel@gnuage.org>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*... | /*
* AVC helper functions for muxers
* Copyright (c) 2008 Aurelien Jacobs <aurel@gnuage.org>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*... | Add missing FFMPEG_ prefix to multiple inclusion guard. | Add missing FFMPEG_ prefix to multiple inclusion guard.
git-svn-id: a4d7c1866f8397a4106e0b57fc4fbf792bbdaaaf@15047 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
| C | lgpl-2.1 | prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg |
9fc55387986f0979d10370fe2fa313db8776bdea | src/trm/ft_trmnew.c | src/trm/ft_trmnew.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_trmnew.c :+: :+: :+: ... | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_trmnew.c :+: :+: :+: ... | Set trm inherit signals by default | Set trm inherit signals by default
| C | apache-2.0 | ncoden/libft |
21e7321ee26f12929cfc4bca16961873291b6349 | lib/cycy/stdio.c | lib/cycy/stdio.c | #include "cycy/stdio.h"
int puts(const char * string) {
int i = 0;
while (string[i] != NULL) {
putchar(string[i++]);
}
putc('\n');
return i + 1;
}
| #include "cycy/stdio.h"
int puts(const char * string) {
int i = 0;
while (string[i] != NULL) {
putchar(string[i]);
i = i + 1;
}
putc('\n');
return i + 1;
}
| Make this easier to compile | Make this easier to compile
| C | mit | Magnetic/cycy,Magnetic/cycy,Magnetic/cycy |
6d53dd07a03c4bd24b9ca75cbbfe1c9fc3d4ff1f | cpp/libopenzwavec.h | cpp/libopenzwavec.h | typedef void* COptions;
COptions newCOptions(const char*, const char*, const char*);
| #ifdef __cplusplus
extern "C" {
#endif
typedef void* COptions;
COptions newCOptions(const char*, const char*, const char*);
#ifdef __cplusplus
}
#endif
| Add back the C++ extern | Add back the C++ extern
| C | mit | Julian/libopenzwave-cffi,Julian/libopenzwave-cffi,Julian/libopenzwave-cffi |
939117c3e4b66641dd2f0291800ec3294eeebfd4 | api-testcases/test-c-constructor.c | api-testcases/test-c-constructor.c | /*===
*** test1 (duk_safe_call)
inherited value
top at end: 0
==> rc=0, result='undefined'
===*/
static duk_ret_t my_constructor(duk_context *ctx) {
return 1;
}
static duk_ret_t test1(duk_context *ctx) {
duk_push_global_object(ctx);
duk_push_c_function(ctx, my_constructor, 0); /* constructor (function) */
duk_p... | /*===
*** test1 (duk_safe_call)
inherited value
top at end: 0
==> rc=0, result='undefined'
===*/
static duk_ret_t my_constructor(duk_context *ctx) {
return 0;
}
static duk_ret_t test1(duk_context *ctx) {
duk_push_global_object(ctx);
duk_push_c_function(ctx, my_constructor, 0); /* constructor (function) */
duk_p... | Fix invalid return value in API test | Fix invalid return value in API test
No effect on test result because the constructor was not returning an
object anyway.
| C | mit | chenyaqiuqiu/duktape,zeropool/duktape,harold-b/duktape,eddieh/duktape,nivertech/duktape,reqshark/duktape,nivertech/duktape,markand/duktape,pombredanne/duktape,tassmjau/duktape,haosu1987/duktape,jmptrader/duktape,haosu1987/duktape,nivertech/duktape,pombredanne/duktape,nivertech/duktape,markand/duktape,kphillisjr/duktape... |
e3e07072472a4962895a433206f0d84b54b99695 | rmc.h | rmc.h | #ifndef RMC_CORE_H
#define RMC_CORE_H
#include "atomic.h"
#ifdef HAS_RMC
#error "no you don't"
#else
/* Dummy version that should work. */
#define XEDGE(x, y) do { } while (0)
#define VEDGE(x, y) do { } while (0)
/* Just stick a visibility barrier after every label. This isn't good
* or anything, but it probably wo... | #ifndef RMC_CORE_H
#define RMC_CORE_H
#include "atomic.h"
#ifdef HAS_RMC
/* We signal our labels and edges to our LLVM pass in a *really* hacky
* way to avoid needing to modify the frontend. Labelled statements
* are wrapped in two goto labels to force them into their own basic
* block (labelled statements don't... | Add in a mechanism for interacting with the RMC llvm pass. | Add in a mechanism for interacting with the RMC llvm pass.
| C | mit | msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler |
181906966dd2bdabcaec3c3e8b1d9b1ac43eb294 | misc.h | misc.h | #ifndef MISC_H
#define MISC_H
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include "types.h"
#define ARR_LEN(a) (sizeof(a) / sizeof(a[0]))
#define LOOKUP(key, table) (assert(key < ARR_LEN(table)), table[key])
static inline void* xmalloc(size_t s)
{
void* p = malloc(s);
if (!p) {
perror("malloc")... | #ifndef MISC_H
#define MISC_H
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include "types.h"
#define ARR_LEN(a) (sizeof(a) / sizeof(a[0]))
#define LOOKUP(key, table) (assert(key < ARR_LEN(table)), \
assert(key >= 0), \
table[key])
static inline... | Add a greater-than-or-equal-to-zero assert to LOOKUP(). | Add a greater-than-or-equal-to-zero assert to LOOKUP().
| C | isc | zevweiss/enthrall |
afedf4fa79fedacfcd285d49f1c044ddd138951e | chrome/browser/cocoa/objc_zombie.h | chrome/browser/cocoa/objc_zombie.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#pragma once
#import <Foundation/Foundation.h>
// Yo... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#pragma once
#import <Foundation/Foundation.h>
// Yo... | Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before. | Add link to explanation of what we mean by zombie
The person triaging / debugging a zombie crash may never have heard of this before.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3763002
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@62723 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
83a86b351e8542ef3f9d607bbf8b32f3ca606fd9 | common.h | common.h |
#define exit_with_code(code) { result = code; goto _exit; }
int compile_files(
YR_COMPILER* compiler,
int argc,
const char** argv)
{
for (int i = 0; i < argc - 1; i++)
{
const char* ns;
const char* file_name;
char* colon = (char*) strchr(argv[i], ':');
// Namespace delimiter must be a col... |
#define exit_with_code(code) { result = code; goto _exit; }
int compile_files(
YR_COMPILER* compiler,
int argc,
const char** argv)
{
for (int i = 0; i < argc - 1; i++)
{
const char* ns;
const char* file_name;
char* colon = (char*) strchr(argv[i], ':');
// Namespace delimiter must be a col... | Remove unnecessary call to fclose. | Remove unnecessary call to fclose.
| C | bsd-3-clause | plusvic/yara,cblichmann/yara,wxsBSD/yara,rednaga/yara,tanium/yara,hillu/yara,cblichmann/yara,wxsBSD/yara,VirusTotal/yara,wxsBSD/yara,hillu/yara,plusvic/yara,tanium/yara,hillu/yara,hillu/yara,wxsBSD/yara,plusvic/yara,wxsBSD/yara,rednaga/yara,plusvic/yara,VirusTotal/yara,rednaga/yara,cblichmann/yara,plusvic/yara,cblichma... |
d8b4e55ab22ce4e65a2b64821702f3143ab1105f | elkhound/emitcode.h | elkhound/emitcode.h | // emitcode.h see license.txt for copyright and terms of use
// track state of emitted code so I can emit #line too
#ifndef EMITCODE_H
#define EMITCODE_H
#include <fstream.h> // ofstream
#include "str.h" // stringBuffer
#include "srcloc.h" // SourceLoc
class EmitCode : public stringB... | // emitcode.h see license.txt for copyright and terms of use
// track state of emitted code so I can emit #line too
#ifndef EMITCODE_H
#define EMITCODE_H
#include "str.h" // stringBuffer
#include "srcloc.h" // SourceLoc
#include "ofstreamts.h" // ofstreamTS
class EmitCode : public stringB... | Use ofstreamTS to avoid touching the .gen.cc, .gen.h output if unchanged. | Use ofstreamTS to avoid touching the .gen.cc, .gen.h output if unchanged.
| C | bsd-3-clause | angavrilov/olmar,angavrilov/olmar,angavrilov/olmar,angavrilov/olmar |
fbe96411e7888bfb9cc92fe85e35e093239d24a7 | include/insect.h | include/insect.h | #ifndef __INSECT_H__
#define __INSECT_H__
#include "insect/crawler.h"
#include "insect/records.h"
/* basic file API */
#include "insect/file/stat.h"
#ifdef USE_THREADS
#include "insect/concurrent/thread.h"
#endif /* USE_THREADS */
#endif /* __INSECT_H__ */
| #ifndef __INSECT_H__
#define __INSECT_H__
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
#include "insect/crawler.h"
#include "insect/records.h"
/* basic file API */
#include "insect/file/stat.h"
#ifdef USE_THREADS
#include "insect/concurrent/thread.h"
#endif /* USE_THREADS */
#ifdef __cplusplus
} /* extern "C" ... | Add extern "C" wrapper to main header, for C++ | Add extern "C" wrapper to main header, for C++
| C | bsd-2-clause | hagemt/insect,hagemt/insect |
6457ba1007bd218624a196b8de351d6e2f644ce7 | include/bitcoin/bitcoin/compat.h | include/bitcoin/bitcoin/compat.h | /*
* Copyright (c) 2011-2013 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
* libbitcoin is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License with
* additional permissions to the one published by the Free Software
* Fou... | /*
* Copyright (c) 2011-2013 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
* libbitcoin is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License with
* additional permissions to the one published by the Free Software
* Fou... | Remove unused code, keep in bx. | Remove unused code, keep in bx.
| C | agpl-3.0 | GroestlCoin/libgroestlcoin,GroestlCoin/libgroestlcoin,GroestlCoin/libgroestlcoin,swansontec/libbitcoin,GroestlCoin/libgroestlcoin,swansontec/libbitcoin,swansontec/libbitcoin,swansontec/libbitcoin |
914aa3e86b039d935ae322bf2c0b654dd9de42ad | KugelmatikFirmware/config.h | KugelmatikFirmware/config.h | #pragma once
#include <Arduino.h>
#include "stepper.h"
enum StepMode : uint8_t {
StepHalf = 1,
StepFull = 2,
StepBoth = 3
};
enum BrakeMode : uint8_t {
BrakeNone = 0,
BrakeAlways = 1,
BrakeSmart = 2
};
struct Config {
StepMode stepMode;
BrakeMode brakeMode;
uint32_t tickTime;
uint32_t homeTime;
uint3... | #pragma once
#include <Arduino.h>
#include "stepper.h"
enum StepMode : uint8_t {
StepHalf = 1,
StepFull = 2,
StepBoth = 3
};
enum BrakeMode : uint8_t {
BrakeNone = 0,
BrakeAlways = 1,
BrakeSmart = 2
};
struct Config {
StepMode stepMode;
BrakeMode brakeMode;
uint32_t tickTime;
uint32_t homeTime;
uint3... | Add packed attribute to Config | Add packed attribute to Config
| C | mit | henrik1235/Kugelmatik,henrik1235/Kugelmatik,henrik1235/Kugelmatik |
90ae0921a7faccb8c2ce05745cc9ca7ca112cba8 | ext/quarry/quarry.h | ext/quarry/quarry.h | # define RAD_TO_DEG 57.29577951308232087 /* 180/PI */
# define DEG_TO_RAD 0.0174532925199433 /* PI/180 */
VALUE mgrs_to_lat_long(VALUE klass) {
VALUE mgrs_grid = rb_iv_get(klass, "@grid");
char* grid = StringValuePtr(mgrs_grid);
double lat, lng;
Convert_MGRS_To_Geodetic(grid, &lat, &lng);
VALUE lat_lng_ar... | # define RAD_TO_DEG 57.29577951308232087 /* 180/PI */
# define DEG_TO_RAD 0.0174532925199433 /* PI/180 */
VALUE mgrs_to_lat_long(VALUE klass) {
VALUE mgrs_grid = rb_iv_get(klass, "@grid");
char* grid = StringValuePtr(mgrs_grid);
double lat, lng;
Convert_MGRS_To_Geodetic(grid, &lat, &lng);
VALUE lat_lng_arr... | Clean up converting float to double | Clean up converting float to double
| C | mit | joshuaclayton/quarry,joshuaclayton/quarry |
35c85704a3e61eaf6e5c55dcf3cd66b09088d09b | src/tcp_socket.c | src/tcp_socket.c | #include "syshead.h"
#include "tcp_socket.h"
#define MAX_TCP_SOCKETS 128
static int cur_fd = 3;
static struct tcp_socket tcp_sockets[MAX_TCP_SOCKETS];
void init_tcp_sockets()
{
memset(tcp_sockets, 0, sizeof(struct tcp_socket) * MAX_TCP_SOCKETS);
}
struct tcp_socket *alloc_tcp_socket()
{
struct tcp_socket *so... | #include "syshead.h"
#include "tcp_socket.h"
#define MAX_TCP_SOCKETS 128
static int cur_fd = 3;
static struct tcp_socket tcp_sockets[MAX_TCP_SOCKETS];
void init_tcp_sockets()
{
memset(tcp_sockets, 0, sizeof(struct tcp_socket) * MAX_TCP_SOCKETS);
}
struct tcp_socket *alloc_tcp_socket()
{
struct tcp_socket *so... | Fix ugly pointer return bug | Fix ugly pointer return bug
| C | mit | saminiir/level-ip,saminiir/level-ip |
06e44840368efdb359224b5d04db6c92f73bd373 | arch/cris/include/arch-v32/arch/cache.h | arch/cris/include/arch-v32/arch/cache.h | #ifndef _ASM_CRIS_ARCH_CACHE_H
#define _ASM_CRIS_ARCH_CACHE_H
#include <arch/hwregs/dma.h>
/* A cache-line is 32 bytes. */
#define L1_CACHE_BYTES 32
#define L1_CACHE_SHIFT 5
#define __read_mostly __attribute__((__section__(".data.read_mostly")))
void flush_dma_list(dma_descr_data *descr);
void flush_dma_descr(dma_d... | #ifndef _ASM_CRIS_ARCH_CACHE_H
#define _ASM_CRIS_ARCH_CACHE_H
#include <arch/hwregs/dma.h>
/* A cache-line is 32 bytes. */
#define L1_CACHE_BYTES 32
#define L1_CACHE_SHIFT 5
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
void flush_dma_list(dma_descr_data *descr);
void flush_dma_descr(dma_... | Correct name of read_mostly section. | CRISv32: Correct name of read_mostly section.
54cb27a71f51d304342c79e62fd7667f2171062b renamed .data.read_mostly to
.data..read_mostly for all architectures for 2.6.33.
Reported-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
Signed-off-by: Jesper Nilsson <987a7dbc972893e93e5578401bedc3a0f2... | C | mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_k... |
4cfc51017db3e3f4eaaa2cb436a905097a4f08e2 | drivers/scsi/qla2xxx/qla_version.h | drivers/scsi/qla2xxx/qla_version.h | /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2008 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.02.01-k5"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 2
#define QLA_DRIVER_PATCH_VER 1
#define... | /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2008 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.02.01-k6"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 2
#define QLA_DRIVER_PATCH_VER 1
#define... | Update version number to 8.02.01-k6. | [SCSI] qla2xxx: Update version number to 8.02.01-k6.
Signed-off-by: Andrew Vasquez <67840a4977006af7f584bdc4c86d7243c1629cad@qlogic.com>
Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@HansenPartnership.com>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_k... |
5d334bbd060cb6129f8e8af6b29f897d6d4840a1 | src/lily_config.h | src/lily_config.h |
/* Path handling. This was copied from Lua, with some minor adjustments.
The biggest one is the lack of Windows support, because I don't have
my Windows box setup for Lily yet (I'd rather make sure Windows works
all at once). */
#define LILY_MAJOR "0"
#define LILY_MINOR "13"
#define LILY_VERSION_DIR LILY_MA... |
/* Path handling. This was copied from Lua, with some minor adjustments.
The biggest one is the lack of Windows support, because I don't have
my Windows box setup for Lily yet (I'd rather make sure Windows works
all at once). */
#define LILY_MAJOR "0"
#define LILY_MINOR "13"
#define LILY_VER... | Fix up the embarassing mess of path seeding. Yikes. :( | Fix up the embarassing mess of path seeding. Yikes. :(
| C | mit | crasm/lily,crasm/lily,boardwalk/lily,crasm/lily,boardwalk/lily |
2c377d116884aa9dc8fca51830b914b127de1420 | mordor/common/http/tunnel.h | mordor/common/http/tunnel.h | #ifndef __HTTP_TUNNEL_H__
#define __HTTP_TUNNEL_H__
// Copyright (c) 2009 - Decho Corp.
#include "auth.h"
namespace HTTP
{
template <class T>
Stream::ptr tunnel(T &conn, const std::string &proxy, const std::string &target)
{
Request requestHeaders;
requestHeaders.requestLine.method = CONNE... | #ifndef __HTTP_TUNNEL_H__
#define __HTTP_TUNNEL_H__
// Copyright (c) 2009 - Decho Corp.
#include "auth.h"
namespace HTTP
{
template <class T>
Stream::ptr tunnel(T &conn, const std::string &proxy, const std::string &target)
{
Request requestHeaders;
requestHeaders.requestLine.method = CONNE... | Throw a more useful exceptoin when proxy connection fails. | Throw a more useful exceptoin when proxy connection fails.
| C | bsd-3-clause | cgaebel/mordor,adfin/mordor,mtanski/mordor,mtanski/mordor,ccutrer/mordor,cgaebel/mordor,ccutrer/mordor,adfin/mordor,adfin/mordor,mozy/mordor,mozy/mordor,ccutrer/mordor,mtanski/mordor,mozy/mordor |
b793fd632ce03ce39a4d49e97b8f052cf9c03e18 | base/inc/Htypes.h | base/inc/Htypes.h | /* @(#)root/base:$Name: $:$Id: Htypes.h,v 1.1.1.1 2000/05/16 17:00:39 rdm Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* ... | /* @(#)root/base:$Name: $:$Id: Htypes.h,v 1.2 2000/06/13 12:25:52 brun Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* ... | Add more comments describing Stat_t and Axis_t | Add more comments describing Stat_t and Axis_t
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@3097 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,dawehner/root |
4df12e7cba463ce664b8cf4e95bb72c4aef2a5ff | PySide/QtCore/qstringlist_conversions.h | PySide/QtCore/qstringlist_conversions.h | namespace Shiboken
{
inline bool Converter<QStringList>::isConvertible(PyObject* pyObj)
{
return StdListConverter<QStringList>::isConvertible(pyObj);
}
inline QStringList Converter<QStringList>::toCpp(PyObject* pyObj)
{
return StdListConverter<QStringList>::toCpp(pyObj);
}
inline PyObject* Converter<QStringLi... | namespace Shiboken
{
inline bool Converter<QStringList>::isConvertible(PyObject* pyObj)
{
return StdListConverter<QStringList>::isConvertible(pyObj);
}
inline QStringList Converter<QStringList>::toCpp(PyObject* pyObj)
{
return StdListConverter<QStringList>::toCpp(pyObj);
}
inline PyObject* Converter<QStringLi... | Return a QStringList wrapper instead of a python list in Converter::toPython. | Return a QStringList wrapper instead of a python list in Converter::toPython.
| C | lgpl-2.1 | enthought/pyside,RobinD42/pyside,IronManMark20/pyside2,BadSingleton/pyside2,M4rtinK/pyside-bb10,RobinD42/pyside,gbaty/pyside2,pankajp/pyside,enthought/pyside,PySide/PySide,BadSingleton/pyside2,qtproject/pyside-pyside,M4rtinK/pyside-bb10,pankajp/pyside,M4rtinK/pyside-android,IronManMark20/pyside2,gbaty/pyside2,PySide/Py... |
21995694719c8c5f83265c291d26d06ee824e461 | Tests/UIAlertViewBlocksKitTest.h | Tests/UIAlertViewBlocksKitTest.h | //
// UIAlertViewBlocksKitTest.h
// BlocksKit
//
// Created by Zachary Waldowski on 12/20/11.
// Copyright (c) 2011 Dizzy Technology. All rights reserved.
//
#import <GHUnitIOS/GHUnit.h>
#import "BlocksKit/BlocksKit.h"
@interface UIAlertViewBlocksKitTest : GHTestCase
@end
| //
// UIAlertViewBlocksKitTest.h
// BlocksKit Unit Tests
//
#import <GHUnitIOS/GHUnit.h>
#import "BlocksKit/BlocksKit.h"
@interface UIAlertViewBlocksKitTest : GHTestCase
- (void)testInit;
- (void)testAddButtonWithHandler;
- (void)testSetCancelButtonWithHandler;
- (void)testDelegationBlocks;
@end
| Make the UIAlertView unit test header consistent. | Make the UIAlertView unit test header consistent.
| C | mit | anton-matosov/BlocksKit,yimouleng/BlocksKit,Herbert77/BlocksKit,aipeople/BlocksKit,AlexanderMazaletskiy/BlocksKit,ManagerOrganization/BlocksKit,Voxer/BlocksKit,pilot34/BlocksKit,pomu0325/BlocksKit,yaoxiaoyong/BlocksKit,hartbit/BlocksKit,HarrisLee/BlocksKit,stevenxiaoyang/BlocksKit,owers19856/BlocksKit,coneman/BlocksKit... |
84fb9633caf6dc5b63ca98fd4d92e6086ab146d0 | lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h | lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h | //=== MipsELFStreamer.h - MipsELFStreamer ------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENCE.TXT for details.
//
//===-----------------------------------------------------------... | //=== MipsELFStreamer.h - MipsELFStreamer ------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENCE.TXT for details.
//
//===-----------------------------------------------------------... | Remove unused variable (introduced in r173884) to clear clang -Werror build | Remove unused variable (introduced in r173884) to clear clang -Werror build
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@173887 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/l... |
a067e96511a774f2398d6b222072926c2917f84c | include/thai/thinp.h | include/thai/thinp.h | /*
* $Id: thinp.h,v 1.2 2001-05-17 17:58:56 thep Exp $
* thinp.h - Thai string input sequence filtering
* Created: 2001-05-17
*/
#ifndef THAI_THINP_H
#define THAI_THINP_H
#include <thai/thailib.h>
BEGIN_CDECL
/*
* strictness of input sequence checking, according to WTT 2.0
*/
typedef enum {
ISC_PASSTHROUG... | /*
* $Id: thinp.h,v 1.3 2001-05-17 18:15:04 thep Exp $
* thinp.h - Thai string input sequence filtering
* Created: 2001-05-17
*/
#ifndef THAI_THINP_H
#define THAI_THINP_H
#include <thai/thailib.h>
BEGIN_CDECL
/*
* strictness of input sequence checking, according to WTT 2.0
*/
typedef enum {
ISC_PASSTHROUG... | Change the spec (comment) of th_validate() | Change the spec (comment) of th_validate()
| C | lgpl-2.1 | tlwg/libthai,tlwg/libthai |
a718c85a2d55da2372278dcd9ae8977fd53197c3 | ios/KontaktBeacons.h | ios/KontaktBeacons.h | #if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#if __has_include("RCTEventEmitter.h")
#import "RCTEventEmitter.h"
#else
#import <React/RCTEventEmitter.h>
#endif
@interface KontaktBeacons : RCTEventEmitter <RCTBridgeModule>
@end
| #if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#if __has_include(<React/RCTEventEmitter.h>)
#import <React/RCTEventEmitter.h>
#else
#import "RCTEventEmitter.h"
#endif
@interface KontaktBeacons : RCTEventEmitter <RCTBridgeModule>
@end
| Fix imports for React Native 0.48.x. | Fix imports for React Native 0.48.x.
| C | mit | Artirigo/react-native-kontaktio,Artirigo/react-native-kontaktio,Artirigo/react-native-kontaktio,Artirigo/react-native-kontaktio,Artirigo/react-native-kontaktio |
8b55ba7d6d1fbd3244ce9e1bc19e691099274172 | src/clientversion.h | src/clientversion.h | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 8
#define CLIENT_VERSION_REVISION 6
#define CLIENT_VERSION_BUILD ... | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD ... | Update the version number to 0.9 for a beta build. | Update the version number to 0.9 for a beta build.
| C | mit | TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin,TacoCoin/tacocoin |
ce9d3b5bb566afb72d5d7ba4623f4f73b5dab830 | cantranslator/tests/bitfield_tests.c | cantranslator/tests/bitfield_tests.c | #include <check.h>
#include "bitfield.h"
START_TEST (test_foo)
{
fail_unless(1 == 2);
}
END_TEST
Suite* bitfieldSuite(void) {
Suite* s = suite_create("bitfield");
TCase *tc_core = tcase_create("core");
tcase_add_test(tc_core, test_foo);
suite_add_tcase(s, tc_core);
return s;
}
int main(void)... | #include <check.h>
#include <stdint.h>
#include "bitfield.h"
START_TEST (test_size)
{
uint8_t data = 0xFF;
fail_unless(getBitField(&data, 0, 4) == 0xF);
}
END_TEST
Suite* bitfieldSuite(void) {
Suite* s = suite_create("bitfield");
TCase *tc_core = tcase_create("core");
tcase_add_test(tc_core, test_... | Add a real test case for bitfield. | Add a real test case for bitfield.
This currently fails because we're not linking the test with the objects we want
to test. I tried adding the $(OBJS) variable to the build line, but because
those objects are all compiled with pic32-gcc it's not going to work.
I think the solution is to either:
Manually list the ob... | C | bsd-3-clause | mgiannikouris/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware |
c0e3faa7fc57ddefe8ecab3eca1fc866809c5def | sort_algorithms.c | sort_algorithms.c | /* Author: Dan Wilder
*
* School: University of Missouri - St. Louis
* Semester: Fall 2015
* Class: CS 3130 - Design and Analysis of Algorithms
* Instructor: Galina N. Piatnitskaia
*/
#include "sort_algorithms.h"
void swap(int *x, int *y) {
int temp = *x;
*x = *y
*y = temp;
}
void bubbleS... | /* Author: Dan Wilder
*
* School: University of Missouri - St. Louis
* Semester: Fall 2015
* Class: CS 3130 - Design and Analysis of Algorithms
* Instructor: Galina N. Piatnitskaia
*/
#include "sort_algorithms.h"
void swap(int *x, int *y) {
int temp = *x;
*x = *y
*y = temp;
}
void bubbleS... | Add swap counting in bubbleSort | Add swap counting in bubbleSort
| C | mit | sentientWilder/Search-and-Sort,sentientWilder/Search-and-Sort |
e812028de50245da9984aedc326093b0364332d1 | libarchivist/archivist/cache.h | libarchivist/archivist/cache.h | #ifndef ARCH_CACHE_H
#define ARCH_CACHE_H 1
#include "uuid.h"
#include "record.h"
#define ARCH_CACHE_MIN 31
typedef struct arch_cache_bucket {
arch_uuid_t uuid;
arch_record_t *record;
struct arch_cache_bucket *next;
} arch_cache_bucket_t;
typedef struct arch_cache {
struct arch_cache *old;
size_t size, entr... | #ifndef ARCH_CACHE_H
#define ARCH_CACHE_H 1
#include "uuid.h"
#include "record.h"
#define ARCH_CACHE_MIN 31
typedef struct arch_cache_bucket {
arch_uuid_t uuid;
arch_record_t *record;
struct arch_cache_bucket *next;
} arch_cache_bucket_t;
typedef struct arch_cache {
struct arch_cache *old;
size_t size, entr... | Add allocation helper macro ARCH_CACHE_BYTES() | Add allocation helper macro ARCH_CACHE_BYTES()
| C | bsd-2-clause | LambdaOS/Archivist |
b0fd54165257fa2c62c1e700c547b597778683bb | ionWindow/CWindowManager.h | ionWindow/CWindowManager.h |
#pragma once
#include <ionMath.h>
#include "CWindow.h"
#undef CreateWindow
enum class EWindowType
{
Fullscreen,
Windowed
};
class CWindowManager : public Singleton<CWindowManager>, public IEventListener
{
public:
void Init();
void PollEvents();
bool ShouldClose() const;
bool Run();
... |
#pragma once
#include <ionMath.h>
#include "CWindow.h"
enum class EWindowType
{
Fullscreen,
Windowed
};
class CWindowManager : public Singleton<CWindowManager>, public IEventListener
{
public:
void Init();
void PollEvents();
bool ShouldClose() const;
bool Run();
#undef CreateWindo... | Move CreateWindow undef to make its purpose more clear | Move CreateWindow undef to make its purpose more clear
| C | mit | iondune/ionEngine,iondune/ionEngine |
aa1c5191494846d7a7ce11a485bd24176be36886 | creator/plugins/tools/vcs/vcstoolplugin.h | creator/plugins/tools/vcs/vcstoolplugin.h | /******************************************************************************
* This file is part of the Gluon Development Platform
* Copyright (c) 2011 Laszlo Papp <lpapp@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Li... | /******************************************************************************
* This file is part of the Gluon Development Platform
* Copyright (c) 2011 Laszlo Papp <lpapp@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Li... | Add an empty initialize implementation in order to avoid the compilation error | Add an empty initialize implementation in order to avoid the compilation error
CCMAIL: ashwin_rajeev@hotmail.com
Commit "17496753" added a pure virtual initialize method to the plugin interface
without extending the vcstoolplugin subclass even just with an empty body, so
that is the reason why it got broken. It was n... | C | lgpl-2.1 | KDE/gluon,KDE/gluon,KDE/gluon,KDE/gluon |
19c9cc48d98add5e1f0414ce7d1885e6f3ed1e82 | src/homie-node-collection.h | src/homie-node-collection.h | #pragma once
#include "misc/welcome.hpp"
#include "misc/ota.hpp"
#include "Bme280Node.hpp"
#include "ContactNode.hpp"
#include "DHT22Node.hpp"
#include "RelayNode.hpp"
| #pragma once
#include "misc/welcome.hpp"
#include "misc/ota.hpp"
#include "Bme280Node.hpp"
#include "ButtonNode.hpp"
#include "ContactNode.hpp"
#include "DHT22Node.hpp"
#include "RelayNode.hpp"
| Include ButtonNode in header file | Include ButtonNode in header file
| C | mit | luebbe/homie-node-collection |
ee3c4d78acdfd67d161a3d9bac79e6597393d414 | tests/test_util.c | tests/test_util.c | /* Unit tests for small utility routines.
*
* SCL; 2016
*/
#include <stdlib.h>
#include "common.h"
#include "tests_common.h"
#include "gr1c_util.h"
int main( int argc, char **argv )
{
vartype bv[] = {0,1,0,1};
if (bitvec_to_int( bv, 4 ) != 0xA) {
ERRPRINT( "bitvec_to_int( [0,1,0,1], 4) != 0xA" )... | /* Unit tests for small utility routines.
*
* SCL; 2016
*/
#include <stdlib.h>
#include <assert.h>
#include "common.h"
#include "tests_common.h"
#include "gr1c_util.h"
void print_arr( FILE *fp, vartype *arr, int len )
{
int k;
assert( len > 0 );
fprintf( fp, "[" );
for (k = 0; k < len; k++) {
... | Implement generic check of bitvec_to_int() | TEST: Implement generic check of bitvec_to_int()
| C | bsd-3-clause | slivingston/gr1c,slivingston/gr1c,slivingston/gr1c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.