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 |
|---|---|---|---|---|---|---|---|---|---|
60dcc9639dd5f36d1049f1d85bfd6bec45b2ab20 | exercises/rna-transcription/src/example.c | exercises/rna-transcription/src/example.c | #include <stdlib.h>
#include <string.h>
#include "rna_transcription.h"
char *to_rna(const char *dna) {
size_t len = strlen(dna);
char *rna = malloc(sizeof(char) * len);
for (int i = 0; i < len; i++) {
switch (dna[i]) {
case 'G':
rna[i] = 'C';
break;
case 'C':
rna[i] = 'G';
br... | #include <stdlib.h>
#include <string.h>
#include "rna_transcription.h"
char *to_rna(const char *dna) {
size_t len = strlen(dna);
char *rna = malloc(sizeof(char) * len);
for (size_t i = 0; i < len; i++) {
switch (dna[i]) {
case 'G':
rna[i] = 'C';
break;
case 'C':
rna[i] = 'G';
... | Fix signed and unsigned comparison | Fix signed and unsigned comparison | C | mit | RealBarrettBrown/xc,RealBarrettBrown/xc,RealBarrettBrown/xc |
85da0a68e77dd32bd2f55d33e0d93d63b8805c8e | src/vast/concept/parseable/vast/key.h | src/vast/concept/parseable/vast/key.h | #ifndef VAST_CONCEPT_PARSEABLE_VAST_KEY_H
#define VAST_CONCEPT_PARSEABLE_VAST_KEY_H
#include "vast/key.h"
#include "vast/concept/parseable/core/choice.h"
#include "vast/concept/parseable/core/list.h"
#include "vast/concept/parseable/core/operators.h"
#include "vast/concept/parseable/core/parser.h"
#include "vast/conc... | #ifndef VAST_CONCEPT_PARSEABLE_VAST_KEY_H
#define VAST_CONCEPT_PARSEABLE_VAST_KEY_H
#include "vast/key.h"
#include "vast/concept/parseable/core/choice.h"
#include "vast/concept/parseable/core/list.h"
#include "vast/concept/parseable/core/operators.h"
#include "vast/concept/parseable/core/parser.h"
#include "vast/conc... | Work around missing parsing functionality | Work around missing parsing functionality
| C | bsd-3-clause | mavam/vast,pmos69/vast,vast-io/vast,vast-io/vast,vast-io/vast,vast-io/vast,pmos69/vast,pmos69/vast,mavam/vast,vast-io/vast,mavam/vast,mavam/vast,pmos69/vast |
8f0b7f5f5bc1eb5a1e794497d14560d032bf8dca | tests/headers/functions.h | tests/headers/functions.h | /* Header testing function definitions parsing. */
//Defining a standard function.
void f(int, int);
inline int g(char *ch, char **str);
// Defining a function pointer.
int(*fnPtr)(char, float);
// Adding dllexport and stdcall annotation to a function.
int __declspec(dllexport) __stdcall function1();
| /* Header testing function definitions parsing. */
//Defining a standard function.
void f(int, int);
// Defining a function with its implementation following
inline int g(char *ch, char **str)
{
JUNK
{ }
int localVariable = 1;
}
// Defining a function pointer.
int(*fnPtr)(char, float);
// Adding dll... | Add back Luke test of a function followed by its concrete implementation. | Add back Luke test of a function followed by its concrete implementation.
| C | mit | mrh1997/pyclibrary,duguxy/pyclibrary,duguxy/pyclibrary,MatthieuDartiailh/pyclibrary,mrh1997/pyclibrary,MatthieuDartiailh/pyclibrary,mrh1997/pyclibrary,duguxy/pyclibrary |
bfb527e09f6fb22e4547c08c8262deb9a827e9ad | kernel/os/include/os/os_fault.h | kernel/os/include/os/os_fault.h | /*
* licensed to the apache software foundation (asf) under one
* or more contributor license agreements. see the notice file
* distributed with this work for additional information
* regarding copyright ownership. the asf licenses this file
* to you under the apache license, version 2.0 (the
* "license"); you ... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | Update License to match other licenses | Update License to match other licenses
| C | apache-2.0 | andrzej-kaczmarek/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,IMGJulian/incubator-myne... |
d80bdc186a97b2f1e9dee35941422cef15a49ded | fitz/stm_filter.c | fitz/stm_filter.c | #include "fitz_base.h"
#include "fitz_stream.h"
fz_error
fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
fz_error reason;
unsigned char *oldrp;
unsigned char *oldwp;
assert(!out->eof);
oldrp = in->rp;
oldwp = out->wp;
if (f->done)
return fz_iodone;
reason = f->process(f, in, out);
assert(i... | #include "fitz_base.h"
#include "fitz_stream.h"
fz_error
fz_process(fz_filter *f, fz_buffer *in, fz_buffer *out)
{
fz_error reason;
unsigned char *oldrp;
unsigned char *oldwp;
oldrp = in->rp;
oldwp = out->wp;
if (f->done)
return fz_iodone;
assert(!out->eof);
reason = f->process(f, in, out);
assert(i... | Move assert test of EOF to after testing if a filter is done. | Move assert test of EOF to after testing if a filter is done.
darcs-hash:20090823143236-f546f-8a43aacda84fc3a1ab9b24c9cd54bd422912d4ec.gz
| C | agpl-3.0 | nqv/mupdf,nqv/mupdf,nqv/mupdf,nqv/mupdf,nqv/mupdf,nqv/mupdf |
eada73f748007102da090de2f6ac65691a9ea9a8 | src/canopy_os_linux.c | src/canopy_os_linux.c | // Copyright 2015 SimpleThings, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... | // Copyright 2015 SimpleThings, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... | Remove canopy_os_assert implementation because linux implementation now just expands to assert macro in header file | Remove canopy_os_assert implementation because linux implementation now just expands to assert macro in header file
| C | apache-2.0 | canopy-project/canopy_os_linux |
0a1ed2795d54f9295335b1ab9203eb41c34f2701 | include/core/SkMilestone.h | include/core/SkMilestone.h | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 104
#endif
| /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 105
#endif
| Update Skia milestone to 105 | Update Skia milestone to 105
Change-Id: I0925a52cc3a504c95ec4453e74c4580ce692275c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548896
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Auto-Submit... | C | bsd-3-clause | google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia |
982dacf245ebe0aa75d19fe27c2ec74e35f180cb | bikepath/SearchItem.h | bikepath/SearchItem.h | //
// SearchItem.h
// bikepath
//
// Created by Farheen Malik on 8/15/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import <GoogleMaps/GoogleMaps.h>
@interface SearchItem : NSObject
@property NSString *searchQuery;
@property CLLocationDe... | //
// SearchItem.h
// bikepath
//
// Created by Farheen Malik on 8/15/14.
// Copyright (c) 2014 Bike Path. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import <GoogleMaps/GoogleMaps.h>
@interface SearchItem : NSObject
@property NSString *searchQuery;
@property CLLocationDe... | Add address as property of Search Item object | Add address as property of Search Item object
| C | apache-2.0 | red-spotted-newts-2014/bike-path,hushifei/bike-path,red-spotted-newts-2014/bike-path |
10e6aefe5410267b5998df8417a16a1674e2f12b | src/modtypes/socket.h | src/modtypes/socket.h | #pragma once
#include "../main.h"
class Socket {
public:
virtual ~Socket() {}
virtual unsigned int apiVersion() = 0;
virtual void connect(const std::string& server, const std::string& port, const std::string& bind = "") {}
virtual std::string receive() { return ""; }
virtual void send(const std::string& dat... | #pragma once
#include "../main.h"
class Socket {
public:
virtual ~Socket() {}
virtual unsigned int apiVersion() = 0;
virtual void connect(const std::string& server, const std::string& port, const std::string& bindAddr = "") {}
virtual std::string receive() { return ""; }
virtual void send(const std::string&... | Rename parameter to not be the same as the name of the function that does it | Rename parameter to not be the same as the name of the function that does it
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
7bab840edb4a175eaa914e9fecbe8811d60e5d7e | Core/Code/Testing/mitkRenderingTestHelper.h | Core/Code/Testing/mitkRenderingTestHelper.h | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Inf... | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Inf... | Fix linker warnings in rendering tests | Fix linker warnings in rendering tests
| C | bsd-3-clause | fmilano/mitk,NifTK/MITK,NifTK/MITK,NifTK/MITK,rfloca/MITK,danielknorr/MITK,nocnokneo/MITK,rfloca/MITK,MITK/MITK,nocnokneo/MITK,RabadanLab/MITKats,lsanzdiaz/MITK-BiiG,rfloca/MITK,danielknorr/MITK,lsanzdiaz/MITK-BiiG,fmilano/mitk,RabadanLab/MITKats,iwegner/MITK,fmilano/mitk,MITK/MITK,nocnokneo/MITK,lsanzdiaz/MITK-BiiG,rf... |
73aef2d1d8a0fe417df1ab4a35029be74891ee37 | src/gallium/winsys/sw/hgl/hgl_sw_winsys.h | src/gallium/winsys/sw/hgl/hgl_sw_winsys.h | /**************************************************************************
*
* Copyright 2009 Artur Wyszynski <harakash@gmail.com>
* Copyright 2013 Alexander von Gluck IV <kallisti5@unixzen.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated doc... | /**************************************************************************
*
* Copyright 2009 Artur Wyszynski <harakash@gmail.com>
* Copyright 2013 Alexander von Gluck IV <kallisti5@unixzen.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated doc... | Add needed extern "C" to hgl winsys | winsys/hgl: Add needed extern "C" to hgl winsys
Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com>
| C | mit | metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler |
7f728dc9ea358c56458b5145bc8e78006fca190d | build/config/ios/WeaveProjectConfig.h | build/config/ios/WeaveProjectConfig.h | /*
*
* Copyright (c) 2016-2017 Nest Labs, Inc.
* 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... | /*
*
* Copyright (c) 2016-2017 Nest Labs, Inc.
* 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... | Disable unsupported Inet configuration breaking iOS integration. | Disable unsupported Inet configuration breaking iOS integration.
For a yet-unknown reason, trying to read the TCP Tx buffer with ioctl on iOS fails with ENXIO. Since this code was written primarily for embedded Linux platforms, and is not needed for mobile clients, this CL turns off that bit of code for iOS builds. | C | apache-2.0 | openweave/openweave-core,openweave/openweave-core,openweave/openweave-core,openweave/openweave-core,openweave/openweave-core,openweave/openweave-core |
f7ec6e5c53d147637fafde9d908b9f24814ecce5 | Settings/Updater/UpdaterWindow.h | Settings/Updater/UpdaterWindow.h | #pragma once
#include "../3RVX/Window.h"
class NotifyIcon;
class Settings;
class UpdaterWindow : public Window {
public:
UpdaterWindow();
~UpdaterWindow();
void DoModal();
private:
HICON _smallIcon;
HICON _largeIcon;
NotifyIcon *_notifyIcon;
HMENU _menu;
UINT _menuFlags;
Setti... | #pragma once
#include "../../3RVX/Window.h"
#include "Version.h"
class NotifyIcon;
class Settings;
class UpdaterWindow : public Window {
public:
UpdaterWindow();
~UpdaterWindow();
void DoModal();
private:
HICON _smallIcon;
HICON _largeIcon;
NotifyIcon *_notifyIcon;
HMENU _menu;
UIN... | Clean up instance variables and imports | Clean up instance variables and imports
| C | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
a77e006fa0a5c215e4b48a21e70dd323d165a5b4 | test/CodeGen/2004-06-17-UnorderedCompares.c | test/CodeGen/2004-06-17-UnorderedCompares.c | // RUN: %clang_cc1 -std=c99 %s -emit-llvm -o - | grep -v llvm.isunordered | not grep call
_Bool A, B, C, D, E, F;
void TestF(float X, float Y) {
A = __builtin_isgreater(X, Y);
B = __builtin_isgreaterequal(X, Y);
C = __builtin_isless(X, Y);
D = __builtin_islessequal(X, Y);
E = __builtin_islessgreater(X, Y);
... | // RUN: %clang_cc1 -std=c99 %s -emit-llvm -o - | FileCheck %s
// CHECK: @Test
// CHECK-NOT: call
_Bool A, B, C, D, E, F;
void TestF(float X, float Y) {
A = __builtin_isgreater(X, Y);
B = __builtin_isgreaterequal(X, Y);
C = __builtin_isless(X, Y);
D = __builtin_islessequal(X, Y);
E = __builtin_islessgreater(... | Remove pathname dependence. Also rewrite test to use FileCheck at the same time. | Remove pathname dependence. Also rewrite test to use FileCheck
at the same time.
Patch by David Callahan.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@226331 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
3eec82ff013efb8ecd9a40fd58173e28331fe3d9 | test2/code_gen/deref_reg.c | test2/code_gen/deref_reg.c | // RUN: %ucc -DFIRST -S -o- %s | grep -F 'movl (%%rax), %%eax'
// RUN: %ucc -DSECOND -S -o- %s | grep -F 'movl 4(%%rbx), %%ebx'
#ifdef FIRST
f(int *p)
{
return *p;
// should see that p isn't used after/.retains==1 and not create a new reg,
// but re-use the current
}
#elif defined(SECOND)
struct A
{
int i, j;
... | // RUN: %ucc -DFIRST -S -o- %s | grep -F 'movl (%%rax), %%eax'
// RUN: %ucc -DSECOND -S -o- %s | grep -F 'movl 4(%%rcx), %%ecx'
#ifdef FIRST
f(int *p)
{
return *p;
// should see that p isn't used after/.retains==1 and not create a new reg,
// but re-use the current
}
#elif defined(SECOND)
struct A
{
int i, j;
... | Change test now %ebx is callee-save | Change test now %ebx is callee-save
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
4a4095c360fc29f766e8baba3529a78b6d736b19 | json-glib/json-glib.h | json-glib/json-glib.h | #ifndef __JSON_GLIB_H__
#define __JSON_GLIB_H__
#include <json-glib/json-types.h>
#include <json-glib/json-generator.h>
#include <json-glib/json-parser.h>
#include <json-glib/json-version.h>
#endif /* __JSON_GLIB_H__ */
| #ifndef __JSON_GLIB_H__
#define __JSON_GLIB_H__
#include <json-glib/json-types.h>
#include <json-glib/json-scanner.h>
#include <json-glib/json-generator.h>
#include <json-glib/json-parser.h>
#include <json-glib/json-version.h>
#endif /* __JSON_GLIB_H__ */
| Add json-scanner.h to the exported headers | Add json-scanner.h to the exported headers
| C | lgpl-2.1 | robtaylor/json-glib-gvariant,GNOME/json-glib,frida/json-glib,ebassi/json-glib,oerdnj/json-glib,oerdnj/json-glib,Distrotech/json-glib,ebassi/json-glib,robtaylor/json-glib-gvariant,ebassi/json-glib,oerdnj/json-glib,Distrotech/json-glib,GNOME/json-glib,brauliobo/json-glib,oerdnj/json-glib,frida/json-glib,brauliobo/json-gl... |
81c02ef3db6901655f8a7117e5e2675d37096daf | json-glib/json-glib.h | json-glib/json-glib.h | #ifndef __JSON_GLIB_H__
#define __JSON_GLIB_H__
#include <json-glib/json-types.h>
#include <json-glib/json-scanner.h>
#include <json-glib/json-generator.h>
#include <json-glib/json-parser.h>
#include <json-glib/json-version.h>
#include <json-glib/json-enum-types.h>
#endif /* __JSON_GLIB_H__ */
| #ifndef __JSON_GLIB_H__
#define __JSON_GLIB_H__
#include <json-glib/json-types.h>
#include <json-glib/json-generator.h>
#include <json-glib/json-parser.h>
#include <json-glib/json-version.h>
#include <json-glib/json-enum-types.h>
#endif /* __JSON_GLIB_H__ */
| Remove the include for json-scanner.h | Remove the include for json-scanner.h
The json-scanner.h header file is not shipped with JSON-GLib anymore.
| C | lgpl-2.1 | Distrotech/json-glib,GNOME/json-glib,brauliobo/json-glib,ebassi/json-glib,oerdnj/json-glib,Distrotech/json-glib,frida/json-glib,GNOME/json-glib,robtaylor/json-glib-gvariant,oerdnj/json-glib,robtaylor/json-glib-gvariant,brauliobo/json-glib,ebassi/json-glib,oerdnj/json-glib,oerdnj/json-glib,frida/json-glib,brauliobo/json... |
4024adee156f12bbeb884c5a2c5ea1af1c108b5a | test/test_chip8.c | test/test_chip8.c | #include <assert.h>
#include "../src/chip8.c"
void test_clear_screen(void) {
int i;
chip8_t * chip8 = chip8_new();
chip8->memory[0x200] = 0x00;
chip8->memory[0x201] = 0xE0;
chip8_fetch_current_opcode(chip8);
chip8_decode_current_opcode(chip8);
i = 0;
while (i < 64 * 32) {
assert(chip8->memory[i+... | #include <assert.h>
#include "../src/chip8.c"
void test_clear_screen(void) {
int i;
chip8_t * chip8 = chip8_new();
chip8->memory[0x200] = 0x00;
chip8->memory[0x201] = 0xE0;
chip8_fetch_current_opcode(chip8);
chip8_decode_current_opcode(chip8);
i = 0;
while (i < 64 * 32) {
assert(chip8->memory[i+... | Exit the tests with success if they aren't failing | Exit the tests with success if they aren't failing
| C | mit | gsamokovarov/chip8.c,gsamokovarov/chip8.c |
b09bd3d3896c448f8817ee7515e3af0314605ab1 | plrCommon/plrCompare.c | plrCommon/plrCompare.c | #include "plrCompare.h"
int plrC_compareArgs(const syscallArgs_t *args1, const syscallArgs_t *args2) {
int foundDiff = 0;
if (args1->addr != args2->addr) { foundDiff = 1; }
else if (args1->arg[0] != args2->arg[0]) { foundDiff = 2; }
else if (args1->arg[1] != args2->arg[1]) { foundDiff = 3; }
else if... | #include "plrCompare.h"
#include <stdio.h>
int plrC_compareArgs(const syscallArgs_t *args1, const syscallArgs_t *args2) {
int faultVal = 0;
#define CompareElement(elem, faultBit) \
if (args1->elem != args2->elem) { \
faultVal |= 1 << faultBit; \
printf("Argument miscompare in "... | Add logging to syscall arg compare for debugging purposes | Add logging to syscall arg compare for debugging purposes
| C | mit | apogeedev/plr,apogeedev/plr |
e1e5b704393cc348af07e62e1ec69521f9a6ab9e | src/simply/simply_window_stack.h | src/simply/simply_window_stack.h | #pragma once
#include "simply_window.h"
#include "simply_msg.h"
#include "simply.h"
#include "util/sdk.h"
#include <pebble.h>
typedef struct SimplyWindowStack SimplyWindowStack;
struct SimplyWindowStack {
Simply *simply;
#ifdef PBL_SDK_2
Window *pusher;
#endif
bool is_showing:1;
bool is_hiding:1;
};
Sim... | #pragma once
#include "simply_window.h"
#include "simply_msg.h"
#include "simply.h"
#include "util/sdk.h"
#include <pebble.h>
typedef struct SimplyWindowStack SimplyWindowStack;
struct SimplyWindowStack {
Simply *simply;
SDK_SELECT(NONE, Window *pusher);
bool is_showing:1;
bool is_hiding:1;
};
SimplyWin... | Use SDK_SELECT for the window stack pusher member field | Use SDK_SELECT for the window stack pusher member field
| C | mit | frizzr/CatchOneBus,youtux/PebbleShows,fletchto99/pebblejs,carlo-colombo/dublin-bus-pebble,ishepard/TransmissionTorrent,ishepard/TransmissionTorrent,frizzr/CatchOneBus,carlo-colombo/dublin-bus-pebble,pebble/pebblejs,ento/pebblejs,demophoon/Trimet-Tracker,carlo-colombo/dublin-bus-pebble,gwijsman/OpenRemotePebble,youtux/P... |
b8aff13260f0ed1de59387e899cb65b75a10c3c9 | src/compat/libc/string/inhibit_libcall.h | src/compat/libc/string/inhibit_libcall.h | /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 21.07.2015
*/
#ifndef STR_INHIBIT_LIBCALL_H_
#define STR_INHIBIT_LIBCALL_H_
/* FIXME __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
* can be not supported in cross-compiler
*/
#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1
#ifdef HA... | /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 21.07.2015
*/
#ifndef STR_INHIBIT_LIBCALL_H_
#define STR_INHIBIT_LIBCALL_H_
/* FIXME __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
* can be not supported in cross-compiler
*/
#ifndef __e2k__
#define HAVE_CC_INHIBIT_LOOP_TO_LIBC... | Fix inhibit_loop_to_libcall compilation on e2k | compat: Fix inhibit_loop_to_libcall compilation on e2k
| C | bsd-2-clause | embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox |
259598230240544af945254ed834a32eebec2608 | Pod/Classes/Utils/UIColor+HKHex.h | Pod/Classes/Utils/UIColor+HKHex.h | //
// UIColor+HKHex.h
// HKProjectBase-Sample
//
// Created by Harley.xk on 15/8/26.
// Copyright (c) 2015年 Harley.xk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HKHex)
+ (UIColor *)colorWithHexString:(NSString *)hexString;
+ (UIColor *)colorWithHexString:(NSString *)hexString alpha:(CGF... | //
// UIColor+HKHex.h
// HKProjectBase-Sample
//
// Created by Harley.xk on 15/8/26.
// Copyright (c) 2015年 Harley.xk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HKHex)
/**
* 使用16进制字符串创建颜色
*
* @param hexString 16进制字符串,可以是 0XFFFFFF/#FFFFFF/FFFFFF 三种格式之一
*
* @return 返回创建的UIColor对象
... | Add comment to Hex color category | Add comment to Hex color category
| C | mit | Harley-xk/HKProjectBase,Harley-xk/HKProjectBase,Harley-xk/HKProjectBase |
21b2d73ef61e40b611792ce772a774438b2f459d | src/ConfigFileReader.h | src/ConfigFileReader.h | #pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <unordered_map>
#include <algorithm>
//#include <locale>
class ConfigFileReader
{
public:
ConfigFileReader(const char* file_name);
std::string find(std::string key);
private:
std::ifstream iniFile;
s... | #pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <unordered_map>
#include <algorithm>
class ConfigFileReader
{
public:
ConfigFileReader(const char* file_name);
std::string find(std::string key);
private:
std::ifstream iniFile;
std::unordered_map<st... | Remove unnecessary includes and newlines | Remove unnecessary includes and newlines
| C | agpl-3.0 | UCSolarCarTeam/Schulich-Delta-OnBoard-Media-Control,UCSolarCarTeam/Schulich-Delta-OnBoard-Media-Control |
412799711a2b6ae29c865159df88e0bbe19fd2df | 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 '?'
| C | mit | damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot |
a42c50b4ccc19c05ccf6dd1fa066677eea12ee6a | src/host/os_copyfile.c | src/host/os_copyfile.c | /**
* \file os_copyfile.c
* \brief Copy a file from one location to another.
* \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
*/
#include <stdlib.h>
#include "premake.h"
int os_copyfile(lua_State* L)
{
int z;
const char* src = luaL_checkstring(L, 1);
const char* dst = luaL_checkstring... | /**
* \file os_copyfile.c
* \brief Copy a file from one location to another.
* \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
*/
#include <stdlib.h>
#include "premake.h"
int os_copyfile(lua_State* L)
{
int z;
const char* src = luaL_checkstring(L, 1);
const char* dst = luaL_checkstring... | Fix os.copyfile with spaces in argument paths. | Host/Posix: Fix os.copyfile with spaces in argument paths. | C | bsd-3-clause | tvandijck/premake-core,Zefiros-Software/premake-core,noresources/premake-core,sleepingwit/premake-core,xriss/premake-core,LORgames/premake-core,mendsley/premake-core,bravnsgaard/premake-core,LORgames/premake-core,noresources/premake-core,jstewart-amd/premake-core,LORgames/premake-core,dcourtois/premake-core,tvandijck/p... |
58d8ac057e53be1a71a519fe4db7d83e7cf8056a | submission_test/Role.h | submission_test/Role.h | #ifndef ROLE_H_
#define ROLE_H_
#include "State.h"
class Role{
public:
State& state;
int x,y;
Role(State _state, int _id = 0, int _x = 0, int _y = 0) : state(_state), id(_id), x(_x), y(_y) {}
int getID(){
return id;
}
virtual void move() = 0;
private:
//changing id is i... |
#ifndef ROLE_H_
#define ROLE_H_
#include "State.h"
#include "Location.h"
#include <vector>
// this class is partial abstract
class Role {
public:
// reference to the main state
State& state;
// neighbors
std::vector<int> neighbors;
private:
// position of the ant
int x, y;
// ant's id... | Add more features ( made it more functional ) | Add more features ( made it more functional )
| C | mit | KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot,KorlaMarch/Ant-bot |
d569c69ea1a361ada0e09f2c58bd611b686d82e9 | modules/dcc_chat.h | modules/dcc_chat.h | class dccChat : public Module {
public:
void onDCCReceive(std::string dccid, std::string message);
};
class dccSender : public Module {
public:
void dccSend(std::string dccid, std::string message);
}; | class dccChat : public Module {
public:
virtual void onDCCReceive(std::string dccid, std::string message);
};
class dccSender : public Module {
public:
virtual void dccSend(std::string dccid, std::string message);
virtual bool hookDCCMessage(std::string modName, std::string hookMsg);
}; | Fix those functions not being virtual. | Fix those functions not being virtual.
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
dadb6d44743b45f60dc95d833b22f3de1e6dbd7d | qtcreator/cutelyst/classes/controller.h | qtcreator/cutelyst/classes/controller.h | %{Cpp:LicenseTemplate}\
#ifndef %{GUARD}
#define %{GUARD}
#include <Cutelyst/Controller>
%{JS: Cpp.openNamespaces('%{Class}')}\
using namespace Cutelyst;
class %{CN} : public Controller
{
Q_OBJECT
@if %{CustomNamespace}
C_NAMESPACE("%{CustomNamespaceValue}")
@endif
public:
explicit %{CN}(QObject *paren... | %{Cpp:LicenseTemplate}\
#ifndef %{GUARD}
#define %{GUARD}
#include <Cutelyst/Controller>
%{JS: Cpp.openNamespaces('%{Class}')}\
using namespace Cutelyst;
class %{CN} : public Controller
{
Q_OBJECT
@if %{CustomNamespace}
C_NAMESPACE("%{CustomNamespaceValue}")
@endif
public:
explicit %{CN}(QObject *paren... | Remove override form Begin Auto End methods of QtCreator plugin as they don't override anymore | Remove override form Begin Auto End methods of QtCreator plugin as they don't override anymore
| C | bsd-3-clause | buschmann23/cutelyst,cutelyst/cutelyst,simonaw/cutelyst,buschmann23/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst,cutelyst/cutelyst,simonaw/cutelyst |
0b2b76601a160cc5e38f5c1720084e6b872bc246 | test/CodeGen/struct-matching-constraint.c | test/CodeGen/struct-matching-constraint.c | // RUN: %clang_cc1 -emit-llvm -march=armv7a %s
// XFAIL: *
// XTARGET: arm
typedef struct __simd128_uint16_t
{
__neon_uint16x8_t val;
} uint16x8_t;
void b(uint16x8_t sat, uint16x8_t luma)
{
__asm__("vmov.16 %1, %0 \n\t"
"vtrn.16 %0, %1 \n\t"
:"=w"(luma), "=w"(sa... | // RUN: %clang -S -emit-llvm -arch arm -march=armv7a %s
typedef unsigned short uint16_t;
typedef __attribute__((neon_vector_type(8))) uint16_t uint16x8_t;
void b(uint16x8_t sat, uint16x8_t luma)
{
__asm__("vmov.16 %1, %0 \n\t"
"vtrn.16 %0, %1 \n\t"
:"=w"(luma), "=w"(... | Fix this test to work for arm and on all platforms. | Fix this test to work for arm and on all platforms.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136307 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
7ae187e075b4b6678732b1b82e3d4c59ed5f8dcc | src/popover/main.c | src/popover/main.c | /*
* This file is part of ui-tests
*
* Copyright © 2016 Ikey Doherty <ikey@solus-project.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License... | /*
* This file is part of ui-tests
*
* Copyright © 2016 Ikey Doherty <ikey@solus-project.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License... | Make the demo use the popover | Make the demo use the popover
Signed-off-by: Ikey Doherty <d8d992cf0016e35c2a8339d5e7d44bebd12a2d77@solus-project.com>
| C | lgpl-2.1 | ikeydoherty/ui-tests,ikeydoherty/ui-tests |
504905fd4b5334c8763fa4b9c61e618fa68d4b8b | include/llvm/Target/TargetMachineImpls.h | include/llvm/Target/TargetMachineImpls.h | //===-- llvm/Target/TargetMachineImpls.h - Target Descriptions --*- C++ -*-===//
//
// This file defines the entry point to getting access to the various target
// machine implementations available to LLVM.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TARGET_TARGETMA... | //===-- llvm/Target/TargetMachineImpls.h - Target Descriptions --*- C++ -*-===//
//
// This file defines the entry point to getting access to the various target
// machine implementations available to LLVM.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TARGET_TARGETMA... | Allow allocation of a Sparc TargetMachine. | Allow allocation of a Sparc TargetMachine.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@6364 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,... |
5869dc005e829ed07b066746b01d24f264a47113 | test/FrontendC/pr5406.c | test/FrontendC/pr5406.c | // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | FileCheck %s
// PR 5406
// XFAIL: *
// XTARGET: arm
typedef struct { char x[3]; } A0;
void foo (int i, ...);
// CHECK: call arm_aapcscc void (i32, ...)* @foo(i32 1, i32 {{.*}}) nounwind
int main (void)
{
A0 a3;
a3.x[0] = 0;
a3.x[0] = 0;
a3.x[2] = 26;
foo (1, ... | // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | FileCheck %s
// PR 5406
// XFAIL: *
// XTARGET: arm
typedef struct { char x[3]; } A0;
void foo (int i, ...);
// CHECK: call void (i32, ...)* @foo(i32 1, i32 {{.*}}) nounwind
int main (void)
{
A0 a3;
a3.x[0] = 0;
a3.x[0] = 0;
a3.x[2] = 26;
foo (1, a3 );
retur... | Update test to match recent llvm-gcc change. | Update test to match recent llvm-gcc change.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@106056 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/s... |
d4c28b0d467d667632489fa8f14d597f85a90f05 | src/bin/e_signals.c | src/bin/e_signals.c | /*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdynamic flag to GCC for any sort of decent output.
*/
void e_sigseg_act(int x, siginfo_t *info, void *data){
void *array[255];
size_t size... | /*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
* NOTE TO FreeBSD users. Install libexecinfo from
* ports/devel/libexecinfo and add -lexecinfo to LDFLAGS
* to add backtrace support.
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdynamic... | Add note to help FreeBSD users. | Add note to help FreeBSD users.
git-svn-id: 0f3f1c46c6da7ffd142db61e503a7ff63af3a195@13781 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
| C | bsd-2-clause | jordemort/e17,jordemort/e17,jordemort/e17 |
d1c5ca9d6c830a597ebdeaaadb73254b265f647b | source/common/d3d_util.h | source/common/d3d_util.h | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef COMMON_D3D_UTIL_H
#define COMMON_D3D_UTIL_H
#include "common/dxerr.h"
//------------------------------------------------------------------------------... | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef COMMON_D3D_UTIL_H
#define COMMON_D3D_UTIL_H
#include "common/dxerr.h"
//------------------------------------------------------------------------------... | Use nullptr instead of 0 | COMMON: Use nullptr instead of 0
| C | apache-2.0 | RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject |
050cf2fe7cc047b55d81a5b9d38bcc1a63225e13 | base/include/mem.h | base/include/mem.h |
size_t align_to(size_t offset, size_t align);
|
#define container_of(p,T,memb) (T *)((char *)(p) - offsetof(T,member))
#define length_of(array) (sizeof (array) / sizeof 0[array])
size_t align_to(size_t offset, size_t align);
| Add container_of and length_of macros to base | Add container_of and length_of macros to base
| C | isc | cventus/otivm,cventus/otivm,cventus/otivm |
13a7868be57942e1e27bf9767a2cd85a4a0b288d | lib/debug_msg.c | lib/debug_msg.c | /**
* @file debug_msg.c Debug Message function
*/
/* $Id$ */
#include "gangliaconf.h"
int debug_level = 0;
/**
* @fn void debug_msg(const char *format, ...)
* Prints the message to STDERR if DEBUG is #defined
* @param format The format of the msg (see printf manpage)
* @param ... Optional arguments
*/
void
deb... | /**
* @file debug_msg.c Debug Message function
*/
/* $Id$ */
#include "gangliaconf.h"
int debug_level = 0;
/**
* @fn void debug_msg(const char *format, ...)
* Prints the message to STDERR if DEBUG is #defined
* @param format The format of the msg (see printf manpage)
* @param ... Optional arguments
*/
void
deb... | Debug level 1 now only shows error messages (and no backgrounding in gmetad). | Debug level 1 now only shows error messages (and no backgrounding in gmetad).
git-svn-id: 27e0aca8c7a52a9ae65dfba2e16879604119af8c@188 93a4e39c-3214-0410-bb16-828d8e3bcd0f
| C | bsd-3-clause | fastly/ganglia,fastly/ganglia,fastly/ganglia,fastly/ganglia,fastly/ganglia |
d1db59b4fa389e5f73ae9de7c4f75802102d1756 | fmpz_poly_factor/clear.c | fmpz_poly_factor/clear.c | /*
Copyright (C) 2011 Sebastian Pancratz
This file is part of FLINT.
FLINT is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your opt... | /*
Copyright (C) 2011 Sebastian Pancratz
This file is part of FLINT.
FLINT is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your opt... | Fix a memory leak in t-factor. | Fix a memory leak in t-factor.
| C | lgpl-2.1 | fredrik-johansson/flint2,wbhart/flint2,wbhart/flint2,fredrik-johansson/flint2,fredrik-johansson/flint2,wbhart/flint2 |
aacb03000dad63a8f336e18ed2a9e8179f5bbc33 | UnitTests/Source/GITTreeEntryTests.h | UnitTests/Source/GITTreeEntryTests.h | //
// GITTreeEntryTests.h
// CocoaGit
//
// Created by Geoffrey Garside on 06/10/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
@class GITRepo, GITTree;
@interface GITTreeEntryTests : GHTestCase {
GITRepo * repo;
GITTree * tree;
NSUInteger entry... | //
// GITTreeEntryTests.h
// CocoaGit
//
// Created by Geoffrey Garside on 06/10/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <GHUnit/GHUnit.h>
@class GITRepo, GITTree;
@interface GITTreeEntryTests : GHTestCase {
GITRepo * repo;
GITTree * tree;
NSUInteger entryMode;
NSSt... | Update GITTreeEntry tests to use GHUnit framework instead of SenTestKit | Update GITTreeEntry tests to use GHUnit framework instead of SenTestKit
| C | mit | schacon/cocoagit,schacon/cocoagit,geoffgarside/cocoagit,geoffgarside/cocoagit |
2067da7189ec2e5d0266e16578b156f6a6bbf215 | src/udon2xml.c | src/udon2xml.c | #include <stdio.h>
#include <stdlib.h>
#include "udon.h"
int main (int argc, char *argv[]) {
int i;
int found = 0;
if(argc < 2) return 1;
UdonParser *udon = udon_new_parser_from_file(argv[1]);
if(udon == NULL) {
udon_emit_error(stderr);
return udon_error_value();
}
for(i=0; ... | #include <stdio.h>
#include <stdlib.h>
#include "udon.h"
int main (int argc, char *argv[]) {
int i;
if(argc < 2) return 1;
UdonParser *udon = udon_new_parser_from_file(argv[1]);
if(udon == NULL) {
udon_emit_error(stderr);
return udon_error_value();
}
int res = udon_parse(udon);
... | Remove older benchmarking loop and do correct error handling with real parse interface. | Remove older benchmarking loop and do correct error handling with real parse
interface.
| C | mit | josephwecker/udon-c,josephwecker/udon-c,josephwecker/udon-c,josephwecker/udon-c |
c9996dfdabcc6e4639240ec90ac3a97912b686ec | utils/lstopo-xml.c | utils/lstopo-xml.c | /*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <private/autogen/config.h>
#ifdef HWLOC_HAVE_XML
#include <hwloc.h>
#inclu... | /*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <private/autogen/config.h>
#ifdef HWLOC_HAVE_XML
#include <hwloc.h>
#inclu... | Print an error when lstopo fails to export to XML | Print an error when lstopo fails to export to XML
git-svn-id: 14be032f8f42541b1a281b51ae8ea69814daf20e@3691 4b44e086-7f34-40ce-a3bd-00e031736276
| C | bsd-3-clause | BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc |
eaa2b2534e5d7115be1d5d9efcfe1ce28e0b0721 | fast-xattr-test/fast-xattr-test/main.c | fast-xattr-test/fast-xattr-test/main.c | //
// main.c
// fast-xattr-test
//
// Created by David Schlachter on 2015-07-09.
// Copyright (c) 2015 David Schlachter. All rights reserved.
//
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
printf("Hello, World!\n");
return 0;
}
| //
// main.c
// fast-xattr-test
//
// Created by David Schlachter on 2015-07-09.
// Copyright (c) 2015 David Schlachter. All rights reserved.
//
#include <stdio.h>
#include <sys/xattr.h>
#include <stdlib.h>
int main(int argc, const char * argv[]) {
const char *path;
const char *name;
void *value = mal... | Set up the getxattr function | Set up the getxattr function
| C | mit | davidschlachter/fast-xattr-test |
49fef60bc607ebb56b979b78f157b31619fea2eb | test/regression/filter-badenc-segv.c | test/regression/filter-badenc-segv.c | #include <stdio.h>
#include <stdlib.h>
#include <parserutils/parserutils.h>
#include "input/filter.h"
#include "testutils.h"
static void *myrealloc(void *ptr, size_t len, void *pw)
{
UNUSED(pw);
return realloc(ptr, len);
}
int main(int argc, char **argv)
{
parserutils_filter *input;
parserutils_filter_optpara... | #include <stdio.h>
#include <stdlib.h>
#include <parserutils/parserutils.h>
#include "input/filter.h"
#include "testutils.h"
static void *myrealloc(void *ptr, size_t len, void *pw)
{
UNUSED(pw);
return realloc(ptr, len);
}
int main(int argc, char **argv)
{
parserutils_filter *input;
parserutils_filter_optpara... | Fix regression test to work with iconv filter enabled | Fix regression test to work with iconv filter enabled
svn path=/trunk/libparserutils/; revision=5662
| C | mit | servo/libparserutils,dunkelstern/libparserutils,servo/libparserutils,servo/libparserutils,dunkelstern/libparserutils,dunkelstern/libparserutils |
8012d2842d234a838b2ff27c27c5222a665cf7f7 | src/UserSpaceInstrumentation/include/UserSpaceInstrumentation/Attach.h | src/UserSpaceInstrumentation/include/UserSpaceInstrumentation/Attach.h | // Copyright (c) 2021 The Orbit 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 USER_SPACE_INSTRUMENTATION_ATTACH_H_
#define USER_SPACE_INSTRUMENTATION_ATTACH_H_
#include <sys/types.h>
#include "OrbitBase/Result.h"
namespa... | // Copyright (c) 2021 The Orbit 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 USER_SPACE_INSTRUMENTATION_ATTACH_H_
#define USER_SPACE_INSTRUMENTATION_ATTACH_H_
#include <sys/types.h>
#include "OrbitBase/Result.h"
namespa... | Fix missing comment in header. | Fix missing comment in header.
| C | bsd-2-clause | google/orbit,google/orbit,google/orbit,google/orbit |
bda2fe3ebaff006d6ff0c7252940033308020dca | lib/rgph.h | lib/rgph.h | /*-
* Copyright (c) 2015 Alexander Nasonov.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list ... | /*-
* Copyright (c) 2015 Alexander Nasonov.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list ... | Fix typo in include file names. | Fix typo in include file names.
| C | bsd-2-clause | alnsn/rgph,alnsn/rgph |
02a229b409fe2026efd86c54df9205c907e85ab1 | location.c | location.c | #include "location.h"
#include "inventory.h"
#include "person.h"
void location_init(struct location *location, char *name, char *description)
{
location->name = name;
location->description = description;
inventory_init(&location->inventory);
vector_init(&location->people, sizeof(struct person *));
}
v... | #include "location.h"
#include "inventory.h"
#include "person.h"
void location_init(struct location *location, char *name, char *description)
{
location->name = name;
location->description = description;
inventory_init(&location->inventory);
vector_init(&location->people, sizeof(struct person *));
}
v... | Use vector_get rather than accessing array directly | Use vector_get rather than accessing array directly
| C | mit | kouroshp/text-game,kouroshp/text-game |
38bcd605bc3a57bf3bd354826e16e41d74d87933 | test.c | test.c | #include <stdio.h>
int main(int argc, char ** argv){
printf("Test\n");
return 0;
}
| #include <stdlib.h>
#include <stdio.h>
int main(int argc, char ** argv){
printf("Test\n");
void* test = malloc(1024*1024);
if(test > 0){
printf("Malloc\n");
free(test);
printf("Free\n");
}else{
printf("Malloc Failed\n");
}
return 0;
}
| Fix bugs with libc, executor | WIP: Fix bugs with libc, executor
| C | mit | redox-os/libc,redox-os/libc,redox-os/libc |
81418d19ccfd34af55de37f16f1dcd9a6111eb2f | kilo.c | kilo.c | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios... | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios... | Fix printf() by adding CR manually | Fix printf() by adding CR manually
| C | bsd-2-clause | oldsharp/kilo,oldsharp/kilo |
e9e7ffa10d1af2f0b11528c1be16ab406c02f136 | runtime/libprofile/LineProfiling.c | runtime/libprofile/LineProfiling.c | /*===- LineProfiling.c - Support library for line profiling ---------------===*\
|*
|* The LLVM Compiler Infrastructure
|*
|* This file is distributed under the University of Illinois Open Source
|* License. See LICENSE.TXT for details.
|*
|*===------------------------------------------------------... | /*===- LineProfiling.c - Support library for line profiling ---------------===*\
|*
|* The LLVM Compiler Infrastructure
|*
|* This file is distributed under the University of Illinois Open Source
|* License. See LICENSE.TXT for details.
|*
|*===------------------------------------------------------... | Print our uint64_t with the more portable (C99 and C++0x) %PRIu64 format specifier. | Print our uint64_t with the more portable (C99 and C++0x) %PRIu64 format
specifier.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@129384 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/ll... |
b1167684c00877fac8bb3ebe120f088ff99daa57 | list.h | list.h | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void *);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int f(v... | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void *);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f)... | Fix missing parenthesis around f as parameter | Fix missing parenthesis around f as parameter
| C | mit | MaxLikelihood/CADT |
eb477c92d61c1f2db3d5fd98e842050a4313ba3a | main.c | main.c | #include "kms-endpoint.h"
#include <glib.h>
int main(int argc, char **argv) {
GObject *ep;
GValue val = G_VALUE_INIT;
GError *err = NULL;
KmsConnection *conn = NULL;
g_type_init();
ep = g_object_new(KMS_TYPE_ENDPOINT, "localname", "test_ep", NULL);
if (ep == NULL) {
g_print("Create endpont is: NULL\n");
... | #include "kms-endpoint.h"
#include <glib.h>
int main(int argc, char **argv) {
GObject *ep;
GValue val = G_VALUE_INIT;
GError *err = NULL;
KmsConnection *conn = NULL;
g_type_init();
ep = g_object_new(KMS_TYPE_ENDPOINT, "localname", "test_ep", NULL);
if (ep == NULL) {
g_print("Create endpont is: NULL\n");
... | Add test for delete connection method | Add test for delete connection method
| C | lgpl-2.1 | mparis/kurento-media-server,lulufei/kurento-media-server,lulufei/kurento-media-server,mparis/kurento-media-server,Kurento/kurento-media-server,todotobe1/kurento-media-server,TribeMedia/kurento-media-server,shelsonjava/kurento-media-server,TribeMedia/kurento-media-server,shelsonjava/kurento-media-server,Kurento/kurento-... |
4cb0d352ed7208fc9ac71b006dcb1b0ff8d65ca2 | src/xpiks-qt/Models/logsmodel.h | src/xpiks-qt/Models/logsmodel.h | #ifndef LOGSMODEL
#define LOGSMODEL
#include <QString>
#include <QFile>
#include <QDir>
#include <QDebug>
#include <QTextStream>
#include <QStandardPaths>
#include "Helpers/constants.h"
namespace Models {
class LogsModel : public QObject {
Q_OBJECT
public:
Q_INVOKABLE QString getAllLogsText() ... | #ifndef LOGSMODEL
#define LOGSMODEL
#include <QString>
#include <QFile>
#include <QDir>
#include <QDebug>
#include <QTextStream>
#include <QStandardPaths>
#include "../Helpers/constants.h"
namespace Models {
class LogsModel : public QObject {
Q_OBJECT
public:
Q_INVOKABLE QString getAllLogsText... | Fix for compilation in Windows | Fix for compilation in Windows
| C | mpl-2.0 | Ribtoks/xpiks,Artiom-M/xpiks,Ribtoks/xpiks,Ribtoks/xpiks,Ribtoks/xpiks,Artiom-M/xpiks,Artiom-M/xpiks,Artiom-M/xpiks |
fd440beaf95128b12f2abc279525192bfcc5eca0 | percolation/main.c | percolation/main.c | /* headers */
#include <stdlib.h>
#include <time.h>
#include "lattice.h"
#include "clusters.h"
#include "io_helpers.h"
/* main body function */
int main()
{
int L; /* square lattice size */
double p; /* occupation probability of each lattice site */
int *lattice; /* lattice array */
/* initialize ran... | /* headers */
#include <stdlib.h>
#include <time.h>
#include "lattice.h"
#include "clusters.h"
#include "io_helpers.h"
/* main body function */
int main(int argc, char ** argv)
{
int L; /* square lattice size */
double p; /* occupation probability of each lattice site */
int *lattice; /* lattice array */
... | Add passing problem parameters as program arguments | [percolation] Add passing problem parameters as program arguments
| C | mit | cerisola/fiscomp,cerisola/fiscomp,cerisola/fiscomp |
115f2b95d5756319855249fe60aa91e273e3c191 | test/Driver/noexecstack.c | test/Driver/noexecstack.c | // RUN: %clang -### %s -c -o tmp.o -Wa,--noexecstack 2>&1 | grep "mnoexecstack"
| // RUN: %clang -### %s -c -o tmp.o -triple i686-pc-linux-gnu -integrated-as -Wa,--noexecstack 2>&1 | grep "mnoexecstack"
| Fix this test on machines that don't run clang -cc1as when asked to assemble. | Fix this test on machines that don't run clang -cc1as when asked to assemble.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@133688 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
8d7d203342f1573938e99d984ca335f05e1415bb | test/tools/llvm-cov/zeroFunctionFile.c | test/tools/llvm-cov/zeroFunctionFile.c | #include "Inputs/zeroFunctionFile.h"
int foo(int x) {
return NOFUNCTIONS(x);
}
int main() {
return foo(2);
}
// RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata
// RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPO... | #include "Inputs/zeroFunctionFile.h"
int foo(int x) {
return NOFUNCTIONS(x);
}
int main() {
return foo(2);
}
// RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata
// RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPO... | Disable threading in a test. NFC. | [llvm-cov] Disable threading in a test. NFC.
PR30735 reports an issue where llvm-cov hangs with a worker thread
waiting on a condition, and the main thread waiting to join() the
workers. While this doesn't appear to be a bug in llvm-cov or the
ThreadPool implementation, it would be helpful to disable the use of
thread... | C | apache-2.0 | llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Dri... |
38f81754a540d7e1212e8b6247aff174aceefced | src/user.c | src/user.c | task blink();
task usercontrol(){
int DY, DT;
bool isReset = false;
startTask(blink);
//Enable Positioning System
startTask(positionsystem);
while(true){
//Driving
DY = threshold(PAIRED_CH2^2 / MAX_POWER, 5);
DT = threshold(PAIRED_CH1^2 / MAX_POWER, 5);
drive(DY, DT);
//Mogo
mogo(threshold(PAIRED_... | task blink();
task usercontrol(){
int DY, DT;
bool isReset = false;
startTask(blink);
//Enable Positioning System
startTask(positionsystem);
while(true){
//Driving
DY = threshold(PAIRED_CH2^2 / MAX_POWER, 5) + ((PAIRED_BTN8U - PAIRED_BTN8D) * MAX_POWER);
DT = threshold(PAIRED_CH1^2 / MAX_POWER, 5) + ((PA... | Add button driving and reset encoder warning when bot picked up | Add button driving and reset encoder warning when bot picked up
| C | mit | 18moorei/code-red-in-the-zone |
a995514733949a433e39edec0966ba2789b57ada | libavutil/pca.h | libavutil/pca.h | /*
* Principal component analysis
* Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, o... | /*
* Principal component analysis
* Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, o... | Make diego happy before he notices. | Make diego happy before he notices.
git-svn-id: a4d7c1866f8397a4106e0b57fc4fbf792bbdaaaf@14810 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
| C | lgpl-2.1 | prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg |
89de24b762d3032816d918392725d6ce41d21092 | src/Config.h | src/Config.h | /*
Config (Singleton), extends ofxXMLSettings
Loads app configuration properties from xml file.
*/
#pragma once
#ifndef BBC_CONFIG
#define BBC_CONFIG
#include "XmlSettingsEx.h"
#define CONFIG_GET(_key, _attr, _def) bbc::utils::Config::instance()->getAttribute("config:"_key, _attr, _def)
namespace bbc {
n... | /*
Config (Singleton), extends ofxXMLSettings
Loads app configuration properties from xml file.
*/
#pragma once
#ifndef BBC_CONFIG
#define BBC_CONFIG
#include "XmlSettingsEx.h"
#define CONFIG_GET(_key, _attr, _def) bbc::utils::Config::instance()->getAttribute("config:"_key, _attr, _def)
namespace bbc {
n... | Tweak to test commiting from submodule | Tweak to test commiting from submodule
| C | mit | radamchin/ofxBBCUtils,radamchin/ofxBBCUtils |
615cdb92ee442cbfac75e3602df857e06ab9aee6 | include/llvm/iOperators.h | include/llvm/iOperators.h | //===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=//
//
// This file contains the declarations of all of the Binary Operator classes.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_IBINARY_H
#define LLVM_IBINARY_H
#include "llvm/InstrTypes.... | //===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=//
//
// This file contains the declarations of all of the Binary Operator classes.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_IBINARY_H
#define LLVM_IBINARY_H
#include "llvm/InstrTypes.... | Implement classof for SetCondInst so that instcombine doesn't break on dyn_cast<SetCondInst> | Implement classof for SetCondInst so that instcombine doesn't break on dyn_cast<SetCondInst>
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@3493 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,... |
061bf34805bbe88b25f9084b9f99a7096689c5d8 | library/strings_format.h | library/strings_format.h | #pragma once
#define TINYFORMAT_USE_VARIADIC_TEMPLATES
#ifdef __GNUC__
// Tinyformat has a number of non-annotated switch fallthrough cases
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#include "dependencies/tinyformat/tinyformat.h"
#ifdef __GNUC__
#pragma GCC diagnosti... | #pragma once
#include "fmt/printf.h"
#include "library/strings.h"
namespace OpenApoc
{
template <typename... Args> static UString format(const UString &fmt, Args &&... args)
{
return fmt::sprintf(fmt.str(), std::forward<Args>(args)...);
}
UString tr(const UString &str, const UString domain = "ufo_string");
} // n... | Use fmtlib's sprintf instead of tinyformat | Use fmtlib's sprintf instead of tinyformat
TODO: Move to the indexed formatting strings for fmtlib
| C | mit | Istrebitel/OpenApoc,pmprog/OpenApoc,pmprog/OpenApoc,steveschnepp/OpenApoc,Istrebitel/OpenApoc,steveschnepp/OpenApoc |
c7d9355a433bbd0f82dfa466bf220101e456789a | base/type_defs.h | base/type_defs.h | #pragma once
#include <string>
#include <cstdlib>
// Integer types
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef long int32_t;
typedef unsigned long uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#ifndef _swap_int
templ... | #pragma once
#include <string>
#include <cstdlib>
// Integer types
#ifdef int8_t
typedef char int8_t;
#endif // !int8_t
#ifdef uint8_t
typedef unsigned char uint8_t;
#endif // !uint8_t
#ifdef int16_t
typedef short int16_t;
#endif // !int16_t
#ifdef uint16_t
typedef unsigned short uint16_t;
#endif // !uint16_t
#if... | Fix basic type redefinition errors | Fix basic type redefinition errors
| C | mit | LartSimZ/gameAmbiance |
4cabeb8a7181b841457efa594287b66bf81956e4 | src/skbuff.c | src/skbuff.c | #include "syshead.h"
#include "skbuff.h"
struct sk_buff *alloc_skb(unsigned int size)
{
struct sk_buff *skb = malloc(sizeof(struct sk_buff));
skb->data = malloc(size);
skb->head = skb->data;
skb->tail = skb->data;
skb->end = skb->tail + size;
return skb;
}
void *skb_reserve(struct sk_buff *s... | #include "syshead.h"
#include "skbuff.h"
struct sk_buff *alloc_skb(unsigned int size)
{
struct sk_buff *skb = malloc(sizeof(struct sk_buff));
memset(skb, 0, sizeof(struct sk_buff));
skb->data = malloc(size);
memset(skb->data, 0, size);
skb->head = skb->data;
skb->tail = skb->data;
skb... | Fix Valgrind complaint about unitialized heap memory | Fix Valgrind complaint about unitialized heap memory
| C | mit | saminiir/level-ip,saminiir/level-ip |
39ec68310c69c7f86f4a2fa638782094ef17ac6b | packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c | packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c | #ifdef _MSC_VER
#include <intrin.h>
#define BREAKPOINT_INTRINSIC() __debugbreak()
#else
#define BREAKPOINT_INTRINSIC() __asm__ __volatile__ ("int3")
#endif
int
bar(int const *foo)
{
int count = 0;
for (int i = 0; i < 10; ++i)
{
count += 1;
BREAKPOINT_INTRINSIC();
count += 1;
... | #ifdef _MSC_VER
#include <intrin.h>
#define BREAKPOINT_INTRINSIC() __debugbreak()
#else
#define BREAKPOINT_INTRINSIC() __asm__ __volatile__ ("int3")
#endif
int
bar(int const *foo)
{
int count = 0, i = 0;
for (; i < 10; ++i)
{
count += 1;
BREAKPOINT_INTRINSIC();
count += 1;
... | Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed by default with gcc | Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed by default with gcc
- fix buildbot breakage after r257186
- move declaration outside of for loop
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@257228 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb |
79f3cfe1af88a4dd9b2343f14d50289106d5d973 | firmware/i2c_lcd.c | firmware/i2c_lcd.c | #include <avr/io.h>
#include <util/delay.h>
#include "slcd.h"
int main()
{
init_lcd();
uint8_t backlit = 1;
while (1)
{
lcd_clrscr();
lcd_goto(LINE1);
lcd_puts("Line 1", backlit);
lcd_goto(LINE2);
lcd_puts("Line 2", backlit);
lcd_goto(LINE3);
lcd_puts("Line 3", backlit);
l... | #include <avr/io.h>
#include <util/delay.h>
#include "slcd.h"
int main()
{
init_lcd();
uint8_t backlit = 1;
while (1)
{
lcd_clrscr();
lcd_goto(0, 0);
lcd_puts("Line 1", backlit);
lcd_goto(1, 0);
lcd_puts("Line 2", backlit);
lcd_goto(2, 0);
lcd_puts("Line 3", backlit);
lcd_... | Adjust to changes in slcd library | Adjust to changes in slcd library
| C | mit | andrewadare/avr-breadboarding,andrewadare/avr-breadboarding |
a5a60654efc3f97ba1cf6cbf7043c28ed9860b02 | cmd/lefty/exec.h | cmd/lefty/exec.h | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright ... | Update with new lefty, fixing many bugs and supporting new features | Update with new lefty, fixing many bugs and supporting new features
| C | epl-1.0 | MjAbuz/graphviz,MjAbuz/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,pixe... |
3f37918a0580654ff642a70276f5b94651d224c5 | DeepLinkSDK/DeepLinkSDK.h | DeepLinkSDK/DeepLinkSDK.h | #import "DPLTargetViewControllerProtocol.h"
#import "DPLDeepLinkRouter.h"
#import "DPLRouteHandler.h"
#import "DPLDeepLink.h"
#import "DPLErrors.h"
| #import "DPLTargetViewControllerProtocol.h"
#import "DPLDeepLinkRouter.h"
#import "DPLRouteHandler.h"
#import "DPLDeepLink.h"
#import "DPLMutableDeepLink.h"
#import "DPLErrors.h"
| Add mutable deep link to sdk header. | Add mutable deep link to sdk header.
| C | mit | button/DeepLinkKit,button/DeepLinkKit,button/DeepLinkKit,usebutton/DeepLinkKit,button/DeepLinkKit,usebutton/DeepLinkKit,usebutton/DeepLinkKit |
aab5eceb9b33a5109792ba52bc9f1ddf39059364 | src/debug.h | src/debug.h | /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... | /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... | Rename dbg struct to Debug. | Rename dbg struct to Debug.
| C | apache-2.0 | MichaelClerx/libcellml,cellml/libcellml,cellml/libcellml,hsorby/libcellml,cellml/libcellml,nickerso/libcellml,MichaelClerx/libcellml,nickerso/libcellml,hsorby/libcellml,nickerso/libcellml,cellml/libcellml,nickerso/libcellml,MichaelClerx/libcellml,hsorby/libcellml,hsorby/libcellml |
ec00e8cfc23cb7d04a9b13730607d6c094446f36 | test/tstsoap1.c | test/tstsoap1.c | /*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* $Id: tstsoap1.c,v 1.1 2005-05-06 11:11:37 adam Exp $
*/
#include <stdlib.h>
#if HAVE_XML2
#include <libxml/parser.h>
#endif
int main(int argc, char **argv)
{
#if HAVE_XML2
LIBXML_TEST_VERSION;
if (argc <= 1)
{
xmlC... | /*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* $Id: tstsoap1.c,v 1.2 2005-05-08 07:33:12 adam Exp $
*/
#include <stdlib.h>
#if HAVE_XML2
#include <libxml/parser.h>
#endif
int main(int argc, char **argv)
{
#if HAVE_XML2
LIBXML_TEST_VERSION;
if (argc <= 1)
{
xmlC... | Comment out debug printf stmt | Comment out debug printf stmt
| C | bsd-3-clause | nla/yaz,dcrossleyau/yaz,nla/yaz,dcrossleyau/yaz,dcrossleyau/yaz,nla/yaz,nla/yaz |
a362d5e8273bdafe5be847b7e4020104cf7960c6 | src/mathml.h | src/mathml.h | /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... | /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... | Fix typo in compareMath doxygen documentation. | Fix typo in compareMath doxygen documentation.
| C | apache-2.0 | hsorby/libcellml,cellml/libcellml,nickerso/libcellml,nickerso/libcellml,cellml/libcellml,hsorby/libcellml,cellml/libcellml,nickerso/libcellml,cellml/libcellml,hsorby/libcellml,nickerso/libcellml,hsorby/libcellml |
4bc83be34066a7a42c6297db983e1d9066e14d3e | chrome/renderer/webview_color_overlay.h | chrome/renderer/webview_color_overlay.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#pragma once
#include "base/basictypes.h"
#include ... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#pragma once
#include "base/basictypes.h"
#include ... | Fix build break from the future. | Fix build break from the future.
TBR=pfeldman
Review URL: http://codereview.chromium.org/8801036
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@113098 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,yitian134... |
17530c3d7eceb106a74066446404117158e8aa93 | iobuf/ibuf_readall.c | iobuf/ibuf_readall.c | #include <iobuf/iobuf.h>
#include <str/str.h>
/** Read the remainder of the \c ibuf into the \c str. */
int ibuf_readall(ibuf* in, str* out)
{
for (;;) {
if (!str_catb(out,
in->io.buffer+in->io.bufstart,
in->io.buflen-in->io.bufstart))
return 0;
in->io.bufstart = in->io.buflen;
if (!ibuf_re... | #include <iobuf/iobuf.h>
#include <str/str.h>
/** Read the remainder of the \c ibuf into the \c str. */
int ibuf_readall(ibuf* in, str* out)
{
if (ibuf_eof(in)) return 1;
if (ibuf_error(in)) return 0;
for (;;) {
if (!str_catb(out,
in->io.buffer+in->io.bufstart,
in->io.buflen-in->io.bufstart))
r... | Make sure to do sanity checking before any of the reading. | Make sure to do sanity checking before any of the reading.
| C | lgpl-2.1 | bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs |
5d2a4723bcb4ff7913f8ea7e97890aa62d646ccc | include/ctache/lexer.h | include/ctache/lexer.h | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef LEXER_H
#define LEXER_H
#include <stdlib.h>
#include "linked_list.h"
enum ctache_token_type {
/... | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef LEXER_H
#define LEXER_H
#include <stdlib.h>
#include "linked_list.h"
enum ctache_token_type {
/... | Fix a lexical token ordering issue | Fix a lexical token ordering issue
| C | mpl-2.0 | dwjackson/ctache,dwjackson/ctache |
cf1943751de987986a59a5a458070a7bf4548fee | Josh_Zane_Sebastian/src/parser/types.c | Josh_Zane_Sebastian/src/parser/types.c | #include <stdlib.h>
#include <stdio.h>
struct llnode;
struct symbol;
struct function;
union value;
struct variable;
struct statement;
struct call;
struct llnode {
struct type* car;
struct llnode* cdr;
};
struct call {
char* name;
struct function func;
struct symbol* arguments;
int numargs;
}
struct s... | #include <stdlib.h>
#include <stdio.h>
struct llnode;
struct symbol;
struct function;
union value;
struct variable;
struct statement;
struct call;
struct llnode {
struct variable* car;
struct llnode* cdr;
};
struct call {
char* name;
struct function func;
struct symbol* arguments;
int numargs;
}
stru... | Add a numargs field to struct function, which refers to the number of arguments the function takes. | Add a numargs field to struct function, which refers to the number of arguments the function takes.
| C | mit | aacoppa/final,aacoppa/final |
ef1a586474d7df11fda2a7c3064418e173c38055 | include/parrot/trace.h | include/parrot/trace.h | /* trace.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Tracing support for runops_cores.c.
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#ifndef PARROT_TRACE_H_GUARD
#define PARROT_TRACE_H_GUARD
#include "parrot/parrot.h"
v... | /* trace.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Tracing support for runops_cores.c.
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#ifndef PARROT_TRACE_H_GUARD
#define PARROT_TRACE_H_GUARD
#include "parrot/parrot.h"
v... | Fix a typo in the argument type. | Fix a typo in the argument type.
Patch from <daniel.ritz@gmx.ch>
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@1106 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| C | artistic-2.0 | gagern/parrot,FROGGS/parrot,parrot/parrot,youprofit/parrot,parrot/parrot,tkob/parrot,FROGGS/parrot,fernandobrito/parrot,FROGGS/parrot,tkob/parrot,parrot/parrot,tkob/parrot,gagern/parrot,gitster/parrot,FROGGS/parrot,gitster/parrot,tkob/parrot,tewk/parrot-select,fernandobrito/parrot,gagern/parrot,fernandobrito/parrot,gag... |
cc91506dc6cef57bed963d9e4d3aa002624d7a8b | drake/systems/plants/material_map.h | drake/systems/plants/material_map.h | #pragma once
#include <string>
#include <map>
#include <Eigen/Dense>
typedef std::map<std::string, Eigen::Vector4d, std::less<std::string>,
Eigen::aligned_allocator<
std::pair<std::string, Eigen::Vector4d> > > MaterialMap;
| #pragma once
#include <string>
#include <map>
#include <Eigen/Dense>
typedef std::map<std::string, Eigen::Vector4d, std::less<std::string>,
Eigen::aligned_allocator<
std::pair<const std::string,
Eigen::Vector4d> > > MaterialMap;
| Use pair<'const' Key, Value> in defining MaterialMap type | Use pair<'const' Key, Value> in defining MaterialMap type
Custom allocator to std::map should have std::pair<const Key, Value>
instead of pair<Key, Value>. libc++-3.8.0 actually started checking this
condition by adding static_assert. Without this patch, users (using
libc++>=3.8) see something like the following compi... | C | bsd-3-clause | sheim/drake,sheim/drake,sheim/drake,billhoffman/drake,sheim/drake,billhoffman/drake,sheim/drake,sheim/drake,billhoffman/drake,billhoffman/drake,sheim/drake,billhoffman/drake,sheim/drake,billhoffman/drake,billhoffman/drake,billhoffman/drake |
83dd74f6a0bf69102f807cfb9a904fce2b185594 | utils/lstopo-xml.c | utils/lstopo-xml.c | /*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <private/autogen/config.h>
#ifdef HWLOC_HAVE_XML
#include <hwloc.h>
#inclu... | /*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <private/autogen/config.h>
#ifdef HWLOC_HAVE_XML
#include <hwloc.h>
#inclu... | Print an error when lstopo fails to export to X... | Print an error when lstopo fails to export to X...
Print an error when lstopo fails to export to XML
This commit was SVN r3691.
| C | bsd-3-clause | ggouaillardet/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc |
02d32b05a69c125b9c30d7002f023de4bd55ab4b | src/auth/userdb-passwd.c | src/auth/userdb-passwd.c | /* Copyright (C) 2002-2003 Timo Sirainen */
#include "config.h"
#undef HAVE_CONFIG_H
#ifdef USERDB_PASSWD
#include "common.h"
#include "userdb.h"
#include <pwd.h>
static void passwd_lookup(const char *user, userdb_callback_t *callback,
void *context)
{
struct user_data data;
struct passwd *pw;
pw = getpwn... | /* Copyright (C) 2002-2003 Timo Sirainen */
#include "config.h"
#undef HAVE_CONFIG_H
#ifdef USERDB_PASSWD
#include "common.h"
#include "userdb.h"
#include <pwd.h>
static void passwd_lookup(const char *user, userdb_callback_t *callback,
void *context)
{
struct user_data data;
struct passwd *pw;
size_t len;
... | Support wu-ftpd-like chrooting in /etc/passwd. If home directory ends with "/./", it's chrooted to. | Support wu-ftpd-like chrooting in /etc/passwd. If home directory ends with
"/./", it's chrooted to.
--HG--
branch : HEAD
| C | mit | jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,dscho/dovecot,jkerihuel/dovecot,dscho/dovecot,jkerihuel/dovecot,dscho/dovecot,dscho/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,dscho/dovecot |
92f0a3f1d26eb0a1513a94caa17de980a4979558 | software/infnoise.h | software/infnoise.h | #include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#include <ftdi.h>
// Structure for parsed command line options
struct opt_struct {
uint32_t outputMultiplier; // We output all the entropy when outputMultiplier == 0
bool daemon; // Run as daemon?
bool debug; // Print debugging info?
bool devRandom;... | #include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#include <linux/limits.h>
#include <ftdi.h>
// Structure for parsed command line options
struct opt_struct {
uint32_t outputMultiplier; // We output all the entropy when outputMultiplier == 0
bool daemon; // Run as daemon?
bool debug; // Print debugg... | Fix related to missing include (PATH_MAX) | Fix related to missing include (PATH_MAX)
| C | cc0-1.0 | manuel-domke/infnoise,manuel-domke/infnoise,waywardgeek/infnoise,manuel-domke/infnoise,manuel-domke/infnoise,waywardgeek/infnoise,waywardgeek/infnoise,manuel-domke/infnoise,waywardgeek/infnoise |
f784d4fd6fa0dc156d4512f40df337e6cc7c1f3c | SC4Fix/patcher.h | SC4Fix/patcher.h | #pragma once
#include <stdint.h>
#define ASMJMP(a) _asm { mov CPatcher::uJumpBuffer, a } _asm { jmp CPatcher::uJumpBuffer }
typedef void (*tfnHookFunc)(void);
class CPatcher {
public:
static void InstallHook(uint32_t uAddress, void (*pfnFunc)(void));
static void UninstallHook(uint32_t uAddress, uint8_t uFirstByte... | #pragma once
#include <stdint.h>
#define ASMJMP(a) _asm { mov CPatcher::uJumpBuffer, a } _asm { jmp CPatcher::uJumpBuffer }
#define RETJMP(a) _asm { push a } _asm { ret }
typedef void (*tfnHookFunc)(void);
class CPatcher {
public:
static void InstallHook(uint32_t uAddress, void (*pfnFunc)(void));
static void Unin... | Add RETJMP for jumping to dynamic addresses | Add RETJMP for jumping to dynamic addresses
| C | mit | nsgomez/sc4fix,nsgomez/sc4fix,nsgomez/sc4fix |
a42dff69c2d9260223aa34c0c5c23ab7128644a7 | gnu/lib/libdialog/notify.c | gnu/lib/libdialog/notify.c | /*
* File: notify.c
* Author: Marc van Kempen
* Desc: display a notify box with a message
*
* Copyright (c) 1995, Marc van Kempen
*
* All rights reserved.
*
* This software may be used, modified, copied, distributed, and
* sold, in both source and binary form provided that the above
* copyright and these t... | /*
* File: notify.c
* Author: Marc van Kempen
* Desc: display a notify box with a message
*
* Copyright (c) 1995, Marc van Kempen
*
* All rights reserved.
*
* This software may be used, modified, copied, distributed, and
* sold, in both source and binary form provided that the above
* copyright and these t... | Remove extra argument from mesgbox | Remove extra argument from mesgbox
| 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 |
e5135809c3e77f8f1cf0e84840220c789421b712 | src/OsmTileSource.h | src/OsmTileSource.h | /*
* OsmTileSource.h
* RunParticles
*
* Created by Doug Letterman on 6/30/14.
* Copyright 2014 Doug Letterman. All rights reserved.
*
*/
#ifndef OSMTILESOURCE_H
#define OSMTILESOURCE_H
#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include "Singleton.h"
#include "math.h"
s... | /*
* OsmTileSource.h
* RunParticles
*
* Created by Doug Letterman on 6/30/14.
* Copyright 2014 Doug Letterman. All rights reserved.
*
*/
#ifndef OSMTILESOURCE_H
#define OSMTILESOURCE_H
#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include "Singleton.h"
#include "math.h"
s... | Use an unsigned long offset instead of int. | Use an unsigned long offset instead of int.
| C | mit | dal/RunParticles,dal/RunParticles,dal/RunParticles |
a36438803b5ad4058fd7177d09c851f356e4e69a | include/stdlib.h | include/stdlib.h | #ifndef _FXCG_STDLIB_H
#define _FXCG_STDLIB_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
long abs(long n);
void free(void *p);
void *malloc(size_t sz);
void *realloc(void *p, size_t sz);
int rand(void);
void srand(unsigned seed);
long strtol(const char *str, char **str_end, int base);
void qsort(v... | #ifndef _FXCG_STDLIB_H
#define _FXCG_STDLIB_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
long abs(long n);
void free(void *p);
void *malloc(size_t sz);
void *realloc(void *p, size_t sz);
int rand(void);
void srand(unsigned seed);
long strtol(const char *str, char **str_end, int base);
#define atoi... | Add definitions for atio and atol. | Add definitions for atio and atol.
| C | bsd-3-clause | Forty-Bot/libfxcg,ComputerNerd/libfxcg-copyleft,ComputerNerd/libfxcg-copyleft,ComputerNerd/libfxcg-copyleft,Forty-Bot/libfxcg,Forty-Bot/libfxcg,Jonimoose/libfxcg,Forty-Bot/libfxcg,Jonimoose/libfxcg,ComputerNerd/libfxcg-copyleft,Jonimoose/libfxcg |
15b5dd569501f0e4a66d7970238a1a87b0d9c4a7 | src/file/dl_posix.c | src/file/dl_posix.c | #if HAVE_CONFIG_H
#include "config.h"
#endif
#include "dl.h"
#include "util/macro.h"
#include "util/logging.h"
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
// Note the dlopen takes just the name part. "aacs", internally we
// translate to "libaacs.so" "libaacs.dylib" or "aacs.dll".
void *dl_dlopen (... | #if HAVE_CONFIG_H
#include "config.h"
#endif
#include "dl.h"
#include "util/macro.h"
#include "util/logging.h"
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
void *dl_dlopen ( const char* path )
{
DEBUG(DBG_BDPLUS, "searching for library '%s' ...\n", path);
void *result = dlopen(path, RTLD_LAZ... | Change dlopening of libs to call libraries with their major version on linux systems | Change dlopening of libs to call libraries with their major version on linux systems
| C | lgpl-2.1 | ShiftMediaProject/libaacs,zxlooong/libaacs,mwgoldsmith/aacs,ShiftMediaProject/libaacs,mwgoldsmith/aacs,zxlooong/libaacs,rraptorr/libaacs,rraptorr/libaacs |
7a15de88ba3e92564b3b7bdf6ab6ea6fd246de44 | include/platform/compiler/msvc.h | include/platform/compiler/msvc.h | #pragma once
// Clobber previous definitions with extreme prejudice
#ifdef UNUSED
# undef UNUSED
#endif
#ifdef likely
# undef likely
#endif
#ifdef unlikely
# undef unlikely
#endif
#ifdef alignment
# undef alignment
#endif
#define UNUSED __pragma(warning(disable:4100))
#define unlikely(x) (x)
#define likely(x) (x)
#de... | #pragma once
// Clobber previous definitions with extreme prejudice
#ifdef UNUSED
# undef UNUSED
#endif
#ifdef likely
# undef likely
#endif
#ifdef unlikely
# undef unlikely
#endif
#ifdef alignment
# undef alignment
#endif
#define unlikely(x) (x)
#define likely(x) (x)
#define alignment(x) __declspec(align(x))
#if (_M... | Fix build on older MSVC. | Fix build on older MSVC.
| C | bsd-3-clause | foxkit-us/supergameherm,supergameherm/supergameherm |
f69f3b12f10e133e9552d15291c1c9c236aed6b8 | list.h | list.h | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void * k);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (... | #include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
struct ListNode;
struct List;
typedef struct ListNode ListNode;
typedef struct List List;
List* List_Create(void);
void List_Destroy(List* l);
ListNode* ListNode_Create(void* k);
void ListNode_Destroy(ListNode* n);
ListNode* List_Search(List* l, void* k, int (f... | Fix spacing in parameter for readability | Fix spacing in parameter for readability
| C | mit | MaxLikelihood/CADT |
4981c2107f53231c8a76b6b6ae8ebef10eaea32a | src/Numerics/Optimizers/AmoebaOptimizer/ExampleCostFunction.h | src/Numerics/Optimizers/AmoebaOptimizer/ExampleCostFunction.h | //
// Created by Mathew Seng on 2019-06-03.
//
#ifndef ExampleCostFunction_h
#define ExampleCostFunction_h
#include "itkSingleValuedCostFunction.h"
namespace itk
{
class ExampleCostFunction2 : public SingleValuedCostFunction
{
public:
/** Standard class typedefs. */
typedef ExampleCostFunction2 Self;
typede... | //
// Created by Mathew Seng on 2019-06-03.
//
#ifndef ExampleCostFunction_h
#define ExampleCostFunction_h
#include "itkSingleValuedCostFunction.h"
namespace itk
{
class ExampleCostFunction2 : public SingleValuedCostFunction
{
public:
/** Standard class typedefs. */
typedef ExampleCostFunction2 Self;
typede... | Remove redundant void argument lists | STYLE: Remove redundant void argument lists
Find and remove redundant void argument lists.
| C | apache-2.0 | InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples |
e80f1b331482c558a01f78b87704bc7c23b40639 | alura/c/adivinhacao.c | alura/c/adivinhacao.c | #include <stdio.h>
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
}
| #include <stdio.h>
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
printf("O número %d é o secreto. Não conta p... | Update file, Alura, Introdução a C, Aula 1 | Update file, Alura, Introdução a C, Aula 1
| C | mit | fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs |
646a3d3712809df66fa90bcd7ef21d3659a3e833 | mudlib/mud/home/Test/initd.c | mudlib/mud/home/Test/initd.c | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2010, 2012, 2013, 2014 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free... | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2010, 2012, 2013, 2014 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free... | Allow test subsystem to set off clone bombs | Allow test subsystem to set off clone bombs
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
42ee2e0938c7adec8da26ac544204d32f3af709b | include/fs/fs_interface.h | include/fs/fs_interface.h | /*
* Copyright (c) 2016 Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
#define ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
#ifdef __cplusplus
extern "C" {
#endif
#if defined(CONFIG_FILE_SYSTEM_LITTLEFS)
#define MAX_FILE_NAME 256
#else /* FAT_FS */
#define MAX_FILE_N... | /*
* Copyright (c) 2016 Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
#define ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
#ifdef __cplusplus
extern "C" {
#endif
#if defined(CONFIG_FILE_SYSTEM_LITTLEFS)
#define MAX_FILE_NAME 256
#elif defined(CONFIG_FAT_FILESYSTEM_E... | Set MAX_FILE_NAME appropiately with LFN and FATFS | fs: Set MAX_FILE_NAME appropiately with LFN and FATFS
Try to define MAX_FILE_NAME to the appropriate max length based on the
selected filesystm. Otherwise fallback to a standard filename of 12
(made up of 8.3 : <filename>.<extension>)
Signed-off-by: Roman Vaughan <1620c2a00a7840d4515361aacd4b41348f2a8a7d@gmail.com>
| C | apache-2.0 | galak/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,nashif/zephyr,Vudentz/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,finikorg/z... |
cfa41a9669ff7675bf6c92d4cbdf7e142c98e4ab | subsys/ChTerrain.h | subsys/ChTerrain.h | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... | Add normal information to terrain. | Add normal information to terrain.
| C | bsd-3-clause | hsu/chrono-vehicle,hsu/chrono-vehicle,hsu/chrono-vehicle |
5b8870f2f915415859e794b27d0bfd8d5521cf01 | include/jwtxx/jwt.h | include/jwtxx/jwt.h | #pragma once
#include <string>
#include <memory>
#include <stdexcept>
namespace JWTXX
{
enum class Algorithm {
HS256, HS384, HS512,
RS256, RS384, RS512,
ES256, ES384, ES512,
none
};
class Key
{
public:
struct Error : std::runtime_error
{
Error(const std::string& messa... | #pragma once
#include <string>
#include <unordered_map>
#include <memory>
#include <stdexcept>
namespace JWTXX
{
enum class Algorithm {
HS256, HS384, HS512,
RS256, RS384, RS512,
ES256, ES384, ES512,
none
};
class Key
{
public:
struct Error : std::runtime_error
{
Error... | Add missing include, fix variable name. | Add missing include, fix variable name.
| C | mit | RealImage/jwtxx,RealImage/jwtxx,madf/jwtxx,madf/jwtxx |
506b70663d252ee7a184356634d98789e25d747e | lib.h | lib.h | #define NULL ((void *)0)
#define MIN(_a, _b) \
({ \
__typeof__(_a) __a = (_a); \
__typeof__(_b) __b = (_b); \
__a <= __b ? __a : __b; \
})
#define MAX(_a, _b) \
({ \
__typeof__(_a) __a = (_a); \
__typeof__(_... | #ifndef NULL
#define NULL ((void *)0)
#endif
#define MIN(_a, _b) \
({ \
__typeof__(_a) __a = (_a); \
__typeof__(_b) __b = (_b); \
__a <= __b ? __a : __b; \
})
#define MAX(_a, _b) \
({ \
__typeof__(_a) __a = (_a);... | Check ifndef NULL before define NULL, because clang stddef.h defines NULL | Check ifndef NULL before define NULL, because clang stddef.h defines NULL
| C | mit | aclements/sv6,bowlofstew/sv6,bowlofstew/sv6,aclements/sv6,aclements/sv6,aclements/sv6,bowlofstew/sv6,bowlofstew/sv6,aclements/sv6,bowlofstew/sv6 |
c46c6a4191ef841fb9e5c852985cbaef31846329 | scipy/fftpack/src/zfftnd.c | scipy/fftpack/src/zfftnd.c | /*
Interface to various FFT libraries.
Double complex FFT and IFFT, arbitrary dimensions.
Author: Pearu Peterson, August 2002
*/
#include "fftpack.h"
/* The following macro convert private backend specific function to the public
* functions exported by the module */
#define GEN_PUBLIC_API(name) \
void destroy... | /*
Interface to various FFT libraries.
Double complex FFT and IFFT, arbitrary dimensions.
Author: Pearu Peterson, August 2002
*/
#include "fftpack.h"
/* The following macro convert private backend specific function to the public
* functions exported by the module */
#define GEN_PUBLIC_API(name) \
void destroy... | Remove any non-fftpack code for complex, multi-dimension fft. | Remove any non-fftpack code for complex, multi-dimension fft.
| C | bsd-3-clause | lhilt/scipy,zaxliu/scipy,behzadnouri/scipy,andyfaff/scipy,andim/scipy,newemailjdm/scipy,gef756/scipy,jor-/scipy,fernand/scipy,witcxc/scipy,Eric89GXL/scipy,behzadnouri/scipy,futurulus/scipy,gef756/scipy,gfyoung/scipy,ogrisel/scipy,mdhaber/scipy,maciejkula/scipy,bkendzior/scipy,ilayn/scipy,chatcannon/scipy,aarchiba/scipy... |
9ae82cb0b9b30a8276acf36d7abd6fdaefbdaab8 | test/CodeGen/preserve-as-comments.c | test/CodeGen/preserve-as-comments.c | // RUN: %clang_cc1 -S -fno-preserve-as-comments %s -o - | FileCheck %s --check-prefix=NOASM --check-prefix=CHECK
// RUN: %clang_cc1 -S %s -o - | FileCheck %s --check-prefix=ASM --check-prefix=CHECK
// CHECK-LABEL: main
// CHECK: #APP
// ASM: #comment
// NOASM-NOT: #comment
// CHECK: #NO_APP
int main() {
__asm__("/*c... | // RUN: %clang_cc1 -S -triple=x86_64-unknown-unknown -fno-preserve-as-comments %s -o - | FileCheck %s --check-prefix=NOASM --check-prefix=CHECK
// RUN: %clang_cc1 -S %s -triple=x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=ASM --check-prefix=CHECK
// CHECK-LABEL: main
// CHECK: #APP
// ASM: #comment
// NOA... | Add target triple in test | Add target triple in test
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@276915 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
b3dff4d84df5f1b4b0ad59ac760c32f531321d32 | test/CodeGen/link-bitcode-file.c | test/CodeGen/link-bitcode-file.c | // RUN: %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -emit-llvm-bc -o %t.bc %s
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NO-BC %s
// RUN: not %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -mlink-bitcode-file %t.bc -O3 -emit-llvm -o -... | // RUN: %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -emit-llvm-bc -o %t.bc %s
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NO-BC %s
// RUN: not %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -mlink-bitcode-file %t.bc -O3 -emit-llvm -o -... | Make this test a bit stricter by checking clang's output too. | Make this test a bit stricter by checking clang's output too.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220604 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
ca910100761ba025d9b7156d1030184a42bdd486 | test/Analysis/null-deref-path-notes.c | test/Analysis/null-deref-path-notes.c | // RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s
// Avoid the crash when finding the expression for tracking the origins
// of the null pointer for path notes. Apparently, not much actual tracking
// needs to be done in this example.
void pr34373() {
int *a = 0; // expected-... | // RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s
// Avoid the crash when finding the expression for tracking the origins
// of the null pointer for path notes.
void pr34373() {
int *a = 0; // expected-note{{'a' initialized to a null pointer value}}
(a + 0)[0]; // expected-... | Fix an outdated comment in a test. NFC. | [analyzer] Fix an outdated comment in a test. NFC.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@314298 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit a0d7ea7ad167665974775befd200847e5d84dd02)
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang |
b35bac92d94f94f957ff680de05f36a0100219c0 | Classes/EEEOperationCenter.h | Classes/EEEOperationCenter.h | #import <Foundation/Foundation.h>
#define EEEPrepareBlockSelf() __weak __typeof__(self) __weakSelf = self
#define EEEUseBlockSelf() __typeof__(__weakSelf) __weak blockSelf = __weakSelf
@class EEEInjector;
@class EEEOperation;
@interface EEEOperationCenter : NSObject
@property(nonatomic, strong) NSOperationQueue *ma... | #import <Foundation/Foundation.h>
#define EEEPrepareBlockSelf() __weak __typeof__(self) __weakSelf = self
#define EEEUseBlockSelf() __strong __typeof__(__weakSelf) blockSelf = __weakSelf
@class EEEInjector;
@class EEEOperation;
@interface EEEOperationCenter : NSObject
@property(nonatomic, strong) NSOperationQueue *... | Fix the two-step-macro behavior, tests pass | Fix the two-step-macro behavior, tests pass | C | unlicense | epologee/EEEOperationCenter,epologee/EEEOperationCenter,epologee/EEEOperationCenter |
60f44581f2077d3f5a00cad006a2bb1c86d80f2a | src/condor_includes/condor_fix_stdio.h | src/condor_includes/condor_fix_stdio.h | #ifndef FIX_STDIO_H
#define FIX_STDIO_H
#include <stdio.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
For some reason the stdio.h on OSF1 fails to provide prototypes
for popen() and pclose() if _POSIX_SOURCE is defined.
*/
#if defined(OSF1)
#if defined(__STDC__) || defined(__cplusplus)
FILE *popen( char ... | #ifndef FIX_STDIO_H
#define FIX_STDIO_H
#include <stdio.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
For some reason the stdio.h on OSF1 fails to provide prototypes
for popen() and pclose() if _POSIX_SOURCE is defined.
*/
#if defined(OSF1)
#if defined(__STDC__) || defined(__cplusplus)
FILE *popen( char ... | Add prototypes for setbuffer() and setlinebuf(). Questionable as these should probably be replaced with ANSI stype setbuf() calls. | Add prototypes for setbuffer() and setlinebuf(). Questionable as these
should probably be replaced with ANSI stype setbuf() calls.
| C | apache-2.0 | djw8605/htcondor,djw8605/condor,mambelli/osg-bosco-marco,htcondor/htcondor,djw8605/condor,clalancette/condor-dcloud,htcondor/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,neurodebian/htcondor,htcondor/htcondor,djw8605/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,clalancet... |
5ca658382bf487b2da30a83a3449e16de8e98c36 | examples/test.c | examples/test.c | #include <stdio.h>
#include <string.h>
#include "../src/mlist.h"
int main (int argc, char *argv[]) {
mlist_t *list;
int *n;
char *c;
char *s = NULL;
const char *name = "cubicdaiya";
list = mlist_create();
n = mlist_palloc(list, sizeof(int));
list = mlist_extend(list);
c = mlist_palloc(list, ... | #include <stdio.h>
#include <string.h>
#include "mlist.h"
int main (int argc, char *argv[]) {
mlist_t *list;
int *n;
char *c;
char *s = NULL;
const char *name = "cubicdaiya";
list = mlist_create();
n = mlist_palloc(list, sizeof(int));
list = mlist_extend(list);
c = mlist_palloc(list, sizeof(... | Revert "mv example source code" | Revert "mv example source code"
This reverts commit 7f0d00f7ff862b812cdf427dc717dee6b02ac84b.
| C | bsd-3-clause | cubicdaiya/mlist |
56e734d78f593b0da4fce749ead8c841e3453ba8 | Source/DHScatterGraph.h | Source/DHScatterGraph.h | // Douglas Hill, May 2015
// https://github.com/douglashill/DHScatterGraph
#import <DHScatterGraph/DHScatterGraphLineAttributes.h>
#import <DHScatterGraph/DHScatterGraphPointSet.h>
#import <DHScatterGraph/DHScatterGraphView.h>
| // Douglas Hill, May 2015
// https://github.com/douglashill/DHScatterGraph
extern double const DHScatterGraphVersionNumber;
extern unsigned char const DHScatterGraphVersionString[];
#import <DHScatterGraph/DHScatterGraphLineAttributes.h>
#import <DHScatterGraph/DHScatterGraphPointSet.h>
#import <DHScatterGraph/DHSc... | Add framework version info to umbrella header | Add framework version info to umbrella header
The values of these constants are provided by Xcode’s automatically generated DerivedSources/DHScatterGraph_vers.c.
| C | mit | douglashill/DHScatterGraph |
70705c03128c4cf0594a1dcf91a62a91b8b566e2 | lib/libc/gen/semctl.c | lib/libc/gen/semctl.c | #include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <stdarg.h>
#include <stdlib.h>
int semctl(int semid, int semnum, int cmd, ...)
{
va_list ap;
union semun semun;
union semun *semun_ptr;
va_start(ap, cmd);
if (cmd == IPC_SET || cmd == IPC_STAT... | /*-
* Copyright (c) 2002 Doug Rabson
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditi... | Add a missing copyright for Doug. There are other files missing this copyright in -stable. | Add a missing copyright for Doug. There are other files missing this
copyright in -stable.
PR: 41397
Submitted by: dfr
| 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.