after stringlengths 72 2.11k | before stringlengths 21 1.55k | diff stringlengths 85 2.31k | instruction stringlengths 20 1.71k | license stringclasses 13
values | repos stringlengths 7 82.6k | commit stringlengths 40 40 |
|---|---|---|---|---|---|---|
#include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "utils/builtins.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
We need to use "parrot_config include... | #include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
#include "parrot/embed.h"
#include "parrot/debugger.h"
#include "p... | ---
+++
@@ -4,11 +4,15 @@
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
+#include "utils/builtins.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
+
+We need to use "parrot_config includedir"
+
#include "parrot/embed.h"
#inc... | Add the beginnings of something that does SPI
| artistic-2.0 | leto/plparrot,leto/plparrot,leto/plparrot | 821e790e9f14828382c787ca907ef4c7c86ff1de |
#include "maxminddb_test_helper.h"
void run_tests(int mode, const char *mode_desc)
{
const char *filename = "MaxMind-DB-test-decoder.mmdb";
const char *path = test_database_path(filename);
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
free((void *)path);
const char *ip = "1.1.1.1";
MMDB_looku... | #include "maxminddb_test_helper.h"
void run_tests(int mode, const char *mode_desc)
{
const char *filename = "MaxMind-DB-test-decoder.mmdb";
const char *path = test_database_path(filename);
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
free((void *)path);
const char *ip = "1.1.1.1";
MMDB_looku... | ---
+++
@@ -16,7 +16,7 @@
int status = MMDB_aget_value(&result.entry, &entry_data, lookup_path);
cmp_ok(status, "==", MMDB_SUCCESS,
- "status for MMDB_get_value() is MMDB_SUCCESS");
+ "status for MMDB_aget_value() is MMDB_SUCCESS");
ok(entry_data.has_data, "found a value with MMDB... | Fix typo in test description
| apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb | b675c4d898d18514312a867ffca73d09e438f7c0 |
#ifndef _ASM_POWERPC_ABS_ADDR_H
#define _ASM_POWERPC_ABS_ADDR_H
#ifdef __KERNEL__
/*
* c 2001 PPC 64 Team, IBM Corp
*
* 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 o... | #ifndef _ASM_POWERPC_ABS_ADDR_H
#define _ASM_POWERPC_ABS_ADDR_H
#ifdef __KERNEL__
/*
* c 2001 PPC 64 Team, IBM Corp
*
* 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 o... | ---
+++
@@ -18,8 +18,6 @@
#include <asm/page.h>
#include <asm/prom.h>
-#define phys_to_abs(pa) (pa)
-
/* Convenience macros */
#define virt_to_abs(va) __pa(va)
#define abs_to_virt(aa) __va(aa) | powerpc: Remove phys_to_abs() now all users have been removed
Signed-off-by: Michael Ellerman <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>
| apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_k... | 6bfa5c586b87a36f742e0525e6c337074b68978d |
#ifndef __COMMON_H__
#define __COMMON_H__
#ifdef NODE_VERSION_AT_LEAST
#if NODE_VERSION_AT_LEAST(0,11,0)
#define __NODE_V0_11__
#endif
#endif
#endif
| #ifndef __COMMON_H__
#define __COMMON_H__
#if NODE_VERSION_AT_LEAST(0,11,0)
#define __NODE_V0_11__
#endif
#endif
| ---
+++
@@ -1,8 +1,10 @@
#ifndef __COMMON_H__
#define __COMMON_H__
+#ifdef NODE_VERSION_AT_LEAST
#if NODE_VERSION_AT_LEAST(0,11,0)
#define __NODE_V0_11__
+#endif
#endif
#endif | Fix build under node.js 0.10.0
| lgpl-2.1 | zenozeng/yapcduino.js,zenozeng/yapcduino.js,zenozeng/yapcduino.js,zenozeng/yapcduino.js,zenozeng/yapcduino.js | f7499f65a6149495f5750a1aade611d7ce44d9e9 |
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\
(v=vs.85).aspx"
#define VERSION "0.1.0"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine,
int nShowCmd)
{
... | #include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\
(v=vs.85).aspx"
#define VERSION "0.1.0"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine,
int nShowCmd)
{
... | ---
+++
@@ -19,7 +19,7 @@
return 255;
}
if (argCount < 3 || argCount > 4) {
- fprintf(stderr, "Batch MessageBox v" VERSION "\n", szArgList[0]);
+ fprintf(stderr, "Batch MessageBox v" VERSION "\n");
fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]);
... | Remove unused fprintf arg; add comment on _wtoi
| mit | dbohdan/messagebox,dbohdan/messagebox | 8597a0bd12c09d88dc5a41072446af219055b1ae |
/***************************************************************************//**
* \file domain.h
* \author Anush Krishnan (anush@bu.edu)
* \brief Definition of the class \c domain.
*/
#pragma once
#include "types.h"
/**
* \class domain
* \brief Stores information about the computational grid.
*/
class doma... | /***************************************************************************//**
* \file domain.h
* \author Krishnan, A. (anush@bu.edu)
* \brief Definition of the class \c domain
*/
#pragma once
#include "types.h"
/**
* \class domain
* \brief Store the mesh grid information
*/
class domain
{
public:
int nx, ///... | ---
+++
@@ -1,8 +1,8 @@
/***************************************************************************//**
-* \file domain.h
-* \author Krishnan, A. (anush@bu.edu)
-* \brief Definition of the class \c domain
-*/
+ * \file domain.h
+ * \author Anush Krishnan (anush@bu.edu)
+ * \brief Definition of the class \c domain.
... | Update Doxygen documentation with conventions
| mit | barbagroup/cuIBM,barbagroup/cuIBM,barbagroup/cuIBM | ee758e12198cd82c29a387193a154e6a8f88fc99 |
/* ======================================================================================================
___________________________________________________________________________________________________
| __ __ ________ __ __ __ ______ __ __ _________ ________ |
| \ ... | /* ======================================================================================================
___________________________________________________________________________________________________
| __ __ ________ __ __ __ ______ __ __ _________ ________ |
| \ ... | ---
+++
@@ -10,12 +10,22 @@
====================================================================================================== */
+static void a_base_encoders_reset(void);
+
void pre_auton()
{
-
+ a_base_encoders_reset();
}
task autonomous()
{
}
+
+static void a_base_encoders_reset()
+{
+ res... | Reset motor encoders in pre_auton
| mit | qsctr/vex-4194b-2016 | b17244b8aaacaa4bdd06d076f16831ad76b6fb9f |
#ifdef E_TYPEDEFS
/* enum for various event types */
typedef enum _E_Acpi_Type
{
E_ACPI_TYPE_UNKNOWN = 0,
E_ACPI_TYPE_BATTERY,
E_ACPI_TYPE_BUTTON,
E_ACPI_TYPE_FAN,
E_ACPI_TYPE_LID,
E_ACPI_TYPE_PROCESSOR,
E_ACPI_TYPE_SLEEP,
E_ACPI_TYPE_POWER,
E_ACPI_TYPE_THERMAL,
E_ACPI_TYPE_VIDEO,
E_A... | #ifdef E_TYPEDEFS
/* enum for various event types */
typedef enum _E_Acpi_Type
{
E_ACPI_TYPE_UNKNOWN = 0,
E_ACPI_TYPE_LID,
E_ACPI_TYPE_BATTERY,
E_ACPI_TYPE_BUTTON,
E_ACPI_TYPE_SLEEP,
E_ACPI_TYPE_WIFI
} E_Acpi_Type;
/* struct used to pass to event handlers */
typedef struct _E_Event_Acpi E_Event_Acp... | ---
+++
@@ -4,10 +4,15 @@
typedef enum _E_Acpi_Type
{
E_ACPI_TYPE_UNKNOWN = 0,
- E_ACPI_TYPE_LID,
E_ACPI_TYPE_BATTERY,
E_ACPI_TYPE_BUTTON,
+ E_ACPI_TYPE_FAN,
+ E_ACPI_TYPE_LID,
+ E_ACPI_TYPE_PROCESSOR,
E_ACPI_TYPE_SLEEP,
+ E_ACPI_TYPE_POWER,
+ E_ACPI_TYPE_THERMAL,
+ E_ACPI_TYPE_VIDEO,... | Add some more acpi event types that we will handle.
git-svn-id: 6ac5796aeae0cef97fb47bcc287d4ce899c6fa6e@48916 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
| bsd-2-clause | jordemort/e17,jordemort/e17,jordemort/e17 | e3a82a7ee478b4693a7f250004d628e822c105ed |
/*
* waysome - wayland based window manager
*
* Copyright in alphabetical order:
*
* Copyright (C) 2014-2015 Julian Ganz
* Copyright (C) 2014-2015 Manuel Messner
* Copyright (C) 2014-2015 Marcel Müller
* Copyright (C) 2014-2015 Matthias Beyer
* Copyright (C) 2014-2015 Nadja Sommerfeld
*
* This file is part o... | /*
* waysome - wayland based window manager
*
* Copyright in alphabetical order:
*
* Copyright (C) 2014-2015 Julian Ganz
* Copyright (C) 2014-2015 Manuel Messner
* Copyright (C) 2014-2015 Marcel Müller
* Copyright (C) 2014-2015 Matthias Beyer
* Copyright (C) 2014-2015 Nadja Sommerfeld
*
* This file is part o... | ---
+++
@@ -25,9 +25,20 @@
* along with waysome. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * @addtogroup storage "Storage"
+ *
+ * @{
+ */
+
#ifndef __WS_STORAGE_MODULE_H__
#define __WS_STORAGE_MODULE_H__
#endif // __WS_STORAGE_MODULE_H__
+
+/**
+ * @}
+ */
+ | Add storage files to storage documentation group
| lgpl-2.1 | waysome/waysome,waysome/waysome | 1a3e5dcc47629e1707191ab1641a89be5eb1328b |
//
// CardNumber.h
// PKPayment Example
//
// Created by Alex MacCaw on 1/22/13.
// Copyright (c) 2013 Stripe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PKCardType.h"
@interface PKCardNumber : NSObject
@property (nonatomic, readonly) PKCardType cardType;
@property (nonatomic, readonly) N... | //
// CardNumber.h
// PKPayment Example
//
// Created by Alex MacCaw on 1/22/13.
// Copyright (c) 2013 Stripe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PKCardType.h"
@interface PKCardNumber : NSObject
@property (nonatomic, readonly) PKCardType cardType;
@property (nonatomic, readonly) N... | ---
+++
@@ -18,11 +18,12 @@
@property (nonatomic, readonly) NSString * formattedString;
@property (nonatomic, readonly) NSString * formattedStringWithTrail;
+@property (nonatomic, readonly, getter = isValid) BOOL valid;
+@property (nonatomic, readonly, getter = isValidLength) BOOL validLength;
+@property (nonatom... | Make validity booleans properties as well
| mit | onevcat/PaymentKit,loudnate/PaymentKit,tictail/TICPaymentKit,spinlister/PaymentKit,RidePal/PaymentKit,loudnate/PaymentKit,mobitar/PaymentKit,oanaBan/PaymentKit,jonathanrauch/PaymentKit,vikas100/Vikas,tictail/TICPaymentKit,jonathanrauch/PaymentKit,zsw12abc/PaymentKit,bobbyski/PaymentKit,stripe/PaymentKit,prolificinterac... | 31f9fa46901ed41ea21f43b1a05481112370e8f1 |
// options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsi... | // options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_ENABLE_FLOAT (1)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsigned long machine_uint_t... | ---
+++
@@ -2,7 +2,7 @@
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
-#define MICROPY_ENABLE_FLOAT (1)
+#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
// type definitions for the specific machine
| unix-cpy: Switch to use MICROPY_FLOAT_IMPL config define.
| mit | micropython/micropython-esp32,SHA2017-badge/micropython-esp32,torwag/micropython,AriZuu/micropython,xhat/micropython,utopiaprince/micropython,AriZuu/micropython,ahotam/micropython,heisewangluo/micropython,firstval/micropython,hiway/micropython,cloudformdesign/micropython,mianos/micropython,kostyll/micropython,Timmenem/... | 75488d5639819f31b01f76433b82d6259323230d |
/*
* 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 Foundati... | /*
* 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 Foundati... | ---
+++
@@ -17,3 +17,31 @@
* 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/>.
*/
+float *measure_delta(object a, object b)
+{
+ object cc;
+
+ float dx, dy, dz;
+
+ cc = SUBD->query_common_container(a, b);
+
+ if (!c... | Add difference delta measurement routine
| agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka | 05bf8903188764ffe423b03b72b8c2cb44eeb6b2 |
//-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
... | //-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
... | ---
+++
@@ -16,12 +16,26 @@
template<class T>
typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){
- return 0;
+ return matrix_row(this,row);
}
template<class T>
const typename matrix<T>::matrix_row matrix<T>::operator[](
std::size_t row ) const{
- return 0;
+ return matrix_row(t... | Add square bracket opertator access.
| mit | actinium/cppMatrix,actinium/cppMatrix | 0c55d02164a8fcc6682791603e53d7c099f59699 |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkMesaGLContext_DEFINED
#define SkMesaGLContext_DEFINED
#include "SkGLContext.h"
#if SK_MESA
class SkMesaGLContext : public SkGLContext {
private:
typedef intpt... |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkMesaGLContext_DEFINED
#define SkMesaGLContext_DEFINED
#include "SkGLContext.h"
#if SK_MESA
class SkMesaGLContext : public SkGLContext {
private:
typedef intpt... | ---
+++
@@ -30,9 +30,9 @@
private:
Context fOldContext;
- GLint fOldWidth;
- GLint fOldHeight;
- GLint fOldFormat;
+ GrGLint fOldWidth;
+ GrGLint fOldHeight;
+ GrGLint fOldFormat;
void* fOldImage;
};
| Fix undefined GLint in Mac builds
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@3736 2bbb7eff-a529-9590-31e7-b0007b416f81
| bsd-3-clause | geekboxzone/lollipop_external_chromium_org_third_party_skia,sombree/android_external_skia,rubenvb/skia,Purity-Lollipop/platform_external_skia,FusionSP/android_external_skia,PAC-ROM/android_external_skia,aosp-mirror/platform_external_skia,DiamondLovesYou/skia-sys,zhaochengw/platform_external_skia,aospo/platform_external... | b3400badf022b4ff6f3545d1baa706affc22d93d |
#define FLATCC_VERSION_TEXT "0.5.0-pre"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 5
#define FLATCC_VERSION_PATCH 0
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 0
| #define FLATCC_VERSION_TEXT "0.4.3"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 4
#define FLATCC_VERSION_PATCH 3
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 1
| ---
+++
@@ -1,6 +1,6 @@
-#define FLATCC_VERSION_TEXT "0.4.3"
+#define FLATCC_VERSION_TEXT "0.5.0-pre"
#define FLATCC_VERSION_MAJOR 0
-#define FLATCC_VERSION_MINOR 4
-#define FLATCC_VERSION_PATCH 3
+#define FLATCC_VERSION_MINOR 5
+#define FLATCC_VERSION_PATCH 0
/* 1 or 0 */
-#define FLATCC_VERSION_RELEASED 1
+#defin... | Prepare for next version version
| apache-2.0 | dvidelabs/flatcc,dvidelabs/flatcc,dvidelabs/flatcc | 19cc9b027e894e1dff68f18d7d660ac55b20b784 |
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... | ---
+++
@@ -18,20 +18,19 @@
extern "C" {
#endif
-
-/* Lefteris Koutsofios - AT&T Bell Laboratories */
+/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _STR_H
#define _STR_H
- void Sinit(void);
- void Sterm(void);
- char *Spath(char *, Tobj);
- char *Sseen(Tobj, char *);
- char *Sabstract... | Update with new lefty, fixing many bugs and supporting new features
| epl-1.0 | MjAbuz/graphviz,jho1965us/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,ellson/graphviz,MjAbuz/graphviz,jho1965us/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/grap... | a4a5d761f9cee11c229b9a10189505ead3324bc5 |
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
extern int foo_alias (void) __asm ("foo");
inline int foo (void) {
return foo_alias ();
}
int f(void) {
return foo();
}
// CHECK-NOT: define
// CHECK: define i32 @f()
// CHECK: call i32 @foo()
// CHECK-NEXT: ret i32
// CHECK-NOT: define
| // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
extern int foo_alias (void) __asm ("foo");
inline int foo (void) {
return foo_alias ();
}
int f(void) {
return foo();
}
// CHECK-NOT: define
// CHECK: define i32 @f()
// CHECK: %call = call i32 @foo()
// CHECK: ret i32 %call
// CHECK-NOT: define
| ---
+++
@@ -10,6 +10,6 @@
// CHECK-NOT: define
// CHECK: define i32 @f()
-// CHECK: %call = call i32 @foo()
-// CHECK: ret i32 %call
+// CHECK: call i32 @foo()
+// CHECK-NEXT: ret i32
// CHECK-NOT: define | Fix this tests on the bots.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@143052 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... | e8f4eed954eaa0c5020d61250b8222c41511f413 |
#ifndef _PPC_BOOT_REG_H
#define _PPC_BOOT_REG_H
/*
* Copyright 2007 Davud Gibson, IBM Corporation.
*
* 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 (... | #ifndef _PPC_BOOT_REG_H
#define _PPC_BOOT_REG_H
/*
* Copyright 2007 Davud Gibson, IBM Corporation.
*
* 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 (... | ---
+++
@@ -16,6 +16,14 @@
return pvr;
}
+#define __stringify_1(x) #x
+#define __stringify(x) __stringify_1(x)
+
+#define mfspr(rn) ({unsigned long rval; \
+ asm volatile("mfspr %0," __stringify(rn) \
+ : "=r" (rval)); rval; })
+#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
... | [POWERPC] 4xx: Add mfspr/mtspr inline macros to 4xx bootwrapper
The 4xx bootwrapper occasionally needs to access SPR registers,
this adds mfspr/mtspr wrappers to it.
Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>
Signed-off-by: Josh Boyer <94755a79aca753e683bb6d0e... | mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Program... | ee41eea947ebe2f1f627fafe0e429b5dcaaab944 |
/* This is the prototype for the strdup() function which is distributed
with Postgres. That strdup() is only needed on those systems that
don't already have strdup() in their system libraries.
The Postgres strdup() is in src/port/strdup.c.
*/
extern char *strdup(char const *);
| /* This is the prototype for the strdup() function which is distributed
with Postgres. That strdup() is only needed on those systems that
don't already have strdup() in their system libraries.
The Postgres strdup() is in src/utils/strdup.c.
*/
extern char *strdup(char const *);
| ---
+++
@@ -2,7 +2,7 @@
with Postgres. That strdup() is only needed on those systems that
don't already have strdup() in their system libraries.
- The Postgres strdup() is in src/utils/strdup.c.
+ The Postgres strdup() is in src/port/strdup.c.
*/
extern char *strdup(char const *); | Fix an obsolete file path mentioned in a comment.
| mpl-2.0 | techdragon/Postgres-XL,ovr/postgres-xl,kmjungersen/PostgresXL,techdragon/Postgres-XL,adam8157/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,rubikloud/gpdb,yazun/postgres-xl,janebeckman/gpdb,lintzc/gpdb,edespino/gpdb,cjcjameson/gpdb,chrishajas/gpdb,edespino/gpdb,royc1/gpdb,rvs/gpdb,snaga/postgres-xl,lisakowen/gpdb,CraigH... | 11c7bdb4e410102af298943526a48fffa9a9eb19 |
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(... | #include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(... | ---
+++
@@ -13,7 +13,7 @@
atexit(disableRawMode);
struct termios raw = orig_termios;
- raw.c_lflag &= ~(ECHO);
+ raw.c_lflag &= ~(ECHO | ICANON);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
} | Disable canonical mode in terminal
| bsd-2-clause | kyletolle/texor | f56aea747c00f3f9275189a33a8f81e9135b1469 |
#ifndef SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#define SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#include <sys/types.h>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "sandboxed_api/config.h"
#include "sandboxed_api/sandbox2/syscall.h"
... | #ifndef SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#define SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#include <sys/types.h>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "sandboxed_api/config.h"
#include "sandboxed_api/sandbox2/syscall.h"
... | ---
+++
@@ -30,8 +30,9 @@
absl::string_view GetName(int syscall) const;
- std::vector<std::string> GetArgumentsDescription(
- int syscall, const uint64_t values[syscalls::kMaxArgs], pid_t pid) const;
+ std::vector<std::string> GetArgumentsDescription(int syscall,
+ ... | Make code not have a -Warray-parameter warning.
PiperOrigin-RevId: 467842322
Change-Id: Ic262a3f98fa823ef524ac02d08b2f5b8f4adf71d
| apache-2.0 | google/sandboxed-api,google/sandboxed-api,google/sandboxed-api,google/sandboxed-api | 28504f18175b27a474e076bc7f07ae70cd9798e7 |
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | ---
+++
@@ -20,9 +20,9 @@
#include "tensorflow/core/platform/platform.h"
#if defined(PLATFORM_GOOGLE)
-#include "tensorflow/core/platform/google/test_benchmark.h"
+#include "tensorflow/core/platform/google/test_benchmark.h" // IWYU pragma: export
#else
-#include "tensorflow/core/platform/default/test_benchmark.... | Add IWYU tags to headers TF is re-exporting.
PiperOrigin-RevId: 291557790
Change-Id: Ic0268063ea1048bf6f22ba6aee1b9854d6420f30
| apache-2.0 | gunan/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,xzturn/tensorflow,yongtang/tensorflow,xzturn/tensorflow,aldian/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,a... | 520cee1eeb88bae50e20c4b53c0eedf843269ba9 |
#include "config_parse.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
extern char **environ;
/******************************************************************************/
int main(
int argc,
char *argv[]
)
{
FILE * conf_fd;
config_parse_res_t res;
if(argc != ... | #include "config_parse.h"
#include <stdio.h>
#include <stdlib.h>
extern char **environ;
/******************************************************************************/
int main(
int argc,
char *argv[]
)
{
FILE * conf_fd;
config_parse_res_t res;
if(argc != 2)
{
pr... | ---
+++
@@ -1,5 +1,6 @@
#include "config_parse.h"
#include <stdio.h>
+#include <string.h>
#include <stdlib.h>
extern char **environ;
@@ -15,11 +16,18 @@
if(argc != 2)
{
- printf("usage: config_parse file\n");
+ printf("usage: config_parse file ('-' for stdin)\n");
return E... | Add option to read from stdin
| mit | stefan-misik/config-parse | 6a4e3316af783cd36cb96a7dd81597cc272801e8 |
/*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <unistd.h>
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "native_client/src/untrusted/nacl/nacl_thread.h"
#inc... | /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <unistd.h>
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "native_client/src/untrusted/nacl/nacl_thread.h"
#inc... | ---
+++
@@ -15,9 +15,7 @@
* It must make it safe for vanilla newlib code to run.
*/
void __pthread_initialize_minimal(size_t tdb_size) {
- /* Adapt size for sbrk. */
- /* TODO(robertm): this is somewhat arbitrary - re-examine). */
- size_t combined_size = (__nacl_tls_combined_size(tdb_size) + 15) & ~15;
+ si... | Cleanup: Remove unnecessary rounding when allocating initial thread block
The other calls to __nacl_tls_combined_size() don't do this.
__nacl_tls_combined_size() should be doing any necessary rounding itself.
BUG=none
TEST=trybots
Review URL: https://codereview.chromium.org/18555008
git-svn-id: 721b910a23eff8a86f0... | bsd-3-clause | Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client | 13f6248da3578c67dc472fb38e1abc621fc6f2ae |
#ifndef INCLUDE_GRAPHICS_H
#define INCLUDE_GRAPHICS_H
namespace WalrusRPG
{
namespace Graphics
{
typedef struct Rect Rect_t;
struct Rect
{
int x, y;
int w, h;
};
/*
* Buffer management
*/
void buffer_allocate();
void buffer_f... | #ifndef INCLUDE_GRAPHICS_H
#define INCLUDE_GRAPHICS_H
namespace WalrusRPG
{
namespace Graphics
{
typedef struct Rect Rect_t;
struct Rect
{
int x, y;
unsigned w, h;
};
/*
* Buffer management
*/
void buffer_allocate();
void buf... | ---
+++
@@ -9,7 +9,7 @@
struct Rect
{
int x, y;
- unsigned w, h;
+ int w, h;
};
/* | Fix sprite clipping by using signed rect width
| mit | WalrusRPG/WalrusRPG,WalrusRPG/WalrusRPG,WalrusRPG/WalrusRPG,WalrusRPG/WalrusRPG | 67ecca456198488c4fd19d237d7387a80b494421 |
#ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
#endif /* !PyMPI_COMPAT_DEINOMPI_H */
| #ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
/* ---------------------------------------------------------------- */
static int PyMPI_DEINOMPI_argc = 0;
static char **PyMPI_DEINOMPI_argv = 0;
static char *PyMPI_DEINOMPI_args[2] = {0, 0};
static void PyMPI_DEINOMPI_FixArgs(int **argc, char... | ---
+++
@@ -1,46 +1,5 @@
#ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
-/* ---------------------------------------------------------------- */
-
-static int PyMPI_DEINOMPI_argc = 0;
-static char **PyMPI_DEINOMPI_argv = 0;
-static char *PyMPI_DEINOMPI_args[2] = {0, 0};
-
-static void Py... | Remove hackery for DeinoMPI, release 1.1.0 seems to work just fine | bsd-2-clause | pressel/mpi4py,mpi4py/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py | 553faa1fcfc6a119959a66371ea355899dd8efd8 |
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
#define NET_SPDY_SPDY_HTTP_UTILS_H_
#pragma once
#include "net/spdy/spdy_framer.h"
namespace net {
class HttpRe... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
#define NET_SPDY_SPDY_HTTP_UTILS_H_
#pragma once
#include "net/spdy/spdy_framer.h"
namespace net {
class HttpRe... | ---
+++
@@ -11,7 +11,7 @@
namespace net {
class HttpResponseInfo;
-class HttpRequestInfo;
+struct HttpRequestInfo;
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock. | Change forward declaration of HttpRequestInfo from class to struct to
fix build breakage.
BUG=none
TEST=none
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@59584 0039d316-1c4b-4281-b951-d872f2087c98
| bsd-3-clause | zcbenz/cefode-chromium,zcbenz/cefode-chromium,anirudhSK/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,anirudhSK/chromium,ltilve/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,Pluto-... | 86f56f6d510c533fe570fb6153b6c1f7b4b365a3 |
#pragma once
#include <winsock2.h>
#include "common/types.h"
namespace sbat {
namespace snp {
// min-MTU - (max-IP-header-size + udp-header-size)
const size_t SNP_PACKET_SIZE = 576 - (60 + 8);
enum class PacketType : byte {
Storm = 0
};
#pragma pack(push)
#pragma pack(1)
// this packet info wraps the packets s... | #pragma once
#include <winsock2.h>
#include "common/types.h"
#define SNP_PACKET_SIZE 512
namespace sbat {
namespace snp {
enum class PacketType : byte {
Storm = 0
};
#pragma pack(push)
#pragma pack(1)
// this packet info wraps the packets sent by storm/us with something that can be used to route it
struct Packet... | ---
+++
@@ -4,10 +4,13 @@
#include "common/types.h"
-#define SNP_PACKET_SIZE 512
+
namespace sbat {
namespace snp {
+// min-MTU - (max-IP-header-size + udp-header-size)
+const size_t SNP_PACKET_SIZE = 576 - (60 + 8);
+
enum class PacketType : byte {
Storm = 0
}; | Adjust snp packet size to better accomodate small MTUs.
| mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | af8f7968770fa4714fb0c4d55277fb117fc39be9 |
// Copyright (c) 2015 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSDKCollectionObject.h"
#import "TSDKObjectsRequest.h"
@interface TSDKPartnerPreferences : TSDKCollectionObject
@property (nonatomic, assign) BOOL canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable)... | // Copyright (c) 2015 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSDKCollectionObject.h"
#import "TSDKObjectsRequest.h"
@interface TSDKPartnerPreferences : TSDKCollectionObject
@property (nonatomic, assign) NSInteger canDisplayPartner; //Example: 0
@property (nonatomic, strong, null... | ---
+++
@@ -7,10 +7,10 @@
@interface TSDKPartnerPreferences : TSDKCollectionObject
-@property (nonatomic, assign) NSInteger canDisplayPartner; //Example: 0
+@property (nonatomic, assign) BOOL canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerName; //Example: **NULL**
@pr... | Change partner preference Int to Bool values
| mit | teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS | e6c4b6d82a21c29737e637dc33b89528bf77d5da |
/* stddef.h */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | /* stddef.h */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | ---
+++
@@ -27,6 +27,10 @@
typedef int ptrdiff_t;
#endif
+#if defined(__GNUC__)
+#define offsetof(type, member) __builtin_offsetof(type, member)
+#else
#define offsetof(type, member) ((size_t) (&((type *) NULL)->member))
+#endif
#endif /* __INC_stddef_h__ */ | lib: Use offsetof() builtin with GCC
The default offsetof() implementation generates a warning
(variably modified <variable> at file scope) when used in
to define the size of an array. By using this builtin with
GCC we avoid the warning and make sure no variable-size
arrays are used.
Change-Id: Iae215f777241f7daaa061... | apache-2.0 | erwango/zephyr,zephyriot/zephyr,rsalveti/zephyr,runchip/zephyr-cc3220,holtmann/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,punitvara/zephyr,finikorg/zephyr,pklazy/zephyr,zephyriot/zephyr,kraj/zephyr,erwango/zephyr,galak/zephyr,bboozzoo/zephyr,finikorg/zephyr,mbolivar/zephyr,runchip/zephyr-cc3220,ldts/zephyr,galak/zeph... | 1980b7bb0ffee0750ed832fc1b474c6ae6e85b00 |
#define GET_CLASS_INFO_EXTENDS(extends, ...) \
extends
#define GET_CLASS_INFO_IMPLEMENTS(x, y, implements...) \
implements
#define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \
nb
#define CLASS_INFO_String(what) \
GET_CLASS_INFO_ ## what(Object, 2, toString, Serializable)
#d... | #define GET_CLASS_INFO_EXTENDS(extends, ...) \
extends
#define GET_CLASS_INFO_IMPLEMENTS(x, y, implements...) \
implements
#define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \
nb
#define GET_CLASS_INFO(what, extends, nbInter, interfaces...) \
GET_CLASS_INFO_ ## what(extends, nbInter, ... | ---
+++
@@ -7,15 +7,12 @@
#define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \
nb
-#define GET_CLASS_INFO(what, extends, nbInter, interfaces...) \
- GET_CLASS_INFO_ ## what(extends, nbInter, ##interfaces)
-
#define CLASS_INFO_String(what) \
- GET_CLASS_INFO(what, Object, 1, t... | Improve new file in future
| mit | DaemonSnake/ObjectC,swac31/ObjectC,DaemonSnake/ObjectC,DaemonSnake/ObjectC,swac31/ObjectC,swac31/ObjectC | fb96a6bf54b67cf147fc1e8b95721be69b031a3c |
//
// SGCachePromise.h
// Pods
//
// Created by James Van-As on 13/05/15.
//
//
#import <PromiseKit/Promise.h>
#import <MGEvents/MGEvents.h>
typedef void(^SGCacheFetchCompletion)(id obj);
typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal);
typedef void(^SGCacheFetchOnRetry)();
@interface SGCachePromis... | //
// SGCachePromise.h
// Pods
//
// Created by James Van-As on 13/05/15.
//
//
#import "Promise.h"
#import "MGEvents.h"
typedef void(^SGCacheFetchCompletion)(id obj);
typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal);
typedef void(^SGCacheFetchOnRetry)();
@interface SGCachePromise : PMKPromise
@prop... | ---
+++
@@ -6,8 +6,8 @@
//
//
-#import "Promise.h"
-#import "MGEvents.h"
+#import <PromiseKit/Promise.h>
+#import <MGEvents/MGEvents.h>
typedef void(^SGCacheFetchCompletion)(id obj);
typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal); | Use Framework style import statements for pod Framework compatibility
| bsd-2-clause | seatgeek/SGImageCache | 8c8d940e07c6ce48a8b342baaafb290e3f9abfac |
#ifndef _PARSER_H_
#define _PARSER_H_
#include <Python.h>
#include "circular_buffer.h"
typedef enum {
COMPLETE_DATA,
MISSING_DATA,
INVALID_DATA,
PARSE_FATAL_ERROR,
} parse_result;
typedef enum {
PART_CHOOSER,
PART_SINGLE_SIZED,
PART_COUNT,
PART_INLINE,
PART_SIZE,
PART_PYSTRING... | #ifndef _PARSER_H_
#define _PARSER_H_
#include <Python.h>
#include "circular_buffer.h"
typedef enum {
COMPLETE_DATA,
MISSING_DATA,
INVALID_DATA,
PARSE_FATAL_ERROR,
} parse_result;
typedef enum {
PART_CHOOSER,
PART_SINGLE_SIZED,
PART_COUNT,
PART_INLINE,
PART_SIZE,
PART_PYSTRING... | ---
+++
@@ -36,7 +36,7 @@
Py_ssize_t list_length, list_filled;
} parser_state;
-PyObject *parser_get_results();
+PyObject *parser_get_results(void);
parse_result parser_parse_part(parser_state *s, circular_buffer *buffer);
parse_result parser_parse_unit(parser_state *s, circular_buffer *buffer); | Replace empty arguments definition with void for compatibility
| mit | gviot/nadis,gviot/nadis,gviot/nadis | 3fe765a96b95467327e9cc1cfcdabcdfea1d3818 |
/* Author: Mo McRoberts <mo.mcroberts@bbc.co.uk>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* 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.... | /* Author: Mo McRoberts <mo.mcroberts@bbc.co.uk>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* 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.... | ---
+++
@@ -22,10 +22,6 @@
#ifndef P_LIBSUPPORT_H_
# define P_LIBSUPPORT_H_ 1
-# define _BSD_SOURCE 1
-# define _DARWIN_C_SOURCE 1
-# define _FILE_OFFSET_BITS 64
-
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h> | Allow config.h or AM_CPPFLAGS to provide libc feature macros
| apache-2.0 | bbcarchdev/libsupport,bbcarchdev/libsupport,bbcarchdev/libsupport | dab86d05b6a7980c5899cb11ce14abee55ba717c |
/* Copyright (c) 2008-2019 the MRtrix3 contributors.
*
* 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/.
*
* Covered Software is provided under this License on an "a... | /* Copyright (c) 2008-2019 the MRtrix3 contributors.
*
* 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/.
*
* Covered Software is provided under this License on an "a... | ---
+++
@@ -33,7 +33,8 @@
{
static const vector<std::string> exts { ".nii", ".nii.gz", ".img" };
for (const auto& ext : exts) {
- if (path.substr (path.size() - ext.size()) == ext)
+ if (path.size() >= ext.size() &&
+ path.substr (path.size() - ext.size()) == ext)
... | Formats::is_nifti(): Fix for short file names
| mpl-2.0 | MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3 | 822adf4743536e3c0fac1861fa23e57801ebf3aa |
// This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_COMMON_IMAGE_BASE_H
#define VSNRAY_COMMOM_IMAGE_BASE_H 1
#include <cstddef>
#include <cstdint>
#include <string>
#include <visionaray/aligned_vector.h>
#include <visionaray/pixel_format.h>
namespace ... | // This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_COMMON_IMAGE_BASE_H
#define VSNRAY_COMMOM_IMAGE_BASE_H 1
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
#include <visionaray/pixel_format.h>
namespace visionaray
{
class i... | ---
+++
@@ -9,8 +9,8 @@
#include <cstddef>
#include <cstdint>
#include <string>
-#include <vector>
+#include <visionaray/aligned_vector.h>
#include <visionaray/pixel_format.h>
namespace visionaray
@@ -41,7 +41,7 @@
pixel_format format_ = PF_RGB8;
- std::vector<uint8_t> data_;
+ aligned_vector<... | Store image data in aligned_vector
| mit | tu500/visionaray,szellmann/visionaray,ukoeln-vis/ctpperf,ukoeln-vis/ctpperf,tu500/visionaray,szellmann/visionaray | 068f57c5ca513befac3b3b56de36eed2ee78400d |
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <base_window.h>
class MainWindow : public gui::BaseWindow {
public:
MainWindow();
virtual ~MainWindow();
protected:
/**
* Callback for resize window.
*
* @param event[in] Event params.
*/... | #ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <base_window.h>
class MainWindow : public gui::BaseWindow {
public:
MainWindow();
virtual ~MainWindow();
protected:
/**
* Callback for resize window.
*
* @param event[in] Event params.
*/... | ---
+++
@@ -19,6 +19,14 @@
*/
void resizeEvent(QResizeEvent *event) override;
+private slots:
+ void fix_color_correct();
+ void gray_world();
+ void gamma_correct();
+ void contrast_correct();
+ void hist_normalization();
+ void hist_equalization();
+
private:
/** Result image an... | Add slots for second lab
| mit | Dmitry94/Image_Processing,Dmitry94/Image_Processing,Dmitry94/Image_Processing | 4cfaf8cd78fdf46a6a6831e2c5ff4eae34809a34 |
#ifndef FUTURE_H_INCLUDED
#define FUTURE_H_INCLUDED
#include <boost/thread/thread.hpp>
#include <boost/thread/future.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/result_of.hpp>
namespace thread {
template<typename Func>
boost::shared_future<typename boost::result_of<Func()>::type> submit_t... | #ifndef FUTURE_H_INCLUDED
#define FUTURE_H_INCLUDED
#include <boost/thread/thread.hpp>
#include <boost/thread/future.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/result_of.hpp>
namespace thread {
template<typename Func>
boost::shared_future<typename boost::result_of<Func()>::type> submit_task(Func ... | ---
+++
@@ -15,7 +15,7 @@
PackagedTaskType task(f);
boost::shared_future<ResultType> res(task.get_future());
- boost::thread task_thread(std::move(task));
+ boost::thread task_thread(boost::move(task));
return res;
}
| Use boost::move rather than std::move which seems to hate some versions ofr G++
| bsd-2-clause | Kazade/kazbase,Kazade/kazbase | 9d4a59f2cab4179f3ff5b73477044f2f9289d5b8 |
/* command_line.c */
/* to return command line arguments */
#include <stdlib.h>
#include <math.h>
#include <ugens.h>
#include "../Minc/ext.h"
double f_arg(float *p, short n_args)
{
return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0;
}
double i_arg(float *p, short n_args)
{
return (((int)p[0]) < aarg... | /* command_line.c */
/* to return command line arguments */
#include "../H/ugens.h"
#include "../Minc/defs.h"
#include "../Minc/ext.h"
extern int aargc;
extern char *aargv[]; /* to pass commandline args to subroutines */
double f_arg(float *p, short n_args)
{
double atof();
return (((int)p[0]) < aargc - 1)... | ---
+++
@@ -1,20 +1,17 @@
/* command_line.c */
/* to return command line arguments */
-#include "../H/ugens.h"
-#include "../Minc/defs.h"
+#include <stdlib.h>
+#include <math.h>
+#include <ugens.h>
#include "../Minc/ext.h"
-extern int aargc;
-extern char *aargv[]; /* to pass commandline args to subroutin... | Delete some extern vars that were in ugens.h. Other minor cleanups.
| apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix | 91ee9e96426e8d3eb74869cfc965306f6f5603c9 |
#define BLACK 0x000000
#define GREEN 0x003000
#define BLUE 0x000030
#define CYAN 0x003030
#define RED 0x300000
#define ORANGE 0x302000
#define YELLOW 0x303000
#define PURPLE 0x300030
#define WHITE 0x303030
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN
#define SAFE_MODE YELLOW
#define ALL_D... | #define BLACK 0x000000
#define GREEN 0x001000
#define BLUE 0x000010
#define CYAN 0x001010
#define RED 0x100000
#define ORANGE 0x100800
#define YELLOW 0x101000
#define PURPLE 0x100010
#define WHITE 0x101010
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN
#define SAFE_MODE YELLOW
#define ALL_D... | ---
+++
@@ -1,12 +1,12 @@
#define BLACK 0x000000
-#define GREEN 0x001000
-#define BLUE 0x000010
-#define CYAN 0x001010
-#define RED 0x100000
-#define ORANGE 0x100800
-#define YELLOW 0x101000
-#define PURPLE 0x100010
-#define WHITE 0x101010
+#define GREEN 0x003000
+#define BLUE 0x000030
+#defi... | Increase the status LED brightness a bit so that newer DotStars
aren't super dim. This will make status NeoPixels a bit bright
but one can use samd.set_rgb_status_brightness() to dim them.
| mit | adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython | 4cc2cf0e8fc8584a8bd564c21f5448433a7f6a31 |
/* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
/* Interrupt priority `levels'; not mutually exclusive. */
#define IPL_NONE -1
#define IPL_BIO 3 /* block I/O */
#define IPL_NET 3 /* network */
#define IPL_TTY 4 /* terminal */
#define IPL_CLOCK 4 /* clock */
... | /* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
#include <m68k/psl.h>
#endif
| ---
+++
@@ -3,6 +3,20 @@
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
+/* Interrupt priority `levels'; not mutually exclusive. */
+#define IPL_NONE -1
+#define IPL_BIO 3 /* block I/O */
+#define IPL_NET 3 /* network */
+#define IPL_TTY 4 /* terminal */
+#define IPL_CLOCK 4 /* clock */
+#define IPL_IMP 4 /*... | Add IPL_ and IST_ constants in preparation for the Amiga ISA-kit
| isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars | d1aff3f0750596fbb1ffeffa858c9db2f09a215d |
/*-
* Copyright (c) 1998 David E. O'Brien
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... | int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
int dscmd(char *, char *, int, struct statinfo *);
| ---
+++
@@ -1,2 +1,30 @@
+/*-
+ * Copyright (c) 1998 David E. O'Brien
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copy... | Add copyright and RCS/CVS Id.
Noticed by: ken
| 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 | 3f431df8ec46b86090ad59ee153872c45d4d429d |
/*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... | /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwa... | ---
+++
@@ -21,17 +21,16 @@
namespace libcellml {
-struct dbg
+struct Debug
{
- dbg() = default;
+ Debug() = default;
- ~dbg()
+ ~Debug()
{
std::cout << mSS.str() << std::endl;
}
-public:
- dbg &operator<<(const void *p)
+ Debug &operator<<(const void *p)
{
... | Rename dbg struct to Debug.
| apache-2.0 | MichaelClerx/libcellml,cellml/libcellml,cellml/libcellml,hsorby/libcellml,cellml/libcellml,nickerso/libcellml,MichaelClerx/libcellml,nickerso/libcellml,hsorby/libcellml,nickerso/libcellml,cellml/libcellml,nickerso/libcellml,MichaelClerx/libcellml,hsorby/libcellml,hsorby/libcellml | aab5eceb9b33a5109792ba52bc9f1ddf39059364 |
// Taken from https://gist.github.com/arvidsson/7231973
#ifndef BITCOIN_REVERSE_ITERATOR_H
#define BITCOIN_REVERSE_ITERATOR_H
/**
* Template used for reverse iteration in C++11 range-based for loops.
*
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << " ";... | // Taken from https://gist.github.com/arvidsson/7231973
#ifndef BITCOIN_REVERSE_ITERATOR_HPP
#define BITCOIN_REVERSE_ITERATOR_HPP
/**
* Template used for reverse iteration in C++11 range-based for loops.
*
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << ... | ---
+++
@@ -1,7 +1,7 @@
// Taken from https://gist.github.com/arvidsson/7231973
-#ifndef BITCOIN_REVERSE_ITERATOR_HPP
-#define BITCOIN_REVERSE_ITERATOR_HPP
+#ifndef BITCOIN_REVERSE_ITERATOR_H
+#define BITCOIN_REVERSE_ITERATOR_H
/**
* Template used for reverse iteration in C++11 range-based for loops.
@@ -14,1... | Rename member field according to the style guide.
| mit | guncoin/guncoin,ahmedbodi/vertcoin,anditto/bitcoin,deeponion/deeponion,shelvenzhou/BTCGPU,OmniLayer/omnicore,prusnak/bitcoin,jambolo/bitcoin,practicalswift/bitcoin,Kogser/bitcoin,jtimon/bitcoin,trippysalmon/bitcoin,myriadteam/myriadcoin,stamhe/bitcoin,namecoin/namecoin-core,Exgibichi/statusquo,AkioNak/bitcoin,BitzenyCo... | 4d4fb33fce0803f9c923307bdf82b8fdd2ed140b |
/**
* @file libARSAL/ARSAL.h
* @brief Library global header for libARSAL
* @date 04/12/2013
* @author nicolas.brulez@parrot.com
*/
#ifndef _ARSAL_H_
#define _ARSAL_H_
#include <libARSAL/ARSAL_Endianness.h>
//#include <libARSAL/ARSAL_Ftw.h>
#include <libARSAL/ARSAL_Mutex.h>
#include <libARSAL/ARSAL_Print.h>
#inclu... | /**
* @file libARSAL/ARSAL.h
* @brief Library global header for libARSAL
* @date 04/12/2013
* @author nicolas.brulez@parrot.com
*/
#ifndef _ARSAL_H_
#define _ARSAL_H_
#include <libARSAL/ARSAL_Endianness.h>
#include <libARSAL/ARSAL_Ftw.h>
#include <libARSAL/ARSAL_Mutex.h>
#include <libARSAL/ARSAL_Print.h>
#include... | ---
+++
@@ -8,7 +8,7 @@
#define _ARSAL_H_
#include <libARSAL/ARSAL_Endianness.h>
-#include <libARSAL/ARSAL_Ftw.h>
+//#include <libARSAL/ARSAL_Ftw.h>
#include <libARSAL/ARSAL_Mutex.h>
#include <libARSAL/ARSAL_Print.h>
#include <libARSAL/ARSAL_Sem.h> | Comment file for the moment.
| bsd-3-clause | kradhub/libARSAL,kradhub/libARSAL,niavok/libARSAL,kradhub/libARSAL,Parrot-Developers/libARSAL,Parrot-Developers/libARSAL,niavok/libARSAL,kradhub/libARSAL,niavok/libARSAL,Parrot-Developers/libARSAL,niavok/libARSAL | 12d24d16af71b1d0ff397f70648ed72d63d2c5d1 |
#include <stdio.h>
#include <string.h>
#include "os.h"
#include "vm.h"
#include "wren.h"
int main(int argc, const char* argv[])
{
if (argc == 2 && strcmp(argv[1], "--help") == 0)
{
printf("Usage: wren [file] [arguments...]\n");
printf(" --help Show command line usage\n");
return 0;
}
if (argc... | #include <stdio.h>
#include <string.h>
#include "os.h"
#include "vm.h"
#include "wren.h"
int main(int argc, const char* argv[])
{
if (argc == 2 && strcmp(argv[1], "--help") == 0)
{
printf("Usage: wren [file] [arguments...]\n");
printf(" --help Show command line usage\n");
return 0;
}
osSetArg... | ---
+++
@@ -14,6 +14,12 @@
return 0;
}
+ if (argc == 2 && strcmp(argv[1], "--version") == 0)
+ {
+ printf("wren %s\n", WREN_VERSION_STRING);
+ return 0;
+ }
+
osSetArguments(argc, argv);
if (argc == 1) | Support "--version" in the CLI to print the version.
| mit | Nelarius/wren,minirop/wren,minirop/wren,munificent/wren,foresterre/wren,minirop/wren,foresterre/wren,munificent/wren,minirop/wren,foresterre/wren,munificent/wren,Nelarius/wren,munificent/wren,minirop/wren,munificent/wren,foresterre/wren,Nelarius/wren,munificent/wren,Nelarius/wren,Nelarius/wren,foresterre/wren | b59eeaf2d1365e2c42ea1bdb9521a5e0302469b8 |
#pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) ... | #pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) ... | ---
+++
@@ -25,10 +25,13 @@
if(neededSize <= 0)
return format;
+ // Accommodate \0
neededSize += 1;
- std::vector<char> buf(static_cast<size_t> (neededSize));
+
+ std::string buf;
+ buf.resize(static_cast<size_t> (neededSize));
snprintf(&buf.front(), static_cast<size_t> (neededSi... | Use std::string straight instead of vector<char> in format().
| mit | ndob/yarrar,ndob/yarrar,ndob/yarrar,ndob/yarrar | def6ae3782834ccbd07047ca10d7f6bf7ebde449 |
/** @file
Root include file for Mde Package SEC, PEIM, PEI_CORE type modules.
This is the include file for any module of type PEIM. PEIM
modules only use types defined via this include file and can
be ported easily to any environment.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved... | /** @file
Root include file for Mde Package SEC, PEIM, PEI_CORE type modules.
This is the include file for any module of type PEIM. PEIM
modules only use types defined via this include file and can
be ported easily to any environment.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved... | ---
+++
@@ -24,16 +24,6 @@
#include <Pi/PiPeiCis.h>
#include <Uefi/UefiMultiPhase.h>
-//
-// BUGBUG: The EFI_PEI_STARTUP_DESCRIPTOR definition does not follows PI specification.
-// After enabling PI for Nt32Pkg and tools generate correct autogen for PEI_CORE,
-// the following structure should be... | Move the EFI_PEI_STARTUP_DESCRIPTOR into IntelFrameworkPkg.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@4120 6f19259b-4bc3-4df7-8a09-765794883524
| bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 | 94db2b46f8108d0f5e6edc0d65ae20eee40414aa |
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import <Foundation/Foundation.h>
#define KW_VERSION 0.5
// Blocks being unavailable cripples the usability of Kiwi, but is supported
// because they are not available on anything less than a device running 3.2.
#i... | //
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import <Foundation/Foundation.h>
#define KW_VERSION 0.5
// Blocks being unavailable cripples the usability of Kiwi, but is supported
// because they are not available on anything less than a device running 3.2.
#i... | ---
+++
@@ -11,7 +11,9 @@
// Blocks being unavailable cripples the usability of Kiwi, but is supported
// because they are not available on anything less than a device running 3.2.
#if defined(__BLOCKS__)
- #define KW_BLOCKS_ENABLED 1
+ #ifndef KW_BLOCKS_ENABLED
+ #define KW_BLOCKS_ENABLED 1
+ #end... | Add support for disabling blocks externally via preprocessor macro definitions at the project or target level
| bsd-3-clause | ecaselles/Kiwi,allending/Kiwi,LiuShulong/Kiwi,TaemoonCho/Kiwi,emodeqidao/Kiwi,weslindsay/Kiwi,depop/Kiwi,emodeqidao/Kiwi,unisontech/Kiwi,samkrishna/Kiwi,tangwei6423471/Kiwi,samkrishna/Kiwi,tangwei6423471/Kiwi,indiegogo/Kiwi,JoistApp/Kiwi,LiuShulong/Kiwi,ashfurrow/Kiwi,howandhao/Kiwi,iosRookie/Kiwi,hyperoslo/Tusen,emode... | 6779aa4e1884e4bb6e87820f7d29f08a84fde425 |
#include <stdlib.h>
#include <time.h>
#include "graphics.h"
#include "surface.h"
#include "time-module.h"
typedef struct TimeModule {
Module base;
} TimeModule;
Module* newTimeModule()
{
TimeModule* module = malloc(sizeof(TimeModule));
module->base.width = 150;
module->base.height = 100;
module->base.updat... | #include <stdlib.h>
#include "graphics.h"
#include "surface.h"
#include "time-module.h"
typedef struct TimeModule {
Module base;
} TimeModule;
Module* newTimeModule()
{
TimeModule* module = malloc(sizeof(TimeModule));
module->base.width = 150;
module->base.height = 100;
module->base.updateFunc = updateTime... | ---
+++
@@ -1,4 +1,5 @@
#include <stdlib.h>
+#include <time.h>
#include "graphics.h"
#include "surface.h"
@@ -25,9 +26,20 @@
void updateTimeModule(Module* module, Surface* surface)
{
+ // Get the current time
+ time_t t;
+ struct tm* tm;
+ t = time(NULL);
+ tm = localtime(&t);
+
+ char strTime[6];
+ s... | Replace placeholder string in time module with time.
| mit | jamiesyme/minfo,jamiesyme/minfo | ded8ea7469b305ee6ceb65103af010329b97ce9a |
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_create(struct client *client)
{
struct mail_storage *storage;
const char *mailbox, *full_mailbox;
int directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
full_mailbox ... | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_create(struct client *client)
{
struct mail_storage *storage;
const char *mailbox;
int directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
storage = client_find_stora... | ---
+++
@@ -6,13 +6,14 @@
int cmd_create(struct client *client)
{
struct mail_storage *storage;
- const char *mailbox;
+ const char *mailbox, *full_mailbox;
int directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
+ full_mailbox = mailbox;
storag... | CREATE was broken if namespace prefixes were set. Patch by Andreas Fuchs.
| mit | LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot,LTD-Beget/dovecot | cdb2eaafed65da729c51179cab0d0b31692cfea7 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* libmspub
* Version: MPL 1.1 / GPLv2+ / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified ... | namespace libmspub
{
const unsigned EMUS_IN_INCH = 914400;
}
| ---
+++
@@ -1,4 +1,38 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* libmspub
+ * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance wit... | Add license header to the file
| mpl-2.0 | LibreOffice/libmspub,LibreOffice/libmspub,LibreOffice/libmspub | f4a3cffb0a988313acdb83a6d658001c8c06e07b |
//
// lelib.h
// lelib
//
// Created by Petr on 27.10.13.
// Copyright (c) 2013,2014 Logentries. All rights reserved.
//
#ifndef LE_DEBUG_LOGS
// #ifdef DEBUG
// #define LE_DEBUG_LOGS 1
// #else
#define LE_DEBUG_LOGS 0
// #endif
#endif
#if LE_DEBUG_LOGS
#define LE_DEBUG(...) NSLog(... | //
// lelib.h
// lelib
//
// Created by Petr on 27.10.13.
// Copyright (c) 2013,2014 Logentries. All rights reserved.
//
#ifndef LE_DEBUG_LOGS
#ifdef DEBUG
#define LE_DEBUG_LOGS 1
#else
#define LE_DEBUG_LOGS 0
#endif
#endif
#if LE_DEBUG_LOGS
#define LE_DEBUG(...) NSLog(__VA_ARG... | ---
+++
@@ -7,11 +7,11 @@
//
#ifndef LE_DEBUG_LOGS
- #ifdef DEBUG
- #define LE_DEBUG_LOGS 1
- #else
+// #ifdef DEBUG
+// #define LE_DEBUG_LOGS 1
+// #else
#define LE_DEBUG_LOGS 0
- #endif
+// #endif
#endif
#if LE_DEBUG_LOGS | Disable LE's own debug log spam | mit | JohnLemberger/le_ios | 16e0b0cb9c40169a646660f492617c037e8acafe |
#pragma once
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
| #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
| ---
+++
@@ -1,5 +1,4 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
+#pragma once
#include <QMainWindow>
@@ -19,4 +18,3 @@
Ui::MainWindow *ui;
};
-#endif // MAINWINDOW_H | Use pragma once instead of ifdef
| bsd-2-clause | csete/softrig,csete/softrig,csete/softrig | a21685eab417189d887db6d5a83bfff83661c1eb |
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
... | /**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
... | ---
+++
@@ -10,4 +10,22 @@
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
+/**
+ * @internal
+ *
+ * @brief Requests a list of addresses corresponding to a given name.
+ *
+ * @since 1.8
+ *
+ * @remarks This is used if you want to search the address from a name.
+ *
+ * @param obj The map objec... | map: Add missing legacy API into legacy header
Summary: @fix
Reviewers: raster
Reviewed By: raster
Differential Revision: https://phab.enlightenment.org/D1164
| lgpl-2.1 | FlorentRevest/Elementary,tasn/elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,rvandegrift/elementary | cfdaffb8cf65ab0a934de2efb513e66989b4bad6 |
// LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace b... | // LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace b... | ---
+++
@@ -33,6 +33,14 @@
return m_digest[index];
}
+ const uint8_t *digest() const {
+ return m_digest.data();
+ }
+
+ size_t size() const {
+ return m_digest.size();
+ }
+
private:
std::vector<uint8_t> m_digest;
}; | Add Sha1 class methods digest() and size()
| mit | aseprite/laf,aseprite/laf | 71e936386443d7e71382dc6d0b9cfeccf47a89ea |
#include <pthread.h>
#include <assert.h>
int g = 0;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&C);
pthread_mutex_lock(&B);
g = 5;
pthread_mut... | #include <pthread.h>
#include <assert.h>
int g = 0;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&C);
pthread_mutex_lock(&B);
g = 5;
pthread_mut... | ---
+++
@@ -24,18 +24,19 @@
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
+ // This must be before the other to get Mine to fail for the other even with thread ID partitioning.
+ pthread_mutex_lock(&B);
+ pthread_mutex_lock(&C);
+ assert(g == 0);
+ pthread_mutex_unlock(&C);
+ pthread_mutex_unloc... | Fix 13/32 to fail Mine even with thread ID partitioning
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | 16c5392030f8f27d6b41395ccb45194cfbca79ed |
#pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
#include "encoderfoaw.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constan... | #pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constants::two_pi<T>();
}
... | ---
+++
@@ -1,6 +1,7 @@
#pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
+#include "encoderfoaw.h"
namespace angle {
template <typename T>
@@ -29,4 +30,10 @@
}
return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>();
}
+
+template <typename T, size_... | Add function to obtain encoder angular rate
Add function to angle namespace to obtain encoder angular rate in rad/s.
This requires that the encoder object has a velocity() member function
which means only EncoderFoaw for now.
| bsd-2-clause | oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos | 5a7a1d9b287813559f13298575dba1de09040900 |
#pragma once
#include <string>
#include <cstdlib>
// Integer types
#ifdef int8_t
typedef char int8_t;
#endif // !int8_t
#ifdef uint8_t
typedef unsigned char uint8_t;
#endif // !uint8_t
#ifdef int16_t
typedef short int16_t;
#endif // !int16_t
#ifdef uint16_t
typedef unsigned short uint16_t;
#endif // !uint16_t
#if... | #pragma once
#include <string>
#include <cstdlib>
// Integer types
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef long int32_t;
typedef unsigned long uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#ifndef _swap_int
templ... | ---
+++
@@ -4,14 +4,37 @@
#include <cstdlib>
// Integer types
+#ifdef int8_t
typedef char int8_t;
+#endif // !int8_t
+
+#ifdef uint8_t
typedef unsigned char uint8_t;
+#endif // !uint8_t
+
+#ifdef int16_t
typedef short int16_t;
+#endif // !int16_t
+
+#ifdef uint16_t
typedef unsigned short uint16_t;
+#endif // ... | Fix basic type redefinition errors
| mit | LartSimZ/gameAmbiance | c7d9355a433bbd0f82dfa466bf220101e456789a |
#include "MMDB.h"
#include "tap.h"
#include <sys/stat.h>
#include <string.h>
#if HAVE_CONFIG_H
# include <config.h>
#endif
int main(void)
{
const char *version = MMDB_lib_version();
ok(version != NULL, "MMDB_lib_version exists");
if ( version )
ok(strcmp(version, PACKAGE_VERSION) == 0, "version is ... | #include "MMDB.h"
#include "tap.h"
#include <sys/stat.h>
#include <string.h>
#if HAVE_CONFIG_H
# include <config.h>
#endif
int main(void)
{
const char *version = MMDB_lib_version();
ok(version != NULL, "MMDB_lib_version exists");
ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
... | ---
+++
@@ -10,6 +10,7 @@
{
const char *version = MMDB_lib_version();
ok(version != NULL, "MMDB_lib_version exists");
- ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
+ if ( version )
+ ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
do... | Check version string only if MMDB_lib_version != NULL
| apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb | dde3ee5113fd0ae40cfb6788e4bd0a2a8c60eb72 |
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
// Only for the autoload, autoparse. No IO of these classes is foreseen!
// Exclude in case ROOT does not have IMT support
#ifdef R__USE_IMT
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C... | #ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
// Only for the autoload, autoparse. No IO of these classes is foreseen!
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experi... | ---
+++
@@ -5,8 +5,11 @@
#pragma link off all functions;
// Only for the autoload, autoparse. No IO of these classes is foreseen!
+// Exclude in case ROOT does not have IMT support
+#ifdef R__USE_IMT
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma li... | [IMT] Fix warning during dictionary generation in no-imt builds
| lgpl-2.1 | karies/root,olifre/root,olifre/root,karies/root,karies/root,olifre/root,olifre/root,olifre/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/ro... | 322b07ff24932fb0e59114e30620e47501a84191 |
#define _XOPEN_SOURCE 500 /* mkstemp */
#include <stdlib.h>
#include <unistd.h>
#include "tmpfile.h"
#include "alloc.h"
int tmpfile_prefix_out(const char *prefix, char **const fname)
{
char *tmppath;
int fd;
char *tmpdir = getenv("TMPDIR");
#ifdef P_tmpdir
if(!tmpdir)
tmpdir = P_tmpdir;
#endif
if(!tmpdir)
t... | #define _XOPEN_SOURCE 500 /* mkstemp */
#include <stdlib.h>
#include <unistd.h>
#include "tmpfile.h"
#include "alloc.h"
int tmpfile_prefix_out(const char *prefix, char **const fname)
{
char *tmppath;
int fd;
char *tmpdir = getenv("TMPDIR");
#ifdef P_tmpdir
if(!tmpdir)
tmpdir = P_tmpdir;
#endif
if(!tmpdir)
t... | ---
+++
@@ -21,11 +21,6 @@
tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix);
fd = mkstemp(tmppath);
- if(fd < 0){
- free(tmppath);
- tmppath = NULL;
- }
-
if(fname)
*fname = tmppath;
else | Revert "Free tmppath on mkstemp() failure" (moved to master)
This reverts commit 85598a0ccbea2d82303c5cb2daa9a29ec01eb3d2.
| mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler | 5560daf0cbabab65b07476ca16285012a4f6489e |
// RUN: %clang_cc1 -triple i686-pc-linux -emit-llvm < %s | FileCheck %s
// All of these should uses the memory representation of _Bool
// CHECK-LABEL: %struct.teststruct1 = type { i8, i8 }
// CHECK-LABEL: @test1 = common global %struct.teststruct1
struct teststruct1 {_Bool a, b;} test1;
// CHECK-LABEL: @test2 = commo... | // RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1
// All of these should uses the memory representation of _Bool
struct teststruct1 {_Bool a, b;} test1;
_Bool* test2;
_Bool test3[10];
_Bool (*test4)[];
void f(int x) {
_Bool test5;
_Bool test6[x];
}
| ---
+++
@@ -1,10 +1,24 @@
-// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1
+// RUN: %clang_cc1 -triple i686-pc-linux -emit-llvm < %s | FileCheck %s
// All of these should uses the memory representation of _Bool
+
+// CHECK-LABEL: %struct.teststruct1 = type { i8, i8 }
+// CHECK-LABEL: @test1 = common global %s... | Convert test to FileCheck and make it more strict.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@197248 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... | 7a9c7c2303dcd388acfc7467473f3cdc0facbd91 |
#pragma once
#include <unistd.h>
#include <sys/syscall.h>
#ifdef HAVE_LINUX_MODULE_H
#include <linux/module.h>
#endif
#ifndef MODULE_INIT_IGNORE_MODVERSIONS
# define MODULE_INIT_IGNORE_MODVERSIONS 1
#endif
#ifndef MODULE_INIT_IGNORE_VERMAGIC
# define MODULE_INIT_IGNORE_VERMAGIC 2
#endif
#ifndef __NR_finit_module
#... | #pragma once
#include <unistd.h>
#include <sys/syscall.h>
#ifdef HAVE_LINUX_MODULE_H
#include <linux/module.h>
#endif
#ifndef MODULE_INIT_IGNORE_MODVERSIONS
# define MODULE_INIT_IGNORE_MODVERSIONS 1
#endif
#ifndef MODULE_INIT_IGNORE_VERMAGIC
# define MODULE_INIT_IGNORE_VERMAGIC 2
#endif
#ifndef __NR_finit_module
#... | ---
+++
@@ -34,9 +34,12 @@
#endif
#if !HAVE_DECL_STRNDUPA
-#define strndupa(s, length) \
- ({ \
- size_t __len = strnlen((s), (length)); \
- strncpy(alloca(__len + 1), (s), __len); \
+#define strndupa(s, n) \
+ ({ \
+ const char *__old = (s); \
+ size_t __len = strnlen(__old, (n)); \
+ cha... | Make sure there's NUL byte at the end of strndupa
Since strcpy() doesn't ensure we have a NUL byte in the resulting
string, use alloca() + memcpy(). Also make sure we don't evaluate "s"
twice.
| lgpl-2.1 | pmmccorm/kmod,lpereira/kmod,Distrotech/kmod,pmmccorm/kmod,pmmccorm/kmod,lucasdemarchi/kmod,lpereira/kmod,Distrotech/kmod,lucasdemarchi/kmod,Distrotech/kmod,lpereira/kmod,lucasdemarchi/kmod | f5cdd574a531ed156d30efe2e06c4cf463469588 |
#ifndef BOREUTILS_H
#define BOREUTILS_H
#include <string.h>
static const char *BOREUTILS_VERSION = "0.0.0b1";
int has_arg(int argc, char **argv, char *search);
void bu_missing_argument(char *name);
int bu_handle_version(int argc, char **argv);
// FIXME: Having this in a header is definitely a hack.
int has_arg(int... | #ifndef BOREUTILS_H
#define BOREUTILS_H
#include <string.h>
static const char *BOREUTILS_VERSION = "0.0.0b1";
int has_arg(int argc, char **argv, char *search);
void bu_missing_argument(char *name);
int bu_handle_version(int argc, char **argv);
// FIXME: Having this in a header is definitely a hack.
int has_arg(int... | ---
+++
@@ -30,7 +30,7 @@
int bu_handle_version(int argc, char **argv) {
if (has_arg(argc, argv, "--version")) {
- printf("Boreutils %s v%s\n", argv[0], BOREUTILS_VERSION);
+ printf("%s (Boreutils) %s\n", argv[0], BOREUTILS_VERSION);
return 1;
}
| Change --version format to "<name> (Boreutils) <version>"
| isc | duckinator/boreutils,duckinator/boreutils | 548a5f97ccdab26e90a7e0ba87b1510cfd490dbb |
#include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static bool flushAfterLog = false;
void proxyLogSetFlush(bool enabled)
{
flushAfterLog = enabled;
}
void proxyLog(const char* format, ...)
{
va_list args;
va_start(args, f... | #include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static bool flushAfterLog = false;
void proxyLogSetFlush(bool enabled)
{
flushAfterLog = enabled;
}
void proxyLog(const char* format, ...)
{
va_list args;
va_start(args, f... | ---
+++
@@ -20,9 +20,9 @@
va_start(args, format);
printTimeString();
- printf(" ");
+ putchar(' ');
vprintf(format, args);
- printf("\n");
+ putchar('\n');
if (flushAfterLog)
{ | Use putchar instead of printf.
| mit | aaronriekenberg/openbsd_cproxy,aaronriekenberg/openbsd_cproxy | f3e611c9e373a0147be472cb7913f3604baf2a08 |
/* See LICENSE file for copyright and license details. */
#include "internals.h"
void
libzahl_realloc(z_t a, size_t need)
{
size_t i, x;
zahl_char_t *new;
/* Find n such that n is a minimal power of 2 ≥ need. */
if (likely((need & (~need + 1)) != need)) {
need |= need >> 1;
need |= need >> 2;
need |= need ... | /* See LICENSE file for copyright and license details. */
#include "internals.h"
void
libzahl_realloc(z_t a, size_t need)
{
#if defined(__clang__) /* https://llvm.org/bugs/show_bug.cgi?id=26930 */
volatile size_t j;
#else
# define j i
#endif
size_t i, x;
zahl_char_t *new;
/* Find n such that n is a minimal powe... | ---
+++
@@ -5,11 +5,6 @@
void
libzahl_realloc(z_t a, size_t need)
{
-#if defined(__clang__) /* https://llvm.org/bugs/show_bug.cgi?id=26930 */
- volatile size_t j;
-#else
-# define j i
-#endif
size_t i, x;
zahl_char_t *new;
@@ -18,7 +13,7 @@
need |= need >> 1;
need |= need >> 2;
need |= need >> 4;
-... | Fix so that no workaround is required.
Thanks to Alexis Megas.
Signed-off-by: Mattias Andrée <3d72f033b30d63e7ff5f0b71398e9c45b66386a1@kth.se>
| isc | maandree/libzahl,maandree/libzahl,maandree/libzahl | e949bf64e01c9a2de41eb3a4479db0e58cd4caa6 |
#import <UIKit/UIKit.h>
@protocol NBNPhotoChooserViewControllerDelegate;
@interface NBNPhotoChooserViewController : UIViewController
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate;
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate
... | #import <UIKit/UIKit.h>
@protocol NBNPhotoChooserViewControllerDelegate;
@interface NBNPhotoChooserViewController : UIViewController
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate;
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate
... | ---
+++
@@ -18,6 +18,8 @@
@protocol NBNPhotoChooserViewControllerDelegate <NSObject>
- (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image;
+
+@optional
- (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser;
@end | Make delegate method optional (cancellation is handled automatically when using UINavigationController)
| mit | nerdishbynature/NBNPhotoChooser,kimar/NBNPhotoChooser | 753ceda15f9730e7e0a660b1a0e9d387a3c1bf66 |
/*
* Copyright 2016, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT... | /*
* Copyright 2016, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT... | ---
+++
@@ -11,6 +11,8 @@
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT_MACHINE_HARDWARE_H
+#include <plat/machine/hardware_gen.h>
+
#define physBase 0x80000000
#define kernelBase 0xe0000000
#define physMappingOffset (kernelBase - physBase) | arm-hyp: Correct previous merge with master
| bsd-2-clause | cmr/seL4,cmr/seL4,cmr/seL4 | 1d777adbe4b7b314287a60b63e6f56212c8f286b |
#ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#ifdef DEBUG
#define TRACE ERROR
#else
#define TRACE(fmt,arg...) ((void) 0)
#endif
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg)
#define FATAL(fmt,arg...) do { \
ERROR(fmt, ##arg); \... | #ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#define TRACE ERROR
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg)
#define FATAL(fmt,arg...) do { \
ERROR(fmt, ##arg); \
exit(1); \
} while (0)
#endif
| ---
+++
@@ -3,7 +3,11 @@
#include <stdio.h>
#include <errno.h>
+#ifdef DEBUG
#define TRACE ERROR
+#else
+#define TRACE(fmt,arg...) ((void) 0)
+#endif
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg) | Make TRACE depend on DEBUG.
| lgpl-2.1 | dimm0/tacc_stats,sdsc/xsede_stats,rtevans/tacc_stats_old,ubccr/tacc_stats,aaichsmn/tacc_stats,TACC/tacc_stats,dimm0/tacc_stats,rtevans/tacc_stats_old,sdsc/xsede_stats,TACC/tacc_stats,TACCProjects/tacc_stats,dimm0/tacc_stats,TACCProjects/tacc_stats,TACCProjects/tacc_stats,TACC/tacc_stats,aaichsmn/tacc_stats,ubccr/tacc_s... | 15378c98e1987964299a406232dc405a11c7a413 |
/**
* @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 la... | /**
* @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 la... | ---
+++
@@ -13,8 +13,8 @@
* @file JPetMCDecayTree.h
*/
-#ifndef _JPETMCHIT_H_
-#define _JPETMCHIT_H_
+#ifndef _JPETMCDECAYTREE_H_
+#define _JPETMCDECAYTREE_H_
#include "./JPetHit/JPetHit.h"
@@ -22,20 +22,18 @@
* @brief Data class representing a hit of a photon in the scintillator strip based on Monte Ca... | Change header guard name to do not colide with JPetMCHit
| apache-2.0 | JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework | b60ffe69ae77c59e05f2f3985955b0034ba93b7a |
/* Manages interaction with the buttons */
#ifndef BUTTON_H
#define BUTTON_H
#include <Arduino.h>
const unsigned char BUTTON_NONE = 100;
bool button_isPressed(uint8_t buttonNumber);
void button_wait(uint8_t buttonNumber);
void button_ISR();
#endif
| /* Manages interaction with the buttons */
#ifndef BUTTON_H
#define BUTTON_H
const unsigned char BUTTON_NONE = 100;
bool button_isPressed(int buttonNumber);
void button_wait(int buttonNumber);
void button_ISR();
#endif
| ---
+++
@@ -2,10 +2,12 @@
#ifndef BUTTON_H
#define BUTTON_H
+#include <Arduino.h>
+
const unsigned char BUTTON_NONE = 100;
-bool button_isPressed(int buttonNumber);
-void button_wait(int buttonNumber);
+bool button_isPressed(uint8_t buttonNumber);
+void button_wait(uint8_t buttonNumber);
void button_ISR();
... | Fix header to be the same as cpp
| mit | SUPERETDUPER/bolt-arduino | 6a4888c54b31429442078f2bd804f0714b9e629d |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main (int argc, char *argv[]){
if(argc != 3){
printf("Number of parameters should be 2 (filename, arity).");
exit(1);
}
int alphabet[128] = {0};
int arity = atoi(argv[2]);
int treeLayers = ceil(7/log2(arity));
printf("Nu... | #include<stdio.h>
#include<stdlib.h>
int main (int argc, char *argv[]){
if(argc != 3){
printf("Number of parameters should be 2 (filename, cardinality).");
exit(1);
}
//open file and get file length
FILE *file;
file = fopen(argv[1],"r");
if(file == NULL){
printf("File c... | ---
+++
@@ -1,11 +1,17 @@
#include<stdio.h>
#include<stdlib.h>
+#include<math.h>
int main (int argc, char *argv[]){
if(argc != 3){
- printf("Number of parameters should be 2 (filename, cardinality).");
+ printf("Number of parameters should be 2 (filename, arity).");
exit(1);
}
+
... | Define alphabet and number of tree layers
| mit | marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree | be6f28f28b57e912df6c276060bc38e7912a2262 |
#pragma once
#include "dependencies/tinyformat/tinyformat.h"
#include <algorithm>
#include <cstdint>
#include <fstream>
#include <glm/glm.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#i... | #pragma once
#include "dependencies/tinyformat/tinyformat.h"
#include <algorithm>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/locale.hpp>
#include <cstdint>
#include <fstream>
#include <glm/glm.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <iostream>
#include <istream>
#include <ite... | ---
+++
@@ -2,8 +2,6 @@
#include "dependencies/tinyformat/tinyformat.h"
#include <algorithm>
-#include <boost/algorithm/string/predicate.hpp>
-#include <boost/locale.hpp>
#include <cstdint>
#include <fstream>
#include <glm/glm.hpp> | Remove some rarely-used headers from library pch
| mit | FranciscoDA/OpenApoc,Istrebitel/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc,Istrebitel/OpenApoc,pmprog/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc,pmprog/OpenApoc | b36bf96bc95556d07cfa3c289beb51a998723d19 |
/* $OpenBSD: vmparam.h,v 1.4 2014/03/27 21:58:13 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 3 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
| /* $OpenBSD: vmparam.h,v 1.3 2011/03/23 16:54:35 pirofti Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 2 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */... | ---
+++
@@ -1,9 +1,9 @@
-/* $OpenBSD: vmparam.h,v 1.3 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: vmparam.h,v 1.4 2014/03/27 21:58:13 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
-#define VM_PHYSSEG_MAX 2 /* Max number of physical memory segments */
+#define V... | Increase VM_PHYSSEG_MAX, necessary for systems with non-contiguous memory
(such as 2E and 3A systems).
| isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars | 2c23625aeeb91c496f68abd812eab53b6d87bae5 |
/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pra... | /*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pra... | ---
+++
@@ -51,6 +51,10 @@
};
return it;
}
+
+ std::shared_ptr<ExportedStat> getStatPtr(folly::StringPiece name) {
+ return std::make_shared<ExportedStat>();
+ }
};
}} | Fix some build issues in the open source code.
Summary:
Our code grew some implicit transitive dependencies on
the headers that internal headers included, but our stubs
did not. This fixes that, and updates our stubs to match
what our code expects.
Test Plan: Apply to open source repository and test.
Reviewed By: yf... | bsd-3-clause | sonoble/fboss,sonoble/fboss,neuhausler/fboss,raphaelamorim/fboss,peterlei/fboss,raphaelamorim/fboss,neuhausler/fboss,neuhausler/fboss,peterlei/fboss,peterlei/fboss,biddyweb/fboss,raphaelamorim/fboss,biddyweb/fboss,biddyweb/fboss,neuhausler/fboss,sonoble/fboss,peterlei/fboss | fd7f66f8c2d75858a2fd7ede056418d7be109792 |
#ifndef TEST_HELPER_C
#define TEST_HELPER_C (1)
#include "MMDB.h"
typedef union {
struct in_addr v4;
struct in6_addr v6;
} in_addrX;
char *get_test_db_fname(void);
void ip_to_num(MMDB_s * mmdb, char *ipstr, in_addrX * dest_ipnum);
int dbl_cmp(double a, double b);
#endif
|
#ifndef TEST_HELPER_C
#define TEST_HELPER_C (1)
#include "MMDB.h"
#define MMDB_DEFAULT_DATABASE "/usr/local/share/GeoIP/GeoIP2-City.mmdb"
typedef union {
struct in_addr v4;
struct in6_addr v6;
} in_addrX;
char *get_test_db_fname(void);
void ip_to_num(MMDB_s * mmdb, char *ipstr, in_addrX * dest_ipnum);
int ... | ---
+++
@@ -3,8 +3,6 @@
#define TEST_HELPER_C (1)
#include "MMDB.h"
-
-#define MMDB_DEFAULT_DATABASE "/usr/local/share/GeoIP/GeoIP2-City.mmdb"
typedef union {
struct in_addr v4; | Remove superfluous default db definition
| apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb | a2fff26fae03cd46562d8d146dde1d6ebd7d9f8d |
#ifndef _GEN_H
#define _GEN_H
#define MAKEFILE "Makefile"
#define FS_NONE 0
#define FS_RECURSIVE (1 << 0)
#define FS_DEFAULT FS_RECURSIVE
#define FS_FOLLOWLINK (1 << 1)
#define FS_DOTFILES (1 << 2)
#define FS_MATCHDIRS (1 << 3)
#include <regex.h>
#include <unistd.h>
#include <sys/param.h>
#include <fstream>
class Ge... | #ifndef _GEN_H
#define _GEN_H
#define MAKEFILE "Makefile"
#include <fstream>
#include <sys/param.h>
class Generate
{
public:
char cwd[MAXPATHLEN];
const char *defaultMakefile;
FILE *Makefile;
FILE *newConfig;
Generate();
~Generate();
char *DefineBaseDir();
void WriteMake();
void GenBlankConfig();
void Chec... | ---
+++
@@ -1,14 +1,24 @@
#ifndef _GEN_H
#define _GEN_H
+
#define MAKEFILE "Makefile"
+#define FS_NONE 0
+#define FS_RECURSIVE (1 << 0)
+#define FS_DEFAULT FS_RECURSIVE
+#define FS_FOLLOWLINK (1 << 1)
+#define FS_DOTFILES (1 << 2)
+#define FS_MATCHDIRS (1 << 3)
+#include <regex.h>
+#include <unistd.h>
+#include ... | Add FS defines, move includes, add member functions
- Defines define flags for WalkDir
- Fix includes order to that of:
C includes
C++ includes
Project includes
External library includes
Signed-off-by: Alberto Corona <c1a4158909d6c23f73df353c7cc0bbe963891a65@0x1a.us>
| bsd-3-clause | 0X1A/yabs,0X1A/yabs,0X1A/yabs,0X1A/yabs | f80e44e09a5669c6275880b8250346faca1c895a |
// PARAM: --enable ana.float.interval
#include <assert.h>
// previously failed in line 7 with "exception Invalid_argument("Cilfacade.get_ikind: non-integer type double ")"
//(same error as in sv-comp: float-newlib/float_req_bl_0220a.c)
// similar error also occurred in the additional examples when branching on a float... | // PARAM: --enable ana.float.interval
#include <assert.h>
// previously failed in line 7 with "exception Invalid_argument("Cilfacade.get_ikind: non-integer type double ")"
//(same error as in sv-comp: float-newlib/float_req_bl_0220a.c)
// similar error also occured in the additional examples when branching on a float ... | ---
+++
@@ -3,19 +3,19 @@
// previously failed in line 7 with "exception Invalid_argument("Cilfacade.get_ikind: non-integer type double ")"
//(same error as in sv-comp: float-newlib/float_req_bl_0220a.c)
-// similar error also occured in the additional examples when branching on a float argument
+// similar error... | Modify test 57/12 to actually trigger the issue
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | c6a31b64d9f980ef3e26bd26e4688788c80d310b |
/* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Inc.
*
* 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... | /* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Inc.
*
* 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... | ---
+++
@@ -23,7 +23,7 @@
#include "wombat/port.h"
-typedef int wUuid;
+typedef char* wUuid;
COMMONExpDLL
void wUuid_generate_time (wUuid myUuid); | Change uuid to char* from int for Windows
Signed-off-by: Mike Schonberg <a0b795d7498c6bea81956c992e86c1008615b63d@nyx.com>
| lgpl-2.1 | MattMulhern/OpenMamaCassandra,jacobraj/MAMA,MattMulhern/OpenMamaCassandra,dmaguire/OpenMAMA,dpauls/OpenMAMA,philippreston/OpenMAMA,jacobraj/MAMA,jacobraj/MAMA,fquinner/OpenMAMA,jacobraj/MAMA,vulcanft/openmama,dmaguire/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,dmagOM/OpenMAMA-dynamic,dmagOM/OpenMAMA-... | 72667ea922ed9b703b56a87cd71844b74801cd55 |
#include "redismodule.h"
#include <stdlib.h>
int HelloworldRand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithLongLong(ctx,rand());
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ct... | #include "redismodule.h"
#include <stdlib.h>
int HelloworldRand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithLongLong(ctx,rand());
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_... | ---
+++
@@ -6,12 +6,12 @@
return REDISMODULE_OK;
}
-int RedisModule_OnLoad(RedisModuleCtx *ctx) {
+int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (R... | Fix OnLoad signature and configure command parameters properly
| mit | RedisLabs/jedis,HeartSaVioR/jedis,yapei123/jedis,sazzad16/jedis,mosoft521/jedis,mosoft521/jedis,HeartSaVioR/jedis,smagellan/jedis,sazzad16/jedis,zts1993/jedis,yapei123/jedis,smagellan/jedis,xetorthio/jedis,xetorthio/jedis,zts1993/jedis,RedisLabs/jedis | a911ff6cc87fa430dac4cbe0017633796907b839 |
#ifndef SSPAPPLICATION_AI_LEVELDIRECTOR_H
#define SSPAPPLICATION_AI_LEVELDIRECTOR_H
#include "Observer.h"
#include <vector>
//#define NUMSTATES 3
namespace FSMEnvironment
{
#pragma region temp
enum Hint
{
NONE = 0,
EXAMPLE
};
struct State
{
int stateID = -1;
int timeDelay = -1;
Hint hint = Hint::NONE;
... | #ifndef SSPAPPLICATION_AI_LEVELDIRECTOR_H
#define SSPAPPLICATION_AI_LEVELDIRECTOR_H
#include "Observer.h"
#include <vector>
class LevelDirector
{
private: // Variables
/* TEMP STATE STRUCTURE */
static enum State
{
NONE = 0,
START,
DEFAULT,
GOAL
};
State m_currentState;
State m_defaultState;
//State m_go... | ---
+++
@@ -2,38 +2,56 @@
#define SSPAPPLICATION_AI_LEVELDIRECTOR_H
#include "Observer.h"
#include <vector>
-class LevelDirector
+//#define NUMSTATES 3
+namespace FSMEnvironment
{
-private: // Variables
- /* TEMP STATE STRUCTURE */
- static enum State
+
+#pragma region temp
+ enum Hint
{
NONE = 0,
- START,
... | FIX cleaned up header file to resemble FSM environment
| apache-2.0 | Chringo/SSP,Chringo/SSP | 11f88734c26a6b477c9715720aac5af8b455a605 |
#ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
// #define HAL_RTC_MODULE_ENABLED
// #define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| #ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| ---
+++
@@ -2,9 +2,9 @@
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
-#define HAL_SPI_MODULE_ENABLED
+// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
-#define HAL_RTC_MODULE_ENABLED
-#define HAL_TIMER_MODULE_ENABLED
+// #define HAL_RTC_MODULE_ENABLED
+// #define HAL_TIMER_MODULE_E... | nrf5/boards: Disable SPI/Timer/RTC hal from microbit board.
| mit | tralamazza/micropython,tralamazza/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit... | ec44f6427bce56ef92dff2ef208f41686c69be0e |
//
// AppPreferences.h
//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
@interface AppSettings : CDVPlugin
- (void)fetch:(CDVInvokedUrlCommand*)command;
@end
| //
// AppPreferences.h
//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
@interface AppSettings : CDVPlugin
- (void)get:(CDVInvokedUrlCommand*)command;
@end
| ---
+++
@@ -1,13 +1,13 @@
//
// AppPreferences.h
-//
+//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
-@interface AppSettings : CDVPlugin
+@interface AppSettings : CDVPlugin
-- (void)get:(CDVInvokedUrlCommand*)command;
+- (void)fetch:(CDVInvokedUrlCommand*)command;
@end | Update method from get to fetch
| apache-2.0 | greg-laughlin-hs/app-settings-reader,greg-laughlin-hs/app-settings-reader | 24746780a3c46b0607edcf65fcdbb2e61b3058fd |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
namespace rocksdb {
// The helper function ... | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
namespace rocksdb {
// The helper function to assert the ... | ---
+++
@@ -2,6 +2,8 @@
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
+
+#pragma once
namespace rocksdb {
// The helper function to assert the move from dynamic_cas... | Add a missing "once" in .h
Summary: Closes https://github.com/facebook/rocksdb/pull/2670
Differential Revision: D5529018
Pulled By: siying
fbshipit-source-id: 10a378933d509035d2dbe502247dd85fcea09789
| bsd-3-clause | Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,bbiao/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,SunguckLee/RocksDB,bbiao/rocksdb,Andymic/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,Andymic/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,SunguckLee/RocksDB,Andymic/roc... | a84cee8127a0e9724b26e7d1d527f220c358c328 |
static struct hep_ctx ctx = {
.initfails = 0,
.hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_host = "10.0.0.1",
.capt_port = "9060",
.capt_id = 101,
.hep_version = 3,
.usessl = 0,
.pl_compress = 0,
.sendPacketsCount = 0
};
| static struct hep_ctx ctx = {
.initfails = 0,
.hints = {{ 0 }},
.capt_host = "10.0.0.1",
.capt_port = "9060",
.hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_id = 101,
.hep_version = 3,
.usessl = 0,
.pl_compress = 0,
.sendPacketsCount = 0... | ---
+++
@@ -1,9 +1,8 @@
static struct hep_ctx ctx = {
.initfails = 0,
- .hints = {{ 0 }},
+ .hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_host = "10.0.0.1",
.capt_port = "9060",
- .hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_id = 101,
.hep_vers... | Move .hints definition in place.
| bsd-2-clause | dsanders11/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy | 01913372e8b7a8314cba41c329464bc3d355b477 |
/*
* Copyright 2008 Michael Ellerman, IBM Corporation.
*
* 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.
*/
... | /*
* Copyright 2008 Michael Ellerman, IBM Corporation.
*
* 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.
*/
... | ---
+++
@@ -26,12 +26,18 @@
unsigned long target, int flags)
{
unsigned int instruction;
+ long offset;
+ offset = target;
if (! (flags & BRANCH_ABSOLUTE))
- target = target - (unsigned long)addr;
+ offset = offset - (unsigned long)addr;
+
+ /* Check we can represent the target in the instruction form... | powerpc: Make create_branch() return errors if the branch target is too large
If you pass a target value to create_branch() which is more than 32MB - 4,
or - 32MB away from the branch site, then it's impossible to create an
immediate branch. The current code doesn't check, which will lead to us
creating a branch to s... | mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,Krist... | 053a858efa46c9ab86363b271374ec02ad2af753 |
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | ---
+++
@@ -29,6 +29,8 @@
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
+ #define SK_SUPPORT_LEGACY_GETBLENDMODE
+ #define SK_SUPPORT_LEGACY_SETFILTERQUALITY
#define SK_DISABLE_DAA // skbug.com/6886
| Add flags to stage Skia API changes
Test: make
Bug: 178700363
Change-Id: I5d214f8fd69f7419f8b98f61a6e2f26f08587ff7
| bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-... | 098c879ed8c055047261c5cce0567b81fecbf197 |
#pragma once
#include <cstdint>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
enum class Color {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */... | #pragma once
#include <cstdint>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
enum class Color {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */... | ---
+++
@@ -21,7 +21,7 @@
};
struct Noncopyable {
- Noncopyable &operator=(const Noncopyable &) = delete;
- Noncopyable(const Noncopyable &) = delete;
+ Noncopyable& operator=(const Noncopyable&) = delete;
+ Noncopyable(const Noncopyable&) = delete;
Noncopyable() = default;
}; | Align & and * to the left always
| bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator | 5d70a9c23b0d34ea511b8e1705e2c9a8d6d0a435 |
#include <stdio.h>
#include <ugens.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
extern int sizeof_farray[];
extern int f_goto[];
/* Returns the address of function number genno, or NULL if the
function array doesn't exist.
NOTE: It's the responsiblity of instruments to deal with a
missing ... | #include "../H/ugens.h"
#include <stdio.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
extern int sizeof_farray[];
extern int f_goto[];
/* Returns the address of function number genno, or NULL if the
function array doesn't exist.
NOTE: It's the responsiblity of instruments to deal with a
mis... | ---
+++
@@ -1,5 +1,5 @@
-#include "../H/ugens.h"
#include <stdio.h>
+#include <ugens.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
@@ -15,9 +15,15 @@
*/
float *floc(int genno)
{
- int index = f_goto[genno];
+ int index;
+
+ if (genno < 0)
+ return NULL;
+
+ index = f_goto[g... | Make sure gen loc is in range.
| apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix | 3709f2b154a5db0500892c1d720280d54981135a |
//
// Copyright (c) 2008 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... | //
// Copyright (c) 2008 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... | ---
+++
@@ -19,8 +19,8 @@
#import "GPSyncProtocol.h"
-// Source for documents, spreadsheets, and presentations in Google Docs.
-// Note: presentations currently won't have content data.
+// Source for documents, spreadsheets, presentations, and PDFs in Google Docs.
+// Note: PDFs currently won't have content dat... | Update header comment to reflect the current state of the source.
git-svn-id: c46e06cb57945f24bc44ee3ee8f795d5b6e634f5@64 c4e13eb7-e550-0410-89ee-d7df1d48aa01
| apache-2.0 | nagyistoce/precipitate,ericmckean/precipitate | e09a55881f98ea0796fe591e6e3f9b8ea0c791ac |
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios... | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios... | ---
+++
@@ -19,6 +19,8 @@
raw.c_oflag &= ~(OPOST);
raw.c_cflag &= ~(CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
+ raw.c_cc[VMIN] = 0;
+ raw.c_cc[VTIME] = 1;
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
@@ -26,13 +28,17 @@
int main() {
enable_raw_mode();
- char c;
- while (read(STDIN_FILENO, ... | Add a timeout for read()
Set VMIN to 0 so read() returns as soon as there is any input to be
read.
Set VTIME to 1 so the wait time of read() is 100 milliseconds.
| bsd-2-clause | oldsharp/kilo,oldsharp/kilo | 44bd63e4db6ac33a03b14da1a2b6e932f2947a35 |
/// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_OBJECT... | /// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_OBJECT... | ---
+++
@@ -19,9 +19,6 @@
class SpeciesDialog : public QDialog {
Q_OBJECT
-#ifndef NO_TESTING
- friend class TestSpeciesDialog;
-#endif
public:
/// @brief Constructor.
///
@@ -34,10 +31,10 @@
Species getSpecies();
private slots:
- /// @brief Emits the accepted signal.
+ /// @brief Calls inherite... | Remove unused friend class declaration
| mit | BGWoodward/FishDetector | 7b91a38d79ab14ea212a91a69a19b31111d1ba91 |
#ifndef BLUETOOTH_CONF_H__
#define BLUETOOTH_CONF_H__
// SD specific configurations.
#if (BLUETOOTH_SD == 110)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (0)
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PER... | #ifndef BLUETOOTH_CONF_H__
#define BLUETOOTH_CONF_H__
// SD specific configurations.
#if (BLUETOOTH_SD == 110)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (0)
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PER... | ---
+++
@@ -18,7 +18,7 @@
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
-#define MICROPY_PY_UBLUEPY_CENTRAL (0)
+#define MICROPY_PY_UBLUEPY_CENTRAL (1)
#else
#error "SD not supported" | nrf5/drivers/bluetooth: Enable ubluepy central by default if running nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now.
| mit | adafruit/circuitpython,adafruit/micropython,adafruit/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit... | cb9ed6bb55a5020770ad31fd30a05b4a91b70a81 |
#ifndef _ARDUINO_COMPAT_H
#define _ARDUINO_COMPAT_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
using namespace std;
typedef bool boolean;
typedef iostream Stream;
#endif
| #ifndef _ARDUINO_COMPAT_H
#define _ARDUINO_COMPAT_H
#include <stdio.h>
#include <stdlib.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
using namespace std;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsi... | ---
+++
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
@@ -14,9 +15,6 @@
#include <iostream>
using namespace std;
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_... | Use stdint.h for unsigned integer typedefs
Fixes problem compiling regression tests on 64 bit OS.
| lgpl-2.1 | stevemarple/MicroNMEA,stevemarple/MicroNMEA | 5e9d8dbf60e137345a988b2e3ed1281dae9d4014 |
//
// Created by Hippo on 9/13/2016.
//
#ifndef IMAGE_IMAGE_DECODER_H
#define IMAGE_IMAGE_DECODER_H
#include "com_hippo_image_BitmapDecoder.h"
#define IMAGE_CONFIG_INVALID -1;
#define IMAGE_CONFIG_AUTO com_hippo_image_BitmapDecoder_CONFIG_AUTO
#define IMAGE_CONFIG_RGB_565 com_hippo_image_BitmapDecoder_CON... | //
// Created by Hippo on 9/13/2016.
//
#ifndef IMAGE_IMAGE_DECODER_H
#define IMAGE_IMAGE_DECODER_H
#include "com_hippo_image_BitmapDecoder.h"
#define IMAGE_CONFIG_INVALID -1;
#define IMAGE_CONFIG_AUTO com_hippo_image_BitmapDecoder_CONFIG_AUTO
#define IMAGE_CONFIG_RGB_565 com_hippo_image_BitmapDecoder_CON... | ---
+++
@@ -15,12 +15,12 @@
#define IMAGE_CONFIG_RGBA_8888 com_hippo_image_BitmapDecoder_CONFIG_RGBA_8888
-inline bool is_explicit_config(int32_t config) {
+static inline bool is_explicit_config(int32_t config) {
return config == IMAGE_CONFIG_RGB_565 || config == IMAGE_CONFIG_RGBA_8888;
}
-inline uint32_... | Fix undefined references in linker
| apache-2.0 | seven332/Image,seven332/Image,seven332/Image | 8de958ec707f8e8115881ad595ed4d872bc91641 |
//
// class_getSubclasses.h
// iActiveRecord
//
// Created by Alex Denisov on 21.03.12.
// Copyright (c) 2012 okolodev.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
... | //
// class_getSubclasses.h
// iActiveRecord
//
// Created by Alex Denisov on 21.03.12.
// Copyright (c) 2012 okolodev.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
... | ---
+++
@@ -11,7 +11,8 @@
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
- Class classes[sizeof(Class) * numClasses];
+ Class *classes = NULL;
+ classes = (__unsafe_unretained Class *)malloc(sizeof(Class) * numClasses);
numClasses = objc_get... | Fix for crashes in iOS 10 | mit | AlexDenisov/iActiveRecord,3dcl/iActiveRecord,3dcl/iActiveRecord,AlexDenisov/iActiveRecord,3dcl/iActiveRecord,AlexDenisov/iActiveRecord,3dcl/iActiveRecord | 3218e01b76602eaa399a7e43caa219d7330855d7 |
//
// Created by Dawid Drozd aka Gelldur on 03.02.16.
//
#pragma once
#include <android/log.h>
#ifndef NDEBUG
#define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__)
#define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__)
#define WLOG(...) __android_log_print(ANDROID_LOG_W... | //
// Created by Dawid Drozd aka Gelldur on 03.02.16.
//
#pragma once
#include <android/log.h>
#ifdef DEBUG
#define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__)
#define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__)
#define WLOG(...) __android_log_print(ANDROID_LOG_WAR... | ---
+++
@@ -6,7 +6,7 @@
#include <android/log.h>
-#ifdef DEBUG
+#ifndef NDEBUG
#define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__)
#define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__) | Fix compile for debug on Android
| apache-2.0 | gelldur/DexodeEngine,gelldur/DexodeEngine,gelldur/DexodeEngine | 4941fe015c2804a36b820818f4e8f68f867ed5b4 |
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/m... | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/m... | ---
+++
@@ -19,24 +19,3 @@
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
-// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
-// reserved. Use of this source code is governed by a BSD-style license that
-// can be found in the LICENSE file.
-
-#ifndef CEF_LIBCEF_DL... | Remove duplicate content in file.
git-svn-id: 66addb63d0c46e75f185859367c4faf62af16cdd@1734 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
| bsd-3-clause | kuscsik/chromiumembedded,kuscsik/chromiumembedded,kuscsik/chromiumembedded,kuscsik/chromiumembedded | f24e70fa3a204565a656594b48ac84c390aa1e8f |
//
// TMCacheBackgroundTaskManager.h
// TMCache
//
// Created by Bryan Irace on 4/24/15.
// Copyright (c) 2015 Tumblr. All rights reserved.
//
@import UIKit;
#ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
typedef NSUInteger UIBackgroundTaskIdentifier;
#endif
/**
A protocol that classes who can begin and end backgroun... | //
// TMCacheBackgroundTaskManager.h
// TMCache
//
// Created by Bryan Irace on 4/24/15.
// Copyright (c) 2015 Tumblr. All rights reserved.
//
@import UIKit;
/**
A protocol that classes who can begin and end background tasks can conform to. This protocol provides an abstraction in
order to avoid referencing `+ ... | ---
+++
@@ -7,6 +7,10 @@
//
@import UIKit;
+
+#ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
+typedef NSUInteger UIBackgroundTaskIdentifier;
+#endif
/**
A protocol that classes who can begin and end background tasks can conform to. This protocol provides an abstraction in | Define UIBackgroundTaskIdentifier if on OS X
| apache-2.0 | paulkite/TMCache,paulkite/TMCache | 0f427d7730b007e8740fff16d9a7b0dc5ebb692a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.