commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
73e7f37d62c9e1ecbfba862effa1e5fd0d036f32 | esvg/lib/esvg_script_js_sm.c | esvg/lib/esvg_script_js_sm.c | /* Esvg - SVG
* Copyright (C) 2012 Jorge Luis Zapata
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*... | Add the spidermonkey prototype We need to generate the bindings dynamically at least for the properties until ender have support for real functions. On spidermonkey the objects are created using a class and a prototype, we need to figure out how to match an idl interface with such scheme. Then wrapping ender properties... | Add the spidermonkey prototype
We need to generate the bindings dynamically at least for the properties
until ender have support for real functions. On spidermonkey the objects
are created using a class and a prototype, we need to figure out how
to match an idl interface with such scheme. Then wrapping ender properties... | C | lgpl-2.1 | turran/egueb,turran/egueb,turran/egueb | |
f5166577a90e10c62d23623cb12d37cb8909872f | src/appc/schema/ac_name.h | src/appc/schema/ac_name.h | #pragma once
#include <regex>
#include "appc/schema/common.h"
namespace appc {
namespace schema {
const unsigned int max_ac_name_length = 512;
template<typename T>
struct ACName : StringType<T> {
explicit ACName<T>(const std::string& name)
: StringType<T>(name) {}
virtual Status validate() const {
if... | #pragma once
#include <regex>
#include "appc/schema/common.h"
namespace appc {
namespace schema {
const unsigned int max_ac_name_length = 512;
template<typename T>
struct ACName : StringType<T> {
explicit ACName<T>(const std::string& name)
: StringType<T>(name) {}
virtual Status validate() const {
if... | Fix for AC Name type adherence to rfc1123 | schema: Fix for AC Name type adherence to rfc1123
| C | apache-2.0 | cdaylward/libappc,cdaylward/libappc |
ce8dca20b8c364fa079330d41a0daff6a8842e0c | ir/be/test/mux.c | ir/be/test/mux.c |
int f(int a, int b) {
return a && b ? 11 : 42;
}
int x = 2, y = 3;
int main(void) {
int ret = 23 < f(x,y);
printf("%d\n", ret);
return ret;
}
| /*$ -march=pentium3 $*/
int f(int a, int b) {
return a && b ? 11 : 42;
}
int x = 2, y = 3;
int main(void) {
int ret = 23 < f(x,y);
printf("%d\n", ret);
return ret;
}
| Use march=pentium3 to use if-conv | Use march=pentium3 to use if-conv
[r21671]
| C | lgpl-2.1 | davidgiven/libfirm,jonashaag/libfirm,killbug2004/libfirm,killbug2004/libfirm,8l/libfirm,libfirm/libfirm,8l/libfirm,MatzeB/libfirm,8l/libfirm,libfirm/libfirm,MatzeB/libfirm,MatzeB/libfirm,8l/libfirm,davidgiven/libfirm,libfirm/libfirm,killbug2004/libfirm,davidgiven/libfirm,8l/libfirm,jonashaag/libfirm,MatzeB/libfirm,kill... |
4491b8b434bf56b9ec3008aae2c2f3564443faa4 | OctoKit/OCTDirectoryContent.h | OctoKit/OCTDirectoryContent.h | //
// OCTDirectoryContent.h
// OctoKit
//
// Created by Aron Cedercrantz on 14-07-2013.
// Copyright (c) 2013 GitHub. All rights reserved.
//
#import "OCTContent.h"
//{
// "type": "dir",
// "size": 0,
// "name": "octokit",
// "path": "lib/octokit",
// "sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9... | //
// OCTDirectoryContent.h
// OctoKit
//
// Created by Aron Cedercrantz on 14-07-2013.
// Copyright (c) 2013 GitHub. All rights reserved.
//
#import "OCTContent.h"
// A directory in a git repository.
@interface OCTDirectoryContent : OCTContent
@end
| Remove comment on JSON structure. | Remove comment on JSON structure.
- Not sure how I missed that while looking through the code… :)
Signed-off-by: Aron Cedercrantz <ce30127eefa07a02d568832e3de6952fb491981c@cedercrantz.se> | C | mit | daemonchen/octokit.objc,Acidburn0zzz/octokit.objc,GroundControl-Solutions/octokit.objc,Acidburn0zzz/octokit.objc,CHNLiPeng/octokit.objc,phatblat/octokit.objc,daukantas/octokit.objc,phatblat/octokit.objc,CleanShavenApps/octokit.objc,xantage/octokit.objc,yeahdongcn/octokit.objc,Palleas/octokit.objc,wrcj12138aaa/octokit.o... |
07ac2e2da98d79627823747273bb609a0d5ddbf3 | include/llvm/Linker/Linker.h | include/llvm/Linker/Linker.h | //===- Linker.h - Module Linker Interface -----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- Linker.h - Module Linker Interface -----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Use a function_ref now that it works (r221753). | Use a function_ref now that it works (r221753).
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@221756 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,... |
ea22520461e13c180f7e96144c7245a023e8e3f0 | network/server.h | network/server.h | /*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either vers... | /*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either vers... | Remove header declared but not defined | network: Remove header declared but not defined
| C | lgpl-2.1 | pstglia/external-bluetooth-bluez,ComputeCycles/bluez,pkarasev3/bluez,pkarasev3/bluez,ComputeCycles/bluez,mapfau/bluez,ComputeCycles/bluez,silent-snowman/bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,silent-snowman/bluez,pkaras... |
c3b3eaac75219682541c4a3100c692d9abae535b | ios/Exponent/Errors/EXLog.h | ios/Exponent/Errors/EXLog.h | // Copyright 2015-present 650 Industries. All rights reserved.
#import "RCTLog.h"
RCTLogFunction EXDefaultRCTLogFunction;
// EXFrame will use this when the manifest indicates we should enable developer debugging
// Kernel will use this when (DEBUG == 1)
RCTLogFunction EXDeveloperRCTLogFunction;
RCTLogFunction EXGet... | // Copyright 2015-present 650 Industries. All rights reserved.
#import "RCTLog.h"
extern RCTLogFunction EXDefaultRCTLogFunction;
// EXFrame will use this when the manifest indicates we should enable developer debugging
// Kernel will use this when (DEBUG == 1)
extern RCTLogFunction EXDeveloperRCTLogFunction;
extern... | Make the linker happy about these functions | Make the linker happy about these functions
fbshipit-source-id: 8476c5d
| C | bsd-3-clause | exponent/exponent,jolicloud/exponent,jolicloud/exponent,jolicloud/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,jolicloud/exponent,jolicloud/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,jolicloud/exponent,jolicloud/exponent... |
3b8af53b9903509b003c974c99d8284389dfb4dd | lily_value.h | lily_value.h | #ifndef LILY_VALUE_H
# define LILY_VALUE_H
# include "lily_syminfo.h"
lily_method_val *lily_try_new_method_val();
lily_object_val *lily_try_new_object_val();
lily_hash_val *lily_try_new_hash_val();
lily_hash_elem *lily_try_new_hash_elem();
void lily_deref_method_val(lily_method_val *);
void lily_deref_str_val(lily_s... | #ifndef LILY_VALUE_H
# define LILY_VALUE_H
# include "lily_syminfo.h"
lily_method_val *lily_try_new_method_val();
lily_object_val *lily_try_new_object_val();
lily_hash_val *lily_try_new_hash_val();
lily_hash_elem *lily_try_new_hash_elem();
void lily_deref_method_val(lily_method_val *);
void lily_deref_str_val(lily_s... | Remove lily_deref_list_val_by. This is a relic from the circle_buster era. | Remove lily_deref_list_val_by. This is a relic from the circle_buster era.
| C | mit | boardwalk/lily,boardwalk/lily,crasm/lily,crasm/lily,crasm/lily |
248440e14b763404fc4ef20e09cb236d8edac73f | ui/views/controls/button/menu_button_delegate.h | ui/views/controls/button/menu_button_delegate.h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_
#define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_
#pragma once
namespace gfx {
class ... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_
#define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_
#pragma once
#include "ui/views/vie... | Fix win builder by tagging MenuButtonDelegate with VIEWS_EXPORT. | views: Fix win builder by tagging MenuButtonDelegate with VIEWS_EXPORT.
BUG=117092
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9647003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@125656 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | axinging/chromium-crosswalk,hujiajie/pa-chromium,rogerwang/chromium,Chilledheart/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,ltilve/chromium,markYoungH/c... |
021acd29cee735d3c314445bfac588d3eec2e4f1 | src/lib/llist.h | src/lib/llist.h | #ifndef LLIST_H
#define LLIST_H
/* Doubly linked list */
#define DLLIST_PREPEND(list, item) STMT_START { \
(item)->prev = NULL; \
(item)->next = *(list); \
if (*(list) != NULL) (*(list))->prev = (item); \
*(list) = (item); \
} STMT_END
#define DLLIST_REMOVE(list, item) STMT_START { \
if ((item)->prev == NULL) \... | #ifndef LLIST_H
#define LLIST_H
/* Doubly linked list */
#define DLLIST_PREPEND(list, item) STMT_START { \
(item)->prev = NULL; \
(item)->next = *(list); \
if (*(list) != NULL) (*(list))->prev = (item); \
*(list) = (item); \
} STMT_END
#define DLLIST_REMOVE(list, item) STMT_START { \
if ((item)->prev == NULL) \... | Set removed item's prev/next pointers to NULL. | DLLIST_REMOVE(): Set removed item's prev/next pointers to NULL.
| C | mit | damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot |
1bf18c373e240b9a3f00e48084796a131171d19f | tests/addition_tests.c | tests/addition_tests.c | #include <stdlib.h>
#include <check.h>
#include "../src/roman_calculator.h"
void verify_addition(const char *left, const char *right, const char *expected_result) {
char *actual_result = roman_calculator_add(left, right);
ck_assert_msg(
strcmp(expected_result, actual_result) == 0,
"%s + %s: expected %s, but w... | #include <stdlib.h>
#include <check.h>
#include "../src/roman_calculator.h"
void verify_addition(const char *left, const char *right, const char *expected_result) {
char *actual_result = roman_calculator_add(left, right);
ck_assert_msg(
strcmp(expected_result, actual_result) == 0,
"%s + %s: expected %s, but w... | Add clarifying test about addition by concatenation | Add clarifying test about addition by concatenation
It doesn't just apply to repeating the same numeral.
| C | mit | greghaskins/roman-calculator.c |
db2ec1268a0a36527e74891e6da44c9f34e155e8 | mudlib/mud/home/System/lib/auto/second_auto.c | mudlib/mud/home/System/lib/auto/second_auto.c | #include <kotaka/privilege.h>
#include <kotaka/paths.h>
#include <kotaka/log.h>
#include <trace.h>
#include <type.h>
#include <status.h>
inherit "call_guard";
inherit "callout_guard";
inherit "touch";
inherit "object";
object objd_canary;
/**********/
/* status */
/**********/
nomask void _F_dummy()
{
}
| #include <kotaka/privilege.h>
#include <kotaka/paths.h>
#include <kotaka/log.h>
#include <trace.h>
#include <type.h>
#include <status.h>
inherit "call_guard";
inherit "callout_guard";
inherit "touch";
inherit "object";
object canary;
/**********/
/* status */
/**********/
void set_canary(object new_canary)
{
ACCE... | Allow objects to be tagged with canaries that can be destructed globally | Allow objects to be tagged with canaries that can be destructed globally
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
e18b9288fec1d60d1744e98b47dfabaf1cd816fc | libpkg/pkg_delete.c | libpkg/pkg_delete.c | #include <err.h>
#include <unistd.h>
#include "pkg.h"
int
pkg_delete(struct pkg *pkg, struct pkgdb *db, int force)
{
struct pkg **rdeps;
struct pkg_file **files;
if (pkg == NULL || db == NULL)
return (-1);
rdeps = pkg_rdeps(pkg);
files = pkg_files(pkg);
if (rdeps == NULL || files == NULL)
return (-1);
... | #include <string.h>
#include <err.h>
#include <unistd.h>
#include <sha256.h>
#include <sys/stat.h>
#include "pkg.h"
int
pkg_delete(struct pkg *pkg, struct pkgdb *db, int force)
{
struct pkg **rdeps;
struct pkg_file **files;
char sha256[65], *sha256_ptr;
struct stat st;
if (pkg == NULL || db == NULL)
return (-... | Check files sha256 when delete pkg | Check files sha256 when delete pkg
| C | bsd-2-clause | skoef/pkg,skoef/pkg,khorben/pkg,khorben/pkg,Open343/pkg,junovitch/pkg,Open343/pkg,khorben/pkg,junovitch/pkg,en90/pkg,en90/pkg |
dc8d77d0ff0d388cab96a78fe91f13e06c670fd9 | src/buffer.h | src/buffer.h | #ifndef BUFFER_H
#define BUFFER_H
#include <stdio.h>
struct Buffer {
char *buffer;
size_t size;
size_t head;
size_t len;
};
struct Buffer *new_buffer();
void free_buffer(struct Buffer *);
ssize_t buffer_recv(struct Buffer *, int, int);
ssize_t buffer_send(struct Buffer *, int, int);
ssize_t buffer_... | #ifndef BUFFER_H
#define BUFFER_H
#include <stdio.h>
struct Buffer {
char *buffer;
size_t size;
size_t head;
size_t len;
};
struct Buffer *new_buffer();
void free_buffer(struct Buffer *);
ssize_t buffer_recv(struct Buffer *, int, int);
ssize_t buffer_send(struct Buffer *, int, int);
ssize_t buffer_... | Use static for inline methods in headers | Use static for inline methods in headers
| C | bsd-2-clause | balyanrobin/sniproxy,txt3rob/sniproxy,0xa/sniproxy,balyanrobin/sniproxy,dlundquist/sniproxy,dlundquist/sniproxy,balyanrobin/sniproxy,txt3rob/sniproxy,balyanrobin/sniproxy,txt3rob/sniproxy,0xa/sniproxy,dlundquist/sniproxy,0xa/sniproxy,deeper-think/sniproxy,dlundquist/sniproxy,deeper-think/sniproxy,deeper-think/sniproxy,... |
1e30ca0b2926f671dec192f358b8739e63a450c2 | include/screenshot.h | include/screenshot.h | #ifndef SCREENSHOT_H_INCLUDED_
#define SCREENSHOT_H_INCLUDED_
#include <vector>
#include <string>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/X.h>
using namespace std;
class X11Screenshot {
public:
X11Screenshot(XImage * image);
bool save_to_png(const char * path);
bool save_... | #ifndef SCREENSHOT_H_INCLUDED_
#define SCREENSHOT_H_INCLUDED_
#include <vector>
#include <string>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/X.h>
using namespace std;
class X11Screenshot {
public:
X11Screenshot(XImage * image, int new_width=0, int new_height=0, string downscale_type="linera... | Change X11Screenshot structure, add downscale options | Change X11Screenshot structure, add downscale options
| C | mit | Butataki/cpp-x11-make-screenshot |
0356aa6bb3f791e5fee71ebfc4e9509f4a2e550d | ios/Exponent/Versioned/Core/Api/Cognito/RNAWSCognito.h | ios/Exponent/Versioned/Core/Api/Cognito/RNAWSCognito.h | #if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#if __has_include("RCTLog.h")
#import "RCTLog.h"
#else
#import <React/RCTLog.h>
#endif
#if __has_include("RCTUtils.h")
#import "RCTUtils.h"
#else
#import <React/RCTUtils.h>
#endif
#import "JKBigInteger.h... | #if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#if __has_include("RCTLog.h")
#import "RCTLog.h"
#else
#import <React/RCTLog.h>
#endif
#if __has_include("RCTUtils.h")
#import "RCTUtils.h"
#else
#import <React/RCTUtils.h>
#endif
#import <JKBigInteger.h... | Fix Cognito BigInteger import for versioning | Fix Cognito BigInteger import for versioning
fbshipit-source-id: ae0433a
| C | bsd-3-clause | exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponent/expon... |
decd02a67002542282474f527030e168725e5dbc | PWGCF/PWGCFESELinkDef.h | PWGCF/PWGCFESELinkDef.h | #pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliAnalysisTaskFemtoESE+;
#pragma link C++ class AliFemtoESEBasicParticle+;
| Add Event-Shape-Engineering code for Femtoscopy | Add Event-Shape-Engineering code for Femtoscopy
| C | bsd-3-clause | pbuehler/AliPhysics,pbuehler/AliPhysics,AMechler/AliPhysics,fcolamar/AliPhysics,pchrista/AliPhysics,kreisl/AliPhysics,pchrista/AliPhysics,preghenella/AliPhysics,ALICEHLT/AliPhysics,mvala/AliPhysics,hzanoli/AliPhysics,preghenella/AliPhysics,aaniin/AliPhysics,btrzecia/AliPhysics,dlodato/AliPhysics,dlodato/AliPhysics,lfel... | |
d00df20f3ab2dfe40e7c551582b100ea307e8fff | libc/sysdeps/linux/common/remap_file_pages.c | libc/sysdeps/linux/common/remap_file_pages.c | /*
* remap_file_pages() for uClibc
*
* Copyright (C) 2008 Will Newton <will.newton@imgtec.com>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <sys/syscall.h>
#ifdef __NR_remap_file_pages
_syscall5(int, remap_file_pages, unsigned long, start, unsigned long, size,
unsi... | Add rempa_file_pages function by Will Newton <will.newton@imgtec.com> | Add rempa_file_pages function by Will Newton <will.newton@imgtec.com>
| C | lgpl-2.1 | foss-for-synopsys-dwc-arc-processors/uClibc,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,m-labs/uclibc-lm32,waweber/uclibc-clang,brgl/uclibc-ng,kraj/uClibc,kraj/uclibc-ng,ffainelli/uClibc,atgreen/uClibc-moxie,foss-xtensa/uClibc,ysat0/uClibc,hjl-tools/uClibc,brgl/uclibc-ng,kraj/uClibc,me... | |
b81e65b9c6579e02684f0b313060b17d7ba669ef | src/include/xmmsclient/xmmsclient++/detail/superlist.h | src/include/xmmsclient/xmmsclient++/detail/superlist.h | #ifndef XMMSCLIENTPP_SUPERLIST_H
#define XMMSCLIENTPP_SUPERLIST_H
#include <xmmsclient/xmmsclient.h>
namespace Xmms
{
namespace Detail
{
class SuperList
{
public:
SuperList( xmmsc_result_t* result );
SuperList( const SuperList& list );
virtual SuperList& operator=( const SuperList& list );
... | #ifndef XMMSCLIENTPP_SUPERLIST_H
#define XMMSCLIENTPP_SUPERLIST_H
#include <xmmsclient/xmmsclient.h>
namespace Xmms
{
namespace Detail
{
class SuperList
{
public:
SuperList( xmmsc_result_t* result );
SuperList( const SuperList& list );
virtual SuperList& operator=( const SuperList& list );
... | Remove obsolete *_foreach function completely (Function declarations were still there). | OTHER: Remove obsolete *_foreach function completely (Function declarations were still there).
| C | lgpl-2.1 | oneman/xmms2-oneman,theefer/xmms2,krad-radio/xmms2-krad,krad-radio/xmms2-krad,oneman/xmms2-oneman-old,oneman/xmms2-oneman,krad-radio/xmms2-krad,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,chrippa/xmms2,dreamerc/xmms2,oneman/xmms2-oneman,six600110/xmms2,oneman/xmms2-oneman,xmms2/xmms2-stable,chrippa/xmms... |
6bd8aa8399baa16f171219368543c1a4fa88663e | test/FrontendC/2007-06-05-NoInlineAttribute.c | test/FrontendC/2007-06-05-NoInlineAttribute.c | // RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.noinline
static int bar(int x, int y) __attribute__((noinline));
static int bar(int x, int y)
{
return x + y;
}
int foo(int a, int b) {
return bar(b, a);
}
| // RUN: %llvmgcc -O2 -c -emit-llvm %s -o - | llvm-dis | grep call
static int bar(int x, int y) __attribute__((noinline));
static int bar(int x, int y)
{
return x + y;
}
int foo(int a, int b) {
return bar(b, a);
}
| Update test to check call instruction. | Update test to check call instruction.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@55702 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llv... |
a11f0a4469ec047cecd9b91a23680c7b48fb268a | tests/regression/22-partitioned_arrays/17-large_arrays.c | tests/regression/22-partitioned_arrays/17-large_arrays.c | // PARAM: --enable ana.int.interval --enable exp.partition-arrays.enabled
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <stddef.h>
// Test to check whether partitioned arrays can have an index expression evaluating to values largers than the max value of int64
#define LENGTH ... | Add test with very large arrays where partitioned array is unsound | Add test with very large arrays where partitioned array is unsound
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
78f00d293967fb8f8ce045137a5980a2e55b7de5 | SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugToolConsole.h | SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugToolConsole.h | //
// SDLDebugToolConsole.h
// SmartDeviceLink-iOS
//
// Created by Joel Fischer on 3/12/15.
// Copyright (c) 2015 smartdevicelink. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol SDLDebugToolConsole <NSObject>
@required
- (void)logInfo:(NSString *)info;
@end
| //
// SDLDebugToolConsole.h
// SmartDeviceLink-iOS
#import <Foundation/Foundation.h>
@protocol SDLDebugToolConsole <NSObject>
@required
- (void)logInfo:(NSString *)info;
@end
| Remove copyright from new file | Remove copyright from new file
| C | bsd-3-clause | FordDev/sdl_ios,kshala-ford/sdl_ios,smartdevicelink/sdl_ios,adein/sdl_ios,kshala-ford/sdl_ios,FordDev/sdl_ios,davidswi/sdl_ios,adein/sdl_ios,smartdevicelink/sdl_ios,APCVSRepo/sdl_ios,APCVSRepo/sdl_ios,kshala-ford/sdl_ios,kshala-ford/sdl_ios,davidswi/sdl_ios,kshala-ford/sdl_ios,davidswi/sdl_ios,smartdevicelink/sdl_ios,F... |
e9f091d7cd6eeccb0c1b84226a8543dc8a3d285a | samplecode/GMSampleView.h | samplecode/GMSampleView.h |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GMSampleView_DEFINED
#define GMSampleView_DEFINED
#include "SampleCode.h"
#include "gm.h"
class GMSampleView : public SampleView {
private:
typedef skiagm::GM ... |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GMSampleView_DEFINED
#define GMSampleView_DEFINED
#include "SampleCode.h"
#include "gm.h"
class GMSampleView : public SampleView {
private:
typedef skiagm::GM ... | Use : as separator between "GM" and slide name in SampleApp. This makes it easier to jump to a GM slide using command line args on windows. | Use : as separator between "GM" and slide name in SampleApp. This makes it easier to jump to a GM slide using command line args on windows.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2846 2bbb7eff-a529-9590-31e7-b0007b416f81
| C | bsd-3-clause | Pure-Aosp/android_external_skia,F-AOSP/platform_external_skia,geekboxzone/lollipop_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,F-AOSP/platform_external_skia,AOSPA-L/android_external_skia,tmpvar/skia.cc,RadonX-ROM/external_skia,larsbergstrom/sk... |
26b39b539a4fd863cad9f1732466fcdc331d3cd6 | jets/c/xeb.c | jets/c/xeb.c | /* j/3/xeb.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3qc_xeb(u3_atom a)
{
mpz_t a_mp;
if ( __(u3a_is_dog(a)) ) {
u3r_mp(a_mp, a);
size_t log = mpz_sizeinbase(a_mp, 2);
mpz_t b_mp;
mpz_init_set_ui(b_mp, log);
return u3i_mp(b_mp);
}
else {
mpz_init_set_... | /* j/3/xeb.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3qc_xeb(u3_atom a)
{
mpz_t a_mp;
if ( __(u3a_is_dog(a)) ) {
u3r_mp(a_mp, a);
c3_d x = mpz_sizeinbase(a_mp, 2);
mpz_t b_mp;
mpz_init_set_ui(b_mp, x);
return u3i_mp(b_mp);
}
else {
mpz_init_set_ui(a_m... | Use urbit types instead of size_t | Use urbit types instead of size_t
| C | mit | rsaarelm/urbit,dphiffer/urbit,Gunga/urbit,yebyen/urbit,jpt4/urbit,dphiffer/urbit,Gunga/urbit,galenwp/urbit,chc4/urbit,bvschwartz/urbit,daveloyall/urbit,rsaarelm/urbit,galenwp/urbit,jpt4/urbit,chc4/urbit,jpt4/urbit,rsaarelm/urbit,galenwp/urbit,dphiffer/urbit,dphiffer/urbit,jpt4/urbit,daveloyall/urbit,burtonsamograd/urbi... |
a603af5280511d2c0af42bdbb3800bffacfd7e9a | solutions/uri/1036/1036.c | solutions/uri/1036/1036.c | #include <math.h>
#include <stdio.h>
int main() {
double a, b, c, delta;
scanf("%lf %lf %lf", &a, &b, &c);
delta = (b * b) - 4 * a * c;
if (delta >= 0 && a != 0) {
printf("R1 = %.5lf\n", ((b * -1) + sqrt(delta)) / (2 * a));
printf("R2 = %.5lf\n", ((b * -1) - sqrt(delta)) / (2 * a));
... | Solve Bhaskara's Formula in c | Solve Bhaskara's Formula in c
| C | mit | deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr... | |
2a8c9a3aa4d28232e294877316f4a11bbc03ee7e | cpumap.c | cpumap.c | #ifdef GUADALUPE_SPREAD
int cpumap(int i, int nprocs)
{
return (i / 36) * 36 + (i % 2) * 18 + (i % 36 / 2);
}
#elif GUADALUPE_MIC_COMPACT
int cpumap(int i, int nprocs)
{
return (i + 1) % 228;
}
#else
int cpumap(int id, int nprocs)
{
return id % nprocs;
}
#endif
| #ifdef GUADALUPE_SPREAD
int cpumap(int i, int nprocs)
{
return (i / 36) * 36 + (i % 2) * 18 + (i % 36 / 2);
}
#elif GUADALUPE_MIC_COMPACT
int cpumap(int i, int nprocs)
{
return (i + 1) % 228;
}
#elif BIOU_COMPACT
int cpumap(int i, int nprocs)
{
return (i % 4) * 32 + i / 4;
}
#else
int cpumap(int id, int np... | Add compact allocation on BioU. | Add compact allocation on BioU.
| C | mit | chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue |
a3fbe1fe3afa3aa51b2a6e95589f9834963724ad | include/scratch/bits/type-traits/is-contiguous-iterator.h | include/scratch/bits/type-traits/is-contiguous-iterator.h | #pragma once
#include "scratch/bits/type-traits/is-foo.h"
namespace scratch {
template<class It> struct is_contiguous_iterator : is_pointer<It> {};
template<class It> inline constexpr bool is_contiguous_iterator_v = is_contiguous_iterator<It>::value;
} // namespace scratch
| Implement `is_contiguous_iterator_v<It>`, for metaprogramming purposes. | Implement `is_contiguous_iterator_v<It>`, for metaprogramming purposes.
This trait is being proposed for standardization; see for example N4183.
You'd expect to see a `contiguous_iterator_tag` derived from
`random_access_iterator_tag` in "iterator-tags.h", but for some reason
the Committee hasn't been quick to adopt t... | C | mit | Quuxplusone/from-scratch,Quuxplusone/from-scratch,Quuxplusone/from-scratch | |
9fbdd2eecf2ae92ba076266e3dce6983604dd94a | stm8/src/main.c | stm8/src/main.c | #include <stdint.h>
#include "stm8s208s.h"
void main(void)
{
MEMLOC(CLK_CKDIVR) = 0x00; /* Set the frequency to 16 MHz */
BITSET(CLK_PCKENR1, 7); /* Enable clk to TIM1 */
// Configure timer
// 250 ticks per second
MEMLOC(TIM1_PSCRH) = (64000>>8);
MEMLOC(TIM1_PSCRL) = (uint8_t)(64000 & 0xff);
... | #include <stdint.h>
#include "stm8s208s.h"
void main(void)
{
MEMLOC(CLK_CKDIVR) = 0x00; /* Set the frequency to 16 MHz */
BITSET(CLK_PCKENR1, 7); /* Enable clk to TIM1 */
// Configure timer
// 250 ticks per second
MEMLOC(TIM1_PSCRH) = (64000>>8);
MEMLOC(TIM1_PSCRL) = (uint8_t)(64000 & 0xff);
... | Fix stupid led toggle bug | Fix stupid led toggle bug
| C | bsd-3-clause | spoorcc/docker_embedded,spoorcc/docker_embedded |
9a48079c346bbd54cd48b1a1c091e74ec4535dcd | Sources/TypedKey.h | Sources/TypedKey.h | //
// TypedKey.h
// TypedKey
//
// Created by 전수열 on 1/28/16.
// Copyright © 2016 Suyeol Jeon. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for TypedKey.
FOUNDATION_EXPORT double TypedKeyVersionNumber;
//! Project version string for TypedKey.
FOUNDATION_EXPORT const unsigned char Ty... | // The MIT License (MIT)
//
// Copyright (c) 2016 Suyeol Jeon (xoul.kr)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// t... | Add platform check preprocessor conditions | Add platform check preprocessor conditions
| C | mit | devxoul/TypedKey,devxoul/TypedKey |
9ac14d7ea9468fd480cfd5375242b4101ef37441 | src/lib-dict/dict-register.c | src/lib-dict/dict-register.c | /* Copyright (c) 2013-2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "dict-private.h"
void dict_drivers_register_builtin(void)
{
dict_driver_register(&dict_driver_client);
dict_driver_register(&dict_driver_file);
dict_driver_register(&dict_driver_fs);
dict_driver_register(&dict_d... | /* Copyright (c) 2013-2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "dict-private.h"
static int refcount = 0;
void dict_drivers_register_builtin(void)
{
if (refcount++ > 0)
return;
dict_driver_register(&dict_driver_client);
dict_driver_register(&dict_driver_file);
dict_driver... | Allow registering builtin dict drivers multiple times. | lib-dict: Allow registering builtin dict drivers multiple times.
| C | mit | dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot |
2a5122b4a008ee247f58a654e4881aa555d82742 | libfwupd/fwupd-client-private.h | libfwupd/fwupd-client-private.h | /*
* Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fwupd-client.h"
#ifdef HAVE_GIO_UNIX
#include <gio/gunixinputstream.h>
#endif
#ifdef HAVE_GIO_UNIX
void fwupd_client_get_details_stream_async (FwupdClient *self,
GUnixInputStre... | /*
* Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fwupd-client.h"
#ifdef HAVE_GIO_UNIX
#include <gio/gunixinputstream.h>
#endif
void fwupd_client_download_bytes2_async (FwupdClient *self,
GPtrArray *urls,
FwupdClientDo... | Fix a warning when compiling on Windows | trivial: Fix a warning when compiling on Windows
Move the function prototype out of the GUnixInputStream-using ones.
| C | lgpl-2.1 | hughsie/fwupd,hughsie/fwupd,fwupd/fwupd,hughsie/fwupd,hughsie/fwupd,fwupd/fwupd,fwupd/fwupd,fwupd/fwupd |
f3c3bd81d88f084b9f60e7ef024335511430f022 | src/http/mimetypes.h | src/http/mimetypes.h | #ifndef APIMOCK_MIMETYPES_H
#define APIMOCK_MIMETYPES_H
#include <unordered_map>
namespace ApiMock {
class Mime {
public:
std::string GetMimeByFileName(const std::string& filename) {
static const std::unordered_map<std::string, std::string> MIME_TYPES{
{ ".css", "text/css" },
{ ".html", "text/html" ... | Add some simple mime types | Add some simple mime types
It doesn't really resolve the type right now, but eh..
| C | mit | Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock | |
e51422c402e64a6360735b72fcb482d06b94eeb1 | src/modules/health.c | src/modules/health.c | #include "health.h"
static bool s_health_available;
static void health_handler(HealthEventType event, void *context) {
main_window_update_ui();
}
void health_init() {
s_health_available = health_service_events_subscribe(health_handler, NULL);
if(!s_health_available) {
APP_LOG(APP_LOG_LEVEL_ERROR, "Health n... | #include "health.h"
static bool s_health_available;
static void health_handler(HealthEventType event, void *context) {
main_window_update_ui();
}
void health_init() {
s_health_available = health_service_events_subscribe(health_handler, NULL);
if(!s_health_available) {
APP_LOG(APP_LOG_LEVEL_ERROR, "Health n... | Add accessible check to sum read | Add accessible check to sum read
| C | mit | pebble-examples/simple-health-example,pebble-examples/simple-health-example,pebble-examples/simple-health-example |
1f2f54dda3340c825bcf25d1fa31f89e31a393ee | include/lll/lll_unittest.h | include/lll/lll_unittest.h | #ifndef __LLL_UNITTEST_H__
#define __LLL_UNITTEST_H__
/***********************************************************************
* Low Latency Library: Test framwork
*
* Released under the MIT license. The LICENSE file should be included
* in the top level of the source tree
*****************************************... | Add missing unittest header file | Add missing unittest header file
| C | mit | screaminprogramming/lll | |
5e311be4baf9b155b7d2fcf9d6da932be8214549 | 3rdParty/snappy/google-snappy-d53de18/build-tests/__builtin_expect.c | 3rdParty/snappy/google-snappy-d53de18/build-tests/__builtin_expect.c | /*
* build-tests/__builtin_expect.c
*
* test if the compiler has __builtin_expect().
*/
int main(void) {
return __builtin_expect(1, 1) ? 1 : 0;
}
| Add missing test source file. | Add missing test source file.
| C | apache-2.0 | joerg84/arangodb,graetzer/arangodb,baslr/ArangoDB,m0ppers/arangodb,graetzer/arangodb,m0ppers/arangodb,baslr/ArangoDB,Simran-B/arangodb,m0ppers/arangodb,m0ppers/arangodb,wiltonlazary/arangodb,Simran-B/arangodb,wiltonlazary/arangodb,joerg84/arangodb,wiltonlazary/arangodb,graetzer/arangodb,baslr/ArangoDB,wiltonlazary/aran... | |
a5f8b0c02ea53a5f99671eff071a76d68d117a2e | tools/hardware.h | tools/hardware.h | #ifndef _HARDWARE_H_
#define _HARDWARE_H_
#include <stdint.h>
// For disk/drive status
#define HW_NODRIVE 0
#define HW_NODISK 1
#define HW_HAVEDISK 2
// Drive geometry
#define HW_MAXHEADS 2
#define HW_MAXTRACKS 80
#define HW_NORMALSTEPPING 1
#define HW_DOUBLESTEPPING 2
extern int hw_currenttrack;
extern int hw_cur... | #ifndef _HARDWARE_H_
#define _HARDWARE_H_
#include <stdint.h>
// For disk/drive status
#define HW_NODRIVE 0
#define HW_NODISK 1
#define HW_HAVEDISK 2
// Drive geometry
#define HW_MAXHEADS 2
#define HW_MAXTRACKS 80
#define HW_NORMALSTEPPING 1
#define HW_DOUBLESTEPPING 2
extern int hw_currenttrack;
extern int hw_cur... | Add externs for the functions used | Add externs for the functions used
| C | mit | picosonic/bbc-fdc,picosonic/bbc-fdc |
2841d9e60e46d27c353e0f888d2b18c13dee142c | tests/regression/27-inv_invariants/05-interval-arith.c | tests/regression/27-inv_invariants/05-interval-arith.c | // PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums
#include <assert.h>
#include <stdio.h>
int main(){
unsigned int i = 3;
// 3 * 2^30 == 3221225472u is outside of the range that Intervall32 can represent
// Therefore, when trying to refine i, Base.invariant meets i -> [3... | Add test case for multiplication in conditions with Interval32. | Add test case for multiplication in conditions with Interval32.
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
cd13a6438f8422822ab170cd90ecb67845e41e24 | include/stdarg.h | include/stdarg.h | /* $Id$ */
/* Copyright (c) 2007 The DeforaOS Project */
#ifndef LIBC_STDARG_H
# define LIBC_STDARG_H
/* types */
# ifndef va_list
# define va_list va_list
typedef void * va_list;
# endif
/* macros */
# if defined(__i386__)
# define va_start(ap, arg) (ap) = ((char*)&arg) + 4
# define va_arg(ap, type) ((ap) +=... | /* $Id$ */
/* Copyright (c) 2007 The DeforaOS Project */
#ifndef LIBC_STDARG_H
# define LIBC_STDARG_H
/* types */
# ifndef va_list
# define va_list va_list
typedef void * va_list;
# endif
/* macros */
# if defined(__i386__)
# define va_start(ap, arg) (ap) = ((char*)&arg) + 4
# define va_arg(ap, type) ((ap) +=... | Use GCC's builtins to implement va_list on sparc64 for now | Use GCC's builtins to implement va_list on sparc64 for now
| C | bsd-2-clause | DeforaOS/libc,DeforaOS/libc |
433c6dbc94b204e94b3c3391cc00b8e6ae71108d | src/lib/soft-fp/udivdi3.c | src/lib/soft-fp/udivdi3.c | /**
* @file
*
* @brief
*
* @date 16.05.2012
* @author Anton Bondarev
*/
#include <types.h>
uint64_t __udivdi3(uint64_t num, uint64_t den) {
uint64_t result = 0;
int steps;
int i;
if (0 == den) {
return 0;
}
while (0x8000000000000000 != (den & 0x8000000000000000)) {
den <<= 1;
steps++;
}
for (i =... | /**
* @file
* @brief
*
* @date 16.05.2012
* @author Anton Bondarev
*/
#include <types.h>
uint64_t __udivdi3(uint64_t num, uint64_t den) {
uint64_t result = 0;
int steps = 0;
int i;
if (0 == den) {
return 0;
}
while (0x8000000000000000 != (den & 0x8000000000000000)) {
den <<= 1;
steps++;
}
for (i... | Fix build error (maybe-uninitialized variable) | Fix build error (maybe-uninitialized variable) | C | bsd-2-clause | Kefir0192/embox,mike2390/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,abusalimov/embox,Kefir0192/embox,mike2390/embox,embox/embox,Kefir0192/embox,embox/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,abusalimov/embox,Kakadu/embox,vrxfile/embox-trik,abusalimov/embox,Kakadu/embox,gzoom13/embox,Kefir0192/em... |
5bc24913bf500b2cb1ba547a12c67f7ba3064ecc | evmjit/libevmjit/Common.h | evmjit/libevmjit/Common.h | #pragma once
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
namespace dev
{
namespace eth
{
namespace jit
{
using byte = uint8_t;
using bytes = std::vector<byte>;
using u256 = boost::multiprecision::uint256_t;
using bigint = boost::multiprecision::cpp_int;
struct NoteChannel {}; // FIXME: Use some lo... | #pragma once
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
namespace dev
{
namespace eth
{
namespace jit
{
using byte = uint8_t;
using bytes = std::vector<byte>;
using u256 = boost::multiprecision::uint256_t;
using bigint = boost::multiprecision::cpp_int;
struct NoteChannel {}; // FIXME: Use some lo... | Fix some GCC initialization warnings | Fix some GCC initialization warnings
| C | mit | eco/cpp-ethereum,ethers/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,programonauta/webthree-umbrella,smartbitcoin/cpp-ethereum,xeddmc/cpp-ethereum,d-das/cpp-ethereum,anthony-cros/cpp-ethereum,d-das/cpp-ethereum,ethers/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,PaulGrey30/go-g... |
c3f8f27d6f50022cfdf8c77e1a9d483dc9385209 | ext/krypt/core/krypt-os.h | ext/krypt/core/krypt-os.h | /*
* krypt-core API - C version
*
* Copyright (C) 2011
* Hiroshi Nakamura <nahi@ruby-lang.org>
* Martin Bosslet <martin.bosslet@googlemail.com>
* All rights reserved.
*
* This software is distributed under the same license as Ruby.
* See the file 'LICENSE' for further details.
*/
#if !defined(_KRYPT_OS_H_)
#define _KR... | /*
* krypt-core API - C version
*
* Copyright (C) 2011
* Hiroshi Nakamura <nahi@ruby-lang.org>
* Martin Bosslet <martin.bosslet@googlemail.com>
* All rights reserved.
*
* This software is distributed under the same license as Ruby.
* See the file 'LICENSE' for further details.
*/
#if !defined(_KRYPT_OS_H_)
#define _KR... | Use _WIN32 macro instead of WIN32 | Use _WIN32 macro instead of WIN32
_WIN32 is the official macro described in MSDN:
http://msdn.microsoft.com/en-us/library/b0084kay.aspx
(under Microsoft-Specific Predefined Macros)
| C | mit | emboss/krypt-core-c,emboss/krypt-core-c |
a76299e7c2f435bb5f4fe58b2a19d18892774774 | src/boardValue.h | src/boardValue.h | #ifndef __BOARDVALUE
#define __BOARDVALUE
#include "playerValue.h"
enum BoardPieceValue {Empty, O, X};
class BoardValue
{
public:
BoardValue(BoardPieceValue boardPieceValue)
{
set(boardPieceValue);
}
friend bool operator== (const BoardValue & left, const BoardValue & right)
{
return left.bo... | #ifndef __BOARDVALUE
#define __BOARDVALUE
enum BoardValue {Empty, O, X};
#endif | Revert "Started work to board value class" | Revert "Started work to board value class"
This reverts commit ee19a31e31a15b020acce6e0200489a144858427.
| C | mit | davidjpfeiffer/tic-tac-toe,davidjpfeiffer/tic-tac-toe |
b393a83d380d460542b816c35873f6e5eaabb395 | example/ex11-json-net.c | example/ex11-json-net.c | // Based on https://github.com/nanopb/nanopb/blob/master/examples/simple/simple.c
#include <stdio.h>
#include "m-serial-json.h"
#include "m-tuple.h"
#include "m-string.h"
// Define a structure with one field
TUPLE_DEF2(SimpleMessage,
(lucky_number, int))
int main(void)
{
string_t buffer;
m_serial_retu... | Add example of JSON serialization on string | Add example of JSON serialization on string
| C | bsd-2-clause | P-p-H-d/mlib,P-p-H-d/mlib | |
d4364ca4cd57432f26739fce61e2c4efb463813c | tests/test_numbers.c | tests/test_numbers.c | int main(int argc, char const *argv[])
{
GOOD = {
0,
0.0l,
.0,
0.f,
0UL,
0x0ull,
7e5,
7.3,
7.3E+5,
7.E+5,
.3E+5f,
7.3+5,
7.3+E,
0x73e5f,
0x7.3p5f,
0x7.3p-5f,
0x7p5f,
029e3l,
2,
256,
0.015625,
0.857421875,
0x1p-1074,
3.1415926,
0.1,
0x3.334p-5,
0xcc.cdp-11,
};
B... | Add a .c file to test syntax highlighting on | numbers: Add a .c file to test syntax highlighting on
| C | mit | abusalimov/SublimeCImproved,abusalimov/SublimeCImproved | |
07c874a9c35c14c0eecae6028a42ad0cb8deed33 | Source/PKMacros.h | Source/PKMacros.h | //
// PKMacros.h
// PKToolBox
//
// Created by Pavel Kunc on 17/07/2013.
// Copyright (c) 2013 PKToolBox. All rights reserved.
//
#define PK_NIL_IF_NULL(obj) ((obj == [NSNull null]) ? nil : obj)
#define PK_NULL_IF_NIL(obj) ((obj == nil) ? [NSNull null] : obj)
#define PK_BOOL_TO_LOCALIZED_STRING(val) ((val == YES)... | //
// PKMacros.h
// PKToolBox
//
// Created by Pavel Kunc on 17/07/2013.
// Copyright (c) 2013 PKToolBox. All rights reserved.
//
#define PK_NIL_IF_NULL(obj) ((obj == [NSNull null]) ? nil : obj)
#define PK_NULL_IF_NIL(obj) ((obj == nil) ? [NSNull null] : obj)
#define PK_BOOL_TO_LOCALIZED_STRING(val) ((val == YES)... | Add new macro to detect iOS7. | Add new macro to detect iOS7.
| C | mit | prajput/pkCode,pk/pktoolbox,prajput/pkCode,pk/pktoolbox |
e033589512c3dc34d8c8da6fc9d4a4e7781b7e15 | test/simple-count.c | test/simple-count.c |
#include <stdlib.h>
#include "sphia-test.h"
#define EXPECTED_TEST_KEYS 1234
static void
test_count() {
for (int i = 0; i < EXPECTED_TEST_KEYS; i++) {
char *key = malloc(16);
if (NULL == key) {
fprintf(stderr, "Malloc error\n");
exit(1);
}
sprintf(key, "key%03d", i);
assert(0 == sphi... | Add a simple test for sphia_count | Add a simple test for sphia_count
Just sets a significantly large number of key/value paris, then
counts them.
| C | mit | sphia/sphia,sphia/sphia,sphia/sphia | |
3da36e955294401bfbbf0294cfda591539b16aad | tests/regression/31-ikind-aware-ints/13-intervals-large.c | tests/regression/31-ikind-aware-ints/13-intervals-large.c | //PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums --set ana.octapron.no_signed_overflow false
#include <assert.h>
int main(){
int a = 0;
// maximum value for ulonglong
unsigned long long x = 18446744073709551615ull;
if(x > 18446744073709551612ull){
a = 1;
... | //PARAM: --enable ana.int.interval --disable ana.int.def_exc --disable ana.int.enums --set ana.octapron.no_signed_overflow false
#include <assert.h>
int main(){
int a = 0;
// maximum value for ulonglong
unsigned long long x = 18446744073709551615ull;
if(x > 18446744073709551612ull){
a = 1;
... | Remove unknown from completed assert in 31/13 | Remove unknown from completed assert in 31/13
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
57ea911da1669b0133aafad1a2d260d57b0c365b | tests/regression/35-int-refinements/interval-congruence.c | tests/regression/35-int-refinements/interval-congruence.c | // PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence
#include <assert.h>
int main(){
int r = -103;
for (int i = 0; i < 40; i++) {
r = r + 5;
}
// At this point r in the congr. dom should be 2 + 5Z
int k = r;
if (k >= 3) {
// After refinement ... | Add (deactivated) refinement test for interval/congruence domain | Add (deactivated) refinement test for interval/congruence domain
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
42e9dfcb1f446e22e566195b7cfcbb8518e20980 | examples/sensors/main.c | examples/sensors/main.c | #include <isl29035.h>
#include <stdio.h>
#include <stdbool.h>
#include <timer.h>
#include <tmp006.h>
void print_intensity(int intensity) {
printf("Intensity: %d\n", intensity);
}
void intensity_cb(int intensity, int unused1, int unused2, void* ud) {
print_intensity(intensity);
}
void temp_callback(int temp_value... | #include <isl29035.h>
#include <stdio.h>
#include <stdbool.h>
#include <timer.h>
#include <tmp006.h>
void print_intensity(int intensity) {
printf("Intensity: %d\n", intensity);
}
void intensity_cb(int intensity, int unused1, int unused2, void* ud) {
print_intensity(intensity);
}
void temp_callback(int temp_value... | Add isl29035 to Imix board | Add isl29035 to Imix board
| C | apache-2.0 | tock/libtock-c,tock/libtock-c,tock/libtock-c |
550c68cade0cda14cbdf3f05a9d074486da4aa04 | ext/mysql2/mysql2_ext.h | ext/mysql2/mysql2_ext.h | #ifndef MYSQL2_EXT
#define MYSQL2_EXT
#include <ruby.h>
#include <fcntl.h>
#ifdef HAVE_MYSQL_H
#include <mysql.h>
#include <mysql_com.h>
#include <errmsg.h>
#include <mysqld_error.h>
#else
#include <mysql/mysql.h>
#include <mysql/mysql_com.h>
#include <mysql/errmsg.h>
#include <mysql/mysqld_error.h>
#endif
#ifdef HA... | #ifndef MYSQL2_EXT
#define MYSQL2_EXT
#include <ruby.h>
#include <fcntl.h>
#ifndef HAVE_UINT
#define HAVE_UINT
typedef unsigned short ushort;
typedef unsigned int uint;
#endif
#ifdef HAVE_MYSQL_H
#include <mysql.h>
#include <mysql_com.h>
#include <errmsg.h>
#include <mysqld_error.h>
#else
#include <mysql/mysql... | Fix to install with MariDB on Windows | Fix to install with MariDB on Windows
| C | mit | webdev1001/mysql2,bigcartel/mysql2,jeremy/mysql2,JonathonMA/mysql2,webdev1001/mysql2,zBMNForks/mysql2,mkdynamic/mysql2,tamird/mysql2,blaind/mysql2,mkdynamic/mysql2,PipelineDeals/mysql2,zmack/mysql2,yui-knk/mysql2,jeremy/mysql2,mkdynamic/mysql2,zmack/mysql2,jconroy77/mysql2,bloopletech/mysql2,bigcartel/mysql2,yui-knk/my... |
4f10cf9c74d54edbb0370d7b2e8899b6015f60d4 | WebApiClient/Code/WebApiClient-AFNetworking/AFNetworkingWebApiClient.h | WebApiClient/Code/WebApiClient-AFNetworking/AFNetworkingWebApiClient.h | //
// AFNetworkingWebApiClient.h
// WebApiClient
//
// Created by Matt on 12/08/15.
// Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0.
//
#import "WebApiClientSupport.h"
NS_ASSUME_NONNULL_BEGIN
@protocol AFURLResponseSerialization;
/**
Implementation of @c WebA... | //
// AFNetworkingWebApiClient.h
// WebApiClient
//
// Created by Matt on 12/08/15.
// Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0.
//
#import "WebApiClientSupport.h"
NS_ASSUME_NONNULL_BEGIN
@protocol AFURLResponseSerialization;
/**
Implementation of @c WebA... | Add generic definition to identifier array. | Add generic definition to identifier array.
| C | apache-2.0 | Blue-Rocket/WebApiClient,Blue-Rocket/WebApiClient |
c62af27fdf1ffd59a9f245ecda6ed6f39a258856 | main.c | main.c | // Copyright (c) 2016 LEGOAnimal22
#include <stdio.h>
#include <inttypes.h>
#include "electron.h"
int main() {
printf("Periodic Table by LEGOAnimal22\n");
electron_config carbon = create_electron_config(6);
printf("%d, %d, %d, %d\n", carbon.atomic_number, carbon.highest_energy_level, carbon.valence_electrons, ... | // Copyright (c) 2016 LEGOAnimal22
#include <stdio.h>
#include <inttypes.h>
#include "electron.h"
int main() {
printf("Periodic Table by LEGOAnimal22\n");
electron_config carbon = create_electron_config(6);
printf("%d, %d, %d, %d\n", carbon.atomic_number, carbon.highest_energy_level, carbon.valence_electrons, ... | Test level 6 with a variable instead of a constant | Test level 6 with a variable instead of a constant
| C | mit | LEGOAnimal22/periodictable_c |
6db3612cc602b2bfada53d2057038b660523a3eb | test/FrontendC/union-align.c | test/FrontendC/union-align.c | // RUN: %llvmgcc -S %s -o - | grep load | grep "4 x float" | not grep "align 4"
// RUN: %llvmgcc -S %s -o - | grep load | grep "4 x float" | grep "align 16"
// PR3432
// rdar://6536377
typedef float __m128 __attribute__ ((__vector_size__ (16)));
typedef union
{
int i[4];
float f[4];
__m128 v;
} u_t;
__m128 t(u... | Add a test case for Chris lvalue alignment fixes. | Add a test case for Chris lvalue alignment fixes.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@63300 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/ll... | |
6687386cf8f94e1d5756fdbb711f8110df15d1ed | mudlib/mud/home/Verb/sys/verb/core/wiz/ooc/object/creset.c | mudlib/mud/home/Verb/sys/verb/core/wiz/ooc/object/creset.c | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012, 2013, 2014 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Softw... | Add command to separately reset the clone manager | Add command to separately reset the clone manager
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka | |
7324e8bde72b1dd62105d735a0eea98e804f446b | specs/lib/c/Spec_Lib_Print.c | specs/lib/c/Spec_Lib_Print.c | #include "stdint.h"
#include "stdio.h"
#include "Spec_Lib_Print.h"
void Spec_Lib_Print_print_bytes(uint32_t len, uint8_t* buffer) {
for (int i = 0; i < len; i++){
printf("%02x ", buffer[i]);
}
printf("\n");
}
void Spec_Lib_Print_print_compare(uint32_t len, uint8_t* buffer1, uint8_t* buffer2) {
for (int i ... | #include "stdint.h"
#include "stdio.h"
#include "Spec_Lib_Print.h"
void Spec_Lib_Print_print_bytes(uint32_t len, uint8_t* buffer) {
for (int i = 0; i < len; i++){
printf("%02x ", buffer[i]);
}
printf("\n");
}
void Spec_Lib_Print_print_compare(uint32_t len, uint8_t* buffer1, uint8_t* buffer2) {
for (int i ... | Fix typo in the Print_compare_and_display function | Fix typo in the Print_compare_and_display function
| C | apache-2.0 | mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star |
8b7a83c43dbf77d5266c9da483a9e1e3b9cb1e31 | PHPHub/Constants/SecretConstant.example.h | PHPHub/Constants/SecretConstant.example.h | //
// SecretConstant.example.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define Client_id @"Get the client id from server"
#define Client_secret @"Get the client secret from server"
#define UMENG_APPKEY @"Set up UMEng App Key"
#define UMENG_QQ... | //
// SecretConstant.example.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define Client_id @"kHOugsx4dmcXwvVbmLkd"
#define Client_secret @"PuuFCrF94MloSbSkxpwS"
#define UMENG_APPKEY @"Set up UMEng App Key"
#define UMENG_QQ_ID @"Set up qq id... | Change client id and client secret default value | Change client id and client secret default value
| C | mit | Aufree/phphub-ios |
6562bb5c59335458afc804997116ba8c432c0785 | CompilationDatabaseMagic.h | CompilationDatabaseMagic.h | // __COMPDB_ENTRY: The contents of this compilation database entry.
// Should be a string literal.
// __COMPDB_SYMNAME: ATM I can't think of a way to generate a unique symbol
// name, so just force the TU to provide it.
__attribute__((section(".llvm.compdb")))
extern const char __COMPDB_SYMNAME[] = "<<<COMPDB:" __COMPD... | // The following macros should be defined on entry to this file:
// __COMPDB_ENTRY:
// The contents of this compilation database entry. Should be a string
// literal.
// __COMPDB_SYMNAME:
// ATM I can't think of a way to generate a unique symbol name, so just
// force it to be passed in.
__attribute__((section... | Make this file a bit prettier. | Make this file a bit prettier.
| C | mit | chisophugis/clang-compdb-in-object-file,chisophugis/clang-compdb-in-object-file |
1cd869313d2d54aadf44d1958e5a987dee0f1a90 | chainerx_cc/chainerx/kernels/hyperbolic.h | chainerx_cc/chainerx/kernels/hyperbolic.h | #pragma once
#include "chainerx/array.h"
#include "chainerx/kernel.h"
namespace chainerx {
class SinhKernel : public Kernel {
public:
static const char* name() { return "Sinh"; }
virtual void Call(const Array& x, const Array& out) = 0;
};
class CoshKernel : public Kernel {
public:
static const char* na... | #pragma once
#include "chainerx/array.h"
#include "chainerx/kernel.h"
namespace chainerx {
class SinhKernel : public Kernel {
public:
static const char* name() { return "Sinh"; }
virtual void Call(const Array& x, const Array& out) = 0;
};
class CoshKernel : public Kernel {
public:
static const char* na... | Fix a typo in a kernel name | Fix a typo in a kernel name
| C | mit | pfnet/chainer,wkentaro/chainer,chainer/chainer,chainer/chainer,chainer/chainer,niboshi/chainer,chainer/chainer,niboshi/chainer,wkentaro/chainer,hvy/chainer,wkentaro/chainer,hvy/chainer,niboshi/chainer,hvy/chainer,hvy/chainer,niboshi/chainer,wkentaro/chainer |
1d92358eaf7731d75c9feff2a00dbae51abd6893 | src/refract/ElementInserter.h | src/refract/ElementInserter.h | //
// refract/ElementInserter.h
// librefract
//
// Created by Jiri Kratochvil on 17/06/15.
// Copyright (c) 2015 Apiary Inc. All rights reserved.
//
#ifndef REFRACT_ELEMENTINSERTER_H
#define REFRACT_ELEMENTINSERTER_H
#include <iterator>
namespace refract
{
// Forward declarations of Elements
struct IEle... | //
// refract/ElementInserter.h
// librefract
//
// Created by Jiri Kratochvil on 17/06/15.
// Copyright (c) 2015 Apiary Inc. All rights reserved.
//
#ifndef REFRACT_ELEMENTINSERTER_H
#define REFRACT_ELEMENTINSERTER_H
#include <iterator>
namespace refract
{
// Forward declarations of Elements
struct IEle... | Add copy c-tor and assign operator to ElementInsertIterator | Add copy c-tor and assign operator to ElementInsertIterator
| C | mit | apiaryio/drafter,apiaryio/drafter,apiaryio/drafter,apiaryio/drafter,apiaryio/drafter |
7cdd88eb941503af0aec0924df41f0adc69a3854 | tensorflow/core/platform/threadpool_options.h | tensorflow/core/platform/threadpool_options.h | /* Copyright 2019 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 2019 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... | Initialize the inter and intra-op thread pool pointers in ThreadPoolOptions to nullptr. Otherwise, they may have arbitrary values. | Initialize the inter and intra-op thread pool pointers in ThreadPoolOptions to nullptr. Otherwise, they may have arbitrary values.
PiperOrigin-RevId: 294833933
Change-Id: I95ff98f6a7fe308c59f1c8bf7e1b25f4c68223dc
| C | apache-2.0 | Intel-tensorflow/tensorflow,karllessard/tensorflow,xzturn/tensorflow,annarev/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,annarev/tensorflow,renyi533/tensorflow,aldian/tensorflow,aldian/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,aldian/tensorflow,Intel-tens... |
88f1ce548a1e06c1d40dea57346dcd654f718fb7 | test/Profile/c-linkage-available_externally.c | test/Profile/c-linkage-available_externally.c | // Make sure instrumentation data from available_externally functions doesn't
// get thrown out and are emitted with the expected linkage.
// RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
// CHECK: @__pr... | // Make sure instrumentation data from available_externally functions doesn't
// get thrown out and are emitted with the expected linkage.
// RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
// CHECK: @__pr... | Update testcase for r283948 (NFC) | [Profile] Update testcase for r283948 (NFC)
Old: "__DATA,__llvm_prf_data"
New: "__DATA,__llvm_prf_data,regular,live_support"
This should fix the following bot failure:
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55158
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@283949 91177308-0d34-0410-b5e... | 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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
f2fcf1b8a6fb9bd925ce1b8781e890ee5de5d2db | test/PCH/single-token-macro.c | test/PCH/single-token-macro.c | // rdar://10588825
// Test this without pch.
// RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
// Test with pch.
// RUN: %clang_cc1 %s -emit-pch -o %t
// RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only
#ifndef HEADER
#define HEADER
#define SKATA
#define __stdcall
#define STDCALL __stdcall
void STDC... | // rdar://10588825
// Test this without pch.
// RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
// Test with pch.
// RUN: %clang_cc1 %s -emit-pch -o %t
// RUN: %clang_cc1 %s -include-pch %t -verify -fsyntax-only
#ifndef HEADER
#define HEADER
#define __stdcall
#define STDCALL __stdcall
void STDCALL Foo(void);
... | Remove extraneous line in the test that was mistakenly copied. | [PCH] Remove extraneous line in the test that was mistakenly copied.
No functionality change.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@146825 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
7552dddfaad48e3ec1bc691ff5bfa9208163169c | C/procon.c | C/procon.c | #include <stdio.h>
#include <stdlib.h>
#define LINE_BUF_SIZE 1024
#define LENGTH(array) (sizeof(array) / sizeof((array)[0]))
int
main(void)
{
static char line[LINE_BUF_SIZE];
while (fgets(line, sizeof(line), stdin) != NULL) {
int a, b;
if (sscanf(line, "%d %d", &a, &b) != 2) {
fputs("sscanf: Con... | Add a programming contest template for C | Add a programming contest template for C
| C | mit | koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate,koturn/kotemplate | |
a61724096114337cabc8cc51246324874cc004e4 | test/Driver/crash-report.c | test/Driver/crash-report.c | // RUN: %clang -fsyntax-only %s 2>&1 | FileCheck %s
// REQUIRES: crash-recovery
// XFAIL: mingw32,win32
#pragma clang __debug parser_crash
// CHECK: Preprocessed source(s) and associated run script(s) are located at:
// CHECK-NEXT: {{.*}}: note: diagnostic msg: {{.*}}.c
| // RUN: rm %T/crash-report-*.c %T/crash-report-*.sh
// RUN: TMP=%T %clang -fsyntax-only %s -DFOO=BAR 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSRC %s < %T/crash-report-*.c
// RUN: FileCheck --check-prefix=CHECKSH %s < %T/crash-report-*.sh
// REQUIRES: crash-recovery
// XFAIL: mingw32,win32
#pragma clan... | Improve crash reporting test coverage. | Improve crash reporting test coverage.
This adds validation that the
* repro source is only rewrite-includes processed, not fully preprocessed.
* repro script contains macro definitions (-DFOO=BAR).
Based on suggestions/help by Matt Beaumont-Gay.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@159605 91177308-0... | C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
c1c73801616efa1eda1925ebf64a1a6bce7527e7 | test/Misc/loop-opt-setup.c | test/Misc/loop-opt-setup.c | // RUN: %clang -O1 -fexperimental-new-pass-manager -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s
// RUN: %clang -O1 -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s
extern int a[16];
int b = 0;
int foo(void) {
#pragma unroll
for (int i = 0; i < 16; ++i)
a[i] = b += 2;
return b;
}
// CHECK-NOT: br... | // RUN: %clang -O1 -fexperimental-new-pass-manager -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s
// RUN: %clang -O1 -fno-experimental-new-pass-manager -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s
extern int a[16];
int b = 0;
int foo(void) {
#pragma unroll
for (int i = 0; i < 16; ++i)
a[i] = b +... | Add -fno-experimental-pass-manager to make clear which pass manager we're running and to make flipping the default not regress testing. | Add -fno-experimental-pass-manager to make clear which pass manager
we're running and to make flipping the default not regress testing.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@374840 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
c10ff34ae73f5748cc7ab9d5e0cc520f8745509d | RELEASE-NOTES-3.c | RELEASE-NOTES-3.c | Release notes for i3 v3.γ
-----------------------------
This is the third version (3.γ, transcribed 3.c) of i3. It is considered stable.
This release contains many small improvements like using keysymbols in the
configuration file, named workspaces, borderless windows, an IPC interface
etc. (see below for a complete ... | Add release notes for 3.γ | Add release notes for 3.γ
| C | bsd-3-clause | renlinx007/i3wm,pablospe/i3,Chr1stoph/i3,pablospe/i3,Eelis/i3,FauxFaux/i3,strake/i3,DSMan195276/i3,netzverweigerer/i3,shdown/i3,sa1/i3,jubalh/i3,Airblader/i3-original,tommie/i3,netzverweigerer/i3,gigawhitlocks/i3-hacking,Airblader/i3-original,stfnm/i3,dtomasiewicz/i3,mh21/i3,DSMan195276/i3,FauxFaux/i3,shdown/i3,jubalh/... | |
de514f15cd1bc2ae0bad203d51feafe9b92a9258 | tests/environment_variables/env_var_test.c | tests/environment_variables/env_var_test.c | /*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char **argv, char **en... | /*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*
* In the glibc dy... | Make environment_variables test ignore LD_LIBRARY_PATH for glibc | Make environment_variables test ignore LD_LIBRARY_PATH for glibc
This test pumps specific values through sel_ldr with -E and then
tests that the entire environment seen by the untrusted program
is exactly that list, using a golden file. CommandSelLdrTestNacl
uses -E to pass LD_LIBRARY_PATH to the nexe for new (ARM) g... | C | bsd-3-clause | sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client |
34b1c5f6bc22dbb512f5d0462153042ffc6407fa | tensorflow/compiler/xla/service/scatter_expander.h | tensorflow/compiler/xla/service/scatter_expander.h | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Make ScatterExpander methods 'protected' to enable overriding them in a subclass. | [XLA] Make ScatterExpander methods 'protected' to enable overriding them in a subclass.
PiperOrigin-RevId: 217914138
| C | apache-2.0 | apark263/tensorflow,seanli9jan/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,theflofly/tensorflow,gunan/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,kevin-coder/tensorflow-fork,hfp/tensorflow-xsmm,tensorflow/tensorflow-pywrap_saved_model... |
9be8ac9ad3f94875a9381555d8859f289c59d6df | application/browser/application_system_linux.h | application/browser/application_system_linux.h | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#define XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#include "xwalk/application/... | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#define XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#include "xwalk/application/... | Fix crash when shutting down | [Application][D-Bus] Fix crash when shutting down
DBusManager owns the Bus connection and was being destroyed before the
service provider that uses it.
TEST=Loaded xwalk --run-as-service and xwalkctl <APP_ID> then closed the
window. The first process should not crash but exit cleanly.
| C | bsd-3-clause | tedshroyer/crosswalk,minggangw/crosswalk,axinging/crosswalk,xzhan96/crosswalk,RafuCater/crosswalk,tedshroyer/crosswalk,stonegithubs/crosswalk,dreamsxin/crosswalk,Bysmyyr/crosswalk,crosswalk-project/crosswalk-efl,siovene/crosswalk,RafuCater/crosswalk,axinging/crosswalk,darktears/crosswalk,chinakids/crosswalk,xzhan96/cro... |
fc0fdb4850d5dd1808c4f76e809013c842230bb5 | RxCocoa/Common/_RXDelegateProxy.h | RxCocoa/Common/_RXDelegateProxy.h | //
// _RXDelegateProxy.h
// RxCocoa
//
// Created by Krunoslav Zaher on 7/4/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface _RXDelegateProxy : NSObject
@property (nonatomic, assign, readonly) id _forwardToDelegate;
-(void)_setForwardToDelegate:(id)fo... | //
// _RXDelegateProxy.h
// RxCocoa
//
// Created by Krunoslav Zaher on 7/4/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface _RXDelegateProxy : NSObject
@property (nonatomic, weak, readonly) id _forwardToDelegate;
-(void)_setForwardToDelegate:(id)forw... | Change _forwardToDelegate to weak reference | Change _forwardToDelegate to weak reference
| C | mit | shiratsu/RxSwift,shiratsu/RxSwift,KyoheiG3/RxSwift,shiratsu/RxSwift,KyoheiG3/RxSwift,cfraz89/RxSwift,ReactiveX/RxSwift,tottakai/RxSwift,cfraz89/RxSwift,kzaher/RxSwift,kzaher/RxSwift,ReactiveX/RxSwift,kzaher/RxSwift,ReactiveX/RxSwift,tottakai/RxSwift,KyoheiG3/RxSwift,cfraz89/RxSwift,kzaher/RxSwift,tottakai/RxSwift,cfraz... |
9bf1cd7fc3550b5d79e13d4254efcd313739fe7e | adm/cmake/TKService/Precompiled.h | adm/cmake/TKService/Precompiled.h | #pragma once
#include "../TKernel/Precompiled.h"
#include "../TKMath/Precompiled.h"
#include "Standard.hxx"
#include "Aspect.hxx"
#include "Aspect_Handle.hxx"
#include "Image.hxx"
#include "SelectBasics.hxx"
| #pragma once
#include "../TKernel/Precompiled.h"
#include "../TKMath/Precompiled.h"
#include "Standard.hxx"
#include "Aspect.hxx"
#include "Aspect_Handle.hxx"
#include "SelectBasics.hxx"
| Fix precompiled headers, Image.hxx has been removed from OCCT 6.7.0 | Fix precompiled headers, Image.hxx has been removed from OCCT 6.7.0
| C | lgpl-2.1 | finetjul/oce,BenoitPerrot/oce,heartvalve/oce,BenoitPerrot/oce,finetjul/oce,heartvalve/oce,heartvalve/oce,tpaviot/oce,EvgeneOskin/oce,Tech-XCorp/oce,finetjul/oce,BenoitPerrot/oce,tpaviot/oce,mathstuf/oce,tpaviot/oce,Tridify/oce,tpaviot/oce,tpaviot/oce,Tech-XCorp/oce,finetjul/oce,Tridify/oce,Tridify/oce,mathstuf/oce,math... |
2ed204919448fbe01f632dad7c6772bf7a83189a | ex01-19.c | ex01-19.c | /** Exercise 1.19
* Write a function reverse(s) that reverses the character string s. Use it to
* write a program that reverses its input a line at a time.
*/
#include <stdio.h>
#define BUFSIZE 1024
int _getline(char[], int);
void reverse(char[], int);
main() {
char line[BUFSIZE];
int length;
while (... | Add solution for exercise 19. | Add solution for exercise 19.
| C | unlicense | kdungs/exercises-KnR | |
0249741443cad6e6de2f1c63765d9508733ec711 | Hauth/Hauth.h | Hauth/Hauth.h | //
// Hauth.h
// Hauth
//
// Created by Rizwan Sattar on 11/7/15.
// Copyright © 2015 Rizwan Sattar. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for Hauth.
FOUNDATION_EXPORT double HauthVersionNumber;
//! Project version string for Hauth.
FOUNDATION_EXPORT const unsigned ... | //
// Hauth.h
// Hauth
//
// Created by Rizwan Sattar on 11/7/15.
// Copyright © 2015 Rizwan Sattar. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for Hauth.
FOUNDATION_EXPORT double HauthVersionNumber;
//! Project version string for Hauth.
FOUNDATION_EXPORT const unsigned ... | Use "" imports instead of <> in main fmwk header | Use "" imports instead of <> in main fmwk header
Xcode 7.1 seems to be having issues with the framework being the same module name and existing as 2 different targets (one tvOS, and one iOS). It complains in the tvOS app that the framework includes 'non-modular' headers in the framework. Changing it to quotes for now ... | C | mit | almas73/Voucher,rsattar/Voucher,almas73/Voucher,rsattar/Voucher |
defd9b3ae1e0b567242f68307af74272edd24a96 | config.h | config.h | #ifdef __linux__
# define _GNU_SOURCE
# include <bsd/stdlib.h>
# include <grp.h>
int setresgid(gid_t, gid_t, gid_t);
int setresuid(gid_t, gid_t, gid_t);
#endif
#ifdef __FreeBSD__
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <resolv.h>
#endif
| /*
* Require libbsd's stdlib.h for arc4random() etc.
* Require <grp.h> for setgroups().
*/
#ifdef __linux__
# define _GNU_SOURCE
# include <bsd/stdlib.h>
# include <grp.h>
#endif
/*
* Neither Linux nor Apple have this.
*/
#if defined(__linux__) || defined(__APPLE__)
# include <unistd.h>
int setresgid(gid_t, gid_t... | Document goop and have both Linux and Mac OS X define setresuid et al. | Document goop and have both Linux and Mac OS X define setresuid et al.
| C | isc | kristapsdz/letskencrypt-portable |
535d84e007d476364e0e3c40fd3ac9c6bb230b5b | src/appleseed.shaders/include/appleseed/maya/as_maya_transform_helpers.h | src/appleseed.shaders/include/appleseed/maya/as_maya_transform_helpers.h |
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2016 Luis Barrancos, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtainin... | Add placement3d node auxiliary functions | Add placement3d node auxiliary functions
| C | mit | dictoon/appleseed,Biart95/appleseed,luisbarrancos/appleseed,Aakash1312/appleseed,dictoon/appleseed,glebmish/appleseed,Biart95/appleseed,pjessesco/appleseed,appleseedhq/appleseed,est77/appleseed,pjessesco/appleseed,pjessesco/appleseed,appleseedhq/appleseed,gospodnetic/appleseed,Aakash1312/appleseed,est77/appleseed,glebm... | |
fd1cb2861f5037415d2899b4dfff0c60fcdb040d | Pod/Classes/CMHMutedEventUpdater.h | Pod/Classes/CMHMutedEventUpdater.h | #import <CareKit/CareKit.h>
@interface CMHMutedEventUpdater : NSObject
- (instancetype)initWithCarePlanStore:(OCKCarePlanStore *)store
event:(OCKCarePlanEvent *)event
result:(OCKCarePlanEventResult *)result
state:(OCKCarePl... | #import <CareKit/CareKit.h>
@interface CMHMutedEventUpdater : NSObject
- (_Nonnull instancetype)initWithCarePlanStore:(OCKCarePlanStore *_Nonnull)store
event:(OCKCarePlanEvent *_Nonnull)event
result:(OCKCarePlanEventResult *_Nullable)res... | Add Nullability annotations to the event updater class | Add Nullability annotations to the event updater class
| C | mit | cloudmine/CMHealthSDK,cloudmine/CMHealthSDK-iOS,cloudmine/CMHealthSDK-iOS |
74a6a6671adf43987f017e83bf2de55a2c29fc0e | src/libclientserver/ThreadPool.h | src/libclientserver/ThreadPool.h |
class ThreadPoolThread;
class ThreadPool {
public:
ThreadPool();
ThreadPool(int nthread);
ThreadPool(int nthread, size_t maxqueue);
~ThreadPool();
void Add(std::function<void()> func);
void Flush();
void Execute();
size_t GetCount();
size_t GetHWCount();
protected:
void Init(int nthread, s... |
class ThreadPoolThread;
class ThreadPool {
public:
ThreadPool();
ThreadPool(int nthread);
ThreadPool(int nthread, size_t maxqueue);
~ThreadPool();
void Add(std::function<void()> func);
void Flush();
void Execute();
size_t GetCount();
size_... | Convert from tabs -> spaces | Convert from tabs -> spaces
| C | mit | mistralol/libclientserver,mistralol/libclientserver |
80d3768eb5c31cd5af0b2df6648fa22e79e35379 | test/main.c | test/main.c | /***************************************************************************//**
@file main.c
@author Stephen Brennan
@date Created Thursday, 12 September 2013
@brief Run tests on the libstephen library.
@copyright Copyright (c) 2013-2015, Stephen Brennan. Released under ... | /***************************************************************************//**
@file main.c
@author Stephen Brennan
@date Created Thursday, 12 September 2013
@brief Run tests on the libstephen library.
@copyright Copyright (c) 2013-2015, Stephen Brennan. Released under ... | Set log level in tests. | Set log level in tests.
| C | bsd-3-clause | brenns10/libstephen,brenns10/libstephen,brenns10/libstephen |
35c70ef4e01c901d577e27113b761138f0769a03 | src/config.h | src/config.h | /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef CONFIG_H
#define CONFIG_H 1
#ifdef WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#else
#if !defined(__cplusplus) && !defined(linux) && !defined(__GNUC__)
typedef unsigned long long uint64_t;
typedef long lo... | /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef CONFIG_H
#define CONFIG_H 1
#ifdef WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#else
#if !defined(__cplusplus) && !defined(linux) && !defined(__GNUC__)
typedef unsigned long long uint64_t;
typedef long lo... | Fix build problem on W2008 in /xp /x86 /release mode | Fix build problem on W2008 in /xp /x86 /release mode
Change-Id: I1d51e4f9b1e0ae9f6df28a22bf13a5ab6bf55ab8
Reviewed-on: http://review.couchbase.org/28476
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
| C | apache-2.0 | vmx/platform,trondn/platform,vmx/platform |
d17361a30e052dcde451c02d97c8b37bd602e4e6 | test/__attribute__/weak/weak_const.c | test/__attribute__/weak/weak_const.c | // RUN: %check --only -e %s -Wno-incompatible-pointer-types '-DERROR(...)=__VA_ARGS__'
// RUN: %ucc -fsyntax-only %s '-DERROR(...)=' -Wno-incompatible-pointer-types -Wno-arith-funcptr
enum { false };
__attribute((weak)) void w();
void f();
ERROR(int shortcircuit_weak_1 = w && 1;) // CHECK: error: global scalar initi... | Test constant-folding of weak identifiers | Test constant-folding of weak identifiers
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler | |
4e451a5b83acf9675b5d60320069d804a9b93141 | vox-desk-qt/plugins/servermon/vvservermondialog.h | vox-desk-qt/plugins/servermon/vvservermondialog.h | // Virvo - Virtual Reality Volume Rendering
// Copyright (C) 1999-2003 University of Stuttgart, 2004-2005 Brown University
// Contact: Jurgen P. Schulze, jschulze@ucsd.edu
//
// This file is part of Virvo.
//
// Virvo is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser Genera... | // Virvo - Virtual Reality Volume Rendering
// Copyright (C) 1999-2003 University of Stuttgart, 2004-2005 Brown University
// Contact: Jurgen P. Schulze, jschulze@ucsd.edu
//
// This file is part of Virvo.
//
// Virvo is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser Genera... | Fix typo in header guard | Fix typo in header guard
| C | lgpl-2.1 | deskvox/deskvox,deskvox/deskvox,deskvox/deskvox,deskvox/deskvox,deskvox/deskvox |
46ea6e5afe0e40ea3cbfceb77bcca01fcdb8df6e | src/evolution.h | src/evolution.h | #ifndef EVOLUTION_H
#define EVOLUTION_H
#include "fitness.h"
#define POPULATION_SIZE 50
#define TOURNAMENT_SIZE 5
// Evolution
class EVOLUTION
{
public:
int crossover(int **newPop,
int **pop,
int index,
int tournament1,
int tournament2,
... | #ifndef EVOLUTION_H
#define EVOLUTION_H
#include "fitness.h"
#include "population.h"
#define POPULATION_SIZE 50
#define TOURNAMENT_SIZE 5
// Evolution
class EVOLUTION
{
public:
int crossover(int **newPop,
int **pop,
int index,
int tournament1,
... | Update include to header file 'population.h' | Update include to header file 'population.h'
| C | mit | wkohlenberg/simple_GA |
c49e05ca04116a78b2a960f3a05dce6319582a8f | c/ppb_find.h | c/ppb_find.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PPAPI_C_PPB_FIND_H_
#define PPAPI_C_PPB_FIND_H_
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_stdint.h"
#define PPB_FIND_INTERFACE "... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PPAPI_C_PPB_FIND_H_
#define PPAPI_C_PPB_FIND_H_
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_stdint.h"
#define PPB_FIND_INTERFACE "... | Structure member should be function pointer | Structure member should be function pointer
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/2972004 | C | bsd-3-clause | tiaolong/ppapi,lag945/ppapi,nanox/ppapi,CharlesHuimin/ppapi,c1soju96/ppapi,qwop/ppapi,nanox/ppapi,siweilvxing/ppapi,siweilvxing/ppapi,xinghaizhou/ppapi,xiaozihui/ppapi,whitewolfm/ppapi,dingdayong/ppapi,xinghaizhou/ppapi,ruder/ppapi,fubaydullaev/ppapi,xuesongzhu/ppapi,xinghaizhou/ppapi,rise-worlds/ppapi,cacpssl/ppapi,th... |
bf0aa27340c2364aa4be3549e870c71ce0846d7a | ui/message_center/base_format_view.h | ui/message_center/base_format_view.h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#define UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#include "ui/message_center/message_view.h"
#include "ui/... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#define UI_MESSAGE_CENTER_BASE_FORMAT_VIEW_H_
#include "ui/message_center/message_view.h"
#include "ui/... | Revert 167593 - Add an OVERRIDE keyword This change adds an OVERRIDE keyword to the BaseFormatView::ButtonPressed function to fix a build break on the "Linux ChromiumOS (Clang dbg)" bot. | Revert 167593 - Add an OVERRIDE keyword
This change adds an OVERRIDE keyword to the BaseFormatView::ButtonPressed function to fix a build break on the "Linux ChromiumOS (Clang dbg)" bot.
The CL this tries to fix is broken. Reverting the fix, so I can revert the CL
TBR=miket
BUG=none
TEST=fix builds on the "Linux Chro... | C | bsd-3-clause | anirudhSK/chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,dednal/chromium.src,anirudhSK/chromium,Just-D/chromium-1,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chrom... |
6eb05c90ea2a1e6068c843bfef2f034a270310bd | serialization/include/SerializationToStream.h | serialization/include/SerializationToStream.h | /// \file
/// \brief This header contains functionality needed for serializing and deserealizing to/from a stream
#pragma once
#include <ISerializable.h>
#include <IStorage.h>
#include <iostream>
/// Contains all the functionality provided by the library.
namespace simpson
{
/// Serialize object to ostream
std::ost... | /// \file
/// \brief This header contains functionality needed for serializing and deserealizing to/from a stream
#pragma once
#include "ISerializable.h"
#include "IStorage.h"
#include <iostream>
/// Contains all the functionality provided by the library.
namespace simpson
{
/// Serialize object to ostream
std::ost... | Replace include <> with "" | Replace include <> with ""
| C | mit | artem-ogre/simpson,artem-ogre/simpson |
f96ca22026ed189f63adc723daff443ff8562ba3 | src/common/const.h | src/common/const.h | #ifndef CONST_H
#define CONST_H
#include <cmath>
#include <cstdlib>
typedef unsigned long long uint64;
namespace Const
{
constexpr int HASH_BASE = 31415927;
constexpr double EPS = 1e-6;
constexpr double PI = M_PI;
inline int randUInt()
{
#ifdef _WIN32
return (rand() << 15) | rand();
#else
return rand();
#e... | #ifndef CONST_H
#define CONST_H
#include <cmath>
#include <cstdlib>
typedef unsigned long long uint64;
namespace Const
{
constexpr int HASH_BASE = 31415927;
constexpr double EPS = 1e-6;
constexpr double PI = M_PI;
inline int randUInt()
{
#ifdef _WIN32
return (rand() << 15) | rand();
#else
return rand();
#e... | Fix randDouble() bug on windows | Fix randDouble() bug on windows
| C | mit | equation314/3DRender |
456c867d363840b3ab0f16dee605bdccf35130c1 | src/modules/inputpayload.c | src/modules/inputpayload.c | // Copyright (c) 2016 Brian Barto
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the MIT License. See LICENSE for more details.
#include <string.h>
#include "config.h"
// Static Variables
static char payload[PAYLOAD_SIZE + 1];
void inputpayload_init(void) {
memse... | // Copyright (c) 2016 Brian Barto
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the MIT License. See LICENSE for more details.
#include <string.h>
#include "config.h"
// Static Variables
static char payload[PAYLOAD_SIZE + 1];
void inputpayload_init(void) {
memse... | Make sure we don't increment data array past it's length when parsing payload | Make sure we don't increment data array past it's length when parsing payload
modified: src/modules/inputpayload.c
| C | mit | bartobri/spring-server,bartobri/spring-server |
a9437115ceb0307d8481cbc36ed8dc66d2ebc38b | mbc.c | mbc.c | #include "gameboy.h"
#include "memory.h"
u8 select_rom_bank(u8 value)
{
u8 ret = value & 0x1F;
switch (mode) {
case ROM:
break;
case MBC1:
switch (ret) {
case 0:
case 0x20:
case 0x40:
case 0x60:
break;
default:
ret -= 1;
}
}
return ret;
}
u8 select_ram_bank(u8 value)
{
return (value & 0x... | #include "gameboy.h"
#include "memory.h"
u8 select_rom_bank(u8 value)
{
u8 ret = value & 0x1F;
switch (mode) {
case ROM:
break;
case MBC1:
switch (ret) {
case 0:
case 0x20:
case 0x40:
case 0x60:
break;
default:
ret -= 1;
}
}
return ret;
}
u8 select_ram_bank(u8 value)
{
return (value & 0x... | Simplify return of ram_enable value | Simplify return of ram_enable value
| C | mit | hoferm/tmpgb,hoferm/tmpgb |
3477224c610dda33070204ec8c12e82a5fac6145 | test/Driver/darwin-debug-flags.c | test/Driver/darwin-debug-flags.c | // RUN: env RC_DEBUG_OPTIONS=1 %clang -ccc-host-triple i386-apple-darwin9 -g -Os %s -emit-llvm -S -o - | FileCheck %s
// <rdar://problem/7256886>
// CHECK: !1 = metadata !{
// CHECK: -g -Os
// CHECK: -mmacosx-version-min=10.5.0
// CHECK: [ DW_TAG_compile_unit ]
int x;
| // RUN: env RC_DEBUG_OPTIONS=1 %clang -ccc-host-triple i386-apple-darwin9 -g -Os %s -emit-llvm -S -o - | FileCheck %s
// <rdar://problem/7256886>
// CHECK: !0 = metadata !{
// CHECK: -g -Os
// CHECK: -mmacosx-version-min=10.5.0
// CHECK: [ DW_TAG_compile_unit ]
int x;
| Update metadata id number in string compare check. | Update metadata id number in string compare check.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@130757 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
a7f816abada5d06054966b209bcba69708854e77 | include/parrot/global_setup.h | include/parrot/global_setup.h | /* global_setup.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Contains declarations of global data and the functions
* that initialize that data.
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_GLOBAL... | /* global_setup.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Contains declarations of global data and the functions
* that initialize that data.
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_GLOBAL... | Patch from Jonathan Stowe to prototype Parrot_Array_class_init | Patch from Jonathan Stowe to prototype Parrot_Array_class_init
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@980 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| C | artistic-2.0 | FROGGS/parrot,tewk/parrot-select,tkob/parrot,FROGGS/parrot,parrot/parrot,youprofit/parrot,youprofit/parrot,gagern/parrot,tewk/parrot-select,tewk/parrot-select,FROGGS/parrot,tkob/parrot,fernandobrito/parrot,gagern/parrot,fernandobrito/parrot,fernandobrito/parrot,gitster/parrot,parrot/parrot,tkob/parrot,parrot/parrot,fer... |
cfdeb127608ca2501d6e465fd189f6b8a21c1ad1 | include/parrot/global_setup.h | include/parrot/global_setup.h | /* global_setup.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Contains declarations of global data and the functions
* that initialize that data.
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_GLOBAL... | /* global_setup.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Contains declarations of global data and the functions
* that initialize that data.
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_GLOBAL... | Patch from Jonathan Stowe to prototype Parrot_Array_class_init | Patch from Jonathan Stowe to prototype Parrot_Array_class_init
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@980 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| C | artistic-2.0 | ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot |
afdd36bc1c540183ebbcc984bc1a9a33e1d44e40 | 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 | reddink/reddcoin,reddink/reddcoin,ahmedbodi/poscoin,bmp02050/ReddcoinUpdates,Cannacoin-Project/Cannacoin,ahmedbodi/poscoin,coinkeeper/2015-06-22_19-10_cannacoin,joroob/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_18-46_reddcoin,joroob/reddcoin,bmp02050/ReddcoinUpdates,Cannacoin-Project/Cannacoin... |
e5c567cf5f089755a140df9fa8368f260acd250f | swichCaseExample.c | swichCaseExample.c | #include <stdio.h>
#include <math.h>
int main()
{
int userInput = 0;
unsigned long number = 0;
while(1)
{
printf("Please enter a number between 1 and 6:");
scanf("%d", &userInput);
unsigned long incrementor = 0;
switch(userInput)
{
case 1:
inc... | Make a program that is incrementing a variable with number based on user input using the following data: If user inputs - increments with : 1 - 5 2 - 9 3 - 18 4 - 34 5 - 59 6 - 95 | Make a program that is incrementing a variable with number based
on user input using the following data:
If user inputs - increments with :
1 - 5
2 - 9
3 - 18
4 - 34
5 - 59
6 - 95
| C | mit | Lyuboo/C-Exercises-SoftUni | |
f6819004e0e04193dfab17b636f266a0f36c2e17 | libcef_dll/cef_macros.h | libcef_dll/cef_macros.h | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/m... | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/m... | Remove duplicate content in file. | Remove duplicate content in file.
git-svn-id: 07c9500005b9a5ecd02aa6a59d3db90a097b7e72@1734 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
| C | bsd-3-clause | zmike/cef-rebase,zmike/cef-rebase,zmike/cef-rebase,bkeiren/cef,bkeiren/cef,bkeiren/cef,bkeiren/cef,zmike/cef-rebase,bkeiren/cef,zmike/cef-rebase |
28b95d48a51e8cfb1c3807b7fb175c4b89dbbf67 | src/libreset/avl.c | src/libreset/avl.c | #include <stdlib.h>
#include "avl.h"
/*
*
*
* forward declarations
*
*
*/
static void
destroy_subtree(
struct avl_el* node //!< A node to destroy
);
/*
*
*
* interface implementation
*
*
*/
struct avl*
avl_alloc(void) {
return calloc(1, sizeof(struct avl));
}
int
avl_destroy(
struct avl*... | #include <stdlib.h>
#include "avl.h"
/*
*
*
* forward declarations
*
*
*/
static void
destroy_subtree(
struct avl_el* node //!< A node to destroy
);
/**
* Rotate a node counter-clockwise
*
* @return new root or NULL, if the rotation could not be performed
*/
static struct avl_el*
rotate_left(
str... | Add declaration and stubs for rotations | Add declaration and stubs for rotations
| C | lgpl-2.1 | waysome/libreset,waysome/libreset |
4c26a927a6e0c1669a18d999a3a6dd7897c21f8c | include/private/chromium/GrSlug.h | include/private/chromium/GrSlug.h | /*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrSlug_DEFINED
#define GrSlug_DEFINED
#include "include/private/chromium/Slug.h"
// TODO: Update Chrome to use sktext::gpu classes and remove these
using GrTextRefere... | /*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrSlug_DEFINED
#define GrSlug_DEFINED
#include "include/private/chromium/Slug.h"
// TODO: Update Chrome to use sktext::gpu classes and remove these
using GrSlug = skt... | Fix compile error on chrome bots | Fix compile error on chrome bots
Change-Id: Ie1d94106a741a9cc51dfd13813f143374392489a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543516
Commit-Queue: Herb Derby <9e12a3d2bbf73546e47cc9958f6ba8f3215b7eaf@google.com>
Reviewed-by: Greg Daniel <39df0a804564ccb6cf75f18db79653821f37c1c5@google.com>
| C | bsd-3-clause | google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia |
3fa56b322acd1fc722124f349d155fc29d8500cc | src/opts/SkBlitRow_opts_SSE4.h | src/opts/SkBlitRow_opts_SSE4.h | /*
* Copyright 2014 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkBlitRow_opts_SSE4_DEFINED
#define SkBlitRow_opts_SSE4_DEFINED
#include "SkBlitRow.h"
/* Check if we are able to build assembly code, GCC/AT&T s... | /*
* Copyright 2014 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkBlitRow_opts_SSE4_DEFINED
#define SkBlitRow_opts_SSE4_DEFINED
#include "SkBlitRow.h"
/* Check if we are able to build assembly code, GCC/AT&T s... | Exclude Clang on Windows too. Comment this up a bit. | Exclude Clang on Windows too. Comment this up a bit.
BUG=391016
R=tomhudson@chromium.org, mtklein@google.com, rnk@chromium.org, thakis@chromium.org
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/363983004
| C | bsd-3-clause | shahrzadmn/skia,YUPlayGodDev/platform_external_skia,HalCanary/skia-hc,AOSPB/external_skia,todotodoo/skia,MinimalOS/android_external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,Igalia/skia,nfxosp/platform_external_skia,noselhq/skia,UBERMALLOW/external_skia,MarshedOut/android_external_skia,... |
6cf9624275da920d283635c43cb39de0bd7b4350 | 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);
# 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_monitors_create(Evas_Object *obj);
# endif
#endif
| Add header function for monitors_create. | Add header function for monitors_create.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 84126
| C | bsd-2-clause | rvandegrift/e,tasn/enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment |
ca1fdf4a443216bed013dc17a0c79d7fd9f1d149 | week2/task.c | week2/task.c | #include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
int main() {
int fd1, fd2;
fd1 = open("f1", O_RDWR);
fd2 = open("f1", O_RDWR);
lseek(fd1, -5, SEEK_END);
lseek(fd2, 4, SEEK_SET);
write(fd1, "xyzw", 4);
write(fd2, "12", 2);
char buff[10];
int count;
lseek(fd1, 0, SEEK_SET);
while (coun... | Add old file from week2 | Add old file from week2 | C | mit | zdravkoandonov/sysprog | |
40f76e65693de88f7be915a17c06bd2481820b29 | src/streams_registry.h | src/streams_registry.h | #ifndef STREAMSREGISTRY_H
#define STREAMSREGISTRY_H
namespace TailProduce {
class Stream;
class StreamsRegistry {
public:
struct StreamsRegistryEntry {
// The pointer to an instance of the stream is owned by TailProduce framework.
// * For static frameworks (streams list... | #ifndef STREAMSREGISTRY_H
#define STREAMSREGISTRY_H
namespace TailProduce {
class Stream;
class StreamsRegistry {
public:
struct StreamsRegistryEntry {
// The pointer to an instance of the stream is owned by TailProduce framework.
// * For static frameworks (streams list... | Remove redundantly declared Stream object | Remove redundantly declared Stream object
| C | mit | Staance/tailproduce,Staance/tailproduce |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.