commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
b701d2ce0e96280713b84192aed48fb87d609d94 | mud/home/Http/lib/form/thing.c | mud/home/Http/lib/form/thing.c | inherit "/lib/string/sprint";
inherit "../support";
static string thing_form(object obj)
{
string buffer;
buffer = "<p>Fun little boxes:</p>\n";
buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n";
buffer += "Mass: <input type=\"text\" name=\"mass\" value=\"" + mixed_sprint(... | inherit "/lib/string/sprint";
inherit "../support";
static string thing_form(object obj)
{
string buffer;
buffer = "<p>Fun little boxes:</p>\n";
buffer += "<form action=\"object.lpc?obj=" + object2string(obj) + "\" method=\"post\">\n";
buffer += "Local mass: <input type=\"text\" name=\"localmass\" value=\"" + mi... | Remove http form for mass, only manipulate local mass | Remove http form for mass, only manipulate local mass
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
9c593e10c013d0000c3b61e6a0ee97a89418eff9 | ObjectiveRocks/RocksDBCuckooTableOptions.h | ObjectiveRocks/RocksDBCuckooTableOptions.h | //
// RocksDBCuckooTableOptions.h
// ObjectiveRocks
//
// Created by Iska on 04/01/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface RocksDBCuckooTableOptions : NSObject
@property (nonatomic, assign) double hashTableRatio;
@property (nonatomic, assign) ui... | //
// RocksDBCuckooTableOptions.h
// ObjectiveRocks
//
// Created by Iska on 04/01/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface RocksDBCuckooTableOptions : NSObject
/**
@brief
Determines the utilization of hash tables. Smaller values
result in l... | Add source code documentation for the RocksDB Cuckoo Table Options class | Add source code documentation for the RocksDB Cuckoo Table Options class
| C | mit | iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks,iabudiab/ObjectiveRocks |
0e3e00a1838d8e0f94001f1e83dc477023c8ea8c | src/locking/lock_driver_lockd.h | src/locking/lock_driver_lockd.h | /*
* lock_driver_lockd.h: Locking for domain lifecycle operations
*
* Copyright (C) 2010-2011 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 ... | /*
* lock_driver_lockd.h: Locking for domain lifecycle operations
*
* Copyright (C) 2010-2011 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 ... | Use bit shift for flag values not constant values. | locking: Use bit shift for flag values not constant values.
So far it hasn't bitten us, but if the next value wasn't 4, then
the logic used to check flag bits would have issues.
| C | lgpl-2.1 | datto/libvirt,eskultety/libvirt,andreabolognani/libvirt,libvirt/libvirt,jardasgit/libvirt,andreabolognani/libvirt,VenkatDatta/libvirt,libvirt/libvirt,nertpinx/libvirt,zippy2/libvirt,taget/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,olafhering/libvirt,eskultety/libvirt,datto/libvirt,zippy2/libvirt,zippy2/lib... |
24ee156a39f8c01c1d64aeacca1de7bcfae0727b | 2015-2016/G/21/07/is_prime.c | 2015-2016/G/21/07/is_prime.c | #include <stdio.h>
int is_prime(int *);
int main()
{
int answer;
int number;
int *refernce_of_a = &number;
scanf("%d",refernce_of_a);
answer = is_prime(&number);
printf("%d",answer);
}
int is_prime(int *numb)
{
int counter;
for(counter = 0; counter <= *numb/2; counter++)
{
if(counter * counter ==... | Add folder with is prime program Krastian Tomov No 21 10g | Add folder with is prime program Krastian Tomov No 21 10g
| C | mit | elsys/po-classwork | |
b8515c20948319006a133f8ca121d780e725d222 | milestone2/arrayIndexing.c | milestone2/arrayIndexing.c | extern void print_int(int i);
extern void print_string(char c[]);
int return1(void) {
return 1;
}
void main(void){
int myInt;
int intArr[3];
/* need assignToArry to work for this to work */
intArr[0] = 999;
intArr[1] = 100;
intArr[2] = 200;
/* test index from a variable */
myInt... | Add test case for indexing into an array, since the array index can be an expression | Add test case for indexing into an array, since the array index can be an expression
| C | unlicense | mgaut72/cmm-examples,mgaut72/cmm-examples | |
526f01761e0c9334853aeaffb8d6c5b5984c96da | src/plugins/mini/testmod_mini.c | src/plugins/mini/testmod_mini.c | /**
* @file
*
* @brief Tests for mini plugin
*
* @copyright BSD License (see doc/LICENSE.md or http://www.libelektra.org)
*
*/
#include "values.h"
#include <stdlib.h>
#include <string.h>
#include <kdbconfig.h>
#include <tests_plugin.h>
static void test_basics ()
{
printf ("• Test basic functionality of plu... | /**
* @file
*
* @brief Tests for mini plugin
*
* @copyright BSD License (see doc/LICENSE.md or http://www.libelektra.org)
*
*/
/* -- Imports --------------------------------------------------------------------------------------------------------------------------- */
#include "values.h"
#include <stdlib.h>
#i... | Use comments to structure file | mINI: Use comments to structure file
| C | bsd-3-clause | e1528532/libelektra,e1528532/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,e1528532/libelektra,mpranj/libe... |
5d6bcc40ec64c8780b6c87a740bae34381844f5d | src/qtpromise/qpromisehelpers.h | src/qtpromise/qpromisehelpers.h | #ifndef QTPROMISE_QPROMISEHELPERS_H
#define QTPROMISE_QPROMISEHELPERS_H
// QtPromise
#include "qpromise_p.h"
namespace QtPromise {
template <typename T>
typename QtPromisePrivate::PromiseDeduce<T>::Type qPromise(T&& value)
{
using namespace QtPromisePrivate;
using Promise = typename PromiseDeduce<T>::Type;
... | #ifndef QTPROMISE_QPROMISEHELPERS_H
#define QTPROMISE_QPROMISEHELPERS_H
// QtPromise
#include "qpromise_p.h"
namespace QtPromise {
template <typename T>
static inline typename QtPromisePrivate::PromiseDeduce<T>::Type qPromise(T&& value)
{
using namespace QtPromisePrivate;
using Promise = typename PromiseDedu... | Fix helpers multiple defined symbols | Fix helpers multiple defined symbols
| C | mit | simonbrunel/qtpromise |
9e1fcb22a6d863b7f804b778d9ae85fbdf616f1b | test/small1/const-struct-init.c | test/small1/const-struct-init.c | struct inner {
int field;
};
struct outer {
const struct inner inner;
};
int main()
{
struct outer outer = { { 0 } };
return outer.inner.field;
}
| Add a test case showing that CIL forgets to remove the "const" qualifier on structures within structures. When it subsequently converts initializations of such structures into assignments, the resulting C code appears to be assigning into a const field. That produces warnings or errors from the C compiler. | Add a test case showing that CIL forgets to remove the "const"
qualifier on structures within structures. When it subsequently
converts initializations of such structures into assignments, the
resulting C code appears to be assigning into a const field. That
produces warnings or errors from the C compiler.
| C | bsd-3-clause | samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c | |
342b576de5cc3fd0aad536171d68b414ffc0fc3d | libc/sys_io.c | libc/sys_io.c | #include <stdint.h>
void outb(uint16_t port, uint8_t value) {
asm volatile ("outb %1, %0" : : "dN" (port), "a" (value));
}
unsigned char inb(uint16_t port) {
unsigned char ret;
asm volatile ("inb %1, %0" : "=a" (ret) : "dN" (port));
return ret;
}
| #include <stdint.h>
void outb(uint16_t port, uint8_t value) {
asm volatile ("outb %1, %0" : : "dN" (port), "a" (value));
}
unsigned char inb(uint16_t port) {
unsigned char ret;
asm volatile ("inb %1, %0" : "=a" (ret) : "dN" (port));
return ret;
}
void outl(uint16_t port, uint32_t value) {
asm volatile ("ou... | Add inl and outl functions | Add inl and outl functions
| C | mit | simon-andrews/norby,simon-andrews/norby,simon-andrews/norby |
2f36de17a4ea00909f84819882cd5f5237ddab59 | src/writer/verilog/axi/master_controller.h | src/writer/verilog/axi/master_controller.h | // -*- C++ -*-
#ifndef _writer_verilog_axi_master_controller_h_
#define _writer_verilog_axi_master_controller_h_
#include "writer/verilog/axi/axi_controller.h"
namespace iroha {
namespace writer {
namespace verilog {
namespace axi {
class MasterController : public AxiController {
public:
MasterController(const IRe... | // -*- C++ -*-
#ifndef _writer_verilog_axi_master_controller_h_
#define _writer_verilog_axi_master_controller_h_
#include "writer/verilog/axi/axi_controller.h"
namespace iroha {
namespace writer {
namespace verilog {
namespace axi {
class MasterController : public AxiController {
public:
MasterController(const IRe... | Fix wrong member declaration which shadows parent class. | Fix wrong member declaration which shadows parent class.
| C | bsd-3-clause | nlsynth/iroha,nlsynth/iroha |
0286596dd6eee2b3573722716af45395314e4246 | lib/arch/x86_64/defs.h | lib/arch/x86_64/defs.h | #define JOIN_(a, b) a ## b
#define JOIN(a, b) JOIN_(a, b)
#define SYMBL(x) JOIN(__USER_LABEL_PREFIX__, x)
#if defined(__linux__)
# define SECTION_NAME_TEXT .text
# define SECTION_NAME_BSS .bss
#elif defined(__DARWIN__)
# define SECTION_NAME_TEXT __TEXT,__text
# define SECTION_NAME_BSS __BSS,__bss
#else
# error u... | #define JOIN_(a, b) a ## b
#define JOIN(a, b) JOIN_(a, b)
#define SYMBL(x) JOIN(__USER_LABEL_PREFIX__, x)
#if defined(__linux__)
# define SECTION_NAME_TEXT .text
# define SECTION_NAME_BSS .bss
.section .note.GNU-stack,"",@progbits
#elif defined(__DARWIN__)
# define SECTION_NAME_TEXT __TEXT,__text
# define SECTI... | Enable noexecstack for local-lib builds | Enable noexecstack for local-lib builds
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
f3520bda1e026f251e4772983bd307b2e72a5eb2 | fibmap/fibmap.c | fibmap/fibmap.c | /*
* fibmap - List blocks of a file
*
* Written in 2012 by Prashant P Shah <pshah.mumbai@gmail.com>
*
* To the extent possible under law, the author(s) have dedicated
* all copyright and related and neighboring rights to this software
* to the public domain worldwide. This software is distributed
* without any ... | Add program to list blocks of a file | Add program to list blocks of a file
Signed-off-by: Prashant Shah <80f978b5ac27fb318171799f0fb6a277863f2bf5@gmail.com>
| C | cc0-1.0 | prashants/c | |
3b09a6a7faae7363ffc90749e041788a17559f0f | src/test/tester.c | src/test/tester.c | #include <stdio.h>
#include <string.h>
#include <efivar.h>
#define TEST_GUID EFI_GUID(0x84be9c3e,0x8a32,0x42c0,0x891c,0x4c,0xd3,0xb0,0x72,0xbe,0xcc)
static void
clean_test_environment(void)
{
efi_del_variable(TEST_GUID, "small");
efi_del_variable(TEST_GUID, "large");
}
#define report_error(str) ({fprintf(stderr, ... | #include <stdio.h>
#include <string.h>
#include <efivar.h>
#define TEST_GUID EFI_GUID(0x84be9c3e,0x8a32,0x42c0,0x891c,0x4c,0xd3,0xb0,0x72,0xbe,0xcc)
static void
clean_test_environment(void)
{
efi_del_variable(TEST_GUID, "small");
efi_del_variable(TEST_GUID, "large");
}
#define report_error(str) ({fprintf(stderr, ... | Use flags that will actually work when testing. | Use flags that will actually work when testing.
| C | lgpl-2.1 | rhboot/efivar,rhinstaller/efivar,android-ia/vendor_intel_external_efivar,rhinstaller/efivar,rhboot/efivar,CyanogenMod/android_vendor_intel_external_efivar,vathpela/efivar-devel |
f15b376345a4480513880390a3e05ed77fd66ef8 | test/tools/llvm-symbolizer/print_context.c | test/tools/llvm-symbolizer/print_context.c | // REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
// CHECK: inc
// CHECK: print_context.c:7
// CHECK: 5 : #inc... | // REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
// CHECK: inc
// CHECK: print_context.c:[[@LINE+9]]
// CHECK: [[@LINE+6]] : #include
// CHECK: [[@LINE+6]] :
// CHECK: [[@LINE+6]] >: int inc
// CHECK: [[@LINE+6]] :... | Make test robust to changes in prefix/avoid hardcoded line numbers | Make test robust to changes in prefix/avoid hardcoded line numbers
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309516 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 429be9362d598d3b7b3ea6e19b1be2dca867aa0a)
| C | apache-2.0 | apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm |
036120761c2a02ef426b7d9b81675f642ffc12bf | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
#define GR_TEST_UTILS 1
#define SKIA_DLL... | Add file to replace android_framework_defines.gni | Add file to replace android_framework_defines.gni
SkUserConfig.h will continue to be generated by gn_to_bp.py, and it
will include all the #defines that were pulled from our GN files. But it
will also include this new file, SkUserConfigManual.h, which contains
all the #defines that were previously stored in gn_to_bp.p... | C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_sk... | |
e4d4544dd5ebc59f9527f00cdd2494075b77b52e | include/graph.h | include/graph.h | #ifndef GRAPH_H
#define GRAPH_H
#include <unordered_map>
#include <unordered_set>
template<typename T>
class Graph {
public:
void connect(const T &a, const T &b);
const std::unordered_set<T>& get_vertex_ids() const;
inline const std::unordered_set<T>& get_neighbors(const T &vertex_id) const {
re... | #ifndef GRAPH_H
#define GRAPH_H
#include <unordered_map>
#include <unordered_set>
template<typename T>
class Graph {
public:
void connect(const T &a, const T &b);
const std::unordered_set<T>& get_vertex_ids() const;
inline const std::unordered_set<T>& get_neighbors(const T &vertex_id) const {
re... | Move id initialization to initialization list | Move id initialization to initialization list
| C | mit | chivay/betweenness-centrality |
7e265dc4cbda1754a27ac2db68c955333840ee74 | src/include/common/hash_util.h | src/include/common/hash_util.h | //
// Created by patrick on 31/03/17.
//
#ifndef PELOTON_HASH_UTIL_H
#define PELOTON_HASH_UTIL_H
#endif //PELOTON_HASH_UTIL_H
| Add hashing for AbstractExpression, TupleValueExpression, ConstValueExpression | Add hashing for AbstractExpression, TupleValueExpression, ConstValueExpression
| C | apache-2.0 | phisiart/peloton-p3,apavlo/peloton,PauloAmora/peloton,yingjunwu/peloton,apavlo/peloton,vittvolt/peloton,ShuxinLin/peloton,cmu-db/peloton,malin1993ml/peloton,AngLi-Leon/peloton,haojin2/peloton,seojungmin/peloton,vittvolt/15721-peloton,malin1993ml/peloton,seojungmin/peloton,vittvolt/15721-peloton,cmu-db/peloton,AllisonWa... | |
4ccf7377fc44127b522b3b830b4ae371a35be2d4 | test/Driver/diagnostics.c | test/Driver/diagnostics.c | // Parse diagnostic arguments in the driver
// PR12181
// RUN: not %clang -target x86_64-apple-darwin10 \
// RUN: -fsyntax-only -fzyzzybalubah \
// RUN: -Werror=unused-command-line-argument %s
// RUN: not %clang -target x86_64-apple-darwin10 \
// RUN: -fsyntax-only -fzyzzybalubah -Werror %s
| // Parse diagnostic arguments in the driver
// PR12181
// RUN: not %clang -target x86_64-apple-darwin10 \
// RUN: -fsyntax-only -fzyzzybalubah \
// RUN: -Werror=unused-command-line-argument %s
// RUN: not %clang -target x86_64-apple-darwin10 \
// RUN: -fsyntax-only -fzyzzybalubah -Werror %s
| Remove trailing whitespace (especially after a \ which should be trailing) | Remove trailing whitespace (especially after a \ which should be trailing)
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@152695 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
5c47be7f6118a3c89a326e687d113837998b130e | src/gcd.h | src/gcd.h | #ifndef __gcd_h_included__
#define __gcd_h_included__
// Euclid's algorithm for computing the greatest common divisor
template<typename I> I gcd(I a, I b)
{
while (a > 0 && b > 0) {
if (a > b)
a -= b;
else
b -= a;
}
return a == 0 ? b : a;
}
#endif
| Add algorithm for greatest common divisor | Add algorithm for greatest common divisor
| C | mit | olafdietsche/algorithms | |
e1f21893cedcb02fc76415e2bb95b3d0c06d1abf | rbcoremidi.c | rbcoremidi.c | /*
* Copyright 2008 Markus Prinz
* Released unter an MIT licence
*
*/
#include <ruby.h>
#include <CoreMIDI/CoreMIDI.h>
VALUE callback_proc = Qnil;
MIDIPortRef inPort = NULL;
MIDIClientRef client = NULL;
static void RbMIDIReadProc(const MIDIPacketList* packetList, void* readProcRefCon, void* srcConnRefCon)
{
... | /*
* Copyright 2008 Markus Prinz
* Released unter an MIT licence
*
*/
#include <ruby.h>
#include <CoreMIDI/CoreMIDI.h>
VALUE callback_proc = Qnil;
MIDIPortRef inPort = NULL;
MIDIClientRef client = NULL;
static void RbMIDIReadProc(const MIDIPacketList* packetList, void* readProcRefCon, void* srcConnRefCon)
{
... | Add best guess at a method that returns an array with the names of all sources | Add best guess at a method that returns an array with the names of all sources
| C | mit | cypher/rbcoremidi,cypher/rbcoremidi |
989e9cacd53cf574b4445e0b1e2eed5dba5d7894 | exercise111.c | exercise111.c | /* Exercise 1-11: How would you test the word count program? What kinds of
* input are most likely to uncover bugs if there are any? */
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
/* This is such a cheat. */
printf("Types of input that could be used to test a word counting program:\n... | Add incredibly lame solution to Exercise 1-11. | Add incredibly lame solution to Exercise 1-11.
| C | unlicense | damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions | |
efbdf8c9d08d6c63fbd86487aef3c95052770090 | src/modules/conf_randr/e_smart_randr.h | src/modules/conf_randr/e_smart_randr.h | #ifdef E_TYPEDEFS
#else
# ifndef E_SMART_RANDR_H
# define E_SMART_RANDR_H
Evas_Object *e_smart_randr_add(Evas *evas);
void e_smart_randr_virtual_size_calc(Evas_Object *obj);
void e_smart_randr_monitors_create(Evas_Object *obj);
# endif
#endif
| #ifdef E_TYPEDEFS
#else
# ifndef E_SMART_RANDR_H
# define E_SMART_RANDR_H
Evas_Object *e_smart_randr_add(Evas *evas);
void e_smart_randr_virtual_size_calc(Evas_Object *obj);
void e_smart_randr_monitors_create(Evas_Object *obj);
void e_smart_randr_min_size_get(Evas_Object *obj, Evas_Coord *mw, Evas_Coord *mh);
# endi... | Add function prototype for min_size_get. | Add function prototype for min_size_get.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 84149
| C | bsd-2-clause | tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,tasn/enlightenment,rvandegrift/e |
84e985bb87454fa85b0adb224f5d94905356a5a1 | BRStyle/Code/Core.h | BRStyle/Code/Core.h | //
// Core.h
// BRStyle
//
// Created by Matt on 24/07/15.
// Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0.
//
#import <BRStyle/BRUIStyle.h>
#import <BRStyle/BRUIStyleObserver.h>
#import <BRStyle/BRUIStyleSettings.h>
#import <BRStyle/BRUIStylishHost.h>
#import <B... | //
// Core.h
// BRStyle
//
// Created by Matt on 24/07/15.
// Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0.
//
#import <BRStyle/BRUIStyle.h>
#import <BRStyle/BRUIStyleObserver.h>
#import <BRStyle/BRUIStyleSettings.h>
#import <BRStyle/BRUIStylishHost.h>
#import <B... | Remove import that no longer exists. | Remove import that no longer exists.
| C | apache-2.0 | Blue-Rocket/BRStyle,Blue-Rocket/BRStyle,Blue-Rocket/BRStyle,Blue-Rocket/BRStyle |
04d4f58eebf95b7c7f8a945b713e7c8bab75d6d5 | includes/cl_list.h | includes/cl_list.h | #ifndef _LIBADT_CL_LIST_H
#define _LIBADT_CL_LIST_H
#include <adt_commons.h>
#include <list.h>
typedef list_root cl_list_root;
struct _list_node {
list_node *prev; // Pointer to prev list_node element.
list_node *next; // Pointer to next list_node element.
void *data; // Pointer to the element added on the lis... | Add function declarations for Circular Lists. | Add function declarations for Circular Lists.
| C | mit | vndmtrx/libadt | |
0241963d4360407d1ab954f8a05e4d3bdf6a9799 | io/block_channel.h | io/block_channel.h | #ifndef BLOCK_CHANNEL_H
#define BLOCK_CHANNEL_H
class Action;
class Buffer;
class BlockChannel {
protected:
BlockChannel(void)
{ }
public:
virtual ~BlockChannel()
{ }
virtual Action *close(EventCallback *) = 0;
virtual Action *read(off_t, EventCallback *) = 0;
virtual Action *write(off_t, Buffer *, EventCall... | #ifndef BLOCK_CHANNEL_H
#define BLOCK_CHANNEL_H
class Action;
class Buffer;
class BlockChannel {
protected:
size_t bsize_;
BlockChannel(size_t bsize)
: bsize_(bsize)
{ }
public:
virtual ~BlockChannel()
{ }
virtual Action *close(EventCallback *) = 0;
virtual Action *read(off_t, EventCallback *) = 0;
virtua... | Make block size a protected member of a block channel. | Make block size a protected member of a block channel.
git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@443 4068ffdb-0463-0410-8185-8cc71e3bd399
| C | bsd-2-clause | splbio/wanproxy,diegows/wanproxy,diegows/wanproxy,splbio/wanproxy,splbio/wanproxy,diegows/wanproxy |
c8fb57c122aadfb83c8e9efa9904cc664aa4b786 | Include/structseq.h | Include/structseq.h |
/* Tuple object interface */
#ifndef Py_STRUCTSEQ_H
#define Py_STRUCTSEQ_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct PyStructSequence_Field {
char *name;
char *doc;
} PyStructSequence_Field;
typedef struct PyStructSequence_Desc {
char *name;
char *doc;
struct PyStructSequence_Field *... |
/* Tuple object interface */
#ifndef Py_STRUCTSEQ_H
#define Py_STRUCTSEQ_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct PyStructSequence_Field {
char *name;
char *doc;
} PyStructSequence_Field;
typedef struct PyStructSequence_Desc {
char *name;
char *doc;
struct PyStructSequence_Field *fields;
int n_... | Clean up some whitespace to be consistent with Python's C style. | Clean up some whitespace to be consistent with Python's C style.
| C | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator |
7d8517f3eaac039608aebd07cddb04fdd5f2b210 | Overline/Over/NSURL/NSURL+Directories.h | Overline/Over/NSURL/NSURL+Directories.h | #import <Foundation/Foundation.h>
@interface NSURL (Directories)
/** Returns an NSURL representing the first path found matching the specified constants or nil if none */
+ (NSURL *)URLForDirectory:(NSSearchPathDirectory)directoryConstant domainMask:(NSSearchPathDomainMask)domainMask;
/** Returns the application su... | Add shortcuts to create NSURL's for various app folders | Add shortcuts to create NSURL's for various app folders | C | mit | yaakaito/Overline,yaakaito/Overline | |
d2c55bd89e01ed962dfe265f790b1d50394b90fe | src/event_log.c | src/event_log.c | /*
* Copyright (c) 2016, Natacha Porté
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... | Add a skeleton for a unit to manipulate and display the event log | Add a skeleton for a unit to manipulate and display the event log | C | isc | faelys/life-log,faelys/life-log,faelys/life-log,faelys/life-log | |
ef17abb61bd0234c452f140815465e6e9d438def | c/base/stream_of_byte.h | c/base/stream_of_byte.h | #ifndef INCLUDE_STREAM_OF_BYTE_H
#define INCLUDE_STREAM_OF_BYTE_H
#include "varray.h"
#include "utils.h"
typedef unsigned char byte;
struct byte_stream {
void(*next)(struct byte_stream *self, byte v);
void(*error)(struct byte_stream *self, byte e);
void(*complete)(struct byte_stream *self);
varray *listeners;
};... | #ifndef INCLUDE_STREAM_OF_BYTE_H
#define INCLUDE_STREAM_OF_BYTE_H
#include "varray.h"
#include "utils.h"
typedef uint8_t byte;
struct byte_stream {
void(*next)(struct byte_stream *self, byte v);
void(*error)(struct byte_stream *self, byte e);
void(*complete)(struct byte_stream *self);
varray *listeners;
};
type... | Update typedef of byte to standard type | Update typedef of byte to standard type
| C | mit | artfuldev/RIoT |
678cd1062438d4966e6d4363ac277207dfa6e013 | src/act_helpers.h | src/act_helpers.h | #pragma once
// Annoying C type helpers.
//
// C headers sometimes contain struct ending with a flexible array
// member, which is not supported in C++. An example of such a type is
// file_handle from fcntl.h (man name_to_handle_at)
//
// Here are some helper macros helping to ensure if the C++
// counterpart has mem... | Add helper macros for wrapping annoying C types | Add helper macros for wrapping annoying C types
We will wrap the file_handle struct in the next commit. The struct has
a flexible array member, which is not supported by C++. Compiler may
complain about using it when allocated on stack, even indirectly as a
member of a struct. I'm not sure if using this kind of types ... | C | apache-2.0 | iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace | |
8b1e63d9eb92c7d8c4de601a7e12cb44f434ec74 | tests/regression/37-congruence/07-refinements-o.c | tests/regression/37-congruence/07-refinements-o.c | // PARAM: --enable ana.int.congruence
int main() {
int top;
int i = 0;
if(top % 17 == 3) {
assert(top%17 ==3);
if(top %17 != 3) {
i = 12;
} else {
}
}
assert(i ==0);
if(top % 17 == 0) {
assert(top%17 == 0);
if(top %17 != 0) {
... | // PARAM: --enable ana.int.congruence
void unsignedCase() {
unsigned int top;
unsigned int i = 0;
if(top % 17 == 3) {
assert(top%17 ==3);
if(top %17 != 3) {
i = 12;
} else {
}
}
assert(i ==0);
if(top % 17 == 0) {
assert(top%17 == 0);
... | Add test cases for unsigned | Add test cases for unsigned
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
fb6f565657a21244a0d89aa1594e268b2e344c58 | list.h | list.h | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
#endif | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
#endif | Add List creation function declaration | Add List creation function declaration
| C | mit | MaxLikelihood/CADT |
2055caf822c9a52c01501585f58efd32b8ed2d1c | main.c | main.c | /* shuffle files in a directory by giving them random names, optionally tacking
a global file extension to the end */
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
char *extension = '\0';
DIR *dir;
struct dirent *fileInDir;
int fileCount = 0;
int main(int argc, char **argv){
i... | /* shuffle files in a directory by giving them random names, optionally tacking
a global file extension to the end */
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
int main(int argc, char **argv){
char *extension = '\0';
DIR *dir = opendir(argv[1]);
DIR *dir_nameclobber... | Remove a bunch of the randomization stuff; the program now uses tempnam(3). | Remove a bunch of the randomization stuff; the program now uses tempnam(3).
| C | mit | LordCreepity/dirshuf |
24e609bda53ee838eb1f2f6eef82fc04deb7db13 | lib/profile/InstrProfilingNameVar.c | lib/profile/InstrProfilingNameVar.c | //===- InstrProfilingNameVar.c - profile name variable setup --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | /*===- InstrProfilingNameVar.c - profile name variable setup -------------===*\
|*
|* The LLVM Compiler Infrastructure
|*
|* This file is distributed under the University of Illinois Open Source
|* License. See LICENSE.TXT for details.
|*
\*===-------------------------------------------------------... | Fix warning about C++ style comment in C file | [profile] Fix warning about C++ style comment in C file
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@311496 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
f8abb3519c9849ee37d4141869a8b38b2a54e295 | searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h | searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstdint>
#include <vector>
namespace search::tensor {
class LargeSubspacesBufferType;
class SmallSubspacesBufferType;
class TensorBufferOperations;
/*
* This class provides mapping betwe... | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <cstddef>
#include <cstdint>
#include <vector>
namespace search::tensor {
class LargeSubspacesBufferType;
class SmallSubspacesBufferType;
class TensorBufferOperations;
/*
* This class pro... | Include cstddef to define size_t | Include cstddef to define size_t
| C | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
e4e20dbf28845318e294c100269f27b7d6d49500 | cpp/defines.h | cpp/defines.h |
/* Copyright (c) 2014 Stefan.Eilemann@epfl.ch */
#ifndef @UPPER_PROJECT_NAME@_DEFINES_H
#define @UPPER_PROJECT_NAME@_DEFINES_H
#ifdef __APPLE__
# include <@PROJECT_INCLUDE_NAME@/definesDarwin.h>
#endif
#ifdef __linux
# include <@PROJECT_INCLUDE_NAME@/definesLinux.h>
#endif
#ifdef _WIN32 //_MSC_VER
# include <@PRO... |
/* Copyright (c) 2014 Stefan.Eilemann@epfl.ch */
#ifndef @UPPER_PROJECT_NAME@_DEFINES_H
#define @UPPER_PROJECT_NAME@_DEFINES_H
#ifdef __APPLE__
# include <@PROJECT_INCLUDE_NAME@/definesDarwin.h>
#endif
#ifdef __linux__
# include <@PROJECT_INCLUDE_NAME@/definesLinux.h>
#endif
#ifdef _WIN32 //_MSC_VER
# include <@P... | Use posix-compliant __linux__ (__linux not defined on BG/Q) | Use posix-compliant __linux__ (__linux not defined on BG/Q)
| C | bsd-3-clause | shuaibarshad/KAUST-CMake,jafyvilla/CMake,shurikasa/CMake,jafyvilla/CMake,ptoharia/CMake,shuaibarshad/KAUST-CMake,jafyvilla/CMake,ptoharia/CMake,biddisco/CMake,shurikasa/CMake,shuaibarshad/KAUST-CMake,ptoharia/CMake,biddisco/CMake,shurikasa/CMake,ptoharia/CMake,biddisco/CMake,shurikasa/CMake,shuaibarshad/KAUST-CMake,jaf... |
2bf52404c9c79bc948443188305a5f74951c68b0 | include/zephyr/CExport.h | include/zephyr/CExport.h | #ifndef ZEPHYR_CEXPORT_H
#define ZEPHYR_CEXPORT_H
#ifdef __cplusplus
#define Z_NS_START(n) namespace n {
#define Z_NS_END }
#else
#define Z_NS_START(n)
#define Z_NS_END
#endif
#ifdef __cplusplus
#define Z_ENUM_CLASS(ns, n) enum class n
#else
#define Z_ENUM_CLASS(ns, n) enum ns ## _ ## n
#endif
#ifdef __cplusplus
#de... | Add header to support C++ headers exported to C | Add header to support C++ headers exported to C
Namespace types need to be disambiguated, create a few macros to do this
| C | mit | DeonPoncini/zephyr | |
575a6f6f8a203679da39a60b428cd20b1166c109 | ldso/include/unsecvars.h | ldso/include/unsecvars.h | /*
* Environment variable to be removed for SUID programs. The names are all
* stuffed in a single string which means they have to be terminated with a
* '\0' explicitly.
*/
#define UNSECURE_ENVVARS \
"LD_PRELOAD\0" \
"LD_LIBRARY_PATH\0" \
"LD_DEBUG\0" \
"LD_DEBUG_OUTPUT\0" \
"LD_TRACE_LOADED_OBJECTS\0" \
... | /*
* Environment variable to be removed for SUID programs. The names are all
* stuffed in a single string which means they have to be terminated with a
* '\0' explicitly.
*/
#define UNSECURE_ENVVARS \
"LD_PRELOAD\0" \
"LD_LIBRARY_PATH\0" \
"LD_DEBUG\0" \
"LD_DEBUG_OUTPUT\0" \
"LD_TRACE_LOADED_OBJECTS\0" \
... | Remove TMPDIR from glibc's commented list | Remove TMPDIR from glibc's commented list
| C | lgpl-2.1 | joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc |
9e4acaef861510974200e2744263409dcecda4b4 | lens/lens.h | lens/lens.h | #pragma once
#include <string>
#include "random.h"
#include "ray.h"
#include "vector.h"
namespace amber {
namespace lens {
template <typename RealType>
struct Lens {
using real_type = RealType;
using ray_type = Ray<real_type>;
using vector3_type = Vector3<real_type>;
static constexpr real_type kFoca... | #pragma once
#include <string>
#include "random.h"
#include "ray.h"
#include "vector.h"
namespace amber {
namespace lens {
template <typename RealType>
struct Lens {
using real_type = RealType;
using ray_type = Ray<real_type>;
using vector3_type = Vector3<real_type>;
static constexpr real_type kFoca... | Fix a trivial bug that causes a compilation error with clang++ -O0 | Fix a trivial bug that causes a compilation error with clang++ -O0
| C | mit | etheriqa/amber |
6402a9ebbeab065f0f9f9c274c1ee15a4b34d987 | sawbuck/viewer/const_config.h | sawbuck/viewer/const_config.h | // Copyright 2009 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Add a config constants file missing from previous checkin. | Add a config constants file missing from previous checkin.
Review URL: http://codereview.appspot.com/183148
git-svn-id: db59699583a60be9a535cd09cdc9132301867226@19 15e8cca8-e42c-11de-a347-f34a4f72eb7d
| C | apache-2.0 | wangming28/syzygy,supriyantomaftuh/syzygy,google/syzygy,sebmarchand/syzygy,wangming28/syzygy,ericmckean/syzygy,pombreda/syzygy,Eloston/syzygy,supriyantomaftuh/syzygy,google/syzygy,supriyantomaftuh/syzygy,pombreda/syzygy,ericmckean/syzygy,sebmarchand/syzygy,google/syzygy,pombreda/syzygy,Eloston/syzygy,ericmckean/syzygy,... | |
42c77b7277930825192f0aea837ff1cdc12e2822 | shaderDefines.h | shaderDefines.h | #define ATTR_POS 0
#define ATTR_UV 1
#define ATTR_COLOR 2
#ifdef __cplusplus
struct Globals
#else // __cplusplus
layout(binding = 0, std140) uniform Globals
#endif // __cplusplus
{
vec4 screenSize;
mat4 viewProj;
mat4 guiOrtho;
};
struct Cube {
vec4 rotation;
vec3 position;
uint color;
};
| #define ATTR_POS 0
#define ATTR_UV 1
#define ATTR_COLOR 2
#ifdef __cplusplus
struct Globals
#else // __cplusplus
layout(set = 0, binding = 0, std140) uniform Globals
#endif // __cplusplus
{
vec4 screenSize;
mat4 viewProj;
mat4 guiOrtho;
};
struct Cube {
vec4 rotation;
vec3 position;
uint color;
};
| Add explicit set index to Globals uniform buffer | Add explicit set index to Globals uniform buffer
| C | mit | turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo |
0836e697be7e08dd2489c185feb5a371bf62f6ba | nope.c | nope.c | /*
* nope - for noping out.
*
* Copyright 2017 by Jack Kingsman <jack.kingsman@gmail.com>
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both... | /*
* nope - for noping out.
*
* Copyright 2017 by Jack Kingsman <jack.kingsman@gmail.com>
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both... | Convert from reboot to shutdown | Convert from reboot to shutdown
| C | mit | jkingsman/nope |
5ca164cff61111216fd424e7c5c125cc4fa5f36a | source/common/mesh_elements.h | source/common/mesh_elements.h | /* Lantern - A path tracer
*
* Lantern is the legal property of Adrian Astley
* Copyright Adrian Astley 2015 - 2016
*/
#pragma once
#include "vector_types.h"
namespace Lantern {
typedef float4 Vertex;
struct Triangle {
int V0, V1, V2;
};
} // End of namespace Lantern
| Create structs for triangle mesh representations | Create structs for triangle mesh representations
| C | apache-2.0 | RichieSams/lantern,RichieSams/lantern | |
23b071e99c45844061ef5fad702993e27a1cd1d9 | tests/test_time.c | tests/test_time.c | #define _RESCLIB_SOURCE
#include <stdlib.h>
#undef _RESCLIB_SOURCE
#include <string.h>
#include <time.h>
#include "seatest.h"
static void test_gmtime_asctime (void)
{
time_t timestamps[] = {
-12219292800,
0,
1468110957
};
char timestamp_strings[][26] = {
"Fri Oct 15 0: 0: 0... | #define _RESCLIB_SOURCE
#include <stdlib.h>
#undef _RESCLIB_SOURCE
#include <time.h>
#include "seatest.h"
static void test_gmtime_asctime (void)
{
time_t timestamps[] = {
-12219292800,
0,
1468110957
};
char timestamp_strings[][26] = {
"Fri Oct 15 0: 0: 0 1582\n",
"T... | Use assert_string... instead of assert_int... | Use assert_string... instead of assert_int...
| C | mit | kristapsk/resclib,kristapsk/reclib,kristapsk/reclib,kristapsk/resclib |
ee62a25839ebf871fe04d3edb190b6ec3d535fe0 | RespokeSDK/NSString+urlencode.h | RespokeSDK/NSString+urlencode.h | //
// NSString+urlencode.h
// Respoke SDK
//
// Copyright 2015, Digium, Inc.
// All rights reserved.
//
// This source code is licensed under The MIT License found in the
// LICENSE file in the root directory of this source tree.
//
// For all details and documentation: https://www.respoke.io
//
#import <Found... | //
// NSString+urlencode.h
// Respoke SDK
//
// Copyright 2015, Digium, Inc.
// All rights reserved.
//
// This source code is licensed under The MIT License found in the
// LICENSE file in the root directory of this source tree.
//
// For all details and documentation: https://www.respoke.io
//
#import <Found... | Add comment about source of urlencode category | Add comment about source of urlencode category
| C | mit | respoke/respoke-sdk-ios,respoke/respoke-sdk-ios,respoke/respoke-sdk-ios |
04a4db7d336ae2cae94ac3234086b22fbf1339f0 | src/canutil/write.c | src/canutil/write.c | #include "write.h"
uint64_t encodeFloat(float value, uint8_t bitPosition, uint8_t bitSize,
float factor, float offset) {
float rawValue = (value - offset) / factor;
if(rawValue > 0) {
// round up to avoid losing precision when we cast to an int
rawValue += 0.5;
}
uint64_t result... | #include "write.h"
#include <bitfield/bitfield.h>
uint64_t encodeFloat(float value, uint8_t bitPosition, uint8_t bitSize,
float factor, float offset) {
float rawValue = (value - offset) / factor;
if(rawValue > 0) {
// round up to avoid losing precision when we cast to an int
rawValue +=... | Add missing include for explicit import. | Add missing include for explicit import.
| C | bsd-3-clause | openxc/bitfield-c,openxc/bitfield-c |
8b1b109193042a0411926739baf81f30c686dcb4 | libhijack/arch/aarch64/hijack_machdep.h | libhijack/arch/aarch64/hijack_machdep.h | /*
* Copyright (c) 2017, Shawn Webb
* 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... | /*
* Copyright (c) 2017, Shawn Webb
* 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... | Use the right opcode for the svc instruction | Use the right opcode for the svc instruction
This is a NOP on arm64 right now.
Signed-off-by: Shawn Webb <63bc49e2baae731b3d1a43666c374487dee71f11@hardenedbsd.org>
| C | bsd-2-clause | SoldierX/libhijack |
70a260148ff33185ce8e70b3dbd46a15c0ff5aaf | cc2/arch/qbe/code.c | cc2/arch/qbe/code.c |
#include <stdio.h>
#include <stdlib.h>
#include "arch.h"
#include "../../cc2.h"
#include "../../../inc/sizes.h"
void
defsym(Symbol *sym, int alloc)
{
}
void
data(Node *np)
{
}
void
writeout(void)
{
}
|
#include <stdio.h>
#include <stdlib.h>
#include "arch.h"
#include "../../cc2.h"
#include "../../../inc/sizes.h"
/*
* : is for user-defined Aggregate Types
* $ is for globals (represented by a pointer)
* % is for function-scope temporaries
* @ is for block labels
*/
static char
sigil(Symbol *sym)
{
switch (sym-... | Add basic implementation of defsym() | [cc2] Add basic implementation of defsym()
This is a first implementation which a limited implementation of
sigil() and of size2asm() that, for instance, does not support
strings.
| C | isc | k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc |
09ce2e218fb34ec0ad182e3d378614257fdb22e6 | subsys/random/rand32_entropy_device.c | subsys/random/rand32_entropy_device.c | /*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <atomic.h>
#include <kernel.h>
#include <entropy.h>
static atomic_t entropy_driver;
u32_t sys_rand32_get(void)
{
struct device *dev = (struct device *)atomic_get(&entropy_driver);
u32_t random_num;
int ret;
if (unl... | /*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <atomic.h>
#include <kernel.h>
#include <entropy.h>
static atomic_t entropy_driver;
u32_t sys_rand32_get(void)
{
struct device *dev = (struct device *)atomic_get(&entropy_driver);
u32_t random_num;
int ret;
if (unl... | Add _ASSERT() test on returned device_get_binding | subsys/random: Add _ASSERT() test on returned device_get_binding
If there is a build setup problem where a device driver has not been
setup for the entropy driver then the call to device_get_binding()
will return a NULL value and the code will continue to use this NULL
value. The result is a hard fault later in code e... | C | apache-2.0 | mbolivar/zephyr,mbolivar/zephyr,Vudentz/zephyr,finikorg/zephyr,kraj/zephyr,mbolivar/zephyr,aceofall/zephyr-iotos,nashif/zephyr,galak/zephyr,galak/zephyr,ldts/zephyr,zephyriot/zephyr,explora26/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,mbolivar/zephyr,ldts/zephyr,punitvara/zephyr,GiulianoFranchetto/zephy... |
5e4e3c9ecf68d84bb14e8fb9636537b25b0d77a2 | src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c | src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c | #include "crypto_scalarmult_curve25519.h"
size_t
crypto_scalarmult_curve25519_bytes(void)
{
return crypto_scalarmult_curve25519_BYTES;
}
size_t
crypto_scalarmult_curve25519_scalarbytes(void)
{
return crypto_scalarmult_curve25519_SCALARBYTES;
}
|
#include "crypto_scalarmult_curve25519.h"
size_t
crypto_scalarmult_curve25519_bytes(void)
{
return crypto_scalarmult_curve25519_BYTES;
}
size_t
crypto_scalarmult_curve25519_scalarbytes(void)
{
return crypto_scalarmult_curve25519_SCALARBYTES;
}
| Add an empty line. Yeah, that's a fantastic commit. | Add an empty line. Yeah, that's a fantastic commit.
| C | isc | mvduin/libsodium,rustyhorde/libsodium,rustyhorde/libsodium,pyparallel/libsodium,optedoblivion/android_external_libsodium,CyanogenMod/android_external_dnscrypt_libsodium,Payshares/libsodium,Payshare/libsodium,kytvi2p/libsodium,HappyYang/libsodium,tml/libsodium,donpark/libsodium,CyanogenMod/android_external_dnscrypt_libs... |
95b8564b85eb67cdf7cfafe1985e58894ab7134b | test/Frontend/plugins.c | test/Frontend/plugins.c | // RUN: %clang_cc1 -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
// RUN: %clang_cl -Xclang -load -Xclang %llvmshlibdir/PrintFunctionNames%pluginext -Xclang -plugin -Xclang print-fns %s 2>&1 | FileCheck %s
// REQUIRES: plugins, examples
// CHECK: top-level-decl: "x"
void x();... | // RUN: %clang_cc1 -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
// RUN: %clang_cl -c -Xclang -load -Xclang %llvmshlibdir/PrintFunctionNames%pluginext -Xclang -plugin -Xclang print-fns -Tc %s 2>&1 | FileCheck %s
// REQUIRES: plugins, examples
// CHECK: top-level-decl: "x"
vo... | Fix the test added in r260266 | Fix the test added in r260266
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@260276 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
79408a202316fa24af2d6caf8c129dcd6f97f87e | sw/device/lib/testing/test_status.c | sw/device/lib/testing/test_status.c | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/testing/test_status.h"
#include "sw/device/lib/arch/device.h"
#include "sw/device/lib/base/log.h"
#include "sw/device/lib/base/mmio.h"
#include ... | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/testing/test_status.h"
#include "sw/device/lib/arch/device.h"
#include "sw/device/lib/base/log.h"
#include "sw/device/lib/base/mmio.h"
#include ... | Fix PASS!, FAIL! signatures for CI | [sw] Fix PASS!, FAIL! signatures for CI
Signed-off-by: Srikrishna Iyer <2803d640feace36379942447842f26c7747b4dc3@google.com>
| C | apache-2.0 | lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan |
860d69cadedef0dec8ba6259ab5850691d3402e7 | src/tslib-private.h | src/tslib-private.h | #ifndef _TSLIB_PRIVATE_H_
#define _TSLIB_PRIVATE_H_
/*
* tslib/src/tslib-private.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
*
* Internal touch screen library definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "tslib.h"
#include "tslib-filt... | #ifndef _TSLIB_PRIVATE_H_
#define _TSLIB_PRIVATE_H_
/*
* tslib/src/tslib-private.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
*
* Internal touch screen library definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "tslib.h"
#include "tslib-filt... | Revert "Enable debug option for all components" | Revert "Enable debug option for all components"
This reverts commit 9c3742a8d8a829ec746e0a974aa30fb5dd0e3d1a.
| C | lgpl-2.1 | folkien/tslib,vpeter4/tslib,kergoth/tslib,etmatrix/tslib,lin2724/tslib,folkien/tslib,etmatrix/tslib,leighmurray/tslib,lin2724/tslib,vpeter4/tslib,kergoth/tslib,pssc/tslib,kobolabs/tslib,kergoth/tslib,leighmurray/tslib,pssc/tslib,kobolabs/tslib,etmatrix/tslib,pssc/tslib,jaretcantu/tslib,jaretcantu/tslib,kobolabs/tslib,k... |
aec7c5441c59362fe2445515156a6ce88868d5ff | targets/TARGET_NUVOTON/TARGET_M2351/device/cmsis.h | targets/TARGET_NUVOTON/TARGET_M2351/device/cmsis.h | /* mbed Microcontroller Library
* Copyright (c) 2015-2017 Nuvoton
*
* 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 requir... | /* mbed Microcontroller Library
* Copyright (c) 2015-2017 Nuvoton
*
* 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 requir... | Add non-secure reset handler address | [M2351] Add non-secure reset handler address
| C | apache-2.0 | c1728p9/mbed-os,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,betzw/mbed-os,betzw/mbed-os,mbedmicro/mbed,andcor02/mbed-os,c1728p9/mbed-os,andcor02/mbed-os,betzw/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,betzw/mbed-os,betzw/mbed-os,kjbrace... |
3b7f936ae7fecaca3abd5b563610c207dd7d704e | A/03/09/task1.c | A/03/09/task1.c | #include <stdio.h>
#include <string.h>
int is_valid_ucn(char*);
int main() {
char ucn[12];
fgets(ucn, 13, stdin);
printf("%d", is_valid_ucn(ucn));
return 0;
}
int is_valid_ucn(char *ucn) {
int control = 0, month = (ucn[2] - '0') * 10 + (ucn[3] - '0');
int length = strlen(u... | Add Task 01 from Homework 03 | Add Task 01 from Homework 03
| C | mit | elsys/po-homework | |
ced21016cec1f189a695857bed103ecc9e3f3696 | include/clang/AST/ParentMap.h | include/clang/AST/ParentMap.h | //===--- ParentMap.h - Mappings from Stmts to their Parents -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===--- ParentMap.h - Mappings from Stmts to their Parents -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Add missing header file change. | Add missing header file change.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@67871 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
734ccee565efd274e47f95ea314220726a38a512 | src/gallium/include/pipe/p_error.h | src/gallium/include/pipe/p_error.h | /**************************************************************************
*
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Softwa... | Standardize most important error codes. | gallium: Standardize most important error codes.
| C | mit | benaadams/glsl-optimizer,metora/MesaGLSLCompiler,mapbox/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,adobe/glsl2agal,benaadams/glsl-optimizer,KTXSoftware/glsl2agal,zz85/glsl-optimizer,jbarczak/glsl-optimizer,djre... | |
2174ba24cb1eb714ff02128b034cd967f78e5d17 | runtime/common/xwalk_common_message_generator.h | runtime/common/xwalk_common_message_generator.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.
// Multiply-included file, hence no include guard.
#include "xwalk/runtime/common/xwalk_common_messages.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.
// Multiply-included file, hence no include guard.
// NOLINT(build/header_guard)
#include "xwalk/runtime/common/xwalk_common_messages.h"
| Add a NOLINT to avoid a build/header_guard cpplint warning. | Add a NOLINT to avoid a build/header_guard cpplint warning.
`xwalk_common_message_generator.h` does not have include guards, and
according to a comment there this seems to be on purpose.
Add a `NOLINT` entry to it to avoid cpplint a build/header_guard error.
BUG=XWALK-1853
| C | bsd-3-clause | rakuco/crosswalk,crosswalk-project/crosswalk,baleboy/crosswalk,dreamsxin/crosswalk,crosswalk-project/crosswalk,xzhan96/crosswalk,lincsoon/crosswalk,PeterWangIntel/crosswalk,rakuco/crosswalk,heke123/crosswalk,dreamsxin/crosswalk,heke123/crosswalk,axinging/crosswalk,PeterWangIntel/crosswalk,heke123/crosswalk,xzhan96/cros... |
af8f7968770fa4714fb0c4d55277fb117fc39be9 | snp/packets.h | snp/packets.h | #pragma once
#include <winsock2.h>
#include "common/types.h"
#define SNP_PACKET_SIZE 512
namespace sbat {
namespace snp {
enum class PacketType : byte {
Storm = 0
};
#pragma pack(push)
#pragma pack(1)
// this packet info wraps the packets sent by storm/us with something that can be used to route it
struct Packet... | #pragma once
#include <winsock2.h>
#include "common/types.h"
namespace sbat {
namespace snp {
// min-MTU - (max-IP-header-size + udp-header-size)
const size_t SNP_PACKET_SIZE = 576 - (60 + 8);
enum class PacketType : byte {
Storm = 0
};
#pragma pack(push)
#pragma pack(1)
// this packet info wraps the packets s... | Adjust snp packet size to better accomodate small MTUs. | Adjust snp packet size to better accomodate small MTUs.
| C | mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery |
bcf0039db5bac0f9a517c900eef642166822d00a | 6_kyu/Simpson_Integral_Approximation.c | 6_kyu/Simpson_Integral_Approximation.c | #include <stdio.h>
#include <math.h>
#define SIMPSON_METHOD 1
double fun(double x) {
return (3.0 / 2) * pow(sin(x), 3);
}
double simpson_helper(double (*f)(double), double from, double to, int steps) {
double result = 0.0;
double acc = 0.0;
double h = (to - from) / steps;
result += (*f)(from) + ... | Add Simpron integral approx. kata | Add Simpron integral approx. kata
| C | mit | nkapliev/codewars,nkapliev/codewars,nkapliev/codewars,nkapliev/codewars | |
d46e893a0d7081a0821f89625e0731b78035e1ea | src/adler32.c | src/adler32.c | /*
* adler32.c
*
* Adler-32 checksum algorithm.
*/
#include "adler32.h"
u32
adler32(const u8 *buffer, size_t size)
{
u32 s1 = 1;
u32 s2 = 0;
for (size_t i = 0; i < size; i++) {
s1 = (s1 + buffer[i]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) | s1;
}
| /*
* adler32.c
*
* Adler-32 checksum algorithm.
*/
#include "adler32.h"
#include "compiler.h"
/*
* The Adler-32 divisor, or "base", value.
*/
#define DIVISOR 65521
/*
* MAX_BYTES_PER_CHUNK is the most bytes that can be processed without the
* possibility of s2 overflowing when it is represented as an unsigne... | Speed up Adler-32 by doing modulo less often | Speed up Adler-32 by doing modulo less often
| C | mit | ebiggers/libdeflate,ebiggers/libdeflate,ebiggers/libdeflate |
e8a8ac08d9abe98ef3ecba4766e5f2665313ce3b | src/rtcmix/rtdefs.h | src/rtcmix/rtdefs.h | /* To avoid recursion in certain includes */
#ifndef _RTDEFS_H_
#define _RTDEFS_H_ 1
#define MAXCHANS 4
#define MAX_INPUT_FDS 128
#define AUDIO_DEVICE 9999999
/* definition of input file desc struct used by rtinput */
typedef struct inputdesc {
char filename[1024];
int fd;
int refcount;
short header_... | /* To avoid recursion in certain includes */
#ifndef _RTDEFS_H_
#define _RTDEFS_H_ 1
#define MAXCHANS 4
#define MAX_INPUT_FDS 128
#define NO_DEVICE_FDINDEX -1
#define AUDIO_DEVICE_FDINDEX -2
/* definition of input file desc struct used by rtinput */
typedef struct inputdesc {
char filename[1024];
in... | Change "AUDIO_DEVICE" to "AUDIO_DEVICE_FDINDEX", and change its value. Add new "NO_DEVICE_FDINDEX". | Change "AUDIO_DEVICE" to "AUDIO_DEVICE_FDINDEX", and change its value.
Add new "NO_DEVICE_FDINDEX".
| C | apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix |
3c2e43310c2530efe55a10c6e02b89501c373f08 | sticks.c | sticks.c | #include <stdio.h>
typedef struct {
int hands[2][2];
int turn;
} Sticks;
void sticks_create(Sticks *sticks) {
sticks->hands[0][0] = 1;
sticks->hands[0][1] = 1;
sticks->hands[1][0] = 1;
sticks->hands[1][1] = 1;
sticks->turn = 0;
}
void sticks_play(Sticks *sticks, int x, int y) {
sticks... | #include <stdio.h>
typedef struct {
int hands[2][2];
int turn;
} Sticks;
void sticks_create(Sticks *sticks) {
sticks->hands[0][0] = 1;
sticks->hands[0][1] = 1;
sticks->hands[1][0] = 1;
sticks->hands[1][1] = 1;
sticks->turn = 0;
}
void sticks_play(Sticks *sticks, int attack, int x, int y) ... | Allow user to move fingers between own hands | Allow user to move fingers between own hands
| C | mit | tysonzero/c-ann |
13f94cfadc2cfdcbb7b37a569b78114563f7fbda | src/util/Interval.h | src/util/Interval.h | #ifndef INTERVAL_H
#define INTERVAL_H
namespace Interval{
class RepeatedInterval{
uint32_t next;
uint32_t span;
public:
RepeatedInterval(uint32_t span): span(span) { next = millis() + span; }
boolean operator()() {
if(millis() > next){
next += span;
... | #ifndef INTERVAL_H
#define INTERVAL_H
namespace Interval{
class RepeatedInterval{
uint32_t next;
uint32_t span;
public:
RepeatedInterval(uint32_t span): span(span) { next = millis() + span; }
boolean operator()() {
if(millis() > next){
next += span;
... | Add a timer utility to interval namespace | Add a timer utility to interval namespace
| C | apache-2.0 | MINDS-i/MINDS-i-Drone,MINDS-i/MINDS-i-Drone |
3f0057466acce1d8983cf0b6b8ef7abbe084f3f0 | src/window.h | src/window.h | #ifndef _WINDOW_H_
#define _WINDOW_H_
#include <string>
#include <iostream>
class Window {
std::string title;
public:
Window(const std::string& title): title(title) {}
virtual void handle() = 0;
void drawTitle() {
//#ifdef _WIN32
//std::system("cls");
//#else //assuming linux, yeah, I know
... | #ifndef _WINDOW_H_
#define _WINDOW_H_
#include <string>
#include <iostream>
#include <cstdlib>
class Window {
std::string title;
public:
Window(const std::string& title): title(title) {}
virtual void handle() = 0;
void drawTitle() {
#ifdef _WIN32
std::system("cls");
#else //assuming linux, y... | Enable clearing, use getline to read empty lines | Enable clearing, use getline to read empty lines
| C | mit | nyz93/advertapp,nyz93/advertapp |
6958b17b0e3a663bbd3832ac49e598469f1699c0 | src/sampgdk.c | src/sampgdk.c | #include "sampgdk.h"
#if SAMPGDK_WINDOWS
#undef CreateMenu
#undef DestroyMenu
#undef GetTickCount
#undef KillTimer
#undef SelectObject
#undef SetTimer
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#define _GNU_SOURCE
#endif
| #include "sampgdk.h"
#if SAMPGDK_WINDOWS
#ifdef _MSC_VER
#pragma warning(disable: 4996)
#endif
#undef CreateMenu
#undef DestroyMenu
#undef GetTickCount
#undef KillTimer
#undef SelectObject
#undef SetTimer
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#define _GNU_SOURCE
#endif
| Disable warning C4996 in amalgamation | Disable warning C4996 in amalgamation
| C | apache-2.0 | Zeex/sampgdk,WopsS/sampgdk,WopsS/sampgdk,Zeex/sampgdk,WopsS/sampgdk,Zeex/sampgdk |
0047f0e77b601734597bf882f55f5bf4b0ede639 | calc.c | calc.c | #include "calc.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
double calc(const char* p, int mul_div_flag)
{
int i;
double ans;
ans = atof(p);
if (p[0] != '(' && mul_div_flag == 1){
return (ans);
}
i = 0;
while (p[i] != '\0'){
while (isdigit(p[i])){
... | #include "calc.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
double calc(const char* p, int mul_div_flag)
{
int i;
double ans;
if (p[0] != '(' && mul_div_flag == 1){
return (atof(p));
}
else if (p[0] == '('){
ans = 0;
}
else {
ans = atof(p);
}
... | Split mul_div flag part to avoid bugs | Split mul_div flag part to avoid bugs
| C | mit | Roadagain/Calculator,Roadagain/Calculator |
3f1de23eee55029056d26bd123f61adaf1ec3525 | main.c | main.c | #include <stdlib.h>
#include <stdio.h>
int main() {
FILE *file;
long length;
char *buffer;
file = fopen("example.minty", "r");
if (file == NULL) {
return 1;
}
fseek(file, 0, SEEK_END);
length = ftell(file);
fseek(file, 0, SEEK_SET);
buffer = (char *)malloc(length);
fread(buffer, length, 1, file);
fclose(... | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
FILE *file;
long length;
char *buffer;
if (argc < 2) {
return 1;
}
file = fopen(argv[1], "r");
if (file == NULL) {
return 1;
}
fseek(file, 0, SEEK_END);
length = ftell(file);
fseek(file, 0, SEEK_SET);
buffer = (char *)malloc(len... | Allow program to run to be specified on command line | Allow program to run to be specified on command line
| C | mit | shanepelletier/ChocoMinty |
f5e5f7d6cdb9ce7c8203b7bfe2c5269a14813433 | tests/drivers/build_all/modem/src/main.c | tests/drivers/build_all/modem/src/main.c | /*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
/*
* @file
* @brief Hello World demo
*/
void main(void)
{
printk("Hello World!\n");
}
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
/* Fake GPIO devic... | /*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
/*
* @file
* @brief Hello World demo
*/
void main(void)
{
printk("Hello World!\n");
}
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
/* Fake GPIO devic... | Revert "tests: drivers: build_all: add fake serial device for modem tests" | Revert "tests: drivers: build_all: add fake serial device for modem tests"
This reverts commit 9e58a1e475473fcea1c3b0d05ac9c738141c821a.
This change is in conflict with commit 94f7ed356f0c ("drivers: serial:
add a dummy driver for vnd,serial"). As a result two equal serial
devices are defines, resulting in link error... | C | apache-2.0 | finikorg/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr |
52e572fa6be630f16f119f17eb38fbe2e3b83ca0 | inc/libutils/env.h | inc/libutils/env.h | /*
* env.h
*
* Author: Ming Tsang
* Copyright (c) 2014 Ming Tsang
* Refer to LICENSE for details
*/
#pragma once
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if defined(UNIX) || defined(__unix__) || defined(LINUX) || defined(__linux__)
#if !defined(UNIX)
#define UNIX
... | /*
* env.h
*
* Author: Ming Tsang
* Copyright (c) 2014 Ming Tsang
* Refer to LICENSE for details
*/
#pragma once
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if defined(UNIX) || defined(__unix__) || defined(LINUX) || defined(__linux__)
#if !defined(POSIX)
#define POSI... | Rename platform flag from UNIX to POSIX | Rename platform flag from UNIX to POSIX | C | mit | nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils |
92caf20511f42cae8dd45fa982d538c8b96161c5 | include/base/types.h | include/base/types.h | /* --------------------------------------------------------------------------
* Name: types.h
* Purpose: Various typedefs and utility macros
* ----------------------------------------------------------------------- */
#ifndef TYPES_H
#define TYPES_H
typedef signed char int8_t;
typedef signed short int16_t;... | /* --------------------------------------------------------------------------
* Name: types.h
* Purpose: Various typedefs and utility macros
* ----------------------------------------------------------------------- */
#ifndef TYPES_H
#define TYPES_H
typedef signed char int8_t;
typedef signed short int16_t;... | Declare intptr_t correctly for 64-bit Windows builds. | Declare intptr_t correctly for 64-bit Windows builds.
| C | bsd-2-clause | dpt/Containers,dpt/Containers |
2b8bfbea9493cd8742ca08b96ea8db02481dfc7a | 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... | Add new synchronized graph sub-view dock widget (Reflection). | Add new synchronized graph sub-view dock widget (Reflection).
| C | mit | joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api | |
10f5254d144aaa8af56eb6445cea08a491d9fcb8 | loader/problem.h | loader/problem.h | // Explorer loader problem list
// /problem.h
#ifndef PROBLEM_H_
#define PROBLEM_H_
/**错误列表*/
#define ERR_NO_MEM_FOR_ID 1 // 没有可用于中断描述符表的内存
#define ERR_NO_MEM_FOR_SD 2 // 没有可用于储存器描述符表的内存
#define ERR_NO_MEM_FOR_SCTBUF 3 // 没有可用于扇区缓存的内存
#define ERR_NO_MEM_FOR_CONFIG 4 // 没有可以分配给引导配置文件的内存
#define ERR_NO_MEM_FO... | // Explorer loader problem list
// /problem.h
#ifndef PROBLEM_H_
#define PROBLEM_H_
/**错误列表*/
#define ERR_NO_MEM_FOR_ID 1 // 没有可用于中断描述符表的内存
#define ERR_NO_MEM_FOR_SD 2 // 没有可用于储存器描述符表的内存
#define ERR_NO_MEM_FOR_SCTBUF 3 // 没有可用于扇区缓存的内存
#define ERR_NO_MEM_FOR_CONFIG 4 // 没有可以分配给引导配置文件的内存
#define ERR_NO_MEM_FOR_... | Add new error and warning number | Add new error and warning number
| C | bsd-2-clause | MakeOS/GhostBirdOS,MakeOS/GhostBirdOS |
96da00377891c31244a0e6435a31608169ceae02 | src/com/spi.h | src/com/spi.h | //
// spi.h
// Ethernet Shield
//
// Created by EFCM van der Werf on 12/28/13.
// Copyright (c) 2013 EFCM van der Werf. All rights reserved.
//
#ifndef COM_SPI_H
#define COM_SPI_H
#include "../config.h"
// Do we want SPI?
#ifdef COM_SPI
#include <inttypes.h>
/**
* SPI config
*/
typedef struct spi_config {
... | //
// spi.h
// Ethernet Shield
//
// Created by EFCM van der Werf on 12/28/13.
// Copyright (c) 2013 EFCM van der Werf. All rights reserved.
//
#ifndef COM_SPI_H
#define COM_SPI_H
#include "../config.h"
// Do we want SPI?
#ifdef COM_SPI
#include <inttypes.h>
/**
* SPI config
*/
typedef struct spi_config {
... | Rename SPI_START to SPI_ACTIVE and SPI_STOP to SPI_PASSIVE | Rename SPI_START to SPI_ACTIVE and SPI_STOP to SPI_PASSIVE
| C | mit | fuegas/dollhouse-ethshield,slashdev/slashnet,fuegas/dollhouse-ethshield,slashdev/slashnet |
3ec169b38a5ece25471b68953d4d43f03a148dba | core/util/shaderProgram.h | core/util/shaderProgram.h | #pragma once
#include "platform.h"
#include <string>
#include <vector>
#include <unordered_map>
class ShaderProgram {
public:
ShaderProgram();
virtual ~ShaderProgram();
GLint getGlProgram() { return m_glProgram; };
GLint getAttribLocation(const std::string& _attribName);
bool buildFromSourceSt... | #pragma once
#include "platform.h"
#include <string>
#include <vector>
#include <unordered_map>
/*
* ShaderProgram - utility class representing an OpenGL shader program
*/
class ShaderProgram {
public:
ShaderProgram();
virtual ~ShaderProgram();
/* Getters */
GLint getGlProgram() { return m_glPro... | Add comments and convenience functions | Add comments and convenience functions
| C | mit | quitejonny/tangram-es,hjanetzek/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,hjanetzek/tangram-es,hjanetzek/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,karimnaaji/tangram-es,tangrams/tangram-es,hjanetzek/tangram-es,xvilan/tangram-es,xvilan/tangram-es,tangrams/tangram... |
2d7e2de4bc36041ce62ca73cb4b11295a2271eae | lib/c/src/syscall.h | lib/c/src/syscall.h | extern void *_brk(void *addr);
extern int _open(char *path, int flags, int perm);
extern int _close(int fd);
extern int _read(int fd, void *buf, size_t n);
extern int _write(int fd, void *buf, size_t n);
extern int _lseek(int fd, long off, int whence);
extern void _Exit(int status);
extern int raise(int sig);
extern vo... | extern void *_brk(void *addr);
extern int _open(char *path, int flags, int perm);
extern int _close(int fd);
extern int _read(int fd, void *buf, size_t n);
extern int _write(int fd, void *buf, size_t n);
extern int _lseek(int fd, long off, int whence);
extern void _Exit(int status);
extern int raise(int sig);
extern vo... | Add getenv() to the arch primitive list | [lib/c] Add getenv() to the arch primitive list
| C | isc | k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc |
6210a7c68844602ee390bcce61dbb637910a3c6b | include/images/SkBitmapRegionDecoder.h | include/images/SkBitmapRegionDecoder.h | #ifndef SkBitmapRegionDecoder_DEFINED
#define SkBitmapRegionDecoder_DEFINED
#include "SkBitmap.h"
#include "SkRect.h"
#include "SkImageDecoder.h"
class SkBitmapRegionDecoder {
public:
SkBitmapRegionDecoder(SkImageDecoder *decoder, int width, int height) {
fDecoder = decoder;
fWidth = width;
... | #ifndef SkBitmapRegionDecoder_DEFINED
#define SkBitmapRegionDecoder_DEFINED
#include "SkBitmap.h"
#include "SkRect.h"
#include "SkImageDecoder.h"
#include "SkStream.h"
class SkBitmapRegionDecoder {
public:
SkBitmapRegionDecoder(SkImageDecoder *decoder, SkStream *stream,
int width, int height) {
... | Fix 3510563: memory leak in BitmapRegionDecoder. | Fix 3510563: memory leak in BitmapRegionDecoder.
Change-Id: I30b3a3806f4484d95602539def1a77a366560fdf
| C | bsd-3-clause | IllusionRom-deprecated/android_platform_external_skia,AOSPA-L/android_external_skia,VRToxin-AOSP/android_external_skia,MinimalOS/external_skia,VentureROM-L/android_external_skia,MarshedOut/android_external_skia,mozilla-b2g/external_skia,RockchipOpensourceCommunity/external_skia,Infusion-OS/android_external_skia,Plain-A... |
28a1bb74499eeadb12742b7d097d87e56ba024b8 | contrib/gcc/version.c | contrib/gcc/version.c | /* $FreeBSD$ */
#include "ansidecl.h"
#include "version.h"
const char *const version_string = "3.2.1 [FreeBSD] 20021009 (prerelease)";
| /* $FreeBSD$ */
#include "ansidecl.h"
#include "version.h"
const char *const version_string = "3.2.1 [FreeBSD] 20021119 (release)";
| Update for Gcc 3.2.1 release. | Update for Gcc 3.2.1 release.
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
436514f5dc9e4ba01d547a8e2113d09fbf0a65e9 | src/lib/test_blockdev.c | src/lib/test_blockdev.c | int main (int argc, char* argv[]) {
bd_init(NULL);
g_printf ("max LV size: %lu\n", bd_lvm_get_max_lv_size());
return 0;
}
| int main (int argc, char* argv[]) {
bd_init(NULL);
g_printf ("max LV size: %"G_GUINT64_FORMAT"\n", bd_lvm_get_max_lv_size());
return 0;
}
| Use arch-independent format string for guint64 in tests | Use arch-independent format string for guint64 in tests
Otherwise "0" is printed out even if the right number is returned by the tested
function.
| C | lgpl-2.1 | atodorov/libblockdev,vpodzime/libblockdev,rhinstaller/libblockdev,dashea/libblockdev,vpodzime/libblockdev,dashea/libblockdev,atodorov/libblockdev,rhinstaller/libblockdev,vpodzime/libblockdev,snbueno/libblockdev,rhinstaller/libblockdev,atodorov/libblockdev,snbueno/libblockdev |
0a39f2cfa0fd4a48c6eda303901a2c497e4cc0ad | config/src/apps/vespa-configproxy-cmd/proxycmd.h | config/src/apps/vespa-configproxy-cmd/proxycmd.h | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vector>
class FRT_Supervisor;
class FRT_Target;
class FRT_RPCRequest;
class FRT_Values;
namespace fnet::frt { class StandaloneFRT; }... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vector>
class FRT_Target;
class FRT_RPCRequest;
class FRT_Values;
namespace fnet::frt { class StandaloneFRT; }
struct Flags {
v... | Remove unused variable in vespa-configproxy-cmd. | Remove unused variable in vespa-configproxy-cmd.
| C | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
9f0ba44a96db7918e11ffa905878c16f044baa65 | base/scoped_handle.h | base/scoped_handle.h | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_SCOPED_HANDLE_H_
#define BASE_SCOPED_HANDLE_H_
#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base/scoped_handle_win.h... | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_SCOPED_HANDLE_H_
#define BASE_SCOPED_HANDLE_H_
#include <stdio.h>
#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base... | Add stdio to this file becasue we use FILE. | Add stdio to this file becasue we use FILE.
It starts failing with FILE, identifier not found, when
you remove the include for logging.h, which is included
in scoped_handle_win.h
Review URL: http://codereview.chromium.org/16461
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@7441 0039d316-1c4b-4281-b951-d872f20... | C | bsd-3-clause | littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,keishi/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,robclark/chromium,Jonekee... |
1f5338e7b71f56c6d2451b9b23608c851bf90c8a | compiler/cbits/genSym.c | compiler/cbits/genSym.c |
#include "Rts.h"
static HsInt GenSymCounter = 0;
HsInt genSym(void) {
if (n_capabilities == 1) {
return GenSymCounter++;
} else {
return atomic_inc((StgWord *)&GenSymCounter, 1);
}
}
|
#include "Rts.h"
static HsInt GenSymCounter = 0;
HsInt genSym(void) {
#if defined(THREADED_RTS)
if (n_capabilities == 1) {
return GenSymCounter++;
} else {
return atomic_inc((StgWord *)&GenSymCounter, 1);
}
#else
return GenSymCounter++;
#endif
}
| Fix bootstrapping of GHC with earlier versions | Fix bootstrapping of GHC with earlier versions
We can no longer use atomic_inc() in the stage1 compiler because its
prototype was recently changed.
Since the stage1 compiler is always single-threaded, only use
atomic_inc() when THREADED_RTS is defined.
| C | bsd-3-clause | mcschroeder/ghc,TomMD/ghc,fmthoma/ghc,urbanslug/ghc,da-x/ghc,olsner/ghc,vTurbine/ghc,olsner/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,ekmett/ghc,acowley/ghc,olsner/ghc,mettekou/ghc,ml9951/ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,vTurbine/ghc,ryantm/ghc,gridaphob... |
6478bdce01f7e2363f78cb248f677c1db0bdc303 | lib/TableGen/TGPreprocessor.h | lib/TableGen/TGPreprocessor.h | //===- TGPreprocessor.h - Preprocessor for TableGen Files -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- TGPreprocessor.h - Preprocessor for TableGen Files -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Fix compilation when using gcc-4.6. Patch by wanders. | Fix compilation when using gcc-4.6. Patch by wanders.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@141178 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,... |
768d6be6353fdc725edea610a89e360f52dead82 | include/ft/sock/socket.h | include/ft/sock/socket.h | #ifndef FT_SOCK_SOCKET_H_
#define FT_SOCK_SOCKET_H_
struct ft_socket
{
struct ft_context * context;
const char * socket_class;
int ai_family;
int ai_socktype;
int ai_protocol;
struct sockaddr_storage addr;
socklen_t addrlen;
// Custom data fields
void * protocol;
void * data;
};
static inline bool ft_s... | #ifndef FT_SOCK_SOCKET_H_
#define FT_SOCK_SOCKET_H_
struct ft_socket
{
struct ft_context * context;
const char * clazz;
int ai_family;
int ai_socktype;
int ai_protocol;
struct sockaddr_storage addr;
socklen_t addrlen;
// Custom data fields
void * protocol;
void * data;
};
static inline bool ft_socket_i... | Unify name of the class. | Unify name of the class.
| C | bsd-3-clause | TeskaLabs/Frame_Transporter,TeskaLabs/SeaCat-Common-Library,TeskaLabs/Frame_Transporter,TeskaLabs/Frame-Transporter,TeskaLabs/Frame-Transporter |
f1648ed565efa9b59bf14081474b48aef1c0cea6 | libgo/runtime/getncpu-linux.c | libgo/runtime/getncpu-linux.c | // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include <features.h>
#include <sched.h>
// CPU_COUNT is only provided by glibc 2.6 or higher
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6)
#define CPU... | // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include <features.h>
#include <sched.h>
// CPU_COUNT is only provided by glibc 2.6 or higher
#ifndef CPU_COUNT
#define CPU_COUNT(set) _CPU_COUNT((unsigned int... | Check for CPU_COUNT itself, don't check glibc version. | runtime: Check for CPU_COUNT itself, don't check glibc version.
Fixes #38.
R=iant
CC=gofrontend-dev
https://golang.org/cl/155740043
| C | bsd-3-clause | qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/... |
3f995f317f7070e81e8e38bb11357d6671ab6969 | include/linux/i2c-xiic.h | include/linux/i2c-xiic.h | /*
* i2c-xiic.h
* Copyright (c) 2009 Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* ... | Add the platform data include for the Xilinx XPS IIC Bus Interface | Add the platform data include for the Xilinx XPS IIC Bus Interface
This file was missed in the original patch that went into Linus' tree.
Cc: "Ben Dooks (embedded platforms)" <1177f64998f284a7348354b8e91cbbe575d9858a@fluff.org>
Cc: a2bf4ba1a5b5bdfcae71455fa003391c08eec12f@vger.kernel.org
Signed-off-by: Richard Röjfor... | C | mit | KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_k... | |
b1fa4918bb74415352dc9ff60fd995c47b551c69 | MS3/Sketches/CPU_Gridders/scatter_gridder.h | MS3/Sketches/CPU_Gridders/scatter_gridder.h | #if defined __AVX__
#include <immintrin.h>
#endif
#ifdef __CUDACC__
#include <cuComplex.h>
typedef cuDoubleComplex complexd;
#elif defined __cplusplus
#include <complex>
typedef std::complex<double> complexd;
#else
#include <complex.h>
typedef double complex complexd;
#endif
struct Double4c
{
complexd X... | #ifndef __SCATTER_GRIDDER_H
#define __SCATTER_GRIDDER_H
#if defined __AVX__
#include <immintrin.h>
#endif
#ifdef __CUDACC__
#include <cuComplex.h>
typedef cuDoubleComplex complexd;
#elif defined __cplusplus
#include <complex>
typedef std::complex<double> complexd;
#else
#include <complex.h>
typedef double... | Add simplest as possible support size func. | Add simplest as possible support size func.
| C | apache-2.0 | SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC |
a236747cee13f512f5f1708b41306533b67ebddb | PSET2/caesar.c | PSET2/caesar.c | #include <stdio.h>
#include <cs50.h>
int main(void) {
return 0;
} | #include <stdio.h>
#include <cs50.h>
int main(int argc, char *argv[]) {
// check entered key
if (argc != 2 || atoi(argv[1]) < 0) {
printf("Usage: ./caesar k\nWhere k is a non negative integer.\n");
return 1;
}
int key = atoi(argv[1]);
return 0;
}
| Add key check and convert key to int | Add key check and convert key to int
| C | unlicense | Implaier/CS50,Implaier/CS50,Implaier/CS50,Implaier/CS50 |
48fa78cf488b227b33355362ee1d7110936a6671 | compiler/modules/CommonMark/src/config.h | compiler/modules/CommonMark/src/config.h | #include "charmony.h"
#ifdef CHY_HAS_STDBOOL_H
# include <stdbool.h>
#elif !defined(__cplusplus)
typedef char bool;
# define true 1
# define false 0
#endif
#define CMARK_ATTRIBUTE(list)
#ifndef CHY_HAS_VA_COPY
#define va_copy(dest, src) ((dest) = (src))
#endif
| #include "charmony.h"
#ifdef CHY_HAS_STDBOOL_H
# include <stdbool.h>
#elif !defined(__cplusplus)
typedef char bool;
# define true 1
# define false 0
#endif
#define CMARK_ATTRIBUTE(list)
#ifndef CHY_HAS_VA_COPY
#define va_copy(dest, src) ((dest) = (src))
#endif
#define inline CHY_INLINE
| Use CHY_INLINE in CommonMark source | Use CHY_INLINE in CommonMark source
| C | apache-2.0 | rectang/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clow... |
cd17e3146d7c64acb8c2fe8cb0b028244d24d656 | include/sauce/sauce.h | include/sauce/sauce.h | #ifndef SAUCE_SAUCE_H_
#define SAUCE_SAUCE_H_
#include <sauce/internal/bindings.h>
#include <sauce/internal/new_delete.h>
namespace sauce {
template<typename Module, typename NewDelete = ::sauce::internal::NewDelete>
struct Injector {
friend class SauceTest;
Injector():
newDelete() {}
templa... | #ifndef SAUCE_SAUCE_H_
#define SAUCE_SAUCE_H_
#include <sauce/internal/bindings.h>
#include <sauce/internal/new_delete.h>
namespace sauce {
template<typename Module, typename NewDelete = ::sauce::internal::NewDelete>
struct Injector {
friend class SauceTest;
Injector():
new_delete() {}
templ... | Rename member newDelete -> new_delete. | Rename member newDelete -> new_delete.
| C | mit | phs/sauce,phs/sauce,phs/sauce,phs/sauce |
5619bd4fa06e68e1491986b4f57dea11b5a85bac | c/boards/arduino_uno/riot_arduino_uno.h | c/boards/arduino_uno/riot_arduino_uno.h | /**
Arduino/Genuino UNO
PIN Configuration
D0-D13 - 14 digital IN/OUT pins
A0-A5 - 6 analog IN, digital OUT pins
LED - D13 is also the on board LED
*/
/**
The outputs to the board. The outputs are written internally.
*/
#include "stream_of_byte.h"
struct riot_arduino_uno_sinks_t {
stream_of_byte *D0;
... | Add arduino uno board configuration | Add arduino uno board configuration
| C | mit | artfuldev/RIoT | |
2ace1bcd24aef90cc74a2d009eabc2afc6ff191f | test/number.c | test/number.c | // Copyright 2012 Rui Ueyama <rui314@gmail.com>
// This program is free software licensed under the MIT license.
#include "test.h"
void testmain(void) {
print("numeric constants");
expect(1, 0x1);
expect(17, 0x11);
expect(511, 0777);
expect(11, 0b1011); // GNU extension
expect(11, 0B1011); ... | // Copyright 2012 Rui Ueyama <rui314@gmail.com>
// This program is free software licensed under the MIT license.
#include "test.h"
void testmain(void) {
print("numeric constants");
expect(1, 0x1);
expect(1, 0X1);
expect(17, 0x11);
expect(17, 0X11);
expect(511, 0777);
expect(11, 0b1011); ... | Add tests for 0X prefix. | Add tests for 0X prefix.
| C | mit | jtramm/8cc,cpjreynolds/8cc,jtramm/8cc,8l/8cc,rui314/8cc,andrewchambers/8cc,rui314/8cc,nobody1986/8cc,jtramm/8cc,andrewchambers/8cc,vastin/8cc,gergo-/8cc,cpjreynolds/8cc,cpjreynolds/8cc,nobody1986/8cc,abc00/8cc,nobody1986/8cc,vastin/8cc,rui314/8cc,8l/8cc,vastin/8cc,abc00/8cc,andrewchambers/8cc,8l/8cc,gergo-/8cc,abc00/8c... |
8fe518a50830119365916f194dae8d458064ff70 | ext/cowboy/cowboy.c | ext/cowboy/cowboy.c | #include "cowboy.h"
VALUE mCowboy;
VALUE fft_1d(VALUE m, VALUE nums){
fftw_complex *in, *out;
fftw_plan fp;
long n;
Check_Type(nums, T_ARRAY);
n = size_of_ary(nums);
in = allocate_fftw_complex(n);
out = allocate_fftw_complex(n);
fp = fftw_plan_dft_1d(n, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
cast... | #include "cowboy.h"
VALUE mCowboy;
VALUE fft_1d(VALUE m, VALUE nums){
fftw_complex *in, *out;
fftw_plan fp;
long n;
Check_Type(nums, T_ARRAY);
n = size_of_ary(nums);
if (n == 0){
rb_raise(rb_eException, "Can't use blank array");
}
in = allocate_fftw_complex(n);
out = allocate_fftw_complex(n);
... | Handle call with empty array gracefully. (Compare to segfault earlier). | Handle call with empty array gracefully. (Compare to segfault earlier).
| C | mit | ciniglio/cowboy,ciniglio/cowboy |
e79f9d35c3fb014b4506d6b794abaac3fcd88182 | wasm/Config.h | wasm/Config.h | //===- Config.h -------------------------------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | //===- Config.h -------------------------------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | Use llvm::StringSet instead of std::set. | Use llvm::StringSet instead of std::set.
std::set is pretty slow. We generally prefer llvm::StringSet if we don't
need an sorted set.
Differential Revision: https://reviews.llvm.org/D40579
git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@319371 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/lld,llvm-mirror/lld |
9287eb6b842055a59b3b4bb21d8423dff057486d | generator.h | generator.h | //
// generator.h
// SequentialSA
//
// Created by Vincent Ramdhanie on 3/15/15.
// Copyright (c) 2015 Vincent Ramdhanie. All rights reserved.
//
#ifndef __SequentialSA__generator__
#define __SequentialSA__generator__
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#endif /* defined(__SequentialSA__gene... | //
// generator.h
// SequentialSA
//
// Created by Vincent Ramdhanie on 3/15/15.
// Copyright (c) 2015 Vincent Ramdhanie. All rights reserved.
//
#ifndef __SequentialSA__generator__
#define __SequentialSA__generator__
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#endif /* defined(__SequentialSA__gene... | Create header file with constants and function definitions | Create header file with constants and function definitions
| C | mit | vramdhanie/sequentialsa,vramdhanie/sequentialsa |
ed8efcea8af00e372992991903b316535ac9f095 | TDTChocolate/TestingAdditions/TDTRandomFixtures.h | TDTChocolate/TestingAdditions/TDTRandomFixtures.h | #import <Foundation/Foundation.h>
/**
Category methods on commonly used types for generating random instances.
Inspired by Haskell's QuickCheck.
*/
@interface NSString (TDTRandomFixtures)
+ (instancetype)randomString;
@end
@interface NSNumber (TDTRandomFixtures)
+ (instancetype)randomNumber;
@end
@interface... | #import <Foundation/Foundation.h>
/**
Category methods on commonly used types for generating random instances.
Inspired by Haskell's QuickCheck.
*/
@interface NSString (TDTRandomFixtures)
/**
@return A string consisting of random characters.
It is guranteed to be non empty.
*/
+ (instancetype)randomSt... | Document that `randomString` will never return an empty string | Document that `randomString` will never return an empty string
| C | bsd-3-clause | talk-to/Chocolate,talk-to/Chocolate |
4593c769f1e6bf7b3a243bb1f74e00332bbdf6fc | ext/wikitext.h | ext/wikitext.h | // Copyright 2008 Wincent Colaiuta
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed... | // Copyright 2008 Wincent Colaiuta
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed... | Add ruby_inspect macro for use when debugging | Add ruby_inspect macro for use when debugging
Just calls Kernel#p passing in the specified Ruby object.
Signed-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>
| C | bsd-2-clause | barnaclebarnes/wikitext,barnaclebarnes/wikitext,barnaclebarnes/wikitext,wincent/wikitext,wincent/wikitext,geni/wikitext,geni/wikitext,geni/wikitext |
c7cbb920c0e1bd747de7728454d96ba83586b502 | php_amf.h | php_amf.h | #ifndef PHP_AMF_H
#define PHP_AMF_H 1
#define PHP_AMF_VERSION "0.1"
#define PHP_AMF_WORLD_EXTNAME "amf"
PHP_FUNCTION(amf_encode);
PHP_FUNCTION(amf_decode);
extern zend_module_entry amf_module_entry;
#define phpext_amf_ptr &amf_module_entry
#endif
| /**
* PHP7 extension for Action Message Format (AMF) encoding and decoding with support for AMF0 and AMF3
*
* amfext (http://emilmalinov.com/amfext)
*
* @copyright Copyright (c) 2015 Emil Malinov
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link http://github.com/emi... | Add license comment to the header file. | Add license comment to the header file.
| C | apache-2.0 | emilkm/amfext,emilkm/amfext,emilkm/amfext,emilkm/amfext |
d952bf54fe5be958b735a3285a3f153b362aace1 | EVGEN/EVGENLinkDef.h | EVGEN/EVGENLinkDef.h | #ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ enum Process_t;
#pragma li... | #ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ enum Process_t;
#pragma li... | Add Weighting_t in the LinkDef | Add Weighting_t in the LinkDef
| C | bsd-3-clause | shahor02/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,alisw/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,miranov25/AliRoot,coppedis/AliRoot,jgr... |
f18cd042b17d28811ae308c0c7b9e4b20d2068e9 | Expecta/EXPDefines.h | Expecta/EXPDefines.h | //
// EXPDefines.h
// Expecta
//
// Created by Luke Redpath on 26/03/2012.
// Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
//
#ifndef Expecta_EXPDefines_h
#define Expecta_EXPDefines_h
typedef void (^EXPBasicBlock)();
typedef id (^EXPIdBlock)();
typedef BOOL (^EXPBoolBlock)();
typedef NSString *(^EXPS... | //
// EXPDefines.h
// Expecta
//
// Created by Luke Redpath on 26/03/2012.
// Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
//
#ifndef Expecta_EXPDefines_h
#define Expecta_EXPDefines_h
typedef void (^EXPBasicBlock)(void);
typedef id (^EXPIdBlock)(void);
typedef BOOL (^EXPBoolBlock)(void);
typedef NSSt... | Fix warning ‘This function declaration is not a prototype’ | Fix warning ‘This function declaration is not a prototype’
| C | mit | specta/expecta |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.