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
|
|---|---|---|---|---|---|---|---|---|---|
1e7621d96cb9d0821c61db6f4e3ef36ddc19b0cd
|
tests/uncompress_fuzzer.c
|
tests/uncompress_fuzzer.c
|
/* Derived from zlib fuzzers at http://github.com/google/oss-fuzz/tree/master/projects/zlib,
* see ossfuzz.sh for full license text.
*/
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "miniz.h"
static unsigned char buffer[256 * 1024] = { 0 };
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
unsigned long int buffer_length = sizeof(buffer);
if (Z_OK != uncompress(buffer, &buffer_length, data, size)) return 0;
return 0;
}
|
/* Derived from zlib fuzzers at http://github.com/google/oss-fuzz/tree/master/projects/zlib,
* see ossfuzz.sh for full license text.
*/
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "miniz.h"
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
unsigned long int buffer_length = 1;
unsigned char *buffer = NULL;
int z_status = 0;
if (size > 0)
buffer_length *= data[0];
if (size > 1)
buffer_length *= data[1];
buffer = (unsigned char *)malloc(buffer_length);
z_status = uncompress(buffer, &buffer_length, data, size);
free(buffer);
if (Z_OK != z_status)
return 0;
return 0;
}
|
Use variable size input buffer in uncompress fuzzer.
|
Use variable size input buffer in uncompress fuzzer.
|
C
|
mit
|
richgel999/miniz,richgel999/miniz,richgel999/miniz
|
72d3d27dd2b4b15bba30f0b7a56a1255ee09fbdc
|
tests/regression/02-base/44-malloc_array.c
|
tests/regression/02-base/44-malloc_array.c
|
// PARAM: --set ana.int.interval true --enable exp.partition-arrays.enabled
#include<stdlib.h>
#include<assert.h>
int main(void) {
int *r = malloc(5 * sizeof(int));
r[3] = 2;
assert(r[4] == 2);
(* Here we only test our implementation. Concretely, accessing the uninitialised r[4] is undefined behavior.
In our implementation we keep the whole memory allocated by malloc as one Blob and the whole Blob contains 2 after it was assigned to r[3].
This is more useful than keeping the Blob unknown. *)
}
|
// PARAM: --set ana.int.interval true --enable exp.partition-arrays.enabled
#include<stdlib.h>
#include<assert.h>
int main(void) {
int *r = malloc(5 * sizeof(int));
r[3] = 2;
assert(r[4] == 2);
/* Here we only test our implementation. Concretely, accessing the uninitialised r[4] is undefined behavior.
In our implementation we keep the whole memory allocated by malloc as one Blob and the whole Blob contains 2 after it was assigned to r[3].
This is more useful than keeping the Blob unknown. */
}
|
Mark the comment in a proper C style
|
Mark the comment in a proper C style
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
75e54983b2b62ec12e7c62b42dd46b1dd7d3fd96
|
brotherKH930.h
|
brotherKH930.h
|
#ifndef BROTHERKH930_H_
#define BROTHERKH930_H_
#import "position.h"
/** Pins unsed for interfacing with the BrotherKH930. */
struct PinSetup {
int encoderV1;
int encoderV2;
int encoderBP; // belt-phase
};
/** Pin setup as used by the KniticV2 PCB. */
PinSetup kniticV2Pins();
/**
* Interfact to a brother knitting machine KH930/940.
* The callback will be called on every event (position/direction change).
*/
class BrotherKH930 {
public:
BrotherKH930(const PinSetup pins, void (*callback)(void*), void* context);
int position();
Direction direction();
private:
static void positionCallback(void* context, int pos);
void onChange();
private:
Position *pos;
private:
void (*callback)(void*);
void* callbackContext;
};
#endif
|
#ifndef BROTHERKH930_H_
#define BROTHERKH930_H_
#import "position.h"
/** Pins unsed for interfacing with the BrotherKH930. */
struct PinSetup {
int encoderV1;
int encoderV2;
int encoderBP; // belt-phase
};
/** Pin setup as used by the KniticV2 PCB. */
PinSetup kniticV2Pins();
/**
* Interfact to a brother knitting machine KH930/940.
* The callback will be called on every event (position/direction change). The
* callback might be called in a ISR.
*/
class BrotherKH930 {
public:
BrotherKH930(const PinSetup pins, void (*callback)(void*), void* context);
int position();
Direction direction();
private:
static void positionCallback(void* context, int pos);
void onChange();
private:
Position *pos;
private:
void (*callback)(void*);
void* callbackContext;
};
#endif
|
Add comment regarding ISR in callback.
|
Add comment regarding ISR in callback.
|
C
|
apache-2.0
|
msiegenthaler/brotherKH930_arduino
|
7c686661d65c63f6f518ca81830dd61bd64bfe1f
|
test/Analysis/uninit-vals-ps.c
|
test/Analysis/uninit-vals-ps.c
|
// RUN: clang -checker-simple -verify %s &&
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct FPRec {
void (*my_func)(int * x);
};
int bar(int x);
int f1_a(struct FPRec* foo) {
int x;
(*foo->my_func)(&x);
return bar(x)+1; // no-warning
}
int f1_b() {
int x;
return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}}
}
int f2() {
int x;
if (x+1) // expected-warning{{Branch}}
return 1;
return 2;
}
int f2_b() {
int x;
return ((x+1)+2+((x))) + 1 ? 1 : 2; // expected-warning{{Branch}}
}
int f3(void) {
int i;
int *p = &i;
if (*p > 0) // expected-warning{{Branch condition evaluates to an uninitialized value}}
return 0;
else
return 1;
}
|
// RUN: clang -checker-simple -verify %s &&
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct FPRec {
void (*my_func)(int * x);
};
int bar(int x);
int f1_a(struct FPRec* foo) {
int x;
(*foo->my_func)(&x);
return bar(x)+1; // no-warning
}
int f1_b() {
int x;
return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}}
}
int f2() {
int x;
if (x+1) // expected-warning{{Branch}}
return 1;
return 2;
}
int f2_b() {
int x;
return ((x+1)+2+((x))) + 1 ? 1 : 2; // expected-warning{{Branch}}
}
int f3(void) {
int i;
int *p = &i;
if (*p > 0) // expected-warning{{Branch condition evaluates to an uninitialized value}}
return 0;
else
return 1;
}
int ret_uninit() {
int i;
int *p = &i;
return *p; // expected-warning{{Uninitialized or undefined return value returned to caller.}}
}
|
Add checker test case: warn about returning an uninitialized value to the caller.
|
Add checker test case: warn about returning an uninitialized value to the caller.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59765 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,apple/swift-clang
|
dcd310e5c86b0a93ab79ac0940c936486106fb6a
|
osu.Framework/Resources/Shaders/sh_Utils.h
|
osu.Framework/Resources/Shaders/sh_Utils.h
|
#define GAMMA 2.2
vec4 toLinear(vec4 colour)
{
return vec4(pow(colour.rgb, vec3(GAMMA)), colour.a);
}
vec4 toSRGB(vec4 colour)
{
return vec4(pow(colour.rgb, vec3(1.0 / GAMMA)), colour.a);
}
|
#define GAMMA 2.4
float toLinear(float color)
{
return color <= 0.04045 ? (color / 12.92) : pow((color + 0.055) / 1.055, GAMMA);
}
vec4 toLinear(vec4 colour)
{
return vec4(toLinear(colour.r), toLinear(colour.g), toLinear(colour.b), colour.a);
}
float toSRGB(float color)
{
return color < 0.0031308 ? (12.92 * color) : (1.055 * pow(color, 1.0 / GAMMA) - 0.055);
}
vec4 toSRGB(vec4 colour)
{
return vec4(toSRGB(colour.r), toSRGB(colour.g), toSRGB(colour.b), colour.a);
// The following implementation using mix and step may be faster, but stackoverflow indicates it is in fact a lot slower on some GPUs.
//return vec4(mix(colour.rgb * 12.92, 1.055 * pow(colour.rgb, vec3(1.0 / GAMMA)) - vec3(0.055), step(0.0031308, colour.rgb)), colour.a);
}
|
Convert to sRGB based on the appropriate formulas instead of an approximiate 2.2 gamma correction.
|
Convert to sRGB based on the appropriate formulas instead of an approximiate 2.2 gamma correction.
|
C
|
mit
|
EVAST9919/osu-framework,naoey/osu-framework,ZLima12/osu-framework,naoey/osu-framework,paparony03/osu-framework,Nabile-Rahmani/osu-framework,default0/osu-framework,DrabWeb/osu-framework,peppy/osu-framework,peppy/osu-framework,smoogipooo/osu-framework,DrabWeb/osu-framework,RedNesto/osu-framework,ZLima12/osu-framework,EVAST9919/osu-framework,EVAST9919/osu-framework,DrabWeb/osu-framework,Tom94/osu-framework,paparony03/osu-framework,peppy/osu-framework,ppy/osu-framework,Nabile-Rahmani/osu-framework,Tom94/osu-framework,ppy/osu-framework,RedNesto/osu-framework,smoogipooo/osu-framework,ppy/osu-framework,EVAST9919/osu-framework,default0/osu-framework
|
73499d78a98dd162f774d1be8f6bb0cc10229b92
|
include/lldb/Host/Endian.h
|
include/lldb/Host/Endian.h
|
//===-- Endian.h ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_host_endian_h_
#define liblldb_host_endian_h_
#include "lldb/lldb-enumerations.h"
namespace lldb {
namespace endian {
static union EndianTest
{
uint32_t num;
uint8_t bytes[sizeof(uint32_t)];
} const endianTest = { (uint16_t)0x01020304 };
inline ByteOrder InlHostByteOrder() { return (ByteOrder)endianTest.bytes[0]; }
// ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0];
}
}
#endif // liblldb_host_endian_h_
|
//===-- Endian.h ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_host_endian_h_
#define liblldb_host_endian_h_
#include "lldb/lldb-enumerations.h"
namespace lldb {
namespace endian {
static union EndianTest
{
uint32_t num;
uint8_t bytes[sizeof(uint32_t)];
} const endianTest = { 0x01020304 };
inline ByteOrder InlHostByteOrder() { return (ByteOrder)endianTest.bytes[0]; }
// ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0];
}
}
#endif // liblldb_host_endian_h_
|
Fix endian test for big-endian hosts
|
Fix endian test for big-endian hosts
The uint16_t cast truncated the magic value to 0x00000304, making the
first byte 0 (eByteOrderInvalid) on big endian hosts.
Reported by Justin Hibbits.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@213861 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb
|
0b073b52fd838984f2ee34095627b5e95d863c3e
|
JPetReaderInterface/JPetReaderInterface.h
|
JPetReaderInterface/JPetReaderInterface.h
|
/**
* @copyright Copyright 2016 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @file JPetReaderInterface.h
*/
#ifndef JPETREADERINTERFACE_H
#define JPETREADERINTERFACE_H
#include <TNamed.h> // for Event typedef
class JPetReaderInterface {
public:
typedef TObject MyEvent;
virtual ~JPetReaderInterface() {;}
virtual MyEvent& getCurrentEvent()=0;
virtual bool nextEvent()=0;
virtual bool firstEvent()=0;
virtual bool lastEvent()=0;
virtual bool nthEvent(int n)=0;
virtual long long getCurrentEventNumber() const =0;
virtual long long getNbOfAllEvents() const =0;
virtual TObject* getObjectFromFile(const char* name)=0;
virtual bool openFileAndLoadData(const char* filename, const char* treename)=0;
virtual void closeFile()=0;
};
#endif /* !JPETREADERINTERFACE_H */
|
/**
* @copyright Copyright 2016 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @file JPetReaderInterface.h
*/
#ifndef JPETREADERINTERFACE_H
#define JPETREADERINTERFACE_H
#include <TNamed.h> // for Event typedef
class JPetReaderInterface {
public:
typedef TObject MyEvent;
virtual ~JPetReaderInterface() {;}
virtual MyEvent& getCurrentEvent()=0;
virtual bool nextEvent()=0;
virtual bool firstEvent()=0;
virtual bool lastEvent()=0;
virtual bool nthEvent(long long int n)=0;
virtual long long getCurrentEventNumber() const =0;
virtual long long getNbOfAllEvents() const =0;
virtual TObject* getObjectFromFile(const char* name)=0;
virtual bool openFileAndLoadData(const char* filename, const char* treename)=0;
virtual void closeFile()=0;
};
#endif /* !JPETREADERINTERFACE_H */
|
Change int to long long
|
Change int to long long
|
C
|
apache-2.0
|
wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework
|
ac843efe7bcdc94edf442b210ff70dddc486576e
|
Problem031/C/solution_1.c
|
Problem031/C/solution_1.c
|
/*
* =====================================================================================
*
* Copyright 2015 Manoel Vilela
*
*
* Filename: solution_1.c
*
* Description: Solution for Problem031 of ProjectEuler
*
* Author: Manoel Vilela
* Contact: manoel_vilela@engineer.com
* Organization: UFPA
* Perfomance: 0.02s | Intel E7400 @ 3.5Ghz
*
* =====================================================================================
**/
#include <stdio.h>
#define N_COINS 8
int different_ways(int money, int *coins, int n_coins) {
int max_coin = money / (*coins);
int n, ways = 0;
for (n = 0; n <= max_coin; n++) {
int new_money = (*coins) * n;
if (n_coins > 1 && new_money < money)
ways += different_ways(money - new_money, coins + 1, n_coins - 1);
if (new_money == money) {
ways++;
break;
}
}
return ways;
}
int main(int argc, char **argv){
int coins[N_COINS] = {200, 100, 50, 20, 10, 5, 2, 1};
int money = 200;
int answer = different_ways(money, coins, N_COINS);
printf("%d\n", answer);
return 0;
}
|
/*
* =====================================================================================
*
* Copyright 2015 Manoel Vilela
*
*
* Filename: solution_1.c
*
* Description: Solution for Problem031 of ProjectEuler
*
* Author: Manoel Vilela
* Contact: manoel_vilela@engineer.com
* Organization: UFPA
* Perfomance: 0.02s | Intel E7400 @ 3.5Ghz
*
* =====================================================================================
**/
#include <stdio.h>
int different_ways(int money, int *coins, int n_coins) {
int max_coin = money / (*coins);
int n, ways = 0;
for (n = 0; n <= max_coin; n++) {
int new_money = (*coins) * n;
if (n_coins > 1 && new_money < money)
ways += different_ways(money - new_money, coins + 1, n_coins - 1);
if (new_money == money) {
ways++;
break;
}
}
return ways;
}
int main(int argc, char **argv){
int coins[] = {200, 100, 50, 20, 10, 5, 2, 1};
int lenght = sizeof(coins) / sizeof(int);
int money = 200;
int answer = different_ways(money, coins, lenght);
printf("%d\n", answer);
return 0;
}
|
Remove the unecessary macro N_COINS to sizeof-way
|
Remove the unecessary macro N_COINS to sizeof-way
|
C
|
mit
|
DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler
|
e0c8d7bc0a14d5b7fb6b528c10b8462eacc18f0e
|
src/api-mock.h
|
src/api-mock.h
|
#ifndef APIMOCK_H
#define APIMOCK_H
#include "core/exceptions.h"
#include "http/httpserver.h"
#include "http/requestdata.h"
#include "http/requestdata.h"
#include "http/statuscodes.h"
#include "routing/routedresourcestrategy.h"
#endif
|
#ifndef APIMOCK_H
#define APIMOCK_H
#include "core/exceptions.h"
#include "http/httpserver.h"
#include "http/requestdata.h"
#include "http/requestdata.h"
#include "http/statuscodes.h"
#include "routing/config.h"
#include "routing/routedresourcestrategy.h"
#endif
|
Include route configuration file in main header
|
Include route configuration file in main header
|
C
|
mit
|
Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock
|
fb535ccb30845fe0b7bd09caa37a838985b72ff9
|
arch/x86/entry/vdso/vdso32/vclock_gettime.c
|
arch/x86/entry/vdso/vdso32/vclock_gettime.c
|
#define BUILD_VDSO32
#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
#undef CONFIG_OPTIMIZE_INLINING
#endif
#undef CONFIG_X86_PPRO_FENCE
#ifdef CONFIG_X86_64
/*
* in case of a 32 bit VDSO for a 64 bit kernel fake a 32 bit kernel
* configuration
*/
#undef CONFIG_64BIT
#undef CONFIG_X86_64
#undef CONFIG_ILLEGAL_POINTER_VALUE
#undef CONFIG_SPARSEMEM_VMEMMAP
#undef CONFIG_NR_CPUS
#define CONFIG_X86_32 1
#define CONFIG_PAGE_OFFSET 0
#define CONFIG_ILLEGAL_POINTER_VALUE 0
#define CONFIG_NR_CPUS 1
#define BUILD_VDSO32_64
#endif
#include "../vclock_gettime.c"
|
#define BUILD_VDSO32
#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
#undef CONFIG_OPTIMIZE_INLINING
#endif
#undef CONFIG_X86_PPRO_FENCE
#ifdef CONFIG_X86_64
/*
* in case of a 32 bit VDSO for a 64 bit kernel fake a 32 bit kernel
* configuration
*/
#undef CONFIG_64BIT
#undef CONFIG_X86_64
#undef CONFIG_PGTABLE_LEVELS
#undef CONFIG_ILLEGAL_POINTER_VALUE
#undef CONFIG_SPARSEMEM_VMEMMAP
#undef CONFIG_NR_CPUS
#define CONFIG_X86_32 1
#define CONFIG_PGTABLE_LEVELS 2
#define CONFIG_PAGE_OFFSET 0
#define CONFIG_ILLEGAL_POINTER_VALUE 0
#define CONFIG_NR_CPUS 1
#define BUILD_VDSO32_64
#endif
#include "../vclock_gettime.c"
|
Define PGTABLE_LEVELS to 32bit VDSO
|
x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO
In case of CONFIG_X86_64, vdso32/vclock_gettime.c fakes a 32-bit
non-PAE kernel configuration by re-defining it to CONFIG_X86_32.
However, it does not re-define CONFIG_PGTABLE_LEVELS leaving it
as 4 levels.
This mismatch leads <asm/pgtable_type.h> to NOT include <asm-generic/
pgtable-nopud.h> and <asm-generic/pgtable-nopmd.h>, which will cause
compile errors when a later patch enhances <asm/pgtable_type.h> to
use PUD_SHIFT and PMD_SHIFT. These -nopud & -nopmd headers define
these SHIFTs for the 32-bit non-PAE kernel.
Fix it by re-defining CONFIG_PGTABLE_LEVELS to 2 levels.
Signed-off-by: Toshi Kani <322b9f75d3806917607539efc168804d71b9503d@hpe.com>
Cc: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Cc: Juergen Gross <29bbaec13092d36559e3abc6f27f7d09c395819f@suse.com>
Cc: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
Cc: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@redhat.com>
Cc: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@alien8.de>
Cc: Konrad Wilk <da3a51b335cef0eb0e2c329c5ef6bcd6acef687a@oracle.com>
Cc: Robert Elliot <fcf6aac10c16bf4310224494560ff8cb9772fa2e@hpe.com>
Cc: eb778157e2286fdb10f8995701208f41dd1c36dc@kvack.org
Link: http://lkml.kernel.org/r/1442514264-12475-2-git-send-email-322b9f75d3806917607539efc168804d71b9503d@hpe.com
Signed-off-by: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
eff55937ab190391534fc00c0f2c8760728ddb4e
|
Parser/pgen.h
|
Parser/pgen.h
|
/***********************************************************
Copyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
/* Parser generator interface */
extern grammar gram;
extern grammar *meta_grammar PROTO((void));
extern grammar *pgen PROTO((struct _node *));
|
/***********************************************************
Copyright 1991 by Stichting Mathematisch Centrum, Amsterdam, The
Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
/* Parser generator interface */
extern grammar gram;
extern grammar *meta_grammar PROTO((void));
struct _node;
extern grammar *pgen PROTO((struct _node *));
|
Add declaration of struct _node, for scoping reasons.
|
Add declaration of struct _node, for scoping reasons.
|
C
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
9c07822b7768dc2974608b3e7501885ab73edfb0
|
OctoKit/OCTCommitComment.h
|
OctoKit/OCTCommitComment.h
|
//
// OCTCommitComment.h
// OctoKit
//
// Created by Justin Spahr-Summers on 2012-10-02.
// Copyright (c) 2012 GitHub. All rights reserved.
//
#import "OCTObject.h"
// A single comment on a commit.
@interface OCTCommitComment : OCTObject
// The webpage URL for this comment.
@property (nonatomic, copy, readonly) NSURL *HTMLURL;
// The SHA of the commit being commented upon.
@property (nonatomic, copy, readonly) NSString *commitSHA;
// The login of the user who created this comment.
@property (nonatomic, copy, readonly) NSString *commenterLogin;
// The path of the file being commented on.
@property (nonatomic, copy, readonly) NSString *path;
// The body of the commit comment.
@property (nonatomic, copy, readonly) NSString *body;
// The line index in the commit's diff.
@property (nonatomic, copy, readonly) NSNumber *position;
@end
|
//
// OCTCommitComment.h
// OctoKit
//
// Created by Justin Spahr-Summers on 2012-10-02.
// Copyright (c) 2012 GitHub. All rights reserved.
//
#import "OCTObject.h"
// A single comment on a commit.
@interface OCTCommitComment : OCTObject
// The webpage URL for this comment.
@property (nonatomic, copy, readonly) NSURL *HTMLURL;
// The SHA of the commit being commented upon.
@property (nonatomic, copy, readonly) NSString *commitSHA;
// The login of the user who created this comment.
@property (nonatomic, copy, readonly) NSString *commenterLogin;
// The path of the file being commented on.
@property (nonatomic, copy, readonly) NSString *path;
// The body of the commit comment.
@property (nonatomic, copy, readonly) NSString *body;
// The line index in the commit's diff. This will be nil if the comment refers
// to the entire commit.
@property (nonatomic, copy, readonly) NSNumber *position;
@end
|
Document why position can be nil.
|
Document why position can be nil.
|
C
|
mit
|
jonesgithub/octokit.objc,CHNLiPeng/octokit.objc,phatblat/octokit.objc,xantage/octokit.objc,GroundControl-Solutions/octokit.objc,Acidburn0zzz/octokit.objc,yeahdongcn/octokit.objc,daukantas/octokit.objc,phatblat/octokit.objc,leichunfeng/octokit.objc,leichunfeng/octokit.objc,cnbin/octokit.objc,CleanShavenApps/octokit.objc,daemonchen/octokit.objc,cnbin/octokit.objc,jonesgithub/octokit.objc,wrcj12138aaa/octokit.objc,wrcj12138aaa/octokit.objc,xantage/octokit.objc,Palleas/octokit.objc,daukantas/octokit.objc,Acidburn0zzz/octokit.objc,CHNLiPeng/octokit.objc,GroundControl-Solutions/octokit.objc,Palleas/octokit.objc,daemonchen/octokit.objc
|
52bbfee69929a102437015caf625a1a79ffe21b1
|
arch/mips/common/include/arch.h
|
arch/mips/common/include/arch.h
|
/*
Copyright (c) 2016, prpl Foundation
Permission to use, copy, modify, and/or distribute this software for any purpose with or without
fee is hereby granted, provided that the above copyright notice and this permission notice appear
in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
This code was written by Carlos Moratelli at Embedded System Group (GSE) at PUCRS/Brazil.
*/
#ifndef __ARCH_H
#define __ARCH_H
#include <baikal-t1.h>
#endif
|
/*
Copyright (c) 2016, prpl Foundation
Permission to use, copy, modify, and/or distribute this software for any purpose with or without
fee is hereby granted, provided that the above copyright notice and this permission notice appear
in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
This code was written by Carlos Moratelli at Embedded System Group (GSE) at PUCRS/Brazil.
*/
#ifndef __ARCH_H
#define __ARCH_H
#include <pic32mz.h>
#endif
|
Fix compilation error for pic32mz platform.
|
Fix compilation error for pic32mz platform.
|
C
|
isc
|
prplfoundation/prpl-hypervisor,prplfoundation/prpl-hypervisor,prplfoundation/prpl-hypervisor,prplfoundation/prpl-hypervisor,prplfoundation/prpl-hypervisor,prplfoundation/prpl-hypervisor
|
2b6d2c0d5992d240fe52e171967e8c1a176b3265
|
CookieCrunchAdventure/CookieCrunchAdventure/CookieCrunchAdventure-Bridging-Header.h
|
CookieCrunchAdventure/CookieCrunchAdventure/CookieCrunchAdventure-Bridging-Header.h
|
//Skillz dependencies.
#import <MobileCoreServices/MobileCoreServices.h>
#import <PassKit/PassKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <MessageUI/MessageUI.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <Social/Social.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import <StoreKit/StoreKit.h>
#import <Accounts/Accounts.h>
//Skillz framework.
#import <SkillzSDK-iOS/SKillz.h>
|
//Skillz dependencies.
#import <MobileCoreServices/MobileCoreServices.h>
#import <PassKit/PassKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <MessageUI/MessageUI.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <Social/Social.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import <StoreKit/StoreKit.h>
#import <Accounts/Accounts.h>
//Skillz framework.
#import <SkillzSDK-iOS/Skillz.h>
|
Fix typo in Skillz bridging header
|
Fix typo in Skillz bridging header
|
C
|
mit
|
heyx3/Cookie-Crunch-Adventure
|
f97b814a589446e5d3481124f56ddb91708fd000
|
src/tp_qi.in.h
|
src/tp_qi.in.h
|
//Eventloop->post (with delay = 0)
TRACEPOINT_EVENT(qi_qi, eventloop_post,
TP_ARGS(unsigned int, taskId,
const char*, typeName),
TP_FIELDS(ctf_integer(int, taskId, taskId)
ctf_string(typeName, typeName)
)
)
//Eventloop->async && post with delay
TRACEPOINT_EVENT(qi_qi, eventloop_delay,
TP_ARGS(unsigned int, taskId,
const char*, typeName,
unsigned int, usDelay),
TP_FIELDS(ctf_integer(int, taskId, taskId)
ctf_string(typeName, typeName)
ctf_integer(int, usDelay, usDelay))
)
//task really start
TRACEPOINT_EVENT(qi_qi, eventloop_task_start,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
//task stop
TRACEPOINT_EVENT(qi_qi, eventloop_task_stop,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
//task has been cancelled before running
TRACEPOINT_EVENT(qi_qi, eventloop_task_cancel,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
|
//Eventloop->post (with delay = 0)
TRACEPOINT_EVENT(qi_qi, eventloop_post,
TP_ARGS(unsigned int, taskId,
const char*, typeName),
TP_FIELDS(ctf_integer(int, taskId, taskId)
ctf_string(typeName, typeName)
)
)
//Eventloop->async && post with delay
TRACEPOINT_EVENT(qi_qi, eventloop_delay,
TP_ARGS(unsigned int, taskId,
const char*, typeName,
unsigned int, usDelay),
TP_FIELDS(ctf_integer(int, taskId, taskId)
ctf_string(typeName, typeName)
ctf_integer(int, usDelay, usDelay))
)
//task really start
TRACEPOINT_EVENT(qi_qi, eventloop_task_start,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
//task stop
TRACEPOINT_EVENT(qi_qi, eventloop_task_stop,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
//task has been cancelled before running
TRACEPOINT_EVENT(qi_qi, eventloop_task_cancel,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
//task has been set on error
TRACEPOINT_EVENT(qi_qi, eventloop_task_error,
TP_ARGS(unsigned int, taskId),
TP_FIELDS(ctf_integer(int, taskId, taskId))
)
|
Fix compilation of eventloop with probes
|
Fix compilation of eventloop with probes
Change-Id: Ia885584363de9070200a53acd80d48e3cbeda6fe
Reviewed-on: http://gerrit.aldebaran.lan/48421
Approved: hcuche <2a0975cc082cedff4d4350e3f6ec187146151bc6@aldebaran-robotics.com>
Reviewed-by: hcuche <2a0975cc082cedff4d4350e3f6ec187146151bc6@aldebaran-robotics.com>
Tested-by: hcuche <2a0975cc082cedff4d4350e3f6ec187146151bc6@aldebaran-robotics.com>
|
C
|
bsd-3-clause
|
aldebaran/libqi,bsautron/libqi,vbarbaresi/libqi,aldebaran/libqi,aldebaran/libqi
|
e9296d41b3b8dd5ecd78597beec0b2caf3ea2648
|
include/utilities.h
|
include/utilities.h
|
#ifndef UTILITIES_HLT
#define UTILITIES_HLT
#include <deal.II/base/utilities.h>
#include <deal.II/base/smartpointer.h>
#include <typeinfo>
#include <cxxabi.h>
using namespace dealii;
/**
* SmartPointers are usually not used to point to objects created with
* new. However, sometimes this is useful. The distruction of a
* SmartPointer requires to split the step in two parts. This little
* utility does precisely this.
*/
template <typename TYPE>
void smart_delete (SmartPointer<TYPE> &sp) {
if(sp) {
TYPE * p = sp;
sp = 0;
delete p;
}
}
// Anonymous namespace, to hide implementation detail for the type
// function below
namespace {
struct handle {
char* p;
handle(char* ptr) : p(ptr) { }
~handle() {
std::free(p);
}
};
std::string demangle(const char* name) {
int status = -4; // some arbitrary value to eliminate the compiler warning
handle result( abi::__cxa_demangle(name, NULL, NULL, &status) );
return (status==0) ? result.p : name ;
};
}
/**
* Return a human readable name of the type passed as argument.
*/
template <class T>
std::string type(const T& t) {
return demangle(typeid(t).name());
};
#endif
|
#ifndef UTILITIES_HLT
#define UTILITIES_HLT
#include <deal.II/base/utilities.h>
#include <deal.II/base/smartpointer.h>
#include <typeinfo>
#include <cxxabi.h>
using namespace dealii;
/**
* SmartPointers are usually not used to point to objects created with
* new. However, sometimes this is useful. The distruction of a
* SmartPointer requires to split the step in two parts. This little
* utility does precisely this.
*/
template <typename TYPE>
void smart_delete (SmartPointer<TYPE> &sp) {
if(sp) {
TYPE * p = sp;
sp = 0;
delete p;
}
}
// Anonymous namespace, to hide implementation detail for the type
// function below
namespace {
struct handle {
char* p;
handle(char* ptr) : p(ptr) { }
~handle() {
delete p;
}
};
std::string demangle(const char* name) {
int status = -4; // some arbitrary value to eliminate the compiler warning
handle result( abi::__cxa_demangle(name, NULL, NULL, &status) );
return (status==0) ? result.p : name ;
};
}
/**
* Return a human readable name of the type passed as argument.
*/
template <class T>
std::string type(const T& t) {
return demangle(typeid(t).name());
};
#endif
|
Put delete instead of free
|
Put delete instead of free
|
C
|
lgpl-2.1
|
asartori86/dealii-sak,luca-heltai/deal2lkit,luca-heltai/dealii-sak,luca-heltai/dealii-sak,mathLab/deal2lkit,asartori86/deal2lkit,fsalmoir/dealii-sak,luca-heltai/deal2lkit,nicola-giuliani/dealii-sak,asartori86/dealii-sak,mathLab/deal2lkit,asartori86/deal2lkit,nicola-giuliani/dealii-sak,fsalmoir/dealii-sak
|
eb4125b28743ceb509c2d2b1f196adeecdccfca0
|
source/gloperate/include/gloperate/capabilities/AbstractTypedRenderTargetCapability.h
|
source/gloperate/include/gloperate/capabilities/AbstractTypedRenderTargetCapability.h
|
/******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#pragma once
#include <gloperate/gloperate_api.h>
#include <gloperate/capabilities/AbstractCapability.h>
#include <gloperate/base/RenderTarget.h>
namespace gloperate {
enum class RenderTargetType {
Color,
Depth,
Normal,
Geometry
};
/**
* @brief
*
*/
class GLOPERATE_API AbstractTypedRenderTargetCapability : public AbstractCapability
{
public:
/**
* @brief
* Constructor
*/
AbstractTypedRenderTargetCapability();
/**
* @brief
* Destructor
*/
virtual ~AbstractTypedRenderTargetCapability();
virtual const RenderTarget & renderTarget(RenderTargetType type) = 0;
virtual bool hasRenderTarget(RenderTargetType type) = 0;
protected:
};
} // namespace gloperate
|
/******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#pragma once
#include <gloperate/gloperate_api.h>
#include <gloperate/capabilities/AbstractCapability.h>
#include <gloperate/base/RenderTarget.h>
namespace gloperate {
enum class RenderTargetType {
Color,
Depth,
Normal,
Geometry,
ObjectID
};
/**
* @brief
*
*/
class GLOPERATE_API AbstractTypedRenderTargetCapability : public AbstractCapability
{
public:
/**
* @brief
* Constructor
*/
AbstractTypedRenderTargetCapability();
/**
* @brief
* Destructor
*/
virtual ~AbstractTypedRenderTargetCapability();
virtual const RenderTarget & renderTarget(RenderTargetType type) = 0;
virtual bool hasRenderTarget(RenderTargetType type) = 0;
protected:
};
} // namespace gloperate
|
Add ObjectID to RenderTargetType enum
|
Add ObjectID to RenderTargetType enum
|
C
|
mit
|
Beta-Alf/gloperate,lanice/gloperate,Beta-Alf/gloperate,j-o/gloperate,lanice/gloperate,j-o/gloperate,j-o/gloperate,cginternals/gloperate,j-o/gloperate,lanice/gloperate,Beta-Alf/gloperate,p-otto/gloperate,lanice/gloperate,cginternals/gloperate,hpi-r2d2/gloperate,hpicgs/gloperate,Beta-Alf/gloperate,p-otto/gloperate,lanice/gloperate,p-otto/gloperate,hpicgs/gloperate,hpicgs/gloperate,p-otto/gloperate,hpi-r2d2/gloperate,hpicgs/gloperate,p-otto/gloperate,cginternals/gloperate,cginternals/gloperate,hpicgs/gloperate,Beta-Alf/gloperate
|
692bb0259b4d9c988841919116dbb8e5216d3b5a
|
system/platforms/arm-qemu/platform-local.h
|
system/platforms/arm-qemu/platform-local.h
|
/**
* @file platform-local.h
*
*/
#ifndef _ARM_QEMU_PLATFORM_LOCAL_H
#define _ARM_QEMU_PLATFORM_LOCAL_H
/*
* The fluke-arm platform has so little memory that the global default
* of 64k for INITSTK is too big. Try something more conservativer.
*/
#define INITSTK (1337)
#endif /* _ARM_QEMU_PLATFORM_LOCAL_H */
|
/**
* @file platform-local.h
*
*/
#ifndef _ARM_QEMU_PLATFORM_LOCAL_H
#define _ARM_QEMU_PLATFORM_LOCAL_H
#endif /* _ARM_QEMU_PLATFORM_LOCAL_H */
|
Use the default stack size
|
arm-qeum: Use the default stack size
Because we have a lot more ram than the fluke-arm port had, we can
afford to use the default platform-independent stack size.
|
C
|
bsd-3-clause
|
robixnai/xinu-arm,robixnai/xinu-arm,robixnai/xinu-arm
|
07b877eb5d542876043969148593b456ff1187be
|
include/llvm/Transforms/PrintModulePass.h
|
include/llvm/Transforms/PrintModulePass.h
|
//===- llvm/Transforms/PrintModulePass.h - Printing Pass ---------*- C++ -*--=//
//
// This file defines a simple pass to print out methods of a module as they are
// processed.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_PRINTMODULE_H
#define LLVM_TRANSFORMS_PRINTMODULE_H
#include "llvm/Transforms/Pass.h"
#include "llvm/Assembly/Writer.h"
class PrintModulePass : public Pass {
string Banner; // String to print before each method
ostream *Out; // ostream to print on
bool DeleteStream; // Delete the ostream in our dtor?
public:
inline PrintModulePass(const string &B, ostream *o = &cout, bool DS = false)
: Banner(B), Out(o), DeleteStream(DS) {}
~PrintModulePass() {
if (DeleteStream) delete Out;
}
// doPerMethodWork - This pass just prints a banner followed by the method as
// it's processed.
//
bool doPerMethodWork(Method *M) {
(*Out) << Banner << M;
return false;
}
};
#endif
|
//===- llvm/Transforms/PrintModulePass.h - Printing Pass ---------*- C++ -*--=//
//
// This file defines a simple pass to print out methods of a module as they are
// processed.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_PRINTMODULE_H
#define LLVM_TRANSFORMS_PRINTMODULE_H
#include "llvm/Transforms/Pass.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Bytecode/Writer.h"
class PrintModulePass : public Pass {
string Banner; // String to print before each method
ostream *Out; // ostream to print on
bool DeleteStream; // Delete the ostream in our dtor?
bool PrintAsBytecode; // Print as bytecode rather than assembly?
public:
inline PrintModulePass(const string &B, ostream *o = &cout, bool DS = false,
bool printAsBytecode = false)
: Banner(B), Out(o), DeleteStream(DS), PrintAsBytecode(printAsBytecode) {}
~PrintModulePass() {
if (DeleteStream) delete Out;
}
// doPerMethodWork - This pass just prints a banner followed by the method as
// it's processed.
//
bool doPerMethodWork(Method *M) {
if (! PrintAsBytecode)
(*Out) << Banner << M;
return false;
}
// doPassFinalization - Virtual method overriden by subclasses to do any post
// processing needed after all passes have run.
//
bool doPassFinalization(Module *M) {
if (PrintAsBytecode)
WriteBytecodeToFile(M, *Out);
return false;
}
};
#endif
|
Add option to print as bytecode instead of assembly.
|
Add option to print as bytecode instead of assembly.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@887 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm
|
c67c564520eecf9c8517075b286ec0ac976d07a4
|
vespalib/src/vespa/vespalib/util/hw_info.h
|
vespalib/src/vespa/vespalib/util/hw_info.h
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "i_hw_info.h"
namespace vespalib {
/*
* class describing some hardware on the machine.
*/
class HwInfo : public IHwInfo
{
bool _spinningDisk;
public:
HwInfo();
virtual ~HwInfo();
virtual bool spinningDisk() const override;
};
}
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "i_hw_info.h"
namespace vespalib {
/*
* Class describing some hardware on the machine.
*/
class HwInfo : public IHwInfo
{
bool _spinningDisk;
public:
HwInfo();
virtual ~HwInfo();
virtual bool spinningDisk() const override;
};
}
|
Use proper uppercase at start of comment.
|
Use proper uppercase at start of comment.
|
C
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
1c8d27bccc845ca70eb11c29d5d498bb2371c86a
|
link-grammar/externs.h
|
link-grammar/externs.h
|
/*************************************************************************/
/* Copyright (c) 2004 */
/* Daniel Sleator, David Temperley, and John Lafferty */
/* All rights reserved */
/* */
/* Use of the link grammar parsing system is subject to the terms of the */
/* license set forth in the LICENSE file included with this software. */
/* This license allows free redistribution and use in source and binary */
/* forms, with or without modification, subject to certain conditions. */
/* */
/*************************************************************************/
#ifndef _EXTERNS_H
#define _EXTERNS_H
/* verbosity global is held in utilities.c */
extern int verbosity; /* the verbosity level for error messages */
extern char * debug; /* comma-separated function list to debug */
extern char * test; /* comma-separated function list to debug */
#endif /* _EXTERNS_H */
|
/*************************************************************************/
/* Copyright (c) 2004 */
/* Daniel Sleator, David Temperley, and John Lafferty */
/* All rights reserved */
/* */
/* Use of the link grammar parsing system is subject to the terms of the */
/* license set forth in the LICENSE file included with this software. */
/* This license allows free redistribution and use in source and binary */
/* forms, with or without modification, subject to certain conditions. */
/* */
/*************************************************************************/
#ifndef _EXTERNS_H
#define _EXTERNS_H
/* verbosity global is held in utilities.c */
extern int verbosity; /* the verbosity level for error messages */
extern char * debug; /* comma-separated functions/files to debug */
extern char * test; /* comma-separated features to test */
#endif /* _EXTERNS_H */
|
Fix global variable description comments.
|
Fix global variable description comments.
|
C
|
lgpl-2.1
|
ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,linas/link-grammar
|
7ba2cae8c825baf411488ded7d0eb1e6cc17452d
|
tests/headers/issue-1554.h
|
tests/headers/issue-1554.h
|
// bindgen-flags: --default-enum-style rust_non_exhaustive --raw-line '#![cfg(feature = "nightly")]' --raw-line '#![feature(non_exhaustive)]'
enum Planet {
earth,
mars
};
|
// bindgen-flags: --default-enum-style rust_non_exhaustive --rust-target nightly --raw-line '#![cfg(feature = "nightly")]' --raw-line '#![feature(non_exhaustive)]'
enum Planet {
earth,
mars
};
|
Add missing --rust-target flags on test case.
|
Add missing --rust-target flags on test case.
See https://github.com/rust-lang/rust-bindgen/pull/1575#discussion_r293079226
|
C
|
bsd-3-clause
|
emilio/rust-bindgen,emilio/rust-bindgen,emilio/rust-bindgen,rust-lang/rust-bindgen,emilio/rust-bindgen,emilio/rust-bindgen,rust-lang/rust-bindgen,rust-lang/rust-bindgen,rust-lang/rust-bindgen
|
3f2067c6dadb97125994dacc517a4be6f0b67256
|
linux/include/stdint.h
|
linux/include/stdint.h
|
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* @file linux/include/stdint.h
* @brief Define the uintX_t types for the Linux kernel
* @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
*/
#ifndef STDINT_H_
#define STDINT_H_
#ifndef __KERNEL__
# error "for Linux kernel only!"
#endif
#include <linux/types.h>
typedef u_int8_t uint8_t;
typedef u_int16_t uint16_t;
typedef u_int32_t uint32_t;
#endif /* STDINT_H_ */
|
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* @file linux/include/stdint.h
* @brief Define the uintX_t types for the Linux kernel
* @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
*/
#ifndef STDINT_H_
#define STDINT_H_
#ifndef __KERNEL__
# error "for Linux kernel only!"
#endif
#include <linux/types.h>
#endif /* STDINT_H_ */
|
Fix build of the Linux kernel module on ARM.
|
Fix build of the Linux kernel module on ARM.
|
C
|
lgpl-2.1
|
didier-barvaux/rohc,didier-barvaux/rohc,didier-barvaux/rohc,didier-barvaux/rohc,didier-barvaux/rohc
|
a112b69d8c3f17f3320198e658cefd82324d95ff
|
src/widgets/external_ip.c
|
src/widgets/external_ip.c
|
#include "widgets.h"
#include "external_ip.h"
static int
widget_external_ip_send_update () {
char *external_ip = wkline_curl_request(wkline_widget_external_ip_address);
json_t *json_data_object = json_object();
char *json_payload;
json_object_set_new(json_data_object, "ip", json_string("ip"));
json_payload = json_dumps(json_data_object, 0);
widget_data_t *widget_data = malloc(sizeof(widget_data_t) + 4096);
widget_data->widget = "external_ip";
widget_data->data = json_payload;
g_idle_add((GSourceFunc)update_widget, widget_data);
free(external_ip);
return 0;
}
void
*widget_external_ip () {
for (;;) {
widget_external_ip_send_update();
sleep(600);
}
return 0;
}
|
#include "widgets.h"
#include "external_ip.h"
static int
widget_external_ip_send_update () {
char *external_ip = wkline_curl_request(wkline_widget_external_ip_address);
json_t *json_data_object = json_object();
char *json_payload;
json_object_set_new(json_data_object, "ip", json_string(external_ip));
json_payload = json_dumps(json_data_object, 0);
widget_data_t *widget_data = malloc(sizeof(widget_data_t) + 4096);
widget_data->widget = "external_ip";
widget_data->data = json_payload;
g_idle_add((GSourceFunc)update_widget, widget_data);
free(external_ip);
return 0;
}
void
*widget_external_ip () {
for (;;) {
widget_external_ip_send_update();
sleep(600);
}
return 0;
}
|
Fix error in external IP widget
|
Fix error in external IP widget
|
C
|
mit
|
jhanssen/candybar,Lokaltog/candybar,jhanssen/candybar,Lokaltog/candybar
|
1a7d60e5c88c09b3a113436dcac983adedeac2a5
|
mediacontrols.h
|
mediacontrols.h
|
#pragma once
#include <QtWidgets>
#include <QMediaPlayer>
class MediaControls : public QWidget
{
Q_OBJECT
public:
MediaControls(QWidget *parent = 0);
QMediaPlayer::State state() const;
int volume() const;
bool isMuted();
public slots:
void setState(QMediaPlayer::State state);
void setVolume(int volume);
void setMuted(bool muted);
signals:
void play();
void pause();
void stop();
void next();
void previous();
void changeVolume(int volume);
void changeMuting(bool muting);
private slots:
void playClicked();
void muteClicked();
void onVolumeSliderValueChanged();
private:
QMediaPlayer::State playerState;
bool playerMuted;
QPushButton *playButton;
QPushButton *stopButton;
QPushButton *nextButton;
QPushButton *previousButton;
QPushButton *muteButton;
QSlider *volumeSlider;
};
|
#pragma once
#include <QtWidgets>
#include <QMediaPlayer>
class MediaControls : public QWidget
{
Q_OBJECT
public:
MediaControls(QWidget *parent = 0);
QMediaPlayer::State state() const;
int volume() const;
bool isMuted();
public slots:
void setState(QMediaPlayer::State state);
void setVolume(int volume);
void setMuted(bool muted);
signals:
void play();
void pause();
void stop();
void next();
void previous();
void changeVolume(int volume);
void changeMuting(bool muting);
void valueChanged(int);
private slots:
void playClicked();
void muteClicked();
void onVolumeSliderValueChanged();
private:
QMediaPlayer::State playerState;
bool playerMuted;
QPushButton *playButton;
QPushButton *stopButton;
QPushButton *nextButton;
QPushButton *previousButton;
QPushButton *muteButton;
QSlider *volumeSlider;
};
|
Add one slot for changed value
|
Add one slot for changed value
|
C
|
mit
|
mordegardi/aufision,mordegardi/aufision,mordegardi/aufision
|
443637f6a485f7c9f5e1c4cf393b5fd22a718c69
|
src/unit_PARALLEL/chrono_parallel/collision/ChCNarrowphase.h
|
src/unit_PARALLEL/chrono_parallel/collision/ChCNarrowphase.h
|
#ifndef CHC_NARROWPHASE_H
#define CHC_NARROWPHASE_H
#include "chrono_parallel/ChParallelDefines.h"
#include "chrono_parallel/ChDataManager.h"
namespace chrono {
namespace collision {
struct ConvexShape {
shape_type type; //type of shape
real3 A; //location
real3 B; //dimensions
real3 C; //extra
quaternion R; //rotation
real3* convex; // pointer to convex data;
};
} // end namespace collision
} // end namespace chrono
#endif
|
#ifndef CHC_NARROWPHASE_H
#define CHC_NARROWPHASE_H
#include "chrono_parallel/ChParallelDefines.h"
#include "chrono_parallel/ChDataManager.h"
namespace chrono {
namespace collision {
struct ConvexShape {
shape_type type; //type of shape
real3 A; //location
real3 B; //dimensions
real3 C; //extra
quaternion R; //rotation
real3* convex; // pointer to convex data;
real margin;
ConvexShape():margin(0.04){}
};
} // end namespace collision
} // end namespace chrono
#endif
|
Add a collision margin to each shape Margins are one way to improve stability of contacts. Only the GJK solver will use these initially
|
Add a collision margin to each shape
Margins are one way to improve stability of contacts.
Only the GJK solver will use these initially
|
C
|
bsd-3-clause
|
jcmadsen/chrono,PedroTrujilloV/chrono,jcmadsen/chrono,Milad-Rakhsha/chrono,hsu/chrono,dariomangoni/chrono,hsu/chrono,projectchrono/chrono,andrewseidl/chrono,projectchrono/chrono,hsu/chrono,projectchrono/chrono,tjolsen/chrono,dariomangoni/chrono,armanpazouki/chrono,rserban/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,andrewseidl/chrono,jcmadsen/chrono,Bryan-Peterson/chrono,rserban/chrono,Milad-Rakhsha/chrono,hsu/chrono,projectchrono/chrono,andrewseidl/chrono,jcmadsen/chrono,rserban/chrono,rserban/chrono,PedroTrujilloV/chrono,amelmquist/chrono,amelmquist/chrono,Milad-Rakhsha/chrono,andrewseidl/chrono,hsu/chrono,Milad-Rakhsha/chrono,rserban/chrono,PedroTrujilloV/chrono,jcmadsen/chrono,amelmquist/chrono,Milad-Rakhsha/chrono,PedroTrujilloV/chrono,rserban/chrono,armanpazouki/chrono,andrewseidl/chrono,tjolsen/chrono,amelmquist/chrono,dariomangoni/chrono,armanpazouki/chrono,jcmadsen/chrono,projectchrono/chrono,armanpazouki/chrono,dariomangoni/chrono,Bryan-Peterson/chrono,armanpazouki/chrono,projectchrono/chrono,rserban/chrono,Bryan-Peterson/chrono,tjolsen/chrono,tjolsen/chrono,dariomangoni/chrono,amelmquist/chrono,Bryan-Peterson/chrono,Bryan-Peterson/chrono,PedroTrujilloV/chrono,amelmquist/chrono,armanpazouki/chrono,jcmadsen/chrono
|
686a21bf859f955ff8d3d179da64b7a23c0fed44
|
test/Preprocessor/macro_paste_spacing2.c
|
test/Preprocessor/macro_paste_spacing2.c
|
// RUN: clang-cc %s -E | grep "movl %eax"
#define R1E %eax
#define epilogue(r1) movl r1;
epilogue(R1E)
|
// RUN: clang-cc %s -E | grep "movl %eax"
// PR4132
#define R1E %eax
#define epilogue(r1) movl r1 ## E;
epilogue(R1)
|
Fix the testcase for PR4132.
|
Fix the testcase for PR4132.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@70796 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,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
|
28fe8ce18f7db33a8dc2b47ad07e6e0da491710f
|
include/llvm/Bytecode/WriteBytecodePass.h
|
include/llvm/Bytecode/WriteBytecodePass.h
|
//===- llvm/Bytecode/WriteBytecodePass.h - Bytecode Writer Pass --*- C++ -*--=//
//
// This file defines a simple pass to write the working module to a file after
// pass processing is completed.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_BYTECODE_WRITEBYTECODEPASS_H
#define LLVM_BYTECODE_WRITEBYTECODEPASS_H
#include "llvm/Pass.h"
#include "llvm/Bytecode/Writer.h"
#include <iostream>
class WriteBytecodePass : public Pass {
std::ostream *Out; // ostream to print on
bool DeleteStream;
public:
inline WriteBytecodePass(std::ostream *o = &std::cout, bool DS = false)
: Out(o), DeleteStream(DS) {
}
const char *getPassName() const { return "Bytecode Writer"; }
inline ~WriteBytecodePass() {
if (DeleteStream) delete Out;
}
bool run(Module &M) {
WriteBytecodeToFile(&M, *Out);
return false;
}
};
#endif
|
//===- llvm/Bytecode/WriteBytecodePass.h - Bytecode Writer Pass --*- C++ -*--=//
//
// This file defines a simple pass to write the working module to a file after
// pass processing is completed.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_BYTECODE_WRITEBYTECODEPASS_H
#define LLVM_BYTECODE_WRITEBYTECODEPASS_H
#include "llvm/Pass.h"
#include "llvm/Bytecode/Writer.h"
#include <iostream>
class WriteBytecodePass : public Pass {
std::ostream *Out; // ostream to print on
bool DeleteStream;
public:
WriteBytecodePass() : Out(&std::cout), DeleteStream(false) {}
WriteBytecodePass(std::ostream *o, bool DS = false)
: Out(o), DeleteStream(DS) {
}
inline ~WriteBytecodePass() {
if (DeleteStream) delete Out;
}
bool run(Module &M) {
WriteBytecodeToFile(&M, *Out);
return false;
}
};
#endif
|
Add a version of the bytecode writer pass that has a default ctor
|
Add a version of the bytecode writer pass that has a default ctor
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@3031 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm
|
20027ceb284f470cda25d0ae2c35140b381e91c6
|
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 68
#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 69
#endif
|
Update Skia milestone to 69
|
Update Skia milestone to 69
TBR=reed@google.com
Bug: skia:
Change-Id: Ifabe4c89c9d0018da5d4f270d4e3fb5790e29bfc
Reviewed-on: https://skia-review.googlesource.com/130120
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
|
C
|
bsd-3-clause
|
rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia
|
7a61dc2985b7095d1bc413d014ca3c06e5bc4477
|
include/sauce/exceptions.h
|
include/sauce/exceptions.h
|
#ifndef SAUCE_SAUCE_EXCEPTIONS_H_
#define SAUCE_SAUCE_EXCEPTIONS_H_
#include <stdexcept>
namespace sauce {
/**
* Raised when no binding can be found for a given interface.
*
* TODO sure would be nice to know who..
*/
struct UnboundException:
public std::runtime_error {
UnboundException():
std::runtime_error("Request for unbound interface.") {}
};
}
#endif // ifndef SAUCE_SAUCE_EXCEPTIONS_H_
|
#ifndef SAUCE_SAUCE_EXCEPTIONS_H_
#define SAUCE_SAUCE_EXCEPTIONS_H_
#include <string>
#include <stdexcept>
namespace sauce {
/**
* Base class for all sauce exceptions.
*/
struct Exception: std::runtime_error {
Exception(std::string message):
std::runtime_error(message) {}
};
/**
* Raised when no binding can be found for a given interface.
*
* TODO sure would be nice to know who..
*/
struct UnboundException: Exception {
UnboundException():
Exception("Request for unbound interface.") {}
};
/**
* Raised when a cycle is found in the interface's dependencies.
*
* TODO sure would be nice to know what the cycle is..
*/
struct CircularDependencyException: Exception {
CircularDependencyException():
Exception("Request for unbound interface.") {}
};
}
#endif // ifndef SAUCE_SAUCE_EXCEPTIONS_H_
|
Add a circular dependency exception.
|
Add a circular dependency exception.
Also break out an exception base type.
|
C
|
mit
|
phs/sauce,phs/sauce,phs/sauce,phs/sauce
|
8de958ec707f8e8115881ad595ed4d872bc91641
|
library/src/main/jni/image/image_decoder.h
|
library/src/main/jni/image/image_decoder.h
|
//
// Created by Hippo on 9/13/2016.
//
#ifndef IMAGE_IMAGE_DECODER_H
#define IMAGE_IMAGE_DECODER_H
#include "com_hippo_image_BitmapDecoder.h"
#define IMAGE_CONFIG_INVALID -1;
#define IMAGE_CONFIG_AUTO com_hippo_image_BitmapDecoder_CONFIG_AUTO
#define IMAGE_CONFIG_RGB_565 com_hippo_image_BitmapDecoder_CONFIG_RGB_565
#define IMAGE_CONFIG_RGBA_8888 com_hippo_image_BitmapDecoder_CONFIG_RGBA_8888
inline bool is_explicit_config(int32_t config) {
return config == IMAGE_CONFIG_RGB_565 || config == IMAGE_CONFIG_RGBA_8888;
}
inline uint32_t get_depth_for_config(int32_t config) {
switch (config) {
case IMAGE_CONFIG_RGB_565:
return 2;
case IMAGE_CONFIG_RGBA_8888:
return 4;
default:
return 0;
}
}
#endif //IMAGE_IMAGE_DECODER_H
|
//
// Created by Hippo on 9/13/2016.
//
#ifndef IMAGE_IMAGE_DECODER_H
#define IMAGE_IMAGE_DECODER_H
#include "com_hippo_image_BitmapDecoder.h"
#define IMAGE_CONFIG_INVALID -1;
#define IMAGE_CONFIG_AUTO com_hippo_image_BitmapDecoder_CONFIG_AUTO
#define IMAGE_CONFIG_RGB_565 com_hippo_image_BitmapDecoder_CONFIG_RGB_565
#define IMAGE_CONFIG_RGBA_8888 com_hippo_image_BitmapDecoder_CONFIG_RGBA_8888
static inline bool is_explicit_config(int32_t config) {
return config == IMAGE_CONFIG_RGB_565 || config == IMAGE_CONFIG_RGBA_8888;
}
static inline uint32_t get_depth_for_config(int32_t config) {
switch (config) {
case IMAGE_CONFIG_RGB_565:
return 2;
case IMAGE_CONFIG_RGBA_8888:
return 4;
default:
return 0;
}
}
#endif //IMAGE_IMAGE_DECODER_H
|
Fix undefined references in linker
|
Fix undefined references in linker
|
C
|
apache-2.0
|
seven332/Image,seven332/Image,seven332/Image
|
d6975e54dee6c652d4dd10fe62c3c29241c967f2
|
demos/FPL_FFMpeg/defines.h
|
demos/FPL_FFMpeg/defines.h
|
#pragma once
#define PRINT_QUEUE_INFOS 0
#define PRINT_FRAME_UPLOAD_INFOS 0
#define PRINT_MEMORY_STATS 0
#define PRINT_FRAME_DROPS 0
#define PRINT_VIDEO_REFRESH 0
#define PRINT_VIDEO_DELAY 0
#define PRINT_CLOCKS 0
#define PRINT_PTS 0
#define PRINT_FPS 0
// Rendering mode (Hardware or Software)
#define USE_HARDWARE_RENDERING 1
// Hardware rendering
#define USE_GLSL_IMAGE_FORMAT_DECODING 1 // Use GLSL to decode image planes (Much faster than software decoding)
#define USE_GL_PBO 1 // Use OpenGL Pixel Buffer Objects (Faster CPU -> GPU transfer)
#define USE_GL_BLENDING 1 // Use OpenGL Blending (Only useful to disable, when debugging text rendering)
#define USE_GL_RECTANGLE_TEXTURES 1 // Use GL_TEXTURE_RECTANGLE instead of GL_TEXTURE_2D
// Software rendering
#define USE_FLIP_V_PICTURE_IN_SOFTWARE 0 // We need to detect this, when to flip and when not to flip
// Global
#define USE_FFMPEG_STATIC_LINKING 0 // Use static or runtime linking of FFMPEG (Useful to test if function signatures has been changed)
#define USE_FFMPEG_SOFTWARE_CONVERSION 1 // Convert video frames using sws_scale or using our own implementation, which is limited to type AV_PIX_FMT_YUV420P
|
#pragma once
#define PRINT_QUEUE_INFOS 0
#define PRINT_FRAME_UPLOAD_INFOS 0
#define PRINT_MEMORY_STATS 0
#define PRINT_FRAME_DROPS 0
#define PRINT_VIDEO_REFRESH 0
#define PRINT_VIDEO_DELAY 0
#define PRINT_CLOCKS 0
#define PRINT_PTS 0
#define PRINT_FPS 0
// Rendering mode (Hardware or Software)
#define USE_HARDWARE_RENDERING 1
// Hardware rendering
#define USE_GLSL_IMAGE_FORMAT_DECODING 1 // Use GLSL to decode image planes (Much faster than software decoding)
#define USE_GL_PBO 1 // Use OpenGL Pixel Buffer Objects (Faster CPU -> GPU transfer)
#define USE_GL_BLENDING 1 // Use OpenGL Blending (Only useful to disable, when debugging text rendering)
#define USE_GL_RECTANGLE_TEXTURES 1 // Use GL_TEXTURE_RECTANGLE instead of GL_TEXTURE_2D
// Software rendering
#define USE_FLIP_V_PICTURE_IN_SOFTWARE 0 // We need to detect this, when to flip and when not to flip
// Global
#define USE_FFMPEG_STATIC_LINKING 0 // Use static or runtime linking of FFMPEG (Useful to test if function signatures has been changed)
#define USE_FFMPEG_SOFTWARE_CONVERSION 0 // Convert video frames using sws_scale or using our own implementation, which is limited to type AV_PIX_FMT_YUV420P
|
Disable ffmpeg software conversion in define
|
Disable ffmpeg software conversion in define
|
C
|
mit
|
f1nalspace/final_game_tech,f1nalspace/final_game_tech,f1nalspace/final_game_tech
|
93da664c36b47e478b7f52e1510a24d73f4f8d1d
|
runtime/src/chplexit.c
|
runtime/src/chplexit.c
|
#include <stdio.h>
#include <stdlib.h>
#include "chpl_rt_utils_static.h"
#include "chpl-comm.h"
#include "chplexit.h"
#include "chpl-mem.h"
#include "chplmemtrack.h"
#include "chplrt.h"
#include "gdb.h"
#undef exit
static void chpl_exit_common(int status, int all) {
fflush(stdout);
fflush(stderr);
if (status != 0) {
gdbShouldBreakHere();
}
if (all) {
chpl_comm_barrier("chpl_comm_exit_all");
chpl_comm_stopPollingTask();
chpl_task_exit();
chpl_reportMemInfo();
chpl_mem_exit();
chpl_comm_exit_all(status);
} else {
chpl_mem_exit();
chpl_comm_exit_any(status);
}
exit(status);
}
void chpl_exit_all(int status) {
chpl_exit_common(status, 1);
}
void chpl_exit_any(int status) {
chpl_exit_common(status, 0);
}
|
#include <stdio.h>
#include <stdlib.h>
#include "chpl_rt_utils_static.h"
#include "chpl-comm.h"
#include "chplexit.h"
#include "chpl-mem.h"
#include "chplmemtrack.h"
#include "chplrt.h"
#include "gdb.h"
#undef exit
static void chpl_exit_common(int status, int all) {
fflush(stdout);
fflush(stderr);
if (status != 0) {
gdbShouldBreakHere();
}
if (all) {
chpl_comm_barrier("chpl_exit_common");
chpl_comm_stopPollingTask();
chpl_task_exit();
chpl_reportMemInfo();
chpl_mem_exit();
chpl_comm_exit_all(status);
} else {
chpl_mem_exit();
chpl_comm_exit_any(status);
}
exit(status);
}
void chpl_exit_all(int status) {
chpl_exit_common(status, 1);
}
void chpl_exit_any(int status) {
chpl_exit_common(status, 0);
}
|
Clarify the debug message that may be generated by the chpl_comm_barrier() call in chpl_exit_common().
|
Clarify the debug message that may be generated by the
chpl_comm_barrier() call in chpl_exit_common().
git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@19217 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
|
C
|
apache-2.0
|
chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,sungeunchoi/chapel,sungeunchoi/chapel,hildeth/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,hildeth/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,sungeunchoi/chapel
|
31555bbf1bd79b4e8ea404c719c1441123ecbb04
|
src/SenseKit/Logging.h
|
src/SenseKit/Logging.h
|
#ifndef LOGGING_H
#define LOGGING_H
#ifndef __ANDROID__
#define ELPP_STACKTRACE_ON_CRASH
#endif
#define ELPP_NO_DEFAULT_LOG_FILE
#include "vendor/easylogging++.h"
#define INITIALIZE_LOGGING INITIALIZE_EASYLOGGINGPP
namespace sensekit {
void initialize_logging(const char* logFilePath);
}
#endif /* LOGGING_H */
|
#ifndef LOGGING_H
#define LOGGING_H
#ifdef __ANDROID__
#define ELPP_DISABLE_DEFAULT_CRASH_HANDLING
#else // not android
#define ELPP_STACKTRACE_ON_CRASH
#endif
#define ELPP_NO_DEFAULT_LOG_FILE
#include "vendor/easylogging++.h"
#define INITIALIZE_LOGGING INITIALIZE_EASYLOGGINGPP
namespace sensekit {
void initialize_logging(const char* logFilePath);
}
#endif /* LOGGING_H */
|
Disable logger crash handling on Android
|
Disable logger crash handling on Android
|
C
|
apache-2.0
|
orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra
|
11beae99eafcb134fa72ec4a952a1d0dc07203d1
|
src/log_queue.h
|
src/log_queue.h
|
#pragma once
#include <cstddef>
#include <condition_variable>
#include <mutex>
#include <queue>
namespace log {
template<typename T>
class LogQueue final {
public:
explicit LogQueue(size_t capacity) : m_capacity(capacity) {}
~LogQueue() = default;
LogQueue(const LogQueue&) = delete;
LogQueue& operator=(const LogQueue&) = delete;
void Push(T&& element) {
std::unique_lock<std::mutex> lock(m_mutex);
while (m_queue.size() + 1 > m_capacity) { // is full
m_notfull.wait(lock);
}
m_queue.push(std::move(element));
m_notempty.notify_one();
}
void Pop(T* element) {
std::unique_lock<std::mutex> lock(m_mutex);
while (m_queue.empty()) { // is empty
m_notempty.wait(lock);
}
if (element != nullptr) {
*element = std::move(m_queue.front());
}
m_queue.pop();
m_notfull.notify_one();
}
private:
const size_t m_capacity;
std::queue<T> m_queue;
std::mutex m_mutex;
std::condition_variable m_notfull;
std::condition_variable m_notempty;
};
} // namespace log
|
#pragma once
#include <cstddef>
#include <condition_variable>
#include <mutex>
#include <queue>
namespace log {
template<typename T>
class LogQueue final {
public:
explicit LogQueue(size_t capacity) : m_capacity(capacity) {}
~LogQueue() = default;
LogQueue(const LogQueue&) = delete;
LogQueue& operator=(const LogQueue&) = delete;
void Push(T&& element) {
std::unique_lock<std::mutex> lock(m_mutex);
while (isFull()) {
m_notfull.wait(lock);
}
bool wasEmpty = isEmpty();
m_queue.push(std::move(element));
if (wasEmpty) {
m_notempty.notify_one();
}
}
void Pop(T* element) {
std::unique_lock<std::mutex> lock(m_mutex);
while (isEmpty()) {
m_notempty.wait(lock);
}
bool wasFull = isFull();
if (element != nullptr) {
*element = std::move(m_queue.front());
}
m_queue.pop();
if (wasFull) {
m_notfull.notify_one();
}
}
private:
const size_t m_capacity;
std::queue<T> m_queue;
std::mutex m_mutex;
std::condition_variable m_notfull;
std::condition_variable m_notempty;
bool isEmpty() {
return m_queue.empty();
}
bool isFull() {
return m_queue.size() + 1 > m_capacity;
}
};
} // namespace log
|
Decrease the number of notify_one calls
|
optimize: Decrease the number of notify_one calls
|
C
|
mit
|
yksz/cpp-logger,yksz/cpp-logger
|
a21cdb843767cc21a1b371105883c735784c8793
|
include/asm-generic/string.h
|
include/asm-generic/string.h
|
#ifndef __CR_ASM_GENERIC_STRING_H__
#define __CR_ASM_GENERIC_STRING_H__
#include "compiler.h"
#ifndef HAS_BUILTIN_MEMCPY
static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n)
{
int i;
unsigned char *cto = to;
const unsigned char *cfrom = from;
for (i = 0; i < n; ++i, ++cto, ++cfrom) {
*cto = *cfrom;
}
return to;
}
#endif
#endif /* __CR_ASM_GENERIC_STRING_H__ */
|
#ifndef __CR_ASM_GENERIC_STRING_H__
#define __CR_ASM_GENERIC_STRING_H__
#include "compiler.h"
#ifndef HAS_BUILTIN_MEMCPY
static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n)
{
int i;
unsigned char *cto = to;
const unsigned char *cfrom = from;
for (i = 0; i < n; ++i, ++cto, ++cfrom) {
*cto = *cfrom;
}
return to;
}
#endif
#ifndef HAS_BUILTIN_MEMCMP
static always_inline int builtin_memcmp(const void *cs, const void *ct, size_t count)
{
const unsigned char *su1, *su2;
int res = 0;
for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
if ((res = *su1 - *su2) != 0)
break;
return res;
}
#endif
#ifndef HAS_BUILTIN_STRCMP
static always_inline int builtin_strcmp(const char *cs, const char *ct)
{
unsigned char c1, c2;
while (1) {
c1 = *cs++;
c2 = *ct++;
if (c1 != c2)
return c1 < c2 ? -1 : 1;
if (!c1)
break;
}
return 0;
}
#endif
#endif /* __CR_ASM_GENERIC_STRING_H__ */
|
Add builtin_memcpy, builtin_memcmp generic helpers
|
asm: Add builtin_memcpy, builtin_memcmp generic helpers
Will need them in pie code soon.
Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@openvz.org>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
|
C
|
lgpl-2.1
|
efiop/criu,biddyweb/criu,svloyso/criu,efiop/criu,KKoukiou/criu-remote,KKoukiou/criu-remote,marcosnils/criu,kawamuray/criu,ldu4/criu,eabatalov/criu,efiop/criu,gablg1/criu,eabatalov/criu,AuthenticEshkinKot/criu,rentzsch/criu,svloyso/criu,svloyso/criu,wtf42/criu,ldu4/criu,biddyweb/criu,eabatalov/criu,AuthenticEshkinKot/criu,LK4D4/criu,eabatalov/criu,sdgdsffdsfff/criu,fbocharov/criu,tych0/criu,KKoukiou/criu-remote,sdgdsffdsfff/criu,tych0/criu,gonkulator/criu,tych0/criu,kawamuray/criu,LK4D4/criu,kawamuray/criu,gonkulator/criu,marcosnils/criu,rentzsch/criu,LK4D4/criu,kawamuray/criu,LK4D4/criu,sdgdsffdsfff/criu,marcosnils/criu,gablg1/criu,efiop/criu,ldu4/criu,KKoukiou/criu-remote,biddyweb/criu,sdgdsffdsfff/criu,rentzsch/criu,rentzsch/criu,svloyso/criu,tych0/criu,gonkulator/criu,LK4D4/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,sdgdsffdsfff/criu,AuthenticEshkinKot/criu,wtf42/criu,LK4D4/criu,kawamuray/criu,gonkulator/criu,AuthenticEshkinKot/criu,ldu4/criu,gonkulator/criu,gablg1/criu,gonkulator/criu,eabatalov/criu,kawamuray/criu,wtf42/criu,gablg1/criu,gablg1/criu,marcosnils/criu,fbocharov/criu,biddyweb/criu,biddyweb/criu,marcosnils/criu,rentzsch/criu,fbocharov/criu,wtf42/criu,wtf42/criu,efiop/criu,svloyso/criu,gablg1/criu,wtf42/criu,KKoukiou/criu-remote,AuthenticEshkinKot/criu,ldu4/criu,rentzsch/criu,tych0/criu,efiop/criu,biddyweb/criu,fbocharov/criu,sdgdsffdsfff/criu,ldu4/criu,fbocharov/criu,marcosnils/criu,svloyso/criu,tych0/criu,fbocharov/criu,eabatalov/criu
|
08d9391c8f90f0c5c997bd3ab41517774dd582f3
|
src/dtkComposer/dtkComposerSceneNodeLeaf.h
|
src/dtkComposer/dtkComposerSceneNodeLeaf.h
|
/* dtkComposerSceneNodeLeaf.h ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Fri Feb 3 12:34:45 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Feb 16 14:47:09 2012 (+0100)
* By: Julien Wintz
* Update #: 10
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERSCENENODELEAF_H
#define DTKCOMPOSERSCENENODELEAF_H
#include "dtkComposerSceneNode.h"
class dtkComposerNode;
class dtkComposerSceneNodeLeafPrivate;
class dtkComposerSceneNodeLeaf : public dtkComposerSceneNode
{
public:
dtkComposerSceneNodeLeaf(void);
~dtkComposerSceneNodeLeaf(void);
public:
void wrap(dtkComposerNode *node);
public:
void layout(void);
public:
void resize(qreal width, qreal height);
public:
QRectF boundingRect(void) const;
public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
private:
dtkComposerSceneNodeLeafPrivate *d;
};
#endif
|
/* dtkComposerSceneNodeLeaf.h ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Fri Feb 3 12:34:45 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu May 31 09:45:52 2012 (+0200)
* By: tkloczko
* Update #: 11
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERSCENENODELEAF_H
#define DTKCOMPOSERSCENENODELEAF_H
#include "dtkComposerExport.h"
#include "dtkComposerSceneNode.h"
class dtkComposerNode;
class dtkComposerSceneNodeLeafPrivate;
class DTKCOMPOSER_EXPORT dtkComposerSceneNodeLeaf : public dtkComposerSceneNode
{
public:
dtkComposerSceneNodeLeaf(void);
~dtkComposerSceneNodeLeaf(void);
public:
void wrap(dtkComposerNode *node);
public:
void layout(void);
public:
void resize(qreal width, qreal height);
public:
QRectF boundingRect(void) const;
public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
private:
dtkComposerSceneNodeLeafPrivate *d;
};
#endif
|
Add export rules for scene node leaf.
|
Add export rules for scene node leaf.
|
C
|
bsd-3-clause
|
d-tk/dtk,d-tk/dtk,NicolasSchnitzler/dtk,rdebroiz/dtk,d-tk/dtk,rdebroiz/dtk,rdebroiz/dtk,d-tk/dtk,rdebroiz/dtk,d-tk/dtk,NicolasSchnitzler/dtk,NicolasSchnitzler/dtk,NicolasSchnitzler/dtk,d-tk/dtk
|
8bcfa4182e71abb82bc7b45b91b61c5a6e431923
|
src/password.c
|
src/password.c
|
#include <string.h>
#include <openssl/sha.h>
#include "password.h"
void key_from_password(const char *a_password, char *a_key)
{
unsigned char digest[256 / 8] = {0}; // SHA 256 uses 256/8 bytes.
int i;
SHA256((const unsigned char *)a_password, strlen(a_password), digest);
for (i = 0; i < 40872; i++) {
SHA256(digest, 32, digest);
}
memcpy(a_key, digest, sizeof(digest));
}
void key_hash(const char *a_key, char *a_hash)
{
unsigned char digest[256 / 8];
int i;
memcpy(digest, a_key, sizeof(digest));
for (i = 0; i < 30752; i++) {
SHA256(digest, 32, digest);
}
memcpy(a_hash, digest, sizeof(digest));
}
|
#include <string.h>
#include <openssl/sha.h>
#include "password.h"
void key_from_password(const char *a_password, char *a_key)
{
unsigned char digest[256 / 8] = {0}; // SHA 256 uses 256/8 bytes.
int i;
SHA256((const unsigned char *)a_password, strlen(a_password), digest);
for (i = 0; i < 40872; i++) {
SHA256(digest, 32, digest);
}
memcpy(a_key, digest, sizeof(digest));
}
void key_hash(const char *a_key, char *a_hash)
{
unsigned char digest[256 / 8];
int i;
memcpy(digest, a_key, sizeof(digest));
for (i = 0; i < 30752; i++) {
SHA256(digest, 32, digest);
}
memcpy(a_hash, digest, sizeof(digest));
}
|
Convert tabs to spaces and indent
|
Convert tabs to spaces and indent
|
C
|
mit
|
falsovsky/FiSH-irssi
|
18d9964f98298e426a488c00300834cc5441ee1b
|
src/framework/cmd/core.c
|
src/framework/cmd/core.c
|
/**
* @file
* @brief Command registry and invocation code.
*
* @date 01.03.11
* @author Eldar Abusalimov
*/
#include <framework/cmd/api.h>
#include <framework/cmd/types.h>
#include <ctype.h>
#include <stddef.h>
#include <errno.h>
#include <string.h>
#include <util/array.h>
#include <util/getopt.h>
ARRAY_SPREAD_DEF(const struct cmd * const, __cmd_registry);
int cmd_exec(const struct cmd *cmd, int argc, char **argv) {
int err;
if (!cmd)
return -EINVAL;
err = mod_activate_app(cmd2mod(cmd));
if (err)
return err;
getopt_init();
return cmd->exec(argc, argv);
}
const struct cmd *cmd_lookup(const char *name) {
const struct cmd *cmd = NULL;
if (!strncmp(name, "/bin/", strlen("/bin/"))) {
name += strlen("/bin/");
}
cmd_foreach(cmd) {
if (strcmp(cmd_name(cmd), name) == 0) {
return cmd;
}
}
return NULL;
}
|
/**
* @file
* @brief Command registry and invocation code.
*
* @date 01.03.11
* @author Eldar Abusalimov
*/
#include <framework/cmd/api.h>
#include <framework/cmd/types.h>
#include <ctype.h>
#include <stddef.h>
#include <errno.h>
#include <string.h>
#include <util/array.h>
#include <util/getopt.h>
ARRAY_SPREAD_DEF(const struct cmd * const, __cmd_registry);
int cmd_exec(const struct cmd *cmd, int argc, char **argv) {
int err;
if (!cmd)
return -EINVAL;
err = mod_activate_app(cmd2mod(cmd));
if (err)
return err;
getopt_init();
err = cmd->exec(argc, argv);
/* FIXME Here we make app's data and bss as they was
* before app execution. It's required because we call all
* C++ ctors on every app launch. When we will call only ctors
* of the running app, this workaround can be removed. */
mod_activate_app(cmd2mod(cmd));
return err;
}
const struct cmd *cmd_lookup(const char *name) {
const struct cmd *cmd = NULL;
if (!strncmp(name, "/bin/", strlen("/bin/"))) {
name += strlen("/bin/");
}
cmd_foreach(cmd) {
if (strcmp(cmd_name(cmd), name) == 0) {
return cmd;
}
}
return NULL;
}
|
Fix running of c++ apps when there are multiple apps in mods.conf
|
Fix running of c++ apps when there are multiple apps in mods.conf
|
C
|
bsd-2-clause
|
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
|
429be9362d598d3b7b3ea6e19b1be2dca867aa0a
|
test/tools/llvm-symbolizer/print_context.c
|
test/tools/llvm-symbolizer/print_context.c
|
// REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
// CHECK: inc
// CHECK: print_context.c:7
// CHECK: 5 : #include
// CHECK: 6 :
// CHECK: 7 >: int inc
// CHECK: 8 : return
// CHECK: 9 : }
|
// REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
// CHECK: inc
// CHECK: print_context.c:[[@LINE+9]]
// CHECK: [[@LINE+6]] : #include
// CHECK: [[@LINE+6]] :
// CHECK: [[@LINE+6]] >: int inc
// CHECK: [[@LINE+6]] : return
// CHECK: [[@LINE+6]] : }
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
|
Make test robust to changes in prefix/avoid hardcoded line numbers
|
Make test robust to changes in prefix/avoid hardcoded line numbers
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309516 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm
|
e0aaf216fbf480f46f78b9c4ecca9dd7da682811
|
src/compat/posix/include/dirent.h
|
src/compat/posix/include/dirent.h
|
/**
*
* @date 23.11.2012
* @author Alexander Kalmuk
*/
#ifndef DIRENT_H_
#define DIRENT_H_
#include <sys/types.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
#define DIRENT_DNAME_LEN 40
struct dirent {
ino_t d_ino; /* File serial number. */
char d_name[DIRENT_DNAME_LEN]; /* Name of entry. */
};
struct node;
struct directory {
struct dirent current;
struct node *node;
//struct tree_link *child_lnk;
};
typedef struct directory DIR;
extern int closedir(DIR *);
extern DIR *opendir(const char *);
extern struct dirent *readdir(DIR *);
extern int readdir_r(DIR *, struct dirent *, struct dirent **);
__END_DECLS
#endif /* DIRENT_H_ */
|
/**
*
* @date 23.11.2012
* @author Alexander Kalmuk
*/
#ifndef DIRENT_H_
#define DIRENT_H_
#include <sys/types.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
#define DIRENT_DNAME_LEN 40
struct dirent {
ino_t d_ino; /* File serial number. */
char d_name[DIRENT_DNAME_LEN]; /* Name of entry. */
};
struct node;
typedef struct {
struct dirent current;
struct node *node;
//struct tree_link *child_lnk;
} DIR;
extern int closedir(DIR *);
extern DIR *opendir(const char *);
extern struct dirent *readdir(DIR *);
extern int readdir_r(DIR *, struct dirent *, struct dirent **);
__END_DECLS
#endif /* DIRENT_H_ */
|
Fix multiply difination of the struct directory
|
extbld-porting: Fix multiply difination of the struct directory
|
C
|
bsd-2-clause
|
gzoom13/embox,Kefir0192/embox,Kakadu/embox,abusalimov/embox,mike2390/embox,embox/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,Kakadu/embox,vrxfile/embox-trik,mike2390/embox,Kakadu/embox,embox/embox,mike2390/embox,Kefir0192/embox,mike2390/embox,Kakadu/embox,vrxfile/embox-trik,embox/embox,abusalimov/embox,Kefir0192/embox,abusalimov/embox,abusalimov/embox,Kakadu/embox,gzoom13/embox,Kefir0192/embox,mike2390/embox,vrxfile/embox-trik,vrxfile/embox-trik,gzoom13/embox,abusalimov/embox,Kakadu/embox,gzoom13/embox,embox/embox,vrxfile/embox-trik,Kefir0192/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,mike2390/embox,gzoom13/embox,gzoom13/embox,Kakadu/embox,vrxfile/embox-trik,embox/embox,embox/embox
|
9d1a3a942f093baf3d33c3fef7505db86bcf9fac
|
bindings/python/plmodule.h
|
bindings/python/plmodule.h
|
#include <Python.h>
#include <arrayobject.h>
#include "plplot/plplot.h"
#include "plplot/plplotP.h"
#if defined(PL_DOUBLE) || defined(DOUBLE)
#define PL_ARGS(a, b) (a)
#define PyArray_PLFLT PyArray_DOUBLE
#else
#define PL_ARGS(a, b) (b)
#define PyArray_PLFLT PyArray_FLOAT
#endif
#define TRY(E) if(! (E)) return NULL
int pl_PyArray_AsFloatArray (PyObject **, PLFLT **, PLINT *);
int pl_PyArray_AsIntArray (PyObject **, PLINT **, PLINT *);
int pl_PyArray_AsFloatMatrix (PyObject **, PLINT*, PLINT*, PLFLT ***);
int pl_PyList_AsStringArray (PyObject *, char ***, int *);
int pl_PyList_SetFromStringArray (PyObject *, char **, int);
PLFLT pyf2eval2( PLINT ix, PLINT iy, PLPointer plf2eval_data );
|
#include <Python.h>
/* Change this to the recommended
#include <Numeric/arrayobject.h>
once we no longer support python1.5 */
#include <arrayobject.h>
#include "plplot/plplot.h"
#include "plplot/plplotP.h"
#if defined(PL_DOUBLE) || defined(DOUBLE)
#define PL_ARGS(a, b) (a)
#define PyArray_PLFLT PyArray_DOUBLE
#else
#define PL_ARGS(a, b) (b)
#define PyArray_PLFLT PyArray_FLOAT
#endif
#define TRY(E) if(! (E)) return NULL
int pl_PyArray_AsFloatArray (PyObject **, PLFLT **, PLINT *);
int pl_PyArray_AsIntArray (PyObject **, PLINT **, PLINT *);
int pl_PyArray_AsFloatMatrix (PyObject **, PLINT*, PLINT*, PLFLT ***);
int pl_PyList_AsStringArray (PyObject *, char ***, int *);
int pl_PyList_SetFromStringArray (PyObject *, char **, int);
PLFLT pyf2eval2( PLINT ix, PLINT iy, PLPointer plf2eval_data );
|
Comment the current arrayobject.h situation. Right now for Numpy packages that are consistent with python-1.5, this file could be a number of places relative to /usr/include/python$version so configure must look specifically for it. However, later Numpy packages consistent with python2.x always put it in a standard location of /usr/include/python$version/Numeric. Thus, the relative location of arrayobject.h to the normal python includes is consistent, and we will no longer have to look specifically for this file once we stop supporting python-1.5.
|
Comment the current arrayobject.h situation. Right now for Numpy packages
that are consistent with python-1.5, this file could be a number of places
relative to /usr/include/python$version so configure must look specifically
for it. However, later Numpy packages consistent with python2.x always put
it in a standard location of /usr/include/python$version/Numeric. Thus, the
relative location of arrayobject.h to the normal python includes is
consistent, and we will no longer have to look specifically for this file
once we stop supporting python-1.5.
svn path=/trunk/; revision=3687
|
C
|
lgpl-2.1
|
FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot
|
a6d12c298014af99c12d1efe29eb19216ae4aef8
|
src/native/test/KeilTest/Logger.c
|
src/native/test/KeilTest/Logger.c
|
#include "AceUnitLogging.h"
#ifdef ACEUNIT_LOG_RUNNER
/** @see TestLogger_t.runnerStarted */
void logRunnerStarted()
{
}
#endif
#ifdef ACEUNIT_LOG_SUITE
/** @see TestLogger_t.suiteStarted */
void logSuiteStarted()
{
}
#endif
#ifdef ACEUNIT_LOG_FIXTURE
/** @see TestLogger_t.fixtureStarted */
void logFixtureStarted(const FixtureId_t fixture)
{
}
#endif
#ifdef ACEUNIT_LOG_TESTCASE
/** @see TestLogger_t.testCaseStarted */
void logTestCaseStarted(TestCaseId_t testCase)
{
}
#endif
/** @see TestLogger_t.testCaseCailed */
void logTestCaseFailed(const AssertionError_t *error)
{
}
#ifdef ACEUNIT_LOG_TESTCASE
/** @see TestLogger_t.testCaseEnded */
void logTestCaseEnded(TestCaseId_t testCase)
{
}
#endif
#ifdef ACEUNIT_LOG_FIXTURE
void logFixtureEnded(const FixtureId_t fixture)
{
}
#endif
#ifdef ACEUNIT_LOG_SUITE
/** @see TestLogger_t.suiteEnded */
void logSuiteEnded()
{
}
#endif
#ifdef ACEUNIT_LOG_RUNNER
/** @see TestLogger_t.runnerEnded */
void logRunnerEnded()
{
}
#endif
/** This Logger. */
AceUnitNewLogger(
loggerStub, /* CHANGE THIS NAME!!! */
logRunnerStarted,
logSuiteStarted,
logFixtureStarted,
logTestCaseStarted,
logTestCaseFailed,
logTestCaseEnded,
logFixtureEnded,
logSuiteEnded,
logRunnerEnded
);
TestLogger_t *globalLogger = &loggerStub; /* XXX Hack. Remove. */
|
#include "AceUnitLogging.h"
#ifdef ACEUNIT_LOG_RUNNER
/** @see TestLogger_t.runnerStarted */
void logRunnerStarted()
{
}
#endif
#ifdef ACEUNIT_LOG_RUNNER
/** @see TestLogger_t.runnerEnded */
void logRunnerEnded()
{
}
#endif
/** This Logger. */
AceUnitNewLogger(
loggerStub, /* CHANGE THIS NAME!!! */
logRunnerStarted,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
logRunnerEnded
);
TestLogger_t *globalLogger = &loggerStub; /* XXX Hack. Remove. */
|
Remove some compiler warnings for C251.
|
Remove some compiler warnings for C251.
|
C
|
bsd-3-clause
|
christianhujer/aceunit,christianhujer/aceunit,christianhujer/aceunit
|
60f560824bf9fb6ec9148f5b36eae83827b5de42
|
test2/code_gen/dead_code_elim.c
|
test2/code_gen/dead_code_elim.c
|
// RUN: %ocheck 3 %s
g()
{
return 3;
}
main()
{
if(0){
f(); // shouldn't hit a linker error here - dead code
a:
return g();
}
goto a;
}
|
// RUN: %ocheck 3 %s -g
// test debug emission too
g()
{
return 3;
}
main()
{
if(0){
int i;
f(); // shouldn't hit a linker error here - dead code
a:
i = 2;
return g(i);
}
goto a;
}
|
Test debug label emission with local variables
|
Test debug label emission with local variables
|
C
|
mit
|
8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler
|
1c4ea5e3d584a3344182d41e286ecbb9967d841a
|
src/includes/TritonTypes.h
|
src/includes/TritonTypes.h
|
/*
** Copyright (C) - Triton
**
** This program is under the terms of the LGPLv3 License.
*/
#ifndef TRITONTYPES_H
#define TRITONTYPES_H
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/numeric/conversion/cast.hpp>
#define BIT_MAX 512
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef unsigned long long uint64;
typedef boost::multiprecision::uint128_t uint128;
typedef boost::multiprecision::uint512_t uint512;
typedef signed char sint8;
typedef signed short sint16;
typedef signed int sint32;
typedef signed long long sint64;
typedef boost::multiprecision::int128_t sint128;
typedef boost::multiprecision::int512_t sint512;
#endif /* !TRITONTYPES_H */
|
/*
** Copyright (C) - Triton
**
** This program is under the terms of the LGPLv3 License.
*/
#ifndef TRITONTYPES_H
#define TRITONTYPES_H
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/numeric/conversion/cast.hpp>
#define BIT_MAX 512
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef boost::multiprecision::uint64 _t uint64;
typedef boost::multiprecision::uint128_t uint128;
typedef boost::multiprecision::uint256_t uint256;
typedef boost::multiprecision::uint512_t uint512;
typedef signed char sint8;
typedef signed short sint16;
typedef signed int sint32;
typedef boost::multiprecision::int64 _t sint64;
typedef boost::multiprecision::int128_t sint128;
typedef boost::multiprecision::int256_t sint256;
typedef boost::multiprecision::int512_t sint512;
#endif /* !TRITONTYPES_H */
|
Use boost multiprecision even for 64b
|
Use boost multiprecision even for 64b
|
C
|
apache-2.0
|
JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton
|
1b9e6ae6667c81d2687ff665925fa953b93135ae
|
pintool/boost_interprocess.h
|
pintool/boost_interprocess.h
|
/* Headers needed for multiprocess communication through boost interprocess.
* This needs to be included BEFORE anything referencing machine.h,
* or macro definitions from machine.h would mess template args.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include <boost/interprocess/containers/deque.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <boost/interprocess/containers/map.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/unordered_map.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/managed_mapped_file.hpp>
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#pragma GCC diagnostic pop
#include "shared_map.h"
#include "shared_unordered_map.h"
|
/* Headers needed for multiprocess communication through boost interprocess.
* This needs to be included BEFORE anything referencing machine.h,
* or macro definitions from machine.h would mess template args.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <boost/interprocess/containers/deque.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <boost/interprocess/containers/map.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/unordered_map.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/managed_mapped_file.hpp>
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#pragma GCC diagnostic pop
#include "shared_map.h"
#include "shared_unordered_map.h"
|
Add ignore warning pragma for deprecated declarations.
|
Add ignore warning pragma for deprecated declarations.
|
C
|
bsd-3-clause
|
s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim
|
011cf09ddd3cf759de55ff1f95ef37a3f04c70c9
|
test/CFrontend/bit-accurate-int.c
|
test/CFrontend/bit-accurate-int.c
|
// RUN: %llvmgcc -S %s -o - /dev/null
// XFAIL: *
#define ATTR_BITS(N) __attribute__((bitwidth(N)))
typedef int ATTR_BITS( 4) My04BitInt;
typedef int ATTR_BITS(16) My16BitInt;
typedef int ATTR_BITS(17) My17BitInt;
typedef int ATTR_BITS(37) My37BitInt;
typedef int ATTR_BITS(65) My65BitInt;
struct MyStruct {
My04BitInt i4Field;
short ATTR_BITS(12) i12Field;
long ATTR_BITS(17) i17Field;
My37BitInt i37Field;
};
My37BitInt doit( short ATTR_BITS(23) num) {
My17BitInt i;
struct MyStruct strct;
int bitsize1 = sizeof(My17BitInt);
int __attribute__((bitwidth(9))) j;
int bitsize2 = sizeof(j);
int result = bitsize1 + bitsize2;
strct.i17Field = result;
result += sizeof(struct MyStruct);
return result;
}
int
main ( int argc, char** argv)
{
return (int ATTR_BITS(32)) doit((short ATTR_BITS(23))argc);
}
|
// RUN: %llvmgcc -S %s -o - /dev/null 2>&1 > /dev/null | \
// RUN: not grep warning
// XFAIL: *
#define ATTR_BITS(N) __attribute__((bitwidth(N)))
typedef int ATTR_BITS( 4) My04BitInt;
typedef int ATTR_BITS(16) My16BitInt;
typedef int ATTR_BITS(17) My17BitInt;
typedef int ATTR_BITS(37) My37BitInt;
typedef int ATTR_BITS(65) My65BitInt;
struct MyStruct {
My04BitInt i4Field;
short ATTR_BITS(12) i12Field;
long ATTR_BITS(17) i17Field;
My37BitInt i37Field;
};
My37BitInt doit( short ATTR_BITS(23) num) {
My17BitInt i;
struct MyStruct strct;
int bitsize1 = sizeof(My17BitInt);
int __attribute__((bitwidth(9))) j;
int bitsize2 = sizeof(j);
int result = bitsize1 + bitsize2;
strct.i17Field = result;
result += sizeof(struct MyStruct);
return result;
}
int
main ( int argc, char** argv)
{
return (int ATTR_BITS(32)) doit((short ATTR_BITS(23))argc);
}
|
Make this test actually test what its supposed to test.
|
Make this test actually test what its supposed to test.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@33369 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm
|
465819d7c20d1f80d71e9b219dcd02e812bc7540
|
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 92
#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 93
#endif
|
Update Skia milestone to 93
|
Update Skia milestone to 93
Change-Id: Ib9a9832dbd63b6a306f5c955f4528b195c29c71f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411278
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
|
C
|
bsd-3-clause
|
aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia
|
530e6a93a7a953a460502a28a6733d889a245da0
|
src/physics/state.h
|
src/physics/state.h
|
#ifndef ZOMBIE_STATE_H
#define ZOMBIE_STATE_H
#include "box2ddef.h"
namespace zombie {
struct State {
Position position_{0, 0};
Velocity velocity_{0, 0};
float angle_{0.f};
float anglularVelocity_{0.f};
};
}
#endif
|
#ifndef ZOMBIE_STATE_H
#define ZOMBIE_STATE_H
#include "box2ddef.h"
namespace zombie {
struct State {
Position position_;
Velocity velocity_;
float angle_;
float anglularVelocity_;
};
}
#endif
|
Make State struct a clean POD strcut
|
Make State struct a clean POD strcut
|
C
|
mit
|
mwthinker/Zombie
|
41a44d0765463bce34808c201e39ad2595f400b9
|
Source/Version.h
|
Source/Version.h
|
#ifndef Version_h
#define Version_h
#define BFARCHIVE_COMMA_SEPARATED_VERSION 3,0,0,0
#define BFARCHIVE_VERSION_STRING "3.0.0"
#endif
|
#ifndef Version_h
#define Version_h
#define BFARCHIVE_COMMA_SEPARATED_VERSION 9,1,0,0
#define BFARCHIVE_VERSION_STRING "9.1.0"
#endif
|
Bump version to 9.1.0 to avoid confusion
|
Bump version to 9.1.0 to avoid confusion
|
C
|
apache-2.0
|
bigfix/bfarchive,bigfix/bfarchive,bigfix/bfarchive,bigfix/bfarchive,bigfix/bfarchive,bigfix/bfarchive,bigfix/bfarchive
|
1416862d7c9382a58813f0609c4d4d1c858724c8
|
include/llvm/ExecutionEngine/GenericValue.h
|
include/llvm/ExecutionEngine/GenericValue.h
|
//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// The GenericValue class is used to represent an LLVM value of arbitrary type.
//
//===----------------------------------------------------------------------===//
#ifndef GENERIC_VALUE_H
#define GENERIC_VALUE_H
#include "llvm/Support/DataTypes.h"
namespace llvm {
typedef uintptr_t PointerTy;
union GenericValue {
bool Int1Val;
unsigned char Int8Val;
unsigned short Int16Val;
unsigned int Int32Val;
uint64_t Int64Val;
double DoubleVal;
float FloatVal;
struct { unsigned int first; unsigned int second; } UIntPairVal;
PointerTy PointerVal;
unsigned char Untyped[8];
GenericValue() {}
GenericValue(void *V) {
PointerVal = (PointerTy)(intptr_t)V;
}
};
inline GenericValue PTOGV(void *P) { return GenericValue(P); }
inline void* GVTOP(const GenericValue &GV) {
return (void*)(intptr_t)GV.PointerVal;
}
} // End llvm namespace
#endif
|
//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// The GenericValue class is used to represent an LLVM value of arbitrary type.
//
//===----------------------------------------------------------------------===//
#ifndef GENERIC_VALUE_H
#define GENERIC_VALUE_H
#include "llvm/Support/DataTypes.h"
namespace llvm {
typedef uintptr_t PointerTy;
class APInt;
class Type;
union GenericValue {
bool Int1Val;
unsigned char Int8Val;
unsigned short Int16Val;
unsigned int Int32Val;
uint64_t Int64Val;
APInt *APIntVal;
double DoubleVal;
float FloatVal;
struct { unsigned int first; unsigned int second; } UIntPairVal;
PointerTy PointerVal;
unsigned char Untyped[8];
GenericValue() {}
GenericValue(void *V) {
PointerVal = (PointerTy)(intptr_t)V;
}
};
inline GenericValue PTOGV(void *P) { return GenericValue(P); }
inline void* GVTOP(const GenericValue &GV) {
return (void*)(intptr_t)GV.PointerVal;
}
} // End llvm namespace
#endif
|
Add APIntVal as a possible GenericeValue.
|
Add APIntVal as a possible GenericeValue.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@34879 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap
|
d48276b0554488cfc3ff58646dae7e5d71f6c32d
|
bst.h
|
bst.h
|
#include <stdlib.h>
#ifndef __BST_H__
#define __BST_H__
struct BSTNode;
struct BST;
typedef struct BSTNode BSTNode;
typedef struct BST BST;
BST* BST_Create(void);
BSTNode* BSTNode_Create(void* k);
void BST_Inorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Preorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Postorder_Tree_Walk(BST* T, void (f)(void*));
BSTNode* BST_Tree_Search(BST* T, void* k, int (f)(void*, void*), int (g)(void*, void*));
BSTNode* BST_Iterative_Tree_Search(BST* T, void* k, int (f)(void*, void*), int (g)(void*, void*));
#endif
|
#include <stdlib.h>
#ifndef __BST_H__
#define __BST_H__
struct BSTNode;
struct BST;
typedef struct BSTNode BSTNode;
typedef struct BST BST;
BST* BST_Create(void);
BSTNode* BSTNode_Create(void* k);
void BST_Inorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Preorder_Tree_Walk(BST* T, void (f)(void*));
void BST_Postorder_Tree_Walk(BST* T, void (f)(void*));
BSTNode* BST_Tree_Search(BST* T, void* k, int (f)(void*, void*), int (g)(void*, void*));
BSTNode* BST_Iterative_Tree_Search(BST* T, void* k, int (f)(void*, void*), int (g)(void*, void*));
BSTNode* BST_Tree_Minimum(BSTNode* n);
BSTNode* BST_Tree_Maximum(BSTNode* n);
#endif
|
Add BST Tree Min/Max function declaration
|
Add BST Tree Min/Max function declaration
|
C
|
mit
|
MaxLikelihood/CADT
|
7e0e8ab88d3607daf5fc06c13f9d85c95b82eeb2
|
src/script_handle.h
|
src/script_handle.h
|
#pragma once
#include <v8.h>
#include "isolate/holder.h"
#include "transferable_handle.h"
#include <memory>
namespace ivm {
class ScriptHandle : public TransferableHandle {
private:
class ScriptHandleTransferable : public Transferable {
private:
std::shared_ptr<IsolateHolder> isolate;
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script;
public:
ScriptHandleTransferable(
std::shared_ptr<IsolateHolder> isolate,
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script
);
v8::Local<v8::Value> TransferIn() final;
};
std::shared_ptr<IsolateHolder> isolate;
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script;
public:
ScriptHandle(
std::shared_ptr<IsolateHolder> isolate,
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script
);
static IsolateEnvironment::IsolateSpecific<v8::FunctionTemplate>& TemplateSpecific();
static v8::Local<v8::FunctionTemplate> Definition();
std::unique_ptr<Transferable> TransferOut() final;
template <bool async>
v8::Local<v8::Value> Run(class ContextHandle* context_handle, v8::MaybeLocal<v8::Object> maybe_options);
};
} // namespace ivm
|
#pragma once
#include <v8.h>
#include "isolate/holder.h"
#include "transferable_handle.h"
#include <memory>
namespace ivm {
class ContextHandle;
class ScriptHandle : public TransferableHandle {
private:
class ScriptHandleTransferable : public Transferable {
private:
std::shared_ptr<IsolateHolder> isolate;
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script;
public:
ScriptHandleTransferable(
std::shared_ptr<IsolateHolder> isolate,
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script
);
v8::Local<v8::Value> TransferIn() final;
};
std::shared_ptr<IsolateHolder> isolate;
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script;
public:
ScriptHandle(
std::shared_ptr<IsolateHolder> isolate,
std::shared_ptr<v8::Persistent<v8::UnboundScript>> script
);
static IsolateEnvironment::IsolateSpecific<v8::FunctionTemplate>& TemplateSpecific();
static v8::Local<v8::FunctionTemplate> Definition();
std::unique_ptr<Transferable> TransferOut() final;
template <bool async>
v8::Local<v8::Value> Run(ContextHandle* context_handle, v8::MaybeLocal<v8::Object> maybe_options);
};
} // namespace ivm
|
Fix stupid msvc compile error
|
Fix stupid msvc compile error
It thinks the forward declaration defines a template. Clang and GCC do
not agree.
|
C
|
isc
|
laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm
|
c8a20cabb71b249072a001ccf9c1c306640a511a
|
include/llvm/MC/MCParser/MCAsmParserUtils.h
|
include/llvm/MC/MCParser/MCAsmParserUtils.h
|
//===------ llvm/MC/MCAsmParserUtils.h - Asm Parser Utilities ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
#define LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
namespace llvm {
namespace MCParserUtils {
/// Parse a value expression and return whether it can be assigned to a symbol
/// with the given name.
///
/// On success, returns false and sets the Symbol and Value output parameters.
bool parseAssignmentExpression(StringRef Name, bool allow_redef,
MCAsmParser &Parser, MCSymbol *&Symbol,
const MCExpr *&Value);
} // namespace MCParserUtils
} // namespace llvm
#endif
|
//===------ llvm/MC/MCAsmParserUtils.h - Asm Parser Utilities ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
#define LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
namespace llvm {
class MCAsmParser;
class MCExpr;
class MCSymbol;
class StringRef;
namespace MCParserUtils {
/// Parse a value expression and return whether it can be assigned to a symbol
/// with the given name.
///
/// On success, returns false and sets the Symbol and Value output parameters.
bool parseAssignmentExpression(StringRef Name, bool allow_redef,
MCAsmParser &Parser, MCSymbol *&Symbol,
const MCExpr *&Value);
} // namespace MCParserUtils
} // namespace llvm
#endif
|
Make header parse standalone. NFC.
|
Make header parse standalone. NFC.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@240814 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm
|
f8e41d53d4a604cb4a398a4002b2f2037f23c135
|
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 55
#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 57
#endif
|
Update Skia milestone to 57
|
Update Skia milestone to 57
Milestone that we typically update, but note that change from 55->56 was missed, will cherry pick to branch.
This change gets current file caught up to show working milestone after branch.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4927
Change-Id: If10e0db2d4acc908f5da7c4e9d30497deef6a2ff
Reviewed-on: https://skia-review.googlesource.com/4927
Reviewed-by: Brian Salomon <61fabaaf0876044aeedfd8e351e485c028d69e7b@google.com>
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
|
C
|
bsd-3-clause
|
HalCanary/skia-hc,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,google/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,rubenvb/skia,google/skia,google/skia,rubenvb/skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia
|
21af464aecd8de83858acad3e2a48ad5c968fcf5
|
src/background/direction.c
|
src/background/direction.c
|
#include "direction.h"
#include <assert.h>
#include <base/base.h>
enum direction
direction_90_degrees_left(enum direction direction)
{
assert(direction_is_valid(direction));
return (direction + 270) % 360;
}
enum direction
direction_90_degrees_right(enum direction direction)
{
assert(direction_is_valid(direction));
return (direction + 90) % 360;
}
extern inline bool
direction_is_valid(unsigned direction);
char const *
direction_name(enum direction direction)
{
assert(direction_is_valid(direction));
switch (direction) {
case direction_north: return "north";
case direction_northeast: return "northeast";
case direction_east: return "east";
case direction_southeast: return "southeast";
case direction_south: return "south";
case direction_southwest: return "southwest";
case direction_west: return "west";
case direction_northwest: return "northwest";
}
}
enum direction
direction_opposite(enum direction direction)
{
assert(direction_is_valid(direction));
return (direction + 180) % 360;
}
enum direction
direction_random(struct rnd *rnd)
{
return rnd_next_uniform_value(rnd, 8) * 45;
}
|
#include "direction.h"
#include <assert.h>
#include <base/base.h>
enum direction
direction_90_degrees_left(enum direction direction)
{
assert(direction_is_valid(direction));
return (direction + 270) % 360;
}
enum direction
direction_90_degrees_right(enum direction direction)
{
assert(direction_is_valid(direction));
return (direction + 90) % 360;
}
extern inline bool
direction_is_valid(unsigned direction);
char const *
direction_name(enum direction direction)
{
assert(direction_is_valid(direction));
switch (direction) {
case direction_north: return "north";
case direction_northeast: return "northeast";
case direction_east: return "east";
case direction_southeast: return "southeast";
case direction_south: return "south";
case direction_southwest: return "southwest";
case direction_west: return "west";
case direction_northwest: return "northwest";
}
return "north";
}
enum direction
direction_opposite(enum direction direction)
{
assert(direction_is_valid(direction));
return (direction + 180) % 360;
}
enum direction
direction_random(struct rnd *rnd)
{
return rnd_next_uniform_value(rnd, 8) * 45;
}
|
Fix "control reaches end of non-void function" warning.
|
Fix "control reaches end of non-void function" warning.
On the Debian / GCC build with `-Wall` set, the `direction_name()`
function causes this warning. Add a catch-all return value after the
exhaustive `switch`.
|
C
|
bsd-2-clause
|
donmccaughey/FiendsAndFortune,donmccaughey/FiendsAndFortune,donmccaughey/FiendsAndFortune
|
bc552606f319023f360417c596f5b6da4c91fdd2
|
sigaltstack.c
|
sigaltstack.c
|
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf try;
void handler(int sig) {
static int i = 0;
printf("stack overflow %d\n", i);
longjmp(try, ++i);
assert(0);
}
unsigned recurse(unsigned x) {
return recurse(x)+1;
}
int main() {
char* stack;
stack = malloc(sizeof(stack) * SIGSTKSZ);
stack_t ss = {
.ss_size = SIGSTKSZ,
.ss_sp = stack,
};
struct sigaction sa = {
.sa_handler = handler,
.sa_flags = SA_ONSTACK
};
sigaltstack(&ss, 0);
sigfillset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, 0);
if (setjmp(try) < 3) {
recurse(0);
} else {
printf("caught exception!\n");
}
return 0;
}
|
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf try;
void handler(int sig) {
static int i = 0;
printf("stack overflow %d\n", i);
longjmp(try, ++i);
assert(0);
}
unsigned recurse(unsigned x) {
return recurse(x)+1;
}
int main() {
char* stack;
stack = malloc(sizeof(stack) * SIGSTKSZ);
stack_t ss = {
.ss_size = SIGSTKSZ,
.ss_sp = stack,
};
struct sigaction sa = {
.sa_handler = handler,
.sa_flags = SA_ONSTACK
};
sigaltstack(&ss, 0);
sigfillset(&sa.sa_mask);
sigaction(SIGALRM, &sa, 0);
raise(SIGALRM);
return 0;
if (setjmp(try) < 3) {
recurse(0);
} else {
printf("caught exception!\n");
}
return 0;
}
|
Switch to SIGLARM, to allow seamless gdb usage
|
Switch to SIGLARM, to allow seamless gdb usage
|
C
|
apache-2.0
|
danluu/setjmp-longjmp-ucontext-snippets,danluu/setjmp-longjmp-ucontext-snippets
|
29b6f3869ed2b4ee706b604dbd563a302d4bbba9
|
test/Index/c-index-crasher-rdar_7487294.c
|
test/Index/c-index-crasher-rdar_7487294.c
|
// RUN: c-index-test -test-load-source local %s 2>&1 | FileCheck %s
// This is invalid source. Previously a double-free caused this
// example to crash c-index-test.
int foo(int x) {
int y[x * 3];
help
};
// CHECK: 8:3: error: use of undeclared identifier 'help'
// CHECK: help
// CHECK: 12:102: error: expected '}'
|
// RUN: %clang-cc1 -fsyntax-only %s 2>&1 | FileCheck %s
// IMPORTANT: This test case intentionally DOES NOT use --disable-free. It
// tests that we are properly reclaiming the ASTs and we do not have a double free.
// Previously we tried to free the size expression of the VLA twice.
int foo(int x) {
int y[x * 3];
help
};
// CHECK: 9:3: error: use of undeclared identifier 'help'
// CHECK: help
// CHECK: 14:102: error: expected '}'
|
Change test case to use 'clang -cc1' (without --disable-free) instead of c-index-test (whose memory management behavior may change in the future).
|
Change test case to use 'clang -cc1' (without --disable-free) instead of c-index-test (whose memory management behavior may change in the future).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@92043 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
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/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
|
774ae7b87f85601780a9361d3ab39e37600adf5b
|
3RVX/Controllers/Volume/VolumeController.h
|
3RVX/Controllers/Volume/VolumeController.h
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
class VolumeTransformation;
class VolumeController {
public:
struct DeviceInfo {
std::wstring name;
std::wstring id;
};
/// <summary>
/// Retrieves the current volume level as a float, ranging from 0.0 - 1.0
/// </summary>
virtual float Volume() = 0;
/// <summary>Sets the volume level. Valid range: 0.0 - 1.0</summary>
virtual void Volume(float vol) = 0;
virtual bool Muted() = 0;
virtual void Muted(bool mute) = 0;
virtual void ToggleMute() {
(Muted() == true) ? Muted(false) : Muted(true);
}
virtual void Transformation(VolumeTransformation *transform) = 0;
virtual VolumeTransformation* Transformation() = 0;
public:
static const int MSG_VOL_CHNG = WM_APP + 1080;
static const int MSG_VOL_DEVCHNG = WM_APP + 1081;
};
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
class VolumeTransformation;
class VolumeController {
public:
struct DeviceInfo {
std::wstring name;
std::wstring id;
};
/// <summary>
/// Retrieves the current volume level as a float, ranging from 0.0 - 1.0
/// </summary>
virtual float Volume() = 0;
/// <summary>Sets the volume level. Valid range: 0.0 - 1.0</summary>
virtual void Volume(float vol) = 0;
virtual bool Muted() = 0;
virtual void Muted(bool mute) = 0;
virtual void ToggleMute() {
(Muted() == true) ? Muted(false) : Muted(true);
}
virtual void AddTransformation(VolumeTransformation *transform) = 0;
virtual void RemoveTransformation(VolumeTransformation *transform) = 0;
public:
static const int MSG_VOL_CHNG = WM_APP + 1080;
static const int MSG_VOL_DEVCHNG = WM_APP + 1081;
};
|
Change transform interface to add/remove
|
Change transform interface to add/remove
This allows support for multiple transformations
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
73606739ba6dba3ae32debf6823ea05483429e53
|
src/libc4/include/router.h
|
src/libc4/include/router.h
|
#ifndef ROUTER_H
#define ROUTER_H
#include <apr_queue.h>
#include "operator/operator.h"
#include "planner/planner.h"
#include "types/tuple.h"
typedef struct C4Router C4Router;
C4Router *router_make(C4Runtime *c4, apr_queue_t *queue);
void router_main_loop(C4Router *router);
apr_queue_t *router_get_queue(C4Router *router);
void router_enqueue_program(apr_queue_t *queue, const char *src);
void router_enqueue_tuple(apr_queue_t *queue, Tuple *tuple,
TableDef *tbl_def);
char *router_enqueue_dump_table(apr_queue_t *queue, const char *table,
apr_pool_t *pool);
/* Internal APIs: XXX: clearer naming */
void router_install_tuple(C4Router *router, Tuple *tuple,
TableDef *tbl_def);
void router_enqueue_internal(C4Router *router, Tuple *tuple,
TableDef *tbl_def);
void router_enqueue_net(C4Router *router, Tuple *tuple,
TableDef *tbl_def);
OpChainList *router_get_opchain_list(C4Router *router, const char *tbl_name);
void router_add_op_chain(C4Router *router, OpChain *op_chain);
#endif /* ROUTER_H */
|
#ifndef ROUTER_H
#define ROUTER_H
#include <apr_queue.h>
#include "operator/operator.h"
#include "planner/planner.h"
#include "types/tuple.h"
typedef struct C4Router C4Router;
C4Router *router_make(C4Runtime *c4, apr_queue_t *queue);
void router_main_loop(C4Router *router);
apr_queue_t *router_get_queue(C4Router *router);
void router_enqueue_program(apr_queue_t *queue, const char *src);
void router_enqueue_tuple(apr_queue_t *queue, Tuple *tuple,
TableDef *tbl_def);
char *router_enqueue_dump_table(apr_queue_t *queue, const char *tbl_name,
apr_pool_t *pool);
/* Internal APIs: XXX: clearer naming */
void router_install_tuple(C4Router *router, Tuple *tuple,
TableDef *tbl_def);
void router_enqueue_internal(C4Router *router, Tuple *tuple,
TableDef *tbl_def);
void router_enqueue_net(C4Router *router, Tuple *tuple,
TableDef *tbl_def);
OpChainList *router_get_opchain_list(C4Router *router, const char *tbl_name);
void router_add_op_chain(C4Router *router, OpChain *op_chain);
#endif /* ROUTER_H */
|
Tweak a function prototype in header.
|
Tweak a function prototype in header.
|
C
|
mit
|
bloom-lang/c4,bloom-lang/c4,bloom-lang/c4
|
0c2596f9c2142d8ba52065132a2b59745cf41fb2
|
inc/Signals.h
|
inc/Signals.h
|
#include "interface.h"
#include "ecg.h"
#include "AFE4400.h"
SPI_Interface afe4400_spi(spi_c2);
ECG ecg = ECG(1,1,4,9,PB0,4096,RA8875_BLUE,RA8875_BLACK,1000,tim3,&tft);
PulseOx spo2 = PulseOx(6,1,3,3,&afe4400_spi,PC8,PA9,PA8,PB7,&tft);
void enableSignalAcquisition(void) {
spo2.enable();
ecg.enable();
}
void connectSignalsToScreen(Screen& s) {
s.add(ecg.signalTrace);
s.add((ScreenElement*) &spo2);
}
|
#include "interface.h"
#include "ecg.h"
#include "AFE4400.h"
SPI_Interface afe4400_spi(spi_c2);
ECG ecg = ECG(1,1,4,9,PB0,4096,RA8875_BLUE,RA8875_BLACK,1000,tim3,&tft);
PulseOx spo2 = PulseOx(5,1,4,9,&afe4400_spi,PC8,PA9,PA8,PB7,&tft);
void enableSignalAcquisition(void) {
spo2.enable();
ecg.enable();
}
void connectSignalsToScreen(Screen& s) {
s.add(ecg.signalTrace);
s.add((ScreenElement*) &spo2);
}
|
Adjust display position for pulse ox
|
Adjust display position for pulse ox
|
C
|
mit
|
ReeceStevens/freepulse,ReeceStevens/freepulse,ReeceStevens/freepulse
|
4377b21c870e9b41ca10b4798f5252d2accd571a
|
libPhoneNumber-iOS/libPhoneNumberiOS.h
|
libPhoneNumber-iOS/libPhoneNumberiOS.h
|
//
// libPhoneNumber-iOS.h
// libPhoneNumber-iOS
//
// Created by Roy Marmelstein on 04/08/2015.
// Copyright (c) 2015 ohtalk.me. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for libPhoneNumber-iOS.
FOUNDATION_EXPORT double libPhoneNumber_iOSVersionNumber;
//! Project version string for libPhoneNumber-iOS.
FOUNDATION_EXPORT const unsigned char libPhoneNumber_iOSVersionString[];
// In this header, you should import all the public headers of your framework
// using statements like #import <libPhoneNumber_iOS/PublicHeader.h>
#import "NBPhoneNumberDefines.h"
// Features
#import "NBAsYouTypeFormatter.h"
#import "NBPhoneNumberUtil.h"
// Metadata
#import "NBMetadataHelper.h"
// Model
#import "NBNumberFormat.h"
#import "NBPhoneMetaData.h"
#import "NBPhoneNumber.h"
#import "NBPhoneNumberDesc.h"
|
//
// libPhoneNumber-iOS.h
// libPhoneNumber-iOS
//
// Created by Roy Marmelstein on 04/08/2015.
// Copyright (c) 2015 ohtalk.me. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for libPhoneNumber-iOS.
FOUNDATION_EXPORT double libPhoneNumber_iOSVersionNumber;
//! Project version string for libPhoneNumber-iOS.
FOUNDATION_EXPORT const unsigned char libPhoneNumber_iOSVersionString[];
// In this header, you should import all the public headers of your framework
// using statements like #import <libPhoneNumber_iOS/PublicHeader.h>
#import "NBPhoneNumberDefines.h"
// Features
#import "NBAsYouTypeFormatter.h"
#import "NBPhoneNumberUtil.h"
// Metadata
#import "NBMetadataHelper.h"
#import "NBGeocoderMetadataHelper.h"
// Model
#import "NBNumberFormat.h"
#import "NBPhoneMetaData.h"
#import "NBPhoneNumber.h"
#import "NBPhoneNumberDesc.h"
|
Fix 'umbrella header for module does not include...' error
|
Fix 'umbrella header for module does not include...' error
|
C
|
apache-2.0
|
iziz/libPhoneNumber-iOS,iziz/libPhoneNumber-iOS,iziz/libPhoneNumber-iOS,iziz/libPhoneNumber-iOS,iziz/libPhoneNumber-iOS
|
c853d88052c6a360978037c941976330f42aa3aa
|
tests/example.c
|
tests/example.c
|
#include <stdio.h>
int simpleloop (int x, int y) {
while (x < y) {
if (x < 3)
x++;
else
x+=2;
}
return x;
}
int main () {
printf("%i", simpleloop(0, 10), stdout);
}
|
int simpleloop (int x, int y) {
while (x < y) {
if (x < 3)
x++;
else
x+=2;
}
return x;
}
|
Add Pagai's invariants extraction, fix various typos.
|
Add Pagai's invariants extraction, fix various typos.
|
C
|
lgpl-2.1
|
termite-analyser/llvm2smt
|
8e943ab7b33d2e0fb8688dd53ad4886fd94d1242
|
Snapper/Source/Shared/SNPBlockUserOperation.h
|
Snapper/Source/Shared/SNPBlockUserOperation.h
|
//
// SNPBlockUserOperation.h
// Snapper
//
// Created by Paul Schifferer on 5/12/13.
// Copyright (c) 2013 Pilgrimage Software. All rights reserved.
//
#import <Snapper/Snapper.h>
#import "SNPUserParameters.h"
@interface SNPBlockUserOperation : SNPBaseUserTokenOperation
<SNPUserParameters>
// -- Properties --
@property (nonatomic, assign) NSUInteger userId;
// -- Initialization --
- (id)initWithUserId:(NSUInteger)userId
accountId:(NSString*)accountId
finishBlock:(void (^)(SNPResponse* response))finishBlock;
@end
|
//
// SNPBlockUserOperation.h
// Snapper
//
// Created by Paul Schifferer on 5/12/13.
// Copyright (c) 2013 Pilgrimage Software. All rights reserved.
//
#import "SNPBaseUserTokenOperation.h"
#import "SNPUserParameters.h"
@interface SNPBlockUserOperation : SNPBaseUserTokenOperation
<SNPUserParameters>
// -- Properties --
@property (nonatomic, assign) NSUInteger userId;
// -- Initialization --
- (id)initWithUserId:(NSUInteger)userId
accountId:(NSString*)accountId
finishBlock:(void (^)(SNPResponse* response))finishBlock;
@end
|
Use the right import type.
|
Use the right import type.
|
C
|
mit
|
exsortis/Snapper
|
3891f287447bc15e84f40f2779ecb7ca0861b83b
|
Classes/iOS/MTStackableNavigationController.h
|
Classes/iOS/MTStackableNavigationController.h
|
//
// MTStackableNavigationController.h
//
// Created by Mat Trudel on 2013-02-05.
// Copyright (c) 2013 Mat Trudel. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "UIViewController+MTStackableNavigationController.h"
@interface MTStackableNavigationController : UIViewController <UINavigationBarDelegate>
@property(nonatomic, readonly) NSArray *viewControllers;
- (id)initWithRootViewController:(UIViewController *)rootViewController;
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (UIViewController *)popViewControllerAnimated:(BOOL)animated;
- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (NSArray *)popToRootViewControllerAnimated:(BOOL)animated;
@property(nonatomic,readonly,retain) UIViewController *topViewController; // The top view controller on the stack.
@end
|
//
// MTStackableNavigationController.h
//
// Created by Mat Trudel on 2013-02-05.
// Copyright (c) 2013 Mat Trudel. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "UIViewController+MTStackableNavigationController.h"
#import "MTStackableNavigationItem.h"
@interface MTStackableNavigationController : UIViewController <UINavigationBarDelegate>
@property(nonatomic, readonly) NSArray *viewControllers;
- (id)initWithRootViewController:(UIViewController *)rootViewController;
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (UIViewController *)popViewControllerAnimated:(BOOL)animated;
- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (NSArray *)popToRootViewControllerAnimated:(BOOL)animated;
@property(nonatomic,readonly,retain) UIViewController *topViewController; // The top view controller on the stack.
@end
|
Include all headers by default
|
Include all headers by default
|
C
|
mit
|
mtrudel/MTStackableNavigationController
|
0e759ce768538ef7c0740771c069d36833feca46
|
sys/shell/commands/sc_ps.c
|
sys/shell/commands/sc_ps.c
|
/*
* Copyright (C) 2013 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_shell_commands
* @{
*
* @file
* @brief Shell commands for the PS module
*
* @author Oliver Hahm <oliver.hahm@inria.fr>
*
* @}
*/
#include "ps.h"
int _ps_handler(int argc, char **argv)
{
(void) argc;
(void) argv;
ps();
return 0;
}
|
/*
* Copyright (C) 2013 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_shell_commands
* @{
*
* @file
* @brief Shell commands for the PS module
*
* @author Oliver Hahm <oliver.hahm@inria.fr>
*
* @}
*/
#ifdef MODULE_PS
#include "ps.h"
int _ps_handler(int argc, char **argv)
{
(void) argc;
(void) argv;
ps();
return 0;
}
#endif
|
Fix ps depedency when ps not included
|
Fix ps depedency when ps not included
|
C
|
lgpl-2.1
|
ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT
|
449ce31d5120a192e62d21fdf9389b0e8ca06d8e
|
test/CodeGen/nobuiltin.c
|
test/CodeGen/nobuiltin.c
|
// RUN: %clang_cc1 -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=MEMSET %s
// RUN: %clang_cc1 -fno-builtin -O1 -S -o - %s | FileCheck -check-prefix=NOSTRCPY -check-prefix=NOMEMSET %s
// RUN: %clang_cc1 -fno-builtin-memset -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=NOMEMSET %s
void PR13497() {
char content[2];
// make sure we don't optimize this call to strcpy()
// STRCPY-NOT: __strcpy_chk
// NOSTRCPY: __strcpy_chk
__builtin___strcpy_chk(content, "", 1);
}
void PR4941(char *s) {
// Make sure we don't optimize this loop to a memset().
// NOMEMSET-NOT: memset
// MEMSET: memset
for (unsigned i = 0; i < 8192; ++i)
s[i] = 0;
}
|
// RUN: %clang_cc1 -triple x86_64-linux-gnu -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=MEMSET %s
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin -O1 -S -o - %s | FileCheck -check-prefix=NOSTRCPY -check-prefix=NOMEMSET %s
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin-memset -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=NOMEMSET %s
void PR13497() {
char content[2];
// make sure we don't optimize this call to strcpy()
// STRCPY-NOT: __strcpy_chk
// NOSTRCPY: __strcpy_chk
__builtin___strcpy_chk(content, "", 1);
}
void PR4941(char *s) {
// Make sure we don't optimize this loop to a memset().
// NOMEMSET-NOT: memset
// MEMSET: memset
for (unsigned i = 0; i < 8192; ++i)
s[i] = 0;
}
|
Add target triples to fix test on non-x86.
|
Add target triples to fix test on non-x86.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@281790 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
11ac5afd65a335cafd8ad8884507fe3210dc80bc
|
src/dtkComposer/dtkComposerMetatype.h
|
src/dtkComposer/dtkComposerMetatype.h
|
/* dtkComposerMetatype.h ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Sat Aug 4 00:26:47 2012 (+0200)
* Version: $Id$
* Last-Updated: Wed Oct 17 11:45:26 2012 (+0200)
* By: Julien Wintz
* Update #: 12
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERMETATYPE_H
#define DTKCOMPOSERMETATYPE_H
#include <QtCore>
// /////////////////////////////////////////////////////////////////
//
// /////////////////////////////////////////////////////////////////
Q_DECLARE_METATYPE(bool*);
Q_DECLARE_METATYPE(int*);
Q_DECLARE_METATYPE(uint*);
Q_DECLARE_METATYPE(qlonglong*);
Q_DECLARE_METATYPE(qulonglong*);
Q_DECLARE_METATYPE(qreal*);
Q_DECLARE_METATYPE(QString*);
#endif
|
/* dtkComposerMetatype.h ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Sat Aug 4 00:26:47 2012 (+0200)
* Version: $Id$
* Last-Updated: Thu Jun 13 14:55:45 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 15
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERMETATYPE_H
#define DTKCOMPOSERMETATYPE_H
#include <QtCore>
// /////////////////////////////////////////////////////////////////
//
// /////////////////////////////////////////////////////////////////
Q_DECLARE_METATYPE(bool*);
Q_DECLARE_METATYPE(int*);
Q_DECLARE_METATYPE(uint*);
Q_DECLARE_METATYPE(qlonglong*);
Q_DECLARE_METATYPE(qulonglong*);
Q_DECLARE_METATYPE(qreal*);
Q_DECLARE_METATYPE(double **)
Q_DECLARE_METATYPE(QString*);
#endif
|
Add declaration of double** to Qt metatype engine.
|
Add declaration of double** to Qt metatype engine.
|
C
|
bsd-3-clause
|
d-tk/dtk,d-tk/dtk,d-tk/dtk,rdebroiz/dtk,d-tk/dtk,rdebroiz/dtk,d-tk/dtk,rdebroiz/dtk,rdebroiz/dtk,d-tk/dtk,NicolasSchnitzler/dtk,NicolasSchnitzler/dtk,NicolasSchnitzler/dtk,NicolasSchnitzler/dtk
|
eec85a4a55631f44199bc235c9db891e61be3c67
|
spotify-fs.c
|
spotify-fs.c
|
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <errno.h>
#include "spotify-fs.h"
int main(int argc, char *argv[])
{
int retval = 0;
char *password = NULL;
char *username = malloc(SPOTIFY_USERNAME_MAXLEN);
if ((getuid() == 0) || (geteuid() == 0)) {
fprintf(stderr, "Running %s as root is not a good idea\n", application_name);
return 1;
}
printf("spotify username: ");
username = fgets(username, SPOTIFY_USERNAME_MAXLEN, stdin);
long username_len = strlen(username);
if(username[username_len-1] == '\n') {
username[username_len-1] = '\0';
}
password = getpass("spotify password: ");
if (strlen(password) <= 0)
{
password = NULL;
}
/* should we do something about this, really?
* Maybe put error logging here instead of in
* spotify_session_init()*/
(void) spotify_session_init(username, password, NULL);
retval = fuse_main(argc, argv, &spfs_operations, NULL);
return retval;
}
|
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <errno.h>
#include "spotify-fs.h"
int main(int argc, char *argv[])
{
int retval = 0;
char *password = NULL;
char *username = malloc(SPOTIFY_USERNAME_MAXLEN);
if ((getuid() == 0) || (geteuid() == 0)) {
fprintf(stderr, "Running %s as root is not a good idea\n", application_name);
return 1;
}
printf("spotify username: ");
username = fgets(username, SPOTIFY_USERNAME_MAXLEN, stdin);
long username_len = strlen(username);
if(username_len > 0 && username[username_len-1] == '\n') {
username[username_len-1] = '\0';
}
password = getpass("spotify password: ");
if (strlen(password) <= 0)
{
password = NULL;
}
/* should we do something about this, really?
* Maybe put error logging here instead of in
* spotify_session_init()*/
(void) spotify_session_init(username, password, NULL);
retval = fuse_main(argc, argv, &spfs_operations, NULL);
return retval;
}
|
Check that there's something in the username buffer before reading it
|
Check that there's something in the username buffer before reading it
|
C
|
bsd-3-clause
|
chelmertz/spotifile,catharsis/spotifile,catharsis/spotifile,raoulh/spotifile,catharsis/spotifile,raoulh/spotifile,raoulh/spotifile,chelmertz/spotifile,chelmertz/spotifile
|
6a983da6189220b79795474c5d3f2315702a984e
|
Utilities/kwsys/testDynload.c
|
Utilities/kwsys/testDynload.c
|
#ifdef _WIN32
#define DL_EXPORT __declspec( dllexport )
#else
#define DL_EXPORT
#endif
DL_EXPORT int TestDynamicLoaderData;
DL_EXPORT void TestDynamicLoaderFunction()
{
}
|
#ifdef _WIN32
#define DL_EXPORT __declspec( dllexport )
#else
#define DL_EXPORT
#endif
DL_EXPORT int TestDynamicLoaderData = 0;
DL_EXPORT void TestDynamicLoaderFunction()
{
}
|
Fix compilation on MacOSX (common symbols not allowed with MH_DYLIB output format)
|
COMP: Fix compilation on MacOSX (common symbols not allowed with MH_DYLIB output format)
|
C
|
bsd-3-clause
|
candy7393/VTK,arnaudgelas/VTK,sumedhasingla/VTK,johnkit/vtk-dev,mspark93/VTK,collects/VTK,biddisco/VTK,daviddoria/PointGraphsPhase1,mspark93/VTK,mspark93/VTK,Wuteyan/VTK,jeffbaumes/jeffbaumes-vtk,sumedhasingla/VTK,aashish24/VTK-old,Wuteyan/VTK,keithroe/vtkoptix,Wuteyan/VTK,mspark93/VTK,ashray/VTK-EVM,ashray/VTK-EVM,spthaolt/VTK,hendradarwin/VTK,candy7393/VTK,demarle/VTK,gram526/VTK,naucoin/VTKSlicerWidgets,sankhesh/VTK,daviddoria/PointGraphsPhase1,spthaolt/VTK,ashray/VTK-EVM,msmolens/VTK,keithroe/vtkoptix,hendradarwin/VTK,berendkleinhaneveld/VTK,daviddoria/PointGraphsPhase1,candy7393/VTK,hendradarwin/VTK,gram526/VTK,johnkit/vtk-dev,jeffbaumes/jeffbaumes-vtk,aashish24/VTK-old,gram526/VTK,collects/VTK,naucoin/VTKSlicerWidgets,sankhesh/VTK,arnaudgelas/VTK,johnkit/vtk-dev,gram526/VTK,SimVascular/VTK,biddisco/VTK,demarle/VTK,msmolens/VTK,SimVascular/VTK,berendkleinhaneveld/VTK,arnaudgelas/VTK,jeffbaumes/jeffbaumes-vtk,msmolens/VTK,hendradarwin/VTK,demarle/VTK,hendradarwin/VTK,sumedhasingla/VTK,biddisco/VTK,sumedhasingla/VTK,spthaolt/VTK,jmerkow/VTK,jeffbaumes/jeffbaumes-vtk,msmolens/VTK,collects/VTK,cjh1/VTK,gram526/VTK,collects/VTK,jmerkow/VTK,arnaudgelas/VTK,SimVascular/VTK,daviddoria/PointGraphsPhase1,johnkit/vtk-dev,biddisco/VTK,Wuteyan/VTK,collects/VTK,ashray/VTK-EVM,naucoin/VTKSlicerWidgets,sankhesh/VTK,naucoin/VTKSlicerWidgets,naucoin/VTKSlicerWidgets,aashish24/VTK-old,ashray/VTK-EVM,keithroe/vtkoptix,jmerkow/VTK,arnaudgelas/VTK,spthaolt/VTK,jmerkow/VTK,collects/VTK,mspark93/VTK,berendkleinhaneveld/VTK,berendkleinhaneveld/VTK,berendkleinhaneveld/VTK,sumedhasingla/VTK,mspark93/VTK,biddisco/VTK,keithroe/vtkoptix,candy7393/VTK,aashish24/VTK-old,ashray/VTK-EVM,cjh1/VTK,mspark93/VTK,cjh1/VTK,johnkit/vtk-dev,sankhesh/VTK,sumedhasingla/VTK,SimVascular/VTK,keithroe/vtkoptix,keithroe/vtkoptix,ashray/VTK-EVM,SimVascular/VTK,jeffbaumes/jeffbaumes-vtk,keithroe/vtkoptix,jmerkow/VTK,aashish24/VTK-old,jmerkow/VTK,spthaolt/VTK,Wuteyan/VTK,demarle/VTK,sankhesh/VTK,SimVascular/VTK,daviddoria/PointGraphsPhase1,jmerkow/VTK,arnaudgelas/VTK,candy7393/VTK,demarle/VTK,ashray/VTK-EVM,sumedhasingla/VTK,candy7393/VTK,jmerkow/VTK,gram526/VTK,spthaolt/VTK,Wuteyan/VTK,gram526/VTK,keithroe/vtkoptix,johnkit/vtk-dev,gram526/VTK,sankhesh/VTK,mspark93/VTK,Wuteyan/VTK,sankhesh/VTK,candy7393/VTK,msmolens/VTK,biddisco/VTK,msmolens/VTK,SimVascular/VTK,cjh1/VTK,cjh1/VTK,jeffbaumes/jeffbaumes-vtk,hendradarwin/VTK,candy7393/VTK,sankhesh/VTK,biddisco/VTK,sumedhasingla/VTK,demarle/VTK,johnkit/vtk-dev,aashish24/VTK-old,demarle/VTK,daviddoria/PointGraphsPhase1,msmolens/VTK,SimVascular/VTK,naucoin/VTKSlicerWidgets,berendkleinhaneveld/VTK,msmolens/VTK,hendradarwin/VTK,spthaolt/VTK,berendkleinhaneveld/VTK,cjh1/VTK,demarle/VTK
|
3b4878c31f8659a1a8c05225ced397ee76a12208
|
testmud/mud/home/Game/sys/bin/rebuild.c
|
testmud/mud/home/Game/sys/bin/rebuild.c
|
#include <kotaka/paths.h>
#include <game/paths.h>
inherit LIB_BIN;
void main(string args)
{
object user;
user = query_user();
if (user->query_class() < 2) {
send_out("You do not have sufficient access rights to rebuild.\n");
return;
}
OBJECTD->klib_recompile();
OBJECTD->global_recompile();
}
|
#include <kotaka/paths.h>
#include <game/paths.h>
inherit LIB_BIN;
void main(string args)
{
object user;
user = query_user();
if (user->query_class() < 1) {
send_out("You do not have sufficient access rights to rebuild.\n");
return;
}
OBJECTD->recompile_everything();
}
|
Update Game to new objectd api
|
Update Game to new objectd api
|
C
|
agpl-3.0
|
shentino/kotaka,shentino/kotaka,shentino/kotaka
|
88421a4d5cd49aa4dcb48687395577cb9e19cbaf
|
cbits/Engine.h
|
cbits/Engine.h
|
#ifndef HSQML_ENGINE_H
#define HSQML_ENGINE_H
#include <QtCore/QScopedPointer>
#include <QtCore/QString>
#include <QtCore/QUrl>
#include <QtQml/QQmlEngine>
#include <QtQml/QQmlContext>
#include <QtQml/QQmlComponent>
#include "hsqml.h"
class HsQMLObjectProxy;
class HsQMLWindow;
struct HsQMLEngineConfig
{
HsQMLEngineConfig()
: contextObject(NULL)
, stopCb(NULL)
{}
HsQMLObjectProxy* contextObject;
QString initialURL;
QStringList importPaths;
QStringList pluginPaths;
HsQMLTrivialCb stopCb;
};
class HsQMLEngine : public QObject
{
Q_OBJECT
public:
HsQMLEngine(const HsQMLEngineConfig&);
~HsQMLEngine();
bool eventFilter(QObject*, QEvent*);
QQmlEngine* declEngine();
private:
Q_DISABLE_COPY(HsQMLEngine)
Q_SLOT void componentStatus(QQmlComponent::Status);
QQmlEngine mEngine;
QQmlComponent mComponent;
QList<QObject*> mObjects;
HsQMLTrivialCb mStopCb;
};
#endif /*HSQML_ENGINE_H*/
|
#ifndef HSQML_ENGINE_H
#define HSQML_ENGINE_H
#include <QtCore/QScopedPointer>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QUrl>
#include <QtQml/QQmlEngine>
#include <QtQml/QQmlContext>
#include <QtQml/QQmlComponent>
#include "hsqml.h"
class HsQMLObjectProxy;
class HsQMLWindow;
struct HsQMLEngineConfig
{
HsQMLEngineConfig()
: contextObject(NULL)
, stopCb(NULL)
{}
HsQMLObjectProxy* contextObject;
QString initialURL;
QStringList importPaths;
QStringList pluginPaths;
HsQMLTrivialCb stopCb;
};
class HsQMLEngine : public QObject
{
Q_OBJECT
public:
HsQMLEngine(const HsQMLEngineConfig&);
~HsQMLEngine();
bool eventFilter(QObject*, QEvent*);
QQmlEngine* declEngine();
private:
Q_DISABLE_COPY(HsQMLEngine)
Q_SLOT void componentStatus(QQmlComponent::Status);
QQmlEngine mEngine;
QQmlComponent mComponent;
QList<QObject*> mObjects;
HsQMLTrivialCb mStopCb;
};
#endif /*HSQML_ENGINE_H*/
|
Fix missing include breaking compilation with Qt 5.0.
|
Fix missing include breaking compilation with Qt 5.0.
Ignore-this: 5dff167c44ad1cc6ee31684cae68da9e
darcs-hash:20150127225150-4d2ae-3a04dfc67645719182188ee9c21c2bed04a8101c
|
C
|
bsd-3-clause
|
johntyree/HsQML,johntyree/HsQML
|
5d697e859aa4711d270f5c3170449fcce1fbc412
|
test/Driver/arm-fixed-r9.c
|
test/Driver/arm-fixed-r9.c
|
// RUN: %clang -target arm-none-gnueeabi -ffixed-r9 -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-FIXED-R9 < %t %s
// CHECK-FIXED-R9: "-backend-option" "-arm-reserve-r9"
|
// RUN: %clang -target arm-none-gnueabi -ffixed-r9 -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-FIXED-R9 < %t %s
// CHECK-FIXED-R9: "-backend-option" "-arm-reserve-r9"
|
Fix typo in ARM reserved-r9 test case
|
Fix typo in ARM reserved-r9 test case
Patch by Charlie Turner.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@219569 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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
e45534d027c685561d6da233e3cf5e0c1dde726c
|
include/llvm/CodeGen/GCs.h
|
include/llvm/CodeGen/GCs.h
|
//===-- GCs.h - Garbage collector linkage hacks ---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains hack functions to force linking in the GC components.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_GCS_H
#define LLVM_CODEGEN_GCS_H
namespace llvm {
class GCStrategy;
class GCMetadataPrinter;
/// FIXME: Collector instances are not useful on their own. These no longer
/// serve any purpose except to link in the plugins.
/// Creates an ocaml-compatible garbage collector.
void linkOcamlGC();
/// Creates an ocaml-compatible metadata printer.
void linkOcamlGCPrinter();
/// Creates an erlang-compatible garbage collector.
void linkErlangGC();
/// Creates an erlang-compatible metadata printer.
void linkErlangGCPrinter();
/// Creates a shadow stack garbage collector. This collector requires no code
/// generator support.
void linkShadowStackGC();
}
#endif
|
//===-- GCs.h - Garbage collector linkage hacks ---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains hack functions to force linking in the GC components.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_GCS_H
#define LLVM_CODEGEN_GCS_H
namespace llvm {
class GCStrategy;
class GCMetadataPrinter;
/// FIXME: Collector instances are not useful on their own. These no longer
/// serve any purpose except to link in the plugins.
/// Creates an ocaml-compatible garbage collector.
void linkOcamlGC();
/// Creates an ocaml-compatible metadata printer.
void linkOcamlGCPrinter();
/// Creates an erlang-compatible garbage collector.
void linkErlangGC();
/// Creates an erlang-compatible metadata printer.
void linkErlangGCPrinter();
/// Creates a shadow stack garbage collector. This collector requires no code
/// generator support.
void linkShadowStackGC();
}
#endif
|
Test commit: Remove trailing whitespace.
|
Test commit: Remove trailing whitespace.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@203502 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm
|
19d03376c20ef7e98c2e4907004a40f8e658c10a
|
source/glbinding/include/glbinding/glbinding.h
|
source/glbinding/include/glbinding/glbinding.h
|
#pragma once
#include <glbinding/glbinding_api.h>
#include <glbinding/ContextId.h>
namespace glbinding {
GLBINDING_API void initialize();
GLBINDING_API void initialize(ContextId contextId, bool useContext = true, bool resolveFunctions = false);
GLBINDING_API void resolveFunctions();
GLBINDING_API void useCurrentContext();
GLBINDING_API void useContext(ContextId contextId);
GLBINDING_API void finalizeCurrentContext();
GLBINDING_API void finalizeContext(ContextId contextId);
} // namespace glbinding
|
#pragma once
#include <glbinding/glbinding_api.h>
#include <glbinding/ContextId.h>
namespace glbinding {
GLBINDING_API void initialize();
GLBINDING_API void initialize(ContextId contextId, bool useContext = true, bool resolveFunctions = true);
GLBINDING_API void resolveFunctions();
GLBINDING_API void useCurrentContext();
GLBINDING_API void useContext(ContextId contextId);
GLBINDING_API void finalizeCurrentContext();
GLBINDING_API void finalizeContext(ContextId contextId);
} // namespace glbinding
|
Change default parameter to true
|
Change default parameter to true
|
C
|
mit
|
mcleary/glbinding,j-o/glbinding,mcleary/glbinding,hpi-r2d2/glbinding,hpicgs/glbinding,hpicgs/glbinding,hpicgs/glbinding,cginternals/glbinding,mcleary/glbinding,j-o/glbinding,hpicgs/glbinding,hpi-r2d2/glbinding,hpi-r2d2/glbinding,cginternals/glbinding,hpi-r2d2/glbinding,mcleary/glbinding,j-o/glbinding,j-o/glbinding
|
4fddd802417ad903fe7dd590d7175d556c0697dd
|
gfx/size_io.h
|
gfx/size_io.h
|
// LAF Gfx Library
// Copyright (C) 2019 Igara Studio S.A.
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef GFX_SIZE_IO_H_INCLUDED
#define GFX_SIZE_IO_H_INCLUDED
#pragma once
#include "gfx/size.h"
#include <iosfwd>
namespace gfx {
inline std::ostream& operator<<(std::ostream& os, const Size& size) {
return os << "("
<< size.x << ", "
<< size.y << ")";
}
inline std::istream& operator>>(std::istream& in, Size& size) {
while (in && in.get() != '(')
;
if (!in)
return in;
char chr;
in >> size.x >> chr
>> size.y;
return in;
}
}
#endif
|
// LAF Gfx Library
// Copyright (C) 2019 Igara Studio S.A.
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef GFX_SIZE_IO_H_INCLUDED
#define GFX_SIZE_IO_H_INCLUDED
#pragma once
#include "gfx/size.h"
#include <iosfwd>
namespace gfx {
inline std::ostream& operator<<(std::ostream& os, const Size& size) {
return os << "("
<< size.w << ", "
<< size.h << ")";
}
inline std::istream& operator>>(std::istream& in, Size& size) {
while (in && in.get() != '(')
;
if (!in)
return in;
char chr;
in >> size.w >> chr
>> size.h;
return in;
}
}
#endif
|
Fix operator<<(ostream&) and operator>>(istream&) for gfx::Size
|
Fix operator<<(ostream&) and operator>>(istream&) for gfx::Size
|
C
|
mit
|
aseprite/laf,aseprite/laf
|
666d003deec427657491dcfef7c4871ed2c4eb66
|
src/blueprint.c
|
src/blueprint.c
|
#include "blueprint.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include "parson.h"
#include "bstrlib.h"
void free_blueprint(struct blueprint *bp)
{
if (bp == NULL)
return;
bdestroy(bp->name);
bdestroy(bp->blueprint_name);
bdestroy(bp->Name);
bdestroy(bp->game_version);
for (int i = 0; i < bp->num_sc; i++)
free_blueprint(&bp->SCs[i]);
free(bp->blocks);
free(bp);
}
|
#include "blueprint.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include "parson.h"
#include "bstrlib.h"
void free_blueprint(struct blueprint *bp)
{
if (bp == NULL)
return;
bdestroy(bp->name);
bdestroy(bp->blueprint_name);
bdestroy(bp->Name);
bdestroy(bp->game_version);
for (int i = 0; i < bp->num_sc; i++)
free_blueprint(&bp->SCs[i]);
for (int i = 0; i < bp->total_block_count; i++)
{
if (bp->blocks[i].string_data == NULL)
continue;
bdestroy(bp->blocks[i].string_data);
}
free(bp->blocks);
free(bp);
}
|
Remove yet another memory leak
|
Remove yet another memory leak
|
C
|
mit
|
Dean4Devil/libblueprint,Dean4Devil/libblueprint
|
4d1379897a62ac0598366561b69fe21d4d4bd091
|
src/goontools.c
|
src/goontools.c
|
#include "goontools.h"
void usage(char* prog)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s <subcommand> <subcommand arguments>\n", prog);
fprintf(stderr, "\n");
fprintf(stderr, "subcommands:\n");
fprintf(stderr, " index index file\n");
fprintf(stderr, " sort sort file\n");
fprintf(stderr, " view view/slice file\n");
fprintf(stderr, " idxstat print index information\n");
fprintf(stderr, "\n");
}
int dispatch(int argc, char *argv[])
{
char *subcommands[] = {
"index",
"view",
"sort",
"idxstats",
NULL // sentinel
};
Subcommand dispatch[] = {
&goonindex,
&goonview,
&goonsort,
&goonidxstat
};
char **s;
for (s = subcommands; *s != NULL; s += 1) {
if (strcmp(argv[1], *s) == 0) {
break;
}
}
if (*s == NULL) {
usage(argv[0]);
return -1;
}
return dispatch[s-subcommands](argc-1, argv+1);
}
int main(int argc, char *argv[])
{
if (argc == 1) {
usage(argv[0]);
return EXIT_FAILURE;
}
if (dispatch(argc, argv) != 0) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
|
#include "goontools.h"
void usage(char* prog)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s <subcommand> <subcommand arguments>\n", prog);
fprintf(stderr, "\n");
fprintf(stderr, "subcommands:\n");
fprintf(stderr, " index index file\n");
fprintf(stderr, " sort sort file\n");
fprintf(stderr, " view view/slice file\n");
fprintf(stderr, " idxstat print index information\n");
fprintf(stderr, "\n");
}
int dispatch(int argc, char *argv[])
{
char *subcommands[] = {
"index",
"view",
"sort",
"idxstat",
NULL // sentinel
};
Subcommand dispatch[] = {
&goonindex,
&goonview,
&goonsort,
&goonidxstat
};
char **s;
for (s = subcommands; *s != NULL; s += 1) {
if (strcmp(argv[1], *s) == 0) {
break;
}
}
if (*s == NULL) {
usage(argv[0]);
return -1;
}
return dispatch[s-subcommands](argc-1, argv+1);
}
int main(int argc, char *argv[])
{
if (argc == 1) {
usage(argv[0]);
return EXIT_FAILURE;
}
if (dispatch(argc, argv) != 0) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
|
Fix typo in `idxstat` subcommand
|
Fix typo in `idxstat` subcommand
|
C
|
mit
|
mhyfritz/goontools,mhyfritz/goontools,mhyfritz/goontools
|
74fc900360426b3f0f620734f23cd47d879c73da
|
kmail/kmfoldertype.h
|
kmail/kmfoldertype.h
|
#ifndef KMFOLDERTYPE_H
#define KMFOLDERTYPE_H
typedef enum
{
KMFolderTypeMbox = 0,
KMFolderTypeMaildir,
KMFolderTypeCachedImap,
KMFolderTypeImap,
KMFolderTypeSearch
} KMFolderType;
typedef enum
{
KMStandardDir = 0,
KMImapDir,
KMSearchDir
} KMFolderDirType;
#endif // KMFOLDERTYPE_H
|
#ifndef KMFOLDERTYPE_H
#define KMFOLDERTYPE_H
typedef enum
{
KMFolderTypeMbox = 0,
KMFolderTypeMaildir,
KMFolderTypeCachedImap,
KMFolderTypeImap,
KMFolderTypeSearch,
KMFolderTypeUnknown
} KMFolderType;
typedef enum
{
KMStandardDir = 0,
KMImapDir,
KMSearchDir
} KMFolderDirType;
#endif // KMFOLDERTYPE_H
|
Add an unknown folder type
|
Add an unknown folder type
svn path=/trunk/kdenetwork/kmail/; revision=197411
|
C
|
lgpl-2.1
|
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
|
a9a7737f4f0120d49ef870a1aa5bf74e05dac1e8
|
src/arch/posix/csp_clock.c
|
src/arch/posix/csp_clock.c
|
/*
Cubesat Space Protocol - A small network-layer protocol designed for Cubesats
Copyright (C) 2012 Gomspace ApS (http://www.gomspace.com)
Copyright (C) 2012 AAUSAT3 Project (http://aausat3.space.aau.dk)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <csp/arch/csp_clock.h>
#include <time.h>
void clock_get_time(timestamp_t * timestamp) {
timestamp->tv_sec = time(0);
}
void clock_set_time(timestamp_t * timestamp) {
return;
}
|
/*
Cubesat Space Protocol - A small network-layer protocol designed for Cubesats
Copyright (C) 2012 Gomspace ApS (http://www.gomspace.com)
Copyright (C) 2012 AAUSAT3 Project (http://aausat3.space.aau.dk)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <csp/arch/csp_clock.h>
#include <time.h>
void clock_get_time(csp_timestamp_t * timestamp) {
timestamp->tv_sec = time(0);
}
void clock_set_time(csp_timestamp_t * timestamp) {
return;
}
|
Fix compile of posix clock after timestamp_t was renamed to csp_timestamp_t
|
Fix compile of posix clock after timestamp_t was renamed to csp_timestamp_t
|
C
|
apache-2.0
|
Psykar/kubos,kubostech/KubOS,libcsp/libcsp,pacheco017/libcsp,pacheco017/libcsp,GomSpace/libcsp,GomSpace/libcsp,pacheco017/libcsp,Psykar/kubos,Psykar/kubos,satlab/libcsp,Psykar/kubos,Psykar/kubos,Psykar/kubos,Psykar/kubos,satlab/libcsp,libcsp/libcsp,GomSpace/libcsp,satlab/libcsp,kubostech/KubOS,pacheco017/libcsp
|
b693b103d46a00a88314a0fa0349ad85d26efd2d
|
source/gloperate/include/gloperate/painter/PipelineOutputCapability.h
|
source/gloperate/include/gloperate/painter/PipelineOutputCapability.h
|
#pragma once
#include <gloperate/gloperate_api.h>
#include <gloperate/painter/AbstractOutputCapability.h>
#include <gloperate/pipeline/AbstractPipeline.h>
#include <string>
#include <vector>
namespace gloperate
{
class AbstractData;
template <typename T>
class Data;
/**
* @brief
* OutputCapability for pipelines
*
*/
class GLOPERATE_API PipelineOutputCapability : public AbstractOutputCapability
{
public:
/**
* @brief
* Constructor
*/
PipelineOutputCapability(gloperate::AbstractPipeline & pipeline);
/**
* @brief
* Destructor
*/
virtual ~PipelineOutputCapability();
virtual std::vector<gloperate::AbstractData*> allOutputs() const;
protected:
gloperate::AbstractPipeline & m_pipeline;
};
} // namespace gloperate
|
#pragma once
#include <gloperate/gloperate_api.h>
#include <gloperate/painter/AbstractOutputCapability.h>
#include <gloperate/pipeline/AbstractPipeline.h>
#include <string>
#include <vector>
namespace gloperate
{
class AbstractData;
template <typename T>
class Data;
/**
* @brief
* OutputCapability for pipelines
*
*/
class GLOPERATE_API PipelineOutputCapability : public AbstractOutputCapability
{
public:
/**
* @brief
* Constructor
*/
PipelineOutputCapability(gloperate::AbstractPipeline & pipeline);
/**
* @brief
* Destructor
*/
virtual ~PipelineOutputCapability();
virtual std::vector<gloperate::AbstractData*> allOutputs() const override;
protected:
gloperate::AbstractPipeline & m_pipeline;
};
} // namespace gloperate
|
Add override to overridden method
|
Add override to overridden method
|
C
|
mit
|
lanice/gloperate,hpicgs/gloperate,j-o/gloperate,lanice/gloperate,cginternals/gloperate,lanice/gloperate,Beta-Alf/gloperate,p-otto/gloperate,hpicgs/gloperate,p-otto/gloperate,cginternals/gloperate,p-otto/gloperate,lanice/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,p-otto/gloperate,Beta-Alf/gloperate,hpicgs/gloperate,lanice/gloperate,j-o/gloperate,hpi-r2d2/gloperate,cginternals/gloperate,j-o/gloperate,cginternals/gloperate,p-otto/gloperate,hpicgs/gloperate,hpi-r2d2/gloperate,j-o/gloperate,hpicgs/gloperate,Beta-Alf/gloperate
|
2fcf5b345b9b2b37fe9d41434c9df4ebc8c9e3f2
|
CefSharp.Core/Internals/CefCallbackWrapper.h
|
CefSharp.Core/Internals/CefCallbackWrapper.h
|
// Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include\cef_callback.h"
namespace CefSharp
{
public ref class CefCallbackWrapper : public ICallback
{
private:
MCefRefPtr<CefCallback> _callback;
public:
CefCallbackWrapper(CefRefPtr<CefCallback> &callback) : _callback(callback)
{
}
!CefCallbackWrapper()
{
_callback = NULL;
}
~CefCallbackWrapper()
{
this->!CefCallbackWrapper();
}
virtual void Cancel()
{
if (this == nullptr)
{
return;
}
_callback->Cancel();
delete this;
}
virtual void Continue()
{
if (this == nullptr)
{
return;
}
_callback->Continue();
delete this;
}
};
}
|
// Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include\cef_callback.h"
namespace CefSharp
{
public ref class CefCallbackWrapper : public ICallback
{
private:
MCefRefPtr<CefCallback> _callback;
public:
CefCallbackWrapper(CefRefPtr<CefCallback> &callback) : _callback(callback)
{
}
!CefCallbackWrapper()
{
_callback = NULL;
}
~CefCallbackWrapper()
{
this->!CefCallbackWrapper();
}
virtual void Cancel()
{
if (_callback.get() == nullptr)
{
return;
}
_callback->Cancel();
delete this;
}
virtual void Continue()
{
if (_callback.get() == nullptr)
{
return;
}
_callback->Continue();
delete this;
}
};
}
|
Use MCefRefPtr::get() to check for null reference
|
Use MCefRefPtr::get() to check for null reference
|
C
|
bsd-3-clause
|
haozhouxu/CefSharp,zhangjingpu/CefSharp,VioletLife/CefSharp,gregmartinhtc/CefSharp,Livit/CefSharp,wangzheng888520/CefSharp,joshvera/CefSharp,yoder/CefSharp,gregmartinhtc/CefSharp,AJDev77/CefSharp,haozhouxu/CefSharp,zhangjingpu/CefSharp,twxstar/CefSharp,windygu/CefSharp,Haraguroicha/CefSharp,AJDev77/CefSharp,yoder/CefSharp,zhangjingpu/CefSharp,ITGlobal/CefSharp,haozhouxu/CefSharp,ruisebastiao/CefSharp,twxstar/CefSharp,dga711/CefSharp,battewr/CefSharp,zhangjingpu/CefSharp,battewr/CefSharp,battewr/CefSharp,rlmcneary2/CefSharp,ruisebastiao/CefSharp,ruisebastiao/CefSharp,AJDev77/CefSharp,Livit/CefSharp,VioletLife/CefSharp,Livit/CefSharp,illfang/CefSharp,dga711/CefSharp,Haraguroicha/CefSharp,wangzheng888520/CefSharp,joshvera/CefSharp,joshvera/CefSharp,rlmcneary2/CefSharp,jamespearce2006/CefSharp,haozhouxu/CefSharp,twxstar/CefSharp,illfang/CefSharp,dga711/CefSharp,wangzheng888520/CefSharp,ruisebastiao/CefSharp,jamespearce2006/CefSharp,windygu/CefSharp,gregmartinhtc/CefSharp,VioletLife/CefSharp,Haraguroicha/CefSharp,jamespearce2006/CefSharp,wangzheng888520/CefSharp,yoder/CefSharp,jamespearce2006/CefSharp,NumbersInternational/CefSharp,rlmcneary2/CefSharp,illfang/CefSharp,joshvera/CefSharp,Haraguroicha/CefSharp,jamespearce2006/CefSharp,NumbersInternational/CefSharp,windygu/CefSharp,twxstar/CefSharp,VioletLife/CefSharp,gregmartinhtc/CefSharp,NumbersInternational/CefSharp,dga711/CefSharp,ITGlobal/CefSharp,ITGlobal/CefSharp,AJDev77/CefSharp,yoder/CefSharp,ITGlobal/CefSharp,rlmcneary2/CefSharp,windygu/CefSharp,Haraguroicha/CefSharp,illfang/CefSharp,NumbersInternational/CefSharp,Livit/CefSharp,battewr/CefSharp
|
31ef4104b26541707de078fd748f0cd80577e590
|
libredex/Util.h
|
libredex/Util.h
|
/**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#include <algorithm>
#include <memory>
#include <utility>
namespace std {
#if __cplusplus<201402L
// simple implementation of make_unique since C++11 doesn't have it available
// note that it doesn't work properly if T is an array type
template <typename T, typename... Args>
std::unique_ptr<T> make_unique(Args... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
#endif
}
/**
* Insert into the proper location in a sorted container.
*/
template <class Container, class T, class Compare>
void insert_sorted(Container& c, const T& e, Compare comp) {
c.insert(std::lower_bound(c.begin(), c.end(), e, comp), e);
}
|
/**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
#include <algorithm>
#include <memory>
#include <utility>
namespace std {
#if __cplusplus<201300L
// simple implementation of make_unique since C++11 doesn't have it available
// note that it doesn't work properly if T is an array type
template <typename T, typename... Args>
std::unique_ptr<T> make_unique(Args... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
#endif
}
/**
* Insert into the proper location in a sorted container.
*/
template <class Container, class T, class Compare>
void insert_sorted(Container& c, const T& e, Compare comp) {
c.insert(std::lower_bound(c.begin(), c.end(), e, comp), e);
}
|
Fix the `__cplusplus` gating for std::make_unique
|
Fix the `__cplusplus` gating for std::make_unique
Summary: Once we upgrade to gcc 4.9 and have `std::make_unique` redex chokes. Properly gate the definition of `std::make_unique` to the right compiler macro
Reviewed By: int3, satnam6502
Differential Revision: D3970944
fbshipit-source-id: 453bb43da0bfa5d3c61d38cd62cfb17b3983ce68
|
C
|
mit
|
facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex
|
acc490b880c0719f2f07fa724f9802a0cb402a12
|
include/cppoptlib/solver/gradientdescentsolver.h
|
include/cppoptlib/solver/gradientdescentsolver.h
|
// CppNumericalSolver
#ifndef GRADIENTDESCENTSOLVER_H_
#define GRADIENTDESCENTSOLVER_H_
#include <Eigen/Dense>
#include "isolver.h"
#include "../linesearch/morethuente.h"
namespace cppoptlib {
template<typename T>
class GradientDescentSolver : public ISolver<T, 1> {
public:
/**
* @brief minimize
* @details [long description]
*
* @param objFunc [description]
*/
void minimize(Problem<T> &objFunc, Vector<T> & x0) {
Vector<T> direction(x0.rows());
size_t iter = 0;
T gradNorm = 0;
do {
objFunc.gradient(x0, direction);
const T rate = MoreThuente<T, decltype(objFunc), 1>::linesearch(x0, -direction, objFunc) ;
x0 = x0 - rate * direction;
gradNorm = direction.template lpNorm<Eigen::Infinity>();
// std::cout << "iter: "<<iter<< " f = " << objFunc.value(x0) << " ||g||_inf "<<gradNorm << std::endl;
iter++;
} while ((gradNorm > this->settings_.gradTol) && (iter < this->settings_.maxIter));
}
};
} /* namespace cppoptlib */
#endif /* GRADIENTDESCENTSOLVER_H_ */
|
// CppNumericalSolver
#ifndef GRADIENTDESCENTSOLVER_H_
#define GRADIENTDESCENTSOLVER_H_
#include <Eigen/Dense>
#include "isolver.h"
#include "../linesearch/morethuente.h"
namespace cppoptlib {
template<typename T>
class GradientDescentSolver : public ISolver<T, 1> {
public:
/**
* @brief minimize
* @details [long description]
*
* @param objFunc [description]
*/
void minimize(Problem<T> &objFunc, Vector<T> & x0) {
Vector<T> direction(x0.rows());
size_t iter = 0;
T gradNorm = 0;
do {
objFunc.gradient(x0, direction);
const T rate = MoreThuente<T, decltype(objFunc), 1>::linesearch(x0, -direction, objFunc) ;
x0 = x0 - rate * direction;
objFunc.applyBounds(x0);
gradNorm = direction.template lpNorm<Eigen::Infinity>();
// std::cout << "iter: "<<iter<< " f = " << objFunc.value(x0) << " ||g||_inf "<<gradNorm << std::endl;
iter++;
} while ((gradNorm > this->settings_.gradTol) && (iter < this->settings_.maxIter));
}
};
} /* namespace cppoptlib */
#endif /* GRADIENTDESCENTSOLVER_H_ */
|
Apply box constraints in GriadientDescentSolver.
|
Apply box constraints in GriadientDescentSolver.
|
C
|
mit
|
jdumas/CppNumericalSolvers,jdumas/CppNumericalSolvers,jdumas/CppNumericalSolvers,jdumas/CppNumericalSolvers
|
b0fab27e4614b0d716561983d516d3b47b8f078f
|
include/cpr/curlholder.h
|
include/cpr/curlholder.h
|
#ifndef CPR_CURL_HOLDER_H
#define CPR_CURL_HOLDER_H
#include <memory>
#include <curl/curl.h>
namespace cpr {
struct CurlHolder {
CURL* handle;
struct curl_slist* chunk;
char error[CURL_ERROR_SIZE];
};
} // namespace cpr
#endif
|
#ifndef CPR_CURL_HOLDER_H
#define CPR_CURL_HOLDER_H
#include <memory>
#include <curl/curl.h>
namespace cpr {
struct CurlHolder {
CURL* handle;
struct curl_slist* chunk;
struct curl_httppost* formpost;
char error[CURL_ERROR_SIZE];
};
} // namespace cpr
#endif
|
Add formpost pointer in curl handle
|
Add formpost pointer in curl handle
|
C
|
mit
|
msuvajac/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr,msuvajac/cpr,whoshuu/cpr
|
8b9b074fcb831e16ff33062c1ad7065f00831341
|
src/include/common/config.h
|
src/include/common/config.h
|
//===----------------------------------------------------------------------===//
//
// Peloton
//
// config.h
//
// Identification: src/include/common/config.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//
#pragma once
#include <string>
namespace peloton {
class PelotonConfiguration {
public:
static void PrintHelp();
int GetPort() const;
void SetPort(const int port);
int GetMaxConnections() const;
void SetMaxConnections(const int max_connections);
std::string GetSocketFamily() const;
void SetSocketFamily(const std::string& socket_family);
protected:
// Peloton port
int port = 12345;
// Maximum number of connections
int max_connections = 64;
// Socket family (AF_UNIX, AF_INET)
std::string socket_family = "AF_INET";
};
} // End peloton namespace
|
//===----------------------------------------------------------------------===//
//
// Peloton
//
// config.h
//
// Identification: src/include/common/config.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//
#pragma once
#include <string>
namespace peloton {
class PelotonConfiguration {
public:
static void PrintHelp();
int GetPort() const;
void SetPort(const int port);
int GetMaxConnections() const;
void SetMaxConnections(const int max_connections);
std::string GetSocketFamily() const;
void SetSocketFamily(const std::string& socket_family);
protected:
// Peloton port
int port = 5432;
// Maximum number of connections
int max_connections = 64;
// Socket family (AF_UNIX, AF_INET)
std::string socket_family = "AF_INET";
};
} // End peloton namespace
|
Change default port number 5432
|
Change default port number 5432
|
C
|
apache-2.0
|
wangziqi2016/peloton,malin1993ml/peloton,eric-haibin-lin/peloton-1,prashasthip/peloton,AngLi-Leon/peloton,apavlo/peloton,seojungmin/peloton,jessesleeping/iso_peloton,AllisonWang/peloton,apavlo/peloton,seojungmin/peloton,seojungmin/peloton,yingjunwu/peloton,wangziqi2016/peloton,jessesleeping/iso_peloton,malin1993ml/peloton,apavlo/peloton,AngLi-Leon/peloton,vittvolt/15721-peloton,cmu-db/peloton,AllisonWang/peloton,phisiart/peloton-p3,prashasthip/peloton,jessesleeping/iso_peloton,yingjunwu/peloton,yingjunwu/peloton,malin1993ml/peloton,cmu-db/peloton,AngLi-Leon/peloton,apavlo/peloton,AllisonWang/peloton,prashasthip/peloton,PauloAmora/peloton,ShuxinLin/peloton,wangziqi2016/peloton,PauloAmora/peloton,haojin2/peloton,malin1993ml/peloton,prashasthip/peloton,vittvolt/peloton,jessesleeping/iso_peloton,vittvolt/15721-peloton,haojin2/peloton,vittvolt/peloton,vittvolt/15721-peloton,seojungmin/peloton,ShuxinLin/peloton,vittvolt/peloton,malin1993ml/peloton,seojungmin/peloton,eric-haibin-lin/peloton-1,phisiart/peloton-p3,wangziqi2016/peloton,apavlo/peloton,prashasthip/peloton,AngLi-Leon/peloton,eric-haibin-lin/peloton-1,jessesleeping/iso_peloton,cmu-db/peloton,PauloAmora/peloton,cmu-db/peloton,PauloAmora/peloton,ShuxinLin/peloton,eric-haibin-lin/peloton-1,vittvolt/peloton,vittvolt/peloton,phisiart/peloton-p3,PauloAmora/peloton,AllisonWang/peloton,eric-haibin-lin/peloton-1,yingjunwu/peloton,ShuxinLin/peloton,cmu-db/peloton,AllisonWang/peloton,prashasthip/peloton,malin1993ml/peloton,yingjunwu/peloton,jessesleeping/iso_peloton,ShuxinLin/peloton,haojin2/peloton,yingjunwu/peloton,haojin2/peloton,wangziqi2016/peloton,apavlo/peloton,AllisonWang/peloton,seojungmin/peloton,phisiart/peloton-p3,phisiart/peloton-p3,PauloAmora/peloton,vittvolt/peloton,AngLi-Leon/peloton,ShuxinLin/peloton,haojin2/peloton,AngLi-Leon/peloton,jessesleeping/iso_peloton,wangziqi2016/peloton,phisiart/peloton-p3,cmu-db/peloton,eric-haibin-lin/peloton-1,vittvolt/15721-peloton,vittvolt/15721-peloton,vittvolt/15721-peloton,haojin2/peloton
|
aa6cb15c3969e2f711e98c3f3012efbe0679d87e
|
src/lms7002m/mcu_programs.h
|
src/lms7002m/mcu_programs.h
|
#ifndef LMS7_MCU_PROGRAMS_H
#define LMS7_MCU_PROGRAMS_H
#include "LimeSuiteConfig.h"
#include <stdint.h>
#define MCU_PROGRAM_SIZE 16384
#define MCU_ID_DC_IQ_CALIBRATIONS 0x01
#define MCU_ID_CALIBRATIONS_SINGLE_IMAGE 0x05
#define MCU_FUNCTION_CALIBRATE_TX 1
#define MCU_FUNCTION_CALIBRATE_RX 2
#define MCU_FUNCTION_UPDATE_BW 3
#define MCU_FUNCTION_UPDATE_REF_CLK 4
#define MCU_FUNCTION_TUNE_TX_FILTER 5
#define MCU_FUNCTION_TUNE_RX_FILTER 6
#define MCU_FUNCTION_UPDATE_EXT_LOOPBACK_PAIR 9
#define MCU_FUNCTION_CALIBRATE_TX_EXTLOOPB 17
#define MCU_FUNCTION_CALIBRATE_RX_EXTLOOPB 18
#define MCU_FUNCTION_AGC 10
#define MCU_FUNCTION_GET_PROGRAM_ID 255
LIME_API extern const uint8_t mcu_program_lms7_dc_iq_calibration_bin[16384];
#endif
|
#ifndef LMS7_MCU_PROGRAMS_H
#define LMS7_MCU_PROGRAMS_H
#include "LimeSuiteConfig.h"
#include <stdint.h>
#define MCU_PROGRAM_SIZE 16384
#define MCU_ID_DC_IQ_CALIBRATIONS 0x01
#define MCU_ID_CALIBRATIONS_SINGLE_IMAGE 0x05
#define MCU_FUNCTION_CALIBRATE_TX 1
#define MCU_FUNCTION_CALIBRATE_RX 2
#define MCU_FUNCTION_UPDATE_BW 3
#define MCU_FUNCTION_UPDATE_REF_CLK 4
#define MCU_FUNCTION_TUNE_RX_FILTER 5
#define MCU_FUNCTION_TUNE_TX_FILTER 6
#define MCU_FUNCTION_UPDATE_EXT_LOOPBACK_PAIR 9
#define MCU_FUNCTION_CALIBRATE_TX_EXTLOOPB 17
#define MCU_FUNCTION_CALIBRATE_RX_EXTLOOPB 18
#define MCU_FUNCTION_AGC 10
#define MCU_FUNCTION_GET_PROGRAM_ID 255
LIME_API extern const uint8_t mcu_program_lms7_dc_iq_calibration_bin[16384];
#endif
|
Fix MCU procedure ID definitions.
|
Fix MCU procedure ID definitions.
|
C
|
apache-2.0
|
myriadrf/LimeSuite,myriadrf/LimeSuite,myriadrf/LimeSuite,myriadrf/LimeSuite,myriadrf/LimeSuite
|
a703dbcdce9b95fc4a6ae294b03a5a8707b16f4d
|
test/Driver/response-file-extra-whitespace.c
|
test/Driver/response-file-extra-whitespace.c
|
// Check that clang is able to process response files with extra whitespace.
// We generate a dos-style file with \r\n for line endings, and then split
// some joined arguments (like "-x c") across lines to ensure that regular
// clang (not clang-cl) can process it correctly.
//
// RUN: echo -en "-x\r\nc\r\n-DTEST\r\n" > %t.0.txt
// RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT
// SHORT: extern int it_works;
#ifdef TEST
extern int it_works;
#endif
|
// Check that clang is able to process response files with extra whitespace.
// We generate a dos-style file with \r\n for line endings, and then split
// some joined arguments (like "-x c") across lines to ensure that regular
// clang (not clang-cl) can process it correctly.
//
// RUN: printf " -x\r\nc\r\n-DTEST\r\n" > %t.0.txt
// RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT
// SHORT: extern int it_works;
#ifdef TEST
extern int it_works;
#endif
|
Use printf instead of "echo -ne".
|
Use printf instead of "echo -ne".
Not all echo commands support "-e".
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@285162 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
|
8418da4072b1579a7b51c13468bc36d0c2335255
|
src/condor_ckpt/machdep.h
|
src/condor_ckpt/machdep.h
|
#if defined(ULTRIX42)
extern "C" int brk( void * );
extern "C" void *sbrk( int );
typedef void (*SIG_HANDLER)();
#elif defined(ULTRIX43)
extern "C" char *brk( char * );
extern "C" char *sbrk( int );
typedef void (*SIG_HANDLER)();
#elif defined(SUNOS41)
extern "C" int brk( void * );
extern "C" void *sbrk( int );
typedef void (*SIG_HANDLER)();
#elif defined(OSF1)
extern "C" int brk( void * );
# include <sys/types.h>
extern "C" void *sbrk( ssize_t );
typedef void (*SIG_HANDLER)( int );
#elif defined(HPUX9)
extern "C" int brk( const void * );
extern "C" void *sbrk( int );
# include <signal.h>
typedef void (*SIG_HANDLER)( __harg );
#else
# error UNKNOWN PLATFORM
#endif
|
#if defined(ULTRIX42)
extern "C" int brk( void * );
extern "C" void *sbrk( int );
typedef void (*SIG_HANDLER)();
#elif defined(ULTRIX43)
extern "C" char *brk( char * );
extern "C" char *sbrk( int );
typedef void (*SIG_HANDLER)();
#elif defined(SUNOS41)
extern "C" int brk( void * );
extern "C" void *sbrk( int );
typedef void (*SIG_HANDLER)();
#elif defined(OSF1)
extern "C" int brk( void * );
# include <sys/types.h>
extern "C" void *sbrk( ssize_t );
typedef void (*SIG_HANDLER)( int );
#elif defined(HPUX9)
extern "C" int brk( const void * );
extern "C" void *sbrk( int );
# include <signal.h>
typedef void (*SIG_HANDLER)( __harg );
#elif defined(AIX32)
extern "C" int brk( void * );
extern "C" void *sbrk( int );
typedef void (*SIG_HANDLER)( int );
#else
# error UNKNOWN PLATFORM
#endif
|
Add definitions for AIX 3.2.
|
Add definitions for AIX 3.2.
|
C
|
apache-2.0
|
bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/condor,mambelli/osg-bosco-marco,djw8605/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/condor,neurodebian/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,clalancette/condor-dcloud,htcondor/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,djw8605/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,djw8605/condor,djw8605/condor,djw8605/htcondor,neurodebian/htcondor,djw8605/htcondor,djw8605/condor,bbockelm/condor-network-accounting,djw8605/condor,djw8605/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,htcondor/htcondor,djw8605/htcondor,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/condor,htcondor/htcondor,clalancette/condor-dcloud
|
84cfb518f0b28578c264ee27f76c9c4003c12040
|
windows.h
|
windows.h
|
/*
This is part of pyahocorasick Python module.
Windows declarations
Author : Wojciech Muła, wojciech_mula@poczta.onet.pl
WWW : http://0x80.pl
License : BSD-3-Clause (see LICENSE)
*/
#ifndef PYAHCORASICK_WINDOWS_H__
#define PYAHCORASICK_WINDOWS_H__
typedef unsigned char uint8_t;
typedef short unsigned int uint16_t;
#define PY_OBJECT_HEAD_INIT PyVarObject_HEAD_INIT(NULL, 0)
#endif
|
/*
This is part of pyahocorasick Python module.
Windows declarations
Author : Wojciech Muła, wojciech_mula@poczta.onet.pl
WWW : http://0x80.pl
License : BSD-3-Clause (see LICENSE)
*/
#ifndef PYAHCORASICK_WINDOWS_H__
#define PYAHCORASICK_WINDOWS_H__
typedef unsigned char uint8_t;
typedef short unsigned int uint16_t;
typedef unsigned int uint32_t;
#define PY_OBJECT_HEAD_INIT PyVarObject_HEAD_INIT(NULL, 0)
#endif
|
Add custom def for uint32_t
|
Add custom def for uint32_t
|
C
|
bsd-3-clause
|
pombredanne/pyahocorasick,WojciechMula/pyahocorasick,WojciechMula/pyahocorasick,WojciechMula/pyahocorasick,woakesd/pyahocorasick,pombredanne/pyahocorasick,woakesd/pyahocorasick,pombredanne/pyahocorasick,WojciechMula/pyahocorasick,pombredanne/pyahocorasick
|
55e3f242fddf4256c96878167d432e176b9650c8
|
source/common/math.h
|
source/common/math.h
|
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef MATH_H
#define MATH_H
namespace Common {
template<typename T>
inline T Min(const T& a, const T& b) {
return a < b ? a : b;
}
template<typename T>
inline T Max(const T& a, const T& b) {
return a > b ? a : b;
}
template<typename T>
inline T Lerp(const T& a, const T& b, float t) {
return a + (b - a)*t;
}
template<typename T>
inline T Clamp(const T& x, const T& low, const T& high) {
return x < low ? low : (x > high ? high : x);
}
} // End of namespace Common
#endif // MATHHELPER_H
|
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef MATH_H
#define MATH_H
#include "common/halfling_sys.h"
namespace Common {
template<typename T>
inline T Min(const T& a, const T& b) {
return a < b ? a : b;
}
template<typename T>
inline T Max(const T& a, const T& b) {
return a > b ? a : b;
}
template<typename T>
inline T Lerp(const T& a, const T& b, float t) {
return a + (b - a)*t;
}
template<typename T>
inline T Clamp(const T& x, const T& low, const T& high) {
return x < low ? low : (x > high ? high : x);
}
// Returns random float in [0, 1).
static float RandF() {
return (float)(rand()) / (float)RAND_MAX;
}
// Returns random float in [a, b).
static float RandF(float a, float b) {
return a + RandF()*(b - a);
}
} // End of namespace Common
#endif // MATHHELPER_H
|
Create helper functions for creating random floats
|
COMMON: Create helper functions for creating random floats
|
C
|
apache-2.0
|
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
|
e95f31e37ff53c7030e335d58c484e30514a4805
|
libs/minzip/inline_magic.h
|
libs/minzip/inline_magic.h
|
/*
* Copyright (C) 2007 The Android Open Source Project
*
* 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, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINZIP_INLINE_MAGIC_H_
#define MINZIP_INLINE_MAGIC_H_
#ifndef MINZIP_GENERATE_INLINES
#define INLINE extern __inline__
#else
#define INLINE
#endif
#endif // MINZIP_INLINE_MAGIC_H_
|
/*
* Copyright (C) 2007 The Android Open Source Project
*
* 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, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINZIP_INLINE_MAGIC_H_
#define MINZIP_INLINE_MAGIC_H_
#ifndef MINZIP_GENERATE_INLINES
#define INLINE extern inline __attribute((__gnu_inline__))
#else
#define INLINE
#endif
#endif // MINZIP_INLINE_MAGIC_H_
|
Fix multiple defined symbol errors
|
Fix multiple defined symbol errors
Use of __inline__ by projects in bootable/* was causing problems with
clang. Following the BKM and replaced use of __inline__ with
__attribute((__gnu_inline)).
Change-Id: If4ccfded685bb2c9d9c23c9b92ee052208399ef0
Author: Edwin Vane <7f62528bc61ebf7c7c86be496bd30af8ee2167eb@intel.com>
Reviewed-by: Kevin P Schoedel <cdf9367a449e45c006fd634227f1832949f6c2a4@intel.com>
|
C
|
apache-2.0
|
M1cha/libaroma,M1cha/libaroma,amarullz/libaroma,ProjectOpenCannibal/libaroma,M1cha/libaroma,amarullz/libaroma,ProjectOpenCannibal/libaroma,ProjectOpenCannibal/libaroma,M1cha/libaroma,amarullz/libaroma,amarullz/libaroma,M1cha/libaroma,amarullz/libaroma,ProjectOpenCannibal/libaroma,ProjectOpenCannibal/libaroma,M1cha/libaroma,ProjectOpenCannibal/libaroma,amarullz/libaroma,amarullz/libaroma,ProjectOpenCannibal/libaroma,M1cha/libaroma,amarullz/libaroma,amarullz/libaroma
|
3ddd22e1ade2716f96439e7d1e3b044217c44b2a
|
src/adts/adts_list.h
|
src/adts/adts_list.h
|
#ifndef _H_ADTS_LIST
#define _H_ADTS_LIST
#include <string.h>
#include <stdbool.h>
#include <inttypes.h>
/**
**************************************************************************
* \details
*
**************************************************************************
*/
#define ADTS_LIST_BYTES (32)
#define ADTS_LIST_ELEM_BYTES (32)
/**
**************************************************************************
* \details
*
**************************************************************************
*/
typedef struct {
char reserved[ ADTS_LIST_BYTES ];
} adts_list_t;
typedef struct {
char reserved[ ADTS_LIST_ELEM_BYTES ];
} adts_list_elem_t;
void
utest_adts_list( void );
#endif /* _H_ADTS_LIST */
|
#ifndef _H_ADTS_LIST
#define _H_ADTS_LIST
#include <string.h>
#include <stdbool.h>
#include <inttypes.h>
/**
**************************************************************************
* \details
*
**************************************************************************
*/
#define ADTS_LIST_BYTES (32)
#define ADTS_LIST_ELEM_BYTES (32)
/**
**************************************************************************
* \details
*
**************************************************************************
*/
typedef struct {
const char reserved[ ADTS_LIST_BYTES ];
} adts_list_t;
typedef struct {
const char reserved[ ADTS_LIST_ELEM_BYTES ];
} adts_list_elem_t;
void
utest_adts_list( void );
#endif /* _H_ADTS_LIST */
|
Make list.h non-modifiabe in ADT
|
Make list.h non-modifiabe in ADT
|
C
|
mit
|
78613/sample,78613/sample
|
c3900001475664339b0d3c5d63576c190e432d27
|
src/condor_c++_util/url_condor.h
|
src/condor_c++_util/url_condor.h
|
#if !defined(_URL_CONDOR_H)
#define _URL_CONDOR_H
#include <sys/types.h>
#include <limits.h>
#include "machdep.h"
typedef int (*open_function_type)(const char *, int, size_t);
class URLProtocol {
public:
URLProtocol(char *protocol_key, char *protocol_name,
open_function_type protocol_open_func);
/* int (*protocol_open_func)(const char *, int, size_t)); */
~URLProtocol();
char *get_key() { return key; }
char *get_name() { return name; }
int call_open_func(const char *fname, int flags, size_t n_bytes)
{ return open_func( fname, flags, n_bytes); }
URLProtocol *get_next() { return next; }
void init() { }
private:
char *key;
char *name;
open_function_type open_func;
/* int (*open_func)(const char *, int, size_t); */
URLProtocol *next;
};
URLProtocol *FindProtocolByKey(const char *key);
extern "C" int open_url( const char *name, int flags, size_t n_bytes );
#endif
|
#if !defined(_URL_CONDOR_H)
#define _URL_CONDOR_H
#include <sys/types.h>
#include <limits.h>
typedef int (*open_function_type)(const char *, int, size_t);
class URLProtocol {
public:
URLProtocol(char *protocol_key, char *protocol_name,
open_function_type protocol_open_func);
/* int (*protocol_open_func)(const char *, int, size_t)); */
~URLProtocol();
char *get_key() { return key; }
char *get_name() { return name; }
int call_open_func(const char *fname, int flags, size_t n_bytes)
{ return open_func( fname, flags, n_bytes); }
URLProtocol *get_next() { return next; }
void init() { }
private:
char *key;
char *name;
open_function_type open_func;
/* int (*open_func)(const char *, int, size_t); */
URLProtocol *next;
};
URLProtocol *FindProtocolByKey(const char *key);
extern "C" int open_url( const char *name, int flags, size_t n_bytes );
#endif
|
Remove the include of machdep.h which didn't need to be there, and didn't work on Solaris.
|
Remove the include of machdep.h which didn't need to be there, and didn't
work on Solaris.
|
C
|
apache-2.0
|
htcondor/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,bbockelm/condor-network-accounting,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/htcondor,htcondor/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,clalancette/condor-dcloud,mambelli/osg-bosco-marco,djw8605/condor,mambelli/osg-bosco-marco,htcondor/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,zhangzhehust/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,djw8605/condor,djw8605/htcondor,djw8605/htcondor,neurodebian/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,djw8605/condor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/condor,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/condor,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,clalancette/condor-dcloud,bbockelm/condor-network-accounting,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/condor,zhangzhehust/htcondor,zhangzhehust/htcondor,djw8605/htcondor,djw8605/htcondor
|
94a124ba3e39903511d1a5fb4dc5a50b0e9c1f1f
|
stromx/runtime/Locale.h
|
stromx/runtime/Locale.h
|
/*
* Copyright 2014 Matthias Fuchs
*
* 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, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef STROMX_RUNTIME_LOCALE_H
#define STROMX_RUNTIME_LOCALE_H
#include <locale>
#define L_(id) stromx::runtime::Locale::gettext(id, locale)
namespace stromx
{
namespace runtime
{
extern std::locale locale;
class Locale
{
public:
static std::string gettext(const char* const id, const std::locale & locale);
static std::locale generate(const char* const path, const char* const domain);
};
}
}
#endif // STROMX_RUNTIME_LOCALE_H
|
/*
* Copyright 2014 Matthias Fuchs
*
* 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, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef STROMX_RUNTIME_LOCALE_H
#define STROMX_RUNTIME_LOCALE_H
#include <locale>
#include "stromx/runtime/Config.h"
#define L_(id) stromx::runtime::Locale::gettext(id, locale)
namespace stromx
{
namespace runtime
{
extern std::locale locale;
class STROMX_RUNTIME_API Locale
{
public:
static std::string gettext(const char* const id, const std::locale & locale);
static std::locale generate(const char* const path, const char* const domain);
};
}
}
#endif // STROMX_RUNTIME_LOCALE_H
|
Make runtime locale API available on windows
|
Make runtime locale API available on windows
|
C
|
apache-2.0
|
sparsebase/stromx,uboot/stromx,uboot/stromx,sparsebase/stromx
|
c09b7287e3768a54a51dd1d64bf949ba7e2e24e4
|
include/clang/Basic/Stack.h
|
include/clang/Basic/Stack.h
|
//===--- Stack.h - Utilities for dealing with stack space -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Defines utilities for dealing with stack allocation and stack space.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_BASIC_STACK_H
#define LLVM_CLANG_BASIC_STACK_H
namespace clang {
/// The amount of stack space that Clang would like to be provided with.
/// If less than this much is available, we may be unable to reach our
/// template instantiation depth limit and other similar limits.
constexpr size_t DesiredStackSize = 8 << 20;
} // end namespace clang
#endif // LLVM_CLANG_BASIC_STACK_H
|
//===--- Stack.h - Utilities for dealing with stack space -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Defines utilities for dealing with stack allocation and stack space.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_BASIC_STACK_H
#define LLVM_CLANG_BASIC_STACK_H
#include <cstddef>
namespace clang {
/// The amount of stack space that Clang would like to be provided with.
/// If less than this much is available, we may be unable to reach our
/// template instantiation depth limit and other similar limits.
constexpr size_t DesiredStackSize = 8 << 20;
} // end namespace clang
#endif // LLVM_CLANG_BASIC_STACK_H
|
Add missing include for size_t
|
Add missing include for size_t
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@336261 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
7bc5ce4a79c61ab7238b188f9af48f41ff1392f9
|
fuzz/fuzzer.h
|
fuzz/fuzzer.h
|
/*
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 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
* https://www.openssl.org/source/license.html
* or in the file LICENSE in the source distribution.
*/
#include <stdint.h> /* for uint8_t */
#include <stddef.h> /* for size_t */
int FuzzerTestOneInput(const uint8_t *buf, size_t len);
int FuzzerInitialize(int *argc, char ***argv);
void FuzzerCleanup(void);
void FuzzerSetRand(void);
void FuzzerClearRand(void);
|
/*
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 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
* https://www.openssl.org/source/license.html
* or in the file LICENSE in the source distribution.
*/
#include <stddef.h> /* for size_t */
#include <openssl/e_os2.h> /* for uint8_t */
int FuzzerTestOneInput(const uint8_t *buf, size_t len);
int FuzzerInitialize(int *argc, char ***argv);
void FuzzerCleanup(void);
void FuzzerSetRand(void);
void FuzzerClearRand(void);
|
Use <openssl/e_os2.h> rather than <stdint.h>
|
Use <openssl/e_os2.h> rather than <stdint.h>
<stdint.h> is C99, which means that on older compiler, it can't be included.
We have code in <openssl/e_os2.h> that compensates.
Reviewed-by: Matt Caswell <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@openssl.org>
Reviewed-by: Tomas Mraz <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19697)
|
C
|
apache-2.0
|
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl
|
b83bb1cc7a748158a3d969d09262f5016bd3dee5
|
reboot.c
|
reboot.c
|
#include "defs.h"
#include "xlat/bootflags1.h"
#include "xlat/bootflags2.h"
#include "xlat/bootflags3.h"
SYS_FUNC(reboot)
{
printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
tprints(", ");
printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
tprints(", ");
printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
if (tcp->u_arg[2] == (long) LINUX_REBOOT_CMD_RESTART2) {
tprints(", ");
printstr(tcp, tcp->u_arg[3], -1);
}
return RVAL_DECODED;
}
|
#include "defs.h"
#include "xlat/bootflags1.h"
#include "xlat/bootflags2.h"
#include "xlat/bootflags3.h"
SYS_FUNC(reboot)
{
const unsigned int magic1 = tcp->u_arg[0];
const unsigned int magic2 = tcp->u_arg[1];
const unsigned int cmd = tcp->u_arg[2];
printflags(bootflags1, magic1, "LINUX_REBOOT_MAGIC_???");
tprints(", ");
printflags(bootflags2, magic2, "LINUX_REBOOT_MAGIC_???");
tprints(", ");
printflags(bootflags3, cmd, "LINUX_REBOOT_CMD_???");
if (cmd == LINUX_REBOOT_CMD_RESTART2) {
tprints(", ");
printstr(tcp, tcp->u_arg[3], -1);
}
return RVAL_DECODED;
}
|
Fix decoding of LINUX_REBOOT_CMD_RESTART2 argument
|
Fix decoding of LINUX_REBOOT_CMD_RESTART2 argument
* reboot.c (SYS_FUNC(reboot)): Cast numeric arguments to unsigned int.
|
C
|
bsd-3-clause
|
Saruta/strace,cuviper/strace,cuviper/strace,cuviper/strace,cuviper/strace,Saruta/strace,Saruta/strace,Saruta/strace,Saruta/strace,cuviper/strace
|
09f760a42b52975948e9c92acb3506295a3e783d
|
tools/minigame/minigame.c
|
tools/minigame/minigame.c
|
#include <mruby.h>
#include <mruby/compile.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char **argv)
{
mrb_state *mrb;
mrbc_context *c;
mrb_value v;
FILE *fp;
fp = fopen("init_minigame.rb", "rb");
if (fp == NULL) {
fputs("Couldn't load 'init_minigame.rb'", stderr);
return EXIT_FAILURE;
}
mrb = mrb_open();
if (mrb == NULL) {
fputs("Invalid mrb_state, exiting mruby", stderr);
return EXIT_FAILURE;
}
c = mrbc_context_new(mrb);
v = mrb_load_file_cxt(mrb, fp, c);
fclose(fp);
mrbc_context_free(mrb, c);
if (mrb->exc && !mrb_undef_p(v)) mrb_print_error(mrb);
return EXIT_SUCCESS;
}
|
#include <mruby.h>
#include <mruby/compile.h>
#include <windows.h>
#include <stdlib.h>
#include <stdlib.h>
#ifdef _WIN32
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
#else
int
main(int argc, char **argv)
#endif
{
mrb_state *mrb;
mrbc_context *c;
mrb_value v;
FILE *fp;
fp = fopen("init_minigame.rb", "rb");
if (fp == NULL) {
fputs("Couldn't load 'init_minigame.rb'", stderr);
return EXIT_FAILURE;
}
mrb = mrb_open();
if (mrb == NULL) {
fputs("Invalid mrb_state, exiting mruby", stderr);
return EXIT_FAILURE;
}
c = mrbc_context_new(mrb);
v = mrb_load_file_cxt(mrb, fp, c);
fclose(fp);
mrbc_context_free(mrb, c);
if (mrb->exc && !mrb_undef_p(v)) mrb_print_error(mrb);
return EXIT_SUCCESS;
}
|
Add WinMain for windows platform
|
Add WinMain for windows platform
|
C
|
mit
|
bggd/mruby-minigame,bggd/mruby-minigame
|
57e4785123d830cfaa827474485596c9943cd2ae
|
test/CFrontend/2007-08-22-CTTZ.c
|
test/CFrontend/2007-08-22-CTTZ.c
|
// RUN: %llvmgcc -O2 -S -o - -emit-llvm %s | grep {llvm.cttz.i64} | count 1
// RUN: %llvmgcc -O2 -S -o - -emit-llvm %s | not grep {lshr}
int bork(unsigned long long x) {
return __builtin_ctzll(x);
}
|
// RUN: %llvmgcc -O2 -S -o - %s | grep {llvm.cttz.i64} | count 2
// RUN: %llvmgcc -O2 -S -o - %s | not grep {lshr}
int bork(unsigned long long x) {
return __builtin_ctzll(x);
}
|
Fix this testcase: there are two matches for llvm.cttz.i64 because of the declaration of the intrinsic. Also, emit-llvm is automatic and doesn't need to be specified.
|
Fix this testcase: there are two matches for
llvm.cttz.i64 because of the declaration of
the intrinsic. Also, emit-llvm is automatic
and doesn't need to be specified.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@41326 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.