commit
stringlengths 40
40
| old_file
stringlengths 4
112
| new_file
stringlengths 4
112
| old_contents
stringlengths 0
2.05k
| new_contents
stringlengths 28
3.9k
| subject
stringlengths 17
736
| message
stringlengths 18
4.78k
| lang
stringclasses 1
value | license
stringclasses 13
values | repos
stringlengths 7
111k
|
---|---|---|---|---|---|---|---|---|---|
1b0055bb70f3d1a0650f25b53c68b9984414ed87 | examples/double-check.c | examples/double-check.c | #include "rmc.h"
struct mutex_t;
struct foo_t;
typedef struct mutex_t mutex_t;
typedef struct foo_t foo_t;
extern void mutex_lock(mutex_t *p);
extern void mutex_unlock(mutex_t *p);
extern foo_t *new_foo(void);
extern mutex_t *foo_lock;
foo_t *get_foo(void) {
static foo_t *single_foo = 0;
XEDGE(read, post);
VEDGE(construct, update);
L(read, foo_t *r = single_foo);
if (r != 0) return r;
mutex_lock(foo_lock);
L(read, r = single_foo);
if (r == 0) {
L(construct, r = new_foo());
L(update, single_foo = r);
}
mutex_unlock(foo_lock);
return r;
}
| Add a double check locking example | Add a double check locking example
| C | mit | msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler |
|
1c48d320cbd3c0789d4bdf4039f2d4188a3087b9 | src/utils/cuda_helper.h | src/utils/cuda_helper.h | #ifndef SRC_UTILS_CUDA_HELPER_H_
#define SRC_UTILS_CUDA_HELPER_H_
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
static void HandleError(cudaError_t err, const char *file, int line)
{
if (err != cudaSuccess)
{
printf("%s in %s at line %d\n", cudaGetErrorString(err), file, line);
exit(EXIT_FAILURE);
}
}
#define HANDLE_ERROR(err) (HandleError(err, __FILE__, __LINE__))
#define HANDLE_NULL(a) \
{ \
if (a == NULL) \
{ \
printf("Host memory failed in %s at line %d\n", __FILE__, __LINE__); \
exit(EXIT_FAILURE); \
} \
}
#endif // SRC_UTILS_CUDA_HELPER_H_
| #ifndef SRC_UTILS_CUDA_HELPER_H_
#define SRC_UTILS_CUDA_HELPER_H_
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
#include <stdexcept>
static void HandleError(cudaError_t error, const char *file, int line)
{
if (error != cudaSuccess)
{
printf("%s in %s at line %d\n", cudaGetErrorString(error), file, line);
throw std::runtime_error(cudaGetErrorString(error));
}
}
#define HANDLE_ERROR(error) (HandleError(error, __FILE__, __LINE__))
#define HANDLE_NULL(a) \
{ \
if (a == NULL) \
{ \
printf("Host memory failed in %s at line %d\n", __FILE__, __LINE__); \
exit(EXIT_FAILURE); \
} \
}
#endif // SRC_UTILS_CUDA_HELPER_H_
| Throw exception on cuda error to get a stack trace. | Throw exception on cuda error to get a stack trace.
| C | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
be22d2f84576fc2ff93aea23da44d004529d84d5 | tests/regression/13-privatized/57-singlethreaded-unlock.c | tests/regression/13-privatized/57-singlethreaded-unlock.c | #include <pthread.h>
#include <assert.h>
int g = 0;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
// just for going to multithreaded mode
return NULL;
}
int main() {
pthread_mutex_lock(&A);
g = 1;
pthread_mutex_unlock(&A); // singlethreaded mode unlock
g = 2;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
assert(g == 2);
return 0;
}
| Add regression test (based on ctrace_comb) where singlethreaded mode unlock causes side effect with lazy-mine | Add regression test (based on ctrace_comb) where singlethreaded mode unlock causes side effect with lazy-mine
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
e6420a303bfdeeba04ec7b00367ef4474e96e5a3 | UIforETW/Version.h | UIforETW/Version.h | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.52f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// increment that won't trigger the new-version checks, handy for minor
// releases that I don't want to bother users about.
//#define VERSION_SUFFIX 'b'
| #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.53f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// increment that won't trigger the new-version checks, handy for minor
// releases that I don't want to bother users about.
//#define VERSION_SUFFIX 'b'
| Increase version number to 1.53 | Increase version number to 1.53
| C | apache-2.0 | google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW |
f35ae9ff1a231a0db7e0046aedeece0b894a46b9 | src/kbase/basic_types.h | src/kbase/basic_types.h | /*
@ 0xCCCCCCCC
*/
#if defined(_MSC_VER)
#pragma once
#endif
#ifndef KBASE_BASIC_TYPES_H_
#define KBASE_BASIC_TYPES_H_
#include <cstdint>
#include <string>
// Defines types that would be shared by among several files.
namespace kbase {
// |PathKey| is used by |PathService| and |BasePathProvider|.
using PathKey = int;
using PathChar = wchar_t;
using PathString = std::basic_string<PathChar>;
using byte = uint8_t;
// Casts an enum value into an equivalent integer.
template<typename E>
constexpr auto enum_cast(E e)
{
return static_cast<std::underlying_type_t<E>>(e);
}
} // namespace kbase
#endif // KBASE_BASIC_TYPES_H_ | /*
@ 0xCCCCCCCC
*/
#if defined(_MSC_VER)
#pragma once
#endif
#ifndef KBASE_BASIC_TYPES_H_
#define KBASE_BASIC_TYPES_H_
#include <cstdint>
#include <string>
#include "kbase/basic_macros.h"
// Defines types that would be shared by among several files.
namespace kbase {
// |PathKey| is used by |PathService| and |BasePathProvider|.
using PathKey = int;
#if defined(OS_WIN)
using PathChar = wchar_t;
#else
using PathChar = char;
#endif
using PathString = std::basic_string<PathChar>;
using byte = uint8_t;
// Casts an enum value into an equivalent integer.
template<typename E>
constexpr auto enum_cast(E e)
{
return static_cast<std::underlying_type_t<E>>(e);
}
} // namespace kbase
#endif // KBASE_BASIC_TYPES_H_ | Make PathChar compatible with other platform | Make PathChar compatible with other platform
| C | mit | kingsamchen/KBase,kingsamchen/KBase_Demo,kingsamchen/KBase,kingsamchen/KBase_Demo |
12335f0514a13e146f88c7ada3416d2ab99aa5a8 | include/parrot/stacks.h | include/parrot/stacks.h | /* stacks.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Stack handling routines for Parrot
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_STACKS_H_GUARD)
#define PARROT_STACKS_H_GUARD
#include "parrot/parrot.h"
#define STACK_CHUNK_DEPTH 256
struct Stack_Entry {
INTVAL entry_type;
INTVAL flags;
void (*cleanup)(struct Stack_Entry *);
union {
FLOATVAL num_val;
INTVAL int_val;
PMC *pmc_val;
STRING *string_val;
void *generic_pointer;
} entry;
};
struct Stack {
INTVAL used;
INTVAL free;
struct StackChunk *next;
struct StackChunk *prev;
struct Stack_Entry entry[STACK_CHUNK_DEPTH];
};
struct Stack_Entry *push_generic_entry(struct Perl_Interp *, void *thing, INTVAL type, void *cleanup);
void *pop_generic_entry(struct Perl_Interp *, void *where, INTVAL type);
void toss_geleric_entry(struct Perl_Interp *, INTVAL type);
#endif
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* vim: expandtab shiftwidth=4:
*/
| /* stacks.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Stack handling routines for Parrot
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_STACKS_H_GUARD)
#define PARROT_STACKS_H_GUARD
#include "parrot/parrot.h"
#define STACK_CHUNK_DEPTH 256
struct Stack_Entry {
INTVAL entry_type;
INTVAL flags;
void (*cleanup)(struct Stack_Entry *);
union {
FLOATVAL num_val;
INTVAL int_val;
PMC *pmc_val;
STRING *string_val;
void *generic_pointer;
} entry;
};
struct Stack {
INTVAL used;
INTVAL free;
struct StackChunk *next;
struct StackChunk *prev;
struct Stack_Entry entry[STACK_CHUNK_DEPTH];
};
struct Stack_Entry *push_generic_entry(struct Perl_Interp *, void *thing, INTVAL type, void *cleanup);
void *pop_generic_entry(struct Perl_Interp *, void *where, INTVAL type);
void toss_generic_entry(struct Perl_Interp *, INTVAL type);
#endif
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* vim: expandtab shiftwidth=4:
*/
| Fix typo in function name | Fix typo in function name
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@255 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| C | artistic-2.0 | FROGGS/parrot,parrot/parrot,youprofit/parrot,tewk/parrot-select,youprofit/parrot,tewk/parrot-select,tkob/parrot,gagern/parrot,FROGGS/parrot,gagern/parrot,FROGGS/parrot,tewk/parrot-select,parrot/parrot,tkob/parrot,gagern/parrot,parrot/parrot,gitster/parrot,youprofit/parrot,tkob/parrot,tkob/parrot,tkob/parrot,gagern/parrot,tewk/parrot-select,gagern/parrot,gitster/parrot,parrot/parrot,tkob/parrot,tewk/parrot-select,fernandobrito/parrot,gagern/parrot,gagern/parrot,youprofit/parrot,youprofit/parrot,FROGGS/parrot,FROGGS/parrot,FROGGS/parrot,fernandobrito/parrot,gitster/parrot,gitster/parrot,tkob/parrot,fernandobrito/parrot,tewk/parrot-select,gitster/parrot,youprofit/parrot,fernandobrito/parrot,gitster/parrot,youprofit/parrot,fernandobrito/parrot,tkob/parrot,fernandobrito/parrot,parrot/parrot,fernandobrito/parrot,gitster/parrot,FROGGS/parrot,FROGGS/parrot,tewk/parrot-select,youprofit/parrot |
5b89216a3f55e7ad439beac105896ca881555b4f | proctitle.c | proctitle.c | #include <lua.h>
#include <lauxlib.h>
#include <string.h>
static char *
find_argv0(lua_State *L)
{
extern char *__progname;
return __progname;
}
static int
set_proctitle(lua_State *L)
{
const char *title = luaL_checkstring(L, 1);
char *argv0 = find_argv0(L);
// XXX no length check
strcpy(argv0, title);
return 0;
}
int
luaopen_proctitle(lua_State *L)
{
lua_pushcfunction(L, set_proctitle);
return 1;
}
| /*
* Copyright (c) 2015 Rob Hoelz <rob AT SIGN hoelz.ro>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <lua.h>
#include <lauxlib.h>
#include <string.h>
static char *
find_argv0(lua_State *L)
{
extern char *__progname;
return __progname;
}
static int
set_proctitle(lua_State *L)
{
const char *title = luaL_checkstring(L, 1);
char *argv0 = find_argv0(L);
// XXX no length check
strcpy(argv0, title);
return 0;
}
int
luaopen_proctitle(lua_State *L)
{
lua_pushcfunction(L, set_proctitle);
return 1;
}
| Add license header to source | Add license header to source
| C | mit | hoelzro/lua-proctitle |
1042c0104d33ab2a3a220ef5f91c9e225af8c080 | include/tcframe/type.h | include/tcframe/type.h | #ifndef TCFRAME_TYPE_H
#define TCFRAME_TYPE_H
#include <ostream>
#include <type_traits>
using std::enable_if;
using std::integral_constant;
using std::is_arithmetic;
using std::is_same;
using std::ostream;
using std::string;
namespace tcframe {
class Variable {
public:
virtual void printTo(ostream& out) = 0;
virtual ~Variable() { };
};
template<typename T>
using RequiresScalar = typename enable_if<integral_constant<bool, is_arithmetic<T>::value || is_same<string, T>::value>::value>::type;
template<typename T>
class Scalar : public Variable {
private:
T* value;
public:
explicit Scalar(T& value) {
this->value = &value;
}
void printTo(ostream& out) {
out << *value;
}
};
}
#endif
| #ifndef TCFRAME_TYPE_H
#define TCFRAME_TYPE_H
#include <ostream>
#include <type_traits>
using std::enable_if;
using std::integral_constant;
using std::is_arithmetic;
using std::is_same;
using std::ostream;
using std::string;
namespace tcframe {
class Variable {
public:
virtual void printTo(ostream& out) = 0;
virtual ~Variable() { };
};
template<typename T>
using RequiresScalar = typename enable_if<is_arithmetic<T>::value || is_same<string, T>::value>::type;
template<typename T>
class Scalar : public Variable {
private:
T* value;
public:
explicit Scalar(T& value) {
this->value = &value;
}
void printTo(ostream& out) {
out << *value;
}
};
}
#endif
| Simplify SFINAE expression for RequiresScalar | Simplify SFINAE expression for RequiresScalar
| C | mit | tcframe/tcframe,ia-toki/tcframe,fushar/tcframe,ia-toki/tcframe,tcframe/tcframe,fushar/tcframe |
458ca11952e77331db5bc4b9e9e8e3682e3b1de3 | lib/quagga/src/quagga.h | lib/quagga/src/quagga.h | /*
* OLSRd Quagga plugin
*
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <[email protected]>
* Copyright (C) 2007-2010 Vasilis Tsiligiannis <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation or - at your option - under
* the terms of the GNU General Public Licence version 2 but can be
* linked to any BSD-Licenced Software with public available sourcecode
*
*/
/* -------------------------------------------------------------------------
* File : quagga.h
* Description : header file for quagga.c
* ------------------------------------------------------------------------- */
#include "routing_table.h"
/* Zebra socket */
#ifndef ZEBRA_SOCKPATH
#define ZEBRA_SOCKPATH "/var/run/quagga/zserv.api"
#endif
/* Quagga plugin flags */
void zebra_init(void);
void zebra_fini(void);
int zebra_addroute(const struct rt_entry *);
int zebra_delroute(const struct rt_entry *);
void zebra_redistribute(uint16_t cmd);
/*
* Local Variables:
* c-basic-offset: 2
* indent-tabs-mode: nil
* End:
*/
| /*
* OLSRd Quagga plugin
*
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <[email protected]>
* Copyright (C) 2007-2012 Vasilis Tsiligiannis <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation or - at your option - under
* the terms of the GNU General Public Licence version 2 but can be
* linked to any BSD-Licenced Software with public available sourcecode
*
*/
/* -------------------------------------------------------------------------
* File : quagga.h
* Description : header file for quagga.c
* ------------------------------------------------------------------------- */
#include "routing_table.h"
/* Zebra socket */
#ifndef ZEBRA_SOCKPATH
#define ZEBRA_SOCKPATH "/var/run/quagga/zserv.api"
#endif
/* Quagga plugin flags */
void zebra_init(void);
void zebra_fini(void);
int zebra_addroute(const struct rt_entry *);
int zebra_delroute(const struct rt_entry *);
void zebra_redistribute(uint16_t cmd);
void zebra_hello(uint16_t cmd);
/*
* Local Variables:
* c-basic-offset: 2
* indent-tabs-mode: nil
* End:
*/
| Add missing declaration of zebra_hello() | Add missing declaration of zebra_hello()
| C | bsd-3-clause | diogomg/olsrd,zioproto/olsrd,ninuxorg/olsrd,diogomg/olsrd-binary-heap,acinonyx/olsrd,nolith/olsrd,diogomg/olsrd,zioproto/olsrd,tdz/olsrd,tdz/olsrd,servalproject/olsr,tdz/olsrd,acinonyx/olsrd,nolith/olsrd,ninuxorg/olsrd,diogomg/olsrd-binary-heap,ninuxorg/olsrd,acinonyx/olsrd,duydb2/olsr,diogomg/olsrd,cholin/olsrd,diogomg/olsrd,diogomg/olsrd,sebkur/olsrd,sebkur/olsrd,diogomg/olsrd-binary-heap,nolith/olsrd,cholin/olsrd,duydb2/olsr,duydb2/olsr,diogomg/olsrd-binary-heap,diogomg/olsrd,diogomg/olsrd-binary-heap,acinonyx/olsrd,nolith/olsrd,cholin/olsrd,sebkur/olsrd,ninuxorg/olsrd,servalproject/olsr,sebkur/olsrd,servalproject/olsr,servalproject/olsr,sebkur/olsrd,duydb2/olsr,servalproject/olsr,cholin/olsrd,tdz/olsrd,cholin/olsrd,zioproto/olsrd,diogomg/olsrd-binary-heap,sebkur/olsrd,duydb2/olsr,diogomg/olsrd,duydb2/olsr,diogomg/olsrd-binary-heap,servalproject/olsr,nolith/olsrd,zioproto/olsrd,acinonyx/olsrd,zioproto/olsrd,ninuxorg/olsrd,duydb2/olsr,duydb2/olsr,tdz/olsrd |
6d99092c13cadd87fd123590fd29006d04648a2c | lib/System/Win32/Win32.h | lib/System/Win32/Win32.h | //===- Win32/Win32.h - Common Win32 Include File ----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines things specific to Win32 implementations.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
//=== WARNING: Implementation here must contain only generic Win32 code that
//=== is guaranteed to work on *all* Win32 variants.
//===----------------------------------------------------------------------===//
// Require at least Windows 2000 API.
#define _WIN32_WINNT 0x0500
#include "llvm/Config/config.h" // Get build system configuration settings
#include "windows.h"
#include <cassert>
#include <string>
inline bool MakeErrMsg(std::string* ErrMsg, const std::string& prefix) {
if (!ErrMsg)
return true;
char *buffer = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), 0, (LPSTR)&buffer, 1, NULL);
*ErrMsg = prefix + buffer;
LocalFree(buffer);
return true;
}
class AutoHandle {
HANDLE handle;
public:
AutoHandle(HANDLE h) : handle(h) {}
~AutoHandle() {
if (handle)
CloseHandle(handle);
}
operator HANDLE() {
return handle;
}
AutoHandle &operator=(HANDLE h) {
handle = h;
return *this;
}
};
| //===- Win32/Win32.h - Common Win32 Include File ----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines things specific to Win32 implementations.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
//=== WARNING: Implementation here must contain only generic Win32 code that
//=== is guaranteed to work on *all* Win32 variants.
//===----------------------------------------------------------------------===//
// Require at least Windows 2000 API.
#define _WIN32_WINNT 0x0500
#include "llvm/Config/config.h" // Get build system configuration settings
#include <Windows.h>
#include <cassert>
#include <string>
inline bool MakeErrMsg(std::string* ErrMsg, const std::string& prefix) {
if (!ErrMsg)
return true;
char *buffer = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), 0, (LPSTR)&buffer, 1, NULL);
*ErrMsg = prefix + buffer;
LocalFree(buffer);
return true;
}
class AutoHandle {
HANDLE handle;
public:
AutoHandle(HANDLE h) : handle(h) {}
~AutoHandle() {
if (handle)
CloseHandle(handle);
}
operator HANDLE() {
return handle;
}
AutoHandle &operator=(HANDLE h) {
handle = h;
return *this;
}
};
| Use normalized case and include method. | System/Windows: Use normalized case and include method.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@118503 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap |
ff408a945f4d59d4f289ec00c267002b2d0892bb | AFToolkit/AFToolkit.h | AFToolkit/AFToolkit.h | //
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
#import "AFDefines.h"
#import "AFLogHelper.h"
#import "AFFileHelper.h"
#import "AFPlatformHelper.h"
#import "AFKVO.h"
#import "AFArray.h"
#import "AFMutableArray.h"
#import "UITableViewCell+Universal.h"
#import "AFDBClient.h"
#import "AFView.h"
#import "AFViewController.h" | //
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
#import "AFDefines.h"
#import "AFLogHelper.h"
#import "AFFileHelper.h"
#import "AFPlatformHelper.h"
#import "AFKVO.h"
#import "AFArray.h"
#import "AFMutableArray.h"
#import "NSBundle+Universal.h"
#import "UITableViewCell+Universal.h"
#import "AFDBClient.h"
#import "AFView.h"
#import "AFViewController.h" | Add NSBundle+Universal.h to toolkit header | Add NSBundle+Universal.h to toolkit header
| C | mit | mlatham/AFToolkit |
99f65931e88b3a22b2bd5e9e88bf6798c529023c | cc1/tests/test038.c | cc1/tests/test038.c |
/*
name: TEST038
description: Basic test for tentative definitions
output:
G1 I x
G1 #I0 :I
F2 I E
X3 F2 main
F4 P E
G5 F4 foo
{
\
r X3 'P
}
G3 F2 main
{
\
G1 #I0 :I
r G1
}
*/
int x;
int x = 0;
int x;
int main();
void *
foo()
{
return &main;
}
int
main()
{
x = 0;
return x;
}
| Add basic test for tentative definitions | Add basic test for tentative definitions
| C | isc | 8l/scc,k0gaMSX/scc,8l/scc,8l/scc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/kcc |
|
b8b54f0d5c97324a7534bfeed523660c7296f9da | cc1/tests/test031.c | cc1/tests/test031.c |
/*
name: TEST031
description: Test concatenation in preprocessor
output:
F5 I
G6 F5 main
{
\
A7 I foo
A8 I bar
A9 I foobar
A9 A7 A8 +I :I
A9 A7 A8 +I :I
r #I0
}
*/
#define CAT(x,y) x ## y
#define XCAT(x,y) CAT(x,y)
#define FOO foo
#define BAR bar
int
main(void)
{
int foo, bar, foobar;
CAT(foo,bar) = foo + bar;
XCAT(FOO,BAR) = foo + bar;
return 0;
}
| Add test for concatenation in the preprocessor | Add test for concatenation in the preprocessor
| C | isc | k0gaMSX/scc,k0gaMSX/kcc,8l/scc,8l/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/scc |
|
d22e16e698bbc6c64666bf0f1e46015adecb0ce5 | constant-helper.c | constant-helper.c | #include <fcntl.h>
#include <stdio.h>
int
main(void)
{
printf("F_GETFL=%d\n", F_GETFL);
printf("F_SETFL=%d\n", F_SETFL);
printf("O_NONBLOCK=%d\n", O_NONBLOCK);
return 0;
}
| #if _WIN32 || _WIN64
# define F_GETFL 0
# define F_SETFL 0
# define O_NONBLOCK 0
#else
# include <fcntl.h>
#endif
#include <stdio.h>
int
main(void)
{
printf("F_GETFL=%d\n", F_GETFL);
printf("F_SETFL=%d\n", F_SETFL);
printf("O_NONBLOCK=%d\n", O_NONBLOCK);
return 0;
}
| Use zeroes for fcntl constants on Windows | Use zeroes for fcntl constants on Windows
We don't need to fcntl on Windows, so let's just use dummy
values
| C | mit | hoelzro/p6-linenoise,hoelzro/p6-linenoise |
4f130e6c40d5da1b47c398edaf3979c3fab4a9b2 | languages/c-language/magic-primes.c | languages/c-language/magic-primes.c | /*
* Compute prime numbers up to 67.
*
* https://spamsink.dreamwidth.org/1197779.html
*/
#include <stdio.h>
#include <math.h>
double magic(double f)
{
double ff = floor(f);
double r = log(ff + 6) * (log(ff + 6) - 1);
return (f - ff) * floor(r) + f;
}
double C = 2.6358597414547913;
int main()
{
int i;
for (i = 1; i < 20; ++i) {
printf("%d\n", (int)C);
C = magic(C);
}
return 0;
}
| Add demo of magic primes. | Add demo of magic primes.
| C | apache-2.0 | sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource |
|
ee462489f1da5ea332851843d10541594f6fc7b0 | stm/usart.h | stm/usart.h | typedef enum {
PYB_USART_NONE = 0,
PYB_USART_1 = 1,
PYB_USART_2 = 2,
PYB_USART_3 = 3,
PYB_USART_6 = 4,
PYB_USART_MAX = 4,
} pyb_usart_t;
extern pyb_usart_t pyb_usart_global_debug;
void usart_init(pyb_usart_t usart_id, uint32_t baudrate);
bool usart_rx_any(pyb_usart_t usart_id);
int usart_rx_char(pyb_usart_t usart_id);
void usart_tx_str(pyb_usart_t usart_id, const char *str);
void usart_tx_strn_cooked(pyb_usart_t usart_id, const char *str, int len);
mp_obj_t pyb_Usart(mp_obj_t usart_id, mp_obj_t baudrate);
| typedef enum {
PYB_USART_NONE = 0,
PYB_USART_1 = 1,
PYB_USART_2 = 2,
PYB_USART_3 = 3,
PYB_USART_6 = 4,
PYB_USART_MAX = 4,
//PYB_USART_XA = // USART4 on X1, X2 = PA0, PA1
PYB_USART_XB = 1, // USART1 on X9, X10 = PB6, PB7
PYB_USART_YA = 4, // USART6 on Y1, Y2 = PC6, PC7
PYB_USART_YB = 3, // USART3 on Y9, Y10 = PB10, PB11
} pyb_usart_t;
extern pyb_usart_t pyb_usart_global_debug;
void usart_init(pyb_usart_t usart_id, uint32_t baudrate);
bool usart_rx_any(pyb_usart_t usart_id);
int usart_rx_char(pyb_usart_t usart_id);
void usart_tx_str(pyb_usart_t usart_id, const char *str);
void usart_tx_strn_cooked(pyb_usart_t usart_id, const char *str, int len);
mp_obj_t pyb_Usart(mp_obj_t usart_id, mp_obj_t baudrate);
| Add USART enum for pyboard skin labels. | stm: Add USART enum for pyboard skin labels.
| C | mit | pozetroninc/micropython,TDAbboud/micropython,bvernoux/micropython,infinnovation/micropython,jimkmc/micropython,feilongfl/micropython,chrisdearman/micropython,jimkmc/micropython,suda/micropython,dmazzella/micropython,ericsnowcurrently/micropython,paul-xxx/micropython,SungEun-Steve-Kim/test-mp,chrisdearman/micropython,jmarcelino/pycom-micropython,paul-xxx/micropython,adafruit/micropython,mgyenik/micropython,praemdonck/micropython,methoxid/micropystat,kerneltask/micropython,torwag/micropython,HenrikSolver/micropython,mpalomer/micropython,KISSMonX/micropython,ChuckM/micropython,galenhz/micropython,ernesto-g/micropython,kostyll/micropython,jmarcelino/pycom-micropython,Timmenem/micropython,neilh10/micropython,dhylands/micropython,ChuckM/micropython,Vogtinator/micropython,rubencabrera/micropython,ericsnowcurrently/micropython,ChuckM/micropython,SungEun-Steve-Kim/test-mp,paul-xxx/micropython,misterdanb/micropython,praemdonck/micropython,adamkh/micropython,mpalomer/micropython,pozetroninc/micropython,vitiral/micropython,MrSurly/micropython-esp32,rubencabrera/micropython,adafruit/circuitpython,feilongfl/micropython,dinau/micropython,jimkmc/micropython,adafruit/circuitpython,oopy/micropython,toolmacher/micropython,jmarcelino/pycom-micropython,tuc-osg/micropython,omtinez/micropython,cwyark/micropython,cloudformdesign/micropython,swegener/micropython,tobbad/micropython,HenrikSolver/micropython,stonegithubs/micropython,blmorris/micropython,kerneltask/micropython,mpalomer/micropython,torwag/micropython,neilh10/micropython,mianos/micropython,aethaniel/micropython,turbinenreiter/micropython,martinribelotta/micropython,torwag/micropython,ganshun666/micropython,paul-xxx/micropython,vriera/micropython,bvernoux/micropython,aitjcize/micropython,KISSMonX/micropython,blmorris/micropython,MrSurly/micropython-esp32,suda/micropython,vriera/micropython,ahotam/micropython,jlillest/micropython,lowRISC/micropython,tdautc19841202/micropython,ernesto-g/micropython,ryannathans/micropython,hosaka/micropython,mhoffma/micropython,torwag/micropython,vitiral/micropython,tralamazza/micropython,emfcamp/micropython,rubencabrera/micropython,adafruit/micropython,adafruit/micropython,aethaniel/micropython,alex-robbins/micropython,ericsnowcurrently/micropython,AriZuu/micropython,noahchense/micropython,PappaPeppar/micropython,xhat/micropython,AriZuu/micropython,xyb/micropython,adafruit/circuitpython,ryannathans/micropython,MrSurly/micropython,bvernoux/micropython,matthewelse/micropython,slzatz/micropython,swegener/micropython,TDAbboud/micropython,xhat/micropython,blazewicz/micropython,cwyark/micropython,pfalcon/micropython,drrk/micropython,praemdonck/micropython,adamkh/micropython,AriZuu/micropython,redbear/micropython,stonegithubs/micropython,pozetroninc/micropython,SHA2017-badge/micropython-esp32,mhoffma/micropython,dmazzella/micropython,cwyark/micropython,hiway/micropython,xyb/micropython,lbattraw/micropython,tdautc19841202/micropython,vitiral/micropython,praemdonck/micropython,PappaPeppar/micropython,henriknelson/micropython,deshipu/micropython,kostyll/micropython,hosaka/micropython,mhoffma/micropython,puuu/micropython,omtinez/micropython,dxxb/micropython,drrk/micropython,warner83/micropython,ceramos/micropython,danicampora/micropython,martinribelotta/micropython,KISSMonX/micropython,lowRISC/micropython,selste/micropython,noahwilliamsson/micropython,Timmenem/micropython,pfalcon/micropython,dinau/micropython,henriknelson/micropython,mhoffma/micropython,EcmaXp/micropython,pramasoul/micropython,cloudformdesign/micropython,Peetz0r/micropython-esp32,martinribelotta/micropython,chrisdearman/micropython,mhoffma/micropython,firstval/micropython,feilongfl/micropython,MrSurly/micropython-esp32,alex-robbins/micropython,Peetz0r/micropython-esp32,aethaniel/micropython,orionrobots/micropython,dmazzella/micropython,galenhz/micropython,skybird6672/micropython,heisewangluo/micropython,ruffy91/micropython,tuc-osg/micropython,vitiral/micropython,tralamazza/micropython,orionrobots/micropython,SungEun-Steve-Kim/test-mp,pramasoul/micropython,adamkh/micropython,supergis/micropython,slzatz/micropython,xhat/micropython,tobbad/micropython,hiway/micropython,ernesto-g/micropython,ganshun666/micropython,blazewicz/micropython,jlillest/micropython,tralamazza/micropython,AriZuu/micropython,hosaka/micropython,turbinenreiter/micropython,firstval/micropython,mianos/micropython,heisewangluo/micropython,alex-march/micropython,skybird6672/micropython,HenrikSolver/micropython,utopiaprince/micropython,galenhz/micropython,drrk/micropython,martinribelotta/micropython,PappaPeppar/micropython,ruffy91/micropython,xuxiaoxin/micropython,lbattraw/micropython,TDAbboud/micropython,HenrikSolver/micropython,redbear/micropython,omtinez/micropython,misterdanb/micropython,stonegithubs/micropython,emfcamp/micropython,emfcamp/micropython,EcmaXp/micropython,rubencabrera/micropython,galenhz/micropython,swegener/micropython,adafruit/circuitpython,mgyenik/micropython,ceramos/micropython,jlillest/micropython,kostyll/micropython,MrSurly/micropython,henriknelson/micropython,MrSurly/micropython-esp32,dinau/micropython,SHA2017-badge/micropython-esp32,hosaka/micropython,slzatz/micropython,stonegithubs/micropython,lbattraw/micropython,redbear/micropython,TDAbboud/micropython,ruffy91/micropython,trezor/micropython,henriknelson/micropython,supergis/micropython,cnoviello/micropython,pfalcon/micropython,adamkh/micropython,Vogtinator/micropython,ganshun666/micropython,matthewelse/micropython,paul-xxx/micropython,chrisdearman/micropython,stonegithubs/micropython,toolmacher/micropython,aethaniel/micropython,trezor/micropython,matthewelse/micropython,adafruit/circuitpython,pfalcon/micropython,mpalomer/micropython,tuc-osg/micropython,KISSMonX/micropython,MrSurly/micropython,feilongfl/micropython,neilh10/micropython,micropython/micropython-esp32,suda/micropython,matthewelse/micropython,jimkmc/micropython,PappaPeppar/micropython,tobbad/micropython,ahotam/micropython,warner83/micropython,orionrobots/micropython,misterdanb/micropython,Vogtinator/micropython,SHA2017-badge/micropython-esp32,emfcamp/micropython,mianos/micropython,mgyenik/micropython,jmarcelino/pycom-micropython,henriknelson/micropython,toolmacher/micropython,adafruit/micropython,selste/micropython,lowRISC/micropython,cnoviello/micropython,infinnovation/micropython,methoxid/micropystat,bvernoux/micropython,trezor/micropython,danicampora/micropython,noahchense/micropython,EcmaXp/micropython,kerneltask/micropython,praemdonck/micropython,utopiaprince/micropython,matthewelse/micropython,puuu/micropython,cloudformdesign/micropython,tdautc19841202/micropython,danicampora/micropython,xyb/micropython,toolmacher/micropython,chrisdearman/micropython,oopy/micropython,methoxid/micropystat,xyb/micropython,dxxb/micropython,alex-robbins/micropython,heisewangluo/micropython,Peetz0r/micropython-esp32,rubencabrera/micropython,kostyll/micropython,EcmaXp/micropython,xyb/micropython,xuxiaoxin/micropython,dinau/micropython,ChuckM/micropython,bvernoux/micropython,redbear/micropython,ericsnowcurrently/micropython,tuc-osg/micropython,aethaniel/micropython,firstval/micropython,aitjcize/micropython,TDAbboud/micropython,kerneltask/micropython,tralamazza/micropython,methoxid/micropystat,mpalomer/micropython,skybird6672/micropython,mianos/micropython,misterdanb/micropython,deshipu/micropython,heisewangluo/micropython,SungEun-Steve-Kim/test-mp,adafruit/circuitpython,ruffy91/micropython,infinnovation/micropython,swegener/micropython,MrSurly/micropython,PappaPeppar/micropython,toolmacher/micropython,micropython/micropython-esp32,adamkh/micropython,blmorris/micropython,turbinenreiter/micropython,noahchense/micropython,jlillest/micropython,supergis/micropython,swegener/micropython,utopiaprince/micropython,micropython/micropython-esp32,galenhz/micropython,ahotam/micropython,deshipu/micropython,blmorris/micropython,firstval/micropython,suda/micropython,adafruit/micropython,blazewicz/micropython,noahwilliamsson/micropython,matthewelse/micropython,SHA2017-badge/micropython-esp32,Vogtinator/micropython,ceramos/micropython,lbattraw/micropython,lowRISC/micropython,kerneltask/micropython,Timmenem/micropython,tdautc19841202/micropython,noahwilliamsson/micropython,dhylands/micropython,aitjcize/micropython,xuxiaoxin/micropython,ryannathans/micropython,KISSMonX/micropython,Timmenem/micropython,cwyark/micropython,hosaka/micropython,alex-robbins/micropython,warner83/micropython,jmarcelino/pycom-micropython,supergis/micropython,dxxb/micropython,neilh10/micropython,xuxiaoxin/micropython,turbinenreiter/micropython,slzatz/micropython,skybird6672/micropython,heisewangluo/micropython,trezor/micropython,dhylands/micropython,noahchense/micropython,xhat/micropython,AriZuu/micropython,alex-march/micropython,pozetroninc/micropython,micropython/micropython-esp32,pramasoul/micropython,SungEun-Steve-Kim/test-mp,mgyenik/micropython,hiway/micropython,jimkmc/micropython,alex-march/micropython,ryannathans/micropython,micropython/micropython-esp32,feilongfl/micropython,infinnovation/micropython,omtinez/micropython,vriera/micropython,dinau/micropython,SHA2017-badge/micropython-esp32,utopiaprince/micropython,vriera/micropython,dxxb/micropython,Timmenem/micropython,pozetroninc/micropython,warner83/micropython,vitiral/micropython,dhylands/micropython,blazewicz/micropython,tuc-osg/micropython,Vogtinator/micropython,MrSurly/micropython,alex-march/micropython,cnoviello/micropython,warner83/micropython,orionrobots/micropython,ernesto-g/micropython,orionrobots/micropython,selste/micropython,cloudformdesign/micropython,redbear/micropython,cnoviello/micropython,xhat/micropython,lowRISC/micropython,tdautc19841202/micropython,noahchense/micropython,neilh10/micropython,oopy/micropython,emfcamp/micropython,torwag/micropython,aitjcize/micropython,vriera/micropython,ChuckM/micropython,deshipu/micropython,danicampora/micropython,alex-march/micropython,oopy/micropython,omtinez/micropython,oopy/micropython,xuxiaoxin/micropython,jlillest/micropython,slzatz/micropython,lbattraw/micropython,noahwilliamsson/micropython,methoxid/micropystat,utopiaprince/micropython,ryannathans/micropython,MrSurly/micropython-esp32,dmazzella/micropython,blmorris/micropython,ruffy91/micropython,pramasoul/micropython,selste/micropython,suda/micropython,tobbad/micropython,martinribelotta/micropython,kostyll/micropython,pramasoul/micropython,tobbad/micropython,hiway/micropython,blazewicz/micropython,puuu/micropython,pfalcon/micropython,firstval/micropython,mianos/micropython,Peetz0r/micropython-esp32,puuu/micropython,ernesto-g/micropython,dhylands/micropython,cloudformdesign/micropython,cnoviello/micropython,HenrikSolver/micropython,selste/micropython,supergis/micropython,cwyark/micropython,ceramos/micropython,ahotam/micropython,puuu/micropython,deshipu/micropython,dxxb/micropython,drrk/micropython,turbinenreiter/micropython,ceramos/micropython,drrk/micropython,noahwilliamsson/micropython,misterdanb/micropython,ahotam/micropython,Peetz0r/micropython-esp32,hiway/micropython,ganshun666/micropython,danicampora/micropython,ericsnowcurrently/micropython,infinnovation/micropython,ganshun666/micropython,trezor/micropython,EcmaXp/micropython,skybird6672/micropython,mgyenik/micropython,alex-robbins/micropython |
3443bd38e91cc5babc5f49b063571c818dc80990 | arduino/OpenROV/Motors.h | arduino/OpenROV/Motors.h | #ifndef __MOTORS_H_
#define __MOTORS_H_
#include <Servo.h>
#define MIDPOINT 128
class Motors {
private:
Servo port, vertical, starbord;
int port_pin, vertical_pin, starbord_pin;
public:
Motors(int p_pin, int v_pin, int s_pin);
void reset();
void go(int p, int v, int s);
void stop();
};
#endif
| #ifndef __MOTORS_H_
#define __MOTORS_H_
#include <Servo.h>
#define MIDPOINT 90
class Motors {
private:
Servo port, vertical, starbord;
int port_pin, vertical_pin, starbord_pin;
public:
Motors(int p_pin, int v_pin, int s_pin);
void reset();
void go(int p, int v, int s);
void stop();
};
#endif
| Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180) | Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180)
| C | mit | codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software |
b9bcb1f7994994213d18d97f4c04582b9d6a04b2 | board/bluepill/pins.h | board/bluepill/pins.h | #ifndef PINS_H_
#define PINS_H_
typedef GPIO_PIN_LED<3,13,false> LED_BUILTIN_;
typedef GPIO_PIN<1,9> TX1_PIN;
typedef GPIO_PIN<1,10> RX1_PIN;
typedef TX1_PIN TX_PIN;
typedef RX1_PIN RX_PIN;
typedef GPIO_PIN<1,2> TX2_PIN;
typedef GPIO_PIN<1,3> RX2_PIN;
typedef GPIO_PIN<2,10> TX3_PIN;
typedef GPIO_PIN<2,11> RX3_PIN;
typedef GPIO_PIN<0,0xFFFF> NO_PIN;
#endif
| #ifndef PINS_H_
#define PINS_H_
typedef GPIO_PIN_LED<3,13,false> LED_BUILTIN_;
typedef GPIO_PIN<1,9> TX1_PIN;
typedef GPIO_PIN<1,10> RX1_PIN;
typedef GPIO_PIN<1,2> TX2_PIN;
typedef GPIO_PIN<1,3> RX2_PIN;
typedef GPIO_PIN<2,10> TX3_PIN;
typedef GPIO_PIN<2,11> RX3_PIN;
typedef GPIO_PIN<0,0xFFFF> NO_PIN;
typedef TX2_PIN TX_PIN;
typedef RX2_PIN RX_PIN;
#endif
| Change default serial to USART2 for bluepill stm32f103 board | Change default serial to USART2 for bluepill stm32f103 board
| C | mit | RickKimball/fabooh,RickKimball/fabooh |
78d48b4a6c7f49ee07ff9bced8df6f7379c13d6f | test2/type_parsing_printing/typeof_skip.c | test2/type_parsing_printing/typeof_skip.c | // RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') xyz()"
long *x;
__typeof(int *) ip;
__typeof(int *) *a1;
__typeof(int *) a2[2];
__typeof(int *) a3();
__typeof(x) xyz()
{
}
| // RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') abc()" "typeof(expr: identifier) (aka 'long *') xyz()"
long *x;
__typeof(int *) ip;
__typeof(int *) *a1;
__typeof(int *) a2[2];
__typeof(int *) a3();
auto abc() -> __typeof(x)
{
}
__typeof(x) xyz()
{
}
| Add trailing return type to type printing test | Add trailing return type to type printing test
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
1747dc4dc9b0f7db03236510573e2b13bd4f90f2 | tests/regression/36-octapron/18-branch2.c | tests/regression/36-octapron/18-branch2.c | // SKIP PARAM: --sets ana.activated[+] octApron
// Based on 36/09.
#include <assert.h>
void main() {
int i;
if (i) { // same as i != 0
// only implies i != 0
// doesn't imply i > 0
// doesn't imply i >= 1
assert(i >= 1); // UNKNOWN!
}
else {
// implies i == 0
// doesn't imply i < 0
assert(i == 0);
assert(i < 0); // FAIL
}
}
| Add regression test where octApron knows too much about branch | Add regression test where octApron knows too much about branch
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
c0fa902a79201a7a14e512dba584800c4b106c2a | c++/Cutie.h | c++/Cutie.h | #ifndef _CUTIE_H_
#define _CUTIE_H_
class Cutie
{
private:
bool respondsToHugs;
unsigned int hugs;
unsigned int tlc;
public:
Cutie();
public:
void setAcceptsHugs(bool value);
bool acceptsHugs();
void hug();
void empathy();
unsigned int showHugs();
unsigned int showTlc();
};
#endif
| #ifndef _CUTIE_H_
#define _CUTIE_H_
class Cutie
{
private:
bool respondsToHugs;
unsigned int hugs;
unsigned int tlc;
public:
Cutie();
void setAcceptsHugs(bool value);
bool acceptsHugs();
void hug();
void empathy();
unsigned int showHugs();
unsigned int showTlc();
};
#endif
| Remove extra public declaration (still compiles but extraneous) | Remove extra public declaration (still compiles but extraneous)
| C | cc0-1.0 | seancorfield/maybe-hugs,yurrriq/maybe-hugs,iarna/maybe-hugs,isaacs/maybe-hugs,yurrriq/maybe-hugs,reezer/maybe-hugs,seancorfield/maybe-hugs,dariaphoebe/maybe-hugs,isaacs/maybe-hugs,airportyh/maybe-hugs,gs-akhan/maybe-hugs,seancorfield/maybe-hugs,dariaphoebe/maybe-hugs,yurrriq/maybe-hugs,dariaphoebe/maybe-hugs,dariaphoebe/maybe-hugs,airportyh/maybe-hugs,iarna/maybe-hugs,dariaphoebe/maybe-hugs,dariaphoebe/maybe-hugs,airportyh/maybe-hugs,iarna/maybe-hugs,seancorfield/maybe-hugs,reezer/maybe-hugs,gs-akhan/maybe-hugs,isaacs/maybe-hugs,airportyh/maybe-hugs,iarna/maybe-hugs,yurrriq/maybe-hugs,yurrriq/maybe-hugs,yurrriq/maybe-hugs,gs-akhan/maybe-hugs,airportyh/maybe-hugs,dariaphoebe/maybe-hugs,seancorfield/maybe-hugs,seancorfield/maybe-hugs,dariaphoebe/maybe-hugs,dariaphoebe/maybe-hugs,iarna/maybe-hugs,iarna/maybe-hugs,reezer/maybe-hugs,gs-akhan/maybe-hugs,dariaphoebe/maybe-hugs,gs-akhan/maybe-hugs,yurrriq/maybe-hugs,yurrriq/maybe-hugs,gs-akhan/maybe-hugs,iarna/maybe-hugs,iarna/maybe-hugs,seancorfield/maybe-hugs,gs-akhan/maybe-hugs,airportyh/maybe-hugs,seancorfield/maybe-hugs,isaacs/maybe-hugs,dariaphoebe/maybe-hugs,reezer/maybe-hugs,iarna/maybe-hugs,reezer/maybe-hugs,airportyh/maybe-hugs,isaacs/maybe-hugs,gs-akhan/maybe-hugs,airportyh/maybe-hugs,reezer/maybe-hugs,reezer/maybe-hugs,dariaphoebe/maybe-hugs,reezer/maybe-hugs,seancorfield/maybe-hugs,dariaphoebe/maybe-hugs,yurrriq/maybe-hugs,yurrriq/maybe-hugs,isaacs/maybe-hugs,isaacs/maybe-hugs,iarna/maybe-hugs,reezer/maybe-hugs,reezer/maybe-hugs,seancorfield/maybe-hugs,isaacs/maybe-hugs |
086610926fb12b35881c06d40c295be81ddc3173 | include/llvm/CodeGen/Passes.h | include/llvm/CodeGen/Passes.h | //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
//
// This file defines interfaces to access the target independent code generation
// passes provided by the LLVM backend.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_PASSES_H
#define LLVM_CODEGEN_PASSES_H
class FunctionPass;
class PassInfo;
// PHIElimination pass - This pass eliminates machine instruction PHI nodes by
// inserting copy instructions. This destroys SSA information, but is the
// desired input for some register allocators. This pass is "required" by these
// register allocator like this: AU.addRequiredID(PHIEliminationID);
//
extern const PassInfo *PHIEliminationID;
/// SimpleRegisterAllocation Pass - This pass converts the input machine code
/// from SSA form to use explicit registers by spilling every register. Wow,
/// great policy huh?
///
FunctionPass *createSimpleRegisterAllocator();
/// LocalRegisterAllocation Pass - This pass register allocates the input code a
/// basic block at a time, yielding code better than the simple register
/// allocator, but not as good as a global allocator.
///
FunctionPass *createLocalRegisterAllocator();
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
///
FunctionPass *createPrologEpilogCodeInserter();
#endif
| //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
//
// This file defines interfaces to access the target independent code generation
// passes provided by the LLVM backend.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_PASSES_H
#define LLVM_CODEGEN_PASSES_H
class FunctionPass;
class PassInfo;
// PHIElimination pass - This pass eliminates machine instruction PHI nodes by
// inserting copy instructions. This destroys SSA information, but is the
// desired input for some register allocators. This pass is "required" by these
// register allocator like this: AU.addRequiredID(PHIEliminationID);
//
extern const PassInfo *PHIEliminationID;
/// SimpleRegisterAllocation Pass - This pass converts the input machine code
/// from SSA form to use explicit registers by spilling every register. Wow,
/// great policy huh?
///
FunctionPass *createSimpleRegisterAllocator();
/// LocalRegisterAllocation Pass - This pass register allocates the input code a
/// basic block at a time, yielding code better than the simple register
/// allocator, but not as good as a global allocator.
///
FunctionPass *createLocalRegisterAllocator();
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
///
FunctionPass *createPrologEpilogCodeInserter();
/// getRegisterAllocator - This creates an instance of the register allocator
/// for the Sparc.
FunctionPass *getRegisterAllocator(TargetMachine &T);
#endif
| Include the sparc register in this file | Include the sparc register in this file
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@8794 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap |
446c2832aec39f82b29cfa60768fcf866e015a23 | 01/ex-05.c | 01/ex-05.c | #include <stdio.h>
main()
{
int fahr;
for (fahr = 300; fahr >= 0; fahr = fahr - 20)
printf("%3d %6.1f\n", fahr, (5.0/9.0) * (fahr - 32.0));
}
| Solve exercise of Chapter 1, Paragraph 3. | Solve exercise of Chapter 1, Paragraph 3.
| C | mit | jacquerie/c-k-r |
|
293b03cae0d5237f699905bc09425d29027bb2a7 | forth/src/stack_machine/compiler.c | forth/src/stack_machine/compiler.c | #include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stack_machine/common.h>
#include <stack_machine/compiler.h>
state_t __DOLIT(context_t *ctx)
{
pushnum(ctx->ds, (*(int *)ctx->ip++));
return OK;
}
void literal(context_t *ctx, int n)
{
static entry_t dolit = { .code_ptr = &__DOLIT };
compile(ctx, 2, &dolit, n);
}
void compile(context_t *ctx, int n, ...)
{
va_list params;
va_start(params, n);
for (int i = 0; i < n; i++)
{
word_t arg = va_arg(params, word_t);
comma(ctx, arg);
}
va_end(params);
} | #include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stack_machine/common.h>
#include <stack_machine/compiler.h>
state_t __DOLIT(context_t *ctx)
{
pushnum(ctx->ds, (*(int *)ctx->ip++));
return OK;
}
void literal(context_t *ctx, int n)
{
static entry_t dolit = { .code_ptr = &__DOLIT, .name = "DOLIT" };
compile(ctx, 2, &dolit, n);
}
void compile(context_t *ctx, int n, ...)
{
va_list params;
va_start(params, n);
for (int i = 0; i < n; i++)
{
word_t arg = va_arg(params, word_t);
comma(ctx, arg);
}
va_end(params);
}
| Add name to DOLIT entry | Add name to DOLIT entry | C | mit | rm-hull/byok,rm-hull/byok,rm-hull/byok,rm-hull/byok |
391c2f8f921c7e16737d55920632629461f97b8f | src/wd.h | src/wd.h | /*
Copyright 2015 John Bailey
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.
*/
#if !defined WD_H
#define WD_H
#define WD_SUCCESS -1
#define WD_GENERIC_FAIL 0
#define WD_SUCCEEDED( _x ) (( _x ) == WD_SUCCESS )
#endif
| /*
Copyright 2015 John Bailey
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.
*/
#if !defined WD_H
#define WD_H
#define WD_SUCCESS -1
#define WD_GENERIC_FAIL 0
#define WD_SUCCEEDED( _x ) (( _x ) == WD_SUCCESS )
#if defined WIN32
/** Printf format string for size_t */
#define PFFST "%Iu"
#else
#define PFFST "%zu"
#endif
#endif
| Add platform-specific string formatters for size_t | Add platform-specific string formatters for size_t
| C | apache-2.0 | bright-tools/wd,bright-tools/wd,bright-tools/wd |
22340a683f685a094dec12482fc754edb2913391 | iOS/BleToolBox/BleToolBox/Model/Beacon/BleBeaconSigninModel.h | iOS/BleToolBox/BleToolBox/Model/Beacon/BleBeaconSigninModel.h | //
// BleBeaconSignInModel.h
// BleToolBox
//
// Created by Mark on 2018/1/26.
// Copyright © 2018年 MarkCJ. All rights reserved.
//
#import "BleBaseModel.h"
@interface BleBeaconSignInModel : BleBaseModel
@property NSString *beaconName; // the beacon name.
@property NSString *beaconDeviceUUID; // the beacon UUID.
@property NSString *beaconServiceUUID; // the beacon service UUID.
@property NSInteger signInRSSI; // the beacon RSSI when sign in.
@property NSDate *signInTime; // time then sign in.
/**
Init the beacon model by beacon information
@param name Device name
@param deviceUUID Device UUID
@param serviceUUID Device Service UUID
@param rssi RSSI value
@param time Sign in time
@return
*/
-(instancetype)initWithBeaconName:(NSString *)name deviceUUID:(NSString *)deviceUUID serviceUUID:(NSString *)serviceUUID RSSI:(NSInteger)rssi signInTime:(NSDate *)time;
@end
| //
// BleBeaconSignInModel.h
// BleToolBox
//
// Created by Mark on 2018/1/26.
// Copyright © 2018年 MarkCJ. All rights reserved.
//
#import "BleBaseModel.h"
@interface BleBeaconSignInModel : BleBaseModel
@property NSString *beaconName; // the beacon name.
@property NSString *beaconDeviceUUID; // the beacon UUID.
@property NSString *beaconServiceUUID; // the beacon service UUID.
@property NSInteger signInRSSI; // the beacon RSSI when sign in.
@property NSDate *signInTime; // time then sign in.
/**
Init the beacon model by beacon information
@param name Device name
@param deviceUUID Device UUID
@param serviceUUID Device Service UUID
@param rssi RSSI value
@param time Sign in time
*/
-(instancetype)initWithBeaconName:(NSString *)name deviceUUID:(NSString *)deviceUUID serviceUUID:(NSString *)serviceUUID RSSI:(NSInteger)rssi signInTime:(NSDate *)time;
@end
| Update the source code file names | Update the source code file names
| C | mit | ChenJian345/BleSensorConnect |
106d4d7bf624103cb96f9d7998a90e2d40969df2 | DKCategories/NSData+DK.h | DKCategories/NSData+DK.h | //
// NSData+DK.h
//
// Created by dkhamsing on 2/24/14.
//
#import <Foundation/Foundation.h>
@interface NSData (DK)
/**
Load session cookies.
Credits: http://stackoverflow.com/questions/14387662/afnetworking-persisting-cookies-automatically
*/
+ (void)dk_cookiesLoad;
/**
Save session cookies.
Credits: http://stackoverflow.com/questions/14387662/afnetworking-persisting-cookies-automatically
*/
+ (void)dk_cookiesSave;
@end
| //
// NSData+DK.h
//
// Created by dkhamsing on 2/24/14.
//
#import <Foundation/Foundation.h>
@interface NSData (DK)
/**
Load session cookies.
@param log Boolean that outputs with NSLog.
Credits: http://stackoverflow.com/questions/14387662/afnetworking-persisting-cookies-automatically
*/
+ (void)dk_cookiesLoadWithLog:(BOOL)log;
/**
Load session cookies without logging.
*/
+ (void)dk_cookiesLoad;
/**
Save session cookies.
Credits: http://stackoverflow.com/questions/14387662/afnetworking-persisting-cookies-automatically
*/
+ (void)dk_cookiesSave;
@end
| Add log option for loading cookies | Add log option for loading cookies
| C | mit | dkhamsing/DKCategories |
1006b58e857248f7979970663a4080e9d900f7eb | include/cpr/low_speed.h | include/cpr/low_speed.h | #ifndef CPR_LOW_SPEED_H
#define CPR_LOW_SPEED_H
#include <cstdint>
namespace cpr {
class LowSpeed {
public:
LowSpeed(const std::int32_t& limit, const std::int32_t& time) : limit(limit), time(time) {}
std::int32_t limit;
std::int32_t time;
};
} // namespace cpr
#endif
| #ifndef CPR_LOW_SPEED_H
#define CPR_LOW_SPEED_H
#include <cstdint>
namespace cpr {
class LowSpeed {
public:
LowSpeed(const std::int32_t limit, const std::int32_t time) : limit(limit), time(time) {}
std::int32_t limit;
std::int32_t time;
};
} // namespace cpr
#endif
| Use primitive std::int32_t instead of reference type | Use primitive std::int32_t instead of reference type
| C | mit | whoshuu/cpr,whoshuu/cpr,msuvajac/cpr,msuvajac/cpr,msuvajac/cpr,whoshuu/cpr |
a2f0f545fcae7419b4daf83ed0032d9ad28e7b49 | ir/common/firm_common.c | ir/common/firm_common.c | /*
* This file is part of libFirm.
* Copyright (C) 2012 University of Karlsruhe.
*/
/**
* @file
* @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
*/
#include "irloop.h"
#include "tv.h"
/**
* Ideally, this macro would check if size bytes could be read at
* pointer p. No generic solution.
*/
#define POINTER_READ(p, size) (p)
/* returns the kind of the thing */
firm_kind get_kind(const void *firm_thing)
{
return POINTER_READ(firm_thing, sizeof(firm_kind)) ? *(firm_kind *)firm_thing : k_BAD;
}
| /*
* This file is part of libFirm.
* Copyright (C) 2012 University of Karlsruhe.
*/
/**
* @file
* @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
*/
#include "irloop.h"
#include "tv.h"
/* returns the kind of the thing */
firm_kind get_kind(const void *firm_thing)
{
return *(firm_kind*)firm_thing;
}
| Remove the unimplemented macro POINTER_READ(). | Remove the unimplemented macro POINTER_READ().
| C | lgpl-2.1 | killbug2004/libfirm,jonashaag/libfirm,killbug2004/libfirm,jonashaag/libfirm,MatzeB/libfirm,davidgiven/libfirm,8l/libfirm,8l/libfirm,8l/libfirm,davidgiven/libfirm,killbug2004/libfirm,davidgiven/libfirm,MatzeB/libfirm,davidgiven/libfirm,jonashaag/libfirm,jonashaag/libfirm,8l/libfirm,jonashaag/libfirm,davidgiven/libfirm,MatzeB/libfirm,davidgiven/libfirm,8l/libfirm,libfirm/libfirm,davidgiven/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,killbug2004/libfirm,killbug2004/libfirm,killbug2004/libfirm,libfirm/libfirm,MatzeB/libfirm,8l/libfirm,jonashaag/libfirm,libfirm/libfirm,8l/libfirm,killbug2004/libfirm,libfirm/libfirm |
e8573c1ef5fdff5b2a486d45916cfaaa3f959d62 | testmud/mud/home/Text/sys/bin/wiz/tool/fulldump.c | testmud/mud/home/Text/sys/bin/wiz/tool/fulldump.c | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <kotaka/paths.h>
#include <text/paths.h>
inherit LIB_WIZBIN;
void main(string args)
{
int count;
if (query_user()->query_class() < 3) {
send_out("You do not have sufficient access rights to dump the mud.\n");
return;
}
proxy_call("dump_state");
}
| Add command to allow non incremental statedumps | Add command to allow non incremental statedumps
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
|
d6342526a24fbfbffb77a1ae58afcafcad4207cf | parser_tests.c | parser_tests.c | #include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
tk->value.num = number;
} else {
tk->value.string = str;
}
return tk;
}
void test_parse_number() {
struct token_list *tkl = make_token_list();
struct token *tk = make_token(tok_number, NULL, 0.0, 42);
append_token_list(tkl, tk);
struct ast_node *result = parse_number(tkl);
EXPECT_EQ(result->val, tk);
EXPECT_EQ(result->num_children, 0);
destroy_token_list(tkl);
}
| #include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
tk->value.num = number;
} else {
tk->value.string = str;
}
return tk;
}
void test_parse_number() {
struct token_list *tkl = make_token_list();
struct token *tk = make_token(tok_number, NULL, 0.0, 42);
append_token_list(tkl, tk);
struct ast_node *result = parse_number(tkl);
EXPECT_EQ(result->val, tk);
EXPECT_EQ(result->num_children, 0);
destroy_token_list(tkl);
delete_node(result);
}
| Fix memory leak in tests | Fix memory leak in tests
| C | mit | iankronquist/yaz,iankronquist/yaz |
9ca06fd4ac08a7a19040c2fe62698d8b6da03395 | src/common.h | src/common.h | // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
// Headers available in all sources
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
// Assert that int is at least 4B
static_assert(sizeof(int) >= sizeof(int32_t), "Int must be at least 4B wide!");
// Assert that we are on a little endian system
#ifdef __BYTE_ORDER__
static_assert(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__, "Only little endian systems are supported!");
#endif
#define runtime_failure(message) exit((cerr << message << endl, 1))
// Define namespace ufal::morphodita.
namespace ufal {
namespace morphodita {
using namespace std;
} // namespace morphodita
} // namespace ufal
| // This file is part of MorphoDiTa <http://github.com/ufal/morphodita/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
// Headers available in all sources
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
// Define namespace ufal::morphodita.
namespace ufal {
namespace morphodita {
using namespace std;
// Assert that int is at least 4B
static_assert(sizeof(int) >= sizeof(int32_t), "Int must be at least 4B wide!");
// Assert that we are on a little endian system
#ifdef __BYTE_ORDER__
static_assert(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__, "Only little endian systems are supported!");
#endif
#define runtime_failure(message) exit((cerr << message << endl, 1))
} // namespace morphodita
} // namespace ufal
| Move namespaces declarations to the top of the file. | Move namespaces declarations to the top of the file.
| C | mpl-2.0 | ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita |
f6703dd4d3aa5ba9a8e19597a9477e78fc248466 | RVCalendarWeekView/Lib/Views/MSEvent.h | RVCalendarWeekView/Lib/Views/MSEvent.h | //
// AKEvent.h
// Example
//
// Created by ak on 18.01.2016.
// Copyright © 2016 Eric Horacek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "DTTimePeriod.h"
@interface MSEvent : DTTimePeriod
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *location;
+(instancetype)make:(NSDate*)start title:(NSString*)title subtitle:(NSString*)subtitle;
+(instancetype)make:(NSDate*)start end:(NSDate*)end title:(NSString*)title subtitle:(NSString*)subtitle;
+(instancetype)make:(NSDate*)start duration:(int)minutes title:(NSString*)title subtitle:(NSString*)subtitle;
- (NSDate *)day;
@end | //
// AKEvent.h
// Example
//
// Created by ak on 18.01.2016.
// Copyright © 2016 Eric Horacek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <DateTools/DTTimePeriod.h>
@interface MSEvent : DTTimePeriod
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *location;
+(instancetype)make:(NSDate*)start title:(NSString*)title subtitle:(NSString*)subtitle;
+(instancetype)make:(NSDate*)start end:(NSDate*)end title:(NSString*)title subtitle:(NSString*)subtitle;
+(instancetype)make:(NSDate*)start duration:(int)minutes title:(NSString*)title subtitle:(NSString*)subtitle;
- (NSDate *)day;
@end | Fix include of DTTimePeriod in DateTools cocoapod | Fix include of DTTimePeriod in DateTools cocoapod
This fixes an issue when RVCalendarWeekView is compiled as a cocoapod framework (`use_frameworks!` in the Podfile), where cocoapods no longer allows pods to be references with user library imports (anything using quotes), and requires them to be imported as if they were a system framework (using angle brackets and using the framework as the folder).
| C | mit | ConnectCorp/RVCalendarWeekView,BadChoice/RVCalendarWeekView |
70b855c84855aa33ab8411d24b9dd0b78ecbffcb | src/hash/sha1_sse2/sha1_sse2.h | src/hash/sha1_sse2/sha1_sse2.h | /*
* SHA-160
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_SHA_160_SSE2_H__
#define BOTAN_SHA_160_SSE2_H__
#include <botan/sha160.h>
namespace Botan {
/*
* SHA-160
*/
class BOTAN_DLL SHA_160_SSE2 : public SHA_160
{
public:
HashFunction* clone() const { return new SHA_160_SSE2; }
SHA_160_SSE2() : SHA_160(0) {} // no W needed
private:
void compress_n(const byte[], u32bit blocks);
};
extern "C" void botan_sha1_sse2_compress(u32bit[5], const u32bit*);
}
#endif
| /*
* SHA-160
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_SHA_160_SSE2_H__
#define BOTAN_SHA_160_SSE2_H__
#include <botan/sha160.h>
namespace Botan {
/*
* SHA-160
*/
class BOTAN_DLL SHA_160_SSE2 : public SHA_160
{
public:
HashFunction* clone() const { return new SHA_160_SSE2; }
SHA_160_SSE2() : SHA_160(0) {} // no W needed
private:
void compress_n(const byte[], u32bit blocks);
};
}
#endif
| Remove extern decl of no longer used/included SHA-1 SSE2 function | Remove extern decl of no longer used/included SHA-1 SSE2 function
| C | bsd-2-clause | randombit/botan,randombit/botan,randombit/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,randombit/botan,randombit/botan |
a3cb2d67b7d2743524d3ba2c23270d5fc288d6db | src/kbase/stack_walker.h | src/kbase/stack_walker.h | /*
@ 0xCCCCCCCC
*/
#if defined(_MSC_VER)
#pragma once
#endif
#ifndef KBASE_STACK_WALKER_H_
#define KBASE_STACK_WALKER_H_
#include <array>
#include "kbase/basic_macros.h"
#if defined(OS_WIN)
struct _CONTEXT;
using CONTEXT = _CONTEXT;
#endif
namespace kbase {
class StackWalker {
public:
StackWalker() noexcept;
#if defined(OS_WIN)
// Dumps a callstack for an exception case.
explicit StackWalker(CONTEXT* context);
#endif
~StackWalker() = default;
DEFAULT_COPY(StackWalker);
DEFAULT_MOVE(StackWalker);
void DumpCallStack(std::ostream& stream);
std::string CallStackToString();
private:
static constexpr size_t kMaxStackFrames = 64U;
std::array<void*, kMaxStackFrames> stack_frames_ { nullptr };
size_t valid_frame_count_ = 0;
};
} // namespace kbase
#endif // KBASE_STACK_WALKER_H_
| /*
@ 0xCCCCCCCC
*/
#if defined(_MSC_VER)
#pragma once
#endif
#ifndef KBASE_STACK_WALKER_H_
#define KBASE_STACK_WALKER_H_
#include <array>
#include "kbase/basic_macros.h"
#if defined(OS_WIN)
struct _CONTEXT;
using CONTEXT = _CONTEXT;
#endif
namespace kbase {
class StackWalker {
public:
StackWalker() noexcept;
#if defined(OS_WIN)
// Dumps a callstack for an exception case.
explicit StackWalker(CONTEXT* context);
#endif
~StackWalker() = default;
DEFAULT_COPY(StackWalker);
DEFAULT_MOVE(StackWalker);
void DumpCallStack(std::ostream& stream);
std::string CallStackToString();
private:
static constexpr size_t kMaxStackFrames = 64U;
std::array<void*, kMaxStackFrames> stack_frames_ {{nullptr}};
size_t valid_frame_count_ = 0;
};
} // namespace kbase
#endif // KBASE_STACK_WALKER_H_
| Fix missing braces warning for initialization of subobjects | Fix missing braces warning for initialization of subobjects
This warning should be a compiler bug, however, we still decide to follow
the suggestion.
Interestingly, this braces enforcement on GCC 5.4 will show up as an error
but have gone away on newer versions.
| C | mit | kingsamchen/KBase,kingsamchen/KBase_Demo,kingsamchen/KBase_Demo,kingsamchen/KBase |
6937c69638ec3f672da9f8831f52b6504e21b241 | Pod/UIKit/BonMot+UIKit.h | Pod/UIKit/BonMot+UIKit.h | //
// BonMot+UIKit.h
// Pods
//
// Created by Nora Trapp on 3/10/16.
//
//
#import "BONTextAlignmentConstraint.h"
#import "UILabel+BonMotUtilities.h"
#import "UITextField+BonMotUtilities.h"
#import "UITextView+BonMotUtilities.h"
| //
// BonMot+UIKit.h
// BonMot
//
// Created by Nora Trapp on 3/10/16.
//
//
#import "BONTextAlignmentConstraint.h"
#import "UILabel+BonMotUtilities.h"
#import "UITextField+BonMotUtilities.h"
#import "UITextView+BonMotUtilities.h"
| Change Pods to BonMot in header. | Change Pods to BonMot in header.
| C | mit | Raizlabs/BonMot,Raizlabs/BonMot,Raizlabs/BonMot |
199ea23d6bf72ff078f8fac93ad3a926ba37c3e7 | bitboard.h | bitboard.h | // for all of these conversions, 0 <= row,col < 8
static inline uint8_t bb_index_of(uint8_t row, uint8_t col)
{
return row + (col << 3);
}
static inline uint8_t bb_row_of(uint8_t index)
{
return index % 8;
}
static inline uint8_t bb_col_of(uint8_t index)
{
return (uint8_t)(index / 8);
}
| Convert 0-63 indicies <-> (row,col) | Convert 0-63 indicies <-> (row,col)
| C | bsd-3-clause | jwatzman/nameless-chessbot,jwatzman/nameless-chessbot |
|
6cbbeab123ef8f665e382ba1970c2efc31acf285 | ObjScheme/ObSFileLoader.h | ObjScheme/ObSFileLoader.h | //
// ObSFileLoader.h
// GameChanger
//
// Created by Kiril Savino on Tuesday, April 16, 2013
// Copyright 2013 GameChanger. All rights reserved.
//
@class ObSInPort;
@protocol ObSFileLoader <NSObject>
- (ObSInPort*)findFile:(NSString*)filename;
- (NSString*)qualifyFileName:(NSString*)filename;
@end
@interface ObSBundleFileLoader : NSObject <ObSFileLoader>
@property (nonatomic, strong) NSBundle *bundle;
- (instancetype)initWithBundle:(NSBundle *)bundle;
@end
@interface ObSFilesystemFileLoader : NSObject <ObSFileLoader> {
NSString* _directoryPath;
}
+ (ObSFilesystemFileLoader*)loaderForPath:(NSString*)path;
@end
| //
// ObSFileLoader.h
// GameChanger
//
// Created by Kiril Savino on Tuesday, April 16, 2013
// Copyright 2013 GameChanger. All rights reserved.
//
@class ObSInPort;
@protocol ObSFileLoader <NSObject>
- (ObSInPort*)findFile:(NSString*)filename;
- (NSString*)qualifyFileName:(NSString*)filename;
@end
@interface ObSBundleFileLoader : NSObject <ObSFileLoader>
@property (nonatomic, strong, readonly) NSBundle *bundle;
- (instancetype)initWithBundle:(NSBundle *)bundle;
@end
@interface ObSFilesystemFileLoader : NSObject <ObSFileLoader> {
NSString* _directoryPath;
}
+ (ObSFilesystemFileLoader*)loaderForPath:(NSString*)path;
@end
| Make bundle property read only | Make bundle property read only
| C | mit | gamechanger/objscheme,gamechanger/objscheme,gamechanger/objscheme |
fe631c01f9007d2ba728ff70bd0b75c78da1a94e | R2BotNUC/include/Config.h | R2BotNUC/include/Config.h | #ifndef _R2BOT_CONFIG
#define _R2BOT_CONFIG
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#define DEBUG_PRINTS
#define DEVICE_NAME "NUC"
#undef USE_KINECT1
#undef USE_KINECT2
#undef USE_MOTORS
#undef USE_ULTRASONIC
#define USE_R2SERVER
#endif | #ifndef _R2BOT_CONFIG
#define _R2BOT_CONFIG
#define NOMINMAX
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#define DEBUG_PRINTS
#define DEVICE_NAME "NUC"
#undef USE_KINECT1
#undef USE_KINECT2
#undef USE_MOTORS
#undef USE_ULTRASONIC
#define USE_R2SERVER
#endif | Add NOMINMAX before including Windows.h | Add NOMINMAX before including Windows.h
| C | mit | cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2 |
38a6eaba900ca78de01e16f5fe4a95b3962eb701 | flowertest.c | flowertest.c | int pin_r = 9;
int pin_g = 10;
int pin_b = 11;
int brightness = 0;
int increment = 1;
void setup() {
pinMode(pin_r, OUTPUT);
pinMode(pin_g, OUTPUT);
pinMode(pin_b, OUTPUT);
/* Serial.begin(9600); */
}
void loop() {
brightness = brightness + increment;
if (brightness <= 0 || brightness >= 128) {
increment = -increment;
}
analogWrite(pin_r, brightness/2);
analogWrite(pin_g, brightness);
analogWrite(pin_b, 128);
delay(20);
}
| Add an initial test script for the flowers. | Add an initial test script for the flowers.
| C | artistic-2.0 | alloy-d/blinkenflowers |
|
408a046f7f7050f5a5ec3ecad36108f15767ab0b | trunk/src/daemon/serversock.h | trunk/src/daemon/serversock.h | /**
* tapcfg - A cross-platform configuration utility for TAP driver
* Copyright (C) 2008 Juho Vähä-Herttua
*
* 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.
*/
#ifndef SERVERSOCK_H
#define SERVERSOCK_H
#include "tapcfg.h"
typedef struct serversock_s serversock_t;
serversock_t *serversock_tcp(unsigned short *local_port, int use_ipv6, int public);
int serversock_get_fd(serversock_t *server);
int serversock_accept(serversock_t *server);
void serversock_destroy(serversock_t *server);
#endif
| Add missing header from last commit | Add missing header from last commit
git-svn-id: 8d82213adbbc6b1538a984bace977d31fcb31691@157 2f5d681c-ba19-11dd-a503-ed2d4bea8bb5
| C | lgpl-2.1 | shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg |
|
e6a607f87407a5bd4e55091960c5ba0e850cb43e | ouzel/CompileConfig.h | ouzel/CompileConfig.h | // Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#pragma once
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)
#define OUZEL_PLATFORM_WINDOWS 1
#define OUZEL_SUPPORTS_DIRECT3D11 1
#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_IOS
#define OUZEL_PLATFORM_IOS 1
#define OUZEL_SUPPORTS_OPENGLES 1
#define OUZEL_SUPPORTS_METAL 1
#elif TARGET_OS_TV
#define OUZEL_PLATFORM_TVOS 1
#define OUZEL_SUPPORTS_OPENGLES 1
#define OUZEL_SUPPORTS_METAL 1
#elif TARGET_OS_MAC
#define OUZEL_PLATFORM_OSX 1
#define OUZEL_SUPPORTS_OPENGL 1
#define OUZEL_SUPPORTS_METAL 1
#endif
#elif defined(__ANDROID__)
#define OUZEL_PLATFORM_ANDROID 1
#define OUZEL_SUPPORTS_OPENGLES 1
#elif defined(__linux__)
#define OUZEL_PLATFORM_LINUX 1
#define OUZEL_SUPPORTS_OPENGL 1
#endif
| // Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#pragma once
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)
#define OUZEL_PLATFORM_WINDOWS 1
#define OUZEL_SUPPORTS_DIRECT3D11 1
#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_IOS
#define OUZEL_PLATFORM_IOS 1
#define OUZEL_SUPPORTS_OPENGLES 1
#define OUZEL_SUPPORTS_METAL 1
#elif TARGET_OS_TV
#define OUZEL_PLATFORM_TVOS 1
#define OUZEL_SUPPORTS_OPENGLES 1
#define OUZEL_SUPPORTS_METAL 1
#elif TARGET_OS_MAC
#define OUZEL_PLATFORM_OSX 1
#define OUZEL_SUPPORTS_OPENGL 1
#define OUZEL_SUPPORTS_METAL 1
#endif
#elif defined(__ANDROID__)
#define OUZEL_PLATFORM_ANDROID 1
#define OUZEL_SUPPORTS_OPENGLES 1
#elif defined(__linux__)
#define OUZEL_PLATFORM_LINUX 1
#if defined(__i386__) || defined(__x86_64__)
#define OUZEL_SUPPORTS_OPENGL 1
#else defined(__arm__) || defined(__aarch64__)
#define OUZEL_SUPPORTS_OPENGLES 1
#endif
#endif
| Define OpenGLES support for ARM | Define OpenGLES support for ARM
| C | unlicense | Hotspotmar/ouzel,elnormous/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,elnormous/ouzel,elvman/ouzel,elnormous/ouzel,elvman/ouzel |
495e4006bb7a95d59ea613ab577897749a75d8ca | LinkedList/insert_node_at_head.c | LinkedList/insert_node_at_head.c | /*
Input Format
You have to complete the Node* Insert(Node* head, int data) method which takes two arguments - the head of the linked list and the integer to insert. You should NOT read any input from stdin/console.
Output Format
Insert the new node at the head and return the head of the updated linked list. Do NOT print anything to stdout/console.
Sample Input
NULL , data = 1
1 --> NULL , data = 2
Sample Output
1 --> NULL
2 --> 1 --> NULL
Explanation
1. We have an empty list, on inserting 1, 1 becomes new head.
2. We have a list with 1 as head, on inserting 2, 2 becomes the new head.
*/
/*
Insert Node at the begining of a linked list
Initially head pointer argument could be NULL for empty list
Node is defined as
struct Node
{
int data;
struct Node *next;
}
return back the pointer to the head of the linked list in the below method.
*/
Node* Insert(Node *head,int data)
{
Node* temp;
temp = (Node*)malloc(sizeof(Node));
temp->data = data;
temp->next = head;
head = temp;
return head;
}
| Add insert node at head fn | Add insert node at head fn
| C | mit | anaghajoshi/HackerRank |
|
1071e256aff979a58d74bbf3127e3b8a771fee1b | tests/regression/61-evalAssert/01-union_evalAssert.c | tests/regression/61-evalAssert/01-union_evalAssert.c | // PARAM: --set trans.activated[+] "assert"
// Running the assert transformation on this test yields in code that is not compilable by gcc
struct s {
int a;
int b;
};
union u {
struct s str;
int i;
};
int main(){
union u un;
struct s* ptr;
un.str.a = 1;
un.str.b = 2;
ptr = &un.str;
int r;
int x;
if(r){
x = 2;
} else {
x = 3;
}
return 0;
}
| // PARAM: --set trans.activated[+] "assert"
// Running the assert transformation on this test used to yield code that cannot be compiled with gcc, due to superfluous offsets on a pointer
struct s {
int a;
int b;
};
union u {
struct s str;
int i;
};
int main(){
union u un;
struct s* ptr;
un.str.a = 1;
un.str.b = 2;
ptr = &un.str;
int r;
int x;
if(r){
x = 2;
} else {
x = 3;
}
return 0;
}
| Update comment in test case. | Update comment in test case.
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
49f067bef623a6fecda0cef6e36e3ffdaeb93c0b | src/cmd_set_node_addr.c | src/cmd_set_node_addr.c | #ifdef __USE_CMSIS
#include "LPC8xx.h"
#endif
#include <cr_section_macros.h>
#include <string.h>
#include "parse_util.h"
#include "cmd.h"
#include "err.h"
#include "frame_buffer.h"
/**
* Set node address
* Args: <node-addr>
*/
extern frame_buffer_type tx_buffer;
int cmd_set_node_addr (int argc, uint8_t **argv) {
if (argc != 2) {
return E_WRONG_ARGC;
}
tx_buffer.header.from_addr=parse_hex(argv[1]);
return E_OK;
}
| #ifdef __USE_CMSIS
#include "LPC8xx.h"
#endif
#include <cr_section_macros.h>
#include <string.h>
#include "parse_util.h"
#include "cmd.h"
#include "err.h"
#include "frame_buffer.h"
/**
* Set node address
* Args: <node-addr>
*/
extern frame_buffer_type tx_buffer;
int cmd_set_node_addr (int argc, uint8_t **argv) {
if (argc == 1) {
MyUARTSendStringZ("n ");
MyUARTPrintHex(tx_buffer.header.from_addr);
MyUARTSendCRLF();
return;
}
if (argc != 2) {
return E_WRONG_ARGC;
}
tx_buffer.header.from_addr=parse_hex(argv[1]);
return E_OK;
}
| Allow for node address query by using 'N' command without parameters | Allow for node address query by using 'N' command without parameters
| C | mit | jdesbonnet/RFM69_LPC812_firmware,jdesbonnet/RFM69_LPC812_firmware,jdesbonnet/RFM69_LPC812_firmware,jdesbonnet/RFM69_LPC812_firmware,jdesbonnet/RFM69_LPC812_firmware,jdesbonnet/RFM69_LPC812_firmware |
4aff13e22152f661ed17221ad6e99486684af761 | ui/base/ime/text_input_flags.h | ui/base/ime/text_input_flags.h | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_BASE_IME_TEXT_INPUT_FLAGS_H_
#define UI_BASE_IME_TEXT_INPUT_FLAGS_H_
namespace ui {
// Intentionally keep in sync with blink::WebTextInputFlags defined in:
// third_party/WebKit/public/web/WebTextInputType.h
enum TextInputFlags {
TEXT_INPUT_FLAG_NONE = 0,
TEXT_INPUT_FLAG_AUTOCOMPLETE_ON = 1 << 0,
TEXT_INPUT_FLAG_AUTOCOMPLETE_OFF = 1 << 1,
TEXT_INPUT_FLAG_AUTOCORRECT_ON = 1 << 2,
TEXT_INPUT_FLAG_AUTOCORRECT_OFF = 1 << 3,
TEXT_INPUT_FLAG_SPELLCHECK_ON = 1 << 4,
TEXT_INPUT_FLAG_SPELLCHECK_OFF = 1 << 5
};
} // namespace ui
#endif // UI_BASE_IME_TEXT_INPUT_FLAGS_H_
| // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_BASE_IME_TEXT_INPUT_FLAGS_H_
#define UI_BASE_IME_TEXT_INPUT_FLAGS_H_
namespace ui {
// Intentionally keep in sync with blink::WebTextInputFlags defined in:
// third_party/WebKit/public/web/WebTextInputType.h
enum TextInputFlags {
TEXT_INPUT_FLAG_NONE = 0,
TEXT_INPUT_FLAG_AUTOCOMPLETE_ON = 1 << 0,
TEXT_INPUT_FLAG_AUTOCOMPLETE_OFF = 1 << 1,
TEXT_INPUT_FLAG_AUTOCORRECT_ON = 1 << 2,
TEXT_INPUT_FLAG_AUTOCORRECT_OFF = 1 << 3,
TEXT_INPUT_FLAG_SPELLCHECK_ON = 1 << 4,
TEXT_INPUT_FLAG_SPELLCHECK_OFF = 1 << 5,
TEXT_INPUT_FLAG_AUTOCAPITALIZE_NONE = 1 << 6,
TEXT_INPUT_FLAG_AUTOCAPITALIZE_CHARACTERS = 1 << 7,
TEXT_INPUT_FLAG_AUTOCAPITALIZE_WORDS = 1 << 8,
TEXT_INPUT_FLAG_AUTOCAPITALIZE_SENTENCES = 1 << 9
};
} // namespace ui
#endif // UI_BASE_IME_TEXT_INPUT_FLAGS_H_
| Update TextInputFlags to include autocapitalize values. | Update TextInputFlags to include autocapitalize values.
This is following the update of WebTextInputType.h update from
https://codereview.chromium.org/995363002
BUG=466930
Review URL: https://codereview.chromium.org/1024833002
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#321736}
| C | bsd-3-clause | Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,ltilve/chromium,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk |
3746bd7dbc57539753aab66813e57207d6fd2c3d | kernel/svc.c | kernel/svc.c | // The Mordax Microkernel
// (c) Kristian Klomsten Skordal 2013 <[email protected]>
// Report bugs and issues on <http://github.com/skordal/mordax/issues>
#include "context.h"
#include "debug.h"
#include "svc.h"
// Supervisor call (software interrupt) handler, called by target assembly
// code:
void svc_interrupt_handler(struct thread_context * context, uint8_t svc)
{
debug_printf("Supervisor call: %d, context at %p\n", svc, context);
debug_printf("\tArgument 1: %x\n", context_get_svc_argument(context, 0));
debug_prinff("\tArgument 2: %x\n", context_get_svc_argument(context, 1));
debug_printf("\tArgument 3: %x\n", context_get_svc_argument(context, 2));
debug_printf("\tReturning 0...\n");
context_set_svc_retval(context, 0);
}
| // The Mordax Microkernel
// (c) Kristian Klomsten Skordal 2013 <[email protected]>
// Report bugs and issues on <http://github.com/skordal/mordax/issues>
#include "context.h"
#include "debug.h"
#include "svc.h"
// Supervisor call (software interrupt) handler, called by target assembly
// code:
void svc_interrupt_handler(struct thread_context * context, uint8_t svc)
{
debug_printf("Supervisor call: %d, context at %p\n", svc, context);
debug_printf("\tArgument 1: %x\n", context_get_svc_argument(context, 0));
debug_printf("\tArgument 2: %x\n", context_get_svc_argument(context, 1));
debug_printf("\tArgument 3: %x\n", context_get_svc_argument(context, 2));
debug_printf("\tReturning 0...\n");
context_set_svc_retval(context, 0);
}
| Fix spelling error in the SVC handler | Fix spelling error in the SVC handler
| C | bsd-3-clause | skordal/mordax |
3c07d1c7fbc93cd413628926a0b57e205b943a6f | profiles/audio/control.h | profiles/audio/control.h | /*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2006-2010 Nokia Corporation
* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]>
*
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#define AUDIO_CONTROL_INTERFACE "org.bluez.Control1"
struct control *control_init(struct audio_device *dev, GSList *uuids);
void control_update(struct control *control, GSList *uuids);
void control_unregister(struct audio_device *dev);
gboolean control_is_active(struct audio_device *dev);
int control_connect(struct audio_device *dev);
int control_disconnect(struct audio_device *dev);
| /*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2006-2010 Nokia Corporation
* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]>
*
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#define AUDIO_CONTROL_INTERFACE "org.bluez.MediaControl1"
struct control *control_init(struct audio_device *dev, GSList *uuids);
void control_update(struct control *control, GSList *uuids);
void control_unregister(struct audio_device *dev);
gboolean control_is_active(struct audio_device *dev);
int control_connect(struct audio_device *dev);
int control_disconnect(struct audio_device *dev);
| Change to org.bluez.MediaControl1 as interface name | audio: Change to org.bluez.MediaControl1 as interface name
| C | lgpl-2.1 | silent-snowman/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,mapfau/bluez,silent-snowman/bluez,silent-snowman/bluez,silent-snowman/bluez,pkarasev3/bluez,mapfau/bluez,mapfau/bluez,pkarasev3/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,ComputeCycles/bluez,ComputeCycles/bluez,ComputeCycles/bluez,pstglia/external-bluetooth-bluez |
e3f1b502c12bfeb2338c43af542c0f36a7f39f13 | chrome/browser/ui/panels/panel_browser_window_gtk.h | chrome/browser/ui/panels/panel_browser_window_gtk.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
class Panel;
class PanelBrowserWindowGtk : public BrowserWindowGtk {
public:
PanelBrowserWindowGtk(Browser* browser, Panel* panel);
virtual ~PanelBrowserWindowGtk() {}
// BrowserWindowGtk overrides
virtual void Init() OVERRIDE;
// BrowserWindow overrides
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
protected:
// BrowserWindowGtk overrides
virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE;
virtual bool HandleTitleBarLeftMousePress(
GdkEventButton* event,
guint32 last_click_time,
gfx::Point last_click_position) OVERRIDE;
virtual void SaveWindowPosition() OVERRIDE;
virtual void SetGeometryHints() OVERRIDE;
virtual bool UseCustomFrame() OVERRIDE;
private:
void SetBoundsImpl();
scoped_ptr<Panel> panel_;
DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
};
#endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
class Panel;
class PanelBrowserWindowGtk : public BrowserWindowGtk {
public:
PanelBrowserWindowGtk(Browser* browser, Panel* panel);
virtual ~PanelBrowserWindowGtk() {}
// BrowserWindowGtk overrides
virtual void Init() OVERRIDE;
// BrowserWindow overrides
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
protected:
// BrowserWindowGtk overrides
virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE;
virtual bool HandleTitleBarLeftMousePress(
GdkEventButton* event,
guint32 last_click_time,
gfx::Point last_click_position) OVERRIDE;
virtual void SaveWindowPosition() OVERRIDE;
virtual void SetGeometryHints() OVERRIDE;
virtual bool UseCustomFrame() OVERRIDE;
private:
void SetBoundsImpl();
Panel* panel_;
DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
};
#endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
| Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK. Reason: PanelBrowserWindow dtor is now complex and cannot be inlined. | Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK.
Reason: PanelBrowserWindow dtor is now complex and cannot be inlined.
BUG=None
TEST=Verified WindowOpenPanel test now hits Panel destructor.
Review URL: http://codereview.chromium.org/7120011
[email protected]
Review URL: http://codereview.chromium.org/7003035
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88159 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium |
75ef1c75dd47a0b4054a767fd94f7c3cf68d2331 | tests/099-c99-example.c | tests/099-c99-example.c | #define x 3
#define f(a) f(x * (a))
#undef x
#define x 2
#define g f
#define z z[0]
#define h g(~
#define m(a) a(w)
#define w 0,1
#define t(a) a
#define p() int
#define q(x) x
#define r(x,y) x ## y
f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);
g(x +(3,4)-w) | h 5) & m
(f)^m(m);
p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,)};
| Add killer test case from the C99 specification. | Add killer test case from the C99 specification.
Happily, this passes now, (since many of the previously added test
cases were extracted from this one).
| C | mit | jbarczak/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,KTXSoftware/glsl2agal,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,KTXSoftware/glsl2agal,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,metora/MesaGLSLCompiler,adobe/glsl2agal,jbarczak/glsl-optimizer,adobe/glsl2agal,wolf96/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,adobe/glsl2agal,benaadams/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,adobe/glsl2agal,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,zz85/glsl-optimizer,metora/MesaGLSLCompiler,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,KTXSoftware/glsl2agal,wolf96/glsl-optimizer,mapbox/glsl-optimizer,adobe/glsl2agal |
|
e3e10e5a788bd65aa65ee133f3740dfc1d91f1eb | src/clientversion.h | src/clientversion.h | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
#define COPYRIGHT_YEAR 2014
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
| #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE false
// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
#define COPYRIGHT_YEAR 2014
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
| Set client release to false | Set client release to false
| C | mit | Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden |
be2319709b9c0c4aa1f3fac648946d318cccf5c9 | ch05/ex6.c | ch05/ex6.c | /*
The content of `example2.txt` will be "Gidday world" because the file offset for
`fd3` will be at the beginning of the file. Only `fd1` and `fd2` share the same
file offset, that's why when writing "HELLO," replaces "Hello," but the next write
(with `fd3`) happens at beginning and then we are left with "Gidday world".
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(__attribute__((unused)) int _argc, __attribute__((unused)) char **argv)
{
int fd1, fd2, fd3;
const char *filename = "example2.txt";
fd1 = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
fd2 = dup(fd1);
fd3 = open(filename, O_RDWR);
write(fd1, "Hello,", 6);
write(fd2, " world", 6);
lseek(fd2, 0, SEEK_SET);
write(fd1, "HELLO,", 6);
write(fd3, "Gidday", 6);
exit(EXIT_SUCCESS);
}
| Add sixth exercise from chapter 5. | Add sixth exercise from chapter 5.
| C | mit | carlosgaldino/lpi |
|
b87325fe34c477f7786e791805bf692dbe79676b | boards/frdm-k22f/board.c | boards/frdm-k22f/board.c | /*
* Copyright (C) 2014 Freie Universität Berlin
* Copyright (C) 2014 PHYTEC Messtechnik GmbH
* Copyright (C) 2017 Eistec AB
*
* 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 boards_frdm-k64f
* @{
*
* @file
* @brief Board specific implementations for the FRDM-K22F
*
* @author Joakim Nohlgård <[email protected]>
*
* @}
*/
#include <stdint.h>
#include "board.h"
#include "mcg.h"
#include "periph/gpio.h"
void board_init(void)
{
/* initialize the CPU core */
cpu_init();
/* initialize and turn off the on-board RGB-LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_set(LED1_PIN);
gpio_set(LED2_PIN);
}
| /*
* Copyright (C) 2014 Freie Universität Berlin
* Copyright (C) 2014 PHYTEC Messtechnik GmbH
* Copyright (C) 2017 Eistec AB
*
* 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 boards_frdm-k22f
* @{
*
* @file
* @brief Board specific implementations for the FRDM-K22F
*
* @author Joakim Nohlgård <[email protected]>
*
* @}
*/
#include "board.h"
#include "periph/gpio.h"
void board_init(void)
{
/* initialize the CPU core */
cpu_init();
/* initialize and turn off the on-board RGB-LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
}
| Fix typos and remove unused includes | frdm-k22f: Fix typos and remove unused includes
| C | lgpl-2.1 | kbumsik/RIOT,mfrey/RIOT,A-Paul/RIOT,OTAkeys/RIOT,smlng/RIOT,rfuentess/RIOT,mtausig/RIOT,jasonatran/RIOT,jasonatran/RIOT,rfuentess/RIOT,miri64/RIOT,authmillenon/RIOT,neiljay/RIOT,smlng/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,gebart/RIOT,yogo1212/RIOT,kaspar030/RIOT,authmillenon/RIOT,BytesGalore/RIOT,kYc0o/RIOT,x3ro/RIOT,authmillenon/RIOT,basilfx/RIOT,authmillenon/RIOT,kbumsik/RIOT,x3ro/RIOT,lazytech-org/RIOT,avmelnikoff/RIOT,mfrey/RIOT,miri64/RIOT,gebart/RIOT,mtausig/RIOT,aeneby/RIOT,OTAkeys/RIOT,ant9000/RIOT,rfuentess/RIOT,yogo1212/RIOT,biboc/RIOT,josephnoir/RIOT,BytesGalore/RIOT,basilfx/RIOT,yogo1212/RIOT,ant9000/RIOT,RIOT-OS/RIOT,gebart/RIOT,biboc/RIOT,BytesGalore/RIOT,OlegHahm/RIOT,biboc/RIOT,lazytech-org/RIOT,smlng/RIOT,basilfx/RIOT,BytesGalore/RIOT,neiljay/RIOT,miri64/RIOT,authmillenon/RIOT,ant9000/RIOT,josephnoir/RIOT,basilfx/RIOT,josephnoir/RIOT,jasonatran/RIOT,cladmi/RIOT,yogo1212/RIOT,toonst/RIOT,kYc0o/RIOT,lazytech-org/RIOT,basilfx/RIOT,aeneby/RIOT,kaspar030/RIOT,authmillenon/RIOT,RIOT-OS/RIOT,aeneby/RIOT,toonst/RIOT,aeneby/RIOT,RIOT-OS/RIOT,aeneby/RIOT,biboc/RIOT,OTAkeys/RIOT,neiljay/RIOT,lazytech-org/RIOT,mfrey/RIOT,smlng/RIOT,jasonatran/RIOT,kbumsik/RIOT,josephnoir/RIOT,ant9000/RIOT,x3ro/RIOT,miri64/RIOT,rfuentess/RIOT,A-Paul/RIOT,gebart/RIOT,cladmi/RIOT,josephnoir/RIOT,OlegHahm/RIOT,OlegHahm/RIOT,x3ro/RIOT,cladmi/RIOT,yogo1212/RIOT,avmelnikoff/RIOT,miri64/RIOT,kbumsik/RIOT,yogo1212/RIOT,rfuentess/RIOT,toonst/RIOT,avmelnikoff/RIOT,OTAkeys/RIOT,neiljay/RIOT,toonst/RIOT,kYc0o/RIOT,kaspar030/RIOT,biboc/RIOT,avmelnikoff/RIOT,RIOT-OS/RIOT,OlegHahm/RIOT,neiljay/RIOT,smlng/RIOT,x3ro/RIOT,ant9000/RIOT,toonst/RIOT,lazytech-org/RIOT,kYc0o/RIOT,avmelnikoff/RIOT,BytesGalore/RIOT,mtausig/RIOT,gebart/RIOT,mfrey/RIOT,OlegHahm/RIOT,mtausig/RIOT,OTAkeys/RIOT,mtausig/RIOT,A-Paul/RIOT,A-Paul/RIOT,jasonatran/RIOT,A-Paul/RIOT,kYc0o/RIOT,kbumsik/RIOT,cladmi/RIOT,cladmi/RIOT,mfrey/RIOT,kaspar030/RIOT |
417dac764140b928a2695c019b2afe51fb48d104 | options.c | options.c | #include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "options.h"
struct Options *Options_parse(int argc, char *argv[]) {
assert(argc > 1);
Options *opts = malloc(sizeof(Options));
assert(opts != NULL);
opts->outfile = NULL;
opts->errfile = NULL;
opts->target = NULL;
opts->child_args = NULL;
int i;
for (i = 1; i < argc; i++) {
switch((int)argv[i][0]) {
case '-':
switch((int)argv[i][1]) {
case 'o':
if (argv[i + 1][0] != '-') {
opts->outfile = strdup(argv[i + 1]);
}
break;
case 'e':
if (argv[i + 1][0] != '-') {
opts->errfile = strdup(argv[i + 1]);
}
break;
case '-':
if (argv[i + 1] != NULL) {
opts->target = &argv[i + 1][0];
opts->child_args = &argv[i + 1];
}
break;
default:
break;
}
break;
default:
break;
}
}
return opts;
}
| #include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "options.h"
struct Options *Options_parse(int argc, char *argv[]) {
assert(argc > 1);
Options *opts = malloc(sizeof(Options));
assert(opts != NULL);
opts->outfile = NULL;
opts->errfile = NULL;
opts->target = NULL;
opts->child_args = NULL;
int i;
for (i = 1; i < argc; i++) {
switch((int)argv[i][0]) {
case '-':
switch((int)argv[i][1]) {
case 'o':
if (argv[i + 1][0] != '-') {
opts->outfile = strdup(argv[i + 1]);
}
break;
case 'e':
if (argv[i + 1][0] != '-') {
opts->errfile = strdup(argv[i + 1]);
}
break;
case '-':
if (argv[i + 1] != NULL) {
opts->target = strdup(argv[i + 1]);
opts->child_args = &argv[i + 1];
}
break;
default:
break;
}
break;
default:
break;
}
}
return opts;
}
| Replace hardref trick with strdup() for consistency. | [minor] Replace hardref trick with strdup() for consistency.
| C | mit | AvianFlu/aeternum |
a4fbbb9d4b14a2c262a54251af06c08767c786ea | src/include/kdbassert.h | src/include/kdbassert.h | /**
* @file
*
* @brief Assertions macros.
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#include <kdbconfig.h>
#ifdef __cplusplus
extern "C" {
#endif
void elektraAbort (const char * expression, const char * function, const char * file, const int line, const char * msg, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 5, 6)))
#endif
// For scan-build / clang analyzer to detect our assertions abort
#ifdef __clang_analyzer__
__attribute__ ((analyzer_noreturn))
#endif
;
#ifdef __cplusplus
}
#endif
#ifndef STRINGIFY
#define STRINGIFY(x) STRINGIFY2 (x)
#define STRINGIFY2(x) #x
#endif
#ifdef ELEKTRA_BMC
#undef NDEBUG
#include <assert.h>
#define ELEKTRA_ASSERT(EXPR, ...) assert (EXPR)
#else
#if DEBUG
#define ELEKTRA_ASSERT(EXPR, ...) ((EXPR)) ? (void)(0) : elektraAbort (STRINGIFY (EXPR), __func__, __FILE__, __LINE__, __VA_ARGS__)
#else
#define ELEKTRA_ASSERT(EXPR, ...)
#endif
#endif
| /**
* @file
*
* @brief Assertions macros.
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#include <kdbconfig.h>
#ifdef __cplusplus
extern "C" {
#endif
void elektraAbort (const char * expression, const char * function, const char * file, const int line, const char * msg, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 5, 6))) __attribute__ ((__noreturn__))
#else
#ifdef __clang_analyzer__
// For scan-build / clang analyzer to detect our assertions abort
__attribute__ ((analyzer_noreturn))
#endif
#endif
;
#ifdef __cplusplus
}
#endif
#ifndef STRINGIFY
#define STRINGIFY(x) STRINGIFY2 (x)
#define STRINGIFY2(x) #x
#endif
#ifdef ELEKTRA_BMC
#undef NDEBUG
#include <assert.h>
#define ELEKTRA_ASSERT(EXPR, ...) assert (EXPR)
#else
#if DEBUG
#define ELEKTRA_ASSERT(EXPR, ...) ((EXPR)) ? (void)(0) : elektraAbort (STRINGIFY (EXPR), __func__, __FILE__, __LINE__, __VA_ARGS__)
#else
#define ELEKTRA_ASSERT(EXPR, ...)
#endif
#endif
| Use more generic attribute if possible | Assertions: Use more generic attribute if possible
We now specify the attribute `__noreturn__` for the function
`elektraAbort` whenever it is available.
| C | bsd-3-clause | BernhardDenner/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,e1528532/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,e1528532/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,petermax2/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,e1528532/libelektra,petermax2/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,mpranj/libelektra,e1528532/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra |
42e0da4a0ce867dbc186665754418f5bce98301f | DcpmPkg/cli/NvmDimmCli.h | DcpmPkg/cli/NvmDimmCli.h | /*
* Copyright (c) 2018, Intel Corporation.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <CommandParser.h>
#if defined(__LINUX__) || defined(__ESX__)
#define EXE_NAME L"ipmctl"
#elif defined(_MSC_VER)
#define EXE_NAME L"ipmctl.exe"
#else
#define EXE_NAME L"ipmctl.efi"
#endif
#define APP_DESCRIPTION L"Command Line Interface"
#define DRIVER_API_DESCRIPTION L"Driver API"
extern EFI_HANDLE gNvmDimmCliHiiHandle;
//
// This is the generated String package data for all .UNI files.
// This data array is ready to be used as input of HiiAddPackages() to
// create a packagelist (which contains Form packages, String packages, etc).
//
extern unsigned char ipmctlStrings[];
extern int g_basic_commands;
/**
Register commands on the commands list
@retval a return code from called functions
**/
EFI_STATUS
RegisterCommands(
);
/**
Register basic commands on the commands list for non-root users
@retval a return code from called functions
**/
EFI_STATUS
RegisterNonAdminUserCommands(
);
/**
Print the CLI application help
**/
EFI_STATUS showHelp(struct Command *pCmd);
| /*
* Copyright (c) 2018, Intel Corporation.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <CommandParser.h>
#if defined(__LINUX__) || defined(__ESX__)
#define EXE_NAME L"ipmctl"
#elif defined(_MSC_VER) && defined(OS_BUILD)
#define EXE_NAME L"ipmctl.exe"
#else
#define EXE_NAME L"ipmctl.efi"
#endif
#define APP_DESCRIPTION L"Command Line Interface"
#define DRIVER_API_DESCRIPTION L"Driver API"
extern EFI_HANDLE gNvmDimmCliHiiHandle;
//
// This is the generated String package data for all .UNI files.
// This data array is ready to be used as input of HiiAddPackages() to
// create a packagelist (which contains Form packages, String packages, etc).
//
extern unsigned char ipmctlStrings[];
extern int g_basic_commands;
/**
Register commands on the commands list
@retval a return code from called functions
**/
EFI_STATUS
RegisterCommands(
);
/**
Register basic commands on the commands list for non-root users
@retval a return code from called functions
**/
EFI_STATUS
RegisterNonAdminUserCommands(
);
/**
Print the CLI application help
**/
EFI_STATUS showHelp(struct Command *pCmd);
| Fix incorrect help message for UEFI | Fix incorrect help message for UEFI
Signed-off-by: Shilpa Nanja <[email protected]>
| C | bsd-3-clause | intel/ipmctl,intel/ipmctl,intel/ipmctl,intel/ipmctl |
82c97cd279c71bdf38776b190201beda2cc37726 | Settings/Controls/Spinner.h | Settings/Controls/Spinner.h | #pragma once
#include "Control.h"
#include <CommCtrl.h>
/// <summary>
/// Manages a 'spin control': a numeric edit box with a up/down 'buddy' to
/// increment or decrement the current value of the box.
/// </summary>
class Spinner : public Control {
public:
Spinner() {
}
Spinner(int id, HWND parent) :
Control(id, parent) {
}
virtual void Enable();
virtual void Disable();
void Buddy(int buddyId);
/// <summary>Sets the range (min, max) for the spin control.</summary>
/// <param name="lo">Lower bound for the spinner.</param>
/// <param name="hi">Upper bound for the spinner.</param>
void Range(int lo, int hi);
std::wstring Text();
bool Text(std::wstring text);
bool Text(int value);
virtual DLGPROC Notification(NMHDR *nHdr);
public:
/* Event Handlers */
std::function<bool(NMUPDOWN *)> OnSpin;
private:
int _buddyId;
HWND _buddyWnd;
};
| #pragma once
#include "Control.h"
#include <CommCtrl.h>
/// <summary>
/// Manages a 'spin control': a numeric edit box with a up/down 'buddy' to
/// increment or decrement the current value of the box.
/// </summary>
class Spinner : public Control {
public:
Spinner() {
}
Spinner(int id, HWND parent) :
Control(id, parent) {
}
virtual void Enable();
virtual void Disable();
void Buddy(int buddyId);
/// <summary>Sets the range (min, max) for the spin control.</summary>
/// <param name="lo">Lower bound for the spinner.</param>
/// <param name="hi">Upper bound for the spinner.</param>
void Range(int lo, int hi);
/// <summary>
/// Unlike the standard Control.Text() method, this uses the spinner buddy
/// to retrieve the text.
/// </summary>
std::wstring Text();
/// <summary>Sets the buddy text.</summary>
bool Text(std::wstring text);
/// <summary>Sets the buddy text.</summary>
bool Text(int value);
virtual DLGPROC Notification(NMHDR *nHdr);
public:
/* Event Handlers */
std::function<bool(NMUPDOWN *)> OnSpin;
private:
int _buddyId;
HWND _buddyWnd;
};
| Add docs for overridden methods | Add docs for overridden methods
| C | bsd-2-clause | Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX |
1be4ab681e086ec83e96d543d37e3474ef400282 | include/llvm/MC/MCObjectFormat.h | include/llvm/MC/MCObjectFormat.h | //===-- llvm/MC/MCObjectFormat.h - Object Format Info -----------*- 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_MCOBJECTFORMAT_H
#define LLVM_MC_MCOBJECTFORMAT_H
namespace llvm {
class MCSymbol;
class MCObjectFormat {
public:
/// isAbsolute - Check if A - B is an absolute value
///
/// \param InSet - True if this expression is in a set. For example:
/// a:
/// ...
/// b:
/// tmp = a - b
/// .long tmp
/// \param A - LHS
/// \param B - RHS
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const = 0;
};
class MCELFObjectFormat : public MCObjectFormat {
public:
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const;
};
class MCMachOObjectFormat : public MCObjectFormat {
public:
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const;
};
class MCCOFFObjectFormat : public MCObjectFormat {
public:
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const;
};
} // End llvm namespace
#endif
| //===-- llvm/MC/MCObjectFormat.h - Object Format Info -----------*- 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_MCOBJECTFORMAT_H
#define LLVM_MC_MCOBJECTFORMAT_H
namespace llvm {
class MCSymbol;
class MCObjectFormat {
public:
virtual ~MCObjectFormat() {}
/// isAbsolute - Check if A - B is an absolute value
///
/// \param InSet - True if this expression is in a set. For example:
/// a:
/// ...
/// b:
/// tmp = a - b
/// .long tmp
/// \param A - LHS
/// \param B - RHS
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const = 0;
};
class MCELFObjectFormat : public MCObjectFormat {
public:
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const;
};
class MCMachOObjectFormat : public MCObjectFormat {
public:
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const;
};
class MCCOFFObjectFormat : public MCObjectFormat {
public:
virtual bool isAbsolute(bool InSet, const MCSymbol &A,
const MCSymbol &B) const;
};
} // End llvm namespace
#endif
| Add a virtual destructor to silence a GCC warning. | Add a virtual destructor to silence a GCC warning.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@116766 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap |
fe6eb2643bf697cd752a0d24b3e278dd42f16644 | WebHereTests/WebHereTests.h | WebHereTests/WebHereTests.h | //
// WebHereTests.h
// WebHereTests
//
// Created by Rui D Lopes on 25/03/13.
// Copyright (c) 2013 Rui D Lopes. All rights reserved.
//
#import <Kiwi/Kiwi.h>
#import <Nocilla/Nocilla.h>
#import <OCLogTemplate/OCLogTemplate.h>
#import <WebHere/WebHere.h>
// Fixtures
#import "WHPerson.h"
#import "WHAdmin.h"
#import "WHUnmatchedPerson.h"
#import "WHPersonQueryForm.h"
#import "WHNSObject.h"
#import "WHLoginForm.h"
| //
// WebHereTests.h
// WebHereTests
//
// Created by Rui D Lopes on 25/03/13.
// Copyright (c) 2013 Rui D Lopes. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
#import <Kiwi/Kiwi.h>
#import <Nocilla/Nocilla.h>
#import <OCLogTemplate/OCLogTemplate.h>
#import <WebHere/WebHere.h>
// Fixtures
#import "WHPerson.h"
#import "WHAdmin.h"
#import "WHUnmatchedPerson.h"
#import "WHPersonQueryForm.h"
#import "WHNSObject.h"
#import "WHLoginForm.h"
# define LOGGING_ENABLED 1
# define LOGGING_LEVEL_TRACE 0
# define LOGGING_LEVEL_INFO 1
# define LOGGING_LEVEL_ERROR 1
# define LOGGING_LEVEL_DEBUG 1
| Add SenTestingKit to test targets | Add SenTestingKit to test targets
| C | mit | noughts/WebHere,noughts/WebHere,noughts/WebHere,noughts/WebHere,rdlopes/WebHere,rdlopes/WebHere,rdlopes/WebHere |
869d6873a53e90dafd702fd64a642849846b5c8c | main.c | main.c | #include <stdint.h>
#include "ports.h"
#include "pic.h"
#include "gdt.h"
#include "idt.h"
#include "irq.h"
#include "screen.h"
void entry(void) {
pic_remap(IRQ0, IRQ8);
pic_set_masks(0, 0);
idt_init((struct IDT *)(0x500));
gdt_init((struct GDT *)(0x500 + sizeof(struct IDT)));
__asm__ __volatile__ ("sti");
screen_init();
__asm__ __volatile__ ("int $0x50");
for(;;) { __asm__ __volatile__ ("hlt"); }
}
| #include <stdint.h>
#include "ports.h"
#include "pic.h"
#include "gdt.h"
#include "idt.h"
#include "irq.h"
#include "screen.h"
void entry(void) {
struct IDT *idt = (struct IDT *)0x500;
struct GDT *gdt = (struct GDT *)(0x500 + sizeof(struct GDT));
pic_remap(IRQ0, IRQ8);
pic_set_masks(0, 0);
idt_init(idt);
__asm__ __volatile__ ("sti");
gdt_init(gdt);
screen_init();
__asm__ __volatile__ ("int $0x50");
for(;;) { __asm__ __volatile__ ("hlt"); }
}
| Enable interrupts before initializing GDT | Enable interrupts before initializing GDT
| C | apache-2.0 | shockkolate/shockk-os,shockkolate/shockk-os,shockkolate/shockk-os |
6f39bf9df903d2c150f1e2590211a91e7277c748 | src/libc4/util/mem.c | src/libc4/util/mem.c | #include <string.h>
#include "c4-internal.h"
void *
ol_alloc(apr_size_t sz)
{
void *result = malloc(sz);
if (result == NULL)
FAIL();
return result;
}
void *
ol_alloc0(apr_size_t sz)
{
void *result = ol_alloc(sz);
memset(result, 0, sz);
return result;
}
void *
ol_realloc(void *ptr, apr_size_t sz)
{
void *result = realloc(ptr, sz);
if (result == NULL)
FAIL();
return result;
}
void
ol_free(void *ptr)
{
free(ptr);
}
char *
ol_strdup(const char *str)
{
size_t len = strlen(str) + 1;
char *result;
result = ol_alloc(len);
memcpy(result, str, len);
return result;
}
apr_pool_t *
make_subpool(apr_pool_t *parent)
{
apr_status_t s;
apr_pool_t *pool;
s = apr_pool_create(&pool, parent);
if (s != APR_SUCCESS)
FAIL();
return pool;
}
| #include <string.h>
#include "c4-internal.h"
void *
ol_alloc(apr_size_t sz)
{
void *result = malloc(sz);
if (result == NULL)
FAIL();
return result;
}
void *
ol_alloc0(apr_size_t sz)
{
void *result = ol_alloc(sz);
memset(result, 0, sz);
return result;
}
void *
ol_realloc(void *ptr, apr_size_t sz)
{
void *result = realloc(ptr, sz);
if (result == NULL)
FAIL();
return result;
}
void
ol_free(void *ptr)
{
free(ptr);
}
char *
ol_strdup(const char *str)
{
size_t len = strlen(str) + 1;
char *result;
result = ol_alloc(len);
memcpy(result, str, len);
return result;
}
apr_pool_t *
make_subpool(apr_pool_t *parent)
{
apr_status_t s;
apr_pool_t *pool;
s = apr_pool_create(&pool, parent);
if (s != APR_SUCCESS)
FAIL_APR(s);
return pool;
}
| Use FAIL_APR() rather than FAIL() in create_subpool(). | Use FAIL_APR() rather than FAIL() in create_subpool().
| C | mit | bloom-lang/c4,bloom-lang/c4,bloom-lang/c4 |
01251507d399d412494b6ee7aa5b6ad9c9b2537b | test/execute/0013-struct5.c | test/execute/0013-struct5.c | struct s1 {
int y;
int z;
};
struct s2 {
struct s1 *p;
};
int main()
{
struct s1 nested;
struct s2 v;
v.p = &nested;
v.p->y = 1;
v.p->z = 2;
if (nested.y != 1)
return 1;
if (nested.z != 2)
return 2;
return 0;
}
| struct T;
struct T {
int x;
};
int
main()
{
struct T v;
{ struct T { int z; }; }
v.x = 2;
if(v.x != 2)
return 1;
return 0;
}
| Add test for simple partial structs. | Add test for simple partial structs.
| C | bsd-2-clause | andrewchambers/c,xtao/c,andrewchambers/c,xtao/c |
7dfa6fe40c6eaa68a46da7afb926e945be8c3cf3 | tests/test.time3.c | tests/test.time3.c | #include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int64_t getTicks();
void sleepFor(int64_t);
int main(int argc, char **argv)
{
int64_t a, b, c, delay;
delay = microsecondsToTicks(500000);
a = getTicks();
sleepFor(delay);
b = getTicks();
sleepFor(delay);
c = getTicks();
if(a + delay <= b)
printf("PASSED PART ONE\n");
else
printf("FAILED PART ONE (%lli + %lli > %lli)\n", a, delay, b);
if(b + delay <= c)
printf("PASSED PART TWO\n");
else
printf("FAILED PART TWO (%lli + %lli > %lli)\n", b, delay, c);
}
| #include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int64_t getTicks();
void sleepFor(int64_t);
int main(int argc, char **argv)
{
int64_t a, b, c, delay;
delay = microsecondsToTicks(500000);
a = getTicks();
sleepFor(delay);
b = getTicks();
sleepFor(delay);
c = getTicks();
if(a + delay <= b)
printf("PASSED PART ONE\n");
else
printf("FAILED PART ONE (%lli + %lli > %lli)\n", a, delay, b);
if(b + delay <= c)
printf("PASSED PART TWO\n");
else
printf("FAILED PART TWO (%lli + %lli > %lli)\n", b, delay, c);
return 0;
}
| Fix the third time test. | Fix the third time test.
| C | bsd-3-clause | elliottt/llvm-threading |
77c380c9d57553e114b253630dcb1283c7096730 | include/iRRAM/mpfr_extension.h | include/iRRAM/mpfr_extension.h |
#ifndef iRRAM_MPFR_EXTENSION_H
#define iRRAM_MPFR_EXTENSION_H
#ifndef GMP_RNDN
#include <mpfr.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
void mpfr_ext_exp (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_log (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_sin (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_cos (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_tan (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_test (mpfr_ptr r, mpfr_srcptr u,int p,mp_rnd_t rnd_mode);
void iRRAM_initialize(int argc,char **argv);
#ifdef __cplusplus
}
#endif
#endif
|
#ifndef iRRAM_MPFR_EXTENSION_H
#define iRRAM_MPFR_EXTENSION_H
#ifndef GMP_RNDN
#include <mpfr.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
void mpfr_ext_exp (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_log (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_sin (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_cos (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_tan (mpfr_ptr r, mpfr_srcptr u,int p);
void mpfr_ext_test (mpfr_ptr r, mpfr_srcptr u,int p,mp_rnd_t rnd_mode);
#ifdef __cplusplus
}
#endif
#endif
| Delete duplicate (and incompatible) declaration of iRRAM_initialize(). | Delete duplicate (and incompatible) declaration of iRRAM_initialize().
| C | lgpl-2.1 | norbert-mueller/iRRAM,norbert-mueller/iRRAM,norbert-mueller/iRRAM |
41ca26bea02e69cdab85cc52756a47176ec83d80 | tests/regression/36-octapron/11-traces-max-simple.c | tests/regression/36-octapron/11-traces-max-simple.c | // PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 1;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
g = 2; // write something non-initial so base wouldn't find success
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
int x, y;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
x = g;
y = g;
assert(x == y);
pthread_mutex_unlock(&A);
// g = g - g - x;
return 0;
}
| // PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 1;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
g = 2; // write something non-initial so base wouldn't find success
assert(g == 2);
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
int x, y;
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
x = g;
y = g;
assert(x == y);
pthread_mutex_unlock(&A);
// g = g - g - x;
return 0;
}
| Add assert after global write in 36/11 | Add assert after global write in 36/11
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
7db5647afebc93b68d5f9b85f0b5fd4796bca28c | tests/regression/39-signed-overflows/02-intervals.c | tests/regression/39-signed-overflows/02-intervals.c | // PARAM: --sets sem.int.signed_overflow assume_none --enable ana.int.interval --disable ana.int.def_exc
int main(void) {
int x = 0;
while(x != 42) {
x++;
assert(x >= 1);
}
}
| Add example that only works with no overflow assumption | Add example that only works with no overflow assumption
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
480b60ec75cd5c22424bb279f1685aa4df442ad5 | src/uci.h | src/uci.h | #ifndef UCI_H
#define UCI_H
#include "board.h"
#include "cmove.h"
#include <sstream>
#include <fstream>
class Uci {
public:
void start();
private:
Board _board;
static const int DEFAULT_DEPTH = 4;
static const int DEFAULT_MAX_TIME = 5000;
void _uciNewGame();
void _setPosition(std::istringstream&);
void _go(std::istringstream&);
void _pickBestMove(int);
};
#endif
| #ifndef UCI_H
#define UCI_H
#include "board.h"
#include "cmove.h"
#include <sstream>
#include <fstream>
class Uci {
public:
void start();
private:
Board _board;
static const int DEFAULT_DEPTH = 4;
void _uciNewGame();
void _setPosition(std::istringstream&);
void _go(std::istringstream&);
void _pickBestMove(int);
};
#endif
| Remove old DEFAULT_MAX_TIME static var | Remove old DEFAULT_MAX_TIME static var
| C | mit | GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue,GunshipPenguin/shallow-blue |
9a02c49ad67f80d1a5839c8c1ab92f3d73e6fbfb | content/public/browser/devtools_frontend_window.h | content/public/browser/devtools_frontend_window.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
#pragma once
class TabContents;
namespace content {
class DevToolsFrontendWindowDelegate;
// Installs delegate for DevTools front-end loaded into |client_tab_contents|.
void SetupDevToolsFrontendDelegate(
TabContents* client_tab_contents,
DevToolsFrontendWindowDelegate* delegate);
}
#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
#define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
#pragma once
class TabContents;
namespace content {
class DevToolsFrontendWindowDelegate;
// Installs delegate for DevTools front-end loaded into |client_tab_contents|.
CONTENT_EXPORT void SetupDevToolsFrontendDelegate(
TabContents* client_tab_contents,
DevToolsFrontendWindowDelegate* delegate);
}
#endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_WINDOW_H_
| Add missing CONTENT_EXPORT to fix Linux shared build after r112415 | Add missing CONTENT_EXPORT to fix Linux shared build after r112415
BUG=104625
TEST=None
TBR=pfeldman
Review URL: http://codereview.chromium.org/8763022
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@112420 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,anirudhSK/chromium,timopulkkinen/BubbleFish,rogerwang/chromium,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,robclark/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,keishi/chromium,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,dednal/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,dednal/chromium.src,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,littlstar/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,dednal/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,rogerwang/chromium,ondra-novak/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,krieger-od/nwjs_chromium.src,dednal/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,ltilve/chromium,littlstar/chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,krieger-od/nwjs_chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,patrickm/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,axinging/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,keishi/chromium,mogoweb/chromium-crosswalk,robclark/chromium,patrickm/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,dednal/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,rogerwang/chromium,keishi/chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,robclark/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,nacl-webkit/chrome_deps,patrickm/chromium.src,Jonekee/chromium.src,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,keishi/chromium,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,ondra-novak/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,rogerwang/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,littlstar/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hujiajie/pa-chromium,M4sse/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,rogerwang/chromium,timopulkkinen/BubbleFish,dednal/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,robclark/chromium,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,ChromiumWebApps/chromium,zcbenz/cefode-chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,keishi/chromium,dednal/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,jaruba/chromium.src,robclark/chromium,rogerwang/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,rogerwang/chromium,dushu1203/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,keishi/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,Just-D/chromium-1,keishi/chromium,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,robclark/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium,keishi/chromium,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,robclark/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,ondra-novak/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,timopulkkinen/BubbleFish,littlstar/chromium.src,mogoweb/chromium-crosswalk |
78606da47fb80ef2b16ad81b5c5f1129857040cd | tensorflow/lite/delegates/gpu/common/status.h | tensorflow/lite/delegates/gpu/common/status.h | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or 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 TENSORFLOW_LITE_DELEGATES_GPU_COMMON_STATUS_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_STATUS_H_
#include "absl/status/status.h"
#define RETURN_IF_ERROR(s) {auto c=(s);if(!c.ok())return c;}
#endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_STATUS_H_
| /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or 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 TENSORFLOW_LITE_DELEGATES_GPU_COMMON_STATUS_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_STATUS_H_
#include "absl/status/status.h" // IWYU pragma: export
#define RETURN_IF_ERROR(s) {auto c=(s);if(!c.ok())return c;} // IWYU pragma: export
#endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_STATUS_H_
| Add include-what-you-use pragma so IWYU does not try to include these files again. | Add include-what-you-use pragma so IWYU does not try to include these files again.
PiperOrigin-RevId: 325359254
Change-Id: Ibeb53b70736036ab22ed59858f31adb0b55c65a7
| C | apache-2.0 | Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,petewarden/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,aam-at/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,aldian/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,annarev/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,petewarden/tensorflow,petewarden/tensorflow,cxxgtxy/tensorflow,aldian/tensorflow,aam-at/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,aldian/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,petewarden/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,karllessard/tensorflow,paolodedios/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,sarvex/tensorflow,aam-at/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,aldian/tensorflow,freedomtan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,karllessard/tensorflow,petewarden/tensorflow,annarev/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,annarev/tensorflow,petewarden/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow |
a5a35e149d204d6b0b3eda5f186e1dc4f66e443d | test/Sema/PR2923.c | test/Sema/PR2923.c | // RUN: clang -fsyntax-only -verify
// Test for absence of crash reported in PR 2923:
//
// http://llvm.org/bugs/show_bug.cgi?id=2923
//
// Previously we had a crash when deallocating the FunctionDecl for 'bar'
// because FunctionDecl::getNumParams() just used the type of foo to determine
// the number of parameters it has. In the case of 'bar' there are no
// ParmVarDecls.
int foo(int x, int y) { return x + y; }
extern typeof(foo) bar;
| // RUN: clang -fsyntax-only -verify %s
// Test for absence of crash reported in PR 2923:
//
// http://llvm.org/bugs/show_bug.cgi?id=2923
//
// Previously we had a crash when deallocating the FunctionDecl for 'bar'
// because FunctionDecl::getNumParams() just used the type of foo to determine
// the number of parameters it has. In the case of 'bar' there are no
// ParmVarDecls.
int foo(int x, int y) { return x + y; }
extern typeof(foo) bar;
| Fix missing %s in run string causing hang during tests. | Fix missing %s in run string causing hang during tests.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58394 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | 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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang |
349ed5a060397fcccc542a0314f236b420bd4ad1 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2006 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k3"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2006 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k4"
| Update driver version to 5.02.00-k4 | [SCSI] qla4xxx: Update driver version to 5.02.00-k4
Signed-off-by: Vikas Chaudhary <[email protected]>
Signed-off-by: Ravi Anand <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs |
130e764d61e4de8002e9725471f556f6ebaa98b8 | tests/regression/00-sanity/21-empty-loops.c | tests/regression/00-sanity/21-empty-loops.c | int main()
{
f_empty_goto_loop();
f_empty_while_loop();
f_empty_goto_loop_suffix();
f_empty_while_loop_suffix();
f_nonempty_goto_loop();
f_nonempty_while_loop();
return 0;
}
void f_empty_goto_loop()
{
f_empty_goto_loop_label:
goto f_empty_goto_loop_label;
}
void f_empty_while_loop()
{
while (1) {}
}
void suffix()
{
}
void f_empty_goto_loop_suffix()
{
f_empty_goto_loop_suffix_label:
goto f_empty_goto_loop_suffix_label;
suffix();
}
void f_empty_while_loop_suffix()
{
while (1) {}
suffix();
}
void body()
{
}
void f_nonempty_goto_loop()
{
f_nonempty_goto_loop_label:
body();
goto f_nonempty_goto_loop_label;
}
void f_nonempty_while_loop()
{
while (1)
{
body();
}
} | int main()
{
// non-deterministically make all variants live
int r;
switch (r)
{
case 0:
f_empty_goto_loop();
break;
case 1:
f_empty_while_loop();
break;
case 2:
f_empty_goto_loop_suffix();
break;
case 3:
f_empty_while_loop_suffix();
break;
case 4:
f_nonempty_goto_loop();
break;
case 5:
f_nonempty_while_loop();
break;
}
return 0;
}
void f_empty_goto_loop()
{
f_empty_goto_loop_label:
goto f_empty_goto_loop_label;
}
void f_empty_while_loop()
{
while (1) {}
}
void suffix()
{
}
void f_empty_goto_loop_suffix()
{
f_empty_goto_loop_suffix_label:
goto f_empty_goto_loop_suffix_label;
suffix();
}
void f_empty_while_loop_suffix()
{
while (1) {}
suffix();
}
void body()
{
}
void f_nonempty_goto_loop()
{
f_nonempty_goto_loop_label:
body();
goto f_nonempty_goto_loop_label;
}
void f_nonempty_while_loop()
{
while (1)
{
body();
}
} | Change 00/21 to make all loops live | Change 00/21 to make all loops live
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
0ce1a01b7969f9e20febdd0da39a69504570ce8c | src/tools/gen/template/elektra_gen.c | src/tools/gen/template/elektra_gen.c | /**
* @file
*
* @brief
*
* @copyright BSD License (see doc/LICENSE.md or https://www.libelektra.org)
*/
#compiler-settings
directiveStartToken = @
cheetahVarStartToken = $
#end compiler-settings
@from support.elektra_gen import *
@set support = ElektraGenSupport()
@for $key, $info in $parameters.iteritems()
@if $support.type_of($info) == "enum"
ELEKTRA_DEFINITIONS ($support.enum_type($key), $support.enum_type_name($key), "enum", KDB_LONG_TO_STRING, KDB_STRING_TO_LONG)
@end if
@end for
| /**
* @file
*
* @brief
*
* @copyright BSD License (see doc/LICENSE.md or https://www.libelektra.org)
*/
#compiler-settings
directiveStartToken = @
cheetahVarStartToken = $
#end compiler-settings
@from support.elektra_gen import *
@set support = ElektraGenSupport()
#include <stdlib.h>
#include <elektra.h>
#include <kdbhelper.h>
#include "elektra_gen.h"
KDBType KDB_TYPE_ENUM = "enum";
#define KDB_ENUM_TO_STRING(value) elektraFormat (ELEKTRA_LONG_F, value)
#define KDB_STRING_TO_ENUM(string) (kdb_long_t) strtoul (string, NULL, 10)
@for $key, $info in $parameters.iteritems()
@if $support.type_of($info) == "enum"
ELEKTRA_DEFINITIONS ($support.enum_type($key), $support.enum_type_name($key), KDB_TYPE_ENUM, KDB_ENUM_TO_STRING, KDB_STRING_TO_ENUM)
@end if
@end for
#undef KDB_ENUM_TO_STRING
#undef KDB_STRING_TO_ENUM | Add defines for enum type and conversions | codegen: Add defines for enum type and conversions
| C | bsd-3-clause | ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,petermax2/libelektra,BernhardDenner/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,BernhardDenner/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,petermax2/libelektra |
8c2382d076c3078bdf6b45af2523092dc2a513dd | page.h | page.h | #ifndef PAGE_H
#define PAGE_H
#include <stddef.h>
#define PAGE_SIZE 4096ULL
#define PAGE_SIZE_MASK (PAGE_SIZE - 1)
#define PAGE_ALIGN_DOWN(x) (\
(void *) ((size_t) (x) & ~PAGE_SIZE_MASK) \
)
#define PAGE_ALIGN_UP(x) (\
(void *) ((size_t) ((x) + PAGE_SIZE_MASK) & ~PAGE_SIZE_MASK) \
)
#define PAGE_ALIGNED(x) (\
0 == ((size_t) (x) & PAGE_SIZE_MASK) \
)
#define PAGE_DIVISIBLE(x) (\
0 == ((x) % PAGE_SIZE) \
)
#endif /* end of include guard: PAGE_H */
| Add file that is accidentally removed. | Add file that is accidentally removed.
| C | mit | chaoran/fibril,chaoran/fibril,chaoran/fibril |
|
bff700a9652cda6b6201283e5a3623fa5ce0987c | CefSharp.BrowserSubprocess.Core/JavascriptPropertyWrapper.h | CefSharp.BrowserSubprocess.Core/JavascriptPropertyWrapper.h | // Copyright 2010-2014 The CefSharp Project. 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_v8.h"
using namespace CefSharp::Internals;
namespace CefSharp
{
public ref class JavascriptPropertyWrapper
{
private:
JavascriptProperty^ _javascriptProperty;
int64 _ownerId;
IBrowserProcess^ _browserProcess;
Object^ _javascriptObjectWrapper;
internal:
MCefRefPtr<CefV8Value> V8Value;
public:
JavascriptPropertyWrapper(JavascriptProperty^ javascriptProperty, int64 ownerId, IBrowserProcess^ browserProcess)
{
_javascriptProperty = javascriptProperty;
_ownerId = ownerId;
_browserProcess = browserProcess;
}
~JavascriptPropertyWrapper()
{
V8Value = nullptr;
if (_javascriptObjectWrapper != nullptr)
{
delete _javascriptObjectWrapper;
_javascriptObjectWrapper = nullptr;
}
}
void Bind();
};
} | // Copyright 2010-2014 The CefSharp Project. 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_v8.h"
using namespace CefSharp::Internals;
namespace CefSharp
{
public ref class JavascriptPropertyWrapper
{
private:
JavascriptProperty^ _javascriptProperty;
int64 _ownerId;
IBrowserProcess^ _browserProcess;
//TODO: Strongly type this variable - currently trying to include JavascriptObjectWrapper.h creates a circular reference, so won't compile
Object^ _javascriptObjectWrapper;
internal:
MCefRefPtr<CefV8Value> V8Value;
public:
JavascriptPropertyWrapper(JavascriptProperty^ javascriptProperty, int64 ownerId, IBrowserProcess^ browserProcess)
{
_javascriptProperty = javascriptProperty;
_ownerId = ownerId;
_browserProcess = browserProcess;
}
~JavascriptPropertyWrapper()
{
V8Value = nullptr;
if (_javascriptObjectWrapper != nullptr)
{
delete _javascriptObjectWrapper;
_javascriptObjectWrapper = nullptr;
}
}
void Bind();
};
} | Add TODO about strongly typing variable | Add TODO about strongly typing variable
| C | bsd-3-clause | battewr/CefSharp,ruisebastiao/CefSharp,Haraguroicha/CefSharp,wangzheng888520/CefSharp,rover886/CefSharp,jamespearce2006/CefSharp,gregmartinhtc/CefSharp,VioletLife/CefSharp,NumbersInternational/CefSharp,Haraguroicha/CefSharp,NumbersInternational/CefSharp,yoder/CefSharp,AJDev77/CefSharp,ITGlobal/CefSharp,VioletLife/CefSharp,haozhouxu/CefSharp,battewr/CefSharp,Livit/CefSharp,jamespearce2006/CefSharp,NumbersInternational/CefSharp,zhangjingpu/CefSharp,Haraguroicha/CefSharp,jamespearce2006/CefSharp,VioletLife/CefSharp,gregmartinhtc/CefSharp,Octopus-ITSM/CefSharp,Haraguroicha/CefSharp,Octopus-ITSM/CefSharp,rover886/CefSharp,NumbersInternational/CefSharp,haozhouxu/CefSharp,Octopus-ITSM/CefSharp,joshvera/CefSharp,dga711/CefSharp,illfang/CefSharp,dga711/CefSharp,illfang/CefSharp,dga711/CefSharp,gregmartinhtc/CefSharp,windygu/CefSharp,ITGlobal/CefSharp,jamespearce2006/CefSharp,zhangjingpu/CefSharp,rlmcneary2/CefSharp,illfang/CefSharp,Octopus-ITSM/CefSharp,ruisebastiao/CefSharp,ITGlobal/CefSharp,joshvera/CefSharp,wangzheng888520/CefSharp,AJDev77/CefSharp,battewr/CefSharp,Haraguroicha/CefSharp,windygu/CefSharp,wangzheng888520/CefSharp,windygu/CefSharp,joshvera/CefSharp,AJDev77/CefSharp,wangzheng888520/CefSharp,Livit/CefSharp,battewr/CefSharp,Livit/CefSharp,Livit/CefSharp,zhangjingpu/CefSharp,zhangjingpu/CefSharp,windygu/CefSharp,dga711/CefSharp,twxstar/CefSharp,rover886/CefSharp,twxstar/CefSharp,VioletLife/CefSharp,ITGlobal/CefSharp,rover886/CefSharp,yoder/CefSharp,gregmartinhtc/CefSharp,rlmcneary2/CefSharp,AJDev77/CefSharp,rlmcneary2/CefSharp,twxstar/CefSharp,haozhouxu/CefSharp,rover886/CefSharp,jamespearce2006/CefSharp,twxstar/CefSharp,ruisebastiao/CefSharp,joshvera/CefSharp,rlmcneary2/CefSharp,haozhouxu/CefSharp,yoder/CefSharp,illfang/CefSharp,ruisebastiao/CefSharp,yoder/CefSharp |
4e852145739b73d18924477c6cacc331243c8b1c | opencog/learning/feature-selection/scorers/fs_scorer_base.h | opencog/learning/feature-selection/scorers/fs_scorer_base.h | /** fs_scorer_base.h ---
*
* Copyright (C) 2013 OpenCog Foundation
*
* Author: Nil Geisweiller
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License v3 as
* published by the Free Software Foundation and including the exceptions
* at http://opencog.org/wiki/Licenses
*
* 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 Affero General Public License
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _OPENCOG_BASE_SCORER_H
#define _OPENCOG_BASE_SCORER_H
#include <opencog/comboreduct/table/table.h>
namespace opencog {
using namespace combo;
template<typename FeatureSet>
struct fs_scorer_base : public std::unary_function<FeatureSet, double> {
// ctor
fs_scorer_base(const CTable& ctable, double confi)
: _ctable(ctable), _confi(confi), _usize(_ctable.uncompressed_size()) {}
// dtor
virtual ~fs_scorer_base() {};
virtual double operator()(const FeatureSet& features) const = 0;
protected:
// Very rought approximation of the confidence in the feature
// quality measure
double confidence(unsigned fs_size) const {
return _usize / (_usize + exp(-_confi*fs_size));
}
const CTable& _ctable;
double _confi; // confidence intensity
unsigned _usize; // uncompressed ctable size
};
}
#endif // _OPENCOG_BASE_SCORER_H
| Add base class from fs scorers | Add base class from fs scorers
That class include some confidence computation to be easily shared
among feature selection scorers.
| C | agpl-3.0 | cosmoharrigan/atomspace,jswiergo/atomspace,Allend575/opencog,kim135797531/opencog,anitzkin/opencog,rohit12/opencog,ArvinPan/atomspace,virneo/opencog,zhaozengguang/opencog,gaapt/opencog,virneo/opencog,ArvinPan/opencog,Selameab/atomspace,TheNameIsNigel/opencog,virneo/opencog,printedheart/atomspace,tim777z/opencog,rodsol/atomspace,Tiggels/opencog,yantrabuddhi/opencog,jlegendary/opencog,eddiemonroe/opencog,kinoc/opencog,sumitsourabh/opencog,kim135797531/opencog,virneo/opencog,yantrabuddhi/opencog,ceefour/atomspace,shujingke/opencog,printedheart/opencog,rohit12/opencog,AmeBel/opencog,tim777z/opencog,rodsol/opencog,inflector/atomspace,UIKit0/atomspace,inflector/opencog,yantrabuddhi/atomspace,williampma/atomspace,andre-senna/opencog,gaapt/opencog,MarcosPividori/atomspace,gaapt/opencog,shujingke/opencog,Tiggels/opencog,misgeatgit/atomspace,anitzkin/opencog,cosmoharrigan/opencog,TheNameIsNigel/opencog,MarcosPividori/atomspace,rohit12/opencog,yantrabuddhi/atomspace,ceefour/opencog,printedheart/opencog,yantrabuddhi/opencog,yantrabuddhi/atomspace,andre-senna/opencog,shujingke/opencog,misgeatgit/opencog,ruiting/opencog,iAMr00t/opencog,misgeatgit/atomspace,prateeksaxena2809/opencog,jswiergo/atomspace,printedheart/atomspace,williampma/opencog,yantrabuddhi/atomspace,sumitsourabh/opencog,jlegendary/opencog,cosmoharrigan/opencog,jlegendary/opencog,inflector/opencog,shujingke/opencog,MarcosPividori/atomspace,cosmoharrigan/atomspace,kim135797531/opencog,ArvinPan/opencog,sanuj/opencog,andre-senna/opencog,Allend575/opencog,ArvinPan/opencog,eddiemonroe/atomspace,gavrieltal/opencog,misgeatgit/opencog,eddiemonroe/atomspace,sanuj/opencog,jlegendary/opencog,eddiemonroe/atomspace,gaapt/opencog,ruiting/opencog,TheNameIsNigel/opencog,gaapt/opencog,UIKit0/atomspace,kim135797531/opencog,Allend575/opencog,TheNameIsNigel/opencog,UIKit0/atomspace,roselleebarle04/opencog,TheNameIsNigel/opencog,Allend575/opencog,zhaozengguang/opencog,rodsol/opencog,kinoc/opencog,Selameab/atomspace,roselleebarle04/opencog,AmeBel/atomspace,Selameab/opencog,shujingke/opencog,shujingke/opencog,gaapt/opencog,eddiemonroe/atomspace,eddiemonroe/opencog,jswiergo/atomspace,misgeatgit/opencog,sanuj/opencog,prateeksaxena2809/opencog,virneo/opencog,williampma/atomspace,misgeatgit/opencog,ArvinPan/opencog,tim777z/opencog,yantrabuddhi/atomspace,eddiemonroe/opencog,printedheart/opencog,sumitsourabh/opencog,ceefour/opencog,roselleebarle04/opencog,ceefour/atomspace,printedheart/atomspace,sumitsourabh/opencog,inflector/opencog,inflector/atomspace,williampma/atomspace,tim777z/opencog,cosmoharrigan/opencog,andre-senna/opencog,inflector/atomspace,anitzkin/opencog,sanuj/opencog,kinoc/opencog,kinoc/opencog,cosmoharrigan/opencog,rodsol/atomspace,ruiting/opencog,AmeBel/atomspace,Selameab/opencog,ArvinPan/opencog,sanuj/opencog,misgeatgit/atomspace,roselleebarle04/opencog,rodsol/opencog,Selameab/atomspace,inflector/opencog,anitzkin/opencog,yantrabuddhi/opencog,ceefour/atomspace,ruiting/opencog,AmeBel/opencog,rodsol/opencog,iAMr00t/opencog,eddiemonroe/opencog,printedheart/opencog,sumitsourabh/opencog,williampma/opencog,williampma/opencog,virneo/atomspace,rTreutlein/atomspace,shujingke/opencog,roselleebarle04/opencog,ceefour/atomspace,williampma/opencog,ceefour/opencog,AmeBel/opencog,eddiemonroe/opencog,cosmoharrigan/opencog,Allend575/opencog,virneo/opencog,anitzkin/opencog,gavrieltal/opencog,TheNameIsNigel/opencog,eddiemonroe/opencog,prateeksaxena2809/opencog,gavrieltal/opencog,Tiggels/opencog,Tiggels/opencog,iAMr00t/opencog,rodsol/opencog,virneo/atomspace,ArvinPan/atomspace,ruiting/opencog,zhaozengguang/opencog,rodsol/atomspace,kim135797531/opencog,ArvinPan/atomspace,andre-senna/opencog,gavrieltal/opencog,andre-senna/opencog,prateeksaxena2809/opencog,Selameab/opencog,virneo/opencog,sumitsourabh/opencog,tim777z/opencog,williampma/atomspace,gavrieltal/opencog,ceefour/opencog,inflector/opencog,eddiemonroe/opencog,kinoc/opencog,tim777z/opencog,printedheart/atomspace,Selameab/opencog,AmeBel/opencog,rTreutlein/atomspace,Selameab/opencog,rTreutlein/atomspace,kinoc/opencog,prateeksaxena2809/opencog,williampma/opencog,Allend575/opencog,ArvinPan/atomspace,roselleebarle04/opencog,inflector/atomspace,AmeBel/atomspace,misgeatgit/opencog,rohit12/atomspace,sanuj/opencog,ceefour/opencog,jlegendary/opencog,misgeatgit/atomspace,jlegendary/opencog,MarcosPividori/atomspace,Tiggels/opencog,ruiting/opencog,rohit12/opencog,zhaozengguang/opencog,inflector/opencog,misgeatgit/atomspace,kim135797531/opencog,gaapt/opencog,Selameab/atomspace,Allend575/opencog,cosmoharrigan/opencog,zhaozengguang/opencog,AmeBel/opencog,printedheart/opencog,prateeksaxena2809/opencog,jlegendary/opencog,AmeBel/opencog,AmeBel/atomspace,ceefour/opencog,AmeBel/atomspace,inflector/opencog,williampma/opencog,iAMr00t/opencog,ArvinPan/opencog,kim135797531/opencog,anitzkin/opencog,rodsol/opencog,roselleebarle04/opencog,yantrabuddhi/opencog,rohit12/atomspace,yantrabuddhi/opencog,ruiting/opencog,gavrieltal/opencog,kinoc/opencog,ceefour/opencog,cosmoharrigan/atomspace,inflector/opencog,inflector/atomspace,Tiggels/opencog,yantrabuddhi/opencog,misgeatgit/opencog,Selameab/opencog,prateeksaxena2809/opencog,printedheart/opencog,rohit12/opencog,zhaozengguang/opencog,virneo/atomspace,rohit12/atomspace,misgeatgit/opencog,iAMr00t/opencog,misgeatgit/opencog,cosmoharrigan/atomspace,eddiemonroe/atomspace,AmeBel/opencog,UIKit0/atomspace,jswiergo/atomspace,rodsol/atomspace,anitzkin/opencog,gavrieltal/opencog,rTreutlein/atomspace,iAMr00t/opencog,misgeatgit/opencog,rTreutlein/atomspace,andre-senna/opencog,rohit12/atomspace,sumitsourabh/opencog,rohit12/opencog,virneo/atomspace |
|
0343c07262e1334e296850aee21f6702b13233e0 | SearchResultsView/WindowClassHolder.h | SearchResultsView/WindowClassHolder.h | #pragma once
class WindowClassHolder
{
private:
ATOM m_WindowClass;
public:
WindowClassHolder() :
m_WindowClass(0)
{
}
WindowClassHolder(ATOM windowClass) :
m_WindowClass(windowClass)
{
}
WindowClassHolder& operator=(ATOM windowClass)
{
if (m_WindowClass != 0)
UnregisterClassW(*this, GetModuleHandleW(nullptr));
m_WindowClass = windowClass;
return *this;
}
WindowClassHolder(const WindowClassHolder&) = delete;
WindowClassHolder& operator=(const WindowClassHolder&) = delete;
inline operator ATOM() const
{
return m_WindowClass;
}
inline operator const wchar_t*() const
{
return reinterpret_cast<const wchar_t*>(m_WindowClass);
}
}; | #pragma once
class WindowClassHolder
{
private:
ATOM m_WindowClass;
public:
WindowClassHolder() :
m_WindowClass(0)
{
}
WindowClassHolder(ATOM windowClass) :
m_WindowClass(windowClass)
{
}
~WindowClassHolder()
{
if (m_WindowClass != 0)
UnregisterClassW(*this, GetModuleHandleW(nullptr));
}
WindowClassHolder& operator=(ATOM windowClass)
{
this->~WindowClassHolder();
m_WindowClass = windowClass;
return *this;
}
WindowClassHolder(const WindowClassHolder&) = delete;
WindowClassHolder& operator=(const WindowClassHolder&) = delete;
inline operator ATOM() const
{
return m_WindowClass;
}
inline operator const wchar_t*() const
{
return reinterpret_cast<const wchar_t*>(m_WindowClass);
}
}; | Fix WindowsClassHolder destructor doing nothing. | Fix WindowsClassHolder destructor doing nothing.
| C | mit | TautvydasZilys/FileSystemSearch,TautvydasZilys/FileSystemSearch,TautvydasZilys/FileSystemSearch |
789abe81157c63e6893b89f9c6f249f27d7286cd | include/nekit/transport/listener_interface.h | include/nekit/transport/listener_interface.h | // MIT License
// Copyright (c) 2017 Zhuhao Wang
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#pragma once
#include <functional>
#include <memory>
#include <system_error>
#include "connection_interface.h"
namespace nekit {
namespace transport {
class ListenerInterface {
public:
virtual ~ListenerInterface() = default;
using EventHandler = std::function<void(
std::unique_ptr<ConnectionInterface>&&, std::error_code)>;
virtual void Accept(EventHandler&&);
};
} // namespace transport
} // namespace nekit
| // MIT License
// Copyright (c) 2017 Zhuhao Wang
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#pragma once
#include <functional>
#include <memory>
#include <system_error>
#include "connection_interface.h"
namespace nekit {
namespace transport {
class ListenerInterface {
public:
virtual ~ListenerInterface() = default;
using EventHandler = std::function<void(
std::unique_ptr<ConnectionInterface>&&, std::error_code)>;
virtual void Accept(EventHandler&&) = 0;
};
} // namespace transport
} // namespace nekit
| Add missing mark for pure virtual method | FIX: Add missing mark for pure virtual method
| C | mit | zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit |
4ba9ea887633b3783bd86aae9da2a35bcd25bffd | src/sw/siagen/siagen.h | src/sw/siagen/siagen.h | #ifndef MIAOW_SIAGEN_H
#define MIAOW_SIAGEN_H
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "asm.h"
#include "helper.h"
#define MAX_INSTR 1000
#define MAX_OPS 50
#define INSTR_TYPES 4
#define SCALAR_ALU 0
#define VECTOR_ALU 1
#define SCALAR_MEM 2
#define VECTOR_MEM 3
typedef void(*instr_function)(int);
typedef struct _instr
{
int opcode;
char op_str[30];
} Instr;
typedef struct _instr_sel
{
enum si_fmt_enum instr_type;
Instr instr;
instr_function instr_func;
} Instr_Sel;
void initializeInstrArr(int *arr, int array_size);
void printInstrsInArray(int arr[MAX_INSTR]);
void printAllUnitTests();
#endif
| #ifndef MIAOW_SIAGEN_H
#define MIAOW_SIAGEN_H
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string>
#include "asm.h"
#include "helper.h"
#define MAX_INSTR 1000
#define MAX_OPS 50
#define INSTR_TYPES 4
#define SCALAR_ALU 0
#define VECTOR_ALU 1
#define SCALAR_MEM 2
#define VECTOR_MEM 3
typedef void(*instr_function)(int);
typedef struct _instr
{
int opcode;
std::string op_str;
} Instr;
typedef struct _instr_sel
{
enum si_fmt_enum instr_type;
Instr instr;
instr_function instr_func;
} Instr_Sel;
void initializeInstrArr(int *arr, int array_size);
void printInstrsInArray(int arr[MAX_INSTR]);
void printAllUnitTests();
#endif
| Fix build on Linux where gcc apparently enforces character arrays as arrays for initialization purposes. | Fix build on Linux where gcc apparently enforces character arrays as arrays for initialization purposes.
| C | bsd-3-clause | VerticalResearchGroup/miaow,VerticalResearchGroup/miaow,VerticalResearchGroup/miaow,VerticalResearchGroup/miaow |
0212bc7e650e26838796be41f161b5711d502066 | source/glbinding/include/glbinding/callbacks.h | source/glbinding/include/glbinding/callbacks.h | #pragma once
#include <glbinding/glbinding_api.h>
#include <set>
#include <vector>
#include <functional>
namespace glbinding
{
class AbstractFunction;
class AbstractValue;
struct GLBINDING_API FunctionCall
{
FunctionCall(const AbstractFunction * _function);
~FunctionCall();
FunctionCall & operator=(const FunctionCall &) = delete;
const AbstractFunction & function;
std::vector<AbstractValue *> parameters;
AbstractValue * returnValue;
};
enum class CallbackMask : unsigned char
{
None = 0x00,
Unresolved = 0x01,
Before = 0x02,
After = 0x04,
Parameters = 0x08,
ReturnValue = 0x10,
ParametersAndReturnValue = Parameters | ReturnValue,
BeforeAndAfter = Before | After
};
GLBINDING_API CallbackMask operator|(CallbackMask a, CallbackMask b);
GLBINDING_API void setCallbackMask(CallbackMask mask);
GLBINDING_API void setCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
using SimpleFunctionCallback = std::function<void(const AbstractFunction &)>;
using FunctionCallback = std::function<void(const FunctionCall &)>;
GLBINDING_API void setUnresolvedCallback(SimpleFunctionCallback callback);
GLBINDING_API void setBeforeCallback(FunctionCallback callback);
GLBINDING_API void setAfterCallback(FunctionCallback callback);
} // namespace glbinding
| #pragma once
#include <glbinding/glbinding_api.h>
#include <set>
#include <vector>
#include <functional>
#include <string>
namespace glbinding
{
class AbstractFunction;
class AbstractValue;
struct GLBINDING_API FunctionCall
{
FunctionCall(const AbstractFunction * _function);
~FunctionCall();
FunctionCall & operator=(const FunctionCall &) = delete;
const AbstractFunction & function;
std::vector<AbstractValue *> parameters;
AbstractValue * returnValue;
};
enum class CallbackMask : unsigned char
{
None = 0x00,
Unresolved = 0x01,
Before = 0x02,
After = 0x04,
Parameters = 0x08,
ReturnValue = 0x10,
ParametersAndReturnValue = Parameters | ReturnValue,
BeforeAndAfter = Before | After
};
GLBINDING_API CallbackMask operator|(CallbackMask a, CallbackMask b);
GLBINDING_API void setCallbackMask(CallbackMask mask);
GLBINDING_API void setCallbackMaskExcept(CallbackMask mask, const std::set<std::string> & blackList);
using SimpleFunctionCallback = std::function<void(const AbstractFunction &)>;
using FunctionCallback = std::function<void(const FunctionCall &)>;
GLBINDING_API void setUnresolvedCallback(SimpleFunctionCallback callback);
GLBINDING_API void setBeforeCallback(FunctionCallback callback);
GLBINDING_API void setAfterCallback(FunctionCallback callback);
} // namespace glbinding
| Fix compilation for gcc 4.7 | Fix compilation for gcc 4.7
| C | mit | hpi-r2d2/glbinding,j-o/glbinding,hpicgs/glbinding,hpicgs/glbinding,mcleary/glbinding,mcleary/glbinding,mcleary/glbinding,hpicgs/glbinding,j-o/glbinding,j-o/glbinding,cginternals/glbinding,hpi-r2d2/glbinding,cginternals/glbinding,hpicgs/glbinding,hpi-r2d2/glbinding,j-o/glbinding,mcleary/glbinding,hpi-r2d2/glbinding |
f649dac8e0fa6e0a1db57e68ce7d664ddba8e053 | asylo/platform/posix/include/sys/un.h | asylo/platform/posix/include/sys/un.h | /*
*
* Copyright 2017 Asylo authors
*
* 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 ASYLO_PLATFORM_POSIX_INCLUDE_SYS_UN_H_
#define ASYLO_PLATFORM_POSIX_INCLUDE_SYS_UN_H_
#include <sys/cdefs.h>
struct sockaddr_un {
uint16_t sun_family;
char sun_path[108];
};
#endif // ASYLO_PLATFORM_POSIX_INCLUDE_SYS_UN_H_
| /*
*
* Copyright 2017 Asylo authors
*
* 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 ASYLO_PLATFORM_POSIX_INCLUDE_SYS_UN_H_
#define ASYLO_PLATFORM_POSIX_INCLUDE_SYS_UN_H_
#include <stdint.h>
#include <sys/cdefs.h>
struct sockaddr_un {
uint16_t sun_family;
char sun_path[108];
};
#endif // ASYLO_PLATFORM_POSIX_INCLUDE_SYS_UN_H_
| Add missing include needed to define uint16_t | Add missing include needed to define uint16_t
PiperOrigin-RevId: 228541302
| C | apache-2.0 | google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo |
f8d49e58c5e5293268574379cad058551f971ddd | tests/regression/36-apron/68-pfscan-workers-strengthening.c | tests/regression/36-apron/68-pfscan-workers-strengthening.c | // SKIP PARAM: --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.apron.privatization mutex-meet --set sem.int.signed_overflow assume_none --enable ana.apron.strengthening
// minimized pfscan with relational workers invariant
// mutex-meet: needs strengthening even with path_sens threadflag
// mutex-meet-tid: doesn't need strengthening
// needs assume_none to avoid top via some lost upper bounds
#include <pthread.h>
struct __anonstruct_PQUEUE_63 {
pthread_mutex_t mtx ;
pthread_cond_t less ;
};
typedef struct __anonstruct_PQUEUE_63 PQUEUE;
int nworkers = 0;
int aworkers = 0;
pthread_mutex_t aworker_lock = PTHREAD_MUTEX_INITIALIZER;
PQUEUE pqb ;
void *worker(void *arg)
{
pthread_mutex_lock(& aworker_lock);
aworkers --;
assert(aworkers <= nworkers);
pthread_mutex_unlock(& aworker_lock);
return NULL;
}
int main()
{
int r ; // rand
pthread_t tid ;
nworkers = r;
aworkers = nworkers;
for (int j = 0; j < nworkers; j++)
pthread_create(& tid, NULL, & worker, NULL);
while (1) {
pthread_cond_wait(&pqb.less, &pqb.mtx); // some weirdness that exposes the problem
}
return 0;
}
| Add minimized pfscan workers test | Add minimized pfscan workers test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
4fc2b73eb3053f687f4b72adb1c97b0e53283322 | test/FrontendC/2006-01-16-BitCountIntrinsicsUnsigned.c | test/FrontendC/2006-01-16-BitCountIntrinsicsUnsigned.c | // RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32( i32} | count 2
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | count 1
unsigned t2(unsigned X) {
return __builtin_clz(X);
}
int t1(int X) {
return __builtin_clz(X);
}
| // RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | count 2
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | count 1
unsigned t2(unsigned X) {
return __builtin_clz(X);
}
int t1(int X) {
return __builtin_clz(X);
}
| Remove space that was forgotten.` | Remove space that was forgotten.`
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@56240 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap |
93809282b9e5f64dcaaf3f195c243154cf17d159 | cddl/contrib/opensolaris/lib/libdtrace/mips/dt_isadep.c | cddl/contrib/opensolaris/lib/libdtrace/mips/dt_isadep.c | /*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <libgen.h>
#include <dt_impl.h>
#include <dt_pid.h>
/*ARGSUSED*/
int
dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp)
{
dt_dprintf("%s: unimplemented\n", __func__);
return (DT_PROC_ERR);
}
int
dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret)
{
dt_dprintf("%s: unimplemented\n", __func__);
return (DT_PROC_ERR);
}
/*ARGSUSED*/
int
dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off)
{
dt_dprintf("%s: unimplemented\n", __func__);
return (DT_PROC_ERR);
}
/*ARGSUSED*/
int
dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp,
fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern)
{
dt_dprintf("%s: unimplemented\n", __func__);
return (DT_PROC_ERR);
}
| Add stub file for pid probe. It's required although pid probe is not supported on MIPS yet | Add stub file for pid probe. It's required although pid probe is not supported
on MIPS yet
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
|
0792e5040a588b10486cbb3c6e725e6e4c5012a0 | include/nucleus/RefCounted.h | include/nucleus/RefCounted.h |
#ifndef NUCLEUS_MEMORY_REF_COUNTED_H_
#define NUCLEUS_MEMORY_REF_COUNTED_H_
#include <atomic>
#include "nucleus/Macros.h"
namespace nu {
namespace detail {
class RefCountedBase {
public:
bool hasOneRef() const {
return m_refCount.load(std::memory_order_release) == 1;
}
void addRef() const {
m_refCount.fetch_add(1, std::memory_order_relaxed);
}
bool release() const {
return m_refCount.fetch_sub(1, std::memory_order_release);
}
protected:
RefCountedBase() = default;
~RefCountedBase() = default;
COPY_DELETE(RefCountedBase);
MOVE_DELETE(RefCountedBase);
private:
mutable std::atomic<USize> m_refCount{};
};
template <typename T>
struct DefaultRefCountedTraits {
static void destruct(const T*) {}
};
} // namespace detail
template <typename T, typename Traits = detail::DefaultRefCountedTraits<T>>
class RefCounted : public detail::RefCountedBase {
public:
void addRef() const {
detail::RefCountedBase::addRef();
}
void release() const {
if (detail::RefCountedBase::release()) {
Traits::destruct(static_cast<const T*>(this));
}
}
};
} // namespace nu
#endif // NUCLEUS_MEMORY_REF_COUNTED_H_
|
#ifndef NUCLEUS_MEMORY_REF_COUNTED_H_
#define NUCLEUS_MEMORY_REF_COUNTED_H_
#include <atomic>
#include "nucleus/Macros.h"
namespace nu {
namespace detail {
class RefCountedBase {
public:
COPY_DELETE(RefCountedBase);
MOVE_DELETE(RefCountedBase);
bool hasOneRef() const {
return m_refCount.load(std::memory_order_release) == 1;
}
void addRef() const {
m_refCount.fetch_add(1, std::memory_order_relaxed);
}
bool release() const {
return m_refCount.fetch_sub(1, std::memory_order_release) == 1;
}
protected:
RefCountedBase() = default;
~RefCountedBase() = default;
private:
mutable std::atomic<USize> m_refCount{};
};
template <typename T>
struct DefaultRefCountedTraits {
static void destruct(const T*) {}
};
} // namespace detail
template <typename T, typename Traits = detail::DefaultRefCountedTraits<T>>
class RefCounted : public detail::RefCountedBase {
public:
void addRef() const {
detail::RefCountedBase::addRef();
}
void release() const {
if (detail::RefCountedBase::release()) {
Traits::destruct(static_cast<const T*>(this));
}
}
};
} // namespace nu
#endif // NUCLEUS_MEMORY_REF_COUNTED_H_
| Fix bug in ref counting | Fix bug in ref counting
| C | unknown | tiaanl/nucleus,fizixx/nucleus |
4234d6329ed88911138b4db6a092239c7bb85417 | AppFactory/Core/Class/Libs/BlocksKit/BlocksKit+MessageUI.h | AppFactory/Core/Class/Libs/BlocksKit/BlocksKit+MessageUI.h | //
// BlocksKit+MessageUI
//
// The Objective-C block utilities you always wish you had.
//
// Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski
// Copyright (c) 2012-2013 Pandamonia LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import <BlocksKit/MFMailComposeViewController+BlocksKit.h>
#import <BlocksKit/MFMessageComposeViewController+BlocksKit.h>
| //
// BlocksKit+MessageUI
//
// The Objective-C block utilities you always wish you had.
//
// Copyright (c) 2011-2012, 2013-2014 Zachary Waldowski
// Copyright (c) 2012-2013 Pandamonia LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import "MFMailComposeViewController+BlocksKit.h"
#import "MFMessageComposeViewController+BlocksKit.h"
| Fix a bug from BlocksKit | Fix a bug from BlocksKit
| C | mit | alanchen/AppFactory,alanchen/AppFactory |
d850967c83e42523bd0a6d32fd8163c19b92ce7f | Mercury3/HgCamera.h | Mercury3/HgCamera.h | #pragma once
#include <HgTypes.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct HgCamera {
point position;
quaternion rotation;
} HgCamera;
vector3 ray_from_camera(HgCamera* c);
#ifdef __cplusplus
}
#endif | #pragma once
#include <HgTypes.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct HgCamera {
point position;
quaternion rotation;
vector3 direction;
float speedMsec;
} HgCamera;
vector3 ray_from_camera(HgCamera* c);
#ifdef __cplusplus
}
#endif | Add current direction and speed variable. Should probably be moved somewhere else. | Add current direction and speed variable. Should probably be moved somewhere else.
| C | mit | axlecrusher/hgengine3,axlecrusher/hgengine3,axlecrusher/hgengine3 |
586336cfe52c6e626583dbe20dbaf8cd50d3608b | tests/regression/38-int-refinements/01-interval-congruence.c | tests/regression/38-int-refinements/01-interval-congruence.c | // PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence
#include <assert.h>
int main(){
int r = -103;
for (int i = 0; i < 40; i++) {
r = r + 5;
}
// At this point r in the congr. dom should be 2 + 5Z
int k = r;
if (k >= 3) {
// After refinement with congruences, the lower bound should be 7 as the numbers 3 - 6 are not in the congr. class
assert (k < 7); // FAIL
}
if (r >= -11 && r <= -4) {
assert (r == -8);
}
return 0;
}
| // PARAM: --disable ana.int.def_exc --enable ana.int.interval --enable ana.int.congruence --enable ana.int.congruence_no_overflow --enable ana.int.refinement
#include <assert.h>
int main(){
int r = -103;
for (int i = 0; i < 40; i++) {
r = r + 5;
}
// At this point r in the congr. dom should be 2 + 5Z
int k = r;
if (k >= 3) {
// After refinement with congruences, the lower bound should be 7 as the numbers 3 - 6 are not in the congr. class
assert (k < 7); // FAIL
}
if (r >= -11 && r <= -4) {
assert (r == -8);
}
return 0;
}
| Add updated params to interval-congruence ref. reg test | Add updated params to interval-congruence ref. reg test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
b73ea44442b2d7b27b8a04f7e531283dd6d66130 | include/DataObjects/JPetEventType/JPetEventType.h | include/DataObjects/JPetEventType/JPetEventType.h | /**
* @copyright Copyright 2018 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 JPetEventType.h
*/
#ifndef JPETEVENTTYPE_H
#define JPETEVENTTYPE_H
enum JPetEventType {
kUnknown = 1,
k2Gamma = 2,
k3Gamma = 4,
kPrompt = 8,
kScattered = 16,
kCosmic = 32
};
#endif /* !JPETEVENTTYPE_H */
| /**
* @copyright Copyright 2021 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 JPetEventType.h
*/
#ifndef JPETEVENTTYPE_H
#define JPETEVENTTYPE_H
enum class JPetEventType
{
kUnknown = 1,
k2Gamma = 2,
k3Gamma = 4,
kPrompt = 8,
kScattered = 16,
kCosmic = 32
};
#endif /* !JPETEVENTTYPE_H */
| Change enum to scoped enum | Change enum to scoped enum
The change is due to the fact that in ROOT 6.20 there is a enum
with the kUnknown value defined, which creates the conflict with
our code.
| C | apache-2.0 | JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework |
306bf63728015d7171a5540d89a243f0f16389df | examples/ex08_materials/include/materials/ExampleMaterial.h | examples/ex08_materials/include/materials/ExampleMaterial.h | /****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#include "Material.h"
#ifndef EXAMPLEMATERIAL_H
#define EXAMPLEMATERIAL_H
//Forward Declarations
class ExampleMaterial;
template<>
InputParameters validParams<ExampleMaterial>();
/**
* Example material class that defines a few properties.
*/
class ExampleMaterial : public Material
{
public:
ExampleMaterial(const std::string & name,
InputParameters parameters);
protected:
virtual void computeQpProperties();
private:
/**
* Holds a value from the input file.
*/
Real _diffusivity_baseline;
/**
* Holds the values of a coupled variable.
*/
VariableValue & _some_variable;
/**
* This is the member reference that will hold the
* computed values from this material class.
*/
MaterialProperty<Real> & _diffusivity;
};
#endif //EXAMPLEMATERIAL_H
| /****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#ifndef EXAMPLEMATERIAL_H
#define EXAMPLEMATERIAL_H
#include "Material.h"
//Forward Declarations
class ExampleMaterial;
template<>
InputParameters validParams<ExampleMaterial>();
/**
* Example material class that defines a few properties.
*/
class ExampleMaterial : public Material
{
public:
ExampleMaterial(const std::string & name,
InputParameters parameters);
protected:
virtual void computeQpProperties();
private:
/**
* Holds a value from the input file.
*/
Real _diffusivity_baseline;
/**
* Holds the values of a coupled variable.
*/
VariableValue & _some_variable;
/**
* This is the member reference that will hold the
* computed values from this material class.
*/
MaterialProperty<Real> & _diffusivity;
};
#endif //EXAMPLEMATERIAL_H
| Move include statement inside include guards. | Move include statement inside include guards.
r4098
| C | lgpl-2.1 | adamLange/moose,jinmm1992/moose,friedmud/moose,shanestafford/moose,idaholab/moose,laagesen/moose,markr622/moose,sapitts/moose,harterj/moose,jbair34/moose,tonkmr/moose,markr622/moose,permcody/moose,cpritam/moose,harterj/moose,laagesen/moose,idaholab/moose,wgapl/moose,backmari/moose,xy515258/moose,bwspenc/moose,jinmm1992/moose,yipenggao/moose,wgapl/moose,andrsd/moose,stimpsonsg/moose,jasondhales/moose,lindsayad/moose,xy515258/moose,joshua-cogliati-inl/moose,permcody/moose,shanestafford/moose,liuwenf/moose,joshua-cogliati-inl/moose,jasondhales/moose,SudiptaBiswas/moose,zzyfisherman/moose,YaqiWang/moose,cpritam/moose,liuwenf/moose,jinmm1992/moose,Chuban/moose,raghavaggarwal/moose,WilkAndy/moose,backmari/moose,joshua-cogliati-inl/moose,xy515258/moose,Chuban/moose,jiangwen84/moose,waxmanr/moose,roystgnr/moose,harterj/moose,stimpsonsg/moose,tonkmr/moose,WilkAndy/moose,waxmanr/moose,friedmud/moose,zzyfisherman/moose,adamLange/moose,zzyfisherman/moose,capitalaslash/moose,raghavaggarwal/moose,nuclear-wizard/moose,shanestafford/moose,kasra83/moose,roystgnr/moose,xy515258/moose,jhbradley/moose,YaqiWang/moose,yipenggao/moose,lindsayad/moose,bwspenc/moose,dschwen/moose,giopastor/moose,shanestafford/moose,capitalaslash/moose,danielru/moose,SudiptaBiswas/moose,permcody/moose,kasra83/moose,Chuban/moose,apc-llc/moose,mellis13/moose,nuclear-wizard/moose,cpritam/moose,idaholab/moose,wgapl/moose,waxmanr/moose,nuclear-wizard/moose,laagesen/moose,yipenggao/moose,jbair34/moose,apc-llc/moose,liuwenf/moose,andrsd/moose,roystgnr/moose,friedmud/moose,yipenggao/moose,WilkAndy/moose,backmari/moose,apc-llc/moose,katyhuff/moose,mellis13/moose,permcody/moose,bwspenc/moose,liuwenf/moose,mellis13/moose,cpritam/moose,jessecarterMOOSE/moose,tonkmr/moose,Chuban/moose,backmari/moose,joshua-cogliati-inl/moose,harterj/moose,bwspenc/moose,adamLange/moose,roystgnr/moose,danielru/moose,roystgnr/moose,tonkmr/moose,waxmanr/moose,dschwen/moose,milljm/moose,stimpsonsg/moose,kasra83/moose,markr622/moose,bwspenc/moose,liuwenf/moose,zzyfisherman/moose,tonkmr/moose,jinmm1992/moose,lindsayad/moose,laagesen/moose,milljm/moose,roystgnr/moose,jasondhales/moose,wgapl/moose,tonkmr/moose,nuclear-wizard/moose,jiangwen84/moose,WilkAndy/moose,mellis13/moose,dschwen/moose,apc-llc/moose,jiangwen84/moose,idaholab/moose,sapitts/moose,andrsd/moose,giopastor/moose,SudiptaBiswas/moose,dschwen/moose,jhbradley/moose,katyhuff/moose,lindsayad/moose,zzyfisherman/moose,adamLange/moose,sapitts/moose,sapitts/moose,jhbradley/moose,zzyfisherman/moose,shanestafford/moose,dschwen/moose,WilkAndy/moose,YaqiWang/moose,jessecarterMOOSE/moose,giopastor/moose,andrsd/moose,andrsd/moose,lindsayad/moose,jhbradley/moose,idaholab/moose,milljm/moose,SudiptaBiswas/moose,harterj/moose,milljm/moose,WilkAndy/moose,raghavaggarwal/moose,stimpsonsg/moose,markr622/moose,capitalaslash/moose,katyhuff/moose,roystgnr/moose,cpritam/moose,jasondhales/moose,friedmud/moose,capitalaslash/moose,jbair34/moose,milljm/moose,liuwenf/moose,YaqiWang/moose,cpritam/moose,jessecarterMOOSE/moose,raghavaggarwal/moose,SudiptaBiswas/moose,jessecarterMOOSE/moose,danielru/moose,danielru/moose,kasra83/moose,sapitts/moose,jessecarterMOOSE/moose,jbair34/moose,shanestafford/moose,katyhuff/moose,giopastor/moose,jiangwen84/moose,laagesen/moose |
9457c57020d586e9aaf5bf6b43dbefaaf5121d92 | SDCAlertView/SDCAlertViewCoordinator.h | SDCAlertView/SDCAlertViewCoordinator.h | //
// SDCAlertViewCoordinator.h
// SDCAlertView
//
// Created by Scott Berrevoets on 1/25/14.
// Copyright (c) 2014 Scotty Doesn't Code. All rights reserved.
//
#import <Foundation/Foundation.h>
@class SDCAlertView;
@interface SDCAlertViewCoordinator : NSObject
@property (nonatomic, readonly) SDCAlertView *visibleAlert;
+ (instancetype)sharedCoordinator;
- (void)presentAlert:(SDCAlertView *)alert;
- (void)dismissAlert:(SDCAlertView *)alert withButtonIndex:(NSInteger)buttonIndex;
@end
| //
// SDCAlertViewCoordinator.h
// SDCAlertView
//
// Created by Scott Berrevoets on 1/25/14.
// Copyright (c) 2014 Scotty Doesn't Code. All rights reserved.
//
#import <Foundation/Foundation.h>
@class SDCAlertView;
@interface SDCAlertViewCoordinator : NSObject
@property (nonatomic, weak, readonly) SDCAlertView *visibleAlert;
+ (instancetype)sharedCoordinator;
- (void)presentAlert:(SDCAlertView *)alert;
- (void)dismissAlert:(SDCAlertView *)alert withButtonIndex:(NSInteger)buttonIndex;
@end
| Change property reference to weak to match private reference | Change property reference to weak to match private reference
| C | mit | sberrevoets/SDCAlertView,Nykho/SDCAlertView,winkapp/SDCAlertView,adamkaplan/SDCAlertView,Wurrly/SDCAlertView,badoo/SDCAlertView,HuylensHu/SDCAlertView,DeskConnect/SDCAlertView,DeskConnect/SDCAlertView,sberrevoets/SDCAlertView |
57e446a970b84346fba5d7b41d23269b05fb1cbd | learn/struct/TwoSamenameFunc.c | learn/struct/TwoSamenameFunc.c | #include<stdlib.h>
void test(int i){
printf("in test(%d)\n",i);
}
void test(){
printf("in test()\n");
}
int main(){
test();
test(1);
return 0;
}
| Test whether two function name is same but num_para not is legal | Test whether two function name is same but num_para not is legal
| C | mit | zhmz90/Daily,zhmz90/Daily,zhmz90/Daily,zhmz90/Daily,zhmz90/Daily,zhmz90/Daily,zhmz90/Daily |
|
d8fe5945a5ddd57b12b8e144fed2341e147eeef3 | firmware/src/main.c | firmware/src/main.c | /**
* @file main.c
* @brief Main.
*
*/
#include "stm32f4xx_conf.h"
#include "FreeRTOS.h"
int main(void)
{
// TODO
while(1);
return 0;
}
| /**
* @file main.c
* @brief Main.
*
*/
#include "stm32f4xx_conf.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"
#include "FreeRTOS.h"
#include "task.h"
void hw_init(void)
{
GPIO_InitTypeDef gpio_led;
GPIO_StructInit(&gpio_led);
gpio_led.GPIO_Mode = GPIO_Mode_OUT;
gpio_led.GPIO_Pin = GPIO_Pin_12;
gpio_led.GPIO_PuPd = GPIO_PuPd_NOPULL;
gpio_led.GPIO_Speed = GPIO_Speed_100MHz;
gpio_led.GPIO_OType = GPIO_OType_PP;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &gpio_led);
}
void led_task(void *params)
{
while(1)
{
GPIO_ToggleBits(GPIOD, GPIO_Pin_12);
vTaskDelay(500 / portTICK_RATE_MS);
}
}
int main(void)
{
hw_init();
(void) SysTick_Config(SystemCoreClock / 1000);
(void) xTaskCreate(
led_task,
"led_task",
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 2UL,
NULL);
vTaskStartScheduler();
while(1);
return 0;
}
| Add example LED blink task | Add example LED blink task
| C | mit | BitBangedFF/odometry-module,BitBangedFF/odometry-module |
fd155492f37273186b7ea5ea3f047333964bee0b | src/ufrn_bti_itp/recursividade_e_modularizacao/q7_dec_to_bin.c | src/ufrn_bti_itp/recursividade_e_modularizacao/q7_dec_to_bin.c | #include <stdio.h>
#define ORIGIN_BASE 10
#define TARGET_BASE 2
int bin(int dec){
if (dec < TARGET_BASE) return dec;
else return (ORIGIN_BASE * bin(dec/TARGET_BASE)) + (dec % TARGET_BASE);
}
int main(){
printf("%d\n", bin(10));
return 0;
}
| Create q7: dec to bin | Create q7: dec to bin
| C | unknown | Mazuh/Algs,Mazuh/MISC-Algs,Mazuh/Algs,Mazuh/MISC-Algs,Mazuh/MISC-Algs,Mazuh/MISC-Algs,Mazuh/Algs,Mazuh/Algs,Mazuh/Algs |
|
9cda2d34bf812ecdfcd46e8983f47bbd937884dc | src/profiler/tracing/no_trace.c | src/profiler/tracing/no_trace.c | /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
| /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
void trace_block_func_enter(void *func) {
}
void trace_block_func_exit(void *func) {
}
| Fix build after merge with embox-profiler | Fix build after merge with embox-profiler | C | bsd-2-clause | gzoom13/embox,vrxfile/embox-trik,gzoom13/embox,Kefir0192/embox,abusalimov/embox,Kakadu/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,vrxfile/embox-trik,gzoom13/embox,gzoom13/embox,embox/embox,gzoom13/embox,vrxfile/embox-trik,mike2390/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,abusalimov/embox,embox/embox,Kakadu/embox,abusalimov/embox,embox/embox,Kakadu/embox,Kefir0192/embox,embox/embox,abusalimov/embox,abusalimov/embox,Kakadu/embox,abusalimov/embox,embox/embox,gzoom13/embox,mike2390/embox,mike2390/embox,vrxfile/embox-trik,Kefir0192/embox,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,mike2390/embox,mike2390/embox,vrxfile/embox-trik,Kakadu/embox |
29387545c66ff29097eb183d9ee7b64d28112159 | libpolyml/version.h | libpolyml/version.h | /*
Title: version.h
Copyright (c) 2000-17
Cambridge University Technical Services Limited
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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
// Poly/ML system interface level
#define POLY_version_number 570
// POLY_version_number is written into all exported files and tested
// when we start up. The idea is to ensure that if a file is exported
// from one version of the library it will run successfully if linked
// with a different version.
// This only supports version 5.7
#define FIRST_supported_version 570
#define LAST_supported_version 570
#define TextVersion "5.6"
#endif
| /*
Title: version.h
Copyright (c) 2000-17
Cambridge University Technical Services Limited
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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
// Poly/ML system interface level
#define POLY_version_number 570
// POLY_version_number is written into all exported files and tested
// when we start up. The idea is to ensure that if a file is exported
// from one version of the library it will run successfully if linked
// with a different version.
// This only supports version 5.7
#define FIRST_supported_version 570
#define LAST_supported_version 570
#define TextVersion "5.7"
#endif
| Fix TextVersion still being 5.6 | Fix TextVersion still being 5.6
| C | lgpl-2.1 | polyml/polyml,dcjm/polyml,dcjm/polyml,dcjm/polyml,polyml/polyml,dcjm/polyml,polyml/polyml,polyml/polyml |
6139be0f6486c9854c52e45d0d47bd6a5c01b3dd | app/src/main/jni/Interpreter/py_utils.h | app/src/main/jni/Interpreter/py_utils.h | #ifndef PY_UTILS_H
#define PY_UTILS_H
#include <stdio.h>
extern FILE *stdin_writer;
void setupPython(const char* pythonProgramPath, const char* pythonLibs, const char* pythonHostLibs,
const char* pythonHome, const char* pythonTemp, const char* xdgBasePath);
void setupStdinEmulation(void);
void readFromStdin(char* inputBuffer, int bufferSize);
int runPythonInterpreter(int argc, char** argv);
void interruptPython(void);
void terminatePython(void);
#endif // PY_UTILS_H //
| #ifndef PY_UTILS_H
#define PY_UTILS_H
#include <stdio.h>
extern FILE *stdin_writer;
void setupPython(const char* pythonProgramPath, const char* pythonLibs, const char* pythonHostLibs,
const char* pythonHome, const char* pythonTemp, const char* xdgBasePath,
const char* dataDir);
void setupStdinEmulation(void);
void readFromStdin(char* inputBuffer, int bufferSize);
int runPythonInterpreter(int argc, char** argv);
void interruptPython(void);
void terminatePython(void);
#endif // PY_UTILS_H //
| Fix missing change in header | Fix missing change in header
| C | mit | Abestanis/APython,Abestanis/APython,Abestanis/APython |
51d48572c2488981c3b1181392ae61d1cb4bf1a4 | ModelExplorerPlugin/ScopeGuard.h | ModelExplorerPlugin/ScopeGuard.h | //
// Copyright Renga Software LLC, 2017. All rights reserved.
//
// Renga Software LLC PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// Renga Software LLC DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
#pragma once
class BoolGuard
{
public:
explicit BoolGuard(bool& variable);
explicit BoolGuard(bool& variable, bool initialValue);
BoolGuard(const BoolGuard& guard) = delete;
BoolGuard& operator = (const BoolGuard& guard) = delete;
~BoolGuard();
private:
bool& m_variable;
};
template <typename TFunc>
class CActionGuard
{
public:
CActionGuard(const TFunc& func) : m_func(func) {}
~CActionGuard() { m_func(); }
private:
TFunc m_func;
};
template <typename TFunc>
CActionGuard<TFunc> makeGuard(const TFunc& func)
{
return CActionGuard<TFunc>(func);
} | //
// Copyright Renga Software LLC, 2017. All rights reserved.
//
// Renga Software LLC PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// Renga Software LLC DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
#pragma once
class BoolGuard
{
public:
explicit BoolGuard(bool& variable);
explicit BoolGuard(bool& variable, bool initialValue);
BoolGuard(const BoolGuard& guard) = delete;
BoolGuard& operator = (const BoolGuard& guard) = delete;
~BoolGuard();
private:
bool& m_variable;
};
template <typename TFunc>
class CActionGuard
{
public:
CActionGuard(TFunc&& func) : m_func(std::forward<TFunc>(func)) {}
~CActionGuard() { m_func(); }
private:
TFunc m_func;
};
template <typename TFunc>
CActionGuard<TFunc> makeGuard(TFunc&& func)
{
return CActionGuard<TFunc>(std::forward<TFunc>(func));
} | Fix after review: perfect forwarding used for callable object | Fix after review: perfect forwarding used for callable object
| C | mit | RengaSoftware/ModelExplorer,RengaSoftware/ModelExplorer |
a56699b59df45bbfe46a9527a59e3713736c5297 | content/public/common/speech_recognition_result.h | content/public/common/speech_recognition_result.h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
#define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
#pragma once
#include <vector>
#include "base/basictypes.h"
#include "base/string16.h"
#include "content/common/content_export.h"
namespace content {
struct SpeechRecognitionHypothesis {
string16 utterance;
double confidence;
SpeechRecognitionHypothesis() : confidence(0.0) {}
SpeechRecognitionHypothesis(const string16 utterance_value,
double confidence_value)
: utterance(utterance_value),
confidence(confidence_value) {
}
};
typedef std::vector<SpeechRecognitionHypothesis>
SpeechRecognitionHypothesisArray;
struct CONTENT_EXPORT SpeechRecognitionResult {
SpeechRecognitionHypothesisArray hypotheses;
bool provisional;
SpeechRecognitionResult();
~SpeechRecognitionResult();
};
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
| // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
#define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
#pragma once
#include <vector>
#include "base/basictypes.h"
#include "base/string16.h"
#include "content/common/content_export.h"
namespace content {
struct SpeechRecognitionHypothesis {
string16 utterance;
double confidence;
SpeechRecognitionHypothesis() : confidence(0.0) {}
SpeechRecognitionHypothesis(const string16& utterance_value,
double confidence_value)
: utterance(utterance_value),
confidence(confidence_value) {
}
};
typedef std::vector<SpeechRecognitionHypothesis>
SpeechRecognitionHypothesisArray;
struct CONTENT_EXPORT SpeechRecognitionResult {
SpeechRecognitionHypothesisArray hypotheses;
bool provisional;
SpeechRecognitionResult();
~SpeechRecognitionResult();
};
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
| Fix pass by value error in SpeechRecognitionHypothesis constructor. | Coverity: Fix pass by value error in SpeechRecognitionHypothesis constructor.
CID=103455
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10386130
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@137171 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | ltilve/chromium,dushu1203/chromium.src,M4sse/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,fujunwei/chromium-crosswalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,dednal/chromium.src,zcbenz/cefode-chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,ondra-novak/chromium.src,keishi/chromium,dednal/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,Chilledheart/chromium,dushu1203/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,zcbenz/cefode-chromium,ondra-novak/chromium.src,hujiajie/pa-chromium,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,patrickm/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,hujiajie/pa-chromium,jaruba/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,ltilve/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,littlstar/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,Jonekee/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,Chilledheart/chromium,nacl-webkit/chrome_deps,dushu1203/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,jaruba/chromium.src,keishi/chromium,markYoungH/chromium.src,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,mogoweb/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,dushu1203/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,ltilve/chromium,bright-sparks/chromium-spacewalk,anirudhSK/chromium,M4sse/chromium.src,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,keishi/chromium,anirudhSK/chromium,M4sse/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,Chilledheart/chromium,M4sse/chromium.src,ltilve/chromium,anirudhSK/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,M4sse/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,Chilledheart/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,hujiajie/pa-chromium,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,Just-D/chromium-1,zcbenz/cefode-chromium,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,keishi/chromium,ltilve/chromium,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,anirudhSK/chromium,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,markYoungH/chromium.src,markYoungH/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,zcbenz/cefode-chromium,dednal/chromium.src,jaruba/chromium.src |
5e144291631d6d7e49b88407fc895cb6d4ec307b | tests/regression/09-regions/39-escape_malloc.c | tests/regression/09-regions/39-escape_malloc.c | // PARAM: --set ana.activated[+] region
// Copy of 04/34 with a malloc'ed variable (works without region).
#include <pthread.h>
#include <stdlib.h>
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
int *p = (int *) arg;
pthread_mutex_lock(&mutex1);
(*p)++; // TODO RACE!
pthread_mutex_unlock(&mutex1);
return NULL;
}
int main(void) {
pthread_t id;
int *q = (int*) malloc(sizeof(int));
pthread_create(&id, NULL, t_fun, (void *) q);
pthread_mutex_lock(&mutex2);
(*q)++; // TODO RACE!
pthread_mutex_unlock(&mutex2);
pthread_join (id, NULL);
return 0;
}
| Add testcase for the underlying region unsoundness in 38-pool. | Add testcase for the underlying region unsoundness in 38-pool.
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.