commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 1 4.87k | subject stringlengths 15 778 | message stringlengths 15 8.75k | lang stringclasses 266
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
440f8382b009c9af12da567119566113a89ec935 | include/core/SkMilestone.h | include/core/SkMilestone.h | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 65
#endif
| /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 66
#endif
| Update Skia milestone to 66 | Update Skia milestone to 66
TBR=reed@google.com
Bug: skia:
Change-Id: Ib011c6d4a6e54980d2e6e8b16a93551d99dcd948
Reviewed-on: https://skia-review.googlesource.com/97103
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc... | C | bsd-3-clause | google/skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,Hikari-no-Tenshi... |
5b2ede3d0d44f5d96ccaad5d72df41c1df678708 | include/core/SkMilestone.h | include/core/SkMilestone.h | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 84
#endif
| /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 85
#endif
| Update Skia milestone to 85 | Update Skia milestone to 85
Change-Id: If6f878b896397ec1946a0b29b10764722b35d737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289777
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Auto-Su... | C | bsd-3-clause | google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,ao... |
217b2661c14b7940bb273f4b793b3c6d41f7425c | ionScience/MarchingCubes.h | ionScience/MarchingCubes.h |
#pragma once
#include <ionScene/CSimpleMesh.h>
#include "SVolume.h"
struct SMarchingCubesPoint
{
f32 Value;
vec3f Gradient;
SMarchingCubesPoint()
{}
SMarchingCubesPoint(f32 const & value)
: Value(value)
{}
};
typedef SVolume<SMarchingCubesPoint> SMarchingCubesVolume;
void Calculate... |
#pragma once
#include <ionScene/CSimpleMesh.h>
#include "SVolume.h"
struct SMarchingCubesPoint
{
f32 Value = 0;
vec3f Gradient;
SMarchingCubesPoint()
{}
SMarchingCubesPoint(f32 const & value)
: Value(value)
{}
};
typedef SVolume<SMarchingCubesPoint> SMarchingCubesVolume;
void Calcu... | Fix marching cubes unitialized variable | [ionScience] Fix marching cubes unitialized variable
| C | mit | iondune/ionEngine,iondune/ionEngine |
431fed0108bdccf1ea8fb40b952d32ec993cfaa4 | src/config.h | src/config.h | #pragma once
#include <pebble.h>
#define BG_COLOR GColorWhite
#define ACTION_BAR_WIDTH_WITH_GAP (ACTION_BAR_WIDTH + 12)
#define BPM_FONT FONT_KEY_BITHAM_42_BOLD
#define BPM_FONT_HEIGHT 42
#define BPM_DEFAULT "---"
#define BPM_HINT_FONT FONT_KEY_GOTHIC_24_BOLD
#define BPM_HINT_FONT_HEIGHT 24
#define BPM_HINT_TEXT "... | #pragma once
#include <pebble.h>
#define BG_COLOR GColorWhite
#ifdef PBL_ROUND
#define ACTION_BAR_WIDTH_WITH_GAP (ACTION_BAR_WIDTH + 12)
#else
#define ACTION_BAR_WIDTH_WITH_GAP (ACTION_BAR_WIDTH + 2)
#endif
#define BPM_FONT FONT_KEY_BITHAM_42_BOLD
#define BPM_FONT_HEIGHT 42
#define BPM_DEFAULT "---"
#define BPM_HI... | Fix cut off BPM on aplite and basalt | Fix cut off BPM on aplite and basalt
Previously, BPMs that rendered wide, specifically 100.0 and simlar, would get
cut off on these platforms. This change decreases border size on square watches
to prevent this from happening.
| C | mit | aarmea/bpm-pebble,aarmea/bpm-pebble,aarmea/bpm-pebble |
380b06677936225540a538e032741e4ed7ef2d26 | src/qt/bitcoinaddressvalidator.h | src/qt/bitcoinaddressvalidator.h | #ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base48 entry widget validator.
Corrects near-miss characters and refuses characters that are no part of base48.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressVali... | #ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base58 entry widget validator.
Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressVal... | Fix typo in a comment: it's base58, not base48. | Fix typo in a comment: it's base58, not base48.
| C | mit | MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin |
ae360ba7aa18b1222a1ed92e67cbc7690e4a3f5c | src/parser.h | src/parser.h | /*
* The Homework Database
*
* SQL Parser
*
* Authors:
* Oliver Sharma and Joe Sventek
* {oliver, joe}@dcs.gla.ac.uk
*
* (c) 2009. All rights reserved.
*/
#ifndef HWDB_PARSER_H
#define HWDB_PARSER_H
#include "sqlstmts.h"
#include "gram.h"
/* Places parsed output in externally declared global variable... | /*
* Copyright (c) 2013, Court of the University of Glasgow
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* thi... | Add BSD 3-clause open source header | Add BSD 3-clause open source header
| C | bsd-3-clause | fergul/Cache,jsventek/Cache,jsventek/Cache,jsventek/Cache,fergul/Cache,fergul/Cache |
89bba249561dc480430c64d9eecbc4af92bf6376 | src/config/cearth_config.h | src/config/cearth_config.h | #ifndef _CONFIG_H_
#define _CONFIG_H_
#define LOGINDB_FILE "logindb"
#define LOGINDB_MAX 100
#define LOGINDB_MAXLINE 128
#define LOGIN_COOKIEJAR "cookie"
#define LOGIN_COOKIESIZE 32
#define LOGIN_TOKENSIZE 64
#define LOGIN_URLMAXSIZE 256
static const char *haven_authserv = "moltke.seatribe.se";
static const char ... | #ifndef _CONFIG_H_
#define _CONFIG_H_
#define LOGINDB_FILE "logindb"
#define LOGINDB_MAX 100
#define LOGINDB_MAXLINE 128
#define LOGIN_COOKIEJAR "cookie"
#define LOGIN_COOKIESIZE 32
#define LOGIN_TOKENSIZE 64
#define LOGIN_URLMAXSIZE 256
#define LOGIN_TOKSTRSTART "<property name=\"jnlp.haven.authck\" value=\""
stati... | Add the string to search when parsing for token from website | Add the string to search when parsing for token from website
| C | mit | nyanpasu/cearth |
298f58e073b2782bd264edea969769b7b5e7cf41 | libc/sysdeps/linux/arm/bits/arm_asm.h | libc/sysdeps/linux/arm/bits/arm_asm.h | /* Various definitons used the the ARM uClibc assembly code. */
#ifndef _ARM_ASM_H
#define _ARM_ASM_H
#ifdef __thumb2__
# ifdef __ASSEMBLER__
.thumb
.syntax unified
# endif /* __ASSEMBLER__ */
#define IT(t, cond) i##t cond
#else
/* XXX: This can be removed if/when we require an assembler that supports
unified asse... | /* Various definitons used the the ARM uClibc assembly code. */
#ifndef _ARM_ASM_H
#define _ARM_ASM_H
#ifdef __thumb2__
# ifdef __ASSEMBLER__
.thumb
.syntax unified
# endif /* __ASSEMBLER__ */
#define IT(t, cond) i##t cond
#else
/* XXX: This can be removed if/when we require an assembler that supports
unified asse... | Fix POP_RET for armv4t && interworking | arm: Fix POP_RET for armv4t && interworking
It seems the condition was reversed which lead to e.g. arm-920t being
confused
Signed-off-by: Bernhard Reutner-Fischer <ce1ac9e9ad16abccd7821f371ad381197b4768ac@gmail.com>
| C | lgpl-2.1 | kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,kraj/uclibc-ng,wbx-github/uclibc-ng,majek/uclibc-vx32,brgl/uclibc-ng,kraj/uClibc,brgl/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,majek/uclibc-vx32,kraj/uClibc,kraj/uclibc-ng... |
1ee690946e0b9dc2a44dd673f4e62942a953bec5 | include/ImageIO/CGImageSourceInternal.h | include/ImageIO/CGImageSourceInternal.h | //******************************************************************************
//
// Copyright (c) 2016, Intel Corporation
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EX... | //******************************************************************************
//
// Copyright (c) 2016, Intel Corporation
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EX... | Fix ApiAnalyzer complaints about ImageIO headers. | Fix ApiAnalyzer complaints about ImageIO headers.
| C | mit | nathpete-msft/WinObjC,rajsesh-msft/WinObjC,yweijiang/WinObjC,autodesk-forks/WinObjC,yweijiang/WinObjC,bSr43/WinObjC,bbowman/WinObjC,MSFTFox/WinObjC,s5msft/WinObjC,bbowman/WinObjC,rajsesh-msft/WinObjC,MSFTFox/WinObjC,Microsoft/WinObjC,bbowman/WinObjC,vkvenkat/WinObjC,pradipd/WinObjC,ehren/WinObjC,nathpete-msft/WinObjC,a... |
79c31c97a5c0c1b061f18fec06d6b969d267c766 | src/modules/test_map/mod.c | src/modules/test_map/mod.c | #include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
EAPI int
elm_modapi_init(void *m)
{
return 1; // succeed always
}
EAPI int
elm_modapi_shutdown(void *m)
{
return 1; // succeed always
}
EAPI Eina_Bool
obj_hook(Evas_Object *obj)
{
return EINA_TRUE;
}
EAPI Eina_Bool
o... | #include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
EAPI int
elm_modapi_init(void *m __UNUSED__)
{
return 1; // succeed always
}
EAPI int
elm_modapi_shutdown(void *m __UNUSED__)
{
return 1; // succeed always
}
EAPI Eina_Bool
obj_hook(Evas_Object *obj __UNUSED__)
{
retu... | Add UNUSED so we get a clean compile. | Add UNUSED so we get a clean compile.
SVN revision: 55786
| C | lgpl-2.1 | rvandegrift/elementary,FlorentRevest/Elementary,tasn/elementary,tasn/elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,tasn/elementary,FlorentRevest/Elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary |
7b6b9da98f07f48342a50a437e18f049c7f9537b | GITPackFile.h | GITPackFile.h | //
// GITPackFile.h
// CocoaGit
//
// Created by Geoffrey Garside on 05/08/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface GITPackFile : NSObject
{
NSData * idxData;
NSData * packData;
NSString * idxPath;
NSString * packPath;
NSArray * ... | //
// GITPackFile.h
// CocoaGit
//
// Created by Geoffrey Garside on 05/08/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface GITPackFile : NSObject
{
NSData * idxData;
NSData * packData;
NSString * idxPath;
NSString * packPath;
NSArray * ... | Add more properties and methods to help with git-pack-inspect debugging | Add more properties and methods to help with git-pack-inspect debugging
| C | mit | geoffgarside/cocoagit,schacon/cocoagit,geoffgarside/cocoagit,schacon/cocoagit |
16a59cb9926bc96792cc9d1b7a996689f7bf1b86 | components/TARGET_PSA/TESTS/compliance_its/test_s003/main.c | components/TARGET_PSA/TESTS/compliance_its/test_s003/main.c | #include "val_interfaces.h"
#include "pal_mbed_os_crypto.h"
#include "lifecycle.h"
#ifdef ITS_TEST
void test_entry_s003(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
#error [NOT_SUPPORTED] Test is too long for CI, thus always fails on timeout.
void test_entry_p003(val_api_t *val_api, psa_api_t *psa_api);
#end... | #include "val_interfaces.h"
#include "pal_mbed_os_crypto.h"
#include "lifecycle.h"
#ifdef ITS_TEST
void test_entry_s003(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
#ifndef PS_ALLOW_ENTIRE_STORAGE_FILL
#error [NOT_SUPPORTED] Test is too long for CI, thus always fails on timeout.
#endif
void test_entry_p003(v... | Allow PS test03 with PS_ALLOW_ENTIRE_STORAGE_FILL flag | Allow PS test03 with PS_ALLOW_ENTIRE_STORAGE_FILL flag
| C | apache-2.0 | andcor02/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,kjbracey-arm/mbed,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,kjbracey-arm/mbed,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed |
6af6de1f5cb48d109c1d58fa4bdd509de09e9c7f | Globals.h | Globals.h | /*
Mace - http://www.macehq.cx
Copyright 1999-2004
See the file README for more information
*/
#ifndef GLOBALS_H
#define GLOBALS_H
#ifndef _MaceTypes
#define _MaceTypes
typedef unsigned char U8;
typedef signed char S8;
typedef unsigned short U16;
typedef signed short S16;
//Note: on 64-bit machines, replace "l... | /*
Mace - http://www.macehq.cx
Copyright 1999-2004
See the file README for more information
*/
#ifndef GLOBALS_H
#define GLOBALS_H
#ifndef _MaceTypes
#define _MaceTypes
#include <stdint.h>
typedef uint8_t U8;
typedef int8_t S8;
typedef uint16_t U16;
typedef int16_t S16;
typedef uint32_t U32;
typedef int32_t ... | Use C99 stdint.h header for types | Use C99 stdint.h header for types
| C | lgpl-2.1 | MaddTheSane/Mace,MaddTheSane/Mace |
47b3fd8dd3b1baa364ee93c221ae41d7a61810cb | src/lib/ecore_x/xcb/ecore_xcb_missing.c | src/lib/ecore_x/xcb/ecore_xcb_missing.c | #include "ecore_xcb_private.h"
EAPI Eina_Bool
ecore_x_input_multi_select(Ecore_X_Window win)
{
return 0;
}
EAPI void
ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter)
{
}
EAPI void
ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
{
}
EAPI Eina_Bool
eco... | #include "ecore_xcb_private.h"
EAPI void
ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, Ecore_X_Atom *protos, int num)
{
}
EAPI Eina_Bool
ecore_x_input_multi_select(Ecore_X_Window win)
{
return 0;
}
EAPI void
ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter)
{
}
EAPI void
... | Add one more missing function stub | Add one more missing function stub
| C | mit | OpenInkpot-archive/ecore,OpenInkpot-archive/ecore,OpenInkpot-archive/ecore |
5099b80088141137d81c62d3e03208835faced06 | test/Driver/clang_f_opts.c | test/Driver/clang_f_opts.c | // RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2> %t
// RUN: grep -F '"-fblocks"' %t
// RUN: grep -F '"-fpascal-strings"' %t
// RUN: clang... | // RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
// RUN: clang -### -S -x c /dev/null -fblo... | Convert the remainder of this test case over to using FileCheck. | Convert the remainder of this test case over to using FileCheck.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@91194 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
a6d0140a2c9bbaa73706472e0e748279cd0a2b7b | app/tx/main.c | app/tx/main.c | #include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "nrf51.h"
#include "nrf_delay.h"
#include "error.h"
#include "gpio.h"
#include "leds.h"
#include "radio.h"
void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
while (1)
{
for (uint8_t i = LED_START; i < LED_S... | #include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "nrf51.h"
#include "nrf_delay.h"
#include "error.h"
#include "gpio.h"
#include "leds.h"
#include "radio.h"
void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
while (1)
{
for (uint8_t i = LED_START; i < LED_S... | Send two packet at once. | Send two packet at once.
| C | bsd-3-clause | hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio |
1946af2c45372e3de39000a45a5954bb5870bc1b | src/consensus/amount.h | src/consensus/amount.h | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_AMOUNT_H
#define BITCOIN_CONSENSUS_AMOUNT_H
#include <... | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CONSENSUS_AMOUNT_H
#define BITCOIN_CONSENSUS_AMOUNT_H
#include <... | Add comment to COIN constant. | Add comment to COIN constant.
The COIN constant is critical in understanding Bitcoin's supply, but what it represents isn't clear from the name of the constant. Adding a comment clarifies the meaning of the constant for future readers. | C | mit | jlopp/statoshi,namecoin/namecoin-core,achow101/bitcoin,namecoin/namecoin-core,pataquets/namecoin-core,instagibbs/bitcoin,domob1812/bitcoin,tecnovert/particl-core,AkioNak/bitcoin,sstone/bitcoin,tecnovert/particl-core,dscotese/bitcoin,anditto/bitcoin,domob1812/namecore,pataquets/namecoin-core,namecoin/namecore,fujicoin/f... |
eb2dc60d19a206f5d51d3871ba81effa166c5219 | src/driver_control/dc_common.c | src/driver_control/dc_common.c | #define DC_BASE_MODE_OFF 0
#define DC_BASE_MODE_NO_GYRO 1
#define DC_BASE_MODE_GYRO 2
#define DC_BASE_MODE_OVER 3
const string dc_base_mode_names[] = {" OFF", "NO GYRO", " GYRO"};
int dc_base_mode = DC_BASE_MODE_GYRO;
void dc_base_mode_next(void);
#define DC_SHOOTER_MODE_NONE 0
#define DC_SHO... | #define DC_BASE_MODE_OFF 0
#define DC_BASE_MODE_NO_GYRO 1
#define DC_BASE_MODE_GYRO 2
#define DC_BASE_MODE_OVER 3
const string dc_base_mode_names[] = {" OFF", "NO GYRO", " GYRO"};
int dc_base_mode = DC_BASE_MODE_GYRO;
void dc_base_mode_next(void);
#define DC_SHOOTER_MODE_NONE 0
#define DC_SHO... | Switch to direct drive on startup | Switch to direct drive on startup
| C | mit | qsctr/vex-4194b-2016 |
75c6d50abe1dc506a0f21e4e19f742d799cad5c4 | numba/_pymodule.h | numba/_pymodule.h | #ifndef NUMBA_PY_MODULE_H_
#define NUMBA_PY_MODULE_H_
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <structmember.h>
#include <frameobject.h>
#define MOD_ERROR_VAL NULL
#define MOD_SUCCESS_VAL(val) val
#define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void)
#define MOD_DEF(ob, name, doc, methods) { \
... | #ifndef NUMBA_PY_MODULE_H_
#define NUMBA_PY_MODULE_H_
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <structmember.h>
#include <frameobject.h>
#define MOD_ERROR_VAL NULL
#define MOD_SUCCESS_VAL(val) val
#define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void)
#define MOD_DEF(ob, name, doc, methods) { \
... | Remove accidental definitions of MyMem_* | Remove accidental definitions of MyMem_*
These were guarded to only be defined on Python < 3.4.
This should fix test_snapshot on the 32-bit build.
| C | bsd-2-clause | stuartarchibald/numba,numba/numba,numba/numba,cpcloud/numba,gmarkall/numba,seibert/numba,seibert/numba,cpcloud/numba,stonebig/numba,numba/numba,IntelLabs/numba,IntelLabs/numba,stonebig/numba,stonebig/numba,seibert/numba,numba/numba,gmarkall/numba,seibert/numba,gmarkall/numba,stonebig/numba,stuartarchibald/numba,cpcloud... |
0262f2fab71dca4874831d2d87ecaa099c1831d1 | src/util/fixed_point.h | src/util/fixed_point.h | /**
* \file fixed_point.h
*
*
*
* \author Ethan Burns
* \date 2009-01-16
*/
#include "stdint.h"
#include <limits>
/* The type of a fixed point value. This should never be larger than
* the size of the type for the 'value' field in the AtomicInt
* class. */
typedef unsigned long fp_type;
#define fp_sqrt2 1... | /**
* \file fixed_point.h
*
*
*
* \author Ethan Burns
* \date 2009-01-16
*/
#include "stdint.h"
#include <limits>
/* The type of a fixed point value. This should never be larger than
* the size of the type for the 'value' field in the AtomicInt
* class. */
typedef unsigned long fp_type;
#define fp_sqrt2 1... | Use 3 decimal places, the sun uses 32-bit fp_type which chokes with 4. | Use 3 decimal places, the sun uses 32-bit fp_type which chokes with 4.
| C | mit | eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf |
af2e0e171ae1e1957f1f7aaf8d5c090c87c2f9dd | Tests/Component/FactoryProvider/PizzaFactory.h | Tests/Component/FactoryProvider/PizzaFactory.h | ////////////////////////////////////////////////////////////////////////////////
//
// TYPHOON FRAMEWORK
// Copyright 2013, Jasper Blues & Contributors
// All Rights Reserved.
//
// NOTICE: The authors permit you to use, modify, and distribute this file
// in accordance with the terms of the license agreement acco... | ////////////////////////////////////////////////////////////////////////////////
//
// TYPHOON FRAMEWORK
// Copyright 2013, Jasper Blues & Contributors
// All Rights Reserved.
//
// NOTICE: The authors permit you to use, modify, and distribute this file
// in accordance with the terms of the license agreement acco... | Fix typing mistake. add code formatting. | Fix typing mistake. add code formatting.
| C | apache-2.0 | r2B3Challenge/Typhoon,zjh171/Typhoon,r2B3Challenge/Typhoon,nickynick/Typhoon,gaurav1981/Typhoon,manicakes/Typhoon,1yvT0s/Typhoon,manicakes/Typhoon,mbaltaks/Typhoon,nickynick/Typhoon,gaurav1981/Typhoon,pomozoff/Typhoon,literator/Typhoon,nickynick/Typhoon,gaurav1981/Typhoon,pomozoff/Typhoon,nickynick/Typhoon,manicakes/Ty... |
08aad53abab851e5b39593495a6463c56e59c326 | util.h | util.h | #include <algorithm>
#include <time.h>
template <typename Container1, typename Container2>
bool sequences_are_equal(const Container1& seq1, const Container2& seq2) {
typedef typename Container1::const_iterator Iter1;
typedef typename Container2::const_iterator Iter2;
typedef std::pair<Iter1, Iter2> IterPai... | #include <algorithm>
template <typename Container1, typename Container2>
bool sequences_are_equal(const Container1& seq1, const Container2& seq2) {
typedef typename Container1::const_iterator Iter1;
typedef typename Container2::const_iterator Iter2;
typedef std::pair<Iter1, Iter2> IterPair;
IterPair mi... | Add start and stop params to randint | Add start and stop params to randint
| C | mit | gg/algorithms,gg/algorithms,gg/algorithms |
adcdb080cbf200a29d08dd61817d48abadc37d93 | src/libguac/guacamole/parser-constants.h | src/libguac/guacamole/parser-constants.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | Increase max number of elements per instruction. | GUACAMOLE-587: Increase max number of elements per instruction.
| C | apache-2.0 | mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,glyptodon/guacamole-server,glyptodon/guacamole-server,apache/guacamole-server,glyptodon/guacamole-server,apache/guacamole-server,apache/guacamole-server |
24746780a3c46b0607edcf65fcdbb2e61b3058fd | src/ios/AppSettings.h | src/ios/AppSettings.h | //
// AppPreferences.h
//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
@interface AppSettings : CDVPlugin
- (void)get:(CDVInvokedUrlCommand*)command;
@end
| //
// AppPreferences.h
//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
@interface AppSettings : CDVPlugin
- (void)fetch:(CDVInvokedUrlCommand*)command;
@end
| Update method from get to fetch | Update method from get to fetch
| C | apache-2.0 | greg-laughlin-hs/app-settings-reader,greg-laughlin-hs/app-settings-reader |
7a108087ed96c0d91b65b967f9c524a7c64116fa | targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device/itm_api.c | targets/TARGET_Ambiq_Micro/TARGET_Apollo3/device/itm_api.c | /* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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/li... | /* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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/li... | Add default SWO pin number and config if not defined in Ambiq target | Add default SWO pin number and config if not defined in Ambiq target
| C | apache-2.0 | mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed |
b13c0d7adb66133631e78f1aa6799bc2c712b803 | WikipediaUnitTests/Code/FBSnapshotTestCase+WMFConvenience.h | WikipediaUnitTests/Code/FBSnapshotTestCase+WMFConvenience.h | #import <FBSnapshotTestCase/FBSnapshotTestCase.h>
#import "UIApplication+VisualTestUtils.h"
/**
* @function WMFSnapshotVerifyView
*
* Verify correct appearance of a given view.
*
* Search all folder suffixes, use default naming conventions.
*
* @param view The view to verify.
*/
#define WMFSnapshotVerifyVi... | #import <FBSnapshotTestCase/FBSnapshotTestCase.h>
#import "UIApplication+VisualTestUtils.h"
/**
* @function WMFSnapshotVerifyView
*
* Verify correct appearance of a given view.
*
* Search all folder suffixes, use default naming conventions.
*
* @param view The view to verify.
*/
#define WMFSnapshotVerifyVi... | Revert "Add slight tolerance for image differences to visual test macro." | Revert "Add slight tolerance for image differences to visual test macro."
This reverts commit 13d6d4e18d98f7c2d496f3454216d96a4d8e95d1.
| C | mit | josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,mon... |
60f92d0b69f688523e81adcc8991f6c44a7264c5 | src/pomodoro.h | src/pomodoro.h | // ----------------------------------------------------------------------------
// pomodoro - Provides data structures and methods for manipulating pomodoros
// Copyright (c) 2013 Jonathan Speicher (jon.speicher@gmail.com)
// Licensed under the MIT license: http://opensource.org/licenses/MIT
// ------------------------... | // ----------------------------------------------------------------------------
// pomodoro - Provides data structures and methods for manipulating pomodoros
// Copyright (c) 2013 Jonathan Speicher (jon.speicher@gmail.com)
// Licensed under the MIT license: http://opensource.org/licenses/MIT
// ------------------------... | Fix a long line in a comment | Fix a long line in a comment
| C | mit | elliots/simple-demo-pebble,jonspeicher/Pomade,jonspeicher/Pomade |
aca127424836bc72763d64fe0ea655b896293524 | src/settings.h | src/settings.h | #define PIN_GAS_PEDAL A0
#define PIN_BATTERY_VOLTAGE A1
#define PIN_CW 5
#define PIN_CCW 6
#define PIN_SWITCH_FORWARDS 10
#define PIN_SWITCH_BACKWARDS 11
#define GAS_VALUE_MIN 446
#define GAS_VALUE_MAX 510
#define BATTERY_READING_12V 670
#define BATTERY_READING_6V 331
#define BATTERY_VOLTAGE_MIN 11
#define SPEED_... | #define PIN_GAS_PEDAL A0
#define PIN_BATTERY_VOLTAGE A1
#define PIN_CW 6
#define PIN_CCW 5
#define PIN_SWITCH_FORWARDS 10
#define PIN_SWITCH_BACKWARDS 11
#define GAS_VALUE_MIN 446
#define GAS_VALUE_MAX 490 //510
#define BATTERY_READING_12V 670
#define BATTERY_READING_6V 331
#define BATTERY_VOLTAGE_MIN 11
#define ... | Change max gas value Swap CW/CCW pins | Change max gas value
Swap CW/CCW pins
| C | mit | schinken/E-KettCar,schinken/E-KettCar |
472da090a1355b9658e60af74cb54da827b0c03e | src/cpu.c | src/cpu.c | //
// Created by Jake Kinsella on 4/17/17.
//
#include "cpu.h"
#include "registers.h"
#include "ram.h"
#include "matcher/matcher.h"
void initialize()
{
initialize_registers();
initialize_ram();
}
void cycle()
{
uint8_t instruction = read_byte_from_address(pc);
printf("%d: %d\n", pc, instruction);
... | //
// Created by Jake Kinsella on 4/17/17.
//
#include "cpu.h"
#include "registers.h"
#include "ram.h"
#include "matcher/matcher.h"
void initialize()
{
initialize_registers();
initialize_ram();
}
void cycle()
{
uint8_t instruction = read_byte_from_address(pc);
printf("0x%x: 0x%x\n", pc, instruction);... | Print hex in debug messages | Print hex in debug messages
| C | mit | TheLocust3/Intel-8080-Emulator,TheLocust3/Intel-8080-Emulator |
fe328acd898dc8efe35c8a8b9c9ea16630f9ec49 | tests/regression/02-base/51-evalint-deep.c | tests/regression/02-base/51-evalint-deep.c | // from SV-COMP: nla-digbench-scaling/ps6-ll_valuebound5.c
// contains deep integer expressions that shouldn't cause extremely exponential slowdown
// when evaluated by base's eval_rv and EvalInt jointly
// runs (as unknown) under 0.1s
#include <assert.h>
void assume_abort_if_not(int cond) {
if(!cond) {abort();}
}
... | // from SV-COMP: nla-digbench-scaling/ps6-ll_valuebound5.c
// contains deep integer expressions that shouldn't cause extremely exponential slowdown
// when evaluated by base's eval_rv and EvalInt jointly
// runs (as unknown) under 0.1s
#include <assert.h>
void assume_abort_if_not(int cond) {
if(!cond) {abort();}
}
... | Add UNKNOWN annotations to 02/51 | Add UNKNOWN annotations to 02/51
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
d3858eb7da569afc310bf14d4fed9d754e3e0db3 | test/get-compositor.c | test/get-compositor.c | #include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <stdio.h>
int main() {
Display *display = XOpenDisplay(NULL);
if (display == NULL) {
fprintf(stderr, "Could not connect to $DISPLAY.\n");
return 1;
}
char buf[32];
snprintf(buf, sizeof(buf), "_NET_WM_CM_S%d", (int)DefaultScreen(... | #include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <stdio.h>
int main() {
Display *display = XOpenDisplay(NULL);
if (display == NULL) {
fprintf(stderr, "Could not connect to $DISPLAY.\n");
return 1;
}
char buf[32]; // Flawfinder: ignore
snprintf(buf, sizeof(buf), "_NET_WM_CM_S%... | Fix a potentially unportable use of snprintf found by flawfinder. | Fix a potentially unportable use of snprintf found by flawfinder.
| C | apache-2.0 | google/xsecurelock,google/xsecurelock |
3a19cbf530648a63fb3f73630046c561f70c6b71 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k10"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2010 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k11"
| Update driver version to 5.02.00-k11 | [SCSI] qla4xxx: Update driver version to 5.02.00-k11
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_k... |
315cc71afe5d5245e60ce4564328619c49310b6a | Include/KAI/Platform/GameController.h | Include/KAI/Platform/GameController.h |
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif // SHATTER_PLATFORM_GAME_CONTROLLER_H
//EOF
|
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H
#define KAI_PLATFORM_GAME_CONTROLLER_H
#include KAI_PLATFORM_INCLUDE(GameController.h)
#endif
//EOF
| Add some color for console output | Add some color for console output
| C | mit | cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI |
931352d4bfab72897dc8012c78d9f64739656226 | llvmpy/include/python3adapt.h | llvmpy/include/python3adapt.h | #ifndef PYTHON3ADAPT_H
#define PYTHON3ADAPT_H
#if (PY_VERSION_HEX < 0x03000000)
#define PyBytes_Check PyString_Check
#define PyBytes_Size PyString_Size
#define PyBytes_AsString PyString_AsString
#define PyBytes_FromStringAndSize PyString_FromStringAndSize
#define PyBytes_From... | #ifndef PYTHON3ADAPT_H
#define PYTHON3ADAPT_H
#if (PY_VERSION_HEX < 0x03000000)
#define PyBytes_Check PyString_Check
#define PyBytes_Size PyString_Size
#define PyBytes_AsString PyString_AsString
#define PyBytes_FromStringAndSize PyString_FromStringAndSize
#define PyBytes_From... | Fix memory leak in Python 3.2 | Fix memory leak in Python 3.2
| C | bsd-3-clause | llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy |
90c74ab32dc8a19f979975b9910c1810032f1ba9 | engine/core/include/halley/core/api/input_api.h | engine/core/include/halley/core/api/input_api.h | #pragma once
#include <functional>
#include "halley/maths/vector2.h"
#include "halley/core/input/input_device.h"
namespace Halley
{
class InputJoystick;
class InputTouch;
class InputAPI
{
public:
virtual ~InputAPI() {}
virtual size_t getNumberOfKeyboards() const = 0;
virtual std::shared_ptr<InputDevice... | #pragma once
#include <functional>
#include "halley/maths/vector2.h"
#include "halley/core/input/input_device.h"
#include "halley/maths/colour.h"
#include "halley/data_structures/maybe.h"
namespace Halley
{
class InputJoystick;
class InputTouch;
class InputControllerData {
public:
Colour colour;
String name;... | Support for additional data to be passed for controller support (implemented on consoles). | Support for additional data to be passed for controller support (implemented on consoles).
| C | apache-2.0 | amzeratul/halley,amzeratul/halley,amzeratul/halley |
472bd7982e5a006fbbe75a0cd88ba494b31719d6 | ext/metrics/metrics.c | ext/metrics/metrics.c | #include <ruby.h>
#include "client.h"
static VALUE metrics_report_metric(VALUE self, VALUE user_id, VALUE key, VALUE val) {
char * user_id_str, * key_str;
int result = 0;
user_id_str = RSTRING_PTR(user_id);
key_str = RSTRING_PTR(key);
/* Figure out what this belongs to and call the apprioriate one. */
sw... | #include <ruby.h>
#include "client.h"
static VALUE rb_metrics_report_metric(VALUE self, VALUE user_id, VALUE key, VALUE val) {
char * user_id_str, * key_str;
int result = 0;
user_id_str = RSTRING_PTR(user_id);
key_str = RSTRING_PTR(key);
/* Figure out what this belongs to and call the apprioriate one. */
... | Move this in to an actual class. | Move this in to an actual class.
| C | mit | bradhe/metrics-client,bradhe/metrics-client |
19cc9b027e894e1dff68f18d7d660ac55b20b784 | include/flatcc/flatcc_version.h | include/flatcc/flatcc_version.h | #define FLATCC_VERSION_TEXT "0.4.3"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 4
#define FLATCC_VERSION_PATCH 3
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 1
| #define FLATCC_VERSION_TEXT "0.5.0-pre"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 5
#define FLATCC_VERSION_PATCH 0
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 0
| Prepare for next version version | Prepare for next version version
| C | apache-2.0 | dvidelabs/flatcc,dvidelabs/flatcc,dvidelabs/flatcc |
eb87dfe4886db065ce24f1f2db3570497366a559 | src/network_os.h | src/network_os.h | #pragma once
#ifndef INCL_NETWORKOS
#define INCL_NETWORKOS
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <map>
#include <cstdlib>
#ifdef WIN32
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <inaddr.h>
#include <in6addr.h>
#include <mstcpip.h>
#define SHUT_RDWR SD_BOTH
typede... | #pragma once
#ifndef INCL_NETWORKOS
#define INCL_NETWORKOS
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <map>
#include <cstdlib>
#if defined(_MSC_VER)
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <inaddr.h>
#include <in6addr.h>
#include <mstcpip.h>
#define SHUT_RDWR SD_BO... | Use variable that cmake defines instead of specific one | Use variable that cmake defines instead of specific one
| C | mit | Meisaka/NetPort |
1b98d6ce44baea807223c67ddf97cc0dc9108741 | CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | /** @file
Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based
Cryptographic Library.
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies ... | /** @file
Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based
Cryptographic Library.
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accom... | Add comments for clarification about memset implementation. | Add comments for clarification about memset implementation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Long, Qin <qin.long@intel.com>
Reviewed-by: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
git-svn-id: 3158a46dfd52e07d1fda3e32e1ab2e353a00b20f@15662 6f19259b-... | C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
6386bea6b175941dd7af1036cca991b4b77102fb | Bag.h | Bag.h | #ifndef Bag_h
#define Bag_h
#include <unordered_set>
#include <vector>
#include <ostream>
//A node in the tree deocomposition
class Bag{
private:
unsigned long id;
std::vector<unsigned long> nodes;
unsigned long parent=0;
std::vector<unsigned long> children;
public:
Bag(unsigned long id, std::unordered_set<... | #ifndef Bag_h
#define Bag_h
#include <unordered_set>
#include <vector>
#include <ostream>
//A node in the tree deocomposition
class Bag{
private:
unsigned long id;
std::vector<unsigned long> nodes;
unsigned long parent=0;
std::vector<unsigned long> children;
public:
Bag(unsigned long id, const std::unordere... | Make get_nodes return a const&, and optimize uses of this function | Make get_nodes return a const&, and optimize uses of this function
| C | mit | smaniu/treewidth,smaniu/treewidth |
e4d76b921d8f7bcf36c3de63108f2156de578c7c | src/emu/riscv-processor-logging.h | src/emu/riscv-processor-logging.h | //
// riscv-processor-logging.h
//
#ifndef riscv_processor_logging_h
#define riscv_processor_logging_h
namespace riscv {
/* Processor logging flags */
enum {
proc_log_inst = 1<<0, /* Log instructions */
proc_log_operands = 1<<1, /* Log instruction operands */
proc_log_memory =... | //
// riscv-processor-logging.h
//
#ifndef riscv_processor_logging_h
#define riscv_processor_logging_h
namespace riscv {
/* Processor logging flags */
enum {
proc_log_inst = 1<<0, /* Log instructions */
proc_log_operands = 1<<1, /* Log instruction operands */
proc_log_memory =... | Update comment for enum proc_log_ebreak_cli | Update comment for enum proc_log_ebreak_cli
| C | mit | rv8-io/rv8,rv8-io/rv8,rv8-io/rv8 |
95411cf0b5dadfe821f4121721c0f50e806c4630 | roles/netbootxyz/files/ipxe/local/general.h | roles/netbootxyz/files/ipxe/local/general.h | #define CONSOLE_CMD /* Console command */
#define DIGEST_CMD /* Image crypto digest commands */
#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
#define IMAGE_COMBOOT /* COMBOOT */
#define IMAGE_TRUST_CMD /* Image trust management commands */
#define NET_PROTO... | #define CONSOLE_CMD /* Console command */
#define DIGEST_CMD /* Image crypto digest commands */
#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
#define IMAGE_COMBOOT /* COMBOOT */
#define IMAGE_TRUST_CMD /* Image trust management commands */
#define IMAGE_GZIP ... | Enable GZIP and ZLIB options in iPXE | Enable GZIP and ZLIB options in iPXE
| C | apache-2.0 | antonym/netboot.xyz,antonym/netboot.xyz,antonym/netboot.xyz |
989101bc7493f39dd0f7da840de3940b2af323c9 | test/test-file.c | test/test-file.c | #include <glib.h>
#include <glib/gstdio.h>
#include <uuid/uuid.h>
#include <wizbit/file.h>
int main()
{
{
struct wiz_file *file;
wiz_vref vref;
FILE *fp;
/*
Open up a new versioned file and create a couple
of revisions
*/
file = wiz_file_open(WIZ_FILE_NEW, 0, 0);
fp = wiz_file_get_handle(f... | #include <glib.h>
#include <glib/gstdio.h>
#include <uuid/uuid.h>
#include <wizbit/vref.h>
#include <wizbit/file.h>
int main()
{
{
wiz_vref_hexbuffer buffer;
struct wiz_file *file;
wiz_vref vref;
FILE *fp;
/*
Open up a new versioned file and create a couple
of revisions
*/
file = wiz_file_... | Print sha1 of last commit | Print sha1 of last commit
| C | lgpl-2.1 | wizbit-archive/wizbit,wizbit-archive/wizbit |
57f17473791703ac82add77c3d77d13d8e2dfbc4 | src/tests/test_utils/draw_call_perf_utils.h | src/tests/test_utils/draw_call_perf_utils.h | //
// Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// draw_call_perf_utils.h:
// Common utilities for performance tests that need to do a large amount of draw calls.
//
#ifndef TESTS_TEST_... | //
// Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// draw_call_perf_utils.h:
// Common utilities for performance tests that need to do a large amount of draw calls.
//
#ifndef TESTS_TEST_... | Fix angle_perftests compilation on Linux | Fix angle_perftests compilation on Linux
BUG=angleproject:1669
Change-Id: Iec4ed1be1e17d86a095d8c35bddc48aa85effa39
Reviewed-on: https://chromium-review.googlesource.com/424967
Reviewed-by: Yuly Novikov <36f5580f63d0a3eacc17e89a61d11e2f646630d2@chromium.org>
Commit-Queue: Yuly Novikov <36f5580f63d0a3eacc17e89a61d11e2... | C | bsd-3-clause | ecoal95/angle,MSOpenTech/angle,ppy/angle,ecoal95/angle,ppy/angle,ecoal95/angle,ecoal95/angle,MSOpenTech/angle,ecoal95/angle,ppy/angle,MSOpenTech/angle,MSOpenTech/angle,ppy/angle |
5b5828b74c758d7babffb2407464507fa004b157 | test/CodeGen/frame-pointer-elim.c | test/CodeGen/frame-pointer-elim.c | // RUN: %clang -ccc-host-triple i386 -S -o - %s | \
// RUN: FileCheck --check-prefix=DEFAULT %s
// DEFAULT: f0:
// DEFAULT: pushl %ebp
// DEFAULT: ret
// DEFAULT: f1:
// DEFAULT: pushl %ebp
// DEFAULT: ret
// RUN: %clang -ccc-host-triple i386 -S -o - -fomit-frame-pointer %s | \
// RUN: FileCheck --check-prefix=OMI... | // RUN: %clang -ccc-host-triple i386-apple-darwin -S -o - %s | \
// RUN: FileCheck --check-prefix=DARWIN %s
// DARWIN: f0:
// DARWIN: pushl %ebp
// DARWIN: ret
// DARWIN: f1:
// DARWIN: pushl %ebp
// DARWIN: ret
// RUN: %clang -ccc-host-triple i386-pc-linux-gnu -S -o - %s | \
// RUN: FileCheck --check-prefix=LINUX... | Fix test by fully specifying the platform. | Fix test by fully specifying the platform.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@124719 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
f5920cfe85c21bb1c928d4550c33a1bedf543913 | arc/arc/Model/Protocols/FileSystemObject.h | arc/arc/Model/Protocols/FileSystemObject.h | //
// FileSystemObject.h
// arc
//
// Created by Jerome Cheng on 1/4/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol FileSystemObject <NSObject>
@required
// The name of this object.
@property (strong, nonatomic) NSString *name;
// This should be able t... | //
// FileSystemObject.h
// arc
//
// Created by Jerome Cheng on 1/4/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol FileSystemObject <NSObject>
@required
// The name of this object.
@property (strong, nonatomic) NSString *name;
// This should be able t... | Make remove and initWithName:path:parent optional. | Make remove and initWithName:path:parent optional.
| C | mit | BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc |
6cc8fef4cbeb0b65d225d7b599c75eb5b40a6534 | fs/xfs/linux-2.6/xfs_ioctl32.h | fs/xfs/linux-2.6/xfs_ioctl32.h | /*
* Copyright (c) 2004-2005 Silicon Graphics, Inc.
* All Rights Reserved.
*
* 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.
*
* This program is distributed in the hope that it would be ... | /*
* Copyright (c) 2004-2005 Silicon Graphics, Inc.
* All Rights Reserved.
*
* 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.
*
* This program is distributed in the hope that it would be ... | Fix compiler warning from xfs_file_compat_invis_ioctl prototype. | [XFS] Fix compiler warning from xfs_file_compat_invis_ioctl prototype.
SGI-PV: 904196
SGI-Modid: xfs-linux-melb:xfs-kern:25509a
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@osdl.org>
Signed-off-by: Nathan Scott <e2e3f1f24cbc439f8c1ba9b08f9954237d64be64@sgi.com>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Program... |
2be509c97fdc2cfc6771d97f346ff5e4c5c85089 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.03.00-k2"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.03.00-k3"
| Update driver version to 5.03.00-k3 | [SCSI] qla4xxx: Update driver version to 5.03.00-k3
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_k... |
e4c467b78d3f1de71a2b4a71fcf057880b2a22cf | tensorflow/core/config/flag_defs.h | tensorflow/core/config/flag_defs.h | /* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Update the files referred to by the linter. | Update the files referred to by the linter.
PiperOrigin-RevId: 438129536
| C | apache-2.0 | gautam1858/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,Intel-tensorflow/tensor... |
792400bec383ab615bcf24d5bee3c1a4294f9e1f | include/core/SkMilestone.h | include/core/SkMilestone.h | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 81
#endif
| /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 82
#endif
| Update Skia milestone to 82 | Update Skia milestone to 82
Change-Id: Ifeaa877da83a42cceb04fe286bb2462190b249f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267762
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
| C | bsd-3-clause | aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_exter... |
28e721fd5907dd7807f35bccc48b177afdc2b2f9 | main.c | main.c | #include <stdio.h>
#include <stdlib.h>
#include "turing.h"
#define MAX_PROGRAM_LENGTH 32
int main() {
int status;
Turing *turing;
status = 0;
turing = init_turing();
status = execute_instruction(turing, "0 110\n1 110");
if (TURING_ERROR == status) {
fprintf(stderr, "Exiting\n");
... | #include <stdio.h>
#include <stdlib.h>
#include "turing.h"
#define MAX_PROGRAM_LENGTH 32
#define turing_try(statement) status = statement;\
if (TURING_ERROR == status) {\
return 1;\
}
int main()... | Add turing_try function for handling errors | Add turing_try function for handling errors
| C | mit | mindriot101/turing-machine |
1f1004a05c6c8a933a4c59c9d35c6cdf6d67a28b | the-blue-alliance-ios/TBAViewController.h | the-blue-alliance-ios/TBAViewController.h | //
// TBAViewController.h
// the-blue-alliance
//
// Created by Zach Orr on 4/28/16.
// Copyright © 2016 The Blue Alliance. All rights reserved.
//
#import <UIKit/UIKit.h>
@class TBAPersistenceController, TBARefreshViewController;
@interface TBAViewController : UIViewController
@property (nonnull, readonly) TBA... | //
// TBAViewController.h
// the-blue-alliance
//
// Created by Zach Orr on 4/28/16.
// Copyright © 2016 The Blue Alliance. All rights reserved.
//
#import <UIKit/UIKit.h>
@class TBAPersistenceController, TBARefreshViewController;
@interface TBAViewController : UIViewController
@property (nonnull, readonly) TBA... | Remove methods from TBAVC that we no longer want to expose publically | Remove methods from TBAVC that we no longer want to expose publically
| C | mit | the-blue-alliance/the-blue-alliance-ios,the-blue-alliance/the-blue-alliance-ios |
0b32bf8a2fb7ace1d48681a00445aaf446b3bc0b | support/c/idris_directory.h | support/c/idris_directory.h | #ifndef __IDRIS_DIRECTORY_H
#define __IDRIS_DIRECTORY_H
char* idris2_currentDirectory();
int idris2_changeDir(char* dir);
int idris2_createDir(char* dir);
void* idris2_openDir(char* dir);
void idris2_closeDIr(void* d);
int idris2_removeDir(char* path);
char* idris2_nextDirEntry(void* d);
#endif
| #ifndef __IDRIS_DIRECTORY_H
#define __IDRIS_DIRECTORY_H
char* idris2_currentDirectory();
int idris2_changeDir(char* dir);
int idris2_createDir(char* dir);
void* idris2_openDir(char* dir);
void idris2_closeDir(void* d);
int idris2_removeDir(char* path);
char* idris2_nextDirEntry(void* d);
#endif
| Fix forward declaration of idris_closeDir | Fix forward declaration of idris_closeDir
| C | bsd-3-clause | mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm,mmhelloworld/idris-jvm |
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... |
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 |
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 |
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 |
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 |
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... |
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 |
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 |
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 |
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 |
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... |
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 |
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 |
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... |
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... |
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 |
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.