after stringlengths 72 2.11k | before stringlengths 21 1.55k | diff stringlengths 85 2.31k | instruction stringlengths 20 1.71k | license stringclasses 13
values | repos stringlengths 7 82.6k | commit stringlengths 40 40 |
|---|---|---|---|---|---|---|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
#include "transaction.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class DataStore {
pub... | #pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
#include "transaction.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class DataStore {
pub... | ---
+++
@@ -15,7 +15,7 @@
class DataStore {
public:
- Transaction&& begin();
+ Transaction && begin();
// Modifying methods
bool post(TaskId, SerializedTask&); | Fix lint error, whitespace around &&
| mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main | 48658eef3458ee99291bf3c89be06004bf487b13 |
#ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H
#include <string>
#include <unordered_map>
#include "statuscodes.h"
namespace ApiMock {
struct ResponseData {
std::string body;
std::unordered_map<std::string, std::string> headers;
HTTP_RESPONSE_CODE statusCode;
};
}
#endif | #ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H
#include <string>
namespace ApiMock {
struct ResponseData {
std::string body;
};
}
#endif | ---
+++
@@ -2,10 +2,14 @@
#define APIMOCK_RESPONSEDATA_H
#include <string>
+#include <unordered_map>
+#include "statuscodes.h"
namespace ApiMock {
struct ResponseData {
std::string body;
+ std::unordered_map<std::string, std::string> headers;
+ HTTP_RESPONSE_CODE statusCode;
};
}
| Add headers and status code to response
| mit | Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock | 8cb37afde89b4c89079f579f3532792d7dd5ff67 |
#ifndef PAPER_H
#define PAPER_H
#include <stdbool.h>
bool paper_is_start_of_first_word(size_t word_count, char *ptr)
{
return (word_count == 0 && *ptr != KATA_SPACE);
}
bool paper_is_start_of_subsequent_word(char *ptr)
{
// Lookback and see if the prior character was a space then check that
// we aren't ... | #ifndef PAPER_H
#define PAPER_H
#include <stdbool.h>
bool paper_is_start_of_first_word(char *ptr)
{
// Lookback and check if that is a NUL then check that we aren't
// currently on a space.
return (*(ptr - 1) == KATA_NUL && *ptr != KATA_SPACE);
}
bool paper_is_start_of_subsequent_word(char *ptr)
{
//... | ---
+++
@@ -3,11 +3,9 @@
#include <stdbool.h>
-bool paper_is_start_of_first_word(char *ptr)
+bool paper_is_start_of_first_word(size_t word_count, char *ptr)
{
- // Lookback and check if that is a NUL then check that we aren't
- // currently on a space.
- return (*(ptr - 1) == KATA_NUL && *ptr != KATA_S... | Refactor to fix potential buffer overflow.
| mit | jbenner-radham/pencil-durability-kata-c | a94d0b43cf4cf548d828fec548790a6da073bec1 |
/**
* @file
* @brief
*
* @author Anton Kozlov
* @date 30.10.2014
*/
#include <assert.h>
#include <stdint.h>
#include <system_stm32f4xx.h>
#include <framework/mod/options.h>
#include <module/embox/arch/system.h>
#include <hal/arch.h>
#include <stm32f4xx_wwdg.h>
void arch_init(void) {
static_assert(OPTION_M... | /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 30.10.2014
*/
#include <assert.h>
#include <stdint.h>
#include <system_stm32f4xx.h>
#include <framework/mod/options.h>
#include <module/embox/arch/system.h>
#include <hal/arch.h>
void arch_init(void) {
static_assert(OPTION_MODULE_GET(embox__arch__system... | ---
+++
@@ -13,6 +13,8 @@
#include <module/embox/arch/system.h>
#include <hal/arch.h>
+#include <stm32f4xx_wwdg.h>
+
void arch_init(void) {
static_assert(OPTION_MODULE_GET(embox__arch__system, NUMBER, core_freq) == 144000000);
SystemInit();
@@ -23,5 +25,16 @@
}
void arch_shutdown(arch_shutdown_mode_t mod... | stm32: Change shutdown to reset the board
| bsd-2-clause | gzoom13/embox,embox/embox,abusalimov/embox,Kakadu/embox,mike2390/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,abusalimov/embox,Kakadu/embox,Kakadu/embox,embox/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,gzoom13/embox,vrxfile/embox-trik,gzoom13/embox,abusalimov/embox,vrxfile/embox... | e369bd1813b725ba6d6f2effeaa7bd7cb6013664 |
// Copyright (c) 2015 Yandex LLC. All rights reserved.
// Author: Vasily Chekalkin <bacek@yandex-team.ru>
#ifndef SDCH_HANDLER_H_
#define SDCH_HANDLER_H_
#include <cstring> // For size_t
namespace sdch {
// SDCH Handler chain.
class Handler {
public:
// Construct Handler with pointer to the next Handler.
// W... | // Copyright (c) 2015 Yandex LLC. All rights reserved.
// Author: Vasily Chekalkin <bacek@yandex-team.ru>
#ifndef SDCH_HANDLER_H_
#define SDCH_HANDLER_H_
namespace sdch {
// SDCH Handler chain.
class Handler {
public:
// Construct Handler with pointer to the next Handler.
// We don't own this pointer. It's owne... | ---
+++
@@ -3,6 +3,8 @@
#ifndef SDCH_HANDLER_H_
#define SDCH_HANDLER_H_
+
+#include <cstring> // For size_t
namespace sdch {
| Fix compilation by using cstring include for size_t definition
| mit | yandex/sdch_module,yandex/sdch_module,yandex/sdch_module,yandex/sdch_module | 30c1b638dd5d5ec429067a3b2d386bf3f585bdd1 |
#ifndef KPUTS_H
#define KPUTS_H
#include <stdarg.h>
#include "drivers/terminal.h"
void kputs(char* string);
void kprintf(char* string, ...);
#endif
| #ifndef KPUTS_H
#define KPUTS_H
#include "drivers/terminal.h"
void kputs(char* string);
void kprint_int(char* string, int i);
#endif
| ---
+++
@@ -1,8 +1,9 @@
#ifndef KPUTS_H
#define KPUTS_H
+#include <stdarg.h>
#include "drivers/terminal.h"
void kputs(char* string);
-void kprint_int(char* string, int i);
+void kprintf(char* string, ...);
#endif | Update headers to match new printf
| mit | Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,Herbstein/kernel-of-truth,Herbstein/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth | fb0da0b3b4ece34207375ecddd022f2e2d5b7c52 |
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | ---
+++
@@ -23,7 +23,7 @@
class MicroErrorReporter : public ErrorReporter {
public:
- ~MicroErrorReporter() {}
+ ~MicroErrorReporter() override {}
int Report(const char* format, va_list args) override;
private: | Add override specifier to the destructor.
PiperOrigin-RevId: 306301066
Change-Id: Ied92a889ee7af2d0e9a420d55aa503c31b4eba92
| apache-2.0 | petewarden/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,annarev/tensorflow,annarev/tensorflow,yongtang/tensorflow,gunan/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,peteward... | 7a895c7cd2784c10e6922b16925797b18839d6b3 |
// Check target CPUs are correctly passed.
// RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s
// GENERIC: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic"
// RUN: %clang -target aarch64 -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
// CA53: "-cc1"{{.... | // Check target CPUs are correctly passed.
// RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s
// GENERIC: "-cc1"{{.*}} "-triple" "aarch64" {{.*}} "-target-cpu" "generic"
// RUN: %clang -target aarch64 -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
// CA53: "-cc1"{{... | ---
+++
@@ -1,10 +1,10 @@
// Check target CPUs are correctly passed.
// RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s
-// GENERIC: "-cc1"{{.*}} "-triple" "aarch64" {{.*}} "-target-cpu" "generic"
+// GENERIC: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic"
// RU... | AArch64: Fix wildcard matching on CHECK lines. Now recognises arch64--.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@193858 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... | 2f0754c068fb97036f2a78e56768e27e5668e3c7 |
#ifndef LINESRC_HPP
#define LINESRC_HPP
#include <stdint.h>
#include <string>
class haxpp_linesource {
private:
linecount_t lineno_start = 0;
linecount_t lineno = 0;
std::string sourcepath;
FILE* fp = nullptr;
char* line = nullptr;
size_t ... |
#ifndef LINESRC_HPP
#define LINESRC_HPP
#include <stdint.h>
#include <string>
class haxpp_linesource {
private:
linecount_t lineno_start = 0;
linecount_t lineno = 0;
std::string sourcepath;
FILE* fp = nullptr;
char* line = nullptr;
size_t ... | ---
+++
@@ -27,7 +27,7 @@
return line_alloc;
}
inline linecount_t currentline() const {
- return lineno;
+ return lineno_start;
}
public:
haxpp_linesource(); | Fix line number off by 1 error
| lgpl-2.1 | joncampbell123/haxcc,joncampbell123/haxcc,joncampbell123/haxcc,joncampbell123/haxcc,joncampbell123/haxcc | d997a15d48dd2d756b4aed69cae32df7d28c94de |
#pragma once
#include "onnx/onnx_pb.h"
#include "onnx/ir.h"
namespace onnx { namespace optimization {
enum class API_TYPE {
PROTO, IR
};
struct OptimizePass {
std::string name;
API_TYPE type;
explicit OptimizePass(const std::string& name, API_TYPE type)
: name(name), type(type) {
}
virtual void o... | #pragma once
#include "onnx/onnx_pb.h"
#include "onnx/ir.h"
namespace onnx { namespace optimization {
enum class API_TYPE {
PROTO, IR
};
struct OptimizePass {
std::string name;
API_TYPE type;
explicit OptimizePass(const std::string name, API_TYPE type)
: name(name), type(type) {
}
virtual void op... | ---
+++
@@ -14,7 +14,7 @@
std::string name;
API_TYPE type;
- explicit OptimizePass(const std::string name, API_TYPE type)
+ explicit OptimizePass(const std::string& name, API_TYPE type)
: name(name), type(type) {
}
| Fix the constructor of OptimizePass
| apache-2.0 | onnx/onnx,onnx/onnx,onnx/onnx,onnx/onnx | dd15514211cdcdc037368e6b584dfe79e58f3535 |
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#if __has_include(<React/RCTBridge.h>)
// React Native >= 0.40
#import <React/RCTBridge.h>
#else
// React Native <= 0.39
#import "RCTBridge.h"
#endif
@class BugsnagConfiguration;
@interface BugsnagReactNative: NSObject <RCTBridgeModule>
/**
* Ini... | #import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#if __has_include(<React/RCTBridge.h>)
// React Native >= 0.40
#import <React/RCTBridge.h>
#else
// React Native <= 0.39
#import "RCTBridge.h"
#endif
@class BugsnagConfiguration;
@interface BugsnagReactNative: NSObject <RCTBridgeModule>
/**
* Ini... | ---
+++
@@ -32,7 +32,9 @@
- (void)startWithOptions:(NSDictionary *)options;
- (void)leaveBreadcrumb:(NSDictionary *)options;
-- (void)notify:(NSDictionary *)payload;
+- (void)notify:(NSDictionary *)payload
+ resolve:(RCTPromiseResolveBlock)resolve
+ reject:(RCTPromiseRejectBlock)reject;
- (void)setU... | fix: Synchronize decl and impl of notify(…) | mit | bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native,bugsnag/bugsnag-react-native | b933e0fbb8c85434bf54f772dd07b57e52440089 |
#include "random.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
void
seed_random(void)
{
/* Single iteration of Xorshift to get a good seed. */
unsigned int seed = time(NULL) ^ getpid();
seed ^= (seed << 19);
seed ^= (seed >> 11);
seed ^= (seed << 9);
fprintf(stderr, "seed = %u... | #include "random.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
void
seed_random(void)
{
/* Single iteration of Xorshift to get a good seed. */
unsigned int seed = time(NULL) ^ getpid();
seed ^= (seed << 19);
seed ^= (seed >> 11);
seed ^= (seed << 9);
printf("seed = %u\n", seed... | ---
+++
@@ -14,7 +14,7 @@
seed ^= (seed >> 11);
seed ^= (seed << 9);
- printf("seed = %u\n", seed);
+ fprintf(stderr, "seed = %u\n", seed);
srandom(seed);
}
| Print seed to stderr, not stdout.
| mit | ingramj/dice | bb2994d4d628484f1bb1befa0b7098db71d74a4d |
// Copyright 2013 by Tetsuo Kiso
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | // Copyright 2013 by Tetsuo Kiso
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | ---
+++
@@ -17,7 +17,12 @@
// As of OS X 10.9, it looks like C++ TR1 headers are removed from the
// search paths. Instead, we can include C++11 headers.
-#if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+#if defined(__APPLE__)
+#include <AvailabilityMacros.h>
+#endif
+
+#if define... | Include the OS X specific header to use OS specific macros.
| apache-2.0 | clab/fast_align,spanishdict/fast_align,LoreDema/fast_align,clab/fast_align,christianbuck/fast_align,LoreDema/fast_align,spanishdict/fast_align,christianbuck/fast_align | 7e3576d2e120fb69cc360c976341bf5491bbb633 |
/*
* Copyright 2015 Wink Saville
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | /*
* Copyright 2015 Wink Saville
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | ---
+++
@@ -35,3 +35,9 @@
return s;
}
+/**
+ * Set memory, compiler needs this for initializing structs and such.
+ */
+void* memset(void *s, int val, ac_size_t count) {
+ return ac_memset(s, val, count);
+} | Add memset, needed by compiler for initializing structs and such
| apache-2.0 | winksaville/sadie,winksaville/sadie | 26f5dea4e721592f0e64183b9d0a325174487231 |
// RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') abc()" "typeof(expr: identifier) (aka 'long *') xyz()"
long *x;
__typeof(int *) ip;
__type... | // RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') xyz()"
long *x;
__typeof(int *) ip;
__typeof(int *) *a1;
__typeof(int *) a2[2];
__typeof(i... | ---
+++
@@ -1,4 +1,4 @@
-// RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') xyz()"
+// RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %out... | Add trailing return type to type printing test
| mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler | 0b78dce3a2bd416375327b1e4436883da673009e |
#pragma once
#include "Sprite.h"
#include "FontAsset.h"
class Text : public Sprite {
private:
std::shared_ptr<FontAsset> asset;
std::string str;
public:
Text(std::shared_ptr<FontAsset> asset, const std::string str, const Point2 pos = Point2(0), const Origin origin = Origin::BottomLeft,
const Point4 color = Point... | #pragma once
#include "Sprite.h"
#include "FontAsset.h"
class Text : public Sprite {
private:
std::shared_ptr<FontAsset> asset;
std::string str;
public:
Text(std::shared_ptr<FontAsset> asset, const std::string str, const Point2 pos = Point2(0), const Origin origin = Origin::BottomLeft,
const Point4 color = Point... | ---
+++
@@ -13,7 +13,18 @@
: asset(asset), str(str), Sprite(pos, origin, color, scale) {}
void RenderMe() override final {
- SDL(surface = TTF_RenderUTF8_Blended(asset->font, str.data(), { 255, 255, 255, 255 }));
+ // we render the outline first to make a drop-shadow effect
+
+ SDL(TTF_SetFontOutline(asset-... | Add black drop-shadow outline to text
| mpl-2.0 | shockkolate/polar4,shockkolate/polar4,polar-engine/polar,shockkolate/polar4,polar-engine/polar,shockkolate/polar4 | 28745fcea6f0fe7e26f565ab756bdc2bbb174abc |
// http://stackoverflow.com/a/7933931/141220
#define TDTSuppressPerformSelectorLeakWarning(code) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
code; \
_Pragma("clang diagnostic pop") \
} while (0)
| // http://stackoverflow.com/a/7933931/141220
#define TDTSuppressPerformSelectorLeakWarning(CODE) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
CODE; \
_Pragma("clang diagnostic pop") \
} while (0)
| ---
+++
@@ -1,10 +1,10 @@
// http://stackoverflow.com/a/7933931/141220
-#define TDTSuppressPerformSelectorLeakWarning(CODE) \
+#define TDTSuppressPerformSelectorLeakWarning(code) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
- CODE... | Revert to lowercase macro arguments
They match the convention in `TDTAssert.h`
| bsd-3-clause | talk-to/Chocolate,talk-to/Chocolate | 85e2b7bbeecbae82e17051c1095642988a26de43 |
/* 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... | ---
+++
@@ -17,9 +17,18 @@
void bubbleSort(int arr[], int size) {
/* with swaps counting.
*/
- int i, j;
- for (i = 0; i <= size-1; ++i)
+ int i, j, swaps;
+
+ for (i = 0; i <= size-1; ++i) {
+ swaps = 0;
+
for (j = size; j >= i+1; --j)
- if (arr[j] < arr[j-1])
+ if (arr[j] < arr... | Add swap counting in bubbleSort
| mit | sentientWilder/Search-and-Sort,sentientWilder/Search-and-Sort | c0e3faa7fc57ddefe8ecab3eca1fc866809c5def |
#ifndef __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
#define __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
#include <pt/pt.h>
class RCoRoutineRunner
{
public:
RCoRoutineRunner();
virtual
~RCoRoutineRunner();
virtual char
run();
public:
struct pt mPt;
};
#endif // __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658... | #ifndef __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
#define __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
#include <pt.h>
class RCoRoutineRunner
{
public:
RCoRoutineRunner();
virtual
~RCoRoutineRunner();
virtual char
run();
public:
struct pt mPt;
};
#endif // __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
| ---
+++
@@ -1,7 +1,7 @@
#ifndef __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
#define __INCLUDED_ECE554E80AF211E7AA6EA088B4D1658C
-#include <pt.h>
+#include <pt/pt.h>
class RCoRoutineRunner
{ | Use protothread library which included in RabirdToolkitThirdParties
| mit | starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdTookit,starofrainnight/ArduinoRabirdToolkit | 56841922d1e0ee90cdd2bdf10c8fead846560897 |
/*
* Header file for the definitions of packers/protectors
*
* Tim "diff" Strazzere <strazz@gmail.com>
*/
typedef struct {
char* name;
char* description;
char* filter;
char* marker;
} packer;
static packer packers[] = {
// APKProtect
{
"APKProtect v1->5",
"APKProtect generialized detection",
... | /*
* Header file for the definitions of packers/protectors
*
* Tim "diff" Strazzere <strazz@gmail.com>
*/
typedef struct {
char* name;
char* description;
char* filter;
char* marker;
} packer;
static packer packers[] = {
// APKProtect
{
"APKProtect v1->5",
"APKProtect generialized detection",
... | ---
+++
@@ -22,6 +22,14 @@
"/libAPKProtect"
},
+ // Bangcle (??) or something equally silly
+ {
+ "Bangcle (??) silly version",
+ "Something silly used by malware",
+ "classes.dex",
+ "/app_lib/"
+ },
+
// LIAPP
{
"LIAPP 'Egg' (v1->?)", | Add detection for whatever silly protector new malware was using.
Closes issue #22
| apache-2.0 | strazzere/android-unpacker,strazzere/android-unpacker | 1009adc8cf7154d19c7ffebc2e35d70722076ea8 |
#ifndef _RSA_H_
#define _RSA_H_
#include "mpi.h"
/* Everything must be kept private except for n and e.
* (n,e) is the public key, (n,d) is the private key. */
typedef struct {
mpi_t n; /* modulus n = pq */
mpi_t phi; /* phi = (p-1)(q-1) */
mpi_t e; /* public exponent 1 < e < phi s.t. gcd(e,phi)=1 */
mpi_t d; ... | #ifndef _RSA_H_
#define _RSA_H_
#include "mpi.h"
/* Everything must be kept private except for n and e.
* (n,e) is the public key, (n,d) is the private key. */
typedef struct {
mpi_t n; /* modulus n = pq */
mpi_t phi; /* phi = (p-1)(q-1) */
mpi_t e; /* public exponent 1 < e < phi s.t. gcd(e,phi)=1 */
mpi_t d; ... | ---
+++
@@ -12,7 +12,7 @@
mpi_t d; /* secret exponent 1 < d < phi s.t. ed=1 (mod phi) */
} rsa_ctx;
-void rsa_init(rsa_ctx *rsa, unsigned bits, mp_rand_ctx *rand_ctx);
+void rsa_init(rsa_ctx *rsa, unsigned bits, mt64_context *rand_ctx);
void rsa_free(rsa_ctx *rsa);
/* Transform cleartext into encrypted data... | Use mt64_context instead of mp_rand_ctx
| bsd-2-clause | fmela/weecrypt,fmela/weecrypt | 697549c5dc3f200b4bc13971fe4cc19aa4bd2c74 |
//
// SloppySwiper.h
//
// Created by Arkadiusz on 29-05-14.
//
#import <Foundation/Foundation.h>
@interface SloppySwiper : NSObject <UINavigationControllerDelegate>
/// Gesture recognizer used to recognize swiping to the right.
@property (weak, nonatomic) UIPanGestureRecognizer *panRecognizer;
/// Designated ini... | //
// SloppySwiper.h
//
// Created by Arkadiusz on 29-05-14.
//
#import <Foundation/Foundation.h>
@interface SloppySwiper : NSObject <UINavigationControllerDelegate>
// Designated initializer if the class isn't set in the Interface Builder.
- (instancetype)initWithNavigationController:(UINavigationController *)nav... | ---
+++
@@ -8,7 +8,10 @@
@interface SloppySwiper : NSObject <UINavigationControllerDelegate>
-// Designated initializer if the class isn't set in the Interface Builder.
+/// Gesture recognizer used to recognize swiping to the right.
+@property (weak, nonatomic) UIPanGestureRecognizer *panRecognizer;
+
+/// Desig... | Improve comments in the header file | mit | toc2menow/SloppySwiper,ssowonny/SloppySwiper,stephenbalaban/SloppySwiper,fastred/SloppySwiper,msdgwzhy6/SloppySwiper,igroomgrim/SloppySwiper,barrettj/SloppySwiper,yusuga/SloppySwiper,xuvw/SloppySwiper | e77d038d2bed3605d18c83152402a5ddfd7255dd |
#include "fitz_base.h"
#include "fitz_stream.h"
fz_error
fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
fz_error reason;
unsigned char *oldrp;
unsigned char *oldwp;
oldrp = in->rp;
oldwp = out->wp;
if (f->done)
return fz_iodone;
assert(!out->eof);
reason = f->process(f, in, out);
assert(i... | #include "fitz_base.h"
#include "fitz_stream.h"
fz_error
fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
fz_error reason;
unsigned char *oldrp;
unsigned char *oldwp;
assert(!out->eof);
oldrp = in->rp;
oldwp = out->wp;
if (f->done)
return fz_iodone;
reason = f->process(f, in, out);
assert(i... | ---
+++
@@ -8,13 +8,13 @@
unsigned char *oldrp;
unsigned char *oldwp;
- assert(!out->eof);
-
oldrp = in->rp;
oldwp = out->wp;
if (f->done)
return fz_iodone;
+
+ assert(!out->eof);
reason = f->process(f, in, out);
| Move assert test of EOF to after testing if a filter is done.
| agpl-3.0 | tophyr/mupdf,PuzzleFlow/mupdf,derek-watson/mupdf,cgogolin/penandpdf,ArtifexSoftware/mupdf,asbloomf/mupdf,lamemate/mupdf,lolo32/mupdf-mirror,lolo32/mupdf-mirror,loungeup/mupdf,knielsen/mupdf,kobolabs/mupdf,asbloomf/mupdf,TamirEvan/mupdf,hjiayz/forkmupdf,hackqiang/mupdf,seagullua/MuPDF,MokiMobility/muPDF,nqv/mupdf,sebras... | f86f4873e8aef4d54ea45abc70b5f45af204186a |
//
// Created by Dawid Drozd aka Gelldur on 05.02.16.
//
#pragma once
#include <string>
#include <memory>
#include <api/ApiThreadPool.h>
#include <data/Preferences.h>
#include <platform/Bridge.h>
#include <screen/ScreenCreator.h>
#include "UILoop.h"
class Application
{
public:
Application(CrossMobile::Platform::B... | //
// Created by Dawid Drozd aka Gelldur on 05.02.16.
//
#pragma once
#include <string>
#include <memory>
#include <api/ApiThreadPool.h>
#include <data/Preferences.h>
#include <platform/Bridge.h>
#include <screen/ScreenCreator.h>
#include "UILoop.h"
class Application
{
public:
Application(CrossMobile::Platform::B... | ---
+++
@@ -31,7 +31,7 @@
ApiThreadPool& getApiThreadPool()
{
- return *_apiThreadPool;
+ return _apiThreadPool;
}
Preferences& getPreferences()
@@ -47,7 +47,7 @@
private:
UILoop _uiLoop;
- std::unique_ptr<ApiThreadPool> _apiThreadPool;
+ ApiThreadPool _apiThreadPool;
Preferences _preferences;
... | Fix ApiThreadPool after android changes
| apache-2.0 | gelldur/DexodeEngine,gelldur/DexodeEngine,gelldur/DexodeEngine | 1210d9a9faf1f60edd489b74c9b74414fcacb6c2 |
#include "Inputs/zeroFunctionFile.h"
int foo(int x) {
return NOFUNCTIONS(x);
}
int main() {
return foo(2);
}
// RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata
// RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPO... | #include "Inputs/zeroFunctionFile.h"
int foo(int x) {
return NOFUNCTIONS(x);
}
int main() {
return foo(2);
}
// RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata
// RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPO... | ---
+++
@@ -13,7 +13,7 @@
// REPORT: 0 0 - 0 0 - 0 0 - 0 0 -
// REPORT-NO: 0%
-// RUN: llvm-cov show %S/Inputs/zeroFunctionFile.covmapping -format html -instr-profile %t.profdata -o %t.d... | [llvm-cov] Disable threading in a test. NFC.
PR30735 reports an issue where llvm-cov hangs with a worker thread
waiting on a condition, and the main thread waiting to join() the
workers. While this doesn't appear to be a bug in llvm-cov or the
ThreadPool implementation, it would be helpful to disable the use of
thread... | apache-2.0 | llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Dri... | 8d7d203342f1573938e99d984ca335f05e1415bb |
#include <string.h>
#include "proxrcmds.h"
#include "sim-hab.h"
void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value)
{
double data;
double content;
int id;
bionet_node_t *node;
bionet_value_get_double(value, &data);
if(data < 0 || data > 255)
return;
node = bionet_res... | #include <string.h>
#include "proxrcmds.h"
#include "sim-hab.h"
void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value)
{
double data;
double content;
int id;
bionet_node_t *node;
bionet_value_get_float(value, &data);
if(data < 0 || data > 255)
return;
node = bionet_reso... | ---
+++
@@ -9,7 +9,7 @@
int id;
bionet_node_t *node;
- bionet_value_get_float(value, &data);
+ bionet_value_get_double(value, &data);
if(data < 0 || data > 255)
return;
| Change another float to double.
| lgpl-2.1 | ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead | 59d679f48e3c528ed883b8d0142b2e5086b2d45c |
/*
* Modified version of Keypoint.h
* Source location: https://github.com/pippy360/transformationInvariantImageSearch/blob/master/fullEndToEndDemo/src/Keypoint.h
*/
#pragma once
#ifndef REVERSE_IMAGE_SEARCH_KEYPOINT_H
#define REVERSE_IMAGE_SEARCH_KEYPOINT_H
#include <iostream>
#include <sstream>
#include <math.h>
u... | /*
* Modified version of Keypoint.h
* Source location: https://github.com/pippy360/transformationInvariantImageSearch/blob/master/fullEndToEndDemo/src/Keypoint.h
*/
#pragma once
#ifndef REVERSE_IMAGE_SEARCH_KEYPOINT_H
#define REVERSE_IMAGE_SEARCH_KEYPOINT_H
#include <iostream>
#include <sstream>
using namespace std... | ---
+++
@@ -8,6 +8,7 @@
#include <iostream>
#include <sstream>
+#include <math.h>
using namespace std;
@@ -30,7 +31,7 @@
}
};
-namespace hash {
+namespace std {
template <>
struct hash<KeyPoint> {
std::size_t operator()(const KeyPoint &k) const { | Resolve compilation issue due to missing math.h inclusion
| mit | rmcqueen/reverse-image-search | 58aa106997fb828a292457b0668e8497fa253f7d |
#ifndef KISS_TEMPLATES_KISTE_H
#define KISS_TEMPLATES_KISTE_H
#include <kiste/terminal.h>
#include <kiste/raw.h>
#endif
| #ifndef KISS_TEMPLATES_KISTE_H
#define KISS_TEMPLATES_KISTE_H
#include <kiste/terminal.h>
#include <kiste/raw.h>
namespace kiste
{
struct terminal_t
{
};
constexpr auto terminal = terminal_t{};
struct raw
{
std::ostream& _os;
template <typename T>
auto operator()(T&& t) const -> void
{
... | ---
+++
@@ -4,23 +4,4 @@
#include <kiste/terminal.h>
#include <kiste/raw.h>
-namespace kiste
-{
- struct terminal_t
- {
- };
- constexpr auto terminal = terminal_t{};
-
- struct raw
- {
- std::ostream& _os;
-
- template <typename T>
- auto operator()(T&& t) const -> void
- {
- _os << std::f... | Remove types left over from header split | bsd-2-clause | rbock/kiss-templates,AndiDog/kiss-templates,rbock/kiss-templates,AndiDog/kiss-templates,AndiDog/kiss-templates,rbock/kiss-templates | 452bc34d386c7158c042e2059b6a020ddd4a7e7f |
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/config/helper/configfetcher.h>
#include <vespa/config/subscription/configuri.h>
#include <vespa/config-stateserver.h>
namespace vespalib {
struct HealthProducer;
struct Metric... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/config/helper/configfetcher.h>
#include <vespa/config/subscription/configuri.h>
#include <vespa/config-stateserver.h>
namespace vespalib {
class HealthProducer;
class MetricsP... | ---
+++
@@ -5,9 +5,9 @@
#include <vespa/config-stateserver.h>
namespace vespalib {
- class HealthProducer;
- class MetricsProducer;
- class ComponentConfigProducer;
+ struct HealthProducer;
+ struct MetricsProducer;
+ struct ComponentConfigProducer;
class StateServer;
}
namespace slobrok ... | Adjust forward declarations in slobrok.
| apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa | 24aa328ddab86fd861961b1d68091d334d773d75 |
/*
* dremf() wrapper for remainderf().
*
* Written by J.T. Conklin, <jtc@wimsey.com>
* Placed into the Public Domain, 1994.
*/
/* $FreeBSD$ */
#include "math.h"
#include "math_private.h"
float
dremf(float x, float y)
{
return remainderf(x, y);
}
| /*
* dremf() wrapper for remainderf().
*
* Written by J.T. Conklin, <jtc@wimsey.com>
* Placed into the Public Domain, 1994.
*/
#include "math.h"
#include "math_private.h"
float
dremf(x, y)
float x, y;
{
return remainderf(x, y);
}
| ---
+++
@@ -4,13 +4,13 @@
* Written by J.T. Conklin, <jtc@wimsey.com>
* Placed into the Public Domain, 1994.
*/
+/* $FreeBSD$ */
#include "math.h"
#include "math_private.h"
float
-dremf(x, y)
- float x, y;
+dremf(float x, float y)
{
return remainderf(x, y);
} | Work around known GCC 3.4.x problem and use ANSI prototype for dremf().
| 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 | d037fe2cca7e0cdc8bfe48b67480201458d083d0 |
#include "redislite.h"
#include "page_string.h"
#include "util.h"
#include <string.h>
#include <stdlib.h>
#include <math.h>
void redislite_free_freelist(void *_db, void *_page)
{
redislite_page_string* page = (redislite_page_string*)_page;
if (page == NULL) return;
redislite_free(page);
}
void redislite_write_fre... | #include "redislite.h"
#include "page_string.h"
#include "util.h"
#include <string.h>
#include <stdlib.h>
#include <math.h>
void redislite_free_freelist(void *_db, void *_page)
{
redislite_page_string* page = (redislite_page_string*)_page;
if (page == NULL) return;
redislite_free(page);
}
void redislite_write_fre... | ---
+++
@@ -19,18 +19,15 @@
redislite_page_string* page = (redislite_page_string*)_page;
if (page == NULL) return;
- data[0] = REDISLITE_PAGE_TYPE_FREELIST;
- redislite_put_4bytes(&data[1], 0); // reserverd
- redislite_put_4bytes(&data[5], page->right_page);
- int size = db->page_size-9;
- memset(&data[9], 0, s... | Remove unused byte in freelist
| bsd-2-clause | pombredanne/redislite,seppo0010/redislite,pombredanne/redislite,seppo0010/redislite | 88238b76084bb7d7e5f2c54a0b4fc56b446af1c4 |
#ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
#else
#define _XOPEN_SOURCE 600
#endif
#if __APPLE__ && __MACH__
#define _OSX
#endif
#endif
| #ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
#elif defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define _XOPEN_SOURCE 600
#else
#define _XOPEN_SOURCE
#endif
#if... | ---
+++
@@ -8,10 +8,8 @@
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
-#elif defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#else
#define _XOPEN_SOURCE 600
-#else
-#define _XOPEN_SOURCE
#endif
#if __APPLE__ && __MACH__ | Fix strerror_r on some esoteric platforms
Defining _XOPEN_SOURCE=1 causes strange behavior on Debian kfreebsd
archs (i.e. GNU userspace with FreeBSD kernel) when _GNU_SOURCE is not
defined.
Not sure I fully understand the bizarre semantics, but it seems to
use the XSI-compliant interface
(int strerror_r(int, char*, s... | bsd-3-clause | thomaslee/hiredis,thomaslee/hiredis,jinguoli/hiredis,owent-contrib/hiredis,owent-contrib/hiredis,redis/hiredis,redis/hiredis,jinguoli/hiredis,redis/hiredis,jinguoli/hiredis,charsyam/hiredis,charsyam/hiredis | bb1747b1bf92431e5c5e9699824d2ef52f863f45 |
#include <Instrument.h> // the base class for this instrument
class MYINST : public Instrument {
public:
MYINST();
virtual ~MYINST();
virtual int init(double *, int);
virtual int configure();
virtual int run();
private:
void doupdate();
float *_in;
int _nargs, _inchan, _branch;
float _amp, _pan;
};
| #include <Instrument.h> // the base class for this instrument
class MYINST : public Instrument {
public:
MYINST();
virtual ~MYINST();
virtual int init(double *, int);
virtual int configure();
virtual int run();
private:
void doupdate();
int _nargs, _inchan, _branch;
float _amp, _pan;
float *_in;
};
| ---
+++
@@ -12,8 +12,8 @@
private:
void doupdate();
+ float *_in;
int _nargs, _inchan, _branch;
float _amp, _pan;
- float *_in;
};
| Change order of declarations to suppress compiler warning.
| apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix | cdc4160c8aff31bdb7859285d021f5a122ed755d |
#import <Foundation/Foundation.h>
#ifndef CMHErrors_h
#define CMHErrors_h
static NSString *const CMHErrorDomain = @"me.cloudmine.CMHealth.ErrorDomain";
typedef NS_ENUM(NSUInteger, CMHError) {
CMHErrorUserMissingConsent = 700,
CMHErrorUserMissingSignature = 701,
CMHErrorUserDidNotConsent = 7... | #import <Foundation/Foundation.h>
#ifndef CMHErrors_h
#define CMHErrors_h
static NSString *const CMHErrorDomain = @"CMHErrorDomain";
typedef NS_ENUM(NSUInteger, CMHError) {
CMHErrorUserMissingConsent = 700,
CMHErrorUserMissingSignature = 701,
CMHErrorUserDidNotConsent = 702,
CMHErrorUse... | ---
+++
@@ -3,7 +3,7 @@
#ifndef CMHErrors_h
#define CMHErrors_h
-static NSString *const CMHErrorDomain = @"CMHErrorDomain";
+static NSString *const CMHErrorDomain = @"me.cloudmine.CMHealth.ErrorDomain";
typedef NS_ENUM(NSUInteger, CMHError) {
CMHErrorUserMissingConsent = 700, | Use Apple recommended format for error domain string
| mit | cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK | 9d4afff04d96cc793aaddd386f8d138652ed9d6c |
#include <stdio.h>
#include <stdlib.h>
#include "error.h"
#include "memory.h"
#define READ_SIZE 0x4000
static void usage(void)
{
fprintf(stderr, "usage: tmpgb <file>");
exit(EXIT_FAILURE);
}
static void load_rom(const char *rom)
{
FILE *fp;
unsigned char buffer[READ_SIZE];
size_t nread;
int i = -1;
fp = fop... | #include <stdio.h>
#include <stdlib.h>
#include "error.h"
#include "memory.h"
#define READ_SIZE 0x4000
static void usage(void)
{
fprintf(stderr, "usage: tmpgb <file>");
exit(EXIT_FAILURE);
}
static void load_rom(const char *rom)
{
FILE *fp;
unsigned char *buffer[READ_SIZE];
size_t nread;
int i = -1;
fp = fo... | ---
+++
@@ -15,7 +15,7 @@
static void load_rom(const char *rom)
{
FILE *fp;
- unsigned char *buffer[READ_SIZE];
+ unsigned char buffer[READ_SIZE];
size_t nread;
int i = -1;
| Fix error with char pointer
| mit | hoferm/tmpgb,hoferm/tmpgb | d65adf9603243c66f9c7f4b5adc2a850c40a146c |
#ifndef _FIX_WINSOCK2_H
#define _FIX_WINSOCK2_H 1
#include_next <winsock2.h>
// mingw 4.0.x has broken headers (#9246) but mingw-w64 does not.
#if defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION == 4
typedef struct pollfd {
SOCKET fd;
short events;
short revents;
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLF... | #ifndef _FIX_WINSOCK2_H
#define _FIX_WINSOCK2_H 1
#include_next <winsock2.h>
typedef struct pollfd {
SOCKET fd;
short events;
short revents;
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
#endif
| ---
+++
@@ -2,6 +2,9 @@
#define _FIX_WINSOCK2_H 1
#include_next <winsock2.h>
+
+// mingw 4.0.x has broken headers (#9246) but mingw-w64 does not.
+#if defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION == 4
typedef struct pollfd {
SOCKET fd;
@@ -10,3 +13,5 @@
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
... | Define WSAPOLLFD only on mingw 4.x
Fixes #10327
| apache-2.0 | Ryman/rust,andars/rust,KokaKiwi/rust,bhickey/rand,kimroen/rust,kwantam/rust,jbclements/rust,vhbit/rust,jbclements/rust,nham/rust,rohitjoshi/rust,AerialX/rust-rt-minimal,erickt/rust,GBGamer/rust,aepsil0n/rust,reem/rust,defuz/rust,nwin/rust,nham/rust,SiegeLord/rust,miniupnp/rust,rohitjoshi/rust,XMPPwocky/rust,pshc/rust,m... | d01ba2e824813f5ab4eb0b379caf77fe93d6911c |
#pragma once
#include "OSD\OSD.h"
#include "SliderWnd.h"
class VolumeSlider : public OSD {
public:
VolumeSlider(HINSTANCE hInstance, Settings &settings);
void Hide();
private:
SliderWnd _sWnd;
};
| #pragma once
#include "OSD\OSD.h"
#include "MeterWnd\MeterWnd.h"
class VolumeSlider : public OSD {
public:
VolumeSlider(HINSTANCE hInstance, Settings &settings);
void Hide();
private:
MeterWnd _mWnd;
};
| ---
+++
@@ -1,7 +1,7 @@
#pragma once
#include "OSD\OSD.h"
-#include "MeterWnd\MeterWnd.h"
+#include "SliderWnd.h"
class VolumeSlider : public OSD {
public:
@@ -10,6 +10,6 @@
void Hide();
private:
- MeterWnd _mWnd;
+ SliderWnd _sWnd;
}; | Use a sliderwnd instance to implement the volume slider
| bsd-2-clause | malensek/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX | 44b9b99aaa607272a4e90ae42d4aba051b85fb22 |
#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... |
#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();
... | ---
+++
@@ -4,7 +4,6 @@
#include <ionMath.h>
#include "CWindow.h"
-#undef CreateWindow
enum class EWindowType
@@ -23,6 +22,7 @@
bool ShouldClose() const;
bool Run();
+#undef CreateWindow
CWindow * CreateWindow(vec2i const & Size, std::string const & Title, EWindowType const Type);
protected: | Move CreateWindow undef to make its purpose more clear
| mit | iondune/ionEngine,iondune/ionEngine | b0fd54165257fa2c62c1e700c547b597778683bb |
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol WMFAnalyticsContextProviding <NSObject>
- (NSString*)analyticsContext;
@end
@protocol WMFAnalyticsContentTypeProviding <NSObject>
- (NSString*)analyticsContentType;
@end
@protocol WMFAnalyticsViewNameProviding <NSObject>
- (NSString*)analytics... | #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol WMFAnalyticsLogging <NSObject>
- (NSString*)analyticsName;
@end
NS_ASSUME_NONNULL_END | ---
+++
@@ -2,7 +2,19 @@
NS_ASSUME_NONNULL_BEGIN
-@protocol WMFAnalyticsLogging <NSObject>
+@protocol WMFAnalyticsContextProviding <NSObject>
+
+- (NSString*)analyticsContext;
+
+@end
+
+@protocol WMFAnalyticsContentTypeProviding <NSObject>
+
+- (NSString*)analyticsContentType;
+
+@end
+
+@protocol WMFAnalyticsV... | Add additional protocols for tracking context, content type, and analytics name
| mit | anirudh24seven/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,bgerstle/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,bgerstle/wikipedia-ios,montehurd... | 5c4a5fd8eeef6942ff79b519aa86b195a1e70aaf |
#include "e.h"
/* local subsystem functions */
/* local subsystem globals */
/* externally accessible functions */
EAPI void
e_error_message_show_internal(char *txt)
{
/* FIXME: maybe log these to a file and display them at some point */
printf("<<<< Enlightenment Error >>>>\n%s\n", txt);
}
/* local subsystem... | #include "e.h"
/* local subsystem functions */
/* local subsystem globals */
/* externally accessible functions */
EAPI void
e_error_message_show_internal(char *txt)
{
/* FIXME: maybe log these to a file and display them at some point */
printf("<<<< Enlightenment Error >>>>\n"
"%s\n",
txt);
}
/* local ... | ---
+++
@@ -9,9 +9,7 @@
e_error_message_show_internal(char *txt)
{
/* FIXME: maybe log these to a file and display them at some point */
- printf("<<<< Enlightenment Error >>>>\n"
- "%s\n",
- txt);
+ printf("<<<< Enlightenment Error >>>>\n%s\n", txt);
}
/* local subsystem functions */ | E: Fix formatting. (Really ??? 3 lines for something that can fit on
one ?)
SVN revision: 61614
| bsd-2-clause | tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tasn/enlightenment,FlorentRevest/Enlightenment | 50dd6a56970747d566d2ce3eee4305e2e530a16d |
/*
* Copyright (c) 2016-2017, Texas Instruments Incorporated
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <inc/hw_types.h>
#include <driverlib/prcm.h>
/*
* CMSIS IRQn_Type enum is broken relative to ARM GNU compiler.
*
* So redefine the IRQn_Type enum to a unsigned int to avoid
* the ARM compiler from ... | /*
* Copyright (c) 2016, Texas Instruments Incorporated
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <inc/hw_types.h>
#include <driverlib/prcm.h>
| ---
+++
@@ -1,7 +1,38 @@
/*
- * Copyright (c) 2016, Texas Instruments Incorporated
+ * Copyright (c) 2016-2017, Texas Instruments Incorporated
*
* SPDX-License-Identifier: Apache-2.0
*/
+
#include <inc/hw_types.h>
#include <driverlib/prcm.h>
+
+/*
+ * CMSIS IRQn_Type enum is broken relative to ARM GNU compil... | cc32xx: Redefine CMSIS IRQn_Type enum to unsigned int
Previously, calling NVIC_SetPriority(IRQn_Type irqn, ....) with
the NWP interrupt number of 171 caused a hard fault during a
subsequent svc #0 instruction during _Swap().
GNU compiler is generating a bit extension instruction (sxtb) which
converts a positive IRQ v... | apache-2.0 | runchip/zephyr-cc3220,fbsder/zephyr,punitvara/zephyr,nashif/zephyr,punitvara/zephyr,finikorg/zephyr,Vudentz/zephyr,fbsder/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,rsalveti/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,aceofall/zephyr-iotos,explora26/zephyr,ldts/zephyr,zephyriot/ze... | 1a5537811f3faf7171f282321aa91f8ef1f8dd35 |
#ifndef TRACKEDPOINT_H
#define TRACKEDPOINT_H
#include <opencv2/core/affine.hpp>
#include "TrackingData.h"
namespace sensekit { namespace plugins { namespace hand {
struct TrackedPoint
{
public:
cv::Point m_position;
cv::Point3f m_worldPosition;
cv::Point3f m_worldDeltaPosition;
... | #ifndef TRACKEDPOINT_H
#define TRACKEDPOINT_H
#include <opencv2/core/affine.hpp>
#include "TrackingData.h"
namespace sensekit { namespace plugins { namespace hand {
struct TrackedPoint
{
public:
cv::Point m_position;
cv::Point3f m_worldPosition;
cv::Point3f m_steadyWorldPosition;
... | ---
+++
@@ -11,12 +11,10 @@
public:
cv::Point m_position;
cv::Point3f m_worldPosition;
+ cv::Point3f m_worldDeltaPosition;
cv::Point3f m_steadyWorldPosition;
- cv::Point3f m_worldDeltaPosition;
int m_trackingId;
int m_inactiveFrameCount;
- float m... | Remove old tracked point fields
| apache-2.0 | orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra | 0f993209fdd1e8bed4e9fd3d9ba758416b39eaa8 |
/*
* This file is part of gspell, a spell-checking library.
*
* Copyright 2016 - Ignacio Casal Quinteiro <icq@gnome.org>
* Copyright 2016 - Sébastien Wilmet <swilmet@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Licens... | /*
* This file is part of gspell, a spell-checking library.
*
* Copyright 2016 - Ignacio Casal Quinteiro <icq@gnome.org>
* Copyright 2016 - Sébastien Wilmet <swilmet@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Licens... | ---
+++
@@ -24,7 +24,8 @@
#include <glib.h>
#ifdef G_OS_WIN32
-#include <windef.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
G_GNUC_INTERNAL
HMODULE _gspell_init_get_dll (void); | Revert "win32: include windef.h instead of windows.h"
This reverts commit 7a51b17a061cb4e83c5d0e862cb1c4c32c7033e7.
This was actually good, normally. See the discussion at:
https://bugzilla.gnome.org/show_bug.cgi?id=774325
Not tested, I don't test gspell on/for Windows.
| lgpl-2.1 | GNOME/gspell,GNOME/gspell | 8eb990df360a6eaac3a6bfe3bcb22636d99edc0b |
//
// CSSTypeSelector.h
// HTMLKit
//
// Created by Iska on 13/05/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CSSSelector.h"
#import "CSSSimpleSelector.h"
@interface CSSTypeSelector : CSSSelector <CSSSimpleSelector>
@property (nonatomic, copy) NSStrin... | //
// CSSTypeSelector.h
// HTMLKit
//
// Created by Iska on 13/05/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CSSSelector.h"
#import "CSSSimpleSelector.h"
@interface CSSTypeSelector : CSSSelector <CSSSimpleSelector>
@property (nonatomic, copy) NSStrin... | ---
+++
@@ -12,10 +12,10 @@
@interface CSSTypeSelector : CSSSelector <CSSSimpleSelector>
-@property (nonatomic, copy) NSString *type;
+@property (nonatomic, copy) NSString * _Nonnull type;
-+ (instancetype)universalSelector;
++ (nullable instancetype)universalSelector;
-- (instancetype)initWithType:(NSString... | Add nullability specifiers to type selector
| mit | iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit | 7cd47486ac530cc991248d59d04260c0d297b05d |
#ifndef SAFE_H
#define SAFE_H
#include "debug.h"
#ifndef DISABLE_SAFE
#define SAFE_STRINGIFY(x) #x
#define SAFE_TOSTRING(x) SAFE_STRINGIFY(x)
#define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": "
#define SAFE_ASSERT(cond) do { \
if (!(cond)) { \
DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \
DEBUG_BREAK(!(c... | #ifndef SAFE_H
#define SAFE_H
#include "debug.h"
#ifndef DISABLE_SAFE
#define SAFE_STRINGIFY(x) #x
#define SAFE_TOSTRING(x) SAFE_STRINGIFY(x)
#define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": "
#define SAFE_ASSERT(cond) do { \
if (!(cond)) { \
DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \
DEBUG_BREAK(!(c... | ---
+++
@@ -32,4 +32,9 @@
SAFE_ASSERT(ret != 0); \
} while (0)
+#define SAFE_RZCALL(call) do { \
+ intptr_t ret = (intptr_t) (call); \
+ SAFE_ASSERT(ret == 0); \
+} while (0)
+
#endif /* end of include guard: SAFE_H */ | Add SAFE_RZCALL to wrap calls that returns zero.
| mit | chaoran/fibril,chaoran/fibril,chaoran/fibril | 8c6b30c2bdbdca9d78fcd7a4cde15e5aa6802029 |
#ifndef CONFIGREADER_H
#define CONFIGREADER_H
/*forward declarations*/
extern FILE *configreaderin;
struct config_ssid {
char ssid_name[32];
char ssid_user[32];
char ssid_pass[32];
char ssid_bssid[20];
char ssid_auth[10];
struct config_ssid *next;
};
struct config_interfaces {
char if_nam... | #ifndef CONFIGREADER_H
#define CONFIGREADER_H
/*forward declarations*/
extern FILE *configreaderin;
struct config_ssid {
char ssid_name[32];
char ssid_user[32];
char ssid_pass[32];
char ssid_bssid[25];
int ssid_8021x;
struct config_ssid *next;
};
struct config_interfaces {
char if_name[32... | ---
+++
@@ -8,8 +8,8 @@
char ssid_name[32];
char ssid_user[32];
char ssid_pass[32];
- char ssid_bssid[25];
- int ssid_8021x;
+ char ssid_bssid[20];
+ char ssid_auth[10];
struct config_ssid *next;
};
| Change to config file struct
| bsd-3-clause | myauie/wlan-daemon | 499b14d0969ccaeb69ddcf1e3b0415df1f72f923 |
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class THit!+;
#pragma link C++ class TObjHit+;
#pragma link C++ class TSTLhit+;
#pragma link C++ class TSTLhitList+;
#pragma link C++ class TSTLhitDeque+;
#pragma link C++ class TSTLhitSet+;
#p... | #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class THit!+;
#pragma link C++ class TObjHit+;
#pragma link C++ class TSTLhit;
#pragma link C++ class TSTLhitList;
#pragma link C++ class TSTLhitDeque;
#pragma link C++ class TSTLhitSet;
#pragm... | ---
+++
@@ -6,25 +6,25 @@
#pragma link C++ class THit!+;
#pragma link C++ class TObjHit+;
-#pragma link C++ class TSTLhit;
-#pragma link C++ class TSTLhitList;
-#pragma link C++ class TSTLhitDeque;
-#pragma link C++ class TSTLhitSet;
-#pragma link C++ class TSTLhitMultiset;
-#pragma link C++ class TSTLhitMap;
-#p... | Use the option "+" to force the new style Streamer for all classes in bench.
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@10478 27541ba8-7e3a-0410-8455-c3a389f83636
| lgpl-2.1 | bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,bbannier/ROOT | 114f74f1f21bd9467d500bae7a3442e5135ce83a |
/*
* Copyright (c) 2013, Court of the University of Glasgow
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* thi... | #ifndef _STACK_H_
#define _STACK_H_
/*
* data stack for use with automaton infrastructure
*/
#include "dataStackEntry.h"
typedef struct stack Stack;
Stack *stack_create(int size);
void stack_destroy(Stack *st);
void reset(Stack *st);
void push(Stack *st, DataStackEntry d);
Da... | ---
+++
@@ -1,3 +1,34 @@
+/*
+ * Copyright (c) 2013, Court of the University of Glasgow
+ * All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+
+ * - Redistributions of source code must retain t... | Add BSD 3-clause open source header
| bsd-3-clause | jsventek/Cache,fergul/Cache,jsventek/Cache,fergul/Cache,jsventek/Cache,fergul/Cache | 264a4058eb58ba078069f2cc2ff6fa9ae015bc4d |
/* go-rec-nb-big.c -- nonblocking receive of something big on a channel.
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <stdint.h>
#include <assert.h>
#include "channel.h"
_Bool
__go_receive_... | /* go-rec-nb-big.c -- nonblocking receive of something big on a channel.
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <stdint.h>
#include <assert.h>
#include "channel.h"
_Bool
__go_receive_... | ---
+++
@@ -31,7 +31,7 @@
}
}
- offset = channel->next_store * alloc_size;
+ offset = channel->next_fetch * alloc_size;
__builtin_memcpy (val, &channel->data[offset], channel->element_size);
__go_receive_release (channel); | Correct nonblocking receive of a value larger than 8 bytes.
R=iant
https://golang.org/cl/1743042
| bsd-3-clause | qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,anlhord/... | 3555739656f0eec99f4f6edb1cedf032c5d1754a |
#ifndef PRIMITIV_C_CUDA_DEVICE_H_
#define PRIMITIV_C_CUDA_DEVICE_H_
#include <primitiv/c/define.h>
#include <primitiv/c/device.h>
/**
* Creates a new Device object.
* @param device_id ID of the physical GPU.
* @param device Pointer to receive a handler.
* @return Status code.
* @remarks The random number generat... | #ifndef PRIMITIV_C_CUDA_DEVICE_H_
#define PRIMITIV_C_CUDA_DEVICE_H_
#include <primitiv/c/define.h>
#include <primitiv/c/device.h>
/**
* Creates a new Device object.
* @param device_id ID of the physical GPU.
* @param device Pointer to receive a handler.
* @return Status code.
* @remarks The random number generat... | ---
+++
@@ -12,7 +12,7 @@
* @remarks The random number generator is initialized using
* `std::random_device`.
*/
-extern PRIMITIV_C_API PRIMITIV_C_STATUS primitiv_devices_CUDA_new(
+PRIMITIV_C_API PRIMITIV_C_STATUS primitiv_devices_CUDA_new(
uint32_t device_id, primitiv_Device **device);
/**
@@... | Fix calling conventions around CUDA.
| apache-2.0 | odashi/primitiv,odashi/primitiv,odashi/primitiv | 4a243af780afa91bc45377560b469a15613a5125 |
#ifndef __ACONFIG_H_
#define __ACONFIG_H_
/* This must be before alphabetically before all other files that reference these settings for the compiler to work
* or you may get vtable errors.
*/
/* This section is for devices and their configuration. IF you have not setup you pins with the
* standard configuration of... | #ifndef __ACONFIG_H_
#define __ACONFIG_H_
/* This must be before alphabetically before all other files that reference these settings for the compiler to work
* or you may get vtable errors.
*/
/* This section is for devices and their configuration. IF you have not setup you pins with the
* standard configuration of... | ---
+++
@@ -11,12 +11,15 @@
* have the address defined in this file.
*/
//Kit:
-#define HAS_STD_CAPE (0)
#define HAS_STD_PILOT (1)
-#define HAS_OROV_CONTROLLERBOARD_25 (0)
+/* The definitions are done in th
+ #define HAS_STD_CAPE (0)
+ #define HAS_OROV_CONTROLLERBOARD_25 (0)
+*/
+#include "BoardConfig.h"
#def... | Add automation for arduino board selection for compilation
| mit | codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software | b929a1e2a5a963272516b620382684472d2d7a95 |
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_RANDR_H
# define E_SMART_RANDR_H
Evas_Object *e_smart_randr_add(Evas *evas);
void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
void e_smart_randr_monitors_create(Evas_Object *obj);
void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *m... | #ifdef E_TYPEDEFS
#else
# ifndef E_SMART_RANDR_H
# define E_SMART_RANDR_H
Evas_Object *e_smart_randr_add(Evas *evas);
void e_smart_randr_current_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
void e_smart_randr_monitors_create(Evas_Object *obj);
void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *m... | ---
+++
@@ -8,6 +8,8 @@
void e_smart_randr_monitors_create(Evas_Object *obj);
void e_smart_randr_monitor_add(Evas_Object *obj, Evas_Object *mon);
void e_smart_randr_monitor_del(Evas_Object *obj, Evas_Object *mon);
+Eina_Bool e_smart_randr_changed_get(Evas_Object *obj);
+void e_smart_randr_changes_apply(Evas_Object... | Add prototypes for randr_changed_get and randr_changes_apply functions.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 81104
| bsd-2-clause | tizenorg/platform.upstream.enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tasn/enlightenment,tasn/enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment | 6e1b9916f3416fbfbda38f720bd01040532fd062 |
/* This source file is part of the Tomviz project, https://tomviz.org/.
It is released under the 3-Clause BSD License, see "LICENSE". */
#ifndef tomvizH5CAPI_h
#define tomvizH5CAPI_h
extern "C"
{
#include <vtk_hdf5.h>
}
#endif // tomvizH5CAPI_h
| /* This source file is part of the Tomviz project, https://tomviz.org/.
It is released under the 3-Clause BSD License, see "LICENSE". */
#ifndef tomvizH5CAPI_h
#define tomvizH5CAPI_h
extern "C"
{
#include <hdf5.h>
}
#endif // tomvizH5CAPI_h
| ---
+++
@@ -6,7 +6,7 @@
extern "C"
{
-#include <hdf5.h>
+#include <vtk_hdf5.h>
}
#endif // tomvizH5CAPI_h | Include vtk_hdf5.h rather than hdf5.h
This ensures we pick up the VTK version of HDF5.
Signed-off-by: Chris Harris <a361e89d1eba6c570561222d75facbbf7aaeeafe@kitware.com>
| bsd-3-clause | OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz | ba24c53c1c9e7dea32d2ae4bf6167a1eeb34b036 |
//
// OCHamcrest - HCSelfDescribing.h
// Copyright 2013 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest
//
#import <Foundation/Foundation.h>
#import "HCDescription.h"
/**
Th... | //
// OCHamcrest - HCSelfDescribing.h
// Copyright 2013 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest
//
#import <Foundation/Foundation.h>
@protocol HCDescription;
/**
The... | ---
+++
@@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
-@protocol HCDescription;
+#import "HCDescription.h"
/** | Change forward declaration to import for convenience.
https://github.com/hamcrest/OCHamcrest/issues/31
| bsd-2-clause | nschum/OCHamcrest,hamcrest/OCHamcrest,hamcrest/OCHamcrest,klundberg/OCHamcrest,nschum/OCHamcrest,nschum/OCHamcrest,hamcrest/OCHamcrest,klundberg/OCHamcrest | 981c98937d40a196cc09530504012a792a7b5348 |
#pragma once
#include "util/log.h"
#include <cstdint>
inline uint16_t compose_bytes(const uint8_t low, const uint8_t high) {
return (high << 8) + low;
}
inline bool check_bit(const uint8_t value, const int bit) {
return (value & (1 << bit)) != 0;
}
inline uint8_t set_bit(const uint8_t value, const int bit)... | #pragma once
#include <cstdint>
inline uint16_t compose_bytes(const uint8_t low, const uint8_t high) {
return (high << 8) + low;
}
inline bool check_bit(const uint8_t value, int bit) {
return (value & (1 << bit)) != 0;
}
inline uint8_t set_bit(const uint8_t value, int bit) {
return static_cast<uint8_t>(... | ---
+++
@@ -1,4 +1,6 @@
#pragma once
+
+#include "util/log.h"
#include <cstdint>
@@ -6,10 +8,22 @@
return (high << 8) + low;
}
-inline bool check_bit(const uint8_t value, int bit) {
+inline bool check_bit(const uint8_t value, const int bit) {
return (value & (1 << bit)) != 0;
}
-inline uint8_t s... | Add more functions for bit manipulation
| bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator | e595fd5917bd28a939cdf17a347661c00454c3a1 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Various compiler checks. */
#i... | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Various compiler checks. */
#i... | ---
+++
@@ -17,7 +17,8 @@
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \
>= ((major) * 10000 + (minor) * 100 + (patchlevel)))
#if !MOZ_GCC_VERSION_AT_LEAST(4, 4, 0)
-# error "mfbt (and Gecko) require at least gcc 4.4 to build."
+// RBA: Not true for servo!
+//# error "mfbt (and Gec... | Disable error that forbids builds with gcc 4.2
| mpl-2.0 | nox/rust-azure,Adenilson/rust-azure,larsbergstrom/rust-azure,Adenilson/rust-azure,notriddle/rust-azure,larsbergstrom/rust-azure,servo/rust-azure,servo/rust-azure,notriddle/rust-azure,nox/rust-azure,brendandahl/rust-azure,servo/rust-azure,pcwalton/rust-azure,mrobinson/rust-azure,notriddle/rust-azure,larsbergstrom/rust-a... | f5fe521c850a02ae1f352bfb652e263c0c97d624 |
#include <string.h>
#include <stdbool.h>
#include "roman_convert_to_int.h"
#include "roman_clusters.h"
static const int ERROR = -1;
static bool starts_with(const char *str, RomanCluster cluster);
int roman_convert_to_int(const char *numeral)
{
if (!numeral) return ERROR;
int total = 0;
for (const RomanCluster *... | #include <string.h>
#include <stdbool.h>
#include "roman_convert_to_int.h"
#include "roman_clusters.h"
static const int ERROR = -1;
static bool starts_with(const char *str, RomanCluster cluster);
int roman_convert_to_int(const char *numeral)
{
if (!numeral) return ERROR;
int total = 0;
for (int cluster_index = ... | ---
+++
@@ -13,13 +13,15 @@
if (!numeral) return ERROR;
int total = 0;
- for (int cluster_index = 0; cluster_index < ROMAN_CLUSTERS_LENGTH; cluster_index++)
+ for (const RomanCluster *cluster = roman_cluster_largest();
+ cluster;
+ cluster = roman_cluster_next_smaller(cluster)
+ )
{
- const RomanClus... | Use cluster iterator in to_int function
| mit | greghaskins/roman-calculator.c | 67d9df24bf6ac9d6a3397971605cb563fb35c54d |
/**
* \file fixed_point.h
*
*
*
* \author Ethan Burns
* \date 2009-01-16
*/
#include "stdint.h"
#include <limits>
/* The type of a fixed point value. This should never be larger than
* the size of the type for the 'value' field in the AtomicInt
* class. */
typedef unsigned long fp_type;
#define fp_sqrt2 1... | /**
* \file fixed_point.h
*
*
*
* \author Ethan Burns
* \date 2009-01-16
*/
#include "stdint.h"
#include <limits>
/* The type of a fixed point value. This should never be larger than
* the size of the type for the 'value' field in the AtomicInt
* class. */
typedef unsigned long fp_type;
#define fp_sqrt2 1... | ---
+++
@@ -16,6 +16,6 @@
* class. */
typedef unsigned long fp_type;
-#define fp_sqrt2 14142
-#define fp_one 10000
+#define fp_sqrt2 1414
+#define fp_one 1000
#define fp_infinity (numeric_limits<fp_type>::max()) | Use 3 decimal places, the sun uses 32-bit fp_type which chokes with 4.
| mit | eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf | 0262f2fab71dca4874831d2d87ecaa099c1831d1 |
#include "syshead.h"
#include "dst.h"
#include "ip.h"
#include "arp.h"
int dst_neigh_output(struct sk_buff *skb)
{
struct iphdr *iphdr = ip_hdr(skb);
struct netdev *netdev = skb->netdev;
uint8_t *dmac = arp_get_hwaddr(iphdr->daddr);
int rc;
if (dmac) {
return netdev_transmit(skb, dmac, ETH... | #include "syshead.h"
#include "dst.h"
#include "ip.h"
#include "arp.h"
int dst_neigh_output(struct sk_buff *skb)
{
struct iphdr *iphdr = ip_hdr(skb);
struct netdev *netdev = skb->netdev;
uint8_t *dmac = arp_get_hwaddr(iphdr->daddr);
int rc;
if (dmac) {
return netdev_transmit(skb, dmac, ETH... | ---
+++
@@ -14,7 +14,11 @@
return netdev_transmit(skb, dmac, ETH_P_IP);
} else {
rc = arp_request(iphdr->saddr, iphdr->daddr, netdev);
- free_skb(skb);
- return rc;
+
+ while ((dmac = arp_get_hwaddr(iphdr->daddr)) == NULL) {
+ sleep(1);
+ }
+
+ retu... | Add ugly hack for waiting that ARP cache gets populated
We do not have a retransmission system implemented yet,
so let's sleep here for a while in order to get the ARP entry
if it is missing.
| mit | saminiir/level-ip,saminiir/level-ip | e62cfdcc7390d420833d2bead953d8e172719f37 |
/* Begin CVS Header
$Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/copasiversion.h,v $
$Revision: 1.4 $
$Name: $
$Author: shoops $
$Date: 2004/02/20 18:15:46 $
End CVS Header */
#ifndef COPASI_VERSION
#define COPASI_VERSION
#define COPASI_VERSION_MAJOR 4
#define COPASI_VERSION_MINOR 0
#... | /* Begin CVS Header
$Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/copasiversion.h,v $
$Revision: 1.3 $
$Name: $
$Author: shoops $
$Date: 2004/02/19 03:28:58 $
End CVS Header */
#ifndef COPASI_VERSION
#define COPASI_VERSION
#define COPASI_VERSION_MAJOR 4
#define COPASI_VERSION_MINOR 0
#... | ---
+++
@@ -1,9 +1,9 @@
/* Begin CVS Header
$Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/copasiversion.h,v $
- $Revision: 1.3 $
+ $Revision: 1.4 $
$Name: $
$Author: shoops $
- $Date: 2004/02/19 03:28:58 $
+ $Date: 2004/02/20 18:15:46 $
End CVS Header */
#ifndef COPASI_VERSIO... | Build number increased to 3.
| artistic-2.0 | copasi/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,jonasfoe/COPASI,copasi/COPASI,copasi/COPASI,copasi/COPASI | 160887b31b1794d15e14ce09bf11a1fa80b6f74c |
/*
* cameraautoswitch.h
* StatusSpec project
*
* Copyright (c) 2014-2015 Forward Command Post
* BSD 2-Clause License
* http://opensource.org/licenses/BSD-2-Clause
*
*/
#pragma once
#include "igameevents.h"
#include "../modules.h"
class CCommand;
class ConCommand;
class ConVar;
class IConVar;
class Ca... | /*
* cameraautoswitch.h
* StatusSpec project
*
* Copyright (c) 2014-2015 Forward Command Post
* BSD 2-Clause License
* http://opensource.org/licenses/BSD-2-Clause
*
*/
#include "igameevents.h"
#include "../modules.h"
class CCommand;
class ConCommand;
class ConVar;
class IConVar;
class CameraAutoSwitch... | ---
+++
@@ -7,6 +7,8 @@
* http://opensource.org/licenses/BSD-2-Clause
*
*/
+
+#pragma once
#include "igameevents.h"
| Add pragma once to camera auto switch header.
| bsd-2-clause | fwdcp/StatusSpec,fwdcp/StatusSpec | 178691e163ee60902dc23f3de2b8be73b86a2473 |
#ifndef SRC_UTILS_CUDA_HELPER_H_
#define SRC_UTILS_CUDA_HELPER_H_
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
#include <stdexcept>
static void HandleError(cudaError_t error, const char *file, int line)
{
if (error != cudaSuccess)
{
printf("%s in %s at line %d\n", cudaGetErrorString(error)... | #ifndef SRC_UTILS_CUDA_HELPER_H_
#define SRC_UTILS_CUDA_HELPER_H_
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
static void HandleError(cudaError_t err, const char *file, int line)
{
if (err != cudaSuccess)
{
printf("%s in %s at line %d\n", cudaGetErrorString(err), file, line);
exit(EXI... | ---
+++
@@ -5,17 +5,18 @@
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
+#include <stdexcept>
-static void HandleError(cudaError_t err, const char *file, int line)
+static void HandleError(cudaError_t error, const char *file, int line)
{
- if (err != cudaSuccess)
+ if (error != cudaSuccess)
... | Throw exception on cuda error to get a stack trace.
| mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller | 1c48d320cbd3c0789d4bdf4039f2d4188a3087b9 |
/**
* @file
*
* @date Oct 21, 2013
* @author Eldar Abusalimov
*/
#include <embox/test.h>
#include <string.h>
#include <util/bitmap.h>
EMBOX_TEST_SUITE("util/bitmap test");
#define TEST_ALINGED_SZ 64
#define TEST_UNALINGED_SZ 100
TEST_CASE("aligned size with red zone after an array") {
BITMAP_DECL(bitmap,... | /**
* @file
*
* @date Oct 21, 2013
* @author Eldar Abusalimov
*/
#include <embox/test.h>
#include <util/bitmap.h>
EMBOX_TEST_SUITE("util/bitmap test");
#define TEST_BITMAP_SZ 100
TEST_CASE() {
BITMAP_DECL(bitmap, TEST_BITMAP_SZ);
bitmap_clear_all(bitmap, TEST_BITMAP_SZ);
test_assert_equal(bitmap_find_firs... | ---
+++
@@ -7,24 +7,36 @@
#include <embox/test.h>
+#include <string.h>
#include <util/bitmap.h>
EMBOX_TEST_SUITE("util/bitmap test");
-#define TEST_BITMAP_SZ 100
+#define TEST_ALINGED_SZ 64
+#define TEST_UNALINGED_SZ 100
-TEST_CASE() {
- BITMAP_DECL(bitmap, TEST_BITMAP_SZ);
+TEST_CASE("aligned size w... | Add bitmap test case which reveals a bug | bsd-2-clause | mike2390/embox,abusalimov/embox,vrxfile/embox-trik,mike2390/embox,Kefir0192/embox,Kefir0192/embox,embox/embox,gzoom13/embox,gzoom13/embox,abusalimov/embox,gzoom13/embox,embox/embox,gzoom13/embox,vrxfile/embox-trik,Kefir0192/embox,abusalimov/embox,Kefir0192/embox,mike2390/embox,gzoom13/embox,vrxfile/embox-trik,Kakadu/em... | 3c065012a278ce325f7f2f64abdb6fa2b78eae41 |
// Copyright (c) 2016 Brian Barto
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the MIT License. See LICENSE for more details.
#include <string.h>
#include "config.h"
// Static Variables
static char payload[PAYLOAD_SIZE + 1];
void inputpayload_init(void) {
memse... | // Copyright (c) 2016 Brian Barto
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the MIT License. See LICENSE for more details.
#include <string.h>
#include "config.h"
// Static Variables
static char payload[PAYLOAD_SIZE + 1];
void inputpayload_init(void) {
memse... | ---
+++
@@ -22,5 +22,8 @@
}
void inputpayload_parse(char *data) {
- strncpy(payload, data + COMMAND_SIZE, PAYLOAD_SIZE);
+ if (strlen(data) > COMMAND_SIZE)
+ strncpy(payload, data + COMMAND_SIZE, PAYLOAD_SIZE);
+ else
+ memset(payload, 0, sizeof(PAYLOAD_SIZE + 1));
} | Make sure we don't increment data array past it's length when parsing payload
modified: src/modules/inputpayload.c
| mit | bartobri/spring-server,bartobri/spring-server | 456c867d363840b3ab0f16dee605bdccf35130c1 |
/**
* @file
* @brief Tools to work with registers
*/
//@{
#ifndef AVARIX_REGISTER_H__
#define AVARIX_REGISTER_H__
#include <avr/io.h>
/** @brief Set a register with I/O CCP disabled
*
* Interrupts are not disabled during the process.
*
* @note This can be achieved in less cycles for some I/O registers but thi... | /**
* @file
* @brief Tools to work with registers
*/
//@{
#ifndef AVARIX_REGISTER_H__
#define AVARIX_REGISTER_H__
#include <avr/io.h>
/** @brief Set a register with I/O CCP disabled
*
* Interrupts are not disabled during the process.
*
* @note This can be achieved in less cycles for some I/O registers but thi... | ---
+++
@@ -16,7 +16,7 @@
* @note This can be achieved in less cycles for some I/O registers but this way
* is generic.
*/
-inline void ccp_io_write(volatile uint8_t* addr, uint8_t value)
+static inline void ccp_io_write(volatile uint8_t* addr, uint8_t value)
{
asm volatile (
"out %0, %1\n\t" | Fix ccp_io_write() not being static as it should
| mit | robotter/avarix,robotter/avarix,robotter/avarix | cc0fdd497c22d442297ec0ac33578272acb7a462 |
#ifndef FIFO_H
#define FIFO_H
#include "align.h"
#define FIFO_NODE_SIZE (1 << 20 - 2)
struct _fifo_node_t;
typedef struct DOUBLE_CACHE_ALIGNED {
volatile size_t enq DOUBLE_CACHE_ALIGNED;
volatile size_t deq DOUBLE_CACHE_ALIGNED;
volatile struct {
size_t index;
struct _fifo_node_t * node;
} head DOUB... | #ifndef FIFO_H
#define FIFO_H
#include "align.h"
#define FIFO_NODE_SIZE 510
struct _fifo_node_t;
typedef struct DOUBLE_CACHE_ALIGNED {
volatile size_t enq DOUBLE_CACHE_ALIGNED;
volatile size_t deq DOUBLE_CACHE_ALIGNED;
volatile struct {
int index;
struct _fifo_node_t * node;
} head DOUBLE_CACHE_ALIG... | ---
+++
@@ -3,7 +3,7 @@
#include "align.h"
-#define FIFO_NODE_SIZE 510
+#define FIFO_NODE_SIZE (1 << 20 - 2)
struct _fifo_node_t;
@@ -11,7 +11,7 @@
volatile size_t enq DOUBLE_CACHE_ALIGNED;
volatile size_t deq DOUBLE_CACHE_ALIGNED;
volatile struct {
- int index;
+ size_t index;
struct _f... | Use the same size of lcrq.
| mit | chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue | 8236a6d84a13fa1511aaa8d8dea1b0155fe78c95 |
#ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
enum STATUS_CODE
{
// General
GENERAL_SUCCESS,
GENERAL_FAILURE
}
#endif | #ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
#endif | ---
+++
@@ -4,4 +4,11 @@
void free_write();
extern unsigned int endkernel;
+enum STATUS_CODE
+{
+ // General
+ GENERAL_SUCCESS,
+ GENERAL_FAILURE
+}
+
#endif | Create an enum for all posible function return status codes
| bsd-3-clause | TwoUnderscorez/DuckOS,TwoUnderscorez/DuckOS,TwoUnderscorez/DuckOS | 8ebc25895f4832b73950ca32522dcb51e8ea8f5d |
#ifndef _MAIN_H_
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
#define PROGRAM_MINOR_VERSION 2
#define PROGRAM_PATCH_VERSION 0
extern int quit;
#endif /* _MAIN_H_ */
| #ifndef _MAIN_H_
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
#define PROGRAM_MINOR_VERSION 1
#define PROGRAM_PATCH_VERSION 1
extern int quit;
#endif /* _MAIN_H_ */
| ---
+++
@@ -2,8 +2,8 @@
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
-#define PROGRAM_MINOR_VERSION 1
-#define PROGRAM_PATCH_VERSION 1
+#define PROGRAM_MINOR_VERSION 2
+#define PROGRAM_PATCH_VERSION 0
extern int quit;
| Upgrade version number to 0.2.0
| mit | zear/shisen-seki,zear/shisen-seki | a0b563f277f4fe56bc8af372777301d20c5a419b |
#ifndef _OPENLIB_FINITE_H
#define _OPENLIB_FINITE_H
#include <sys/cdefs.h>
#define __BSD_VISIBLE 1
#include <../../build/extbld/third_party/lib/OpenLibm/install/openlibm_math.h>
static inline int finite(double x) {
return isfinite(x);
}
static inline int finitef(float x) {
return isfinite(x);
}
static inline i... |
#ifndef _OPENLIB_FINITE_H
#define _OPENLIB_FINITE_H
#include <sys/cdefs.h>
#define __BSD_VISIBLE 1
#include <../../build/extbld/third_party/lib/OpenLibm/install/openlibm_math.h>
static inline int finite(double x) {
return isfinite(x);
}
static inline int finitef(float x) {
return isfinite(x);
}
static inline i... | ---
+++
@@ -20,7 +20,7 @@
return isfinite(x);
}
-#if (defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L)
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
__BEGIN_DECLS
extern long long int llabs(long long int j);
__END_DECLS | third-party: Fix openlibm compilation without defined macro __STDC__
| bsd-2-clause | embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox | ca0d5d42bc9c7b8acb6038d3969a5defb2946942 |
//-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
... | //-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
return data_.at(row*cols_+col);
}
template<class T>
const T& matri... | ---
+++
@@ -4,11 +4,13 @@
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
+ // TODO throw if out of bounds
return data_.at(row*cols_+col);
}
template<class T>
const T& matrix<T>::at( std::size_t row, std::size_t col ) const{
+ // TODO throw if out of bounds
return data_.at(row... | Add todo comment on at() functions.
| mit | actinium/cppMatrix,actinium/cppMatrix | c4589974f09becf2c271e03153fe5e47709186a5 |
#ifndef SINKMANAGER_H
#define SINKMANAGER_H
#include <dsnutil/dsnutil_cpp_Export.h>
#include <dsnutil/singleton.h>
#include <dsnutil/log/base.h>
#include <map>
#include <string>
#include <boost/shared_ptr.hpp>
#include <boost/log/sinks.hpp>
namespace dsn {
namespace log {
class dsnutil_cpp_EXPORT SinkManager : ... | #ifndef SINKMANAGER_H
#define SINKMANAGER_H
#include <dsnutil/singleton.h>
#include <dsnutil/log/base.h>
#include <map>
#include <string>
#include <boost/shared_ptr.hpp>
#include <boost/log/sinks.hpp>
namespace dsn {
namespace log {
class SinkManager : public dsn::Singleton<SinkManager>, public Base<SinkManager... | ---
+++
@@ -1,6 +1,7 @@
#ifndef SINKMANAGER_H
#define SINKMANAGER_H
+#include <dsnutil/dsnutil_cpp_Export.h>
#include <dsnutil/singleton.h>
#include <dsnutil/log/base.h>
@@ -12,7 +13,7 @@
namespace dsn {
namespace log {
- class SinkManager : public dsn::Singleton<SinkManager>, public Base<SinkManager> ... | Add missing DLL export for log::SinkManager
| bsd-3-clause | png85/dsnutil_cpp | 48ebeb144908b83d6ace61a7709267ae65048c7f |
#ifndef PHP_FAST_ASSERT_H
#define PHP_FAST_ASSERT_H
#define PHP_FAST_ASSERT_VERSION "0.1.1"
#define PHP_FAST_ASSERT_EXTNAME "fast_assert"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern "C" {
#include "php.h"
}
typedef struct _fast_assert_globals {
// global object handles pointing to the 3 commonly used as... | #ifndef PHP_FAST_ASSERT_H
#define PHP_FAST_ASSERT_H
#define PHP_FAST_ASSERT_VERSION "0.1"
#define PHP_FAST_ASSERT_EXTNAME "fast_assert"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern "C" {
#include "php.h"
}
typedef struct _fast_assert_globals {
// global object handles pointing to the 3 commonly used asse... | ---
+++
@@ -1,7 +1,7 @@
#ifndef PHP_FAST_ASSERT_H
#define PHP_FAST_ASSERT_H
-#define PHP_FAST_ASSERT_VERSION "0.1"
+#define PHP_FAST_ASSERT_VERSION "0.1.1"
#define PHP_FAST_ASSERT_EXTNAME "fast_assert"
#ifdef HAVE_CONFIG_H | Add bugfix version to match package version parity
| apache-2.0 | box/fast_assert,box/fast_assert,box/fast_assert | bbd6b0230feee05c6efae66c8b98b31ae7bf27cb |
// Check that clang is able to process response files with extra whitespace.
// We generate a dos-style file with \r\n for line endings, and then split
// some joined arguments (like "-x c") across lines to ensure that regular
// clang (not clang-cl) can process it correctly.
//
// RUN: printf " -x\r\nc\r\n-DTEST\r\n" ... | // Check that clang is able to process response files with extra whitespace.
// We generate a dos-style file with \r\n for line endings, and then split
// some joined arguments (like "-x c") across lines to ensure that regular
// clang (not clang-cl) can process it correctly.
//
// RUN: echo -en "-x\r\nc\r\n-DTEST\r\n"... | ---
+++
@@ -3,7 +3,7 @@
// some joined arguments (like "-x c") across lines to ensure that regular
// clang (not clang-cl) can process it correctly.
//
-// RUN: echo -en "-x\r\nc\r\n-DTEST\r\n" > %t.0.txt
+// RUN: printf " -x\r\nc\r\n-DTEST\r\n" > %t.0.txt
// RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -ch... | Use printf instead of "echo -ne".
Not all echo commands support "-e".
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@285162 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... | a703dbcdce9b95fc4a6ae294b03a5a8707b16f4d |
#ifndef MUSICMOBILEGLOBALDEFINE_H
#define MUSICMOBILEGLOBALDEFINE_H
/* =================================================
* This file is part of the TTK Music Player project
* Copyright (c) 2015 - 2017 Greedysky Studio
* All rights reserved!
* Redistribution and use of the source code or any derivative
* works are... | #ifndef MUSICMOBILEGLOBALDEFINE_H
#define MUSICMOBILEGLOBALDEFINE_H
/* =================================================
* This file is part of the TTK Music Player project
* Copyright (c) 2015 - 2017 Greedysky Studio
* All rights reserved!
* Redistribution and use of the source code or any derivative
* works are... | ---
+++
@@ -20,7 +20,7 @@
#ifdef MUSIC_EXPORT
# define MUSIC_MOBILE_EXPORT Q_DECL_EXPORT
#else
-# define MUSIC_MOBILE_EXPORT Q_DECL_IMPORT
+# define MUSIC_MOBILE_IMPORT Q_DECL_IMPORT
#endif
#endif // MUSICMOBILEGLOBALDEFINE_H | Fix dll import name error[132001]
| lgpl-2.1 | Greedysky/Musicplayer,Greedysky/Musicplayer,Greedysky/Musicplayer | 6e5eac20ada828fb2fbcd6fd262fe07e3d16fc54 |
/*
* $Id$
*
* Define the tags in the shared memory in a reusable format.
* Whoever includes this get to define what the SLTM macro does.
*
* REMEMBER to update the documentation (especially the varnishlog(1) man
* page) whenever this list changes.
*/
SLTM(Debug)
SLTM(Error)
SLTM(CLI)
SLTM(SessionOpen)
SLTM(Ses... | /*
* $Id$
*
* Define the tags in the shared memory in a reusable format.
* Whoever includes this get to define what the SLTM macro does.
*
*/
SLTM(Debug)
SLTM(Error)
SLTM(CLI)
SLTM(SessionOpen)
SLTM(SessionReuse)
SLTM(SessionClose)
SLTM(BackendOpen)
SLTM(BackendXID)
SLTM(BackendReuse)
SLTM(BackendClose)
SLTM(Htt... | ---
+++
@@ -4,6 +4,8 @@
* Define the tags in the shared memory in a reusable format.
* Whoever includes this get to define what the SLTM macro does.
*
+ * REMEMBER to update the documentation (especially the varnishlog(1) man
+ * page) whenever this list changes.
*/
SLTM(Debug) | Add a note to update varnishlog(1) whenever this list changes.
git-svn-id: 7d4b18ab7d176792635d6a7a77dd8cbbea8e8daa@418 d4fa192b-c00b-0410-8231-f00ffab90ce4
| bsd-2-clause | wikimedia/operations-debs-varnish,CartoDB/Varnish-Cache,wikimedia/operations-debs-varnish,wikimedia/operations-debs-varnish,wikimedia/operations-debs-varnish,ssm/pkg-varnish,CartoDB/Varnish-Cache,ssm/pkg-varnish,ssm/pkg-varnish,wikimedia/operations-debs-varnish,CartoDB/Varnish-Cache,ssm/pkg-varnish,ssm/pkg-varnish | b0c1b4beb324942040a5d9fd2abb617f8d83f612 |
#ifndef PSTR_HELPER_H
#define PSTR_HELPER_H
#include <avr/pgmspace.h>
// Modified PSTR that pushes string into a char* buffer for easy use.
//
// There is only one buffer so this will cause problems if you need to pass two
// strings to one function.
#define PSTR2(x) PSTRtoBuffer_P(PSTR(x))
#define PSTR2_BU... | #ifndef PSTR_HELPER_H
#define PSTR_HELPER_H
#include <avr/pgmspace.h>
// Modified PSTR that pushes string into a char* buffer for easy use.
//
// There is only one buffer so this will cause problems if you need to pass two
// strings to one function.
#define PSTR2(x) PSTRtoBuffer_P(PSTR(x))
#define PSTR2_BU... | ---
+++
@@ -8,7 +8,7 @@
// There is only one buffer so this will cause problems if you need to pass two
// strings to one function.
#define PSTR2(x) PSTRtoBuffer_P(PSTR(x))
-#define PSTR2_BUFFER_SIZE 32 // May need adjusted depending on your needs.
+#define PSTR2_BUFFER_SIZE 48 // May need adjusted depending on yo... | Increase PSTR2 buffer (fix broken calibration)
- No idea how this didn't cause problems before. Luck?
| mit | sheaivey/rx5808-pro-diversity,sheaivey/rx5808-pro-diversity,RCDaddy/rx5808-pro-diversity,RCDaddy/rx5808-pro-diversity | 554f657af8c33be01a0300518bc313fa13e46d34 |
#ifndef GUFUNC_SCHEDULER
#define GUFUNC_SCHEDULER
/* define int64_t and uint64_t for VC9 */
#ifdef _MSC_VER
#define int64_t signed __int64
#define uint64_t unsigned __int64
#else
#include <stdint.h>
#endif
#ifndef __SIZEOF_POINTER__
/* MSVC doesn't define __SIZEOF_POINTER__ */
#if defined(_WIN64)
... | #ifndef GUFUNC_SCHEDULER
#define GUFUNC_SCHEDULER
#include <stdint.h>
#ifndef __SIZEOF_POINTER__
/* MSVC doesn't define __SIZEOF_POINTER__ */
#if defined(_WIN64)
#define intp int64_t
#define uintp uint64_t
#elif defined(_WIN32)
#define intp int
#define uintp unsigned
... | ---
+++
@@ -1,11 +1,17 @@
#ifndef GUFUNC_SCHEDULER
#define GUFUNC_SCHEDULER
-#include <stdint.h>
+/* define int64_t and uint64_t for VC9 */
+#ifdef _MSC_VER
+ #define int64_t signed __int64
+ #define uint64_t unsigned __int64
+#else
+ #include <stdint.h>
+#endif
#ifndef __SIZEOF_POINTER__
/* MSVC... | Fix missing stdint.h on py2.7 vc9
| bsd-2-clause | stonebig/numba,numba/numba,cpcloud/numba,cpcloud/numba,stuartarchibald/numba,gmarkall/numba,seibert/numba,sklam/numba,seibert/numba,sklam/numba,stuartarchibald/numba,jriehl/numba,seibert/numba,jriehl/numba,gmarkall/numba,sklam/numba,IntelLabs/numba,stuartarchibald/numba,stonebig/numba,numba/numba,numba/numba,gmarkall/n... | eb0fa7bf4c9d8d24ee597e8777fee446ac55c35b |
/***************************************************************************************
* MAIN.C
*
* Description: Converts raw ADC reads given via character device to time of flight
*
* (C) 2016 Visaoni
* Licensed under the MIT License.
***************************************************************************... | /***************************************************************************************
* MAIN.C
*
* Description: Converts raw ADC reads given via character device to time of flight
*
* (C) 2016 Visaoni
* Licensed under the MIT License.
***************************************************************************... | ---
+++
@@ -6,7 +6,77 @@
* (C) 2016 Visaoni
* Licensed under the MIT License.
**************************************************************************************/
+
+#include <stdint.h>
+#include <stdio.h>
+//#include <unistd.h>
+//#include <string.h>
+#include <fcntl.h>
+#include <sys/poll.h>
+
+// TODO: Ge... | Set up basic processing framework
Constructs read values from character device and passes it through the
most basic processing to find time of flight.
| mit | thetransformerr/beagle-sonic,Visaoni/beagle-sonic-anemometer,thetransformerr/beagle-sonic,Visaoni/beagle-sonic-anemometer,thetransformerr/beagle-sonic,thetransformerr/beagle-sonic,Visaoni/beagle-sonic-anemometer | 706d8d60091b30bc950be8877864f12aed1ab9c0 |
/*
This file is part of the Grantlee template system.
Copyright (c) 2010 Stephen Kelly <steveire@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either version
2.1 of t... | /*
This file is part of the Grantlee template system.
Copyright (c) 2010 Stephen Kelly <steveire@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 3 only, as published by the Free Software Foundation.
This l... | ---
+++
@@ -5,12 +5,13 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
- License version 3 only, as published by the Free Software Foundation.
+ License as published by the Free Software Foundation; either version
+ 2.1 of the Lice... | Fix license header in the export header.
| lgpl-2.1 | simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,cutelyst/grantlee | d786eea17f6d55643ba7df12859d1e60e0c6cb39 |
#ifndef BYTECODE_H
#define BYTECODE_H
#include <iostream>
#include <iomanip>
using namespace std;
enum ByteCode {
PUSH = 0,
PRINT = 1,
END = 2
};
/* Write operations */
void writeOneOperandCall(ofstream* outStream, ByteCode bytecode, string litteral);
void writeSimpleCall(ofstream* outStream, ByteCode bytecode)... | #ifndef BYTECODE_H
#define BYTECODE_H
#include <iostream>
#include <iomanip>
using namespace std;
enum ByteCode {
PUSH = 0,
PRINT = 1,
END = 2
};
void writeOneOperandCall(ofstream* outStream, ByteCode bytecode, string litteral);
void writeSimpleCall(ofstream* outStream, ByteCode bytecode);
void writeEnd(ofstream... | ---
+++
@@ -12,25 +12,17 @@
END = 2
};
+/* Write operations */
+
void writeOneOperandCall(ofstream* outStream, ByteCode bytecode, string litteral);
void writeSimpleCall(ofstream* outStream, ByteCode bytecode);
void writeEnd(ofstream* stream);
+void writeLitteral(ofstream* stream, string value);
+
+/* Read ope... | Use the new designed library
| mit | wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic | c2988f448975fa3e9af6ef4f33d725088ebfe568 |
#ifndef _I2C_H
#define _I2C_H
#ifndef I2C_FREQ
#define I2C_FREQ 100000
#endif
struct i2c_iovec_s {
uint8_t *base;
uint8_t len;
};
void i2c_init(void);
void i2c_open(void);
void i2c_close(void);
int8_t i2c_readv(uint8_t address, struct i2c_iovec_s *iov, uint8_t iovcnt);
int8_t i2c_writev(uint8_t address, stru... | #ifndef _I2C_H
#define _I2C_H
#define I2C_FREQ 100000
struct i2c_iovec_s {
uint8_t *base;
uint8_t len;
};
void i2c_init(void);
void i2c_open(void);
void i2c_close(void);
int8_t i2c_readv(uint8_t address, struct i2c_iovec_s *iov, uint8_t iovcnt);
int8_t i2c_writev(uint8_t address, struct i2c_iovec_s *iov, uin... | ---
+++
@@ -1,7 +1,9 @@
#ifndef _I2C_H
#define _I2C_H
+#ifndef I2C_FREQ
#define I2C_FREQ 100000
+#endif
struct i2c_iovec_s {
uint8_t *base; | Allow I2C_FREQ to be defined externally
| mit | pietern/avr-tasks,pietern/avr-tasks | 55793ac91e2491d9c9af88aa82792be759ac2039 |
typedef int myint;
myint x = (myint)1;
int
main(void)
{
return x-1;
}
| typedef int myint;
myint x = (myint)1;
| ---
+++
@@ -1,2 +1,8 @@
typedef int myint;
myint x = (myint)1;
+
+int
+main(void)
+{
+ return x-1;
+} | [tests] Fix test added in 6fe29dd
Tests must have a main function which returns 0.
| isc | k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc | 661bc252516e229e3f3769956b1b16c8d40a95eb |
#include <stddef.h>
// Those types are needed but not defined or used in libcurl headers.
typedef size_t header_callback(char *buffer, size_t size, size_t nitems, void *userdata);
typedef size_t write_data_callback(void *buffer, size_t size, size_t nmemb, void *userp);
| #include <stdio.h>
// Those types are needed but not defined or used in libcurl headers.
typedef size_t header_callback(char *buffer, size_t size, size_t nitems, void *userdata);
typedef size_t write_data_callback(void *buffer, size_t size, size_t nmemb, void *userp);
extern void something_using_callback1(header_... | ---
+++
@@ -1,8 +1,5 @@
-#include <stdio.h>
+#include <stddef.h>
// Those types are needed but not defined or used in libcurl headers.
typedef size_t header_callback(char *buffer, size_t size, size_t nitems, void *userdata);
typedef size_t write_data_callback(void *buffer, size_t size, size_t nmemb, void *us... | Remove some hacks from libcurl sample
| apache-2.0 | JetBrains/kotlin-native,jiaminglu/kotlin-native,JuliusKunze/kotlin-native,wiltonlazary/kotlin-native,JetBrains/kotlin-native,JetBrains/kotlin-native,jiaminglu/kotlin-native,JuliusKunze/kotlin-native,JuliusKunze/kotlin-native,JuliusKunze/kotlin-native,JetBrains/kotlin-native,JuliusKunze/kotlin-native,JetBrains/kotlin-na... | d07295d73267c51bf3d77b97831640db832bacb5 |
/*
* gramp.h - SiriDB Grammar Properties.
*
* Note: we need this file up-to-date with the grammar. The grammar has
* keywords starting with K_ so the will all be sorted.
* KW_OFFSET should be set to the first keyword and KW_COUNT needs the
* last keyword in the grammar.
*
*/
#ifndef SIRI_GRAMP... | /*
* gramp.h - SiriDB Grammar Properties.
*
* Note: we need this file up-to-date with the grammar. The grammar has
* keywords starting with K_ so the will all be sorted.
* KW_OFFSET should be set to the first keyword and KW_COUNT needs the
* last keyword in the grammar.
*
*/
#ifndef SIRI_GRAMP... | ---
+++
@@ -29,8 +29,8 @@
#define CLERI_NODE_DATA(__node) ((intptr_t)(__node)->data)
#define CLERI_NODE_DATA_ADDR(__node) ((intptr_t *) &(__node)->data)
#else
-#define CLERI_NODE_DATA(__node) ((intptr_t)(__node)->result)
-#define CLERI_NODE_DATA_ADDR(__node) ((intptr_t *) &(__node)->result)
+#define CLERI_NODE_DAT... | Update compat with old libcleri
| mit | transceptor-technology/siridb-server,transceptor-technology/siridb-server,transceptor-technology/siridb-server,transceptor-technology/siridb-server | 5c020deef2ee09fe0abe00ad533fba9a2411dd4a |
#ifndef AT_TIME_H
#define AT_TIME_H
// Under Windows, define the gettimeofday() function with corresponding types
#ifdef _MSC_VER
#include <windows.h>
#include <time.h>
#include "atSymbols.h"
// TYPES
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
// FU... |
#ifndef AT_TIME_H
#define AT_TIME_H
// Under Windows, define the gettimeofday() function with corresponding types
#ifdef _MSC_VER
#include <windows.h>
#include <time.h>
// TYPES
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
// FUNCTIONS
int gettimeofda... | ---
+++
@@ -7,6 +7,7 @@
#ifdef _MSC_VER
#include <windows.h>
#include <time.h>
+ #include "atSymbols.h"
// TYPES
@@ -18,7 +19,7 @@
// FUNCTIONS
- int gettimeofday(struct timeval * tv, struct timezone * tz);
+ ATLAS_SYM int gettimeofday(struct timeval * tv, struct timezone * tz);
... | Add the atSymbols to this so the getTimeOfDay function was usable outside of the windows dll.
| apache-2.0 | ucfistirl/atlas,ucfistirl/atlas | 318d87ddc093ded8e70bb41204079c45e73b4e5e |
#ifndef GWKV_HT_WRAPPER
#define GWKV_HT_WRAPPER
#include <stdlib.h>
#include "../hashtable/hashtable.h"
typedef enum {
GET,
SET
} method;
/* Defines for result codes */
#define STORED 0
#define NOT_STORED 1
#define EXISTS 2
#define NOT_FOUND 3
struct {
method method_type,
const char*... | #ifndef GWKV_HT_WRAPPER
#define GWKV_HT_WRAPPER
#include <stdlib.h>
typedef enum {
GET,
SET
} method;
/* Defines for result codes */
#define STORED 0
#define NOT_STORED 1
#define EXISTS 2
#define NOT_FOUND 3
struct {
method method_type,
const char* key,
size_t key_length,
... | ---
+++
@@ -2,6 +2,7 @@
#define GWKV_HT_WRAPPER
#include <stdlib.h>
+#include "../hashtable/hashtable.h"
typedef enum {
GET,
@@ -27,11 +28,11 @@
* Returns either STORED or NOT_STORED (defined above)
*/
int
-gwkv_memcache_set (memcached_st *ptr,
- const char *key,
- ... | Change server set/get function names
| mit | gwAdvNet2015/gw-kv-store | 08a9882cc8cbec97947215a7cdb1f60effe82b15 |
#include <stdlib.h>
#define MAX_MALLOC_SIZE (1<<20) /* One megabyte ought to be enough for anyone */
void *readstat_malloc(size_t len) {
if (len > MAX_MALLOC_SIZE || len == 0) {
return NULL;
}
return malloc(len);
}
void *readstat_calloc(size_t count, size_t size) {
if (count > MAX_MALLOC_SIZE... | #include <stdlib.h>
#define MAX_MALLOC_SIZE (1<<20) /* One megabyte ought to be enough for anyone */
void *readstat_malloc(size_t len) {
if (len > MAX_MALLOC_SIZE || len == 0) {
return NULL;
}
return malloc(len);
}
void *readstat_calloc(size_t count, size_t size) {
if (count > MAX_MALLOC_SIZE... | ---
+++
@@ -13,6 +13,9 @@
if (count > MAX_MALLOC_SIZE || size > MAX_MALLOC_SIZE || count * size > MAX_MALLOC_SIZE) {
return NULL;
}
+ if (count == 0 || size == 0) {
+ return NULL;
+ }
return calloc(count, size);
}
| Check readstat_calloc for 0-sized input
| mit | WizardMac/ReadStat,WizardMac/ReadStat | a40390e142aaf9796ae3fd219e3aabdcda8ee096 |
#if !defined(_CARMIPRO_H)
#define _CARMIPRO_H
#include "pvmsdpro.h"
#define CARMI_FIRST (SM_LAST+1)
#define CARMI_RESPAWN (CARMI_FIRST+1)
#define CARMI_CHKPT (CARMI_FIRST+2)
#define CARMI_ADDHOST (CARMI_FIRST+3)
#define CARMI_SPAWN (CARMI_FIRST+4)
#define CARMI_CKPT_ON_VACATE (CARMI_FIRST + 5)
#define CARMI_LAST ... | #if !defined(_CARMIPRO_H)
#define _CARMIPRO_H
#include "pvmsdpro.h"
#define CARMI_FIRST (SM_LAST+1)
#define CARMI_RESPAWN (CARMI_FIRST+1)
#define CARMI_CHKPT (CARMI_FIRST+2)
#define CARMI_ADDHOST (CARMI_FIRST+3)
#endif
| ---
+++
@@ -7,4 +7,15 @@
#define CARMI_RESPAWN (CARMI_FIRST+1)
#define CARMI_CHKPT (CARMI_FIRST+2)
#define CARMI_ADDHOST (CARMI_FIRST+3)
+#define CARMI_SPAWN (CARMI_FIRST+4)
+#define CARMI_CKPT_ON_VACATE (CARMI_FIRST + 5)
+#define CARMI_LAST (CARMI_CKPT_ON_VACATE)
+
+#define CO_CHECK_FIRST (CARMI_LAST+1)
+#... | Define a whole bunch of new message tags for checkpoint and migration
functions.
| apache-2.0 | zhangzhehust/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,mambelli/osg-bosco-marco,djw8605/condor,mambelli/osg-bosco-marco,djw8605/condor,mambelli/osg-bosco-marco,djw8605/condor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,clalancette/condor-dcloud,zhangzhehust/htcondor,d... | 956c6edde28a3b60981059caf7a8bad137f76336 |
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.07.00.02-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 7
#define QLA_DRIVER_PATCH_VER 0
#defi... | /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.06.00.12-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 6
#define QLA_DRIVER_PATCH_VER 0
#defi... | ---
+++
@@ -7,9 +7,9 @@
/*
* Driver version
*/
-#define QLA2XXX_VERSION "8.06.00.12-k"
+#define QLA2XXX_VERSION "8.07.00.02-k"
#define QLA_DRIVER_MAJOR_VER 8
-#define QLA_DRIVER_MINOR_VER 6
+#define QLA_DRIVER_MINOR_VER 7
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 0 | [SCSI] qla2xxx: Update the driver version to 8.07.00.02-k.
Signed-off-by: Saurav Kashyap <88d6fd94e71a9ac276fc44f696256f466171a3c0@qlogic.com>
Signed-off-by: Giridhar Malavali <799b6491fce2c7a80b5fedcf9a728560cc9eb954@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
| mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs | 823c535f2169b755a77a413d5f957e9457c22cb3 |
#include <X11/Xlib.h>
#include "libx11_ruby.h"
VALUE rb_mLibX11, rb_cDisplay;
static size_t display_memsize(const void *);
static const rb_data_type_t display_type = {
.wrap_struct_name = "libx11_display",
.function = {
.dmark = NULL,
.dfree = NULL,
.dsize = display_memsize,
.reserved = { NULL, N... | #include "libx11_ruby.h"
VALUE rb_mLibX11;
void
Init_libx11_ruby(void)
{
rb_mLibX11 = rb_define_module("LibX11");
}
| ---
+++
@@ -1,9 +1,63 @@
+#include <X11/Xlib.h>
#include "libx11_ruby.h"
-VALUE rb_mLibX11;
+VALUE rb_mLibX11, rb_cDisplay;
+
+static size_t display_memsize(const void *);
+
+static const rb_data_type_t display_type = {
+ .wrap_struct_name = "libx11_display",
+ .function = {
+ .dmark = NULL,
+ .dfree = NUL... | Add bindings for XOpenDisplay and XCloseDisplay
| mit | k0kubun/libx11-ruby,k0kubun/libx11-ruby | d61e95344b2052b6dfa8a96a61fff6b99f08e008 |
#ifndef REDCARPET_H__
#define REDCARPET_H__
#define RSTRING_NOT_MODIFIED
#include "ruby.h"
#include <stdio.h>
#include <ruby/encoding.h>
#define redcarpet_str_new(data, size, enc) rb_enc_str_new(data, size, enc)
#include "markdown.h"
#include "html.h"
#define CSTR2SYM(s) (ID2SYM(rb_intern((s))))
void Init_redcarpe... | #ifndef REDCARPET_H__
#define REDCARPET_H__
#define RSTRING_NOT_MODIFIED
#include "ruby.h"
#include <stdio.h>
#ifdef HAVE_RUBY_ENCODING_H
# include <ruby/encoding.h>
# define redcarpet_str_new(data, size, enc) rb_enc_str_new(data, size, enc)
#else
# define redcarpet_str_new(data, size, enc) rb_str_new(data, size)
#en... | ---
+++
@@ -5,12 +5,8 @@
#include "ruby.h"
#include <stdio.h>
-#ifdef HAVE_RUBY_ENCODING_H
-# include <ruby/encoding.h>
-# define redcarpet_str_new(data, size, enc) rb_enc_str_new(data, size, enc)
-#else
-# define redcarpet_str_new(data, size, enc) rb_str_new(data, size)
-#endif
+#include <ruby/encoding.h>
+#defi... | Remove encoding conditionals that are no longer required
These are no longer needed since we don't support Ruby 1.8.x anymore.
| mit | emq/redcarpet,fukayatsu/redcarpet,be9/redcarpet,Hacker0x01/redcarpet,emq/redcarpet,fukayatsu/redcarpet,kattybilly/redcarpet,gitcafe-dev/redcarpet,liquorburn/redcarpet,increments/greenmat,liquorburn/redcarpet,increments/greenmat,JuanitoFatas/redcarpet,Hacker0x01/redcarpet,kaneshin/redcarpet,Hacker0x01/redcarpet,incremen... | 7184f9e8ff130e010be0b6db2875d840a2f12edc |
//===========================================
// Lumina-DE source code
// Copyright (c) 2012, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
#include <un... | //===========================================
// Lumina-DE source code
// Copyright (c) 2012, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
class SYSTEM... | ---
+++
@@ -6,6 +6,8 @@
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
+
+#include <unistd.h>
class SYSTEM{
public: | Fix up the Lumina compilation on 10.x
| bsd-2-clause | pcbsd/external-projects,pcbsd/external-projects,pcbsd/external-projects,pcbsd/external-projects | 4ede882f2c2b3a2409bddbbd6cee9bbbfdead905 |
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base58 entry widget validator.
Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressVal... | #ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base48 entry widget validator.
Corrects near-miss characters and refuses characters that are no part of base48.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressVali... | ---
+++
@@ -3,8 +3,8 @@
#include <QValidator>
-/** Base48 entry widget validator.
- Corrects near-miss characters and refuses characters that are no part of base48.
+/** Base58 entry widget validator.
+ Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddre... | Fix typo in a comment: it's base58, not base48.
| mit | syscoin/syscoin,Crowndev/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,syscoin/syscoin,Infernoman/crowncoin,syscoin/syscoin,domob1812/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin,domob1812/crowncoin,Crowndev/crowncoin,syscoin/sys... | 674f0d242855b8f901dd29b6fe077aafc67593e4 |
#ifndef PHEVALUATOR_HAND_H
#define PHEVALUATOR_HAND_H
#ifdef __cplusplus
#include <vector>
#include <array>
#include <string>
#include "card.h"
namespace phevaluator {
class Hand {
public:
Hand() {}
Hand(const std::vector<Card>& cards);
Hand(const Card& card);
Hand& operator+=(const Card& card);
Hand o... | #ifndef PHEVALUATOR_HAND_H
#define PHEVALUATOR_HAND_H
#ifdef __cplusplus
#include <vector>
#include <array>
#include <string>
#include "card.h"
namespace phevaluator {
class Hand {
public:
Hand() {}
Hand(const std::vector<Card>& cards);
Hand(const Card& card);
Hand& operator+=(const Card& card);
Hand o... | ---
+++
@@ -28,8 +28,8 @@
private:
unsigned char size_ = 0;
int suitHash_ = 0;
- std::array<int, 4> suitBinary_{0};
- std::array<unsigned char, 13> quinary_{0};
+ std::array<int, 4> suitBinary_{{0}};
+ std::array<unsigned char, 13> quinary_{{0}};
};
} // namespace phevaluator | Fix a Hand type compiling errors in GNU compiler
| apache-2.0 | HenryRLee/PokerHandEvaluator,HenryRLee/PokerHandEvaluator,HenryRLee/PokerHandEvaluator | 72467b21e9d8dced87245dda0aaef49c8965345a |
/***** Preamble block *********************************************************
*
* This file is part of h5py, a Python interface to the HDF5 library.
*
* http://www.h5py.org
*
* Copyright 2008-2013 Andrew Collette and contributors
*
* License: Standard 3-clause BSD; see "license.txt" for full license terms
* ... | /***** Preamble block *********************************************************
*
* This file is part of h5py, a Python interface to the HDF5 library.
*
* http://www.h5py.org
*
* Copyright 2008-2013 Andrew Collette and contributors
*
* License: Standard 3-clause BSD; see "license.txt" for full license terms
* ... | ---
+++
@@ -16,6 +16,11 @@
#ifndef H5PY_COMPAT
#define H5PY_COMPAT
+#if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message)
+typedef void *PyMPI_MPI_Message;
+#define MPI_Message PyMPI_MPI_Message
+#endif
+
#include <stddef.h>
#include "Python.h"
#include "numpy/arrayobject.h" | Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py.
Follows gh-401 https://groups.google.com/d/topic/h5py/Uw5x3BKwJGU/discussion and https://groups.google.com/d/topic/mpi4py/xnDyYvawB-Q/discussion.
| bsd-3-clause | h5py/h5py,h5py/h5py,h5py/h5py | 00126c32c776459b75e5d2bfaba28bd261c1510a |
/**
* main.c
*
* Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com>
*/
#include "common.h"
#include "argv.h"
#include "daemon.h"
#include "usage.h"
int main (int argc, char *argv[]) {
/**
* If the `--help` option was given, display usage details and exit.
*/
if (in_array(GIT_STASHD_USAGE_OPT, argv, a... | /**
* main.c
*
* Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com>
*/
#include "common.h"
#include "argv.h"
#include "daemon.h"
#include "usage.h"
int main (int argc, char *argv[]) {
int i;
/**
* If the `--help` option was given, display usage details and exit
*/
if (in_array(GIT_STASHD_USAGE_OPT,... | ---
+++
@@ -10,10 +10,8 @@
#include "usage.h"
int main (int argc, char *argv[]) {
- int i;
-
/**
- * If the `--help` option was given, display usage details and exit
+ * If the `--help` option was given, display usage details and exit.
*/
if (in_array(GIT_STASHD_USAGE_OPT, argv, argc)) {
pfusage();
@@... | Work on --daemon option handling
| mit | nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd | 4447cbac38eca7657a77e5d96a4c9f9d9710207c |
/* Try to drop the last supplemental group, and print a message to stdout
describing what happened. */
#include <errno.h>
#include <grp.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#define NGROUPS_MAX 128
int main()
{
int group_ct;
gid_t groups[NGROUPS_MAX];
group_ct = getgroups(NGRO... | /* Try to drop the last supplemental group, and print a message to stdout
describing what happened. */
#include <errno.h>
#include <grp.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#define NGROUPS_MAX 32
int main()
{
int group_ct;
gid_t groups[NGROUPS_MAX];
group_ct = getgroups(NGROU... | ---
+++
@@ -7,7 +7,7 @@
#include <sys/types.h>
#include <unistd.h>
-#define NGROUPS_MAX 32
+#define NGROUPS_MAX 128
int main()
{ | Raise maximum groups in chtest to the same number used in ch-run.
Signed-off-by: Oliver Freyermuth <297815a44ac0d229e08a814adf0f210787d04d87@googlemail.com>
| apache-2.0 | hpc/charliecloud,hpc/charliecloud,hpc/charliecloud | c9b258415efd0659e53c756ccd979b33afb4e8d4 |
// RUN: clang -checker-simple -verify %s
struct FPRec {
void (*my_func)(int * x);
};
int bar(int x);
int f1_a(struct FPRec* foo) {
int x;
(*foo->my_func)(&x);
return bar(x)+1; // no-warning
}
int f1_b() {
int x;
return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}}
... | // RUN: clang -checker-simple -verify %s
struct FPRec {
void (*my_func)(int * x);
};
int bar(int x);
int f1_a(struct FPRec* foo) {
int x;
(*foo->my_func)(&x);
return bar(x)+1; // no-warning
}
int f1_b() {
int x;
return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}}
... | ---
+++
@@ -41,3 +41,21 @@
else
return 1;
}
+
+// RUN: clang -checker-simple -analyzer-store-region -verify %s
+
+struct s {
+ int data;
+};
+
+struct s global;
+
+void g(int);
+
+void f4() {
+ int a;
+ if (global.data == 0)
+ a = 3;
+ if (global.data == 0)
+ g(a); // no-warning
+} | Add test for path-sensitive uninit-val detection involving struct field.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59620 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... | 89e8a07af3e24ae0f843b80906422d711f73de0a |
#define WORD (8 * sizeof(ulong))
#define clz(x) __builtin_clzl(x)
#define fls(x) (WORD - clz(x))
#define ffs(x) (__builtin_ctzl(x))
#define get(x, i) ((x) & (1L << (i)))
#define set(x, i) (x = (x) | (1L << (i)))
#define unset(x, i) (x = (x) & ~(1L << (i)))
| #define WORD (8 * sizeof(ulong))
#define clz(x) __builtin_clzl(x)
#define fls(x) (WORD - clz(x))
#define ffs(x) (__builtin_ctzl(x))
#define get(x, i) ((x) & (1 << (i)))
#define set(x, i) (x = (x) | (1 << (i)))
#define unset(x, i) (x = (x) & ~(1 << (i)))
| ---
+++
@@ -6,8 +6,8 @@
#define ffs(x) (__builtin_ctzl(x))
-#define get(x, i) ((x) & (1 << (i)))
+#define get(x, i) ((x) & (1L << (i)))
-#define set(x, i) (x = (x) | (1 << (i)))
+#define set(x, i) (x = (x) | (1L << (i)))
-#define unset(x, i) (x = (x) & ~(1 << (i)))
+#define unset(x, i) (x = (x) & ~(1L << (i)... | Fix to literal data types in the macros
Thanks for Fu, Bing for noting.
| mit | coriolanus/libhhash | 84fa2ddd969525d8d92329bda9e9b9457ebc3ddd |
#ifndef SCREENSHOT_H_INCLUDED_
#define SCREENSHOT_H_INCLUDED_
#include <vector>
#include <string>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/X.h>
using namespace std;
class X11Screenshot {
public:
X11Screenshot(XImage * image, int new_width=0, int new_height=0, string downscale_type="linera... | #ifndef SCREENSHOT_H_INCLUDED_
#define SCREENSHOT_H_INCLUDED_
#include <vector>
#include <string>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/X.h>
using namespace std;
class X11Screenshot {
public:
X11Screenshot(XImage * image);
bool save_to_png(const char * path);
bool save_... | ---
+++
@@ -9,7 +9,7 @@
class X11Screenshot {
public:
- X11Screenshot(XImage * image);
+ X11Screenshot(XImage * image, int new_width=0, int new_height=0, string downscale_type="lineral");
bool save_to_png(const char * path);
bool save_to_jpeg(const char * path, int quality);
... | Change X11Screenshot structure, add downscale options
| mit | Butataki/cpp-x11-make-screenshot | 1e30ca0b2926f671dec192f358b8739e63a450c2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.