commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 1 4.87k | subject stringlengths 15 778 | message stringlengths 15 8.75k | lang stringclasses 266
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
f6ed7824c55ef2f915eca3965b06cb67fd16335c | test/FrontendC/cstring-align.c | test/FrontendC/cstring-align.c | // RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN32
// RUN: %llvmgcc %s -c -Os -m64 -emit-llvm -o - | llc -march=x86_64 -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64
extern void func(const char *, const char *);
voi... | // RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN32
// RUN: %llvmgcc %s -c -Os -m64 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64
extern void func(const char *, const char *);
voi... | Fix -march= name for x86-64. | Fix -march= name for x86-64.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@89445 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,app... |
3dc5cfa7d542651af425a6c9870b00fd24248b4e | opencog/cython/agent_finder_types.h | opencog/cython/agent_finder_types.h | namespace opencog
{
// This type is returned from the agent_finder_api when loading a python module
// containing agents or requests
struct requests_and_agents_t {
std::vector<std::string> agents;
std::vector<std::string> requests;
std::vector<std::string> req_summary;
std::vector<std::string> req_desc... |
#include <opencog/atomspace/AtomSpace.h>
namespace opencog
{
// This type is returned from the agent_finder_api when loading a python module
// containing agents or requests
struct requests_and_agents_t {
std::vector<std::string> agents;
std::vector<std::string> requests;
std::vector<std::string> req_sum... | Add missing include; fixes build break | Add missing include; fixes build break
| C | agpl-3.0 | inflector/opencog,ArvinPan/atomspace,ceefour/opencog,sanuj/opencog,rodsol/opencog,zhaozengguang/opencog,rohit12/opencog,eddiemonroe/opencog,iAMr00t/opencog,sumitsourabh/opencog,printedheart/atomspace,kinoc/opencog,misgeatgit/atomspace,tim777z/opencog,gavrieltal/opencog,tim777z/opencog,misgeatgit/atomspace,yantrabuddhi/... |
43d14f58dde1f6589cd11c14ce56d31ddfdca027 | Chapter5/expr.c | Chapter5/expr.c | #include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
// Exercise 5-11
#define MAX 1000
int pop(void);
void push(int n);
int main(int argc, char *argv[])
{
while (--argc > 0 && argv++ != NULL)
{
printf("%s\n", *argv);
if(*argv[0] == '+')
{
push(pop() + pop());
}
else if(*argv[0] == ... | #include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
// Exercise 5-11
#define MAX 1000
int pop(void);
void push(int n);
int main(int argc, char *argv[])
{
while (--argc > 0 && argv++ != NULL)
{
printf("%s\n", *argv);
if(*argv[0] == '+')
{
push(pop() + pop());
}
else if(*argv[0] == ... | Implement Exercise 5-10 for multiplication | Implement Exercise 5-10 for multiplication
| C | mit | Kunal57/C_Problems,Kunal57/C_Problems |
15a3fa7b4d5ad5dd911e43661e0f1eba796933ff | TitanHide/log.h | TitanHide/log.h | #ifndef _LOG_H
#define _LOG_H
#include "_global.h"
void Log(const char* format, ...);
#endif | #ifndef _LOG_H
#define _LOG_H
#include "_global.h"
#if defined(__RESHARPER__)
#define PRINTF_ATTR(FormatIndex, FirstToCheck) \
[[gnu::format(printf, FormatIndex, FirstToCheck)]]
#elif defined(__GNUC__)
#define PRINTF_ATTR(FormatIndex, FirstToCheck) \
__attribute__((format(printf, FormatIndex, FirstT... | Add Resharper printf argument type checking and formatting to Log() | Add Resharper printf argument type checking and formatting to Log()
| C | mit | mrexodia/TitanHide,mrexodia/TitanHide,mrexodia/TitanHide |
7ae9bb1196aa3c5c56d12da09d465b63106713f0 | slow.c | slow.c | #define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "arg.h"
char *argv0;
void usage() {
printf("usage: %s [-t usec] [-F]\n", argv0);
exit(EXIT_FAILURE);
}
int main(int argc, char *argv[]) {
char buffer;
size_t nread;
useconds_t useconds = 1000000; // default 1 second... | #define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "arg.h"
char *argv0;
void usage() {
fprintf(stderr, "usage: %s [-t usec] [-F]\n", argv0);
exit(EXIT_FAILURE);
}
int main(int argc, char *argv[]) {
char buffer;
size_t nread;
useconds_t useconds = 1000000; // default... | Write usage() message on stderr. | Write usage() message on stderr.
| C | mit | pips-/slow |
73406f6a857a6f603e446c3b750170dfb8b865d3 | tests/ctests/error_string.c | tests/ctests/error_string.c | int main() {
// Issue: 3: error: empty character constant
'';
// Issue: 6: error: multiple characters in character constant
'ab';
}
| int main() {
// Issue: 3: error: empty character constant
'';
// Issue: 6: error: multiple characters in character constant
'ab';
// Issue: 9: error: multiple characters in character constant
'/*';
}
| Add character string comment test | Add character string comment test
| C | mit | ShivamSarodia/ShivyC,ShivamSarodia/ShivyC,ShivamSarodia/ShivyC |
8f759d3c5cf80b2d6d154705cf31a8423fd7ec07 | euler.h | euler.h | #ifndef __EULER__
#define __EULER__
#define KNRM "\x1B[0m"
#define KRED "\x1B[31m"
#define KGRN "\x1B[32m"
int check(int, int, int);
void error(const char *str);
#endif
| #ifndef __EULER__
#define __EULER__
#define KNRM "\x1B[0m"
#define KRED "\x1B[31m"
#define KGRN "\x1B[32m"
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
int check(int, int, int);
void error(const char *str);
#endif
| Add macros for min and max | Add macros for min and max
| C | bsd-2-clause | skreuzer/euler |
1e701c096ad1ec3b866e2b254ae7ced780faa2e6 | dictionary.c | dictionary.c | #include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "spellutil.h"
#include "dictionary.h"
typedef struct word_count {
int value;
} count;
int
parse_file(const char *filename, spell_hashtable *table)
{
FILE *file = fopen(filename, "r");
int _errno;
char *line = NULL;... | #include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "spellutil.h"
typedef struct word_count {
int value;
} count;
int
parse_file(const char *filename, spell_hashtable *table)
{
FILE *file = fopen(filename, "r");
int _errno;
char *line = NULL;
size_t len = 0;
... | Remove inclusion of a non-existing header file | Remove inclusion of a non-existing header file
| C | bsd-2-clause | abhinav-upadhyay/spell,abhinav-upadhyay/spell |
195e54d55c0b03e68ab46914d3d5e9f985395331 | kernel/irq.c | kernel/irq.c | #include <irq.h>
void irq_enable()
{
__asm__ __volatile__ (
"mrs r0, cpsr\n"
"bic r0, r0, #0x80\n"
"msr cpsr, r0\n"
);
}
void irq_disable()
{
__asm__ __volatile__ (
"mrs r0, cpsr\n"
"orr r0, #0xc0\n"
"msr cpsr, r0\n"
);
}
void handler_swi()
{
uart0_send("In SWI!\n");
irq_enable();
}
void handler_i... | #include <irq.h>
#include <uart.h>
void (*pl190_isr_vectors[IRQ_COUNT])(void) =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
uart0_irq_handler,
0, 0, 0
};
void irq_enable()
{
__asm__ __volatile__ (
"mrs r0, cpsr\n"
"bic r0, r0, #0x80\n"
"msr cpsr, r0\n"
);
}
void irq_disable()
{
__asm__ __volatile__ (
"mrs ... | Remove conditional branch in IRQ handler | Remove conditional branch in IRQ handler
| C | mit | waynecw/cwos,waynecw/cwos |
857025b72f3496ac93bb102f9f265592401117b1 | test/Misc/thinlto.c | test/Misc/thinlto.c | // RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s
// CHECK: <FUNCTION_SUMMARY_BLOCK
// CHECK-NEXT: <PERMODULE_ENTRY
// CHECK-NEXT: <PERMODULE_ENTRY
// CHECK-NEXT: </FUNCTION_SUMMARY_BLOCK
__attribute__((noinline)) void foo() {}
int main() { foo(); }
| // RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s
// CHECK: <GLOBALVAL_SUMMARY_BLOCK
// CHECK-NEXT: <PERMODULE
// CHECK-NEXT: <PERMODULE
// CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK
__attribute__((noinline)) void foo() {}
int main() { foo(); }
| Update test case for llvm summary format changes in D17592. | Update test case for llvm summary format changes in D17592.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@263276 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang |
0e70a5167953692bb96d0d84e7337ed7f833b0d5 | Wangscape/noise/module/codecs/ModuleCodecs.h | Wangscape/noise/module/codecs/ModuleCodecs.h | #pragma once
#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CornerCombinerBaseWrapperCodec.h"
#include "... | #pragma once
#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CornerCombinerBaseWrapperCodec.h"
#include "... | Add Gradient* codec header to all-codecs header | Add Gradient* codec header to all-codecs header
| C | mit | serin-delaunay/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape,serin-delaunay/Wangscape |
dbdcd34d8dfea30fcfcbb176db89e2a14f88eabc | webkit/glue/webkit_constants.h | webkit/glue/webkit_constants.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
#define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
namespace webkit_glue {
// Chromium sets the minimum interval timeou... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
#define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
namespace webkit_glue {
// Chromium sets the minimum interval timeou... | Revert 75430 because it's causing failures in dom_checker_tests. : Increase the minimum interval for timers on background tabs to reduce their CPU consumption. | Revert 75430 because it's causing failures in dom_checker_tests.
: Increase the minimum interval for timers on background tabs to reduce
their CPU consumption.
The new interval is 1000 ms, or once per second. We can easily adjust
this value up or down, but this seems like a reasonable value to judge
the compatibility ... | C | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
48604212f8046625c0392b53b65d5f8440ae35e8 | src/test_interface.c | src/test_interface.c | #include <stdio.h>
#include "decode.h"
#include "event_detection.h"
#include "fast5_interface.h"
#include "homopolymer.h"
#include "kseq.h"
#include "layers.h"
#include "networks.h"
#include "nnfeatures.h"
#include "scrappie_common.h"
#include "scrappie_licence.h"
#include "scrappie_matrix.h"
#include "scrappie_seq_he... | #include <stdio.h>
#include "decode.h"
#include "event_detection.h"
#include "fast5_interface.h"
#include "homopolymer.h"
#include "kseq.h"
#include "layers.h"
#include "networks.h"
#include "nnfeatures.h"
#include "scrappie_common.h"
#include "scrappie_matrix.h"
#include "scrappie_seq_helpers.h"
#include "scrappie_st... | Remove licence from interface test | Remove licence from interface test
| C | mpl-2.0 | nanoporetech/scrappie,nanoporetech/scrappie,nanoporetech/scrappie |
2d3728610e716835f1d54606dee0f7c5cb404f66 | backend/tests/grouter/openflow_flowtable_t.c | backend/tests/grouter/openflow_flowtable_t.c | #include "openflow_flowtable.h"
#include "mut.h"
#include <stdint.h>
#include "common_def.h"
extern void openflow_flowtable_set_defaults(void);
extern uint8_t openflow_flowtable_ip_compare(uint32_t ip_1, uint32_t ip_2,
uint8_t ip_len);
TESTSUITE_BEGIN
TEST_BEGIN("Flowtable Modification")
openflow_flowtabl... | #include "openflow_flowtable.h"
#include "mut.h"
#include <stdint.h>
#include "common_def.h"
extern void openflow_flowtable_set_defaults(void);
extern uint8_t openflow_flowtable_ip_compare(uint32_t ip_1, uint32_t ip_2,
uint8_t ip_len);
TESTSUITE_BEGIN
TEST_BEGIN("Flowtable Modification")
openflow_flowtabl... | Clean up test, use proper structuring functions | Clean up test, use proper structuring functions
| C | mit | anrl/gini3,anrl/gini3,anrl/gini3,anrl/gini3,michaelkourlas/gini,michaelkourlas/gini,anrl/gini3,michaelkourlas/gini,michaelkourlas/gini,michaelkourlas/gini |
2a608956279a2bc37c762f3f2b5e20ee38b1f43c | ui/reflectionview.h | ui/reflectionview.h | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyContainer;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI ReflectionView: public QWidget, publ... | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyContainer;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI ReflectionView: public QWidget, publ... | Add some synchronization modes to reflection view along with a context menu. | Add some synchronization modes to reflection view along with a context menu.
| C | mit | Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api |
2137ddf9dc59273c6444330246fd1c2c34586679 | driver/driver.c | driver/driver.c | /*
* driver - driver for loading mruby source code
*/
#include <stdio.h>
#include "mruby.h"
#include "mruby/compile.h"
#include "mruby/irep.h"
/* The generated mruby bytecodes are stored in this array */
extern const char app_irep[];
int webruby_internal_run(mrb_state* mrb)
{
mrb_load_irep(mrb, app_irep);
ret... | /*
* driver - driver for loading mruby source code
*/
#include <stdio.h>
#include "mruby.h"
#include "mruby/compile.h"
#include "mruby/irep.h"
/* The generated mruby bytecodes are stored in this array */
extern const char app_irep[];
static int check_and_print_errors(mrb_state* mrb)
{
if (mrb->exc) {
mrb_p(... | Print exceptions to console if exist. | Print exceptions to console if exist.
| C | mit | sadasant/webruby,sadasant/webruby,xxuejie/webruby,xxuejie/webruby |
7df596443ac992039d239aa34212ff83943f6d7f | test/time-test.c | test/time-test.c | #include <stdlib.h>
#include <time.h>
#include <detest/detest.h>
#include <disco/time.h>
void test_zero_milliseconds_to_timeval() {
size_t milliseconds = 0;
struct timeval t = milliseconds_to_timeval(milliseconds);
expect(t.tv_sec == 0 && t.tv_usec == 0);
}
void test_one_millisecond_to_timeval() {
... | #include <stdlib.h>
#include <time.h>
#include <detest/detest.h>
#include <disco/time.h>
void test_zero_milliseconds_to_timeval() {
size_t milliseconds = 0;
struct timeval t = milliseconds_to_timeval(milliseconds);
expect(t.tv_sec == 0 && t.tv_usec == 0);
}
void test_one_millisecond_to_timeval() {
... | Add milliseconds to timeval test | Add milliseconds to timeval test
| C | unlicense | mmurdoch/disco,mmurdoch/disco |
574f35bfae6ea591603ead5a8a7db2154058ca6d | firmware/greatfet_usb/usb_api_dac.c | firmware/greatfet_usb/usb_api_dac.c | /*
* This file is part of GreatFET
*/
#include "usb_api_dac.h"
#include "usb.h"
#include "usb_queue.h"
#include "usb_endpoint.h"
#include <stddef.h>
#include <greatfet_core.h>
#include <dac.h>
#include <pins_greatfet.h>
usb_request_status_t usb_vendor_request_dac_set(
usb_endpoint_t* const endpoint, const usb_tr... | /*
* This file is part of GreatFET
*/
#include "usb_api_dac.h"
#include "usb.h"
#include "usb_queue.h"
#include "usb_endpoint.h"
#include <stddef.h>
#include <greatfet_core.h>
#include <dac.h>
#include <pins.h>
usb_request_status_t usb_vendor_request_dac_set(
usb_endpoint_t* const endpoint, const usb_transfer_st... | Fix wrong pins header from being included, add mask to DAC control register | Fix wrong pins header from being included, add mask to DAC control register
| C | bsd-3-clause | dominicgs/GreatFET-experimental,greatscottgadgets/greatfet,greatscottgadgets/greatfet,greatscottgadgets/greatfet,greatscottgadgets/greatfet,dominicgs/GreatFET-experimental,dominicgs/GreatFET-experimental |
21e21481fc3887bf87731c045e72e5a4b78ec2d7 | lib/image/pgm.c | lib/image/pgm.c | #include "image.h"
#include <inttypes.h>
static unsigned char* read_pgm(const char* filename, size_t* width, size_t* height, size_t* nimages) {
*nimages = 1;
unsigned char* image = NULL;
FILE* f = strcmp(filename,"-") ? fopen(filename,"r") : stdin;
uint16_t depth;
if(
f &&
fscanf(f,"P5 %zu %zu %" PRIu16,widt... | #include "image.h"
#include <inttypes.h>
static unsigned char* read_pgm(const char* filename, size_t* width, size_t* height, size_t* nimages) {
*nimages = 1;
unsigned char* image = NULL;
FILE* f = strcmp(filename,"-") ? fopen(filename,"r") : stdin;
uint16_t depth;
if(
f &&
fscanf(f,"P5 %zu %zu %" SCNu16,widt... | Use proper u16 macro for scanf | Use proper u16 macro for scanf
The PRIu16 macro only guarantees that the resulting conversion
specifier will be suitable for printing, not scanning.
SCNu16 provides the appropriate specifier for the latter.
Some libcs define PRIu16 to just "%u" rather than defining both as
"%hu", which is makes sense but results in u... | C | lgpl-2.1 | 0x09/resdet,0x09/resdet,0x09/resdet,0x09/resdet |
72e5c6bb8c0df5b6b0812155474065b30f9e95e2 | firmware/BlynkWidgets.h | firmware/BlynkWidgets.h | /**
* @file BlynkWidgets.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Mar 2015
* @brief
*/
#include "WidgetLED.h"
#include "WidgetLCD.h"
//#include <WidgetTerminal.h> // No Print.... | /**
* @file BlynkWidgets.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Mar 2015
* @brief
*/
#include "WidgetLED.h"
#include "WidgetLCD.h"
#include "WidgetTerminal.h"
#include "Widg... | Add terminal to common widgets | Add terminal to common widgets
| C | mit | vshymanskyy/blynk-library-spark,domo-connect/blynk-library-spark,yaneexy/blynk-library-spark,vshymanskyy/blynk-library-spark,domo-connect/blynk-library-spark,yaneexy/blynk-library-spark,chieftuscan/blynk-library-spark,chieftuscan/blynk-library-spark |
98e6747307ff09935766012ec715e8161722c069 | numpy/core/src/multiarray/buffer.h | numpy/core/src/multiarray/buffer.h | #ifndef _NPY_PRIVATE_BUFFER_H_
#define _NPY_PRIVATE_BUFFER_H_
#ifdef NPY_ENABLE_MULTIPLE_COMPILATION
extern NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#else
NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#endif
#endif
| #ifndef _NPY_PRIVATE_BUFFER_H_
#define _NPY_PRIVATE_BUFFER_H_
#ifdef NPY_ENABLE_SEPARATE_COMPILATION
extern NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#else
NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#endif
#endif
| Fix mispelled separate compilation macro. | Fix mispelled separate compilation macro.
git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@6965 94b884b6-d6fd-0310-90d3-974f1d3f35e1
| C | bsd-3-clause | Ademan/NumPy-GSoC,efiring/numpy-work,efiring/numpy-work,teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,efiring/numpy-work,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,Ademan/NumPy-GSoC,illume/numpy3k,illume/numpy3k,Ademan/NumPy-GSoC,chadnetzer/numpy-gaurdro,illume/... |
ed0f3ad3cc2fb70eabdd0d8dc09936d51c18639c | Classes/Statistics.h | Classes/Statistics.h | /*
Copyright (c) 2008, Stig Brautaset. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the foll... | /*
Copyright (c) 2008, Stig Brautaset. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the foll... | Fix for include path slighlty incorrect | Fix for include path slighlty incorrect
| C | bsd-3-clause | aug2uag/Statistics |
af7e443cb2e40a8c5c3886cf7c37c9a762eaf3b2 | source/common/game_state_manager_base.h | source/common/game_state_manager_base.h | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef GAME_STATE_MANAGER_H
#define GAME_STATE_MANAGER_H
namespace Common {
class GameStateManagerBase
{
public:
virtual bool Initialize() = 0;
virtual vo... | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef GAME_STATE_MANAGER_H
#define GAME_STATE_MANAGER_H
namespace Common {
class GameStateManagerBase
{
public:
virtual bool Initialize() = 0;
virtual vo... | Add virtual functions to handle mouse movments and Resize | COMMON: Add virtual functions to handle mouse movments and Resize
| C | apache-2.0 | RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject |
45aaeef14a06f927c8ebcd31a36c97f180087a1f | include/rapidcheck/Classify.h | include/rapidcheck/Classify.h | #pragma once
/// Tags the current test case if the specified condition is true. If any tags
/// are specified after the condition, those will be used. Otherwise, a string
/// version of the condition itself will be used as the tag.
#define RC_CLASSIFY(condition, ...) \
do {... | #pragma once
/// Tags the current test case if the specified condition is true. If any tags
/// are specified after the condition, those will be used. Otherwise, a string
/// version of the condition itself will be used as the tag.
#define RC_CLASSIFY(condition, ...) \
do {... | Fix missing namespace qualification in classify macros | Fix missing namespace qualification in classify macros
| C | bsd-2-clause | emil-e/rapidcheck,unapiedra/rapidfuzz,emil-e/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,tm604/rapidcheck,whoshuu/rapidcheck,unapiedra/rapidfuzz,tm604/rapidcheck,whoshuu/rapidcheck,whoshuu/rapidcheck,tm604/rapidcheck |
c0bfe92bc801e451e746c8eb8b36d26cb669aa28 | src/polyChecksum.h | src/polyChecksum.h | /**
Copyright (c) 2017 Ryan Porter
You may use, distribute, or modify this code under the terms of the MIT license.
*/
#ifndef POLY_CHECKSUM_H
#define POLY_CHECKSUM_H
// based on code found at http://www.relisoft.com/science/CrcOptim.html
class PolyChecksum
{
public:
PolyChecksum(... | /**
Copyright (c) 2017 Ryan Porter
You may use, distribute, or modify this code under the terms of the MIT license.
*/
#ifndef POLY_CHECKSUM_H
#define POLY_CHECKSUM_H
#include <cstddef>
// based on code found at http://www.relisoft.com/science/CrcOptim.html
class PolyChecksum
{
public:
... | Add include required to compile on linux. | Add include required to compile on linux.
| C | mit | yantor3d/polySymmetry,yantor3d/polySymmetry |
f8f561cce68c06ccf63d1ba9e3503c230daf0f8b | src/input.c | src/input.c | #include "input.h"
#include "command.h"
TreeNode curNode;
char curPlane, extra;
void initializeInput() {
initializeCommands();
curPlane = 0;
}
void handleInput(char ch, AtcsoData *data, WINDOW *msgWin) {
if (!curPlane) {
if (ch >= 'a' && ch <= 'z') {
curPlane = ch;
curNode... | #include "input.h"
#include "command.h"
TreeNode curNode;
char curPlane, extra;
void initializeInput() {
initializeCommands();
curPlane = 0;
}
void handleInput(char ch, AtcsoData *data, WINDOW *msgWin) {
if (!curPlane) {
if (ch >= 'a' && ch <= 'z') {
curPlane = ch;
curNode... | Fix bizarre bug in "altitude [climb|descend]" | Fix bizarre bug in "altitude [climb|descend]"
Climb was descending, and descend was climbing. Turns out it's because
they were trying to climb/descend... newline amount. O_o
| C | mit | KeyboardFire/atcso |
f66be80aa2aedddf20d62cdaeb613cf26037ff11 | src/nsafepass.c | src/nsafepass.c | #include <stdio.h>
#include <config.h>
int main(void)
{
puts("This is " PACKAGE_STRING);
return 0;
}
| /* This file is part of nsafepass
Copyright 2015 Sergey Kvachonok
nsafepass is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any lat... | Add AGPLv3 legalese boilerplate to the source files. | Add AGPLv3 legalese boilerplate to the source files.
Use the shortened version because nobody really cares
about warranties and liabilities.
| C | agpl-3.0 | ravenexp/nsafepass,ravenexp/nsafepass |
63bd713f7609ffb72b8592b772ef525224e6ffdf | test/mocks/Servo.h | test/mocks/Servo.h | /**
* Servo "mock" class. Ideally our ServoMotor class would be using composition
* to become an (Arduino) Servo motor. However, we want to make usage easier and
* transparent to the user, so we are extending the Arduino Servo class.
* The inheritance instead of composition makes things a little bit trickier
* to ... | /**
* Servo "mock" class. Ideally our ServoMotor class would be using composition
* to become an (Arduino) Servo motor. However, we want to make usage easier and
* transparent to the user, so we are extending the Arduino Servo class.
* The inheritance instead of composition makes things a little bit trickier
* to ... | Remove unecessary checks from mock class | Remove unecessary checks from mock class
| C | mit | platisd/smartcar_shield,platisd/smartcar_shield |
22190c6a5152fba9cec3807d96762a8da9a31130 | test/minc.c | test/minc.c | /*
Minimal C SDL example. This code is in the public domain.
Compile with:
gcc `sdl2-config --cflags` `sdl2-config --libs` minc.c
*/
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
#include "SDL.h"
int main(int argc, char** argv)
{
assert (SDL_Init(SDL_INIT_VIDEO) == 0);
SDL_Window *w = ... | /*
Minimal C SDL example. This code is in the public domain.
Compile with:
gcc -o minc minc.c `sdl2-config --cflags --libs`
*/
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
#include "SDL.h"
int main(int argc, char** argv)
{
assert (SDL_Init(SDL_INIT_VIDEO) == 0);
SDL_Window *w =
SD... | Update compilation instructions for minimal C example. | Update compilation instructions for minimal C example.
| C | isc | dbuenzli/tsdl |
1560265b11bb4b4d20d5f566330060f5f8504b04 | test/function.c | test/function.c | int puts(const char *);
int noop(void);
int foo(char *list[5]) {
puts(list[0]);
puts(list[1]);
return sizeof(list);
}
int prints(int n, ...) {
return n;
}
char s1[] = "Hello";
char *s2 = "World";
int main() {
int size = 0;
char *words[2];
words[0] = s1;
words[1] = s2;
size = foo(words);
size = size + si... | int puts(const char *);
int noop(void);
int foo(char *list[5]) {
puts(list[0]);
puts(list[1]);
return sizeof(list[6]);
}
int prints(int n, ...) {
return n;
}
char s1[] = "Hello";
char *s2 = "World";
int main() {
int size = 0;
char *words[2];
words[0] = s1;
words[1] = s2;
size = foo(words);
size = size +... | Change test to get rid of gcc warning | Change test to get rid of gcc warning
| C | mit | larmel/lacc,larmel/c-compiler,larmel/c-compiler,larmel/lacc,larmel/c-compiler |
ab6d6229cd7659ee49974d0116fe8bca06d7d128 | test/Analysis/rdar-6541136-region.c | test/Analysis/rdar-6541136-region.c | // RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
// This test case exercises the ElementRegion::getRValueType() logic.
void foo( void )
{
kernel_tea... | // RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
// This test case exercises the ElementRegion::getRValueType() logic.
void test1( void ) {
kernel_te... | Split buffer overflow test case into two test cases, removing out logic that was commented out. | Split buffer overflow test case into two test cases, removing out logic that was commented out.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@86845 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
889c1530c9b25a784447cd57659aecd3e5434942 | src/include/executor/execdefs.h | src/include/executor/execdefs.h | /*-------------------------------------------------------------------------
*
* execdefs.h
*
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execdefs.h,v 1.4 1999/02/13 23:21:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef EX... | /*-------------------------------------------------------------------------
*
* execdefs.h
*
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: execdefs.h,v 1.5 1999/02/23 07:37:31 thomas Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef EXE... | Add constants for outer join states in executor. | Add constants for outer join states in executor.
| C | apache-2.0 | Quikling/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,royc1/gpdb,Postgres-XL/Postgres-XL,adam8157/gpdb,ovr/postgres-xl,chrishajas/gpdb,rubikloud/gpdb,Chibin/gpdb,Quikling/gpdb,rvs/gpdb,oberstet/postgres-xl,tpostgres-projects/tPostgres,lintzc/gpdb,Chibin/gpdb,lisakowen/gpdb,ahachete/gpdb,0x0FFF/gpdb... |
b7ba8230802b1db4906f3d3f7489b60458b51ad5 | examples/wc_mock.h | examples/wc_mock.h | // Copyright 2015. All Rights Reserved.
// Author: pxtian2008@gmail.com (Xiaotian Pei)
#ifndef EXAMPLES_COREUTILS_WC_MOCK_H_
#define EXAMPLES_COREUTILS_WC_MOCK_H_
#include "examples/coreutils/wc.h"
#include "third_party/gmock/gmock.h"
namespace coreutils {
class MockFile : public File {
public:
MOCK_METHOD2(Open... | // Copyright 2015. All Rights Reserved.
// Author: pxtian2008@gmail.com (Xiaotian Pei)
#ifndef EXAMPLES_COREUTILS_WC_MOCK_H_
#define EXAMPLES_COREUTILS_WC_MOCK_H_
#include "examples/wc.h"
#include "third_party/gmock/gmock.h"
namespace coreutils {
class MockFile : public File {
public:
MOCK_METHOD2(Open, bool(con... | Fix path in header file | Fix path in header file
| C | mit | skyshaw/skynet3,skyshaw/skynet3,skyshaw/skynet3,skyshaw/skynet3 |
2fcfd9bc68a3bc3063eb4f2c56e591fe931bb2be | chrome/app/scoped_ole_initializer.h | chrome/app/scoped_ole_initializer.h | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_APP_SCOPED_OLE_INITIALIZER_H_
#define CHROME_APP_SCOPED_OLE_INITIALIZER_H_
// Wraps OLE initialization in a cross-platform class meant... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_APP_SCOPED_OLE_INITIALIZER_H_
#define CHROME_APP_SCOPED_OLE_INITIALIZER_H_
#include "base/logging.h"
#include "build/build_config.h"
... | Make ScopedOleInitializer work on windows if you aren't including build_config already. | Make ScopedOleInitializer work on windows if you aren't including
build_config already.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/19640
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@8835 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ado... |
28eb97299e564daee96d3af1f9130d6439f170f6 | include/ipc.h | include/ipc.h | #ifndef _SWAY_IPC_H
#define _SWAY_IPC_H
#define event_mask(ev) (1 << (ev & 0x7F))
enum ipc_command_type {
IPC_COMMAND = 0,
IPC_GET_WORKSPACES = 1,
IPC_SUBSCRIBE = 2,
IPC_GET_OUTPUTS = 3,
IPC_GET_TREE = 4,
IPC_GET_MARKS = 5,
IPC_GET_BAR_CONFIG = 6,
IPC_GET_VERSION = 7,
IPC_GET_INPUTS = 8,
IPC_GET_CLIPBOARD =... | #ifndef _SWAY_IPC_H
#define _SWAY_IPC_H
#define event_mask(ev) (1 << (ev & 0x7F))
enum ipc_command_type {
// i3 command types - see i3's I3_REPLY_TYPE constants
IPC_COMMAND = 0,
IPC_GET_WORKSPACES = 1,
IPC_SUBSCRIBE = 2,
IPC_GET_OUTPUTS = 3,
IPC_GET_TREE = 4,
IPC_GET_MARKS = 5,
IPC_GET_BAR_CONFIG = 6,
IPC_GE... | Fix conflicting IPC command type constants with i3's | Fix conflicting IPC command type constants with i3's
| C | mit | 1ace/sway,ascent12/sway,ascent12/sway,taiyu-len/sway,1ace/sway,taiyu-len/sway,1ace/sway,taiyu-len/sway,ascent12/sway,SirCmpwn/sway |
58bb08f20b070180b9729f19ab5160867961ad33 | Example/Tests/TestModels/FLXTestModels.h | Example/Tests/TestModels/FLXTestModels.h | //
// TETestModels.h
// FLUX
//
// Created by Alex Faizullov on 10/28/16.
// Copyright © 2016 Alexey Fayzullov. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <FLUX/FLXStore.h>
#define te_defineStoreTestDouble(name) \
\
@interface name : FLXStore <NSObject *> \
\
@end \
\
@implementation name \... | //
// TETestModels.h
// FLUX
//
// Created by Alex Faizullov on 10/28/16.
// Copyright © 2016 Alexey Fayzullov. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <FLUX/FLXStore.h>
#define flx_defineStoreTestDouble(name) \
\
@interface name : FLXStore <NSObject *> \
\
@end \
\
@implementation name ... | Change test model define prefix | Change test model define prefix
| C | mit | techery/FLUX |
21abbc66f6f0575e910ff19ea782662ab52780d8 | installations/src/installations_internal.h | installations/src/installations_internal.h | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Add platform include to installations header | Add platform include to installations header
The Installations header uses the platform information to include the correct sub header, so it needs to include the platform header itself.
| C | apache-2.0 | firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk,firebase/firebase-cpp-sdk |
eb97ff0f6d9229d940db0048e486949eaa3383b0 | SudokuStart01/Sudoku9by9SolverAnalyzer.h | SudokuStart01/Sudoku9by9SolverAnalyzer.h | //
// Sudoku 9by9 Solver and Analyzer
//
#include "Sudoku9by9Board.h"
class Sudoku9by9SolverAnalyzer
{
private:
Sudoku9by9Board *board_ptr;
int number_of_solutions;
public:
Sudoku9by9SolverAnalyzer();
Sudoku9by9SolverAnalyzer(Sudoku9by9Board *board_ptr);
bool NextTryOrBackTrack(int i, int j, bool backtrack);
vo... | //
// Sudoku 9by9 Solver and Analyzer
//
#include "Sudoku9by9PuzzleBoard.h"
class Sudoku9by9SolverAnalyzer
{
private:
Sudoku9by9Board *board_ptr;
int number_of_solutions;
public:
Sudoku9by9SolverAnalyzer();
Sudoku9by9SolverAnalyzer(Sudoku9by9Board *board_ptr);
bool NextTryOrBackTrack(int i, int j, bool backtrack... | Fix Puzzle board .h file reference | Fix Puzzle board .h file reference
| C | mit | gitguy101/SudokuStartxx |
470b9b8d3739be4b846a08691e4ff7a981106590 | HTMLKit/HTMLElement.h | HTMLKit/HTMLElement.h | //
// HTMLElement.h
// HTMLKit
//
// Created by Iska on 05/10/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "HTMLNamespaces.h"
#import "HTMLNode.h"
@interface HTMLElement : HTMLNode
@property (nonatomic, assign, readonly) HTMLNamespace htmlNamespace;
@p... | //
// HTMLElement.h
// HTMLKit
//
// Created by Iska on 05/10/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "HTMLNamespaces.h"
#import "HTMLNode.h"
@interface HTMLElement : HTMLNode
@property (nonatomic, assign, readonly) HTMLNamespace htmlNamespace;
@p... | Change arguments order in HTML Element initializer for convenience | Change arguments order in HTML Element initializer for convenience
Dictionary argument moved to last position.
| C | mit | iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit |
ba44961e08720cd64a964d9b5d10fd64f8b6f5b3 | Include/bltinmodule.h | Include/bltinmodule.h | /***********************************************************
Copyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,... | /***********************************************************
Copyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,... | Change getbuiltin interface to get the name as an object. | Change getbuiltin interface to get the name as an object.
| C | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator |
a06c8b5a9e08ef2337216c294a6a14ca9579c762 | src/Mapper.h | src/Mapper.h | #ifndef MAPPER_H
#define MAPPER_H
#include <cstdint>
#include <vector>
#include <CartMemory.h>
#include <Mirroring.h>
class Mapper {
public:
Mapper(CartMemory mem) : cartMemory(mem) { init(); };
Mirroring getMirroring() { return cartMemory.mirroring; };
virtual void init() { };
virtual uint8_t readPr... | #ifndef MAPPER_H
#define MAPPER_H
#include <cstdint>
#include <vector>
#include <CartMemory.h>
#include <Mirroring.h>
class Mapper {
public:
Mapper(CartMemory mem) : cartMemory(mem) { init(); };
Mirroring getMirroring() { return cartMemory.mirroring; };
virtual uint8_t readPrg(uint16_t addr) { };
vir... | Make mapper init function protected | Make mapper init function protected
| C | mit | scottjcrouch/ScootNES,scottjcrouch/ScootNES,scottjcrouch/ScootNES |
39a69fb6c520d7f4e272610a2d13795eb75dd1f1 | src/string.c | src/string.c | #include <stddef.h>
void* memcpy(void* restrict destination, const void* restrict source, size_t length)
{
char* restrict dst = destination;
const char* restrict src = source;
/* I know this is naive, but compiler will optimized this because we have restrict. */
for (; length; --length)
{
... | #include <stddef.h>
void* memcpy(void* restrict destination, const void* restrict source, size_t length)
{
char* restrict dst = destination;
const char* restrict src = source;
/* I know this is naive, but compiler will optimized this because we have restrict. */
for (; length; --length)
*dst++... | Simplify loop body of memcpy | Simplify loop body of memcpy
| C | mit | jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic |
01145fa196b4158507dfcd7405026c2d51551c69 | src/modules/fs/methods/access.c | src/modules/fs/methods/access.c | #include "mininode.h"
#include <unistd.h>
#include <fcntl.h>
duk_ret_t mn_bi_fs_access(duk_context *ctx) {
const int nargs = duk_get_top(ctx);
const char *path = NULL;
uv_fs_t *req = NULL;
int mode = 0;
if (nargs == 3) {
mode = duk_require_int(ctx, -2);
path = duk_require_string(ctx, -3);
} else {
mode = ... | #include "mininode.h"
#include <unistd.h>
#include <fcntl.h>
duk_ret_t mn_bi_fs_access(duk_context *ctx) {
const int nargs = duk_get_top(ctx);
const char *path = NULL;
uv_fs_t *req = NULL;
int mode = 0;
if (nargs == 3) {
mode = duk_require_int(ctx, -2);
path = duk_require_string(ctx, -3);
} else if (nargs =... | Add fileName and lineNumber properties to Error | Add fileName and lineNumber properties to Error
| C | mit | hypoalex/mininode,hypoalex/mininode,hypoalex/mininode |
f743a0c0d7c8d67fd5a3263deade3525ce7a0441 | src/MotorShield.h | src/MotorShield.h | #include <Arduino.h>
class MotorShield
{
public:
MotorShield(uint8_t leftSpeedPin, uint8_t leftDirPin,
uint8_t rightSpeedPin, uint8_t rightDirPin);
void init();
void forward();
void backward();
void stop();
void fullSpeed();
void stopLeft();
void stopRight();
uint8_t... | #include <Arduino.h>
class MotorShield
{
public:
MotorShield(uint8_t leftSpeedPin, uint8_t leftDirPin,
uint8_t rightSpeedPin, uint8_t rightDirPin);
// Initialization method. Must be called in Arduino's setup() function.
void init();
// Makes left and right motors go in the forward dir... | Include some comments about each method | Include some comments about each method
| C | mit | lenon/arduino-motorshield |
f31b643032266e29cbd1764abc85ee4619ea5b5d | kernel/core/main.c | kernel/core/main.c | #include <truth/panic.h>
#include <truth/cpu.h>
#include <truth/types.h>
#include <truth/log.h>
#include <truth/slab.h>
#include <truth/heap.h>
#include <truth/physical_allocator.h>
string Logo = str("\n"
" _.-.\n"
" .-. `) | .-.\n"
" _.'`. .... | #include <truth/panic.h>
#include <truth/cpu.h>
#include <truth/types.h>
#include <truth/log.h>
#include <truth/slab.h>
#include <truth/heap.h>
#include <truth/physical_allocator.h>
string Logo = str("\n"
" _.-.\n"
" .-. `) | .-.\n"
" _.'`. .... | Remove unimplemented line of code | Remove unimplemented line of code
| C | mit | iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth |
5124c5f903ca10366dcff8497a77eedc8dd30169 | app/app_config.h | app/app_config.h | /*
* Application configuration
*/
#pragma once
#include <QtCore>
typedef struct
{
QString type;
quint64 frequency;
qint64 nco;
qint64 transverter;
unsigned int rate;
unsigned int decimation;
unsigned int bandwidth;
int freq_corr_... | /*
* Application configuration
*/
#pragma once
#include <QtCore>
typedef struct
{
QString type;
quint64 frequency;
qint64 nco;
qint64 transverter;
quint32 rate;
quint32 decimation;
quint32 bandwidth;
qint32 freq_corr_ppb;
} device_config_t;
typedef... | Use Qt types for integers | Use Qt types for integers
| C | bsd-2-clause | csete/softrig,csete/softrig,csete/softrig |
e8ff2dd846f477d753af91937e0d67a767d48561 | algorithms/include/algorithms/selection_sort.h | algorithms/include/algorithms/selection_sort.h | #ifndef INCLUDE_ALGORITHMS_SELECTION_SORT_H_
#define INCLUDE_ALGORITHMS_SELECTION_SORT_H_
#include <stddef.h>
#include <vector>
#include <functional>
#include "sort_interface.h"
/*
This class implements sorting of elements using selection sort algorithm
The time complexity to sort is quadratic and is insensitive to in... | #ifndef INCLUDE_ALGORITHMS_SELECTION_SORT_H_
#define INCLUDE_ALGORITHMS_SELECTION_SORT_H_
#include <stddef.h>
#include <vector>
#include <functional>
#include "sort_interface.h"
/*
This class implements sorting of elements using selection sort algorithm
The time complexity to sort is quadratic (N2/4) and is insensitiv... | Update comment of selection sort to include time complexity precisely | Update comment of selection sort to include time complexity precisely
| C | mit | TusharJadhav/algorithms,TusharJadhav/algorithms |
be3d7ac0ccd1363ed9a38b275d07270b224fd893 | src/lib/PMDPage.h | src/lib/PMDPage.h | #pragma once
#include "geometry.h"
#include "yaml_utils.h"
#include <vector>
#include <boost/shared_ptr.hpp>
#include <librevenge/librevenge.h>
namespace libpagemaker
{
class PMDPage
{
std::vector<boost::shared_ptr<PMDLineSet> > m_shapes;
public:
PMDPage() : m_shapes()
{ }
void addShape(boost::shared_ptr<PM... | #pragma once
#include "geometry.h"
#include "yaml_utils.h"
#include <vector>
#include <boost/shared_ptr.hpp>
#include <librevenge/librevenge.h>
namespace libpagemaker
{
class PMDPage
{
std::vector<boost::shared_ptr<PMDLineSet> > m_shapes;
public:
PMDPage() : m_shapes()
{ }
void addShape(boost::shared_ptr<PM... | Fix bug in shape yaml emit | Fix bug in shape yaml emit
| C | mpl-2.0 | umanwizard/libpagemaker,umanwizard/libpagemaker,umanwizard/libpagemaker,anuragkanungo/libpagemaker,anuragkanungo/libpagemaker,anuragkanungo/libpagemaker,anuragkanungo/libpagemaker,umanwizard/libpagemaker,umanwizard/libpagemaker |
8d672cf0cf6df3dc43413663063e7309f30a93f6 | HTMLKit/CSSStructuralPseudoSelectors.h | HTMLKit/CSSStructuralPseudoSelectors.h | //
// CSSStructuralPseudoSelector.h
// HTMLKit
//
// Created by Iska on 11/10/15.
// Copyright © 2015 BrainCookie. All rights reserved.
//
@class CSSSelector;
NS_ASSUME_NONNULL_BEGIN
extern CSSSelector * rootSelector();
extern CSSSelector * emptySelector();
extern CSSSelector * parentSelector();
extern CSSSelec... | //
// CSSStructuralPseudoSelector.h
// HTMLKit
//
// Created by Iska on 11/10/15.
// Copyright © 2015 BrainCookie. All rights reserved.
//
@class CSSSelector;
NS_ASSUME_NONNULL_BEGIN
extern CSSSelector * rootSelector();
extern CSSSelector * emptySelector();
extern CSSSelector * parentSelector();
extern CSSSelec... | Fix "lt", "gt" & "eq"-selectors declarations | Fix "lt", "gt" & "eq"-selectors declarations
Added missing index argument
| C | mit | iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit |
9f2b03bc934409144841acb496c9067230bcdb56 | src/rlc_parameters.h | src/rlc_parameters.h | // 3GPP LTE RLC: 4G Radio Link Control protocol interface
// Parameters for RLC AM
const char *const rlc_parameter_names[] =
{
/* RLC mode AM/UM/TM */
"rlc/mode",
/* AM */
"maxRetxThreshold",
"amWindowSize",
"pollPDU",
"pollByte",
"t-StatusProhibit",
"t-PollRetransmit",
/* AM & UM */
"t-Reorderi... | // 3GPP LTE RLC: 4G Radio Link Control protocol interface
// Parameters for RLC AM
const char *const rlc_parameter_names[] =
{
/* RLC mode AM/UM/TM */
"rlc/mode",
"rlc/debug",
/* AM */
"maxRetxThreshold",
"amWindowSize",
"pollPDU",
"pollByte",
"t-StatusProhibit",
"t-PollRetransmit",
/* AM & UM *... | Add rlc/debug to parameter list | Add rlc/debug to parameter list
| C | agpl-3.0 | mmtorni/HamLTE,mmtorni/HamLTE,mmtorni/HamLTE |
3b7d65ec21a63ce20fd93970f1fdf20a41d36ff4 | include/Common.h | include/Common.h | #ifndef COMMON_H_INCLUDED
#define COMMON_H_INCLUDED
#include <string>
#include <vector>
#include <numeric>
#include <iostream>
#include "../include/Console.h"
// Common functions and data to share across all files.
namespace Common {
void ClearScreen();
int input();
void ColourPrint(std::string, Console... | #ifndef COMMON_H_INCLUDED
#define COMMON_H_INCLUDED
#include <string>
#include <vector>
#include <numeric>
#include <iostream>
#include "../include/Console.h"
// Common functions and data to share across all files.
namespace Common {
void ClearScreen();
int input();
void ColourPrint(std::string, Console... | Improve style and naming conventions | Improve style and naming conventions
| C | mit | tagniam/Turn,tagniam/Turn |
91412760f32ac1a5ef02e6c9d99218b1539c4142 | Pod/Classes/KVOMutableArray.h | Pod/Classes/KVOMutableArray.h | #import <Foundation/Foundation.h>
#import "NSObject+BlockObservation.h"
@interface KVOMutableArray : NSMutableArray<NSFastEnumeration, NSMutableCopying, NSCoding, NSCopying>
- (NSMutableArray*)arr;
- (instancetype)init;
- (instancetype)initWithMutableArray:(NSMutableArray*)array NS_DESIGNATED_INITIALIZER;
- (BOOL)is... | #import <Foundation/Foundation.h>
#import "NSObject+BlockObservation.h"
@interface KVOMutableArray<ObjectType> : NSMutableArray<NSFastEnumeration, NSMutableCopying, NSCoding, NSCopying>
- (NSMutableArray*)arr;
- (instancetype)init;
- (instancetype)initWithMutableArray:(NSMutableArray*)array NS_DESIGNATED_INITIALIZER... | Add type arguments support :) | Add type arguments support :)
| C | mit | haifengkao/KVOMutableArray,haifengkao/KVOMutableArray,haifengkao/KVOMutableArray,haifengkao/KVOMutableArray |
fd7e4076eb0b2a6aef74d3cca22f08d395b07281 | chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h | chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_
#define CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_
#includ... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_
#define CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_
#includ... | Revert 167434 - build fix | Revert 167434 - build fix
TBR=scottmg@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11366227
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@167442 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | hujiajie/pa-chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswa... |
ee1c651b874656b27267266797d6fb693764c621 | BBBAPI/BBBAPI/Classes/BBAAPIErrors.h | BBBAPI/BBBAPI/Classes/BBAAPIErrors.h | //
// BBAAPIErrors.h
// BBAAPI
//
// Created by Owen Worley on 11/08/2014.
// Copyright (c) 2014 Blinkbox Books. All rights reserved.
//
NS_ENUM(NSInteger, BBAAPIError) {
/**
* Used when needed parameter is not supplied to the method
* or when object is supplied but it has wrong type or
* fo... | //
// BBAAPIErrors.h
// BBAAPI
//
// Created by Owen Worley on 11/08/2014.
// Copyright (c) 2014 Blinkbox Books. All rights reserved.
//
NS_ENUM(NSInteger, BBAAPIError) {
/**
* Used when needed parameter is not supplied to the method
* or when object is supplied but it has wrong type or
* fo... | Add BBAAPIError code for 409 conflict | Add BBAAPIError code for 409 conflict
| C | mit | blinkboxbooks/blinkbox-network.objc,blinkboxbooks/blinkbox-network.objc |
93c6f1cc5f73223cdd9f68d765a241188ae8d009 | socket.h | socket.h | #include "main.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include <cstdio> | #include "main.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <netdb.h>
#include <resolv.h>
#include <errno.h>
#include <cstdio> | Include a couple more important headers. | Include a couple more important headers.
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
40682086fa8c772523e418515969038aa6deca29 | PWG3/PWG3LinkDef.h | PWG3/PWG3LinkDef.h | #ifdef __CINT__
#pragma link off all glols;
#pragma link off all classes;
#pragma link off all functions;
#endif
| #ifdef __CINT__
#pragma link off all glols;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliD0toKpi+;
#pragma link C++ class AliD0toKpiAnalysis+;
#pragma link C++ class AliBtoJPSItoEle+;
#pragma link C++ class AliBtoJPSItoEleAnalysis+;
#endif
| Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea) | Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea)
| C | bsd-3-clause | ecalvovi/AliRoot,alisw/AliRoot,sebaleh/AliRoot,alisw/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,miranov25/AliRoot,miranov25/AliRoot,alisw/AliRoot,coppedis/AliRoot,ALICEHL... |
63d54af34ad17a158024b9c139b33253cc645274 | SWSheetController.h | SWSheetController.h | //
// PMDisplaySheet.h
// This file is part of the "SWApplicationSupport" project, and is distributed under the MIT License.
//
// Created by Samuel Williams on 10/07/05.
// Copyright 2005 Samuel Williams. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class SWSheetController;
@protocol SWSheetDelegate
- (void... | //
// PMDisplaySheet.h
// This file is part of the "SWApplicationSupport" project, and is distributed under the MIT License.
//
// Created by Samuel Williams on 10/07/05.
// Copyright 2005 Samuel Williams. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class SWSheetController;
@protocol SWSheetDelegate
- (void... | Revert back to method, since it's not strictly a getter. | Revert back to method, since it's not strictly a getter.
| C | mit | oriontransfer/SWApplicationSupport |
d1320f5b3bf39c62adf5280161335d58e22e1ea9 | UIforETW/Version.h | UIforETW/Version.h | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
constexpr float kCurrentVersion = 1.55f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// ... | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
// constexpr might help avoid that, but then it breaks my fragile upgrade-needed
// detection code, so this should be ... | Revert constexpr so that upgrade detection works | Revert constexpr so that upgrade detection works
| C | apache-2.0 | google/UIforETW,google/UIforETW,google/UIforETW,google/UIforETW |
20e1c433e05c7147af5c267e0e0a38a781a6efb4 | thrust/detail/config/cpp_dialect.h | thrust/detail/config/cpp_dialect.h | /*
* Copyright 2018 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | /*
* Copyright 2018 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | Handle MSVC's definition of __cplusplus | Handle MSVC's definition of __cplusplus
MSVC doesnt define __cplusplus correctly unless a compiler flag is passed (/Zc:__cplusplus) but _MSVC_LANG is defined correctly.
To avoid users needing to pass an extra compile flag, I suggest we handle it in the cpp_dialect.h file
| C | apache-2.0 | thrust/thrust,jaredhoberock/thrust,jaredhoberock/thrust,thrust/thrust,jaredhoberock/thrust,jaredhoberock/thrust,jaredhoberock/thrust,thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterator,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterato... |
b928ab3a7fdbbd3e29f555b1c2b840ffe310f50b | Library/JCNotificationBanner.h | Library/JCNotificationBanner.h | #import <Foundation/Foundation.h>
typedef void (^JCNotificationBannerTapHandlingBlock)();
@interface JCNotificationBanner : NSObject
@property (nonatomic) NSString* title;
@property (nonatomic) NSString* message;
@property (nonatomic, strong) JCNotificationBannerTapHandlingBlock tapHandler;
- (JCNotificationBanner*... | #import <Foundation/Foundation.h>
typedef void (^JCNotificationBannerTapHandlingBlock)();
@interface JCNotificationBanner : NSObject
@property (nonatomic) NSString* title;
@property (nonatomic) NSString* message;
@property (nonatomic, copy) JCNotificationBannerTapHandlingBlock tapHandler;
- (JCNotificationBanner*) ... | Set ARC property semantics to "copy" for block. | Set ARC property semantics to "copy" for block.
It seems that ARC should be copying automatically when assigning to a "strong" property of a block type, and this generally appears to be working. But there also appears to be a bug in certain compiler versions in which release mode contains optimizations which do not co... | C | mit | jcoleman/JCNotificationBannerPresenter,bobqian1130/JCNotificationBannerPresenter,mitchellporter/JCNotificationBannerPresenter |
25f42985825dd93f0593efe454e54c2aa13f7830 | arch/x86/lib/usercopy.c | arch/x86/lib/usercopy.c | /*
* User address space access functions.
*
* For licencing details see kernel-base/COPYING
*/
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/word-at-a-time.h>
#include <linux/sched.h>
/*
* best effort, GUP based copy_from_user() that is NMI-safe
*/
unsigned long
copy_from_user_nmi(void *t... | /*
* User address space access functions.
*
* For licencing details see kernel-base/COPYING
*/
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/word-at-a-time.h>
#include <linux/sched.h>
/*
* best effort, GUP based copy_from_user() that is NMI-safe
*/
unsigned long
copy_from_user_nmi(void *t... | Fix broken LBR fixup code | perf/x86: Fix broken LBR fixup code
I noticed that the LBR fixups were not working anymore
on programs where they used to. I tracked this down to
a recent change to copy_from_user_nmi():
db0dc75d640 ("perf/x86: Check user address explicitly in copy_from_user_nmi()")
This commit added a call to __range_not_ok() to t... | C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Program... |
4b516c3c5a41476be8b4ede752eea260879a0602 | includes/StackAllocator.h | includes/StackAllocator.h | #ifndef STACKALLOCATOR_H
#define STACKALLOCATOR_H
#include "Allocator.h"
class StackAllocator : public Allocator {
protected:
void* m_start_ptr;
std::size_t m_offset;
public:
StackAllocator(const std::size_t totalSize);
virtual ~StackAllocator();
virtual void* Allocate(const std::size_t size, const short align... | #ifndef STACKALLOCATOR_H
#define STACKALLOCATOR_H
#include "Allocator.h"
class StackAllocator : public Allocator {
protected:
void* m_start_ptr;
std::size_t m_offset;
public:
StackAllocator(const std::size_t totalSize);
virtual ~StackAllocator();
virtual void* Allocate(const std::size_t size, const short align... | Change allocation header member padding type from char to unsigned short | Change allocation header member padding type from char to unsigned short
| C | mit | mtrebi/memory-allocators |
309368435839be91ebbf874ea00c2d5acb6b9c9e | src/readstat_io.h | src/readstat_io.h |
int readstat_open(const char *filename);
int readstat_close(int fd);
#ifdef _AIX
off64_t readstat_lseek(int fildes, off64_t offset, int whence);
#else
off_t readstat_lseek(int fildes, off_t offset, int whence);
#endif
readstat_error_t readstat_update_progress(int fd, size_t file_size,
readstat_progress_handle... |
int readstat_open(const char *filename);
int readstat_close(int fd);
#if defined _WIN32 || defined __CYGWIN__
_off64_t readstat_lseek(int fildes, _off64_t offset, int whence);
#elif defined _AIX
off64_t readstat_lseek(int fildes, off64_t offset, int whence);
#else
off_t readstat_lseek(int fildes, off_t offset, int whe... | Update readstat_lseek header signature on Windows | Update readstat_lseek header signature on Windows
| C | mit | ivarref/ReadStat,ivarref/ReadStat,WizardMac/ReadStat,WizardMac/ReadStat |
88cf4c93e1fb0a39a2226abe4c869371ef0c6393 | ghighlighter/main.c | ghighlighter/main.c | #include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gh-main-window.h"
char *
data_dir_path ()
{
uid_t uid = getuid ();
struct passwd *pw = getpwuid (uid);
char *home_dir = pw->pw_dir;
char *data_dir = "/.ghighlighter-c";
int length = strlen (home_dir);
length = length ... | #include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include "gh-main-window.h"
char *
data_dir_path ()
{
uid_t uid = getuid ();
struct passwd *pw = getpwuid (uid);
char *home_dir = pw->pw_dir;
char *data_dir = "/.ghighlighter-c";
int length = strlen (home_di... | Create data directory on startup | Create data directory on startup
| C | mit | chdorner/ghighlighter-c |
b212ab9ea21a093ba8fa9895e723bc76b84cf284 | common/alcomplex.h | common/alcomplex.h | #ifndef ALCOMPLEX_H
#define ALCOMPLEX_H
#include <complex>
#include "alspan.h"
/**
* Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is
* FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier
* Transform (DFT) of the time domain data stored in the buffer. The buffer is
*... | #ifndef ALCOMPLEX_H
#define ALCOMPLEX_H
#include <complex>
#include "alspan.h"
/**
* Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is
* FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier
* Transform (DFT) of the time domain data stored in the buffer. The buffer is
*... | Add a note about clearing complex_hilbert's imaginary input | Add a note about clearing complex_hilbert's imaginary input
| C | lgpl-2.1 | aaronmjacobs/openal-soft,aaronmjacobs/openal-soft |
29ce3458d8474870805dd1439cf857d19519bfb1 | crypto/engine/eng_all.c | crypto/engine/eng_all.c | /*
* Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... | /*
* Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... | Remove superfluous call to OPENSSL_cpuid_setup | Remove superfluous call to OPENSSL_cpuid_setup
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Kurt Roeckx <bb87b47479d83cec3c76132206933257ded727b2@roeckx.be>
Reviewed-by: Matt Caswell <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9... | C | apache-2.0 | openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl |
9e574ac297f55917d8f00482d3504cd5e1647cdb | thrust/detail/caching_allocator.h | thrust/detail/caching_allocator.h | /*
* Copyright 2020 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | /*
* Copyright 2020 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | Add a missing inline to the caching allocator accessor. | Add a missing inline to the caching allocator accessor.
Closes #1149.
Reviewed-by: David Olsen <c006f74ad218cd79aa222eb0f74d6fabc2b85975@nvidia.com>
Reviewed-by: Bryce Adelstein Lelbach aka wash <2f0f95f95a80179c2180af4c82f6ea311b6bd2c8@gmail.com>
| C | apache-2.0 | andrewcorrigan/thrust-multi-permutation-iterator,andrewcorrigan/thrust-multi-permutation-iterator,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,thrust/thrust,thrust/thrust,jaredhoberock/thrust,jaredhoberock/thrust,jaredhoberock/thrust,jaredhoberock/thrust,thrust/thrust,thrust/thrust,jaredhoberock/thrus... |
ae65ed8fe3edd89f84f8a083cb8c4c21d387c43c | sift/recorder/threads.h | sift/recorder/threads.h | #ifndef __THREAD_INFO_H
#define __THREAD_INFO_H
#include "globals.h"
#include "sift_writer.h"
#include "bbv_count.h"
#include "pin.H"
#include <deque>
typedef struct {
Sift::Writer *output;
std::deque<ADDRINT> *dyn_address_queue;
Bbv *bbv;
UINT64 thread_num;
ADDRINT bbv_base;
UINT64 bbv_count;
A... | #ifndef __THREAD_INFO_H
#define __THREAD_INFO_H
#include "globals.h"
#include "sift_writer.h"
#include "bbv_count.h"
#include "pin.H"
#include <deque>
typedef struct {
Sift::Writer *output;
std::deque<ADDRINT> *dyn_address_queue;
Bbv *bbv;
UINT64 thread_num;
ADDRINT bbv_base;
UINT64 bbv_count;
A... | Use aligned(LINE_SIZE_BYTES) attribute instead of manually adjusted padding | [sift] Use aligned(LINE_SIZE_BYTES) attribute instead of manually adjusted padding
| C | mit | abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper |
f73256aa30d789aa13df85fd31ce45581bf029a5 | iphone/Classes/TiUIScrollableView.h | iphone/Classes/TiUIScrollableView.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#ifdef USE_TI_UISCROLLABLEVIEW
#import "TiUIView.h"
@interface TiUIScrollableVie... | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#ifdef USE_TI_UISCROLLABLEVIEW
#import "TiUIView.h"
@interface TiUIScrollableVie... | Include header file changes missed from last checkin | [timob-4738] Include header file changes missed from last checkin
| C | apache-2.0 | pec1985/titanium_mobile,kopiro/titanium_mobile,shopmium/titanium_mobile,pinnamur/titanium_mobile,peymanmortazavi/titanium_mobile,jhaynie/titanium_mobile,FokkeZB/titanium_mobile,benbahrenburg/titanium_mobile,smit1625/titanium_mobile,shopmium/titanium_mobile,ashcoding/titanium_mobile,indera/titanium_mobile,falkolab/titan... |
66b0664aa1347df44ff7a5a7aa5b35d07df54ea5 | fitz/base_memory.c | fitz/base_memory.c | #include "fitz_base.h"
void * fz_malloc(int n)
{
void *p = malloc(n);
if (!p)
fz_throw("cannot malloc %d bytes", n);
return p;
}
void * fz_realloc(void *p, int n)
{
void *np = realloc(p, n);
if (np == nil)
fz_throw("cannot realloc %d bytes", n);
return np;
}
void fz_free(void *p)
{
free... | #include "fitz_base.h"
void * fz_malloc(int n)
{
void *p = malloc(n);
if (!p)
fz_throw("cannot malloc %d bytes", n);
return p;
}
void * fz_realloc(void *p, int n)
{
void *np = realloc(p, n);
if (np == nil)
fz_throw("cannot realloc %d bytes", n);
return np;
}
void fz_free(void *p)
{
free... | Use the correct format specifier for size_t in fz_strdup. | Use the correct format specifier for size_t in fz_strdup.
Prior to this patch, if the strdup failed, it would throw an error
printing the number of bytes that could not be allocated. However,
this was formatted as an int, while the actual argument passed is
the return value of strdup itself, which is usually a size_t.... | C | agpl-3.0 | isavin/humblepdf,clchiou/mupdf,muennich/mupdf,michaelcadilhac/pdfannot,seagullua/MuPDF,tribals/mupdf,lustersir/MuPDF,loungeup/mupdf,nqv/mupdf,PuzzleFlow/mupdf,hjiayz/forkmupdf,robamler/mupdf-nacl,benoit-pierre/mupdf,tophyr/mupdf,xiangxw/mupdf,hackqiang/mupdf,Kalp695/mupdf,MokiMobility/muPDF,zeniko/mupdf,robamler/mupdf-... |
1089397a1e5e33db3dc9e291f4c846c0d0dcf560 | webkit/glue/unittest_test_server.h | webkit/glue/unittest_test_server.h | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__
#define WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__
#include "net/base/load_flags.h"
#include "net/test/te... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__
#define WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__
#include "net/base/load_flags.h"
#include "net/test/test_se... | Remove usage of a deprecated TestServer constructor. | Remove usage of a deprecated TestServer constructor.
Hostname must now be explicitly specified (previously default was 127.0.0.1). See the following CL for further details:
http://codereview.chromium.org/9369029/
A follow-up CL will remove the deprecated constructor:
http://codereview.chromium.org/9431002/
BUG=114... | C | bsd-3-clause | hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,keishi/chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,rogerwang/chromium,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,bright-sparks/... |
b535267825875648947e4670043f903ed62b1e0f | BKDeltaCalculator/BKDeltaCalculator.h | BKDeltaCalculator/BKDeltaCalculator.h | // Copyright 2014-present 650 Industries.
// Copyright 2014-present Andrew Toulouse.
#import <Foundation/Foundation.h>
@class BKDelta;
typedef BOOL (^delta_calculator_equality_test_t)(id a, id b);
const delta_calculator_equality_test_t BKDeltaCalculatorStrictEqualityTest;
@interface BKDeltaCalculator : NSObject
+... | // Copyright 2014-present 650 Industries.
// Copyright 2014-present Andrew Toulouse.
#import <Foundation/Foundation.h>
@class BKDelta;
typedef BOOL (^delta_calculator_equality_test_t)(id a, id b);
extern const delta_calculator_equality_test_t BKDeltaCalculatorStrictEqualityTest;
@interface BKDeltaCalculator : NSOb... | Add 'extern' declaration to strict equality test block | Add 'extern' declaration to strict equality test block
Missed this while updating for Objective-C++ compatibility | C | mit | Basket/BKDeltaCalculator |
1735810236c1eed907871cbeb3d0c1d94647328f | aux/version-compatibility-macros.h | aux/version-compatibility-macros.h | // These macros allow writing CPP compatibility hacks in a way that makes their
// purpose much clearer than just demanding a specific version of a library.
#define APPLICATIVE_MONAD MIN_VERSION_base(4,8,0)
#define FOLDABLE_TRAVERSABLE MIN_VERSION_base(4,8,0)
#define MONOID_IN_PRELUDE MIN_VERSION_base(4,8,0)
#de... | -- These macros allow writing CPP compatibility hacks in a way that makes their
-- purpose much clearer than just demanding a specific version of a library.
#define APPLICATIVE_MONAD MIN_VERSION_base(4,8,0)
#define FOLDABLE_TRAVERSABLE MIN_VERSION_base(4,8,0)
#define MONOID_IN_PRELUDE MIN_VERSION_base(4,8,0)
#de... | Fix Haddock trying to render C-style comments of macro file | Fix Haddock trying to render C-style comments of macro file
| C | bsd-2-clause | quchen/prettyprinter,quchen/prettyprinter |
1c63c33fa8255a6c1a00e846a2063f04e06d80a1 | Source/Core/Helpers/HCRunloopRunner.h | Source/Core/Helpers/HCRunloopRunner.h | // OCHamcrest by Jon Reid, http://qualitycoding.org/about/
// Copyright 2016 hamcrest.org. See LICENSE.txt
#import <Foundation/Foundation.h>
/*!
* @abstract Runs runloop until fulfilled, or timeout is reached.
*/
@interface HCRunloopRunner : NSObject
- (instancetype)initWithFulfillmentBlock:(BOOL (^)())fulfillm... | // OCHamcrest by Jon Reid, http://qualitycoding.org/about/
// Copyright 2016 hamcrest.org. See LICENSE.txt
#import <Foundation/Foundation.h>
/*!
* @abstract Runs runloop until fulfilled, or timeout is reached.
* @discussion Based on http://bou.io/CTTRunLoopRunUntil.html
*/
@interface HCRunloopRunner : NSObject
... | Add documentation link to article on runloop | Add documentation link to article on runloop
| C | bsd-2-clause | hamcrest/OCHamcrest,hamcrest/OCHamcrest,hamcrest/OCHamcrest |
6ef09bee374434a9912b0c59dbe2b6e370017a5d | src/efivar.c | src/efivar.c | /*
* libefivar - library for the manipulation of EFI variables
* Copyright 2012 Red Hat, Inc.
*
* 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 the License.... | /*
* libefivar - library for the manipulation of EFI variables
* Copyright 2012 Red Hat, Inc.
*
* 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 the License.... | Add some sample code for efi_get_next_variable_name() | Add some sample code for efi_get_next_variable_name()
Signed-off-by: Peter Jones <2e0a021e603479ff81838c00c3b770daca4e0214@redhat.com>
| C | lgpl-2.1 | rhinstaller/efivar,rhboot/efivar,rhinstaller/efivar,vathpela/efivar-devel,android-ia/vendor_intel_external_efivar,CyanogenMod/android_vendor_intel_external_efivar,rhboot/efivar |
33503e0c9f42eb4c9ae15351d7afe375acb6a12b | src/cltime.c | src/cltime.c | /*
* ClusteredPoller
*
* Created by Jakob Borg.
* Copyright 2011 Nym Networks. See LICENSE for terms.
*/
#include "cltime.h"
#include <stddef.h>
#include <sys/time.h>
curms_t curms(void)
{
struct timeval now;
gettimeofday(&now, NULL);
return now.tv_sec * 1000 + now.tv_usec / 1000;
}
| /*
* ClusteredPoller
*
* Created by Jakob Borg.
* Copyright 2011 Nym Networks. See LICENSE for terms.
*/
#include "cltime.h"
#include <stddef.h>
#include <sys/time.h>
curms_t curms(void)
{
struct timeval now;
gettimeofday(&now, NULL);
return (curms_t) now.tv_sec * 1000 + (curms_t) now... | Fix for Solaris type conversion. | Fix for Solaris type conversion.
| C | bsd-3-clause | calmh/ClusteredPoller,calmh/ClusteredPoller |
a8eabb2ec9b1cc1c453e97f6a701db7e121e77d0 | arc/arc/Model/FileSystem.h | arc/arc/Model/FileSystem.h | //
// FileSystem.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Folder.h"
@interface FileSystem : NSObject {
Folder *_rootFolder; // The root folder.
}
// Returns the root folder of the entire file system... | //
// FileSystem.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Folder.h"
@interface FileSystem : NSObject {
@private
Folder *_rootFolder; // The root folder.
}
// Returns the root folder of the entir... | Add @private indicator to instance variable. | Add @private indicator to instance variable.
| C | mit | BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc |
5e9d8dbf60e137345a988b2e3ed1281dae9d4014 | extras/test/arduino_compat.h | extras/test/arduino_compat.h | #ifndef _ARDUINO_COMPAT_H
#define _ARDUINO_COMPAT_H
#include <stdio.h>
#include <stdlib.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
using namespace std;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsi... | #ifndef _ARDUINO_COMPAT_H
#define _ARDUINO_COMPAT_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
using namespace std;
typedef bool boolean;
typedef iostream Stream;
#endif
| Use stdint.h for unsigned integer typedefs | Use stdint.h for unsigned integer typedefs
Fixes problem compiling regression tests on 64 bit OS.
| C | lgpl-2.1 | stevemarple/MicroNMEA,stevemarple/MicroNMEA |
f08636ea3f92e8debb3cfa64777c459a3d584968 | good_bad_c_example/evil_pointers.c | good_bad_c_example/evil_pointers.c | #include <stdio.h>
main() {
char ch0 = 'a';
char ch1 = 'b';
char ch2 = 'c';
char *p = &ch1;
printf("%d, %c, %c\n", p, *p, ch1);
++p;
printf("%d, %c, %c\n", p, *p, ch1);
printf("%d, %d, %d\n", &ch0, &ch1, &ch2); // Prevent the compiler from optimizing away the char constants
}
| #include <stdio.h>
main() {
char ch0 = 'e';
char ch1 = 'v';
char ch2 = 'i';
char *p = &ch1;
printf("%d, %c, %c\n", p, *p, ch1);
++p;
printf("%d, %c, %c\n", p, *p, ch1);
printf("%d, %d, %d\n", &ch0, &ch1, &ch2); // Prevent the compiler from optimizing away the char constants
}
| Make it more ovious we are not incrementing and decrementing chars | Make it more ovious we are not incrementing and decrementing chars
| C | bsd-3-clause | rbanffy/c_playground,rbanffy/c_playground,rbanffy/c_playground,rbanffy/c_playground,rbanffy/c_playground,rbanffy/c_playground |
89969c3588667d2322ce2c918a8d050d5df8a3a5 | src/condor_includes/condor_getmnt.h | src/condor_includes/condor_getmnt.h | #ifndef _CONDOR_GETMNT_H
#define _CONDOR_GETMNT_H
#if defined(ULTRIX42) || defined(ULTRIX43)
#include <sys/mount.h>
#endif
#if !defined(OSF1)
#include <mntent.h>
#endif
#if !defined(NMOUNT)
#define NMOUNT 256
#endif
#if !defined(ULTRIX42) && !defined(ULTRIX43)
struct fs_data_req {
dev_t dev;
char *devname;
char ... | #ifndef _CONDOR_GETMNT_H
#define _CONDOR_GETMNT_H
#if defined(ULTRIX42) || defined(ULTRIX43)
#include <sys/mount.h>
#endif
#if !defined(OSF1) && !defined(AIX32)
#include <mntent.h>
#endif
#if defined(AIX32)
# include <sys/mntctl.h>
# include <sys/vmount.h>
# include <sys/sysmacros.h>
#endif
#if !defined(NMOUNT)
#de... | Add AIX specific include files. | Add AIX specific include files.
| C | apache-2.0 | djw8605/condor,htcondor/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,djw8605/htcondor,neurodebian/htcondor,djw8605/condor,djw8605/htcondor,djw8605/condor,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,clalancette/... |
1bbf2cc0ec79123ea36e6d3979078698c9c3fc8b | Utilities/ParseOGLExt/Tokenizer.h | Utilities/ParseOGLExt/Tokenizer.h | // -*- c++ -*-
/*=========================================================================
Program: Visualization Toolkit
Module: Tokenizer.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This s... | // -*- c++ -*-
/*=========================================================================
Program: Visualization Toolkit
Module: Tokenizer.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This s... | Use the VTK wrapping of the string class header file. | COMP: Use the VTK wrapping of the string class header file.
| C | bsd-3-clause | Wuteyan/VTK,jmerkow/VTK,collects/VTK,SimVascular/VTK,SimVascular/VTK,jeffbaumes/jeffbaumes-vtk,keithroe/vtkoptix,Wuteyan/VTK,berendkleinhaneveld/VTK,arnaudgelas/VTK,spthaolt/VTK,spthaolt/VTK,candy7393/VTK,keithroe/vtkoptix,gram526/VTK,keithroe/vtkoptix,arnaudgelas/VTK,mspark93/VTK,daviddoria/PointGraphsPhase1,johnkit/v... |
50ccd0d378e1ae094f876630770982817baccecc | test/Driver/gcc_forward.c | test/Driver/gcc_forward.c | // Check that we don't try to forward -Xclang or -mlinker-version to GCC.
// PR12920 -- Check also we may not forward W_Group options to GCC.
//
// RUN: %clang -target powerpc-unknown-unknown \
// RUN: %s \
// RUN: -Wall -Wdocumentation \
// RUN: -Xclang foo-bar \
// RUN: -march=x86_64 \
// RUN: -mlinker-vers... | // Check that we don't try to forward -Xclang or -mlinker-version to GCC.
// PR12920 -- Check also we may not forward W_Group options to GCC.
//
// RUN: %clang -target powerpc-unknown-unknown \
// RUN: %s \
// RUN: -Wall -Wdocumentation \
// RUN: -Xclang foo-bar \
// RUN: -march=x86_64 \
// RUN: -mlinker-vers... | Test that we're not forwarding on -g options to the non integrated assembler. | Test that we're not forwarding on -g options to the non integrated assembler.
This is adding a test for an old fixed PR to make sure we don't regress.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@257009 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
d3a669ffe7ceca3781ff9452a643286850ad32a9 | packages/Python/lldbsuite/test/functionalities/swift-runtime-reporting/abi-v2/library.h | packages/Python/lldbsuite/test/functionalities/swift-runtime-reporting/abi-v2/library.h | // library.h
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBU... | // library.h
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBU... | Include the necessary headers to make the swift-runtime-reporting test work. | [testsuite] Include the necessary headers to make the swift-runtime-reporting test work.
| C | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb |
58aa106997fb828a292457b0668e8497fa253f7d | include/KeyPoint.h | include/KeyPoint.h | /*
* 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... | /*
* 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... | Resolve compilation issue due to missing math.h inclusion | Resolve compilation issue due to missing math.h inclusion
| C | mit | rmcqueen/reverse-image-search |
a149716b29f626bfb3f3aa15722bac51fc05bac0 | src/fake-lock-screen-pattern.h | src/fake-lock-screen-pattern.h | #ifndef _FAKE_LOCK_SCREEN_PATTERN_H_
#define _FAKE_LOCK_SCREEN_PATTERN_H_
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
#endif
void flsp_draw_circle(cairo_t *context,
gint x, gint y, gint radius,... | #ifndef _FAKE_LOCK_SCREEN_PATTERN_H_
#define _FAKE_LOCK_SCREEN_PATTERN_H_
#include <gtk/gtk.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
typedef struct {
gdouble red;
gdouble green;
gdouble blue;
gdouble alpha;
} GdkRGBA;
#endif
void flsp_draw_circle(cairo_t *context,
gint x, gint y, gint radius,... | Add prototype to judge marked point | Add prototype to judge marked point
| C | mit | kenhys/fake-lock-screen-pattern,kenhys/fake-lock-screen-pattern |
a64ce60a9291cc47f1f6298c0c9e3bbdf274350b | tests/hwloc_insert_misc.c | tests/hwloc_insert_misc.c | /*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA
* Copyright © 2009-2010 Université Bordeaux 1
* See COPYING in top-level directory.
*/
#include <private/config.h>
#include <hwloc.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
int main(void)
{
hwloc_topology_t topolo... | /*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA
* Copyright © 2009-2010 Université Bordeaux 1
* See COPYING in top-level directory.
*/
#include <private/config.h>
#include <hwloc.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
int main(void)
{
hwloc_topology_t topolo... | Fix a memory leak in tests | Fix a memory leak in tests
git-svn-id: 14be032f8f42541b1a281b51ae8ea69814daf20e@2903 4b44e086-7f34-40ce-a3bd-00e031736276
| C | bsd-3-clause | BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc |
4d26f6b0448ad636fb3f00c708b1a442c27c7872 | common/uart.h | common/uart.h | #ifndef _UART_H_
#define _UART_H_
#include "mk20dx256.h"
void uart_setup(UART_MemMapPtr base, int baud);
void uart_putchar(UART_MemMapPtr base, char ch);
void uart_putline(UART_MemMapPtr base, char * str);
#endif
| #ifndef _UART_H_
#define _UART_H_
#include "mk20dx256.h"
#include "pins.h"
void uart_setup(UART_MemMapPtr base, int baud);
void uart_putchar(UART_MemMapPtr base, char ch);
void uart_putline(UART_MemMapPtr base, char * str);
/*
* Convenience function to setup UART0 on pins 0 and 1 with 115200 baud
*/
inline static... | Add convenience functions for UART0 | Add convenience functions for UART0
| C | apache-2.0 | mensi/teensy_bare_metal,mensi/teensy_bare_metal,mensi/teensy_bare_metal |
7124f160555bee9fb154b73893de6e853fe31441 | test/Misc/serialized-diags-stable.c | test/Misc/serialized-diags-stable.c | // RUN: rm -f %t
// RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1
// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s
// RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s
int foo() {
// CHECK: serialized-diags-stable.... | // RUN: rm -f %t
// RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1
// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s
// RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s
int foo() {
// CHECK: serialized-diags-stable.... | Remove absolute path from r202733. | Remove absolute path from r202733.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@202746 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
938b137bf0d12a999ae823e3e33ab5825810cf26 | tests/regression/01-cpa/10-posneg.c | tests/regression/01-cpa/10-posneg.c | #include<stdio.h>
#include<assert.h>
int main() {
int i,k,j;
if (k == 5) {
assert(k == 5);
return 0;
}
assert(k != 5);
// simple arithmetic
i = k + 1;
assert(i != 6);
i = k - 1;
assert(i != 4);
i = k * 2;
assert(i != 10); // UNKNOWN! k could be -2147483643;
i = k / 2;
assert(i != 2)... | #include<stdio.h>
#include<assert.h>
int main() {
int i,k,j;
if (k == 5) {
assert(k == 5);
return 0;
}
assert(k != 5);
// simple arithmetic
i = k + 1;
assert(i != 6);
i = k - 1;
assert(i != 4);
i = k * 3; // multiplication with odd numbers is injective
assert(i != 15);
i = k * 2... | Add assertion about result of multiplication to test | Add assertion about result of multiplication to test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
bffdbdfa6d6527f3a4eec98cb64d711fa1d3ac59 | insts/jg/VOCODE2/VOCODE2.h | insts/jg/VOCODE2/VOCODE2.h | #include <objlib.h>
#define MAXFILTS 30
class VOCODE2 : public Instrument {
int skip, numfilts, branch;
float amp, aamp, pctleft, noise_amp, hipass_mod_amp;
float *in, *amparray, amptabs[2];
SubNoiseL *noise;
Butter *modulator_filt[MAXFILTS], *carrier_filt[MAXFILTS], *hipassmod;
Bal... | #include <objlib.h>
#define MAXFILTS 200
class VOCODE2 : public Instrument {
int skip, numfilts, branch;
float amp, aamp, pctleft, noise_amp, hipass_mod_amp;
float *in, *amparray, amptabs[2];
SubNoiseL *noise;
Butter *modulator_filt[MAXFILTS], *carrier_filt[MAXFILTS], *hipassmod;
Ba... | Raise limit on number of filter bands. | Raise limit on number of filter bands.
| C | apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix |
47300b3e0591f3349e8bb61589adf1b175da3d81 | test/Driver/amdgpu-toolchain.c | test/Driver/amdgpu-toolchain.c | // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
// AS_LINK: bin/clang{{.*}} "-cc1as"
// AS_LINK: bin/lld{{.*}} "-flavor" "gnu" "-target" "amdgcn--amdhsa"
| // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
// AS_LINK: bin/clang{{.*}} "-cc1as"
// AS_LINK: lld{{.*}} "-flavor" "gnu" "-target" "amdgcn--amdhsa"
| Handle lld not being found in PATH. | Handle lld not being found in PATH.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@248035 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
8d3d13e234e4236e9ace7fa753c5946307504cdb | test/Analysis/rdar-6541136-region.c | test/Analysis/rdar-6541136-region.c | // RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
// XFAIL
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
// This test case exercises the ElementRegion::getRValueType() logic.
void foo( void )
{
k... | // RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s
struct tea_cheese { unsigned magic; };
typedef struct tea_cheese kernel_tea_cheese_t;
extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
// This test case exercises the ElementRegion::getRValueType() logic.
void foo( void )
{
kernel_tea... | Test now passes. I'll hold off merging it with the BasicStore test until we know this is a stable change. | Test now passes. I'll hold off merging it with the BasicStore test until we know this is a stable change.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@70837 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
ec44f6427bce56ef92dff2ef208f41686c69be0e | nrf5/boards/microbit/nrf51_hal_conf.h | nrf5/boards/microbit/nrf51_hal_conf.h | #ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| #ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
// #define HAL_RTC_MODULE_ENABLED
// #define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| Disable SPI/Timer/RTC hal from microbit board. | nrf5/boards: Disable SPI/Timer/RTC hal from microbit board.
| C | mit | tralamazza/micropython,tralamazza/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit... |
98d89f39e8c930e280c1d68a0749ce79c0a67c65 | src/acc.c | src/acc.c | /* +
*/
#include "dpl/acc.h"
#include "dpl/defs.h"
#include "dpl/utils.h"
int dpl_acc_durance (DplIter *iter, time_t *dur)
{
DplEntry *task;
*dur = 0;
time_t begin, end;
while (dpl_iter_next (iter, &task) == DPL_OK) {
dpl_entry_begin_get (task, &begin);
DPL_FORWARD_ERROR (dpl_entry_... | /* +
*/
#include "dpl/acc.h"
#include "dpl/defs.h"
#include "dpl/utils.h"
int dpl_acc_durance (DplIter *iter, time_t *dur)
{
const DplEntry *task;
*dur = 0;
time_t begin, end;
while (dpl_iter_next (iter, &task) == DPL_OK) {
dpl_entry_begin_get (task, &begin);
DPL_FORWARD_ERROR (dpl_... | Fix constness to avoid a compiler warning. | Fix constness to avoid a compiler warning.
Fixes #39.
| C | bsd-2-clause | pyohannes/dayplan,pyohannes/dayplan |
2d3fb89f05d62306694fb4d2a9e45de86e737b0d | numpy/core/src/multiarray/convert_datatype.h | numpy/core/src/multiarray/convert_datatype.h | #ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
#define _NPY_ARRAY_CONVERT_DATATYPE_H_
NPY_NO_EXPORT PyObject *
PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran);
#endif
| #ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
#define _NPY_ARRAY_CONVERT_DATATYPE_H_
NPY_NO_EXPORT PyObject *
PyArray_CastToType(PyArrayObject *mp, PyArray_Descr *at, int fortran);
NPY_NO_EXPORT int
PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp);
NPY_NO_EXPORT PyArray_VectorUnaryFunc *
PyArray_GetCastFunc(PyArray_De... | Add API for datatype conversion. | Add API for datatype conversion.
git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@6920 94b884b6-d6fd-0310-90d3-974f1d3f35e1
| C | bsd-3-clause | Ademan/NumPy-GSoC,chadnetzer/numpy-gaurdro,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,illume/numpy3k,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,illume/numpy3k,efiring/numpy-work,efiring/numpy-work,jasonmccampbell/num... |
484f8ae37bf516a63ba67ec004ac5acf33f98a9f | src/UpdateDialogWin32.h | src/UpdateDialogWin32.h | #pragma once
#include "Platform.h"
#include "UpdateMessage.h"
#include "UpdateObserver.h"
#include "wincore.h"
#include "controls.h"
#include "stdcontrols.h"
class UpdateDialogWin32 : public UpdateDialog
{
public:
UpdateDialogWin32();
~UpdateDialogWin32();
// implements UpdateDialog
virtual void init(int a... | #pragma once
#include "Platform.h"
#include "UpdateDialog.h"
#include "UpdateMessage.h"
#include "wincore.h"
#include "controls.h"
#include "stdcontrols.h"
class UpdateDialogWin32 : public UpdateDialog
{
public:
UpdateDialogWin32();
~UpdateDialogWin32();
// implements UpdateDialog
virtual void init(int arg... | Fix Win32 build - add missing include | Fix Win32 build - add missing include
| C | bsd-2-clause | zhengw1985/Update-Installer,zhengw1985/Update-Installer,zhengw1985/Update-Installer |
34738e9bc5e98c15f60e9e9cf2612cb116fd2202 | snake.c | snake.c | #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| Define the board height and width. | Define the board height and width.
| C | mit | Hendrikto/Snake |
72467b21e9d8dced87245dda0aaef49c8965345a | cpp/include/phevaluator/hand.h | cpp/include/phevaluator/hand.h | #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... | Fix a Hand type compiling errors in GNU compiler | Fix a Hand type compiling errors in GNU compiler
| C | apache-2.0 | HenryRLee/PokerHandEvaluator,HenryRLee/PokerHandEvaluator,HenryRLee/PokerHandEvaluator |
4e991f46323ca1b6e0097e661812f1ff61852ce5 | src/Mobs/AggressiveMonster.h | src/Mobs/AggressiveMonster.h |
#pragma once
#include "Monster.h"
class cAggressiveMonster :
public cMonster
{
typedef cMonster super;
public:
cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
virtual void Tick (... |
#pragma once
#include "Monster.h"
class cAggressiveMonster :
public cMonster
{
typedef cMonster super;
public:
cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
virtual void Tick (... | Add comment to Attack() return values | Add comment to Attack() return values | C | apache-2.0 | QUSpilPrgm/cuberite,birkett/MCServer,SamOatesPlugins/cuberite,ionux/MCServer,bendl/cuberite,Fighter19/cuberite,marvinkopf/cuberite,SamOatesPlugins/cuberite,Altenius/cuberite,Schwertspize/cuberite,birkett/cuberite,SamOatesPlugins/cuberite,marvinkopf/cuberite,SamOatesPlugins/cuberite,QUSpilPrgm/cuberite,Schwertspize/cube... |
26b937b2a349e9e6b294703232af264af7e277c4 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k12"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k13"
| Update driver version to 5.02.00-k13 | [SCSI] qla4xxx: Update driver version to 5.02.00-k13
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
| C | mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Program... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.