commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 1 4.87k | subject stringlengths 15 778 | message stringlengths 15 8.75k | lang stringclasses 266
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
6958b17b0e3a663bbd3832ac49e598469f1699c0 | src/sampgdk.c | src/sampgdk.c | #include "sampgdk.h"
#if SAMPGDK_WINDOWS
#undef CreateMenu
#undef DestroyMenu
#undef GetTickCount
#undef KillTimer
#undef SelectObject
#undef SetTimer
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#define _GNU_SOURCE
#endif
| #include "sampgdk.h"
#if SAMPGDK_WINDOWS
#ifdef _MSC_VER
#pragma warning(disable: 4996)
#endif
#undef CreateMenu
#undef DestroyMenu
#undef GetTickCount
#undef KillTimer
#undef SelectObject
#undef SetTimer
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#define _GNU_SOURCE
#endif
| Disable warning C4996 in amalgamation | Disable warning C4996 in amalgamation
| C | apache-2.0 | Zeex/sampgdk,WopsS/sampgdk,WopsS/sampgdk,Zeex/sampgdk,WopsS/sampgdk,Zeex/sampgdk |
0047f0e77b601734597bf882f55f5bf4b0ede639 | calc.c | calc.c | #include "calc.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
double calc(const char* p, int mul_div_flag)
{
int i;
double ans;
ans = atof(p);
if (p[0] != '(' && mul_div_flag == 1){
return (ans);
}
i = 0;
while (p[i] != '\0'){
while (isdigit(p[i])){
... | #include "calc.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
double calc(const char* p, int mul_div_flag)
{
int i;
double ans;
if (p[0] != '(' && mul_div_flag == 1){
return (atof(p));
}
else if (p[0] == '('){
ans = 0;
}
else {
ans = atof(p);
}
... | Split mul_div flag part to avoid bugs | Split mul_div flag part to avoid bugs
| C | mit | Roadagain/Calculator,Roadagain/Calculator |
3f1de23eee55029056d26bd123f61adaf1ec3525 | main.c | main.c | #include <stdlib.h>
#include <stdio.h>
int main() {
FILE *file;
long length;
char *buffer;
file = fopen("example.minty", "r");
if (file == NULL) {
return 1;
}
fseek(file, 0, SEEK_END);
length = ftell(file);
fseek(file, 0, SEEK_SET);
buffer = (char *)malloc(length);
fread(buffer, length, 1, file);
fclose(... | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
FILE *file;
long length;
char *buffer;
if (argc < 2) {
return 1;
}
file = fopen(argv[1], "r");
if (file == NULL) {
return 1;
}
fseek(file, 0, SEEK_END);
length = ftell(file);
fseek(file, 0, SEEK_SET);
buffer = (char *)malloc(len... | Allow program to run to be specified on command line | Allow program to run to be specified on command line
| C | mit | shanepelletier/ChocoMinty |
f5e5f7d6cdb9ce7c8203b7bfe2c5269a14813433 | tests/drivers/build_all/modem/src/main.c | tests/drivers/build_all/modem/src/main.c | /*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
/*
* @file
* @brief Hello World demo
*/
void main(void)
{
printk("Hello World!\n");
}
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
/* Fake GPIO devic... | /*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
/*
* @file
* @brief Hello World demo
*/
void main(void)
{
printk("Hello World!\n");
}
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
/* Fake GPIO devic... | Revert "tests: drivers: build_all: add fake serial device for modem tests" | Revert "tests: drivers: build_all: add fake serial device for modem tests"
This reverts commit 9e58a1e475473fcea1c3b0d05ac9c738141c821a.
This change is in conflict with commit 94f7ed356f0c ("drivers: serial:
add a dummy driver for vnd,serial"). As a result two equal serial
devices are defines, resulting in link error... | C | apache-2.0 | finikorg/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr |
52e572fa6be630f16f119f17eb38fbe2e3b83ca0 | inc/libutils/env.h | inc/libutils/env.h | /*
* env.h
*
* Author: Ming Tsang
* Copyright (c) 2014 Ming Tsang
* Refer to LICENSE for details
*/
#pragma once
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if defined(UNIX) || defined(__unix__) || defined(LINUX) || defined(__linux__)
#if !defined(UNIX)
#define UNIX
... | /*
* env.h
*
* Author: Ming Tsang
* Copyright (c) 2014 Ming Tsang
* Refer to LICENSE for details
*/
#pragma once
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if defined(UNIX) || defined(__unix__) || defined(LINUX) || defined(__linux__)
#if !defined(POSIX)
#define POSI... | Rename platform flag from UNIX to POSIX | Rename platform flag from UNIX to POSIX | C | mit | nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils,nkming2/libutils |
92caf20511f42cae8dd45fa982d538c8b96161c5 | include/base/types.h | include/base/types.h | /* --------------------------------------------------------------------------
* Name: types.h
* Purpose: Various typedefs and utility macros
* ----------------------------------------------------------------------- */
#ifndef TYPES_H
#define TYPES_H
typedef signed char int8_t;
typedef signed short int16_t;... | /* --------------------------------------------------------------------------
* Name: types.h
* Purpose: Various typedefs and utility macros
* ----------------------------------------------------------------------- */
#ifndef TYPES_H
#define TYPES_H
typedef signed char int8_t;
typedef signed short int16_t;... | Declare intptr_t correctly for 64-bit Windows builds. | Declare intptr_t correctly for 64-bit Windows builds.
| C | bsd-2-clause | dpt/Containers,dpt/Containers |
10f5254d144aaa8af56eb6445cea08a491d9fcb8 | loader/problem.h | loader/problem.h | // Explorer loader problem list
// /problem.h
#ifndef PROBLEM_H_
#define PROBLEM_H_
/**错误列表*/
#define ERR_NO_MEM_FOR_ID 1 // 没有可用于中断描述符表的内存
#define ERR_NO_MEM_FOR_SD 2 // 没有可用于储存器描述符表的内存
#define ERR_NO_MEM_FOR_SCTBUF 3 // 没有可用于扇区缓存的内存
#define ERR_NO_MEM_FOR_CONFIG 4 // 没有可以分配给引导配置文件的内存
#define ERR_NO_MEM_FO... | // Explorer loader problem list
// /problem.h
#ifndef PROBLEM_H_
#define PROBLEM_H_
/**错误列表*/
#define ERR_NO_MEM_FOR_ID 1 // 没有可用于中断描述符表的内存
#define ERR_NO_MEM_FOR_SD 2 // 没有可用于储存器描述符表的内存
#define ERR_NO_MEM_FOR_SCTBUF 3 // 没有可用于扇区缓存的内存
#define ERR_NO_MEM_FOR_CONFIG 4 // 没有可以分配给引导配置文件的内存
#define ERR_NO_MEM_FOR_... | Add new error and warning number | Add new error and warning number
| C | bsd-2-clause | MakeOS/GhostBirdOS,MakeOS/GhostBirdOS |
96da00377891c31244a0e6435a31608169ceae02 | src/com/spi.h | src/com/spi.h | //
// spi.h
// Ethernet Shield
//
// Created by EFCM van der Werf on 12/28/13.
// Copyright (c) 2013 EFCM van der Werf. All rights reserved.
//
#ifndef COM_SPI_H
#define COM_SPI_H
#include "../config.h"
// Do we want SPI?
#ifdef COM_SPI
#include <inttypes.h>
/**
* SPI config
*/
typedef struct spi_config {
... | //
// spi.h
// Ethernet Shield
//
// Created by EFCM van der Werf on 12/28/13.
// Copyright (c) 2013 EFCM van der Werf. All rights reserved.
//
#ifndef COM_SPI_H
#define COM_SPI_H
#include "../config.h"
// Do we want SPI?
#ifdef COM_SPI
#include <inttypes.h>
/**
* SPI config
*/
typedef struct spi_config {
... | Rename SPI_START to SPI_ACTIVE and SPI_STOP to SPI_PASSIVE | Rename SPI_START to SPI_ACTIVE and SPI_STOP to SPI_PASSIVE
| C | mit | fuegas/dollhouse-ethshield,slashdev/slashnet,fuegas/dollhouse-ethshield,slashdev/slashnet |
3ec169b38a5ece25471b68953d4d43f03a148dba | core/util/shaderProgram.h | core/util/shaderProgram.h | #pragma once
#include "platform.h"
#include <string>
#include <vector>
#include <unordered_map>
class ShaderProgram {
public:
ShaderProgram();
virtual ~ShaderProgram();
GLint getGlProgram() { return m_glProgram; };
GLint getAttribLocation(const std::string& _attribName);
bool buildFromSourceSt... | #pragma once
#include "platform.h"
#include <string>
#include <vector>
#include <unordered_map>
/*
* ShaderProgram - utility class representing an OpenGL shader program
*/
class ShaderProgram {
public:
ShaderProgram();
virtual ~ShaderProgram();
/* Getters */
GLint getGlProgram() { return m_glPro... | Add comments and convenience functions | Add comments and convenience functions
| C | mit | quitejonny/tangram-es,hjanetzek/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,hjanetzek/tangram-es,hjanetzek/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,karimnaaji/tangram-es,tangrams/tangram-es,hjanetzek/tangram-es,xvilan/tangram-es,xvilan/tangram-es,tangrams/tangram... |
2d7e2de4bc36041ce62ca73cb4b11295a2271eae | lib/c/src/syscall.h | lib/c/src/syscall.h | extern void *_brk(void *addr);
extern int _open(char *path, int flags, int perm);
extern int _close(int fd);
extern int _read(int fd, void *buf, size_t n);
extern int _write(int fd, void *buf, size_t n);
extern int _lseek(int fd, long off, int whence);
extern void _Exit(int status);
extern int raise(int sig);
extern vo... | extern void *_brk(void *addr);
extern int _open(char *path, int flags, int perm);
extern int _close(int fd);
extern int _read(int fd, void *buf, size_t n);
extern int _write(int fd, void *buf, size_t n);
extern int _lseek(int fd, long off, int whence);
extern void _Exit(int status);
extern int raise(int sig);
extern vo... | Add getenv() to the arch primitive list | [lib/c] Add getenv() to the arch primitive list
| C | isc | k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc |
6210a7c68844602ee390bcce61dbb637910a3c6b | include/images/SkBitmapRegionDecoder.h | include/images/SkBitmapRegionDecoder.h | #ifndef SkBitmapRegionDecoder_DEFINED
#define SkBitmapRegionDecoder_DEFINED
#include "SkBitmap.h"
#include "SkRect.h"
#include "SkImageDecoder.h"
class SkBitmapRegionDecoder {
public:
SkBitmapRegionDecoder(SkImageDecoder *decoder, int width, int height) {
fDecoder = decoder;
fWidth = width;
... | #ifndef SkBitmapRegionDecoder_DEFINED
#define SkBitmapRegionDecoder_DEFINED
#include "SkBitmap.h"
#include "SkRect.h"
#include "SkImageDecoder.h"
#include "SkStream.h"
class SkBitmapRegionDecoder {
public:
SkBitmapRegionDecoder(SkImageDecoder *decoder, SkStream *stream,
int width, int height) {
... | Fix 3510563: memory leak in BitmapRegionDecoder. | Fix 3510563: memory leak in BitmapRegionDecoder.
Change-Id: I30b3a3806f4484d95602539def1a77a366560fdf
| C | bsd-3-clause | IllusionRom-deprecated/android_platform_external_skia,AOSPA-L/android_external_skia,VRToxin-AOSP/android_external_skia,MinimalOS/external_skia,VentureROM-L/android_external_skia,MarshedOut/android_external_skia,mozilla-b2g/external_skia,RockchipOpensourceCommunity/external_skia,Infusion-OS/android_external_skia,Plain-A... |
28a1bb74499eeadb12742b7d097d87e56ba024b8 | contrib/gcc/version.c | contrib/gcc/version.c | /* $FreeBSD$ */
#include "ansidecl.h"
#include "version.h"
const char *const version_string = "3.2.1 [FreeBSD] 20021009 (prerelease)";
| /* $FreeBSD$ */
#include "ansidecl.h"
#include "version.h"
const char *const version_string = "3.2.1 [FreeBSD] 20021119 (release)";
| Update for Gcc 3.2.1 release. | Update for Gcc 3.2.1 release.
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
436514f5dc9e4ba01d547a8e2113d09fbf0a65e9 | src/lib/test_blockdev.c | src/lib/test_blockdev.c | int main (int argc, char* argv[]) {
bd_init(NULL);
g_printf ("max LV size: %lu\n", bd_lvm_get_max_lv_size());
return 0;
}
| int main (int argc, char* argv[]) {
bd_init(NULL);
g_printf ("max LV size: %"G_GUINT64_FORMAT"\n", bd_lvm_get_max_lv_size());
return 0;
}
| Use arch-independent format string for guint64 in tests | Use arch-independent format string for guint64 in tests
Otherwise "0" is printed out even if the right number is returned by the tested
function.
| C | lgpl-2.1 | atodorov/libblockdev,vpodzime/libblockdev,rhinstaller/libblockdev,dashea/libblockdev,vpodzime/libblockdev,dashea/libblockdev,atodorov/libblockdev,rhinstaller/libblockdev,vpodzime/libblockdev,snbueno/libblockdev,rhinstaller/libblockdev,atodorov/libblockdev,snbueno/libblockdev |
0a39f2cfa0fd4a48c6eda303901a2c497e4cc0ad | config/src/apps/vespa-configproxy-cmd/proxycmd.h | config/src/apps/vespa-configproxy-cmd/proxycmd.h | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vector>
class FRT_Supervisor;
class FRT_Target;
class FRT_RPCRequest;
class FRT_Values;
namespace fnet::frt { class StandaloneFRT; }... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vector>
class FRT_Target;
class FRT_RPCRequest;
class FRT_Values;
namespace fnet::frt { class StandaloneFRT; }
struct Flags {
v... | Remove unused variable in vespa-configproxy-cmd. | Remove unused variable in vespa-configproxy-cmd.
| C | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
9f0ba44a96db7918e11ffa905878c16f044baa65 | base/scoped_handle.h | base/scoped_handle.h | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_SCOPED_HANDLE_H_
#define BASE_SCOPED_HANDLE_H_
#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base/scoped_handle_win.h... | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_SCOPED_HANDLE_H_
#define BASE_SCOPED_HANDLE_H_
#include <stdio.h>
#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base... | Add stdio to this file becasue we use FILE. | Add stdio to this file becasue we use FILE.
It starts failing with FILE, identifier not found, when
you remove the include for logging.h, which is included
in scoped_handle_win.h
Review URL: http://codereview.chromium.org/16461
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@7441 0039d316-1c4b-4281-b951-d872f20... | C | bsd-3-clause | littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,keishi/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,robclark/chromium,Jonekee... |
1f5338e7b71f56c6d2451b9b23608c851bf90c8a | compiler/cbits/genSym.c | compiler/cbits/genSym.c |
#include "Rts.h"
static HsInt GenSymCounter = 0;
HsInt genSym(void) {
if (n_capabilities == 1) {
return GenSymCounter++;
} else {
return atomic_inc((StgWord *)&GenSymCounter, 1);
}
}
|
#include "Rts.h"
static HsInt GenSymCounter = 0;
HsInt genSym(void) {
#if defined(THREADED_RTS)
if (n_capabilities == 1) {
return GenSymCounter++;
} else {
return atomic_inc((StgWord *)&GenSymCounter, 1);
}
#else
return GenSymCounter++;
#endif
}
| Fix bootstrapping of GHC with earlier versions | Fix bootstrapping of GHC with earlier versions
We can no longer use atomic_inc() in the stage1 compiler because its
prototype was recently changed.
Since the stage1 compiler is always single-threaded, only use
atomic_inc() when THREADED_RTS is defined.
| C | bsd-3-clause | mcschroeder/ghc,TomMD/ghc,fmthoma/ghc,urbanslug/ghc,da-x/ghc,olsner/ghc,vTurbine/ghc,olsner/ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,ekmett/ghc,acowley/ghc,olsner/ghc,mettekou/ghc,ml9951/ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,vTurbine/ghc,ryantm/ghc,gridaphob... |
6478bdce01f7e2363f78cb248f677c1db0bdc303 | lib/TableGen/TGPreprocessor.h | lib/TableGen/TGPreprocessor.h | //===- TGPreprocessor.h - Preprocessor for TableGen Files -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- TGPreprocessor.h - Preprocessor for TableGen Files -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Fix compilation when using gcc-4.6. Patch by wanders. | Fix compilation when using gcc-4.6. Patch by wanders.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@141178 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,... |
768d6be6353fdc725edea610a89e360f52dead82 | include/ft/sock/socket.h | include/ft/sock/socket.h | #ifndef FT_SOCK_SOCKET_H_
#define FT_SOCK_SOCKET_H_
struct ft_socket
{
struct ft_context * context;
const char * socket_class;
int ai_family;
int ai_socktype;
int ai_protocol;
struct sockaddr_storage addr;
socklen_t addrlen;
// Custom data fields
void * protocol;
void * data;
};
static inline bool ft_s... | #ifndef FT_SOCK_SOCKET_H_
#define FT_SOCK_SOCKET_H_
struct ft_socket
{
struct ft_context * context;
const char * clazz;
int ai_family;
int ai_socktype;
int ai_protocol;
struct sockaddr_storage addr;
socklen_t addrlen;
// Custom data fields
void * protocol;
void * data;
};
static inline bool ft_socket_i... | Unify name of the class. | Unify name of the class.
| C | bsd-3-clause | TeskaLabs/Frame_Transporter,TeskaLabs/SeaCat-Common-Library,TeskaLabs/Frame_Transporter,TeskaLabs/Frame-Transporter,TeskaLabs/Frame-Transporter |
f1648ed565efa9b59bf14081474b48aef1c0cea6 | libgo/runtime/getncpu-linux.c | libgo/runtime/getncpu-linux.c | // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include <features.h>
#include <sched.h>
// CPU_COUNT is only provided by glibc 2.6 or higher
#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 6)
#define CPU... | // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include <features.h>
#include <sched.h>
// CPU_COUNT is only provided by glibc 2.6 or higher
#ifndef CPU_COUNT
#define CPU_COUNT(set) _CPU_COUNT((unsigned int... | Check for CPU_COUNT itself, don't check glibc version. | runtime: Check for CPU_COUNT itself, don't check glibc version.
Fixes #38.
R=iant
CC=gofrontend-dev
https://golang.org/cl/155740043
| C | bsd-3-clause | qskycolor/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,anlhord/gofrontend,anlhord/gofrontend,anlhord/gofrontend,golang/gofrontend,qskycolor/gofrontend,qskycolor/gofrontend,golang/gofrontend,anlhord/gofrontend,qskycolor/gofrontend,anlhord/gofrontend,golang/... |
b1fa4918bb74415352dc9ff60fd995c47b551c69 | MS3/Sketches/CPU_Gridders/scatter_gridder.h | MS3/Sketches/CPU_Gridders/scatter_gridder.h | #if defined __AVX__
#include <immintrin.h>
#endif
#ifdef __CUDACC__
#include <cuComplex.h>
typedef cuDoubleComplex complexd;
#elif defined __cplusplus
#include <complex>
typedef std::complex<double> complexd;
#else
#include <complex.h>
typedef double complex complexd;
#endif
struct Double4c
{
complexd X... | #ifndef __SCATTER_GRIDDER_H
#define __SCATTER_GRIDDER_H
#if defined __AVX__
#include <immintrin.h>
#endif
#ifdef __CUDACC__
#include <cuComplex.h>
typedef cuDoubleComplex complexd;
#elif defined __cplusplus
#include <complex>
typedef std::complex<double> complexd;
#else
#include <complex.h>
typedef double... | Add simplest as possible support size func. | Add simplest as possible support size func.
| C | apache-2.0 | SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC |
a236747cee13f512f5f1708b41306533b67ebddb | PSET2/caesar.c | PSET2/caesar.c | #include <stdio.h>
#include <cs50.h>
int main(void) {
return 0;
} | #include <stdio.h>
#include <cs50.h>
int main(int argc, char *argv[]) {
// check entered key
if (argc != 2 || atoi(argv[1]) < 0) {
printf("Usage: ./caesar k\nWhere k is a non negative integer.\n");
return 1;
}
int key = atoi(argv[1]);
return 0;
}
| Add key check and convert key to int | Add key check and convert key to int
| C | unlicense | Implaier/CS50,Implaier/CS50,Implaier/CS50,Implaier/CS50 |
48fa78cf488b227b33355362ee1d7110936a6671 | compiler/modules/CommonMark/src/config.h | compiler/modules/CommonMark/src/config.h | #include "charmony.h"
#ifdef CHY_HAS_STDBOOL_H
# include <stdbool.h>
#elif !defined(__cplusplus)
typedef char bool;
# define true 1
# define false 0
#endif
#define CMARK_ATTRIBUTE(list)
#ifndef CHY_HAS_VA_COPY
#define va_copy(dest, src) ((dest) = (src))
#endif
| #include "charmony.h"
#ifdef CHY_HAS_STDBOOL_H
# include <stdbool.h>
#elif !defined(__cplusplus)
typedef char bool;
# define true 1
# define false 0
#endif
#define CMARK_ATTRIBUTE(list)
#ifndef CHY_HAS_VA_COPY
#define va_copy(dest, src) ((dest) = (src))
#endif
#define inline CHY_INLINE
| Use CHY_INLINE in CommonMark source | Use CHY_INLINE in CommonMark source
| C | apache-2.0 | rectang/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,rectang/lucy-clownfish,rectang/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clow... |
cd17e3146d7c64acb8c2fe8cb0b028244d24d656 | include/sauce/sauce.h | include/sauce/sauce.h | #ifndef SAUCE_SAUCE_H_
#define SAUCE_SAUCE_H_
#include <sauce/internal/bindings.h>
#include <sauce/internal/new_delete.h>
namespace sauce {
template<typename Module, typename NewDelete = ::sauce::internal::NewDelete>
struct Injector {
friend class SauceTest;
Injector():
newDelete() {}
templa... | #ifndef SAUCE_SAUCE_H_
#define SAUCE_SAUCE_H_
#include <sauce/internal/bindings.h>
#include <sauce/internal/new_delete.h>
namespace sauce {
template<typename Module, typename NewDelete = ::sauce::internal::NewDelete>
struct Injector {
friend class SauceTest;
Injector():
new_delete() {}
templ... | Rename member newDelete -> new_delete. | Rename member newDelete -> new_delete.
| C | mit | phs/sauce,phs/sauce,phs/sauce,phs/sauce |
2ace1bcd24aef90cc74a2d009eabc2afc6ff191f | test/number.c | test/number.c | // Copyright 2012 Rui Ueyama <rui314@gmail.com>
// This program is free software licensed under the MIT license.
#include "test.h"
void testmain(void) {
print("numeric constants");
expect(1, 0x1);
expect(17, 0x11);
expect(511, 0777);
expect(11, 0b1011); // GNU extension
expect(11, 0B1011); ... | // Copyright 2012 Rui Ueyama <rui314@gmail.com>
// This program is free software licensed under the MIT license.
#include "test.h"
void testmain(void) {
print("numeric constants");
expect(1, 0x1);
expect(1, 0X1);
expect(17, 0x11);
expect(17, 0X11);
expect(511, 0777);
expect(11, 0b1011); ... | Add tests for 0X prefix. | Add tests for 0X prefix.
| C | mit | jtramm/8cc,cpjreynolds/8cc,jtramm/8cc,8l/8cc,rui314/8cc,andrewchambers/8cc,rui314/8cc,nobody1986/8cc,jtramm/8cc,andrewchambers/8cc,vastin/8cc,gergo-/8cc,cpjreynolds/8cc,cpjreynolds/8cc,nobody1986/8cc,abc00/8cc,nobody1986/8cc,vastin/8cc,rui314/8cc,8l/8cc,vastin/8cc,abc00/8cc,andrewchambers/8cc,8l/8cc,gergo-/8cc,abc00/8c... |
8fe518a50830119365916f194dae8d458064ff70 | ext/cowboy/cowboy.c | ext/cowboy/cowboy.c | #include "cowboy.h"
VALUE mCowboy;
VALUE fft_1d(VALUE m, VALUE nums){
fftw_complex *in, *out;
fftw_plan fp;
long n;
Check_Type(nums, T_ARRAY);
n = size_of_ary(nums);
in = allocate_fftw_complex(n);
out = allocate_fftw_complex(n);
fp = fftw_plan_dft_1d(n, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
cast... | #include "cowboy.h"
VALUE mCowboy;
VALUE fft_1d(VALUE m, VALUE nums){
fftw_complex *in, *out;
fftw_plan fp;
long n;
Check_Type(nums, T_ARRAY);
n = size_of_ary(nums);
if (n == 0){
rb_raise(rb_eException, "Can't use blank array");
}
in = allocate_fftw_complex(n);
out = allocate_fftw_complex(n);
... | Handle call with empty array gracefully. (Compare to segfault earlier). | Handle call with empty array gracefully. (Compare to segfault earlier).
| C | mit | ciniglio/cowboy,ciniglio/cowboy |
e79f9d35c3fb014b4506d6b794abaac3fcd88182 | wasm/Config.h | wasm/Config.h | //===- Config.h -------------------------------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | //===- Config.h -------------------------------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | Use llvm::StringSet instead of std::set. | Use llvm::StringSet instead of std::set.
std::set is pretty slow. We generally prefer llvm::StringSet if we don't
need an sorted set.
Differential Revision: https://reviews.llvm.org/D40579
git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@319371 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/lld,llvm-mirror/lld |
9287eb6b842055a59b3b4bb21d8423dff057486d | generator.h | generator.h | //
// generator.h
// SequentialSA
//
// Created by Vincent Ramdhanie on 3/15/15.
// Copyright (c) 2015 Vincent Ramdhanie. All rights reserved.
//
#ifndef __SequentialSA__generator__
#define __SequentialSA__generator__
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#endif /* defined(__SequentialSA__gene... | //
// generator.h
// SequentialSA
//
// Created by Vincent Ramdhanie on 3/15/15.
// Copyright (c) 2015 Vincent Ramdhanie. All rights reserved.
//
#ifndef __SequentialSA__generator__
#define __SequentialSA__generator__
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#endif /* defined(__SequentialSA__gene... | Create header file with constants and function definitions | Create header file with constants and function definitions
| C | mit | vramdhanie/sequentialsa,vramdhanie/sequentialsa |
ed8efcea8af00e372992991903b316535ac9f095 | TDTChocolate/TestingAdditions/TDTRandomFixtures.h | TDTChocolate/TestingAdditions/TDTRandomFixtures.h | #import <Foundation/Foundation.h>
/**
Category methods on commonly used types for generating random instances.
Inspired by Haskell's QuickCheck.
*/
@interface NSString (TDTRandomFixtures)
+ (instancetype)randomString;
@end
@interface NSNumber (TDTRandomFixtures)
+ (instancetype)randomNumber;
@end
@interface... | #import <Foundation/Foundation.h>
/**
Category methods on commonly used types for generating random instances.
Inspired by Haskell's QuickCheck.
*/
@interface NSString (TDTRandomFixtures)
/**
@return A string consisting of random characters.
It is guranteed to be non empty.
*/
+ (instancetype)randomSt... | Document that `randomString` will never return an empty string | Document that `randomString` will never return an empty string
| C | bsd-3-clause | talk-to/Chocolate,talk-to/Chocolate |
4593c769f1e6bf7b3a243bb1f74e00332bbdf6fc | ext/wikitext.h | ext/wikitext.h | // Copyright 2008 Wincent Colaiuta
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed... | // Copyright 2008 Wincent Colaiuta
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed... | Add ruby_inspect macro for use when debugging | Add ruby_inspect macro for use when debugging
Just calls Kernel#p passing in the specified Ruby object.
Signed-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>
| C | bsd-2-clause | barnaclebarnes/wikitext,barnaclebarnes/wikitext,barnaclebarnes/wikitext,wincent/wikitext,wincent/wikitext,geni/wikitext,geni/wikitext,geni/wikitext |
c7cbb920c0e1bd747de7728454d96ba83586b502 | php_amf.h | php_amf.h | #ifndef PHP_AMF_H
#define PHP_AMF_H 1
#define PHP_AMF_VERSION "0.1"
#define PHP_AMF_WORLD_EXTNAME "amf"
PHP_FUNCTION(amf_encode);
PHP_FUNCTION(amf_decode);
extern zend_module_entry amf_module_entry;
#define phpext_amf_ptr &amf_module_entry
#endif
| /**
* PHP7 extension for Action Message Format (AMF) encoding and decoding with support for AMF0 and AMF3
*
* amfext (http://emilmalinov.com/amfext)
*
* @copyright Copyright (c) 2015 Emil Malinov
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link http://github.com/emi... | Add license comment to the header file. | Add license comment to the header file.
| C | apache-2.0 | emilkm/amfext,emilkm/amfext,emilkm/amfext,emilkm/amfext |
d952bf54fe5be958b735a3285a3f153b362aace1 | EVGEN/EVGENLinkDef.h | EVGEN/EVGENLinkDef.h | #ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ enum Process_t;
#pragma li... | #ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ enum Process_t;
#pragma li... | Add Weighting_t in the LinkDef | Add Weighting_t in the LinkDef
| C | bsd-3-clause | shahor02/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,ecalvovi/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,alisw/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,miranov25/AliRoot,coppedis/AliRoot,jgr... |
f18cd042b17d28811ae308c0c7b9e4b20d2068e9 | Expecta/EXPDefines.h | Expecta/EXPDefines.h | //
// EXPDefines.h
// Expecta
//
// Created by Luke Redpath on 26/03/2012.
// Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
//
#ifndef Expecta_EXPDefines_h
#define Expecta_EXPDefines_h
typedef void (^EXPBasicBlock)();
typedef id (^EXPIdBlock)();
typedef BOOL (^EXPBoolBlock)();
typedef NSString *(^EXPS... | //
// EXPDefines.h
// Expecta
//
// Created by Luke Redpath on 26/03/2012.
// Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
//
#ifndef Expecta_EXPDefines_h
#define Expecta_EXPDefines_h
typedef void (^EXPBasicBlock)(void);
typedef id (^EXPIdBlock)(void);
typedef BOOL (^EXPBoolBlock)(void);
typedef NSSt... | Fix warning ‘This function declaration is not a prototype’ | Fix warning ‘This function declaration is not a prototype’
| C | mit | specta/expecta |
6c4824bd141e06780af1ea4700046689af4edfb2 | src/hotplug_generic.c | src/hotplug_generic.c | /*
* MUSCLE SmartCard Development ( http://www.linuxnet.com )
*
* Copyright (C) 2000-2003
* David Corcoran <corcoran@linuxnet.com>
*
* $Id$
*/
/**
* @file
* @brief This provides a search API for hot pluggble devices.
*
* Check for platforms that have their own specific support.
* It's easier and flexible ... | /*
* MUSCLE SmartCard Development ( http://www.linuxnet.com )
*
* Copyright (C) 2000-2003
* David Corcoran <corcoran@linuxnet.com>
*
* $Id$
*/
/**
* @file
* @brief This provides a search API for hot pluggble devices.
*
* Check for platforms that have their own specific support.
* It's easier and flexible ... | Add missing ReCheckSerialReaders and HPReCheckSerialReaders() so pcsc-lite can compile on FreeBSD and others | Add missing ReCheckSerialReaders and HPReCheckSerialReaders() so
pcsc-lite can compile on FreeBSD and others
git-svn-id: f2d781e409b7e36a714fc884bb9b2fc5091ddd28@1786 0ce88b0d-b2fd-0310-8134-9614164e65ea
| C | bsd-3-clause | vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android |
edb65bb8be45202ec4b1b0dbaeb4cbe0b50e1553 | src/modules/comm.c | src/modules/comm.c | #include "comm.h"
static void inbox_received_handler(DictionaryIterator *iter, void *context) {
#if defined(PBL_COLOR)
Tuple *background_t = dict_find(iter, AppKeyColorBackground);
if(background_t) {
data_set_color(ColorBackground, (GColor){ .argb = background_t->value->int32 });
}
Tuple *sides_t = dict_f... | #include "comm.h"
static void inbox_received_handler(DictionaryIterator *iter, void *context) {
#if defined(PBL_COLOR)
Tuple *background_t = dict_find(iter, AppKeyColorBackground);
if(background_t) {
data_set_color(ColorBackground, (GColor){ .argb = background_t->value->int8 });
}
Tuple *sides_t = dict_fi... | Use more reliable union value | Use more reliable union value
| C | mit | C-D-Lewis/isotime-appstore,C-D-Lewis/isotime-appstore,C-D-Lewis/isotime-appstore,C-D-Lewis/isotime-appstore |
ae9ca499447425d2c98e0d1189b3be7bccbfe441 | src/search/state.h | src/search/state.h | /* -*- mode:linux -*- */
/**
* \file state.h
*
*
*
* \author Ethan Burns
* \date 2008-10-08
*/
#if !defined(_STATE_H_)
#define _STATE_H_
#include <iostream>
#include <vector>
#include "search_domain.h"
using namespace std;
class State {
public:
State(const SearchDomain *d, const State *parent, int g);
vir... | /* -*- mode:linux -*- */
/**
* \file state.h
*
*
*
* \author Ethan Burns
* \date 2008-10-08
*/
#if !defined(_STATE_H_)
#define _STATE_H_
#include <iostream>
#include <vector>
#include "search_domain.h"
using namespace std;
class State {
public:
State(const SearchDomain *d, const State *parent, int g);
vir... | Use floats for cost and heuristic values. | Use floats for cost and heuristic values.
| C | mit | eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf |
eff9073790e1286aa12bf1c65814d3e0132b12e1 | arch/x86/include/asm/numa_32.h | arch/x86/include/asm/numa_32.h | #ifndef _ASM_X86_NUMA_32_H
#define _ASM_X86_NUMA_32_H
extern int numa_off;
extern int pxm_to_nid(int pxm);
#ifdef CONFIG_NUMA
extern int __cpuinit numa_cpu_node(int apicid);
#else /* CONFIG_NUMA */
static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; }
#endif /* CONFIG_NUMA */
#ifdef CONFIG_HIGHMEM
exte... | #ifndef _ASM_X86_NUMA_32_H
#define _ASM_X86_NUMA_32_H
extern int numa_off;
extern int pxm_to_nid(int pxm);
#ifdef CONFIG_NUMA
extern int __cpuinit numa_cpu_node(int cpu);
#else /* CONFIG_NUMA */
static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; }
#endif /* CONFIG_NUMA */
#ifdef CONFIG_HIGHMEM
extern ... | Rename incorrectly named parameter of numa_cpu_node() | x86: Rename incorrectly named parameter of numa_cpu_node()
numa_cpu_node() prototype in numa_32.h has wrongly named
parameter @apicid when it actually takes the CPU number.
Change it to @cpu.
Reported-by: Yinghai Lu <0674548f4d596393408a51d6287a76ebba2f42aa@kernel.org>
Signed-off-by: Tejun Heo <546b05909706652891a87... | C | mit | KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Program... |
23a5b06f405219d8ea93d4d8d2ca0666d4b1105a | test/Driver/show-option-names.c | test/Driver/show-option-names.c | // RUN: %clang -c -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-SHOW-OPTION-NAMES %s
// CHECK-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO' [-Wmissing-sysroot]
// RUN: %clang -c -fno-diagnostics-show-option -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-NO-SHOW-OPTI... | // REQUIRES: x86-registered-target
// RUN: %clang -target x86_64-apple-darwin -c -isysroot /FOO %s 2>&1 | FileCheck --check-prefix=CHECK-SHOW-OPTION-NAMES %s
// CHECK-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO' [-Wmissing-sysroot]
// RUN: %clang -target x86_64-apple-darwin -c -fno-... | Fix test from r283913 to unbreak bots | [Driver] Fix test from r283913 to unbreak bots
Followup from r283913 & r283827
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55135
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@283915 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,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-cl... |
be6318b2f02e14a1b717d30691351e8415e246c1 | test/Driver/tsan.c | test/Driver/tsan.c | // RUN: %clang -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O1 -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O2 -target i386-unknown-unknown -fthread-sanitizer %s -S -emit-llvm -o - | FileCheck %s
// RUN: ... | // RUN: %clang -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O1 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang -O2 -target i386-unknown-unknown -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s
// RUN: %cl... | Use the -fsanitize=thread flag to unbreak buildbot. | Use the -fsanitize=thread flag to unbreak buildbot.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@167472 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
8166b9fe84e0dc3c8877366b58a9286b0258172f | src/modules/illume-keyboard/e_mod_main.c | src/modules/illume-keyboard/e_mod_main.c | #include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_kbd_int.h"
/* local variables */
static E_Kbd_Int *ki = NULL;
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume Keyboard" };
EAPI void *
e_modapi_init(E_Module *m)
{
if (!il_kbd_config_init(m)) return NULL;
ki = e_kbd_int... | #include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_kbd_int.h"
/* local variables */
static E_Kbd_Int *ki = NULL;
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume Keyboard" };
EAPI void *
e_modapi_init(E_Module *m)
{
if (!il_kbd_config_init(m)) return NULL;
ki = e_kbd_int... | Use correct module directory when making keyboard. Previous commit fixed compiler warnings also. | Use correct module directory when making keyboard.
Previous commit fixed compiler warnings also.
SVN revision: 43875
| C | bsd-2-clause | FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tasn/enlightenment,tasn/enlightenment,rvandegrift/e,FlorentRevest/Enlightenment |
c74e3fa443e193afb5274b672eccd58d2d7cff28 | test/test_rtp.c | test/test_rtp.c | #include "rtp/kms-rtp-endpoint.h"
#include <glib.h>
#define LOCALNAME "kms/rtp/1"
static KmsEndpoint*
create_endpoint() {
KmsEndpoint *ep;
gchar *name;
name = g_strdup_printf(LOCALNAME);
ep = g_object_new(KMS_TYPE_RTP_ENDPOINT, "localname", name, NULL);
g_free(name);
return ep;
}
static void
check_endpoint(... | #include "rtp/kms-rtp-endpoint.h"
#include <glib.h>
#define LOCALNAME "kms/rtp/1"
static KmsEndpoint*
create_endpoint() {
KmsEndpoint *ep;
gchar *name;
name = g_strdup_printf(LOCALNAME);
ep = g_object_new(KMS_TYPE_RTP_ENDPOINT, "localname", name, NULL);
g_free(name);
return ep;
}
static void
check_endpoint(... | Create and delete rtp connections | Create and delete rtp connections
| C | lgpl-2.1 | mparis/kurento-media-server,mparis/kurento-media-server,lulufei/kurento-media-server,shelsonjava/kurento-media-server,Kurento/kurento-media-server,todotobe1/kurento-media-server,Kurento/kurento-media-server,lulufei/kurento-media-server,TribeMedia/kurento-media-server,todotobe1/kurento-media-server,TribeMedia/kurento-me... |
e135d72967f8dfc5c5cebea4caaf3d7240f7493c | ui/reflectionview.h | ui/reflectionview.h | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyContainer;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI ReflectionView: public QWidget, publ... | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyContainer;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI ReflectionView: public QWidget, publ... | Update reflection view to use view location notification. | Update reflection view to use view location notification.
| C | mit | joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api |
f5cdd574a531ed156d30efe2e06c4cf463469588 | libkmod/missing.h | libkmod/missing.h | #pragma once
#include <unistd.h>
#include <sys/syscall.h>
#ifdef HAVE_LINUX_MODULE_H
#include <linux/module.h>
#endif
#ifndef MODULE_INIT_IGNORE_MODVERSIONS
# define MODULE_INIT_IGNORE_MODVERSIONS 1
#endif
#ifndef MODULE_INIT_IGNORE_VERMAGIC
# define MODULE_INIT_IGNORE_VERMAGIC 2
#endif
#ifndef __NR_finit_module
#... | #pragma once
#include <unistd.h>
#include <sys/syscall.h>
#ifdef HAVE_LINUX_MODULE_H
#include <linux/module.h>
#endif
#ifndef MODULE_INIT_IGNORE_MODVERSIONS
# define MODULE_INIT_IGNORE_MODVERSIONS 1
#endif
#ifndef MODULE_INIT_IGNORE_VERMAGIC
# define MODULE_INIT_IGNORE_VERMAGIC 2
#endif
#ifndef __NR_finit_module
#... | Make sure there's NUL byte at the end of strndupa | Make sure there's NUL byte at the end of strndupa
Since strcpy() doesn't ensure we have a NUL byte in the resulting
string, use alloca() + memcpy(). Also make sure we don't evaluate "s"
twice.
| C | lgpl-2.1 | pmmccorm/kmod,lpereira/kmod,Distrotech/kmod,pmmccorm/kmod,pmmccorm/kmod,lucasdemarchi/kmod,lpereira/kmod,Distrotech/kmod,lucasdemarchi/kmod,Distrotech/kmod,lpereira/kmod,lucasdemarchi/kmod |
d1655ea772cb9f0c6ecad7a4523629ea4c6ce560 | platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/val/val_client_defs.h | platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/val/val_client_defs.h | /** @file
* Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ht... | /** @file
* Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ht... | Add missing inclusion of crypto_types.h | psa: Add missing inclusion of crypto_types.h
val_client_defs.h includes crypto_values.h, but the latter requires
type definitions from crypto_types.h.
| C | apache-2.0 | mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed |
e1d9f7f6473476c9da658edefe08fa0f9b3b4a50 | include/rapidcheck/shrinkable/Transform.h | include/rapidcheck/shrinkable/Transform.h | #pragma once
#include "rapidcheck/Shrinkable.h"
namespace rc {
namespace shrinkable {
//! Maps the given shrinkable using the given mapping callable.
template<typename T, typename Mapper>
Shrinkable<typename std::result_of<Mapper(T)>::type>
map(Mapper &&mapper, Shrinkable<T> shrinkable);
//! Returns a shrinkable eq... | #pragma once
#include "rapidcheck/Shrinkable.h"
namespace rc {
namespace shrinkable {
//! Maps the given shrinkable recursively using the given mapping callable.
template<typename T, typename Mapper>
Shrinkable<typename std::result_of<Mapper(T)>::type>
map(Mapper &&mapper, Shrinkable<T> shrinkable);
//! Returns a s... | Clarify doc comment about shrinkable::map | Clarify doc comment about shrinkable::map
| C | bsd-2-clause | whoshuu/rapidcheck,tm604/rapidcheck,whoshuu/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,whoshuu/rapidcheck,unapiedra/rapidfuzz,tm604/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz |
0f6dd291a29fd99765469485ddea93c0c2b927d6 | src/utils/cont.h | src/utils/cont.h | /*
Copyright (c) 2012 250bpm s.r.o.
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 to use, copy, modify, merge, pu... | /*
Copyright (c) 2012 250bpm s.r.o.
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 to use, copy, modify, merge, pu... | Use offsetof() macro instead of expanded form. | Use offsetof() macro instead of expanded form.
Signed-off-by: Martin Sustrik <4dd6061be1198639e8b05ce4fd5ead7a0dcaa0f4@250bpm.com>
| C | mit | pakozm/nanomsg,modulexcite/nanomsg,kaostao/nanomsg,reqshark/nanomsg,potatogim/nanomsg,krafczyk/nanomsg,modulexcite/nanomsg,JackDunaway/featherweight-nanomsg,cosin2008/nanomsg.NET,zerotacg/nanomsg,yan97ao/nanomsg,pch957/nanomsg,smithed/nanomsg,snikulov/nanomsg,gdamore/mamomsg,imp/nanomsg,tempbottle/nanomsg,pch957/nanoms... |
f4a3cffb0a988313acdb83a6d658001c8c06e07b | src/lib/MSPUBConstants.h | src/lib/MSPUBConstants.h | namespace libmspub
{
const unsigned EMUS_IN_INCH = 914400;
}
| /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* libmspub
* Version: MPL 1.1 / GPLv2+ / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified ... | Add license header to the file | Add license header to the file
| C | mpl-2.0 | LibreOffice/libmspub,LibreOffice/libmspub,LibreOffice/libmspub |
8106c20e81cb296b15da59763639b9dfe33752e8 | sys/mips/include/pltfm.h | sys/mips/include/pltfm.h | /*-
* JNPR: pltfm.h,v 1.5.2.1 2007/09/10 05:56:11 girish
* $FreeBSD$
*/
#ifndef _MACHINE_PLTFM_H_
#define _MACHINE_PLTFM_H_
/*
* This files contains platform-specific definitions.
*/
#define SDRAM_ADDR_START 0 /* SDRAM addr space */
#define SDRAM_ADDR_END (SDRAM_ADDR_START + (1024*0x100000))
#define SDRAM_MEM_S... | /*-
* JNPR: pltfm.h,v 1.5.2.1 2007/09/10 05:56:11 girish
* $FreeBSD$
*/
#ifndef _MACHINE_PLTFM_H_
#define _MACHINE_PLTFM_H_
/*
* This files contains platform-specific definitions.
*/
#define SDRAM_ADDR_START 0 /* SDRAM addr space */
#define SDRAM_ADDR_END (SDRAM_ADDR_START + (1024*0x100000))
#define SDRAM_MEM_S... | Trim unreferenced goo. SDRAM likely should be next, but it is still referenced. | Trim unreferenced goo. SDRAM likely should be next, but it is still
referenced.
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
64c2495f3b46fc3bd623a7c1b534ffb7e58c7647 | lib/CL/clIcdGetPlatformIDsKHR.c | lib/CL/clIcdGetPlatformIDsKHR.c | #include <assert.h>
#include <string.h>
#include "pocl_cl.h"
/*
* Provide the ICD loader the specified function to get the pocl platform.
*
* TODO: the functionality of this seems the same as that of clGetPlatformIDs.
* but we cannot call that, as it is defined in the ICD loader itself.
*
*/
extern struct _cl... | #include <assert.h>
#include <string.h>
#include "pocl_cl.h"
/*
* GetPlatformIDs that support ICD.
* This function is required by the ICD specification.
*/
extern struct _cl_platform_id _platforms[1];
CL_API_ENTRY cl_int CL_API_CALL
clIcdGetPlatformIDsKHR(cl_uint num_entries,
cl_p... | Fix nonsense comment + remove duplicate code. | Fix nonsense comment + remove duplicate code.
| C | mit | vkorhonen/pocl,vkorhonen/pocl,0charleschen0/pocl,pocl/pocl,pocl/pocl,rjodin/pocl,0charleschen0/pocl,maZZZu/pocl,jrprice/pocl,pavanky/pocl,Oblomov/pocl,sting47/pocl,rjodin/pocl,Oblomov/pocl,dsandersimgtec/pocl,Oblomov/pocl,hugwijst/pocl,dsandersimgtec/pocl,sting47/pocl,jrprice/pocl,pocl/pocl,jrprice/pocl,franz/pocl,pava... |
432db2cd6dd47eebf95e358af96c3c08962b57f6 | Eigen/src/Core/util/ReenableStupidWarnings.h | Eigen/src/Core/util/ReenableStupidWarnings.h | #ifdef EIGEN_WARNINGS_DISABLED
#undef EIGEN_WARNINGS_DISABLED
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
#ifdef _MSC_VER
#pragma warning( pop )
#elif defined __INTEL_COMPILER
#pragma warning pop
#elif defined __clang__
#pragma clang diagnostic pop
#elif defined __NVCC__
#pragma diag_warn... | #ifdef EIGEN_WARNINGS_DISABLED
#undef EIGEN_WARNINGS_DISABLED
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
#ifdef _MSC_VER
#pragma warning( pop )
#elif defined __INTEL_COMPILER
#pragma warning pop
#elif defined __clang__
#pragma clang diagnostic pop
#elif defined __NVCC__
#pragma diag_defa... | Revert the nvcc messages to their default severity instead of the forcing them to be warnings | Revert the nvcc messages to their default severity instead of the forcing them to be warnings
| C | bsd-3-clause | ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,pasuka/eigen,ROCmSoftwarePlatform/hipeigen,pasuka/eigen,pasuka/eigen,ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,ROCmSoftwarePlatform/hipeigen,ritsu1228/eigen,ritsu1228/eigen,pasuka/eigen,ritsu1228/eigen,pasuka/eigen |
a3270e718aa0c5dd341968b80324ae6d09a52467 | src/luaint/gen.h | src/luaint/gen.h | /*
* Copyright (C) 2015 Luke San Antonio and Hazza Alkaabi
* All rights reserved.
*/
#pragma once
#include <string>
#include <vector>
#include "../gen/terrain.h"
#include "common.h"
extern "C"
{
#include "lua.h"
}
namespace game { namespace luaint
{
struct Terrain_Gen_Config
{
void add_option(std::strin... | /*
* Copyright (C) 2015 Luke San Antonio and Hazza Alkaabi
* All rights reserved.
*/
#pragma once
#include <string>
#include <vector>
#include "../gen/terrain.h"
#include "common.h"
extern "C"
{
#include "lua.h"
}
namespace game { namespace luaint
{
struct Terrain_Gen_Config
{
void add_option(std::strin... | Add comment to the Terrain_Gen_Mod struct | Add comment to the Terrain_Gen_Mod struct
| C | bsd-3-clause | RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine |
1200ec14e9e0ec6b27033f59778c7c4dd6690ca4 | c_src/indexed_ewah.h | c_src/indexed_ewah.h | #pragma once
#include <stdint.h>
#include <stdlib.h>
#include "ewok.h"
enum { N_DIVISIONS = 65536, LOG2_DIVISIONS = 16 };
struct indexed_ewah_map {
struct ewah_bitmap *map;
size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS];
};
/* Build an index on top of an existing libewok EWAH map. */
e... | #pragma once
#include <stdint.h>
#include <stdlib.h>
#include "ewok.h"
enum { N_DIVISIONS = 1<<14 };
struct indexed_ewah_map {
struct ewah_bitmap *map;
size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS];
};
/* Build an index on top of an existing libewok EWAH map. */
extern void ewah_build... | Change number of divisions in index to 2^14 | Change number of divisions in index to 2^14
| C | mit | ratelle/erl_ip_index,ratelle/erl_ip_index,ratelle/erl_ip_index |
cc79cb803ad27d92e3e44e89b59c5a6521e06d44 | Alc/converter.h | Alc/converter.h | #ifndef CONVERTER_H
#define CONVERTER_H
#include "alMain.h"
#include "alu.h"
#ifdef __cpluspluc
extern "C" {
#endif
typedef struct SampleConverter {
enum DevFmtType mSrcType;
enum DevFmtType mDstType;
ALsizei mNumChannels;
ALsizei mSrcTypeSize;
ALsizei mDstTypeSize;
ALint mSrcPrepCount;
... | #ifndef CONVERTER_H
#define CONVERTER_H
#include "alMain.h"
#include "alu.h"
#ifdef __cpluspluc
extern "C" {
#endif
typedef struct SampleConverter {
enum DevFmtType mSrcType;
enum DevFmtType mDstType;
ALsizei mNumChannels;
ALsizei mSrcTypeSize;
ALsizei mDstTypeSize;
ALint mSrcPrepCount;
... | Reduce the size of the temp input buffer | Reduce the size of the temp input buffer
| C | lgpl-2.1 | aaronmjacobs/openal-soft,aaronmjacobs/openal-soft |
ab55a43fcd48953d0d76599671efa6f5a82bee80 | uwsgiEngine/plugin.h | uwsgiEngine/plugin.h | /*
* Copyright (C) 2013-2014 Daniel Nicoletti <dantti12@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any late... | /*
* Copyright (C) 2013-2014 Daniel Nicoletti <dantti12@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any late... | Revert "Possibly fixed alignment warning" | Revert "Possibly fixed alignment warning"
This reverts commit 3111a7ae00cf12f0f8e0f357fb122b24470e4051.
| C | bsd-3-clause | buschmann23/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst,simonaw/cutelyst,simonaw/cutelyst,cutelyst/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst |
c26911e369cd35262a3ff74693024bab8e99c088 | xchainer/macro.h | xchainer/macro.h | #pragma once
#ifdef NDEBUG
#define XCHAINER_DEBUG false
#else // NDEBUG
#define XCHAINER_DEBUG true
#endif // NDEBUG
#ifndef XCHAINER_HOST_DEVICE
#ifdef __CUDACC__
#define XCHAINER_HOST_DEVICE __host__ __device__
#else // __CUDA__
#define XCHAINER_HOST_DEVICE
#endif // __CUDACC__
#endif // XCHAINER_HOST_DEVICE
... | #pragma once
#include <cassert>
#ifdef NDEBUG
#define XCHAINER_DEBUG false
#else // NDEBUG
#define XCHAINER_DEBUG true
#endif // NDEBUG
#define XCHAINER_ASSERT(...) \
do { \
if (XCHAINER_DEBUG) { ... | Add XCHAINER_ASSERT, an alternative assert that forcibly uses the expression syntactically | Add XCHAINER_ASSERT, an alternative assert that forcibly uses the expression syntactically
| C | mit | chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,hvy/chainer,keisuke-umezawa/chainer,jnishi/chainer,niboshi/chainer,jnishi/chainer,niboshi/chainer,ktnyt/chainer,niboshi/chainer,tkerola/chainer,ktnyt/chainer,keisuke-umezawa/chainer,niboshi/chainer,pfnet/chainer,wkentaro/chainer,hvy/chainer,chainer/chainer,hvy/ch... |
9dc2130e92fb14cd7ceb259a08dabe5ace2d41d1 | effects/startup.h | effects/startup.h | #ifndef __STARTUP_H__
#define __STARTUP_H__
#include "types.h"
#ifndef X
#define X(x) ((x) + 0x81)
#endif
#ifndef Y
#define Y(y) ((y) + 0x2c)
#endif
extern int frameCount;
extern int lastFrameCount;
extern struct List *VBlankEvent;
typedef struct Effect {
/* AmigaOS is active during this step. Loads resources fr... | #ifndef __STARTUP_H__
#define __STARTUP_H__
#include "types.h"
#ifndef X
#define X(x) ((x) + 0x81)
#endif
#ifndef HP
#define HP(x) (X(x) / 2)
#endif
#ifndef Y
#define Y(y) ((y) + 0x2c)
#endif
#ifndef VP
#define VP(y) (Y(y) & 255)
#endif
extern int frameCount;
extern int lastFrameCount;
extern struct List *VBlankE... | Add default calculation of horizontal & vertical position. | Add default calculation of horizontal & vertical position.
| C | artistic-2.0 | cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene |
d1aff3f0750596fbb1ffeffa858c9db2f09a215d | arch/amiga/include/psl.h | arch/amiga/include/psl.h | /* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
#include <m68k/psl.h>
#endif
| /* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
/* Interrupt priority `levels'; not mutually exclusive. */
#define IPL_NONE -1
#define IPL_BIO 3 /* block I/O */
#define IPL_NET 3 /* network */
#define IPL_TTY 4 /* terminal */
#define IPL_CLOCK 4 /* clock */
... | Add IPL_ and IST_ constants in preparation for the Amiga ISA-kit | Add IPL_ and IST_ constants in preparation for the Amiga ISA-kit
| C | isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars |
3ba54a5b44af53af3a3f1c7641261bd605c9a441 | SSPSolution/ResourceLib/DefineHeader.h | SSPSolution/ResourceLib/DefineHeader.h | #pragma once
#define DLLEXPORT
#ifdef DLLEXPORT
#define DLL_OPERATION __declspec(dllexport)
#endif
#include <iostream>
| #pragma once
#ifdef RESOURCELIB_EXPORTS
#define DLL_OPERATION __declspec(dllexport)
#else
#define DLL_OPERATION __declspec(dllimport)
#endif
#include <iostream>
| FIX dllcondition to use the correct macro name | FIX dllcondition to use the correct macro name
RESOURCELIB_EXPORTS is a defined preprocessor macro, not DLLEXPORTS
| C | apache-2.0 | Chringo/SSP,Chringo/SSP |
55559595b273d87c11951b14f051dddb14cb5939 | test/CodeGen/bitscan-builtins.c | test/CodeGen/bitscan-builtins.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
// Don't include mm_malloc.h, it's system specific.
#define __MM_MALLOC_H
#include <immintrin.h>
int test_bit_scan_forward(int a) {
return _bit_scan_forward(a);
// CHECK: @test_bit_scan_forward
// CHECK: %[[call:.*]] = call i32 @llv... | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
// Don't include mm_malloc.h, it's system specific.
#define __MM_MALLOC_H
#include <immintrin.h>
int test_bit_scan_forward(int a) {
return _bit_scan_forward(a);
// CHECK: @test_bit_scan_forward
// CHECK: %[[call:.*]] = call i32 @llv... | Test fix -- use captured call result instead of hardcoded %2. | Test fix -- use captured call result instead of hardcoded %2.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@272573 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
cdd545fda02f9cc72a309c473a32377b70f66946 | WildcardPattern.h | WildcardPattern.h | #import <Cocoa/Cocoa.h>
@interface WildcardPattern : NSObject {
NSString* pattern_;
}
- (id) initWithString: (NSString*) s;
- (BOOL) isMatch: (NSString*) s;
@end
| /*
* Copyright (c) 2006 KATO Kazuyoshi <kzys@8-p.info>
* This source code is released under the MIT license.
*/
#import <Cocoa/Cocoa.h>
@interface WildcardPattern : NSObject {
NSString* pattern_;
}
- (id) initWithString: (NSString*) s;
- (BOOL) isMatch: (NSString*) s;
@end
| Add copyright and license header. | Add copyright and license header.
| C | mit | kzys/greasekit,sohocoke/greasekit,chrismessina/greasekit,tbodt/greasekit |
71b81539a49b9f1645e4e79fa27073f7b0aab55a | CPPace/CPPace.Lib/SetFunctions.h | CPPace/CPPace.Lib/SetFunctions.h | #pragma once
#include "Export.h"
#include <set>
#include <vector>
using namespace std;
class DLLEXPORT SetFunctions {
public:
static set<int> set_union_two(set<int>& s1, set<int>& s2);
static set<int> set_intersect_two(set<int>& s1, set<int>& s2);
static set<int> set_intersect_three(set<int>& s1, set<int>& s2... | #pragma once
#include "EXPORT.h"
#include <set>
#include <vector>
using namespace std;
class DLLEXPORT SetFunctions {
public:
static set<int> set_union_two(set<int>& s1, set<int>& s2);
static set<int> set_intersect_two(set<int>& s1, set<int>& s2);
static set<int> set_intersect_three(set<int>& s1, set<int>& s2... | Correct casing of EXPORT.h import | Correct casing of EXPORT.h import
| C | mit | Madsen90/Pace17,Madsen90/Pace17,Madsen90/Pace17 |
bd55c2cbfc4524de918cbfb53812bd6b93fe227a | src/lib/hex-dec.c | src/lib/hex-dec.c | /* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hex-dec.h"
void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size)
{
unsigned int i;
for (i = 0; i < hexstr_size; i++) {
unsigned int value = dec & 0x0f;
if (value < 10)
hexstr[hexstr... | /* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hex-dec.h"
void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size)
{
unsigned int i;
for (i = 0; i < hexstr_size; i++) {
unsigned int value = dec & 0x0f;
if (value < 10)
hexstr[hexstr... | Allow data to contain also lowercase hex characters. | hex2dec(): Allow data to contain also lowercase hex characters.
| C | mit | LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot |
8e84757da4fb5ba9aa28b384d5c9df6e4faa16ac | src/magicmatcher_p.h | src/magicmatcher_p.h | #ifndef MAGICMATCHER_P_H
#define MAGICMATCHER_P_H
#include "magicmatcher.h"
#include "qmimetype.h"
#include <QtCore/QFileInfo>
QT_BEGIN_NAMESPACE
class FileMatchContext
{
Q_DISABLE_COPY(FileMatchContext)
public:
// Max data to be read from a file
enum { MaxData = 2500 };
explicit FileMatchContext(... | #ifndef MAGICMATCHER_P_H
#define MAGICMATCHER_P_H
#include "magicmatcher.h"
#include "qmimetype.h"
#include <QtCore/QFileInfo>
QT_BEGIN_NAMESPACE
class FileMatchContext
{
Q_DISABLE_COPY(FileMatchContext)
public:
// Max data to be read from a file
// TODO: hardcoded values are no good, this should be d... | Add TODO. But first we need to parse mime.cache | Add TODO. But first we need to parse mime.cache
| C | lgpl-2.1 | qtproject/playground-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,d1vanov/qt4-mimetypes,qtproject/playground-mimetypes,qtproject/playground-mimetypes,qt... |
cc0fdd497c22d442297ec0ac33578272acb7a462 | include/avarix/register.h | include/avarix/register.h | /**
* @file
* @brief Tools to work with registers
*/
//@{
#ifndef AVARIX_REGISTER_H__
#define AVARIX_REGISTER_H__
#include <avr/io.h>
/** @brief Set a register with I/O CCP disabled
*
* Interrupts are not disabled during the process.
*
* @note This can be achieved in less cycles for some I/O registers but thi... | /**
* @file
* @brief Tools to work with registers
*/
//@{
#ifndef AVARIX_REGISTER_H__
#define AVARIX_REGISTER_H__
#include <avr/io.h>
/** @brief Set a register with I/O CCP disabled
*
* Interrupts are not disabled during the process.
*
* @note This can be achieved in less cycles for some I/O registers but thi... | Fix ccp_io_write() not being static as it should | Fix ccp_io_write() not being static as it should
| C | mit | robotter/avarix,robotter/avarix,robotter/avarix |
fc7577a0dfaefd763430cd42476b5d09ce1ef394 | msgpack/msgpack.h | msgpack/msgpack.h | //
// msgpack.h
// msgpack
//
// Created by Ricardo Pereira on 13/10/2017.
//
//
#import <UIKit/UIKit.h>
//! Project version number for msgpack.
FOUNDATION_EXPORT double msgpackVersionNumber;
//! Project version string for msgpack.
FOUNDATION_EXPORT const unsigned char msgpackVersionString[];
// In this header, ... | //
// msgpack.h
// msgpack
//
// Created by Ricardo Pereira on 13/10/2017.
//
//
#import <Foundation/Foundation.h>
//! Project version number for msgpack.
FOUNDATION_EXPORT double msgpackVersionNumber;
//! Project version string for msgpack.
FOUNDATION_EXPORT const unsigned char msgpackVersionString[];
// In thi... | Remove UIKit usage by replacing it with Foundation | Remove UIKit usage by replacing it with Foundation
| C | apache-2.0 | rvi/msgpack-objective-C,rvi/msgpack-objective-C,rvi/msgpack-objective-C |
6611ff0042232589522e2b0f8bfe0f30b67e6d5e | IRCCloud/config.h | IRCCloud/config.h | //
// config.h
// IRCCloud
//
// Created by Sam Steele on 7/13/13.
// Copyright (c) 2013 IRCCloud, Ltd. All rights reserved.
//
#ifndef IRCCloud_config_h
#define IRCCloud_config_h
#define HOCKEYAPP_TOKEN nil
#define CRASHLYTICS_TOKEN nil
#define CRASHLYTICS_SECRET nil
#endif
| //
// config.h
// IRCCloud
//
// Created by Sam Steele on 7/13/13.
// Copyright (c) 2013 IRCCloud, Ltd. All rights reserved.
//
#ifndef IRCCloud_config_h
#define IRCCloud_config_h
#endif
| Remove nil tokens from conf | Remove nil tokens from conf
| C | apache-2.0 | irccloud/ios,irccloud/ios,irccloud/ios,iOSTestApps/irccloud-ios,DreamHill/ios,irccloud/ios,irccloud/ios |
9ee259d9a29d83d79d912d1716b4044c63e90343 | tests/unit/glkunit.h | tests/unit/glkunit.h | #ifndef GLKUNIT_H
#define GLKUNIT_H
#include <stdio.h>
#define _BEGIN do {
#define _END } while(0);
/* msg must be a string literal */
#define _ASSERT(expr, msg, ...) _BEGIN \
if( !(expr) ) { \
fprintf(stderr, "Assertion failed: " msg "\n", __VA_ARGS__); \
return 0; \
} _END
#define SUCCEED ... | #ifndef GLKUNIT_H
#define GLKUNIT_H
#include <stdio.h>
#define _BEGIN do {
#define _END } while(0);
/* msg must be a string literal */
#define _ASSERT(expr, msg, ...) _BEGIN \
if( !(expr) ) { \
fprintf(stderr, "Assertion failed: " msg "\n", __VA_ARGS__); \
return 0; \
} _END
#define SUCCEED ... | Print more informative assert message | Print more informative assert message
ASSERT_EQUAL() is for int-like types that will print with %d.
| C | bsd-3-clause | wmvanvliet/Chimara,wmvanvliet/Chimara,wmvanvliet/Chimara,wmvanvliet/Chimara,wmvanvliet/Chimara |
1fd63e3c050a4f111b3d16e57ff1486b8b4cd1d2 | test/small2/union6.c | test/small2/union6.c | #include "../small1/testharness.h"
// NUMERRORS 1
union {
struct {
int *a, *b;
} f1;
int f2;
} __TAGGED u;
int i;
int main() {
u.f2 = 5; // now u.f1.a = 5
u.f1.b = &i; // now the tag says that u.f1 is active
i = * u.f1.a; //ERROR(1): Null-pointer
}
| #include "../small1/testharness.h"
// NUMERRORS 1
union {
struct {
int *a, *b;
} f1;
int f2;
} __TAGGED u;
int i;
int main() {
u.f2 = 5; // now u.f1.a = 5
u.f1.b = &i; // now the tag says that u.f1 is active
i = * u.f1.a; //ERROR(1): Null pointer
}
| Fix a soundness bug in tagged unions that have fields larger than one word. This fix uses memset to clear such fields, although we could probably optimize this if needed. | Fix a soundness bug in tagged unions that have fields larger than one word. This fix uses memset to clear such fields, although we could probably optimize this if needed.
| C | bsd-3-clause | samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c |
661a72f697ab5a4a5b3e78194181ae90391b97ad | pkg/stis/calstis/include/stisversion.h | pkg/stis/calstis/include/stisversion.h | /* This string is written to the output primary header as CAL_VER. */
# define STIS_CAL_VER "2.28 (09-March-2010) cfitsio test"
| /* This string is written to the output primary header as CAL_VER. */
# define STIS_CAL_VER "2.29 (24-March-2010) cfitsio test"
| Change the version number and date. | Change the version number and date.
git-svn-id: cc674101e2b794ddc2100b657215d55256e3fd48@8968 fe389314-cf27-0410-b35b-8c050e845b92
| C | bsd-3-clause | jhunkeler/hstcal,jhunkeler/hstcal,jhunkeler/hstcal |
a52a248ec8d38168dd15989ec6daacad1d43bdbb | test/Driver/amdgpu-toolchain.c | test/Driver/amdgpu-toolchain.c | // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
// AS_LINK-LABEL: clang
// AS_LINK: "-cc1as"
// AS_LINK-LABEL: lld
// AS_LINK: "-flavor" "gnu" "-target" "amdgcn--amdhsa"
// REQUIRES: clang-driver
| // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
// AS_LINK: /clang
// AS_LINK-SAME: "-cc1as"
// AS_LINK: /lld
// AS_LINK-SAME: "-flavor" "gnu" "-target" "amdgcn--amdhsa"
| Fix test to pass when the directory name has lld in it. | Fix test to pass when the directory name has lld in it.
CHECK-LABEL assumes that there is only one occurrence of the match.
The output looks like:
clang version 3.8.0 (trunk 247999)
....
/path/to/build/dir/bin/clang-3.8 ....
If the path contains lld, the second CHECK-LABEL matches it and we fail since
there is no -... | C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
acf0dedb0e15ebb0cc98df0e00a1e7616dc16f4e | src/xdictlib.h | src/xdictlib.h |
#ifndef H_XDICTLIB
#define H_XDICTLIB
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
/*
The |xdict| interface.
*/
#define XDICT_MAXLENGTH 10 /* 0..9 characters */
struct xdict {
struct word_entry *words[XDICT_MAXLENGTH];
size_t cap[XDICT_MAXLENGTH];
size_t len[XDICT_MAXLENGTH];
... |
#ifndef H_XDICTLIB
#define H_XDICTLIB
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
/*
The |xdict| interface.
*/
#define XDICT_MAXLENGTH 16 /* 0..15 characters */
struct xdict {
struct word_entry *words[XDICT_MAXLENGTH];
size_t cap[XDICT_MAXLENGTH];
size_t len[XDICT_MAXLENGTH];
... | Increase XDICT_MAXLENGTH from 9+1 to 15+1. | Increase XDICT_MAXLENGTH from 9+1 to 15+1.
| C | mit | Quuxplusone/xword |
2b803a4d6e2f425633eabf2a364ffd9972a1b3d0 | src/Divider.h | src/Divider.h | #ifndef DIVIDER_H
#define DIVIDER_H
class Divider {
public:
Divider(int interval = 1) {
setInterval(interval);
}
void setInterval(int interval) {
this->interval = interval;
clockCounter = interval - 1;
}
void tick() {
clockCounter++;
if (clockCounter == interval) {
clockCounter = 0;
}
... | #ifndef DIVIDER_H
#define DIVIDER_H
class Divider {
public:
Divider(int interval = 1) {
setInterval(interval);
reset();
}
void setInterval(int interval) {
if (interval < 1) {
resetValue = 0;
}
else {
resetValue = interval - 1;
}
}
void reset() {
clockCounter = resetValue;
}
... | Rewrite divider to change interval without resetting it | Rewrite divider to change interval without resetting it
| C | mit | scottjcrouch/ScootNES,scottjcrouch/ScootNES,scottjcrouch/ScootNES |
02768e952fd7f1789b146ebbfdc6ecdd54e3f72a | UIforETW/Version.h | UIforETW/Version.h | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.48f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// incr... | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.49f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// incr... | Increment version number to 1.49 | Increment version number to 1.49
| C | apache-2.0 | google/UIforETW,mwinterb/UIforETW,mwinterb/UIforETW,ariccio/UIforETW,mwinterb/UIforETW,google/UIforETW,ariccio/UIforETW,ariccio/UIforETW,google/UIforETW,google/UIforETW,ariccio/UIforETW |
619091d3ae52943e7dfd093073eb4027146e093f | platform/VersatilePB/srcs/poweroff.c | platform/VersatilePB/srcs/poweroff.c | /*
* copyright 2015 wink saville
*
* licensed under the apache license, version 2.0 (the "license");
* you may not use this file except in compliance with the license.
* you may obtain a copy of the license at
*
* http://www.apache.org/licenses/license-2.0
*
* unless required by applicable law or agreed to... | /*
* copyright 2015 wink saville
*
* licensed under the apache license, version 2.0 (the "license");
* you may not use this file except in compliance with the license.
* you may obtain a copy of the license at
*
* http://www.apache.org/licenses/license-2.0
*
* unless required by applicable law or agreed to... | Make the registers address point to volatile memory. | Make the registers address point to volatile memory.
| C | apache-2.0 | winksaville/sadie,winksaville/sadie |
9dc6b784c3c1a4c800ee111e2d317d2ddd02fb2b | src/HDD/FileSystem.h | src/HDD/FileSystem.h | #ifndef FILESYSTEM_H
#define FILESYSTEM_H
#include "Partition.h"
#include <vector>
#include <string>
class Directory;
enum class FileType {
File, Directory
};
class File : public HDDBytes {
std::string _name;
public:
std::string getName(){return _name;}
//virtual void setName(const std::string& ... | #ifndef FILESYSTEM_H
#define FILESYSTEM_H
#include "Partition.h"
#include <vector>
#include <string>
class Directory;
enum class FileType {
File, Directory
};
class File : public HDDBytes {
public:
virtual FileType getType();
virtual Directory * dir() {return nullptr;};
};
class Directory : public ... | Remove unused methods in File | Remove unused methods in File
| C | mit | TWal/ENS_sysres,TWal/ENS_sysres,TWal/ENS_sysres,TWal/ENS_sysres |
03e4a15a06dc49f066d3ead31abec4fb28ac4704 | include/symbol.h | include/symbol.h | #ifndef SCC_SYMBOL_HEADER
#define SCC_SYMBOL_HEADER
#include "syntax.h"
typedef struct Symbol
{
int level;
char *name;
// used in semantic analysis
Syntax * declaration;
// used in intermediate code generation
char *var_name;
} Symbol;
Symbol * symbol_new();
void symbol_delete(Symbol * sym... | #ifndef SCC_SYMBOL_HEADER
#define SCC_SYMBOL_HEADER
#include "syntax.h"
typedef struct Symbol
{
int level;
char *name;
union
{
// used in semantic analysis
Syntax * declaration;
// used in intermediate code generation
char *var_name;
// used in target code ge... | Add a member for target code generation. | Add a member for target code generation.
| C | mit | RyanWangGit/scc |
73e462ea03a4b93d911020d5f9cf0a0cb3f4e286 | src/engine/entity/include/halley/entity/entity_id.h | src/engine/entity/include/halley/entity/entity_id.h | #pragma once
#include <cstdint>
#include "halley/bytes/config_node_serializer.h"
namespace Halley {
class World;
struct alignas(8) EntityId {
int64_t value;
EntityId() : value(-1) {}
explicit EntityId(const String& str);
bool isValid() const { return value != -1; }
bool operator==(const EntityId& othe... | #pragma once
#include <cstdint>
#include "halley/bytes/config_node_serializer.h"
namespace Halley {
class World;
struct alignas(8) EntityId {
int64_t value;
EntityId(int64_t value = -1) : value(value) {}
explicit EntityId(const String& str);
bool isValid() const { return value != -1; }
bool operator==... | Allow creating EntityId directly from int64_t | Allow creating EntityId directly from int64_t
| C | apache-2.0 | amzeratul/halley,amzeratul/halley,amzeratul/halley |
b2719779033044ea4d5fd85660c5ff44338cb6fe | graphgolf/graph.h | graphgolf/graph.h | #include "base/base.h"
class Graph {
public:
typedef int16_t Node;
typedef int16_t Degree;
Graph(Node order, Degree degree)
: order_(order),
degree_(degree),
edges_(order * degree, -1) {}
inline Node order() { return order_; }
inline Degree degree() { return degree_; }
// Returns ... | #include "base/base.h"
class Graph {
public:
typedef int16_t Node;
typedef int16_t Degree;
Graph(Node order, Degree degree)
: order_(order),
degree_(degree),
edges_(order * degree, -1) {}
inline Node order() { return order_; }
inline Degree degree() { return degree_; }
// Returns ... | Update the comment for Graph::GetEdge. | Update the comment for Graph::GetEdge.
| C | mit | imos/graphgolf,imos/graphgolf,imos/graphgolf |
129344a783dc4f410f2afb6273a043628cb0a846 | config.h | config.h | #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT \
11122
#define LISTEN_BACKLOG \
40
#define MAX_MESSAGE_SIZE \
250
/* Linux specific configs */
#define MAX_EPOLL_EVENTS \
100
#endif
| #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT \
11122
#define LISTEN_BACKLOG \
40
#define MAX_MESSAGE_SIZE \
256
/* Linux specific configs */
#define MAX_EPOLL_EVENTS \
100
#endif
| Change MAX_BUFFER_SIZE to something that is 32 bit aligned. | Change MAX_BUFFER_SIZE to something that is 32 bit aligned.
| C | mit | gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet |
7293630908ab9fce7a0e23ca32fee5924bf7ff74 | include/libc/stdio.h | include/libc/stdio.h | #ifndef _STDIO_H_
#define _STDIO_H_
/**
* \file stdio.h
* \brief This file handle the output to the terminal for the user.
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef EOF
#define EOF -1 /*!< End of file value */
#endif
/**
* \brief Print a formatted string
*
* \param[in] format F... | #ifndef _STDIO_H_
#define _STDIO_H_
/**
* \file stdio.h
* \brief This file handle the output to the terminal for the user.
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef EOF
#define EOF -1 /*!< End of file value */
#endif
/**
* \brief Print a formatted string
*
* \param[in] format F... | Add signature for sprintf function | feat(sprintf): Add signature for sprintf function
| C | mit | Rarioty/FlowS |
1aa266b2b3406f046e00b65bb747a19c6d4445d7 | src/cons.h | src/cons.h | #ifndef MCLISP_CONS_H_
#define MCLISP_CONS_H_
#include <string>
namespace mclisp
{
class ConsCell
{
public:
ConsCell(): car(nullptr), cdr(nullptr) {}
ConsCell(ConsCell* car, ConsCell* cdr): car(car), cdr(cdr) {}
ConsCell* car;
ConsCell* cdr;
};
bool operator==(const ConsCell& lhs, const ConsCell& r... | #ifndef MCLISP_CONS_H_
#define MCLISP_CONS_H_
#include <string>
namespace mclisp
{
struct ConsCell
{
ConsCell* car;
ConsCell* cdr;
};
typedef struct ConsCell ConsCell;
bool operator==(const ConsCell& lhs, const ConsCell& rhs);
bool operator!=(const ConsCell& lhs, const ConsCell& rhs);
bool operator< (const Con... | Convert ConsCell from class to POD. | Convert ConsCell from class to POD.
| C | mit | appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp |
67c8b90938cc84b1f1f5d9dbe0e84645ba448c5d | src/main.c | src/main.c | #include "config.h"
#include "core/pwm.h"
#include "core/usart.h"
#include <avr/io.h>
#include <util/delay.h>
void delayms(uint16_t millis) {
while ( millis ) {
_delay_ms(1);
millis--;
}
}
int main(void) {
DDRB |= 1<<PB0;
usart_init();
pwm_init();
pwm_set(0);
while(1) {
if(char_fifo_is_empty(usart_recv... | #include "config.h"
#include "core/pwm.h"
#include "core/usart.h"
#include "utils/char_fifo.h"
#include <avr/io.h>
#include <util/delay.h>
void delayms(uint16_t millis) {
while ( millis ) {
_delay_ms(1);
millis--;
}
}
int main(void) {
DDRB |= 1<<PB0;
usart_init();
pwm_init();
pwm_set(0);
char ch;
while(... | Use correct args in usart test | Use correct args in usart test
| C | mit | greghaynes/Convik,greghaynes/Convik |
66e82787c9bf280da5f4f1e6562eff0cd751d9f8 | str.c | str.c | #include <Python.h>
int main(int argc, char *argv[]) {
PyObject *expr[3];
int i, s, e, r;
char *res;
if(argc<5) {
fprintf(stderr,"Usage: <string> <start> <end> <repeat>\n\n\
Print string[start:end]*repeat");
exit(0);
}
s = atoi(argv[2]);
e = atoi(argv[3]);
r = atoi(argv[4]);
expr[0] = PyStri... | #include <Python.h>
int main(int argc, char *argv[]) {
PyObject *expr[3];
int i, s, e, r;
char *res;
if(argc<5) {
fprintf(stderr,"Usage: <string> <start> <end> <repeat>\n\n\
Print string[start:end]*repeat\n");
exit(0);
}
s = atoi(argv[2]);
e = atoi(argv[3]);
r = atoi(argv[4]);
expr[0] = PySt... | Add newline end end of usage | Add newline end end of usage
| C | mit | ein-shved/libpyhon,ein-shved/libpyhon |
605cce4a8b87c2e92fcdd047383997ab1df0178d | src/lib/str-sanitize.c | src/lib/str-sanitize.c | /* Copyright (c) 2004 Timo Sirainen */
#include "lib.h"
#include "str.h"
#include "str-sanitize.h"
void str_sanitize_append(string_t *dest, const char *src, size_t max_len)
{
const char *p;
for (p = src; *p != '\0'; p++) {
if ((unsigned char)*p < 32)
break;
}
str_append_n(dest, src, (size_t)(p - src));
fo... | /* Copyright (c) 2004 Timo Sirainen */
#include "lib.h"
#include "str.h"
#include "str-sanitize.h"
void str_sanitize_append(string_t *dest, const char *src, size_t max_len)
{
const char *p;
for (p = src; *p != '\0'; p++) {
if (((unsigned char)*p & 0x7f) < 32)
break;
}
str_append_n(dest, src, (size_t)(p - s... | Convert also 0x80..0x9f characters to '?' | Convert also 0x80..0x9f characters to '?'
--HG--
branch : HEAD
| C | mit | dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot |
a31814531fae98e97d5f6938ed14e7f161e41a8f | list.h | list.h | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
#endif | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
#endif | Add List & ListNode struct declarations | Add List & ListNode struct declarations
| C | mit | MaxLikelihood/CADT |
cae4a5ca43323eb861d702f880a6c62dd5ef4fc5 | test/Sema/attr-print.c | test/Sema/attr-print.c | // RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
// FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">"
// hack in Attr.td for attribute "Aligned".
// CHECK: int x __attribute__((aligned(4, 0)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
//... | // RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
// FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">"
// hack in Attr.td for attribute "Aligned".
// CHECK: int x __attribute__((aligned(4, 0)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
//... | Test that we print MS keyword attributes without a __declspec(...) adornment. | Test that we print MS keyword attributes without a __declspec(...) adornment.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173754 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
e7b04e58651772a1356d3a44a9ef9698c85b04bc | tools/halide_image.h | tools/halide_image.h | #ifndef HALIDE_TOOLS_IMAGE_H
#define HALIDE_TOOLS_IMAGE_H
/*
This allows code that relied on halide_image.h and Halide::Tools::Image to
continue to work with newer versions of Halide where HalideBuffer.h and
Halide::Buffer are the way to work with data.
Besides mapping Halide::Tools::Image to Halide::Buffer, it defi... | #ifndef HALIDE_TOOLS_IMAGE_H
#define HALIDE_TOOLS_IMAGE_H
/** \file
*
* This allows code that relied on halide_image.h and
* Halide::Tools::Image to continue to work with newer versions of
* Halide where HalideBuffer.h and Halide::Buffer are the way to work
* with data.
*
* Besides mapping Halide::Tools::Image ... | Reformat comment into Doxygen comment for file. | Reformat comment into Doxygen comment for file.
Former-commit-id: f651d51d97b75f12ba68f1cbfca914724136d121 | C | mit | Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide |
b185c602c375f44bff2c9eb0362d0debbce728fd | K2Status-static-ImportExport/include/k2info.h | K2Status-static-ImportExport/include/k2info.h | #include "k2pktdef.h"
#define TRACE2_STA_LEN 7
#define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */
#define TRACE2_NET_LEN 9
#define TRACE2_LOC_LEN 3
#define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET"
typedef struct {
char net[TRACE2_NET_LEN]; /* Network name */
char sta[TRACE2_... | #include "k2pktdef.h"
#define TRACE2_STA_LEN 7
#define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */
#define TRACE2_NET_LEN 9
#define TRACE2_LOC_LEN 3
#define K2_TIME_CONV ((unsigned long)315532800)
#define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET"
typedef struct {
char net[TRACE2_NET_LEN]... | Make 64Bit Friendly, NonStatic for Ubuntu 14.04 delete unneeded files | Make 64Bit Friendly, NonStatic for Ubuntu 14.04 delete unneeded files
| C | lgpl-2.1 | Fran89/K2Status,Fran89/K2Status |
7ff47de1c579051233f28dd03e19755de3549246 | libyara/include/yara/sizedstr.h | libyara/include/yara/sizedstr.h | /*
Copyright (c) 2007-2014. The YARA 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 o... | /*
Copyright (c) 2007-2014. The YARA 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 o... | Change type of SIZED_STRING's length to uint32_t | Change type of SIZED_STRING's length to uint32_t
| C | bsd-3-clause | jpypi/yara,VirusTotal/yara,MeteorAdminz/yara,wxsBSD/yara,pombredanne/yara,plusvic/yara,hillu/yara,bmagistro/yara,bmagistro/yara,kallanreed/yara,wxsBSD/yara,plusvic/yara,cblichmann/yara,plusvic/yara,cblichmann/yara,rednaga/yara,hillu/yara,MeteorAdminz/yara,kallanreed/yara,VirusTotal/yara,hillu/yara,jpypi/yara,VirusTotal... |
55d1b6a7f7b1bece532c57cc05eb8b44812ce842 | test/Sema/nonnull-check.c | test/Sema/nonnull-check.c | // RUN: clang-cc -Wnonnull -fsyntax-only -verify %s
extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull));
extern void func3 (void (^block1)(), int, void (^block2)(), int)
__attribute__((nonnull(1,3)));
extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1))... | // RUN: clang-cc -fblocks -Wnonnull -fsyntax-only -verify %s
extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull));
extern void func3 (void (^block1)(), int, void (^block2)(), int)
__attribute__((nonnull(1,3)));
extern void func4 (void (^block1)(), void (^block2)()) __attribute__((no... | Add -fblocks for the test. | Add -fblocks for the test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@72280 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | 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,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/cl... |
f2f1a9893f57bf9a8aa207e2d3365df4010d28c6 | TDTChocolate/FoundationAdditions/NSFileManager+TDTAdditions.h | TDTChocolate/FoundationAdditions/NSFileManager+TDTAdditions.h | #import <Foundation/Foundation.h>
@interface NSFileManager (TDTAdditions)
/**
@return URL to the any directory which matches the given search path in
the User's domain.
*/
- (NSURL *)userURLForDirectory:(NSSearchPathDirectory)directory;
/**
Creates a temporary file in a suitable temporary directory.
T... | #import <Foundation/Foundation.h>
@interface NSFileManager (TDTAdditions)
/**
@return URL to the any directory which matches the given search path in
the User's domain.
*/
- (NSURL *)userURLForDirectory:(NSSearchPathDirectory)directory;
/**
Creates a temporary file in a suitable temporary directory.
Th... | Remove trailing spaces from documentation comments | Remove trailing spaces from documentation comments
| C | bsd-3-clause | talk-to/Chocolate,talk-to/Chocolate |
b48f26eac7e5f2369cce423668d1554b3a682969 | kilo.c | kilo.c | int main() {
return 0;
}
| #include <unistd.h>
int main() {
char c;
while (read(STDIN_FILENO, &c, 1) == 1);
return 0;
}
| Read keypresses from the user | Read keypresses from the user
| C | bsd-2-clause | oldsharp/kilo,oldsharp/kilo |
4b7b88b94b98233ae714d8466ee86876fe9f3e42 | elsa/xml_lexer.h | elsa/xml_lexer.h | // xml_lexer.h see license.txt for copyright and terms of use
#ifndef XML_LEXER_H
#define XML_LEXER_H
#include <stdio.h>
#include "fstream.h" // ifstream
#include "str.h" // string
#include "sm_flexlexer.h" // yyFlexLexer
#include "baselexer.h" // FLEX_OUTPUT_METHOD... | // xml_lexer.h see license.txt for copyright and terms of use
#ifndef XML_LEXER_H
#define XML_LEXER_H
#include <stdio.h>
#include "fstream.h" // ifstream
#include "str.h" // string
#include "sm_flexlexer.h" // yyFlexLexer
#include "baselexer.h" // FLEX_OUTPUT_METHOD... | Fix bug where XmlLexer::restart() doesn't reset sawEof | Fix bug where XmlLexer::restart() doesn't reset sawEof
| C | bsd-3-clause | angavrilov/olmar,angavrilov/olmar,angavrilov/olmar,angavrilov/olmar |
702252414662d8e63f33715261399c8cc8a4767a | src/GameAsset.h | src/GameAsset.h | #ifndef GAMEASSET_H
#define GAMEASSET_H
#include <GL/gl.h>
class GameAsset {
public:
virtual void Draw(GLuint) = 0;
};
#endif
| #ifndef GAMEASSET_H
#define GAMEASSET_H
#include <iostream>
#include <GL/gl.h>
class GameAsset {
public:
virtual void Draw(GLuint) = 0;
};
#endif
| Include cerr and endl in CubeAsset | Include cerr and endl in CubeAsset
| C | mit | XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment,XenoWarrior/CI224-GamesDevelopment |
6506bf4e205944a671ddcc148a88273ddce92409 | Problem_9/Problem_9.c | Problem_9/Problem_9.c | #include "stdio.h"
#include "stdbool.h"
bool checkPythagoreanTriplet (int a, int b, int c);
bool checkPythagoreanTriplet (int a, int b, int c) {
if((a*a) + (b*b) == (c*c)) {
return true;
} else {
return false;
}
}
int main(int argc, char const *argv[]) {
int i;
int j;
int k;
... | #include "stdio.h"
#include "stdbool.h"
bool checkPythagoreanTriplet(int a, int b, int c);
bool checkPythagoreanTriplet(int a, int b, int c)
{
if ((a * a) + (b * b) == (c * c))
{
return true;
}
else
{
return false;
}
}
int main(int argc, char const *argv[])
{
int i;
int j;
int k... | Update format for Problem 9 | Update format for Problem 9
| C | mit | goparakeets21/Project_Euler |
69051267d34c7d9ecfd9a947d762fc88d69f8822 | src/Ultrasonick.h | src/Ultrasonick.h | /*
Ultrasonick.h - Library for HC-SR04 Ultrasonic Ranging Module in a minimalist way.
Created by EricK Simoes (@AloErickSimoes), April 3, 2014.
Released into the Creative Commons Attribution-ShareAlike 4.0 International.
*/
#ifndef Ultrasonick_h
#define Ultrasonick_h
#if (ARDUINO >= 100)
#include "Arduino.h"
... | /*
Ultrasonick.h - Library for HC-SR04 Ultrasonic Ranging Module in a minimalist way.
Created by EricK Simoes (@AloErickSimoes), April 3, 2014.
Released into the Creative Commons Attribution-ShareAlike 4.0 International.
*/
#ifndef Ultrasonick_h
#define Ultrasonick_h
#define CM 1
#define INC 0
/**
* TODO: Remo... | Remove duplicate include from Arduino.h | Fix: Remove duplicate include from Arduino.h
The include is only required in the .cpp file.
Resolves: #18
| C | mit | ErickSimoes/Ultrasonic |
7e3f93541e937d886652a8c16873efd93d98230b | src/win32port.h | src/win32port.h | #ifndef NINJA_WIN32PORT_H_
#define NINJA_WIN32PORT_H_
#pragma once
/// A 64-bit integer type
typedef unsigned long long int64_t;
typedef unsigned long long uint64_t;
#endif // NINJA_WIN32PORT_H_ | #ifndef NINJA_WIN32PORT_H_
#define NINJA_WIN32PORT_H_
#pragma once
/// A 64-bit integer type
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#endif // NINJA_WIN32PORT_H_
| Add new line to new file | Add new line to new file
| C | apache-2.0 | nico/ninja,colincross/ninja,chenyukang/ninja,kissthink/ninja,mydongistiny/ninja,maruel/ninja,mohamed/ninja,ukai/ninja,PetrWolf/ninja-main,mutac/ninja,nornagon/ninja,mathstuf/ninja,mgaunard/ninja,pathscale/ninja,ctiller/ninja,ctiller/ninja,lizh06/ninja,mdempsky/ninja,hnney/ninja,barak/ninja,syntheticpp/ninja,tychoish/ni... |
6e9096519e0ac3db0e92bafb43ad81c8040dc64c | src/CopyDevice.h | src/CopyDevice.h | #pragma once
#ifndef COPYFS_LIB_COPYDEVICE_H_
#define COPYFS_LIB_COPYDEVICE_H_
#include <boost/filesystem.hpp>
#include <messmer/fspp/fs_interface/Device.h>
#include "messmer/cpp-utils/macros.h"
namespace copyfs {
namespace bf = boost::filesystem;
class CopyDevice: public fspp::Device {
public:
CopyDevice(const ... | #pragma once
#ifndef COPYFS_LIB_COPYDEVICE_H_
#define COPYFS_LIB_COPYDEVICE_H_
#include <boost/filesystem.hpp>
#include <messmer/fspp/fs_interface/Device.h>
#include "messmer/cpp-utils/macros.h"
namespace copyfs {
namespace bf = boost::filesystem;
class CopyDevice: public fspp::Device {
public:
explicit CopyDevi... | Make constructors explicit where adequate | Make constructors explicit where adequate
| C | apache-2.0 | cryfs/copyfs |
c521df5dcf7410898cabdcb556f919535cf16d19 | include/msvc_compat/C99/stdbool.h | include/msvc_compat/C99/stdbool.h | #ifndef stdbool_h
#define stdbool_h
#include <wtypes.h>
/* MSVC doesn't define _Bool or bool in C, but does have BOOL */
/* Note this doesn't pass autoconf's test because (bool) 0.5 != true */
typedef BOOL _Bool;
#define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined 1
#endif /* st... | #ifndef stdbool_h
#define stdbool_h
#include <wtypes.h>
/* MSVC doesn't define _Bool or bool in C, but does have BOOL */
/* Note this doesn't pass autoconf's test because (bool) 0.5 != true */
/* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as
* a built-in type. */
#ifndef __clang__
typedef BOOL _... | Allow to build with clang-cl | Allow to build with clang-cl
| C | bsd-2-clause | ahmetmircik/jemalloc,leebaok/jemalloc-4.2.1-readcode,kmiku7/jemalloc,cpeterso/jemalloc,cpeterso/jemalloc,shekkbuilder/jemalloc,ahmetmircik/jemalloc,lilothar/jemalloc,TeamExodus/external_jemalloc,wqfish/jemalloc,awreece/jemalloc,jemalloc/jemalloc-cmake,tempbottle/jemalloc,wespelee/jemalloc,VRToxin/android_external_jemal... |
1554603f805eb2efb4757937b99092c7aa0d3aee | Graphics/SettingsDialog.h | Graphics/SettingsDialog.h | /* Copyright (c) nasser-sh 2016
*
* Distributed under BSD-style license. See accompanying LICENSE.txt in project
* directory.
*/
#pragma once
#include <afxwin.h>
#include "resource.h"
namespace graphics
{
class CGraphicsApp;
class CSettingsDialog : public CDialog
{
public:
enum { IDD =... | /* Copyright (c) nasser-sh 2016
*
* Distributed under BSD-style license. See accompanying LICENSE.txt in project
* directory.
*/
#pragma once
#include <afxwin.h>
#include "resource.h"
namespace graphics
{
class CGraphicsApp;
class CSettingsDialog : public CDialog
{
public:
enum { IDD =... | Remove unused attribute from Settings Dialog | Remove unused attribute from Settings Dialog
| C | bsd-3-clause | nasser-sh/MFC-Samples,nasser-sh/MFC-Samples,nasser-sh/MFC-Samples,nasser-sh/MFC-Samples |
18b60de4226ffd9add2643b2073969e1dceb6635 | HTCopyableLabelDemo/HTCopyableLabel.h | HTCopyableLabelDemo/HTCopyableLabel.h | //
// HTCopyableLabel.h
// HotelTonight
//
// Created by Jonathan Sibley on 2/6/13.
// Copyright (c) 2013 Hotel Tonight. All rights reserved.
//
#import <UIKit/UIKit.h>
@class HTCopyableLabel;
@protocol HTCopyableLabelDelegate <NSObject>
@optional
- (NSString *)stringToCopyForCopyableLabel:(HTCopyableLabel *)co... | //
// HTCopyableLabel.h
// HotelTonight
//
// Created by Jonathan Sibley on 2/6/13.
// Copyright (c) 2013 Hotel Tonight. All rights reserved.
//
@class HTCopyableLabel;
@protocol HTCopyableLabelDelegate <NSObject>
@optional
- (NSString *)stringToCopyForCopyableLabel:(HTCopyableLabel *)copyableLabel;
- (CGRect)co... | Remove UIKit import to (hopefully) fix cocoapods travis-CI build | Remove UIKit import to (hopefully) fix cocoapods travis-CI build
| C | mit | hoteltonight/HTCopyableLabel |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.